Skip to content
OR5-LABSPublic

About

Dual-issue in-order superscalar RV32IM core

Topics

Resources

Stars

1 star

Watchers

0 watching

Forks

Repository files navigation

SS2W

High-Throughput 2-Way In-Order Superscalar RV32IM RISC-V Core

License: MIT LinkedIn Follow Visit or5.org


SS2W is a dual-issue in-order superscalar 32-bit RISC-V processor core written in synthesizable SystemVerilog. It achieves high instruction throughput via a dual-issue pipeline (Lane A full-execution + Lane B ALU) while maintaining a compact footprint and zero third-party RTL dependencies.


Overview

ISA RV32IM + Zicsr
Pipeline 3-stage dual-issue superscalar (Fetch / Execute / Writeback)
Issue Width 2-way in-order (Lane A: full ALU/MDU/LSU/CSR; Lane B: simple ALU)
Branch Predictor 2-bit BHT branch prediction table
Memory Map 32 KB IMEM (0x0000_0000), 32 KB DRAM (0x8000_0000), Tohost (0x2000_0000)
Debug RISC-V Abstract Command Debug Port (-DRISCV_DEBUG)
Formal Dual-channel RISC-V Formal Interface (-DRISCV_FORMAL)
Simulator Verilator 5.0+
Target FPGA Digilent Arty A7-100T (xc7a100tcsg324-1)

Features

  • Dual-Issue Superscalar Pipeline: Fetches aligned instruction pairs and issues concurrently whenever no intra-bundle RAW/WAW dependency exists.
  • Dedicated Execution Lanes:
    • Lane A: Full ALU operations, multi-cycle multiply/divide, loads/stores, branch/jump handling, and CSR manipulation.
    • Lane B: Symmetric integer ALU for parallel arithmetic and logical operations.
  • Hardware Misalignment Support: Automatically resolves misaligned load and store memory accesses across consecutive bus cycles without raising exceptions.
  • Hardware CSR & Performance Counters: mcycle, mcycleh, minstret, and minstreth counters.
  • Integrated RVFI & Debug: Built-in dual-channel formal interface verification and abstract register/memory debug interface.

Resource Utilization

Synthesized and implemented with AMD Vivado targeting the Digilent Arty A7-100T FPGA (xc7a100tcsg324-1).

Component / Target Slice LUTs Logic LUTs Memory LUTs Registers (FF) DSP48E1 Block RAM LUT Utilization
SS2W Core (OOC) 9,933 9,829 104 3,031 12 0 15.7%
  • Target Device: Digilent Arty A7-100T (xc7a100tcsg324-1)
  • Slice LUTs: 9,933 (9,829 Logic, 104 Memory / LUTRAM) — 15.7% utilization (out of 63,400)
  • Flip-Flops (Registers): 3,031
  • DSP Slices (DSP48E1): 12
  • Block RAM: 0 BRAM

Benchmark Metrics

Measured in cycle-accurate Verilator simulation and bare-metal execution on physical FPGA silicon targeting the Digilent Arty A7-100T (xc7a100tcsg324-1).

Benchmark Simulation (Verilator) FPGA (Arty A7-100T @ 25 MHz)
CoreMark 1.0 (10 iterations) 3.78 CoreMark/MHz (264,100 cycles/iter, 780,331 dual-issued pairs, CRC Validated) 3.78 CoreMark/MHz (94.66 CoreMark, 2,640,982 cycles, CRC Validated)
Dhrystone 2.1 (1,000 runs) 1.48 DMIPS/MHz (399 cycles/run, 114,707 dual-issued pairs, 129,855 Dhrystones/sec @ 50 MHz) 1.478 DMIPS/MHz (36.954 DMIPS, 64,929 Dhrystones/sec @ 25 MHz)
# Run CoreMark simulation
cd coremark && ./run_coremark_10.sh

# Run Dhrystone simulation
cd dhrystone && ./run_dhrystone.sh

# Build & run benchmarks on physical Arty A7-100T FPGA
cd coremark && ./run_coremark_arty.sh
cd dhrystone && ./run_dhrystone_arty.sh

Detailed results, dual-issue statistics, compiler flags, and methodology: benchmarks.md


Requirements

Tool Version Purpose
Verilator 5.0 or later Cycle-accurate C++ simulation model
Python 3.10 or later Test assembly & smoke hex generation
RISC-V GCC riscv64-unknown-elf-* or riscv-none-elf-* Bare-metal benchmark & ISA test compilation
Vivado (Optional) 2023.2 or later FPGA synthesis & implementation on Arty A7-100T

Build & Test

The top-level Makefile provides standardized targets:

make              # Compile RTL & run Verilator smoke test
make test         # Run complete regression suite (run_tests.sh)
make isa          # Run official riscv-tests (rv32ui, rv32um, rv32mi)
make debug        # Run RISC-V Debug Module test suite
make rvfi         # Run dual-channel RVFI trace verification
make bench        # Run CoreMark & Dhrystone benchmarks
make clean        # Clean build and simulation artifacts
make help         # Print target summary

Verification matrix and test status details: tests.md


Repository Structure

ss2w/
├── rtl/                        # Synthesizable SystemVerilog RTL (untouched)
│   ├── ss2w_core.sv          # 2-way superscalar core
│   ├── ss2w_regfile.sv       # Multi-port register file
│   └── ss2w_soc.sv           # Unified SoC wrapper with IMEM/DRAM/tohost
├── shared/three_sipp_esr/rtl/         # Shared Three-SIPP-ESR sub-modules (untouched)
├── tb/                         # Testbenches (Verilator-compatible)
├── coremark/                   # Bare-metal CoreMark 1.0 suite
├── dhrystone/                  # Bare-metal Dhrystone 2.1 suite
├── programs/                   # Smoke test programs
├── third_party/compliance/     # Official riscv-tests compliance suite
├── Makefile                    # Standardized top-level Makefile
├── benchmarks.md               # Benchmark metrics documentation
├── tests.md                    # Verification matrix documentation
└── README.md                   # Core documentation

License

SS2W is licensed under the MIT License. See LICENSE for details.

About

Dual-issue in-order superscalar RV32IM core

Topics

Resources

Stars

1 star

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages