The cocotb project is proud to announce the immediate release of cocotb version 1.7.0.

Users will find this release easier to install than any previous release, thanks to the availability of binary builds on the Python’s package repository, PyPi. Just run pip install cocotb on any supported platform and cocotb is ready for operation within seconds, without the need to have a C/C++ compiler or the Python development libraries available.

In addition to the usual set of bug fixes and reliability improvements, users of the Questa simulator will be happy to hear that the industry-standard VHPI interface is now supported with Questa 2022.3 and cocotb 1.7.

The path to a super-smooth installation experience

Providing a super-smooth installation experience has been a long time in the making, with a number of challenging technical, legal, and infrastructure-related problems to be solved.

cocotb communicates with a HDL simulator through a simulator-specific library, which implements the VPI, VHPI, or FLI standard. Up until the 1.2 release, published in July 2019, cocotb compiled the simulator libraries when running a test. That’s an efficient solution, because we only need to compile a single library for the used combination of Python, simulator, operating system, and architecture (x86_64 for example).

The downside? Users need to have a C/C++ compiler and the Python development headers available at simulation time. That’s rarely a problem on single-user Linux machines, but it is sometimes a problem for users on big simulation clusters, and it is even more a problem for users on Windows, where installing software isn’t as trivial as it should be. The requirement to procure a working compiler has probably brought the cocotb journey of many enthusiastic Windows users to a crashing halt before it even started.

A first important step forward was made in the cocotb 1.2 release: the compilation now happens once at package installation time, i.e. when running “pip install cocotb”. Now users only need a C/C++ compiler when installing cocotb, not when running it. Since cocotb does not know which simulator will be used, it prepares libraries for all supported simulators in advance. Since then, life has been better for the “run testbenches on clusters” user, but not really for our Windows user base.

Over the years we have refined the compilation process at build time to iron out a variety of issues and corner cases which users reported, giving us confidence that pre-compiling libraries is indeed a viable and robust path forward (something which wasn’t clear at all in the beginning!).

With the 1.7 release we went even further: we eliminated the compilation step for our users altogether by shipping pre-compiled libraries. When doing a release, we build libraries for all supported Python versions, for all supported platforms, and for all supported simulators. Taken together, we build a whopping 250 VPI, FLI and VHPI libraries – only one or two of which will ultimately be used when running a testbench! Now even users on Windows don’t need to worry about installing a working compiler any more: we’ve done it for you!

Why haven’t we done all of that years ago? There was one major non-technical roadblock: compiling the FLI libraries for Questa and ModelSim requires access to a C header file which is shipped as part of the simulator. Licensing requirements prevented us from shipping the file together with cocotb. This restriction is no more: Siemens EDA kindly relicensed a key header file, and all simulator libraries can be built in the same way.

A new communication interface with Questa

In other Questa-related news: Previously, cocotb used only the proprietary FLI interface when simulating VHDL designs with Questa or ModelSim. Since Questa 2022.3 and cocotb 1.7 users can choose the standard VHPI instead (FLI is still the default). There are no immediate benefits of doing so from a user’s point of view, but it helps us on the cocotb side greatly by allowing us to focus on VHPI as a common interface for all VHDL simulators.

Closing notes

A much more detailed description of all changes in this first 1.7 release can be found in the release notes. Cocotb is a community project under the umbrella of the FOSSi Foundation. Thanks to all sponsors of the FOSSi Foundation the cocotb project can make use of a continuous integration system which runs proprietary simulators in a compliant way.

We are very thankful to Aldec for providing a license for Riviera-PRO, and to Siemens EDA for providing a license for Questa, which enables us to continuously test cocotb against these simulators to ensure they continue to be well integrated.

Over the course of the last year, Siemens EDA worked closely with the cocotb project to sort out various legal and technical issues, resulting in considerably improved integration between Questa and cocotb. Thank you!

Please reach out to Philipp at philipp@fossi-foundation.org if you or your company want to support cocotb, either financially to help pay for costs such as running our continuous integration setup, or with in-kind donations, such as simulator licenses.

To close this release announcement, here are some statistics:

  • 326 files changed, 9694 insertions(+), 14361 deletions(-)
  • 177 commits
  • 22 code contributors

These numbers are impressive (and slightly skewed due to imported header and license files) and showcase the power of the free and open source collaboration model. To be able to sustain this amount of change and the high-quality review process behind it we are happy to have an active group of maintainers caring for cocotb and its users. Thank you, and thanks to the whole cocotb community for coming together to create this unique piece of software.

And now, go and enjoy the best release of cocotb so far!

If you have questions or issues with this release head over to the issue tracker.