Skip to content

An example of designing and verifying a register file generator in magma

Notifications You must be signed in to change notification settings

leonardt/magma_register_file_tutorial

Repository files navigation

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

About

An example of designing and verifying a register file generator in magma

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published