A simple single cycle RISC-V implementation in SystemVerilog.
The project is a single-cycle processor implementing RV32I[M][A] instruction set and it also has partial support to RISC-V's machine mode. The project also has a dual core mode (RV32A is necessary). Check rtl/arvi_defines.vh to see all different parameters ARVI can receive.
Besides the processor, the project contains a Performance Profiler to profile each executed program in simulation and retrieve information like how many instructions were issued, cache hits, and misses.
- Single Cycle RV32I[M][A] RISC-V.
- Instruction cache.
- Machine mode privilege level support.
- Performance Profiler.
- FPGA Synthesis Script.
- Build pipeline.
- Implement a bus like Wishbone or AXI to communicate with other devices. At the moment only a simple bus is used.
- verilator
- riscv-fesvr
- Pyhton3
- Vivado - Used in synthesis
$make all
Compile necessary files to create an executable Verilator program.
$make regression-tests
Run all tests in tb/tests.
$make benchmark
Run all benchmarks in tb/tests. All benchmarks are from riscv-tests repository and they are already compiled with minor modifications in their source codes.
$make performance
Retrieve all information in all ".performance_report" files in the project and put them into a file named dataframe.csv. You can use this file to check performance parameters of an executed program.
When compiled using verilator, a executable program is generated. Below are shown the different arguments the program can receive. You can use it as a simple simulator.
Generates a VCD file. No vcd file is generated by default.
Generates a performance report of the executed program. The reports contains information about the number of cycles to run the entire program, and instructions executed per hart. No report is generated by default.
Max number of cycles that the processor will run.
Elf file to be loaded. This parameter must be passed.
Specifies a path to the performance report. This flag must be used with the -r flag.
The simulator will not print any message.