This project implements a single-cycle RISC-V processor core supporting the RV32I base integer instruction set. The design is written in Verilog RTL and focuses on clarity, correctness, and timing efficiency, making it suitable for educational purposes, FPGA implementation, and timing analysis experiments.
A key design decision of this project is to support only RV32I, excluding extensions such as RV32M (multiply/divide) or floating-point units. This choice significantly improves maximum operating frequency (Fmax) and simplifies Static Timing Analysis (STA).
- RV32I base instruction set
- Single-cycle datapath
- Fully synchronous design
- Simple ALU (no MUL/DIV)
- Timing-friendly architecture
- Suitable for FPGA synthesis and STA
ADD,SUBAND,OR,XORSLL,SRL,SRASLT,SLTU
ADDI,ANDI,ORI,XORISLTI,SLTIU- Shift-immediate instructions
LWSW
BEQ,BNE,BLT,BGE,BLTU,BGEUJAL,JALR
This is a single-cycle processor, meaning each instruction completes all stages within one clock cycle:
- Instruction Fetch (IF)
- Instruction Decode (ID)
- Execute (EX)
- Memory Access (MEM)
- Write Back (WB)
Because all stages execute in one cycle, the clock period must accommodate the slowest instruction path, making timing analysis critical.
Typical critical path:
PC → Instruction Memory → Decode → Register File Read
→ ALU → Data Memory → Write Back
The absence of complex arithmetic units ensures that this path remains short and predictable, which directly improves Fmax.
In a single-cycle design:
- All instructions share the same clock period
- The slowest instruction defines the clock frequency
Including extensions such as RV32M would introduce:
- Large combinational multipliers
- Deep logic trees
- Long carry propagation paths
This would drastically increase the critical path delay and reduce Fmax for all instructions.
STA verifies that:
Tclk ≥ Tcq + Tcomb + Tsetup + Tskew
By restricting the ISA to RV32I:
Tcombis minimized- Timing closure is easier
- Fewer timing violations occur
Result: Higher achievable clock frequency and cleaner STA reports.
| File | Description |
|---|---|
DatapathSingleCycle.v |
Top-level single-cycle datapath |
cla.v |
Carry Look-Ahead adder used in ALU |
Control.v |
Instruction decode and control logic |
ALU.v |
RV32I-compliant ALU |
RegFile.v |
32×32 register file |
This core is suitable for:
- FPGA synthesis (Vivado / Quartus)
- RTL simulation
- Static Timing Analysis (STA)
Typical STA checks:
- Worst Negative Slack (WNS)
- Critical path identification
- Maximum clock frequency (Fmax)
- No RV32M (MUL/DIV)
- No floating-point support
- No caches or MMU
These limitations are intentional to preserve simplicity and timing efficiency.