This repository demonstrates a library for evaluating RISC-V Projects from the paper "Everyone's a Critic: A Tool for Evaluating RISC-V Projects".
This repository is a python package for the PYNQ 2.1+ distribution on the PYNQ-Z1 board. You can install this package by running the following command:
sudo -H pip3.6 install https://github.com/drichmond/RISC-V-On-PYNQ/
This will install:
riscvonpynq Python package.
A RISC-V-Tutorial folder with notebooks describing how to add new processor overlays
A RISC-V-Demo folder with notebooks demonstrating how to interact with existing processor overlays
riscvonpynq package contains:
An Overlay Driver (a subclass of
pynq.Overlay). It extends the
Overlay functionality by adding the location of an Overlay class to
the bitstream search path.
Jupyter Notebook Magics. This allows Jupyter Notebook Cells to
compile C/C++ and Assembly programs for for RISC-V Processor
Overlays. Users write
main and can pass arguments as Numpy types.
A RISC-V Program Class. This class allows programs to be manipulated and compiled from Python using pre-existing build files for a processor.
Processor drivers (a subclass of
drivers allow users to upload binaries, run programs, and read
RISC-V Processor Memory.
There are two RISC-V Processor Drivers: One driver for RISC-V Processors with BRAM-only Memory, and one driver for RISC-V Processors with BRAM and DDR Mixed Memory.
More examples and demonstrations are available in the notebooks installed by this package.
The RISC-V Tutorial Notebooks are a set of notebooks describing how to set up the RISC-V Toolchain, and then build RISC-V processor overlays. There are five notebooks:
Completing these notebooks require:
The RISC-V Demonstration notebooks show examples of existing processor overlays. We provide two example overlays using processors from one RISC-V Processor Projects.
Each notebook demonstrates how to upload programs using the Jupyter Notebook Magics we have provided. Each processor has a set of build files (a makefile, init.S file for initialization, and a .ld linker script) and we briefly describe these in each notebook.
We have internally tested other processors and will be adding them as we clean up the code.
We welcome pull requests!