| ************* |
| Release Notes |
| ************* |
|
|
| .. spelling:word-list:: |
| dev |
|
|
| All releases are available from the `GitHub Releases Page <https://github.com/cocotb/cocotb/releases>`_. |
|
|
| .. include:: master-notes.rst |
|
|
| .. towncrier release notes start |
|
|
| Cocotb 1.8.0 (2023-06-15) |
| ========================= |
|
|
| Features |
| -------- |
|
|
| - :class:`cocotb.types.LogicArray` now supports a default value construction if a ``range`` is given. (:pr:`3031`) |
| - Add support for :class:`fraction.Fraction` and :class:`decimal.Decimal` to the ``period`` argument of :class:`cocotb.clock.Clock`. (:pr:`3045`) |
| - This release adds the :ref:`Python Test Runner <howto-python-runner>`, an experimental replacement for the traditional Makefile-based build and run flow. (:pr:`3103`) |
| - Incisive now supports compilation into a named VHDL library ``lib`` using ``VHDL_SOURCES_<lib>``. (:pr:`3261`) |
| - Cocotb can now correctly drive Verilator when its new ``--timing`` flag is used. (:pr:`3316`) |
| - Creating an FST waveform dump in Icarus Verilog can now be done by setting the :envvar:`WAVES` environment variable. Icarus-specific Verilog code is no longer required. (:pr:`3324`) |
|
|
|
|
| Bugfixes |
| -------- |
|
|
| - Fixed Verilator not writing coverage files in some cases. (:pr:`1478`) |
| - The :data:`Regression Manager <cocotb.regression_manager>` now correctly handles exceptions raised in tests when the exceptions inherit from `BaseException`. (:pr:`3196`) |
| - Fix a performance regression when using Questa with FLI introduced in cocotb 1.7.0. (:pr:`3229`) |
| - Adds support for packed union in SystemVerilog when using Cadence Xcelium. (:pr:`3239`) |
| - Fixed :class:`RecursionError` caused by certain corner cases in the scheduler. (:pr:`3267`) |
| - Fixed cleanup in scheduler which caused sporadic warning messages and bugs in some corner cases. (:pr:`3270`) |
| - Fix "use after free" bug in VHPI implementation causing Riviera to fail to discover some simulation objects. (:pr:`3307`) |
|
|
|
|
| Changes |
| ------- |
|
|
| - Removed ``level`` arg from ``_sim_event`` function in the :envvar:`PYGPI_ENTRY_POINT` interface. This function can only indicate a request to shutdown from the simulator or GPI. (:pr:`3066`) |
| - Moved :class:`cocotb.task.Task` and friends to ``cocotb.task`` module to alleviate internal cyclic import dependency. Users should update imports of the :class:`~cocotb.task.Task` to import from the top-level ``cocotb`` namespace. (:pr:`3067`) |
| - Added support for :envvar:`VERILOG_INCLUDE_DIRS` in the Makefiles. (:pr:`3189`) |
| - Changed platform support: Added Red Hat Enterprise Linux 9 (RHEL) and compatible clones, added macOS 13 x86_64 (Ventura on Intel), removed Ubuntu 18.04 (end-of-life). Note that Python wheels compatible with Ubuntu 18.04 remain available for the time being. Even though the cocotb project does not provide pre-compiled binaries for unsupported platforms users can typically compile cocotb themselves, as done automatically when running ``pip install``. |
|
|
| cocotb 1.7.2 (2022-11-15) |
| ========================= |
|
|
| Changes |
| ------- |
| - Python 3.11 is now supported. |
| - ``find_libpython``, a library to find (as the name indicates) libpython, is now a dependency of cocotb. |
| Its latest version resolves an issue for users on RedHat Enterprise Linux (RHEL) 8 and Python 3.8, where the correct Python library would not be detected. (:issue:`3097`) |
|
|
| Bugfixes |
| -------- |
|
|
| - Fixed a segmentation fault in Aldec Riviera-PRO that prevented mixed-language simulation from running. (:issue:`3078`) |
|
|
| cocotb 1.7.1 (2022-09-17) |
| ========================= |
|
|
| Bugfixes |
| -------- |
|
|
| - Fixed the packaging of the source distribution (sdist) to include all necessary files. (:pr:`3072`) |
| - Documented the fact that ``libstdc++-static`` needs to be available on some Linux distributions to install cocotb from source. (:pr:`3082`) |
|
|
| cocotb 1.7.0 (2022-09-06) |
| ========================= |
|
|
| Features |
| -------- |
|
|
| - Removed the need for ModelSim or Questa being installed when building cocotb. Similar to the approach taken with VPI and VHPI, cocotb now includes all C header files to build the FLI interface. This improvement was done in close collaboration with Siemens EDA, who changed the license of the relevant source code file. (:pr:`2948`) |
| - With Questa 2022.3 VHPI support is now fully working and no longer experimental. cocotb still defaults to using the FLI interface for VHDL toplevels with Questa. Users can choose VHPI instead by setting the :envvar:`VHDL_GPI_INTERFACE` environment variable to ``vhpi`` before running cocotb. (:pr:`2803`) |
| - cocotb tests are now more reproducible. (:pr:`2721`) |
| - :class:`~cocotb.handle.Force`, :class:`~cocotb.handle.Freeze`, and :class:`~cocotb.handle.Release` are now supported when using the FLI, Questa's traditional method to access VHDL. (:pr:`2775`) |
| - cocotb binaries now statically link libstdc++ on Linux, which prevents library load errors even if the simulator ships its own libstdc++. (:pr:`3002`) |
|
|
|
|
| Bugfixes |
| -------- |
|
|
| - Fixed write scheduling to apply writes oldest to newest. (:pr:`2792`) |
| - Fixed Riviera makefile error for mixed-language simulation when VHDL is the top-level. This bug prevented the VPI library from loading correctly, and was a regression in 1.5.0. (:pr:`2912`) |
| - Fixed FLI issue where unprimed triggers were still firing. (:pr:`3010`) |
|
|
|
|
| Deprecations and Removals |
| ------------------------- |
|
|
| - ``cocotb.fork`` has been deprecated in favor of :func:`cocotb.start_soon` or :func:`cocotb.start`. (:pr:`2663`) |
|
|
|
|
| Changes |
| ------- |
|
|
| - Passing :term:`python:coroutine`\ s to :func:`~cocotb.triggers.with_timeout` is now supported. (:pr:`2494`) |
| - Renamed ``RunningTask`` to :class:`~cocotb.task.Task`. (:pr:`2876`) |
| - Made :class:`~cocotb.task.Task` interface more like :class:`asyncio.Task`'s. (:pr:`2876`) |
| - When code coverage is enabled with :envvar:`COVERAGE` and a configuration file is specified with :envvar:`COVERAGE_RCFILE`, default coverage configuration is not applied to avoid overriding the user-defined configuration. (:pr:`3014`) |
|
|
|
|
| cocotb 1.6.2 (2022-02-07) |
| ========================= |
|
|
| Bugfixes |
| -------- |
|
|
| - Fix regression in :class:`~cocotb.regression.TestFactory` when using generator-based test coroutines. (:issue:`2839`) |
|
|
| Changes |
| ------- |
|
|
| - Change how :envvar:`PYTHONHOME` is populated to work with broken mingw environments. (:issue:`2739`) |
|
|
|
|
| cocotb 1.6.1 (2021-12-07) |
| ========================= |
|
|
| Bugfixes |
| -------- |
|
|
| - Fix regression in :class:`~cocotb.regression.TestFactory` wrt unique test names. (:issue:`2781`) |
|
|
| cocotb 1.6.0 (2021-10-20) |
| ========================= |
|
|
| Features |
| -------- |
|
|
| - Support a custom entry point from C to Python with :envvar:`PYGPI_ENTRY_POINT`. (:pr:`1225`) |
| - Added :class:`~cocotb.types.Logic` and ``cocotb.types.Bit`` modeling datatypes. (:pr:`2059`) |
| - ModelSim and Questa now support compilation into a named VHDL library ``lib`` using ``VHDL_SOURCES_<lib>``. (:pr:`2465`) |
| - Added the :class:`~cocotb.types.LogicArray` modeling datatype. (:pr:`2514`) |
| - Xcelium now supports compilation into a named VHDL library ``lib`` using ``VHDL_SOURCES_<lib>``. (:pr:`2614`) |
| - Add the :make:var:`SIM_CMD_PREFIX` to supported Makefile variables, allowing users to pass environment variables and other command prefixes to simulators. (:pr:`2615`) |
| - To support VHDL libraries in ModelSim/Questa/Xcelium, :make:var:`VHDL_LIB_ORDER` has been added to specify a library compilation order. (:pr:`2635`) |
| - ``cocotb.fork``, :func:`cocotb.start`, :func:`cocotb.start_soon`, and :func:`cocotb.create_task` now accept any object that implements the :class:`collections.abc.Coroutine` protocol. (:pr:`2647`) |
| - :class:`~cocotb.regression.TestFactory` and :class:`cocotb.test` now accept any :class:`collections.abc.Callable` object which returns a :class:`collections.abc.Coroutine` as a test function. (:pr:`2647`) |
| - Added :func:`cocotb.start` and :func:`cocotb.start_soon` scheduling functions. (:pr:`2660`) |
| - Add :func:`cocotb.create_task` API for creating a Task from a Coroutine without scheduling. (:pr:`2665`) |
| - Support rounding modes in :class:`~cocotb.triggers.Timer`. (:pr:`2684`) |
| - Support rounding modes in :class:`cocotb.utils.get_sim_steps`. (:pr:`2684`) |
| - Support passing ``'step'`` as a time unit in :func:`cocotb.utils.get_sim_time`. (:pr:`2691`) |
|
|
|
|
| Bugfixes |
| -------- |
|
|
| - VHDL signals that are zero bits in width now read as the integer ``0``, instead of raising an exception. (:pr:`2294`) |
| - Correctly parse plusargs with ``=``\ s in the value. (:pr:`2483`) |
| - :envvar:`COCOTB_RESULTS_FILE` now properly communicates with the :data:`Regression Manager <cocotb.regression_manager>` to allow overloading the result filename. (:pr:`2487`) |
| - Fixed several scheduling issues related to the use of :meth:`cocotb.scheduler.start_soon <cocotb.scheduler.Scheduler.start_soon>`. (:pr:`2504`) |
| - Verilator and Icarus now support running without specifying a :envvar:`TOPLEVEL`. (:pr:`2547`) |
| - Fixed discovery of signals inside SystemVerilog interfaces. (:pr:`2683`) |
|
|
|
|
| Improved Documentation |
| ---------------------- |
|
|
| - The :ref:`analog_model` example has been added, showing how to use Python models for analog circuits together with a digital part. (:pr:`2438`) |
|
|
|
|
| Deprecations and Removals |
| ------------------------- |
|
|
| - Setting values on indexed handles using the ``handle[i] = value`` syntax is deprecated. Instead use the ``handle[i].value = value`` syntax. (:pr:`2490`) |
| - Setting values on handles using the ``dut.handle = value`` syntax is deprecated. Instead use the ``handle.value = value`` syntax. (:pr:`2490`) |
| - Setting values on handles using the ``signal <= newval`` syntax is deprecated. Instead, use the ``signal.value = newval`` syntax. (:pr:`2681`) |
| - :func:`cocotb.utils.hexdump` is deprecated; use :func:`scapy.utils.hexdump` instead. (:pr:`2691`) |
| - :func:`cocotb.utils.hexdiffs` is deprecated; use :func:`scapy.utils.hexdiff` instead. (:pr:`2691`) |
| - Passing ``None`` to :func:`cocotb.utils.get_sim_time` is deprecated; use ``'step'`` as the time unit instead. (:pr:`2691`) |
| - The ``stdout`` and ``stderr`` attributes on :class:`cocotb.result.TestComplete` and subclasses are deprecated. (:pr:`2692`) |
| - ``TestFailure`` is deprecated, use an ``assert`` statement instead. (:pr:`2692`) |
| |
| |
| Changes |
| ------- |
|
|
| - Assigning out-of-range Python integers to signals will now raise an :exc:`OverflowError`. (:pr:`2316`) |
| - cocotb now requires Python 3.6+. (:pr:`2422`) |
| - Selecting tests using :make:var:`TESTCASE` will now search for the first occurrence of a test of that name in order of modules listed in :make:var:`MODULE`\ s, and not just the first module in that list. (:pr:`2434`) |
| - The environment variable :envvar:`COCOTB_LOG_LEVEL` now supports ``TRACE`` value, which is used for verbose low-level logging that was previously in ``DEBUG`` logs. (:pr:`2502`) |
| - Improves formatting on test-related logging outputs. (:pr:`2564`) |
| - Shorter log lines (configurable with :envvar:`COCOTB_REDUCED_LOG_FMT`) are now the default. For wider log output, similar to previous cocotb releases, set the :envvar:`COCOTB_REDUCED_LOG_FMT` environment variable to ``0``. (:pr:`2564`) |
|
|
|
|
| cocotb 1.5.2 (2021-05-03) |
| ========================= |
|
|
| Bugfixes |
| -------- |
|
|
| - Change some makefile syntax to support GNU Make 3 (:pr:`2496`) |
| - Fix behavior of ``cocotb-config --libpython`` when finding libpython fails (:pr:`2522`) |
|
|
|
|
| cocotb 1.5.1 (2021-03-20) |
| ========================= |
|
|
| Bugfixes |
| -------- |
|
|
| - Prevent pytest assertion rewriting (:pr:`2028`) from capturing stdin, which causes problems with IPython support (:pr:`1649`). (:pr:`2462`) |
| - Add dependency on `cocotb_bus <https://github.com/cocotb/cocotb-bus>`_ to prevent breaking users that were previously using the bus and testbenching objects. (:pr:`2477`) |
| - Add back functionality to ``cocotb.binary.BinaryValue`` that allows the user to change ``binaryRepresentation`` after object creation. (:pr:`2480`) |
|
|
|
|
| cocotb 1.5.0 (2021-03-11) |
| ========================= |
|
|
| Features |
| -------- |
|
|
| - Support for building with Microsoft Visual C++ has been added. |
| See :ref:`install` for more details. (:pr:`1798`) |
| - Makefiles now automatically deduce :make:var:`TOPLEVEL_LANG` based on the value of :make:var:`VERILOG_SOURCES` and :make:var:`VHDL_SOURCES`. |
| Makefiles also detect incorrect usage of :make:var:`TOPLEVEL_LANG` for simulators that only support one language. (:pr:`1982`) |
| - ``cocotb.fork`` will now raise a descriptive :class:`TypeError` if a coroutine function is passed into them. (:pr:`2006`) |
| - Added :meth:`cocotb.scheduler.start_soon <cocotb.scheduler.Scheduler.start_soon>` which schedules a coroutine to start *after* the current coroutine yields control. |
| This behavior is distinct from ``cocotb.fork`` which schedules the given coroutine immediately. (:pr:`2023`) |
| - If ``pytest`` is installed, its assertion-rewriting framework will be used to |
| produce more informative tracebacks from the :keyword:`assert` statement. (:pr:`2028`) |
| - The handle to :envvar:`TOPLEVEL`, typically seen as the first argument to a cocotb test function, is now available globally as :data:`cocotb.top`. (:pr:`2134`) |
| - The ``units`` argument to :class:`cocotb.triggers.Timer`, |
| :class:`cocotb.clock.Clock` and :func:`cocotb.utils.get_sim_steps`, |
| and the ``timeout_unit`` argument to |
| :func:`cocotb.triggers.with_timeout` and :class:`cocotb.test` |
| now accepts ``'step'`` to mean the simulator time step. |
| This used to be expressed using ``None``, which is now deprecated. (:pr:`2171`) |
| - :func:`cocotb.regression.TestFactory.add_option` now supports groups of options when a full Cartesian product is not desired (:pr:`2175`) |
| - Added asyncio-style queues, :class:`cocotb.queue.Queue`, :class:`cocotb.queue.PriorityQueue`, and :class:`cocotb.queue.LifoQueue`. (:pr:`2297`) |
| - Support for the SystemVerilog type ``bit`` has been added. (:pr:`2322`) |
| - Added the ``--lib-dir``, ``--lib-name`` and ``--lib-name-path`` options to the ``cocotb-config`` command to make cocotb integration into existing flows easier. (:pr:`2387`) |
| - Support for using Questa's VHPI has been added. |
| Use :make:var:`VHDL_GPI_INTERFACE` to select between using the FLI or VHPI when dealing with VHDL simulations. |
| Note that VHPI support in Questa is still experimental at this time. (:pr:`2408`) |
|
|
|
|
| Bugfixes |
| -------- |
|
|
| - Assigning Python integers to signals greater than 32 bits wide will now work correctly for negative values. (:pr:`913`) |
| - Fix GHDL's library search path, allowing libraries other than *work* to be used in simulation. (:pr:`2038`) |
| - Tests skipped by default (created with `skip=True`) can again be run manually by setting the :envvar:`TESTCASE` variable. (:pr:`2045`) |
| - In :ref:`Icarus Verilog <sim-icarus>`, generate blocks are now accessible directly via lookup without having to iterate over parent handle. (:pr:`2079`, :pr:`2143`) |
|
|
| .. code-block:: python3 |
|
|
| # Example pseudo-region |
| dut.genblk1 #<class 'cocotb.handle.HierarchyArrayObject'> |
|
|
| .. consume the towncrier issue number on this line. (:pr:`2079`) |
| - Fixed an issue with VHPI on Mac OS and Linux where negative integers were returned as large positive values. (:pr:`2129`) |
|
|
|
|
| Improved Documentation |
| ---------------------- |
|
|
| - The :ref:`mixed_signal` example has been added, |
| showing how to use HDL helper modules in cocotb testbenches that exercise |
| two mixed-signal (i.e. analog and digital) designs. (:pr:`1051`) |
| - New example :ref:`matrix_multiplier`. (:pr:`1502`) |
| - A :ref:`refcard` showing the most used features of cocotb has been added. (:pr:`2321`) |
| - A chapter :ref:`custom-flows` has been added. (:pr:`2340`) |
|
|
|
|
| Deprecations and Removals |
| ------------------------- |
|
|
| - The contents of :mod:`cocotb.generators` have been deprecated. (:pr:`2047`) |
| - The outdated "Sorter" example has been removed from the documentation. (:pr:`2049`) |
| - Passing :class:`bool` values to ``expect_error`` option of :class:`cocotb.test` is deprecated. |
| Pass a specific :class:`Exception` or a tuple of Exceptions instead. (:pr:`2117`) |
| - The system task overloads for ``$info``, ``$warn``, ``$error`` and ``$fatal`` in Verilog and mixed language testbenches have been removed. (:pr:`2133`) |
| - ``TestError`` has been deprecated, use :ref:`python:bltin-exceptions`. (:pr:`2177`) |
| - The undocumented class ``cocotb.xunit_reporter.File`` has been removed. (:pr:`2200`) |
| - Deprecated :class:`cocotb.hook` and :envvar:`COCOTB_HOOKS`. |
| See the documentation for :class:`cocotb.hook` for suggestions on alternatives. (:pr:`2201`) |
| - Deprecate :func:`~cocotb.utils.pack` and :func:`~cocotb.utils.unpack` and the use of :class:`python:ctypes.Structure` in signal assignments. (:pr:`2203`) |
| - The outdated "ping" example has been removed from the documentation and repository. (:pr:`2232`) |
| - Using the undocumented custom format :class:`dict` object in signal assignments has been deprecated. (:pr:`2240`) |
| - The access modes of many interfaces in the cocotb core libraries were re-evaluated. |
| Some interfaces that were previously public are now private and vice versa. |
| Accessing the methods through their old name will create a :class:`DeprecationWarning`. |
| In the future, the deprecated names will be removed. (:pr:`2278`) |
| - The bus and testbenching components in cocotb have been officially moved to the `cocotb-bus <https://github.com/cocotb/cocotb-bus>`_ package. |
| This includes |
| :class:`~cocotb_bus.bus.Bus`, |
| :class:`~cocotb_bus.scoreboard.Scoreboard`, |
| everything in :mod:`cocotb_bus.drivers <cocotb.drivers>`, |
| and everything in :mod:`cocotb_bus.monitors <cocotb.monitors>`. |
| Documentation will remain in the main cocotb repository for now. |
| Old names will continue to exist, but their use will cause a :class:`DeprecationWarning`, |
| and will be removed in the future. (:pr:`2289`) |
|
|
|
|
| Changes |
| ------- |
|
|
| - Assigning negative Python integers to handles does an implicit two's compliment conversion. (:pr:`913`) |
| - Updated :class:`~cocotb_bus.drivers.Driver`, :class:`~cocotb_bus.monitors.Monitor`, and all their subclasses to use the :keyword:`async`/:keyword:`await` syntax instead of the :keyword:`yield` syntax. (:pr:`2022`) |
| - The package build process is now fully :pep:`517` compliant. (:pr:`2091`) |
| - Improved support and performance for :ref:`sim-verilator` (version 4.106 or later now required). (:pr:`2105`) |
| - Changed how libraries are specified in :envvar:`GPI_EXTRA` to allow specifying libraries with paths, and names that don't start with "lib". (:pr:`2341`) |
|
|
|
|
| Cocotb 1.4.0 (2020-07-08) |
| ========================= |
|
|
| Features |
| -------- |
|
|
| - :class:`~cocotb.triggers.Lock` can now be used in :keyword:`async with` statements. (:pr:`1031`) |
| - Add support for distinguishing between ``net`` (``vpiNet``) and ``reg`` (``vpiReg``) type when using the VPI interface. (:pr:`1107`) |
| - Support for dropping into :mod:`pdb` upon failure, via the new :envvar:`COCOTB_PDB_ON_EXCEPTION` environment variable (:pr:`1180`) |
| - Simulators run through a Tcl script (Aldec Riviera Pro and Mentor simulators) now support a new :make:var:`RUN_ARGS` Makefile variable, which is passed to the first invocation of the tool during runtime. (:pr:`1244`) |
| - Cocotb now supports the following example of forking a *non-decorated* :ref:`async coroutine <async_functions>`. |
|
|
| .. code-block:: python3 |
|
|
| async def example(): |
| for i in range(10): |
| await cocotb.triggers.Timer(10, "ns") |
|
|
| cocotb.fork(example()) |
|
|
| .. |
| towncrier will append the issue number taken from the file name here: |
|
|
| Issue (:pr:`1255`) |
| - The cocotb log configuration is now less intrusive, and only configures the root logger instance, ``logging.getLogger()``, as part of :func:`cocotb.log.default_config` (:pr:`1266`). |
|
|
| As such, it is now possible to override the default cocotb logging behavior with something like:: |
| |
| # remove the cocotb log handler and formatting |
| root = logging.getLogger() |
| for h in root.handlers[:]: |
| root.remove_handler(h) |
| h.close() |
|
|
| # add your own |
| logging.basicConfig() |
|
|
| .. consume the towncrier issue number on this line. (:pr:`1266`) |
| - Support for ``vpiRealNet`` (:pr:`1282`) |
| - The colored output can now be disabled by the :envvar:`NO_COLOR` environment variable. (:pr:`1309`) |
| - Cocotb now supports deposit/force/release/freeze actions on simulator handles, exposing functionality similar to the respective Verilog/VHDL assignments. |
|
|
| .. code-block:: python3 |
|
|
| from cocotb.handle import Deposit, Force, Release, Freeze |
|
|
| dut.q <= 1 # A regular value deposit |
| dut.q <= Deposit(1) # The same, higher verbosity |
| dut.q <= Force(1) # Force value of q to 1 |
| dut.q <= Release() # Release q from a Force |
| dut.q <= Freeze() # Freeze the current value of q |
|
|
| .. |
| towncrier will append the issue number taken from the file name here: |
|
|
| Issue (:pr:`1403`) |
| - Custom logging handlers can now access the simulator time using |
| :attr:`logging.LogRecord.created_sim_time`, provided the |
| :class:`~cocotb.log.SimTimeContextFilter` filter added by |
| :func:`~cocotb.log.default_config` is not removed from the logger instance. (:pr:`1411`) |
| - Questa now supports :envvar:`PLUSARGS`. |
| This requires that ``tcl.h`` be present on the system. |
| This is likely included in your installation of Questa, otherwise, specify ``CFLAGS=-I/path/to/tcl/includedir``. (:pr:`1424`) |
| - The name of the entry point symbol for libraries in :envvar:`GPI_EXTRA` can now be customized. |
| The delimiter between each library in the list has changed from ``:`` to ``,``. (:pr:`1457`) |
| - New methods for setting the value of a :class:`~cocotb.handle.NonHierarchyIndexableObject` (HDL arrays). (:pr:`1507`) |
|
|
| .. code-block:: python3 |
|
|
| # Now supported |
| dut.some_array <= [0xAA, 0xBB, 0xCC] |
| dut.some_array.value = [0xAA, 0xBB, 0xCC] |
|
|
| # For simulators that support n-dimensional arrays |
| dut.some_2d_array <= [[0xAA, 0xBB], [0xCC, 0xDD]] |
| dut.some_2d_array.value = [[0xAA, 0xBB], [0xCC, 0xDD]] |
|
|
| .. consume the towncrier issue number on this line. (:pr:`1507`) |
| - Added support for Aldec's Active-HDL simulator. (:pr:`1601`) |
| - Including ``Makefile.inc`` from user makefiles is now a no-op and deprecated. Lines like ``include $(shell cocotb-config --makefiles)/Makefile.inc`` can be removed from user makefiles without loss in functionality. (:pr:`1629`) |
| - Support for using ``await`` inside an embedded IPython terminal, using :mod:`cocotb.ipython_support`. (:pr:`1649`) |
| - Added :meth:`~cocotb.triggers.Event.is_set`, so users may check if an :class:`~cocotb.triggers.Event` has fired. (:pr:`1723`) |
| - The :func:`cocotb.simulator.is_running` function was added so a user of cocotb could determine if they are running within a simulator. (:pr:`1843`) |
|
|
|
|
| Bugfixes |
| -------- |
|
|
| - Tests which fail at initialization, for instance due to no ``yield`` being present, are no longer silently ignored (:pr:`1253`) |
| - Tests that were not run because predecessors threw :class:`cocotb.result.SimFailure`, and caused the simulator to exit, are now recorded with an outcome of :class:`cocotb.result.SimFailure`. |
| Previously, these tests were ignored. (:pr:`1279`) |
| - Makefiles now correctly fail if the simulation crashes before a ``results.xml`` file can be written. (:pr:`1314`) |
| - Logging of non-string messages with colored log output is now working. (:pr:`1410`) |
| - Getting and setting the value of a :class:`~cocotb.handle.NonHierarchyIndexableObject` now iterates through the correct range of the simulation object, so arrays that do not start/end at index 0 are supported. (:pr:`1507`) |
| - The :class:`~cocotb.monitors.xgmii.XGMII` monitor no longer crashes on Python 3, and now assembles packets as :class:`bytes` instead of :class:`str`. The :class:`~cocotb.drivers.xgmii.XGMII` driver has expected :class:`bytes` since cocotb 1.2.0. (:pr:`1545`) |
| - ``signal <= value_of_wrong_type`` no longer breaks the scheduler, and throws an error immediately. (:pr:`1661`) |
| - Scheduling behavior is now consistent before and after the first :keyword:`await` of a :class:`~cocotb.triggers.GPITrigger`. (:pr:`1705`) |
| - Iterating over ``for generate`` statements using VHPI has been fixed. This bug caused some simulators to crash, and was a regression in version 1.3. (:pr:`1882`) |
| - The :class:`~cocotb.drivers.xgmii.XGMII` driver no longer emits a corrupted word on the first transfer. (:pr:`1905`) |
|
|
|
|
| Improved Documentation |
| ---------------------- |
|
|
| - If a makefile uses cocotb's :file:`Makefile.sim`, ``make help`` now lists the supported targets and variables. (:pr:`1318`) |
| - A new section :ref:`rotating-logger` has been added. (:pr:`1400`) |
| - The documentation at http://docs.cocotb.org/ has been restructured, |
| making it easier to find relevant information. (:pr:`1482`) |
|
|
|
|
| Deprecations and Removals |
| ------------------------- |
|
|
| - :func:`cocotb.utils.reject_remaining_kwargs` is deprecated, as it is no longer |
| needed now that we only support Python 3.5 and newer. (:pr:`1339`) |
| - The value of :class:`cocotb.handle.StringObject`\ s is now of type :class:`bytes`, instead of :class:`str` with an implied ASCII encoding scheme. (:pr:`1381`) |
| - ``ReturnValue`` is now deprecated. Use a :keyword:`return` statement instead; this works in all supported versions of Python. (:pr:`1489`) |
| - The makefile variable :make:var:`VERILATOR_TRACE` |
| that was not supported for all simulators has been deprecated. |
| Using it prints a deprecation warning and points to the documentation section |
| :ref:`simulator-support` explaining how to get the same effect by other means. (:pr:`1495`) |
| - ``cocotb.binary.BinaryValue.get_hex_buff`` produced nonsense and has been removed. (:pr:`1511`) |
| - Passing :class:`str` instances to :func:`cocotb.utils.hexdump` and :func:`cocotb.utils.hexdiffs` is deprecated. :class:`bytes` objects should be passed instead. (:pr:`1519`) |
| - ``Makefile.pylib``, which provided helpers for building C extension modules for Python, has been removed. |
| Users of the ``PYTHON_LIBDIR`` and ``PYTHON_INCLUDEDIR`` variables will now have to compute these values themselves. |
| See the ``endian_swapper`` example for how to do this. (:pr:`1632`) |
| - Makefile and documentation for the NVC simulator which has never worked have been removed. (:pr:`1693`) |
| |
| |
| Changes |
| ------- |
|
|
| - Cocotb no longer supports Python 2, at least Python 3.5 is now required. |
| Users of Python 2.7 can still use cocotb 1.3, but are heavily encouraged to update. |
| It is recommended to use the latest release of Python 3 for improved performance over older Python 3 versions. (:pr:`767`) |
| - Mentor Questa, Aldec Riviera-PRO and GHDL are now started in the directory containing the Makefile and also save :file:`results.xml` there, bringing them in line with the behavior used by other simulators. (:pr:`1598`) (:pr:`1599`) (:pr:`1063`) |
| - Tests are now evaluated in order of their appearance in the :envvar:`MODULE` environment variable, their stage, and the order of invocation of the :class:`cocotb.test` decorator within a module. (:pr:`1380`) |
| - All libraries are compiled during installation to the ``cocotb/libs`` directory. |
| The interface libraries ``libcocotbvpi`` and ``libcocotbvhpi`` have been renamed to have a ``_simulator_name`` postfix. |
| The ``simulator`` module has moved to :mod:`cocotb.simulator`. |
| The ``LD_LIBRARY_PATH`` environment variable no longer needs to be set by the makefiles, as the libraries now discover each other via ``RPATH`` settings. (:pr:`1425`) |
| - Cocotb must now be :ref:`installed <installation-via-pip>` before it can be used. (:pr:`1445`) |
| - :attr:`cocotb.handle.NonHierarchyIndexableObject.value` is now a list in left-to-right range order of the underlying simulation object. |
| Previously the list was always ordered low-to-high. (:pr:`1507`) |
| - Various binary representations have changed type from :class:`str` to :class:`bytes`. These include: |
|
|
| * ``cocotb.binary.BinaryValue.buff``, which as a consequence means ``cocotb.binary.BinaryValue.assign``, no longer accepts malformed ``10xz``-style :class:`str`\ s (which were treated as binary). |
| * The objects produced by :mod:`cocotb.generators.byte`, which means that single bytes are represented by :class:`int` instead of 1-character :class:`str`\ s. |
| * The packets produced by the :class:`~cocotb.drivers.avalon.AvalonSTPkts`. |
|
|
| Code working with these objects may find it needs to switch from creating :class:`str` objects like ``"this"`` to :class:`bytes` objects like ``b"this"``. |
| This change is a consequence of the move to Python 3. (:pr:`1514`) |
| - There's no longer any need to set the ``PYTHON_BIN`` makefile variable, the Python executable automatically matches the one cocotb was installed into. (:pr:`1574`) |
| - The :make:var:`SIM` setting for Aldec Riviera-PRO has changed from ``aldec`` to ``riviera``. (:pr:`1691`) |
| - Certain methods on the :mod:`cocotb.simulator` Python module now throw a :exc:`RuntimeError` when no simulator is present, making it safe to use :mod:`cocotb` without a simulator present. (:pr:`1843`) |
| - Invalid values of the environment variable :envvar:`COCOTB_LOG_LEVEL` are no longer ignored. |
| They now raise an exception with instructions how to fix the problem. (:pr:`1898`) |
|
|
|
|
| cocotb 1.3.2 |
| ============ |
|
|
| Released on 08 July 2020 |
|
|
| Notable changes and bug fixes |
| ----------------------------- |
|
|
| - Iterating over ``for generate`` statements using VHPI has been fixed. |
| This bug caused some simulators to crash, and was a regression in version 1.3.1. (:pr:`1882`) |
|
|
| cocotb 1.3.1 |
| ============ |
|
|
| Released on 15 March 2020 |
|
|
| Notable changes and bug fixes |
| ----------------------------- |
| - The Makefiles for the Aldec Riviera and Cadence Incisive simulators have been fixed to use the correct name of the VHPI library (``libcocotbvhpi``). |
| This bug prevented VHDL designs from being simulated, and was a regression in 1.3.0. (:pr:`1472`) |
|
|
| cocotb 1.3.0 |
| ============ |
|
|
| Released on 08 January 2020 |
|
|
| This will likely be the last release to support Python 2.7. |
|
|
| New features |
| ------------ |
|
|
| - Initial support for the :ref:`sim-verilator` simulator (version 4.020 and above). |
| The integration of Verilator into cocotb is not yet as fast or as powerful as it is for other simulators. |
| Please use the latest version of Verilator, and `report bugs <https://github.com/cocotb/cocotb/issues/new>`_ if you experience problems. |
| - New makefile variables :make:var:`COCOTB_HDL_TIMEUNIT` and :make:var:`COCOTB_HDL_TIMEPRECISION` for setting the default time unit and precision that should be assumed for simulation when not specified by modules in the design. (:pr:`1113`) |
| - New ``timeout_time`` and ``timeout_unit`` arguments to :func:`cocotb.test`, for adding test timeouts. (:pr:`1119`) |
| - :func:`cocotb.triggers.with_timeout`, for a shorthand for waiting for a trigger with a timeout. (:pr:`1119`) |
| - The ``expect_error`` argument to :func:`cocotb.test` now accepts a specific exception type. (:pr:`1116`) |
| - New environment variable :envvar:`COCOTB_RESULTS_FILE`, to allow configuration of the xUnit XML output filename. (:pr:`1053`) |
| - A new ``bus_separator`` argument to :class:`cocotb.drivers.BusDriver`. (:pr:`1160`) |
| - A new ``start_high`` argument to :meth:`cocotb.clock.Clock.start`. (:pr:`1036`) |
| - A new :data:`cocotb.__version__` constant, which contains the version number of the running cocotb. (:pr:`1196`) |
|
|
| Notable changes and bug fixes |
| ----------------------------- |
|
|
| - ``DeprecationWarning``\ s are now shown in the output by default. |
| - Tracebacks are now preserved correctly for exceptions in Python 2. |
| The tracebacks in all Python versions are now a little shorter. |
| - :func:`cocotb.external` and :func:`cocotb.function` now work more reliably and with fewer race conditions. |
| - A failing ``assert`` will be considered a test failure. Previously, it was considered a test *error*. |
| - :meth:`~cocotb.handle.NonConstantObject.drivers` and :meth:`~cocotb.handle.NonConstantObject.loads` now also work correctly in Python 3.7 onwards. |
| - :class:`cocotb.triggers.Timer` can now be used with :class:`decimal.Decimal` instances, allowing constructs like ``Timer(Decimal('1e-9'), units='sec')`` as an alternate spelling for ``Timer(100, units='us')``. (:pr:`1114`) |
| - Many (editorial) documentation improvements. |
| |
| Deprecations |
| ------------ |
|
|
| - ``cocotb.result.raise_error`` and ``cocotb.result.create_error`` are deprecated in favor of using Python exceptions directly. |
| ``TestError`` can still be used if the same exception type is desired. (:pr:`1109`) |
| - The ``AvalonSTPktsWithChannel`` type is deprecated. |
| Use the ``report_channel`` argument to :class:`~cocotb.monitors.avalon.AvalonSTPkts` instead. |
| - The ``colour`` attribute of log objects like ``cocotb.log`` or ``some_coro.log`` is deprecated. |
| Use :func:`cocotb.utils.want_color_output` instead. (:pr:`1231`) |
|
|
| Other news |
| ---------- |
|
|
| - cocotb is now packaged for Fedora Linux and available as `python-cocotb <https://src.fedoraproject.org/rpms/python-cocotb>`_. (`Fedora bug #1747574 <https://bugzilla.redhat.com/show_bug.cgi?id=1747574>`_) (thanks Ben Rosser) |
|
|
| cocotb 1.2.0 |
| ============ |
|
|
| Released on 24 July 2019 |
|
|
| New features |
| ------------ |
|
|
| - cocotb is now built as Python package and installable through pip. (:pr:`517`, :pr:`799`, :pr:`800`, :pr:`803`, :pr:`805`) |
| - Support for ``async`` functions and generators was added (Python 3 only). Please have a look at :ref:`async_functions` for an example how to use this new feature. |
| - VHDL block statements can be traversed. (:pr:`850`) |
| - Support for Python 3.7 was added. |
|
|
| Notable changes and bug fixes |
| ----------------------------- |
|
|
| - The heart of cocotb, its scheduler, is now even more robust. Many small bugs, inconsistencies and unreliable behavior have been ironed out. |
| - Exceptions are now correctly propagated between coroutines, giving users the "natural" behavior they'd expect with exceptions. (:pr:`633`) |
| - The ``setimmediatevalue()`` function now works for values larger than 32 bit. (:pr:`768`) |
| - The documentation was cleaned up, improved and extended in various places, making it more consistent and complete. |
| - Tab completion in newer versions of IPython is fixed. (:pr:`825`) |
| - Python 2.6 is officially not supported any more. cocotb supports Python 2.7 and Python 3.5+. |
| - The cocotb GitHub project moved from ``potentialventures/cocotb`` to ``cocotb/cocotb``. |
| Redirects for old URLs are in place. |
|
|
| Deprecations |
| ------------ |
|
|
| - The `bits` argument to ``cocotb.binary.BinaryValue``, which is now called `n_bits`. |
| - The `logger` attribute of log objects like ``cocotb.log`` or ``some_coro.log``, which is now just an alias for ``self``. |
| - The ``cocotb.utils.get_python_integer_types`` function, which was intended to be private. |
|
|
| Known issues |
| ------------ |
|
|
| - Depending on your simulation, cocotb 1.2 might be roughly 20 percent slower than cocotb 1.1. |
| Much of the work in this release cycle went into fixing correctness bugs in the scheduler, sometimes at the cost of performance. |
| We are continuing to investigate this in issue :issue:`961`. |
| Independent of the cocotb version, we recommend using the latest Python 3 version, which is shown to be significantly faster than previous Python 3 versions, and slightly faster than Python 2.7. |
|
|
| Please have a look at the `issue tracker <https://github.com/cocotb/cocotb/issues>`_ for more outstanding issues and contribution opportunities. |
|
|
| cocotb 1.1 |
| ========== |
|
|
| Released on 24 January 2019. |
|
|
| This release is the result of four years of work with too many bug fixes, improvements and refactorings to name them all. |
|
|
| cocotb 1.0 |
| ========== |
|
|
| Released on 15 February 2015. |
|
|
| New features |
| ------------ |
|
|
| - FLI support for ModelSim |
| - Mixed Language, Verilog and VHDL |
| - Windows |
| - 300% performance improvement with VHPI interface |
| - WaveDrom support for wave diagrams. |
|
|
|
|
| cocotb 0.4 |
| ========== |
|
|
| Released on 25 February 2014. |
|
|
|
|
| New features |
| ------------ |
|
|
| - Issue :issue:`101`: Implement Lock primitive to support mutex |
| - Issue :issue:`105`: Compatibility with Aldec Riviera-Pro |
| - Issue :issue:`109`: Combine multiple :file:`results.xml` into a single results file |
| - Issue :issue:`111`: XGMII drivers and monitors added |
| - Issue :issue:`113`: Add operators to ``BinaryValue`` class |
| - Issue :issue:`116`: Native VHDL support by implementing VHPI layer |
| - Issue :issue:`117`: Added AXI4-Lite Master BFM |
|
|
| Bugs fixed |
| ---------- |
|
|
| - Issue :issue:`100`: Functional bug in endian_swapper example RTL |
| - Issue :issue:`102`: Only 1 coroutine wakes up of multiple coroutines wait() on an Event |
| - Issue :issue:`114`: Fix build issues with Cadence IUS simulator |
|
|
| New examples |
| ------------ |
|
|
| - Issue :issue:`106`: TUN/TAP example using ping |
|
|
|
|
| cocotb 0.3 |
| ========== |
|
|
| Released on 27 September 2013. |
|
|
| This contains a raft of fixes and feature enhancements. |
|
|
|
|
| cocotb 0.2 |
| ========== |
|
|
| Released on 19 July 2013. |
|
|
| New features |
| ------------ |
|
|
| - Release 0.2 supports more simulators and increases robustness over 0.1. |
| - A centralized installation is now supported (see documentation) with supporting libraries build when the simulation is run for the first time. |
|
|
|
|
| cocotb 0.1 |
| ========== |
|
|
| Released on 9 July 2013. |
|
|
| - The first release of cocotb. |
| - Allows installation and running against Icarus, VCS, Aldec simulators. |
|
|