Skip to content

Latest commit

 

History

23 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

riscv-ooo-core

Dual-Issue Out-of-Order Superscalar RV32I Processor

1st Place + Special Jury Award — SanDisk Hardware Hackathon · 100+ competing teams


Architecture Explorer

License: MIT Language Simulator Verified


Overview

A fully synthesizable out-of-order execution engine implementing the Tomasulo algorithm for the RISC-V RV32I ISA. The front-end — fetch, decode, register renaming, and dynamic hazard-aware dispatch — is complete and verified. ROB commit-stage integration is under active development.

The front-end has been verified in simulation with directed self-checking testbenches. The waveform below demonstrates simultaneous dual-issue dispatch with correct RAT allocation and RAW hazard detection working.


Architecture

Architecture Diagram


Verified Functionality

Component Status Notes
2-wide instruction fetch Complete PC + IMEM, handles branch boundaries
2-wide decode Complete RV32I full decode, immediate gen
Register Alias Table (RAT) Complete 32 arch → 64 phys, dual-alloc per cycle
Free list management Complete Circular free list with head/tail pointers
RAW hazard detection Complete Combinatorial intra-group bypass, scoreboard
Issue queue dispatch Complete issue0_valid + issue1_valid verified in sim
CDB broadcast Complete broadcast_valid confirmed in waveform
Execution units (ALU) Complete Verified via directed self-check
ROB commit stage In progress Precise exception support being integrated

Waveform — Dual-Issue Dispatch Proof

Surfer Waveform: Dual Issue Dispatch

The waveform shows:

  • issue0_valid and issue1_valid asserting simultaneously — dual-issue working
  • prd_0 and prd_1 incrementing by 2 each active cycle — RAT dual-allocation correct
  • broadcast_valid asserted — CDB writeback path active
  • free_ptr advancing correctly — no free list corruption under back-to-back dispatch

Getting Started

Prerequisites

# Icarus Verilog with SystemVerilog support
brew install icarus-verilog   # macOS
sudo apt install iverilog     # Ubuntu

# Waveform viewer
# Surfer (recommended): https://surfer-project.org
# or GTKWave: sudo apt install gtkwave

Run Simulation

git clone https://github.com/devtyagi3909/riscv-ooo-core.git
cd riscv-ooo-core

# Full directed testbench
./scripts/run_verification.sh

# Expected output:
# [PASS] Reset: PC held at 0
# [PASS] 2-wide fetch/decode: ADDI pair decoded correctly
# [PASS] RAT: prd_0/prd_1 allocated, free_ptr +2 on active cycle
# [PASS] Dispatch: issue0_valid and issue1_valid asserted simultaneously
# [PASS] CDB: broadcast_valid observed
# PASS: cpu_tb directed verification completed with no errors.

View Waveform

surfer waveforms/cpu.vcd
# or
gtkwave waveforms/cpu.vcd

Repository Structure

riscv-ooo-core/
├── rtl/                  # Synthesizable SystemVerilog
│   ├── fetch/            # 2-wide instruction fetch
│   ├── decode/           # RV32I decode, immediate generation
│   ├── rename/           # RAT, free list, physical register file
│   ├── dispatch/         # Issue queue, hazard scoreboard
│   └── execute/          # ALU, CDB broadcast
├── tb/
│   └── cpu_tb.v          # Directed self-checking testbench
├── scripts/
│   └── run_verification.sh
├── waveforms/
│   └── cpu.vcd
└── assets/
    └── surfer_trace.png  # Waveform screenshot

Hackathon Context

This core was built at the SanDisk Hardware Hackathon — a 48-hour hardware design competition judged by senior engineers from Sandisk/Western Digital and academic faculty, fielding over 100 teams from across India.

The submission was awarded:

  • 1st Place — overall hardware design category
  • Special Jury Award — for microarchitectural depth and correctness of the OoO implementation

References

  • Patterson & Hennessy — Computer Organization and Design: RISC-V Edition
  • Tomasulo, R. (1967). An Efficient Algorithm for Exploiting Multiple Arithmetic Units
  • RISC-V International — RISC-V ISA Specification

License

MIT — see LICENSE

About

Full superscalar RV32I out-of-order processor with Tomasulos Algorithm, 7-stage pipeline, and UVM testbench. 1st Place + Special Jury Award — SanDisk Hardware Hackathon.

Topics

Resources

Stars

13 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages