The repository contains the source code for a 5-stage pipelined processor designed to run the RISC-V 32-bit base intruction set (RV32I).
The processor is interfaced with UART to communicate with a computer so that the content of the registers, data memory or instruction memory can be observed, and modified.
The source code is found in the src folder.
-
src/pipelined_processor- Verilog files for the processor -
src/uart- Verilog files for UART communication -
src/top_pipelined_processor_quartus.v- Top level entity for the Quartus project
To do simulation as described below, Icarus Verilog and GTKWave are required.
Once installed, follow these steps to run simulation. Otherwise, you are free to use any simulation tool you prefer.
Note that you should start executing commands from the repository root.
-
cd src/pipelined_processor/src -
iverilog -g2012 -o ../sim/pipelined_processor_tb ../sim/pipelined_processor_tb.sv control.v control_main_decoder.v control_alu_decoder.v pc.v adder.sv imem.v register_file.v extend.v alu.v data_memory.v -
cd ../sim -
vvp processor_tb -
gtkwave processor_tb.vcd
- Clone the repository with
--recursiveflag, so that all submodules are also cloned.
git clone --recursive https://github.com/RISC-Processor/Pipelined-Processor.git- Add
binfolder of your Quartus installation to thePATH(System Variables). For example:
set PATH=C:\intelFPGA\<VERSION>\quartus\bin;%PATH%In Windows, use
Git Bash, since Command Prompt/ PowerShell does not support the above command. Or do it manually.
- In repo root, execute the following line to build the Quartus project.
./Hog/Do CREATE pipelined_processor_quartusIn Windows, use
Git Bash, since Command Prompt/ PowerShell does not support the above command.
- Navigate to
Projects/pipelined_processor_quartusfolder and openpipelined_processor_quartus.qpf.