A simple 32-bit RISC-V CPU core that supports
- the RV32I Base Integer Instruction Set
- the "Zicntr" extension
- the "Zmmul" extension, via an accelerator running in a faster clock domain
- some of the "Zicsr" extension, including
cycle,timeandinstret - some of the privileged instruction set, like timer interrupts and exceptions
The design is written in SystemVerilog. Design verification is done using UVM-SystemC, with Verilator as the simulator, CRAVE as the constrained randomization environment, and FC4SC as the functional coverage collector.
Applications have been successfully run on a softcore CPU in an FPGA and in a verilator simulation with an emulated UART interface. They include
- CoreMark
- a simple FreeRTOS program
doc/: documentation, including the technical specification and design verification documentdv/cpu/: design verification in C++ with UVM-SystemCsc_main.cpp: 'top level' testbenchcpu_util.*: common utility- other: UVM-SystemC classes
- DV Doc
- Simulation details
mul/: simple SystemVerilog testbench
rtl/: design in SystemVerilogcpu.sv: CPU designcpu.svh: definitionsconfig.svh: configurationsmul.sv: multiplier with safe clock domain crossingdual_port_ram.sv: mock memory for simulationuart*.sv: UART modules with configurable baud rate, data bit size, stop bit, parity bit, and buffer sizemock_uart_rx.sv: mock UART receiver for recording app output during simulationaddress_decoder.sv: decodes address to RAM or IOtop.sv: top level modulesim_top.sv: simulation top for running applications in simulation
src/: applicationshelloworld/: simple app that prints using UARTcoremark/: CoreMarkshell/: simple interactive shellfreertos/: simple FreeRTOS programutil.h,util.c: utilities for UART control and CSR readingcreate_mif: script to create memory initialization files.miffromhexdumpoutput- Details
de1-soc/: port to the DE1-SoC FPGA- Quartus project file
- RAM and PLL generated by Quartus II
- custom configuration and top-level module
- memory initialization files
- Details
sim/: simulation toolsuart_terminal.cpp: used withsim_topto emulate a UART interface to interact with a simulated system- Details