[sw/test] Add upstream RISC-V scalar ISA tests (rv32u*) as RTL ctests - #127
Draft
Smephite wants to merge 2 commits into
Draft
[sw/test] Add upstream RISC-V scalar ISA tests (rv32u*) as RTL ctests#127Smephite wants to merge 2 commits into
Smephite wants to merge 2 commits into
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
Adds the upstream
riscv-software-src/riscv-testsscalar suites (rv32ui,rv32um,rv32uf,rv32ud) to the build as RTL ctests, alongside the existing vector.ctests. This gives Spatz's scalar/FP core (Snitch + the FPU sequencer path) direct ISA-level coverage it previously lacked.How
sw/riscvTests/RiscvIsaTests.cmake—FetchContentpulls riscv-tests at a pinned tag, builds each test against the stockenv/p(its own_start, trap handler,tohostpass/fail), and registers it as an RTL ctest via${SNITCH_SIMULATOR}. No snRuntime linkage. The per-suite<ext>_sc_testslist from each upstreamMakefragis parsed (rather than globbing) to honour upstream's own selection.sw/riscvTests/patches/move-fcsr-wpri.patch— masks Spatz's non-standardfmodebits (fcsr[9:8]) in upstreammove.S, which otherwise leak into the WPRI region the test reads back.sw/riscvTests/CMakeLists.txt— includes the above.fdiv/ma_dataare markedWILL_FAILbehindRVTESTS_HAS_DIVSQRT/RVTESTS_HAS_MISALIGNED(bothOFFby default), so they build and run but don't red the suite.Baseline on current
main63/71 pass. The 8 failures are all real scalar-FP bugs inmain, which this harness now surfaces:rv32ud-p-ldst(6)flwnot NaN-boxedrv32uf-p-fclass(2),rv32uf/ud-p-fcmp(10)rv32uf/ud-p-fcvt_w(2)fcvt.w.d/sINT widthrv32ud-p-fcvt(5),rv32ud-p-fmadd(2)rs3widthWith the corresponding FP fixes applied, the suite goes 71/71 (verified locally). Landing this harness first gives those fix PRs a concrete regression target.
Notes
fdivstaysWILL_FAILuntil scalar HW divsqrt lands; flipRVTESTS_HAS_DIVSQRT=ONthen.