Skip to content

RV32I Core - Microarchitecture Evaluation for RV32I base ISA

Notifications You must be signed in to change notification settings

SachiniW/RISC-V_Processor

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

67 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

RV32I Core - Microarchitecture Evaluation for RV32I base ISA

This project aims to evaluate 4 basic microarchitectures for RV32I base ISA.

  1. Single-cycle
  2. Multi-cycle
  3. 5-staged pipeline (no data forwarding)
  4. 5-staged pipeline (with data forwarding)

Single-cycle Core

  Singlecycle  

Multi-cycle Core

  Multicycle

5-stage pipelined Core

  Pipeline  

Directory Hierarchy

The repo is organized as follows:

Simulation using verilator

This project uses verilator for simulation and PyRV32I as the compiler for C programs.

  • First clone the RV32I Core
git clone https://github.com/SachiniW/RISC-V_Processor.git
  • The RV32I instructions for a basic C code is added to the repo as rtl/src/instruction_memory.mem. To run the simulation the default C code,
cd RISC-V Processor/rtl/src
./run.sh

Synthesizing for FPGAs

The project was initially intended to support synthesis on FPGAs. Hence, the current designs have been synthesized but have not been tested in hardware.

Followings are the Verilog HDL modules and testbenches used in the project.

  • Verilog modules : rtl/src/
  • Testbenches : rtl/tb/
Module Testbench Description
CorePipeForwarding.v - Core for the pipelined processor with a forwarding unit
CorePipe.v CorePipeTB.v Core for the pipelined processor without a forwarding unit
CoreMS.v CoreMSTB.v Core for the multi cycle processor
Core.v CoreTB.v Integrates the modules needed for a single cycle core
ControlMS.v ControlMS.v Control unit of the multi cycle processor
Control.v - Control unit of the single cycle and pipelined processor
DataMemory.v DataMemoryTB.v Contains the data memory
InstMemory.v InstMemoryTB.v Contains the instruction memory
ImmExtend.v ImmExtendTB.v Performs sign extension on the immediates
PCSelect.v - Updates the program counter
RegFile.v RegFileTB.v 32 bit register file for the single cycle and multi cycle processors
RegFilePipe.v - 32 bit register file for the pipelined processor
StallUnit.v StallUnitTB.v Stalling unit for the pipelined processor
ForwardingUnit.v - Forwarding unit for the pipelined processor
ALU.v ALU_tb.v Arithmetic and logic unit of the core
BranchLogic.v BranchLogic_tb.v Unit to decide the branching instruction operations
define.v - File which defines the used parameters

Future work

  • Testing on hardware

About

RV32I Core - Microarchitecture Evaluation for RV32I base ISA

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published