MiNTs-CPU
An in-order RV64IMAC CPU designed in SystemVerilog. Starting from the CPU design course at cpu.kanataso.net, we have extended it with Linux boot, lockstep verification against a reference model, and improvements guided by performance counters.
View the code on GitHub- 61,610,275
- Instructions matched in lockstep comparison with Whisper
- 54 / 54
- rv64ui tests passed
- CPI 2.393
- Measured over 100M cycles of Linux boot, down from 2.529
FIG.2 Branch-heavy loop
The cycle gap with Rocket Chip has almost closed
Total cycles of MiNTs-CPU minus total cycles of Rocket Chip, on the 1x loop.
Before improvements
+19,968Fetch-side BTB added
+9,970Fetch / issue bypass added
−31
View all values in a table
| Cycles | 1x | 2x | 4x |
|---|---|---|---|
| Rocket Chip | 70,045 | 65,042 | 62,545 |
| MiNTs-CPU: Before improvements | 90,013 | 75,025 | 67,537 |
| MiNTs-CPU: Fetch-side BTB added | 80,015 | 70,027 | 65,039 |
| MiNTs-CPU: Fetch / issue bypass added | 70,014 | 65,026 | 62,538 |
Comparison on a branch-heavy loop using common RV64 integer assembly. This does not mean overall CPU performance is equivalent to Rocket Chip. Values come from simulation, not from silicon or FPGA.
Read the measurement details on Qiita (in Japanese)Implementation
Current implementation
- ISA
- RV64IMAC
- Pipeline
- In-order, 5 stages
- Privilege modes
- M / S / U
- Virtual memory
- Sv39, shared PTW, ITLB, DTLB
- Memory protection
- 8-entry PMP (checks instruction, data, and PTW physical accesses)
- Caches
- 4 KiB I-cache, 16 KiB D-cache (write-through), 8-entry store buffer
- Branch prediction
- 2-bit PHT, fetch-side BTB, JALR BTB, RAS
- Interrupts and peripherals
- ACLINT, PLIC-compatible controller, NS16550A-compatible UART
- Boot
- OpenSBI v1.3.1 → Linux 6.12 → BusyBox
- Verification
- riscv-tests, custom C tests, Linux boot, Whisper lockstep
Limitations
Not yet supported
- F / D floating point
- Zb* bit manipulation
- SMP / cache coherence
- Stable write-back D-cache
- Full RVA23 compliance
- Timing closure on FPGA
Joint research and technical collaboration
Collaborate with us
MiNTs-CPU is at the research stage and is not offered as a product or service.