No. 20 / project of 147 on the ladder

RV32I R-type ALU official subset

introduces — Twenty-two official RV32I tests passing through generated signatures

harden statelast run2026-04-30
signoff
  • DRCNOT RUN
  • LVSNOT RUN
  • antennaNOT RUN

P20 keeps the P17 hardened logic shell and the P18/P19 signature-generation flow, then widens the strict official-test target to cover the R-type ALU group.

Status: RTL pass for a 22-test official subset. These are upstream riscv-arch-test sources built in RVTEST_SELFCHECK mode, UART-loaded into the P17 external-memory model, and accepted only when the core reaches the local pass convention.

The Result

Run it:

make -C projects/20_rv32i_rtype_alu_tests/test
testresult
I-nop-00.SPASS
I-fence-00.SPASS
I-lui-00.SPASS
I-addi-00.SPASS
I-ori-00.SPASS
I-andi-00.SPASS
I-xori-00.SPASS
I-slti-00.SPASS
I-sltiu-00.SPASS
I-slli-00.SPASS
I-srli-00.SPASS
I-srai-00.SPASS
I-add-00.SPASS
I-sub-00.SPASS
I-or-00.SPASS
I-and-00.SPASS
I-xor-00.SPASS
I-sll-00.SPASS
I-srl-00.SPASS
I-sra-00.SPASS
I-slt-00.SPASS
I-sltu-00.SPASS

This is not a full RV32I compliance claim. It is a larger, strict, official subset.

Signature Model

The batch runner now recognizes generated R-type ALU test patterns:

RVTEST_TESTDATA_LOAD_INT(..., xN) # load rs1: xN = 0x...
RVTEST_TESTDATA_LOAD_INT(..., xM) # load rs2: xM = 0x...
op xD, xN, xM # perform operation

and computes expected signature words for ADD, SUB, OR, AND, XOR, SLL, SRL, SRA, SLT, and SLTU.

The honesty boundary is still explicit: tests without a generated signature model keep the placeholder signature and are not claimed by P20.

What This Proves

The official pass set now covers the no-op/fence baseline, LUI, all immediate ALU tests in this modeled subset, and all R-type ALU tests in this modeled subset.

That is still a small island inside RV32I, but it is a useful one. The next real work is control flow and addressing: AUIPC, JAL, JALR, branches, and load/store tests.