RV32I + DOT4 / EVIDENCE
DOT4 is 5.2× faster after its clock cost.
A five-stage RV32I core with one custom instruction, DOT4, that multiplies four signed bytes and sums them. Five figures and one table, each built from the JSON reports the regression writes.
Cycle counts come from RTL simulation. Fmax and area are post-route estimates for iCE40 HX8K; the core has not run on a physical board. The Spike comparison uses riscv-arch-test 3.10.0; it is not certification. Hover or tab to any mark for its exact value.
Figure 1
DOT4 needs 5.8× fewer cycles than the best RV32I kernel at n = 256
Data table
| Kernel | n = 16 | n = 64 | n = 256 |
|---|---|---|---|
| Shift-and-add, LW | 897 | 3,789 | 14,589 |
| Shift-and-add, LB | 865 | 3,661 | 14,077 |
| Quarter-square table | 223 | 859 | 3,403 |
| DOT4 | 45 | 153 | 585 |
Figure 2
After its clock cost, DOT4 is 5.2× faster than the best RV32I kernel at n = 256
Data table
| Baseline | n | Cycles only | After clock cost | Seed range |
|---|---|---|---|---|
| Quarter-square table | 16 | 4.96× | 4.41× | 3.95× to 4.83× |
| Quarter-square table | 64 | 5.61× | 5.00× | 4.48× to 5.48× |
| Quarter-square table | 256 | 5.82× | 5.18× | 4.64× to 5.67× |
| Shift-and-add, LW | 16 | 19.93× | 17.75× | 15.90× to 19.45× |
| Shift-and-add, LW | 64 | 24.77× | 22.05× | 19.76× to 24.16× |
| Shift-and-add, LW | 256 | 24.94× | 22.20× | 19.89× to 24.33× |
| Shift-and-add, LB | 16 | 19.22× | 17.11× | 15.33× to 18.75× |
| Shift-and-add, LB | 64 | 23.93× | 21.30× | 19.09× to 23.34× |
| Shift-and-add, LB | 256 | 24.06× | 21.42× | 19.20× to 23.48× |
Figure 3
DOT4 lowers median Fmax by 4.43 MHz (11%); the route seed alone moves it up to 4.6 MHz
Data table
| Netlist | Seed 1 | Seed 2 | Seed 3 | Seed 4 | Seed 5 | Median |
|---|---|---|---|---|---|---|
| DOT4 off (chparam DOT4=0) | 40.25 | 40.10 | 43.25 | 40.65 | 40.37 | 40.37 |
| DOT4 on (chparam DOT4=1) | 35.59 | 34.51 | 36.42 | 35.94 | 39.12 | 35.94 |
| Shipped netlist (make timing, DOT4=1) | 37.03 | 36.05 | 34.63 | 35.85 | 37.60 | 36.05 |
Figure 4
DOT4 adds 904 logic cells (19% more); the shipped core fills 72.1% of the HX8K
Data table
| Netlist | Logic cells | Share of 7,680 | LUT4 |
|---|---|---|---|
| DOT4 off (chparam DOT4=0) | 4,767 | 62.1% | 3,176 |
| DOT4 on (chparam DOT4=1) | 5,671 | 73.8% | 4,144 |
| Shipped netlist (make timing, DOT4=1) | 5,539 | 72.1% | 4,012 |
Figure 5
Generated hazard programs hit all 327 of 327 producer, consumer and distance bins
Data table
| Panel | Bins hit | Bins |
|---|---|---|
| Producer alu | 42 | 42 |
| Producer load | 42 | 42 |
| Producer jal | 42 | 42 |
| Producer jalr | 42 | 42 |
| Producer lui | 42 | 42 |
| Producer auipc | 42 | 42 |
| Producer dot4 | 42 | 42 |
| Writes to x0 | 21 | 21 |
| Redirects | 12 | 12 |
| Total | 327 | 327 |
Figure 6
Every check passes; 73 of 73 core line points are covered
| Result | Check | What was compared |
|---|---|---|
| 253 pass | Programs against the Python reference model | 11,928 retired instructions, run in Icarus and Verilator. Invariants checked on 38,603 cycles. 46/46 instruction-class bins hit. |
| 39/39 tests | Spike, riscv-arch-test 3.10.0 | 12,720 signature words equal Spike. RV32I suite; not ACT4 and not certification. |
| 50 programs | Random programs against Spike | 16,908 retirements and 5,091 store bytes equal the Spike commit log. |
| 327/327 hit | Hazard cross bins | 108 generated hazard programs. Figure 5 shows every bin. |
| 38/38 | Deliberate RTL bugs caught | 8 by invariants, 8 by hazard programs, 7 by Spike tests, 4 by invariants, 11 by invariants. |
| 262,144 cases | DOT4 lane sweep | Every signed byte pair in each lane; checksum equal to the oracle in Verilator and Icarus. Of 1,024 custom-0 encodings only DOT4 executes; the other 1,023 trap. |
| 100.00% | Core line coverage | 73/73 Verilator 5.020 line points in rv32_core.sv. 0 uncovered. |