This project implements a RISC-V processor based on the RV32I instruction set architecture (ISA). It includes essential components such as instruction decoding, execution, memory access, and write-back stages. The goal is to create a functional and extensible RISC-V core capable of executing fundamental operations while allowing future enhancements.
- Architecture: RISC-V 32-bit (RV32I)
- Instruction Set: Base Integer Instruction Set (I-type, R-type, S-type, B-type, U-type, J-type)
- Pipeline: Single-Cycle
- Registers: 32 General-Purpose Registers
/project-root
│── Decode/ # Decode stage
│ ├── Decode.v # Top-level decode module
│ ├── Decode_tb.v # Testbench file
│ ├── Decode.vvp # Compiled Simulation file
│ ├── Decode.vcd # Waveform output file
│ ├── submodules/ # Supporting modules for Decode (similar structure)
│── Execute/ # Execute stage
│── Memory/ # Memory access stage
│── WriteBack/ # Write-back stage
│── Pipelined.v # Top-level integration module
│── Pipelined_tb.v
│── Pipelined.vcd
│── Pipelined.vvp
│── data.hex # Data Memory Hex files
│── instructions.hex # Instruction Memory Hex files
Before running the simulation, install Icarus Verilog (iverilog):
git clone https://github.com/TanmayBansode/riscv
cd riscvcd Decode| File Type | Naming Convention |
|---|---|
| Design File | Module.v |
| Testbench | Module_tb.v |
| Compiled Simulation | Module.vvp |
| Waveform Output | Module.vcd |
If you have veri installed, you can compile and run the simulation with a single command:
veri Decode.viverilog -o Decode.vvp Decode.v Decode_tb.vvvp Decode.vvpgtkwave Decode.vcd- Languages: Verilog
- Tools & Simulators:
- Compilation: Icarus Verilog (
iverilog) - Simulation: GTKWave
- Compilation: Icarus Verilog (
- Implementing Hazard Detection & Forwarding to handle data and control hazards efficiently.
- Building a Tool for Converting Assembly to Binary for easy instruction encoding.
- Optimizing the Testing Process using UVM + SystemVerilog to improve verification coverage.
- Adding Hierarchical Cache Levels (Data & Instruction Caches) to enhance memory performance.
- 📖 RISC-V Official ISA Manual
- 📕 Patterson & Hennessy’s Computer Organization & Design (RISC-V Edition)