A chisel based riscv 5-stage pipelined cpu design, implementing 32-bit version of the ISA (incomplete).
verilator >= v5.002: Simulationriscv-gnu-toolchain: To build the C program
git clone --recurse-submodules https://github.com/merledu/nucleusrv.gitpython3 gen_verilog.py <imem> <dmem>python3 simulate.py --sbt_args "--imem <imem>" nucleusrv.components.NRVDriver Top- Make sure to have the RISC-V GNU Toolchain and Verilator in your
PATH. - Create a python virtual environment and follow the
README.mdinriscof/riscv-arch-test/. - Run
run_riscv_arch_tests.pyin root directory.
python3 run_riscv_arch_tests.py-
In
tools/testsdirectory, create a folder and write c program in themain.cfile -
Run
make PROGRAM=<your_newly_created_test_folder_name> inside tools directory -
Build the program with
sbtcommand listed above. Make sure you are in root directory -
Optionally, you can skip writing/building c program and directly write hex instructions to
program.hexfile intools/outdirectory.