[cocotb] Cocotb 1.2 is released!

Philipp Wagner mail at philipp-wagner.com
Fri Jul 26 11:31:32 CEST 2019

Hi cocotb users,

Exactly seven months after the previous release cocotb 1.2 is out.
Thanks to the amazing work by our contributors we have three headline
features to announce in this release:

- Cocotb is now installable as Python package through pip
- Async functions and generators are now supported. See the
  documentation [1] for more details (Python 3 only).
- The scheduler is more robust than ever, with many edge cases fixed.

Find the full release notes including known issues at

But that's just the tip of the ice berg. A lot of work went into issues
from small to large, as the statistics show.

- 170 files changed, 6778 insertions(+), 2277 deletions(-)
- 20 people code contributed to this release
- We had many great discussions in GitHub issues and pull requests.

Thanks to everybody involved making this a great release!

Installing cocotb

>From now on, the recommended way of using this version of cocotb is
through its Python package. Install or update it with pip:

# For a user-local installation
$ pip install -U --user cocotb

# For a global installation
$ sudo pip install -U cocotb

If you want to use cocotb with Python 3 (highly recommended!), use
"pip3" instead of "pip", and set PYTHON_BIN=python3 in your Makefile or
as environment variable.

Note that Python 2.7 is only maintained until January 1st, 2020. Even
though we have not yet finalized a plan on deprecating Python 2 support
in cocotb, we encourage everybody to give Python 3 a try with their test
benches. We recommend the latest Python version (3.7 as of this writing)
to benefit from recent speed improvements.

Note on the repository

The cocotb Git repository has been moved from
https://github.com/potentialventures/cocotb to
https://github.com/cocotb/cocotb. GitHub maintains redirects.

Help out

Cocotb is a shared effort, and we're proud that so many people have
already joined it. It's not only coding: improving the documentation,
helping out with issues, answering questions on the mailing list or on
Gitter: all help is welcome!

Chat on Gitter: https://gitter.im/cocotb/Lobby
Join the mailing list: https://lists.librecores.org/listinfo/cocotb
GitHub Issues and Pull Requests: https://github.com/cocotb/cocotb



Ben Rosser (1):
      Update cocotb docs to indicate that Python 2.6 is no longer supported

