A basic Single-Cycle RISC-V CPU designed using Verilog HDL and simulated in Xilinx Vivado.
This project was developed to gain practical experience in Digital Design, RTL Design, Computer Architecture, and FPGA development workflows.
The processor executes instructions using a single clock cycle per instruction and integrates the fundamental building blocks of a RISC-V CPU.
Implemented modules include:
- Program Counter (PC)
- Instruction Memory
- Control Unit
- Register File
- Immediate Generator
- ALU Control Unit
- Arithmetic Logic Unit (ALU)
The processor datapath consists of:
-
Instruction Fetch
- Program Counter
- Instruction Memory
-
Instruction Decode
- Control Unit
- Register File
- Immediate Generator
-
Execute Stage
- ALU Control
- ALU
- Operand Selection Logic
single-cycle-riscv-cpu
│
├── src
│ ├── alu.v
│ ├── alu_control.v
│ ├── control_unit.v
│ ├── cpu_top.v
│ ├── data_memory.v
│ ├── immediate_generator.v
│ ├── instruction_memory.v
│ ├── pc.v
│ └── register_file.v
│
├── tb
│ ├── alu_tb.v
│ ├── alu_control_tb.v
│ ├── control_unit_tb.v
│ ├── cpu_top_tb.v
│ ├── data_memory_tb.v
│ ├── immediate_generator_tb.v
│ ├── instruction_memory_tb.v
│ ├── pc_tb.v
│ └── register_file_tb.v
│
└── README.md
- Verilog HDL
- Xilinx Vivado 2025.2
addi x1, x0, 100
addi x2, x0, 200
add x3, x1, x2PC = 80
x1 = 100
x2 = 200
x3 = 300
The simulation confirms correct execution of the sample instructions and proper register updates.
Through this project, I gained hands-on experience with:
- Verilog HDL
- RTL Design
- Digital System Design
- Processor Datapath Design
- Computer Architecture Fundamentals
- Vivado Design Flow
- Hardware Simulation and Verification
- Branch Instruction Support
- Load/Store Integration
- Complete Data Memory Path
- Pipeline Implementation
- FPGA Deployment and Testing
Prahas