Posted on Leave a comment

Co-Simulation models ‘2.0’

The classical simulation method we used so far via GHDL using VHDL as transfer language had several drawbacks:

  • Slow
  • The libgrt.a is subject to GPL, meaning, VHDL code had to be published to comply to OpenSource licenses

The latter is often not an option. Thus, network workarounds were required with tunneling hardware protocols through netpp into a hardware model by co-simulation.

The newer MLIR and CXXRTL approaches lift that problem: They produce executables that can be shipped without source disclosure, as long as they don’t link against GPL code.

The result of this, after some years of settle time:

  • We will gradually release legacy core IP models as co-simulation setups that you can stick into your CI
  • Some models will also allow to output VHDL or Verilog sources in a readable form or as a net list, depending on the IP core terms.
  • All models will install using Python pip and be driven from a Python main loop allowing to verify software routines against the virtualized hardware

How to

In order to not have to install any software that you don’t trust, the entire cyrite ecosystem is supplied as a Docker container with Jupyter Notebook extensions. This allows to combine documentation with Python code.

The button below will launch a cyrite Binder with a default JupterLab configuration. This does not yet contain the IP modules. To run a specific IP core release, you need to download the associated Jupyter notebook first by a given link or from the gist collection below (Download ZIP file). Then simply drag it onto the file pane in the Jupyterlab IDE and open it by double clicking. Alternatively, you can use git from the command line to pull the file via the ‘Clone via HTTPS’ option (Drop down below the Embed choice).

Typically, such a notebook will perform a pip install procedure and install all necessary dependencies. This may modify the running container, so you need to be aware when running installations on a persistent, local container setup as it may alter its behaviour.

Launch button for cyhdl demos

Once the installation is finished, run the notebook cells step by step. The binder setup will let you modify the code and try things interactively, but note that timeouts will terminate your session without warning upon activity, and your changes will be lost. For proper evaluation of the Docker container you will either need to install the docker environment on your Linux development machine or use a virtual machine setup for Docker on Windows.

Gist collection

Leave a Reply

Your email address will not be published.

This site uses Akismet to reduce spam. Learn how your comment data is processed.