riscv-tests
Overview
riscv-tests is a public test-suite repository under the riscv-software-src GitHub organization. It is primarily written in Assembly and serves as a community-maintained collection of directed tests used to validate RISC-V processor implementations against the Instruction Set Architecture (ISA) specification.
Repository statistics (as recorded in the public GitHub metadata):
- Language: Assembly
- Stars: ~1,207
- Forks: ~551
- Last updated: 2026-06-25
Role in Verification Methodology
riscv-tests functions as a standard compliance test suite in RISC-V processor verification. It is typically executed alongside riscv-arch-tests (the official architectural test suite) inside an automated Jenkins Continuous Integration (CI) pipeline. Together they serve as established benchmarks for verifying that the ISA is correctly implemented by a given core under test (DUT).
In a representative multi-layered RISC-V verification flow (e.g., the NaxRiscv SoC lockstep methodology), riscv-tests is the entry point of the verification process:
- Compliance / directed testing phase —
riscv-testsandriscv-arch-testsare run as the first stage to confirm basic ISA conformance. - Real-world benchmarking phase — benchmarks such as CoreMark and Dhrystone, plus OS boot sequences (FreeRTOS, Linux boot), are executed to assess software/hardware integration.
- Constrained-random testing phase — tools such as RISCV-DV generate randomized assembly programs targeting edge cases (misaligned instructions, RD/RS dependencies, pipeline hazards, memory-access violations, unhandled interrupts), with UVM-based functional-coverage analysis closing the loop.
Characteristics as a Test Suite
- Form: Assembly-language directed test programs.
- Purpose: Verify correctness of instruction execution and CSR (Control and Status Register) behavior against the ISA spec.
- Scope of coverage: When combined with arch-tests and RISCV-DV, the suite covers opcodes, ISA extensions (such as F, D, C), and interactions with system registers (CSRs).
- Integration model: Designed to be invoked from automated CI frameworks; results feed into regression dashboards and coverage reports.
Relationship to Other Techniques
- Directed testing —
riscv-testsis itself a canonical example of the directed-testing technique: each test targets a specific instruction, opcode, or corner case, with an expected outcome hard-coded or hand-verified. - Compliance verification — It pairs with
riscv-arch-tests, which is the architectural test suite published by the RISC-V International organization. - Random test generation — It complements (rather than replaces) random test generators like RISCV-DV, which probe more complex interactions that directed tests cannot easily enumerate.
See Also
- Directed testing (technique) —
riscv-testsimplements this approach. riscv-arch-tests— official architectural compliance suite run alongsideriscv-testsin CI.- RISCV-DV — constrained-random test generator used after the directed phase.