Colin Marquardt (18):
      Typofix "varible"
      Fix up links, making the https when possible. Further doc work.
      Comment out unused html_static_path definition.
      Add sphinxcontrib-trio to required packages.
      More doc improvements.
      Add classifiers.
      Remove IUS option -sv which is detrimental to AMS (#783)
      Add support for Verilog strings
      Remove obsolete tab completion method for IPython.
      Add support for Cadence Xcelium, based on the existing IUS
support. (#688)
      Add missing envvar COCOTB_SIM=1.
      Print path for missing object.
      Add support for vpiInterconnectNet, new file vpi_user_ext.h.
      More doc improvements
      Use breathe for converting XML to ReST. (#776)
      Use COMPILE_ARGS and SIM_ARGS for xrun call. Fixes #1000.
      Use vpiNoDelay flag for vpiStringVar assignments.
      Fix spelling of Cocotb in page heading

Curtis McEnroe (1):
      Use PYTHON_BIN in Darwin Makefile (#905)

David Lamb (3):
      Fixed compile error in VhpiCbHdl.cpp (missing parentheses)
      Fixed compile error in VhpiCbHdl.cpp (missing parentheses)
      Fixed compile error in VhpiCbHdl.cpp (missing parentheses)

Eric Wieser (75):
      Removed unused state from CoroutineComplete
      Remove ExternalException, which seems like a half-baked attempt to
handle exceptions
      Remove double-catch of TestFailure - the top level coroutine
should log it
      Don't misuse .send to advance the scheduler, especially since
`throw` does not anyway
      Propagate exceptions from nested coroutines
      Fix broken tests that tried and failed to catch exceptions in the
past, and were marked `expect_error` as a workaround
      Fixes gh-624, and adds tests for exceptions in @function and @external
      Use context managers to handle profiling
      Make `<=` raise an exception if confused with comparison
      Ignore files created by mergetools
      Fix gh-768
      Make things decorated with `cocotb.test` actually instances of
      Avoid recursing in the scheduler
      Mostly fix gh-637
      Reject extra kwargs in BusDriver.__init__
      Add support for async/await
      Add missing dut argument to test
      Remove an incorrect optimization in __await__
      Fix scheduler issues caused by compound triggers.
      Add a test for gh-843
      Document how simultaneous triggers cannot exist
      Remove special casing of readonly, which will be handled like any
other cleanup
      Remove cloned ReadWrite trigger and the scheduler and Gpi
workarounds needed to support it.
      Remove scheduler._timer0
      Replace Python3-only syntax in test with syntax that works in python 2
      Fix typo in hooks that made them unusable
      Always respond to triggers through react, so that the event loop
is always involved
      Make the scheduler deterministic on old versions of python
      Remove scheduler._pending_callbacks
      Prevent a hang when a @function is used in a background thread
      Use a with statement to ensure the threading.Condition is always
      Fix crash due to invoking a function storing state in the function
      Correct typo in travis.yml that disabled CI (#959)
      Avoid doing attribute lookup three times when we can do it once
      Delete local references to triggers and coroutines in the event loop
      Don't compute the list of integer types every time
      Avoid calling logging.getLogger unless something is actually being
logged (#967)
      Move non-inline functions out of headers
      Move non-inline functions out of headers
      Cache NextTimeStep() and ReadWrite() for performance
      Extract a helper function from scheduler.schedule, to make
profiling easier
      Avoided repeated isinstance checks to improve performance.
      Add documentation for the COVERAGE env var
      Use sphinx's envvar:: to document environment variables
      Simplify the logging wrappers
      Throw exceptions instead of terminating the simulation
      Improve error messages for yielding and forking invalid types
      Remove the Trigger base class from Event and Lock
      Support `exc_info` in SimBaseLog
      Avoid calling `cocotb.coroutine` repeatedly in First and Combine.
      Create a `test` local variable to greatly shorten
      Ensure exceptions caught in C code are printed
      Avoiding doing two dictionary lookups when one will do
      Avoid using collections.OrderedDict() if the builtin dict is good
      Enforce that no new flake8 violations are added
      Fix invalid escape sequences by using raw strings
      Fix bad indent
      Fix flake8 undefined name errors
      Fix flake8 warning about using `is` for integers
      Fix flake8 warning about weird order of `is not` and `not in`
      Fix flake8 warning about blank lines at the end of files
      Fix flake8 warning about multiple statements on one line
      Fix flake8 warnings about missing spaces before comments
      Fix flake8 warning about multiple imports on one line
      Fix flake8 warning about bare except
      Fix incorrect magic methods on BinaryValue, as found by LGTM.com
      Fix bit_toggler on python 3.7
      Replace a repeated key lookups with single ones
      Fix division on python 3
      Remove useless variables found by LGTM.com
      Remove unused imports found by LGTM.com and flake8
      Prevent crash in XGMII on python 3
      Use slots in triggers for speed and memory savings
      Add documentation for Trigger members, and mark the prime method
as abstract (#1019)
      Fix crash when attempting to access Trigger.log

Fabio Garzetti (2):
      Add VHDL_SOURCES_lib (GHDL only)
      Honor RTL_LIBRARY choice in ghdl run stage

Finn Grimwood (1):
      Make VpiImpl::get_root_handle() return a GPI_MODULE always (#974)

JarrettR (3):
      Improved WaveDrom header/footer handling, added config handler
      Made backwards compatible with simplified input
      Updated example with advanced wavedrom options

Kaleb Barrett (4):
      Added test for issue #893
      Potentially fixes #893
      Added test for issue #892
      Fixes #892

      Issue #822: Fix errors in the test for signals that are only
defined in verilog and not vhdl
      Fix test_integers
      Fix test issue_768

Marlon James (9):
      Added info to NullTrigger from Event.wait()
      Add argv information for VHPI
      Fix __check_vhpi_error to log to correct level
      Change gpi_log() formatting to match Python
      Change makefiles to use realpath function.
      Add VHDL Block statement support
      Cleanup typos and copy/paste errors.
      Rename context for improved clarity.
      Fix ratio for very short tests.

Martoni (1):
      Docs: COMPILE_ARGS and SIM_ARGS apply to all simulators

Matt Abdul-Rahim (2):
      Formatting fixes extracted from PR#1020.
      Let the logging module perform string interpolation.

PaweĊ‚ Wiecha (1):
      Make seed available through cocotb.RANDOM_SEED

Philipp Wagner (23):
      Revert "Add osx and linux 3.7 (travis)"
      Docs: Use RTD theme in local builds
      Docs: Fix inline link
      Docs: Switch to Python 3 syntax highlighting
      VCS now reports the same signals as the other big3 (#908)
      Whitelist make command in tox
      Add README.md to MANIFEST.in
      Documentation: Install GitHub issues extension
      Rebuild doc venv if requirements.txt changes
      Add release notes for cocotb 1.2 and older
      Documentation: remove trailing whitespace
      Revert "Move non-inline functions out of headers"
      Remove StringIO import from scheduler
      Point Travis badge to new URL
      Remove coverity badge
      Update release notes for 1.2
      Update PyPi upload configuration in travis
      Update repository URL in documentation
      Update repository URL in README
      Remove old communication methods from README
      Update version number to 1.2.0rc1
      Update version number to 1.2.0

Tomasz Hemperek (22):
      Make USER_DIR independent of SIM_ROOT
      Don't require SPHINX_BUILD to import packages
      Set PYTHONPATH for cocotb package centrally
      Move all installed files into the cocotb directory
      Add cocotb-config script to give install paths
      Add Python packaging to cocotb
      Convert examples to use cocotb-config
      Remove old way of installing cocotb from Makefile
      Test packaged cocotb builds with tox
      Warn if old-style cocotb usage is detected
      Add osx and linux 3.7 (travis)
      Fix python 3.7 (remove StopIteration)
      Add osx and more python version to travis
      Update README.md with install instruction (#876)
      Run VHDL tests in travis with GHDL
      Add windows build to travis (conda based)
      Update documation with package installation instructions (#881)
      Add automatic deploy to pypi on new tag
      Remove legacy SPHINX_BUILD
      Fix random ZeroDivisionError (#998)
      Find PYLIBS more reliably
      Deploy to PyPI only once on tag

Yahia Tachwali (1):
      Fix Python 3 compile error in io.c (#895)

biggsbenjamin (1):
      Update avalon.py

hash (1):
      fix: new_iter should always be initialized. GCC-8.2 is unforgiving
on this.

killruana (1):
      Fix import cocotb.regression

[1] https://cocotb.readthedocs.io/en/latest/coroutines.html#async-functions

More information about the cocotb mailing list