Dependencies

September 13, 2019 ยท View on GitHub

An example of defining and verifying a register file generator in Python using magma.

The notebooks are intended to be read in the following order:

This example has also been implemented as a set of Python files, which may be useful for those interested in seeing how this could be implemented outside of the notebook environment. NOTE that the .py implementation is slightly different than the .ipynb implementation because they were not developed at the same time.

The files are organized as follows:

  • apb.py - Defines a set of type constructors for the APB interface.
  • apb_model.py - Implements a cycle-accurate functional model of an APB master used to generate input stimuli for the register file tests.
  • reg_file.py - Defines a magma register file generator
  • top.py - Provides an example of a top generator that uses the register file generator

Each file has a corresponding test_<file>.py that contains tests for the units defined in the file.

waveform.py defines a helper class for drawing waveforms using the wavedrom format.

Dependencies

pip install magma-lang mantle fault coreir jupyterlab