cocotb 2.1.dev49+r621cba2c (2026-06-15)

cocotb 2.1.dev49+r621cba2c (2026-06-15)#

Features#

Bugfixes#

  • Improve VsimSA simulator support (adds Active-HDL support and updates Riviera-Pro support). (#5041)

  • Generated JUnit XML tests results file is now compatible with Jenkins xUnit schema version 2. (#5219)

  • cocotb.logging.default_config() no longer overwrites root handlers, but configures formatting on whatever handlers are already registered. (#5248)

  • Fixed bug where COCOTB_RESOLVE_X when set "random" would resolve all non-0/1 values in a vector to the same value. (#5306)

  • Fixed use-after-free in VpiSignalObjHdl::register_value_change_callback error handling code which caused VCS to segfault. (#5439)

  • Fixed a segmentation fault on Icarus Verilog when VPI callbacks fired after the Python interpreter was finalized during simulator shutdown. (#5440)

  • Fixed memory leak of one-shot callback on VCS/Xcelium. (#5447)

  • Fixed LogicArray equality against list and tuple values containing unsupported object types. (#5596)

  • Fixed a performance regression where the time to remove a completed Task scaled linearly with the number of concurrently running tasks. (#5603)

Deprecations and Removals#

  • Dropped support for MacOS 13 (Ventura). (#4986)

  • Removed Windows and Linux 32-bit release builds. (#4986)

  • Support for Python 3.6, 3.7, and 3.8 was removed. (#4987)

  • Deprecated passing Tasks to First and Combine in favor of passing coroutines directly to select() and gather(), respectively. (#5206)

  • Removed support for undocumented COCOTB_RESULT_TESTPACKAGE environment variable. The XML attribute package is invalid in JUnit XML. (#5219)

  • Removed support for undocumented COCOTB_RESULT_TESTSUITE environment variable. Name of test suite will be based on name of the cocotb test module. (#5219)

  • Deprecated cocotb.pass_test(). Instead, use cocotb.skip() to skip a test or use cocotb.end_test() to end a test while respecting expected failures. (#5395)

  • Removed the cocotb_tools.config.lib_name() function. (#5516)

  • Removed the --lib-name option from the cocotb-config script. (#5516)

Changes#

  • Reimplemented the scheduler. Exact scheduling order may have changed. (#4717)

  • Changed Task.cancel() to throw RuntimeError if attempting to cancel the currently running task. (#5162)

  • The LIBPYTHON_LOC environment variable was removed from the GPI. Instead, libpython should be included in GPI_USERS. Support remains in Makefiles (LIBPYTHON_LOC) and Python Runner (LIBPYTHON_LOC) for backwards-compatibility. In this case the value of LIBPYTHON_LOC is included in the generated GPI_USERS if and only if GPI_USERS is not already defined. (#5207)

  • Tests reported in generated JUnit XML tests results file will be grouped into test suites by cocotb test module. (#5219)

  • Added environment variable type information to all documented environment variables. (#5232)

  • Entry points listed in PYGPI_USERS are no longer passed the argv object. If you need access to command-line arguments, use cocotb.simulator.get_simulator_args() instead. (#5258)

  • Changed input value checking on IntegerObject and EnumObject to reflect the size and signedness of the underlying HDL type. Previously, both classes would accept negative values even if the underlying type was unsigned, and had a hardcoded and incorrect limit on the size of the value size that didn’t reflect the size of the underlying HDL type. (#5263)

  • Split the random number generator (RNG) for the COCOTB_RESOLVE_X "random" mode from the global Python RNG, so that switching from one COCOTB_RESOLVE_X mode to another would not affect the random number sequence of the rest of the testbench. (#5306)

  • pytest is no longer an optional dependency, but is required. (#5363)

  • The Makefile target sim no longer recursively calls make. This makes it possible to use += with Make variables without the right hand side being added twice. (#5382)

  • Changed the extension on the Icarus GPI implementation library from .vpl to the normal extension for shared libraries on the platform (e.g. .so or .dll). (#5516)

  • Removed implicit conversion of defines in Runner.build to literals. If users need to convert Python objects to literals for use in defines or parameters, they must explicitly call the new as_vhdl_literal() or as_sv_literal() functions. (#5534)

  • Makefile simulator recipes now use a shared COCOTB_ENV variable defined in Makefile.inc. (#5565)