Skip to content

Commit bc64983

Browse files
Test Suite Requirements updates from Face to Face (#1115)
Co-authored-by: David Harris <74973295+davidharrishmc@users.noreply.github.com>
1 parent 1c98d6a commit bc64983

1 file changed

Lines changed: 18 additions & 17 deletions

File tree

docs/ctp/src/req.adoc

Lines changed: 18 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -4,45 +4,48 @@
44
The test suites may be provided by multiple suppliers, but must meet a common set of requirements to interoperate transparently for the user:
55

66
* All tests use a common set of DUT configuration files so the user only has to write them once:
7-
** <dut>.yaml for the UDB configuration including supported extensions and parameter values
8-
** rvmodel_macros.h for the RVMODEL DUT-Specific Macros
9-
** link.ld for the linker script
7+
** `<dut>.yaml` for the UDB configuration including supported extensions and parameter values
8+
** `rvmodel_macros.h` for the RVMODEL DUT-Specific Macros
9+
** `link.ld` for the linker script
1010

1111
* All tests are self-checking
1212
** Able to run on simulators, RTL, and hardware
1313
** Expected values may be produced by the RISC-V Sail reference model or the test code itself, and must account for relevant parameters
1414
*** Alternate reference model may be used for development until RISC-V Sail is sufficiently mature
1515
** Only test features whose behavior is specified for the given parameters (e.g. only test unimplemented instructions if Ssstrict is supported)
16-
** Calls RVMODEL_BOOT for DUT-specific boot code before starting the test
16+
** Calls `RVMODEL_BOOT` for DUT-specific boot code before starting the test
1717
** Test begins in machine mode, if any privileged modes are implemented
18-
** Terminate with RVMODEL_HALT_PASS or RVMODEL_HALT_FAIL to indicate success
19-
** Print meaningful information to localize a failure with RVMODEL_IO_WRITE_STR, including:
18+
** Terminate with `RVMODEL_HALT_PASS` or `RVMODEL_HALT_FAIL` to indicate success
19+
** Print meaningful information to localize a failure with `RVMODEL_IO_WRITE_STR`, including:
2020
*** PC at failure point
2121
*** Expected and actual values of mismatching registers
2222
*** Name of coverpoint and bin that failed, if practical
2323
** Tests should not contain loops over multiple bins. Each bin of each coverpoint should be tested by a unique instruction so that a failing bin can be uniquely identified from the program counter. Loops should go in the test generator instead of the test itself.
2424

25-
* All tests contain test configuration information (YAML comments) so the framework can identify which ones to run on a DUT
26-
** List of required extensions and parameter values that the DUT must support to run the test
27-
** Whether the expected result is configuration-dependent or not (i.e. whether it needs to be regenerated for different configurations or can be run unmodified on any configuration that meets the requirements)
28-
** Tests are organized in a highly granular way so that each ISA feature can be tested independently of other features
25+
* Tests are organized in a highly granular way so that each ISA feature can be tested independently of other features
2926

30-
* All tests are written in assembly or C and work with both GCC and Clang
27+
* All tests are written in assembly or C and work with the latest release of both GCC and Clang
28+
** The latest release is typically needed because new extensions are rapidly being added to these compilers
29+
** Certificates will be tied to specific compiler versions to ensure consistency
3130

32-
* Each test runs on the RISC-V Sail reference model and Spike for at least one choice of parameters
31+
* Each test runs on the RISC-V Sail reference model, Spike, and Whisper for at least one choice of parameters
32+
** Exceptions can be made for specific tests when there are known bugs or unimplemented extensions
3333

3434
* Tests are for certification, not verification
3535
** Every normative rule is addressed by at least one coverpoint, defined in the CTP
36-
** Every test is directed to a specific coverpoint bin, not fuzzing in the hopes of randomly hitting a coverpoint
36+
*** Specific normative rules can be omitted from testing if they are not testable. In this case, the rule should still be listed in the CTP and should be explicitly marked as not tested
37+
** Every test is directed to a specific normative rule/coverpoint bin, not fuzzing in the hopes of randomly hitting a rule/coverpoint
3738
*** Exception: Multicore memory ordering is necessarily nondeterministic
3839
** Tests emphasize RISC-V architectural behavior, not microarchitectural behavior such as complex pipeline hazards or timing
3940
** Runtime is important
41+
** Size is important
4042

4143
* All tests have SystemVerilog coverpoints
4244
** Use standard syntax compatible with Questa, VCS and Xcelium (regression on at least Questa)
45+
** All coverpoints must use the RVVI interface
4346

44-
* All testing collateral (tests, test generators, coverpoints, frameworks, documentation, etc.) are owned by RVI and distributed under an open-source license
45-
** Hosted in the https://github.com/riscv/riscv-arch-test[riscv/riscv-arch-test] GitHub repository under the stewardship of Architectural Certification Test (ACT) SIG
47+
* All testing collateral (tests, test generators, coverpoints, frameworks, documentation, etc.) are owned by RVI and distributed under an open-source license ** TODO: Jeff/Tom/Moiz to update this section
48+
** Hosted in the RISC-V architectural test repository under the stewardship of Architectural Certification Test (ACT) SIG
4649
** Repository contains tests for ratified and in-development features, not just features in certificates
4750
** Generators necessary to recreate the tests for a DUT are included in the repository, but, when tests are not unique to a DUT, the generated tests themselves are also included to reduce requiring users to run generators and to make the tests easier to view and understand
4851

@@ -53,7 +56,5 @@ The test suites may be provided by multiple suppliers, but must meet a common se
5356

5457
=== For discussion:
5558

56-
* Should RISC-V Sail be the only reference model used for results, so RVI only has to maintain one reference model? Or is support for Whisper also a requirement?
57-
* Should all coverage be collected via RVVI and SystemVerilog coverpoints, so RVI only has to maintain one coverage flow?
5859
* Testing of WARL, WLRL, WPRI fields, and the necessary parameters to define what fields should be tested and behaviors should be expected
5960
* Regression requirements, including multiple parameters

0 commit comments

Comments
 (0)