You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: ctp/src/coverage.adoc
+25-18Lines changed: 25 additions & 18 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -36,27 +36,34 @@ As compared to the base RVVI, Extended RVVI adds the following signals:
36
36
|virt_adr_d|XLEN|Virtual address of data accessed by instruction
37
37
|phys_adr_i|PA_BITS|Physical address of instruction
38
38
|phys_adr_d|PA_BITS|Physical address of data accessed by instruction
39
-
|pte_i|XLEN|Instruction page table entry
40
-
|pte_d|XLEN|Data page table entry
41
-
|ppn_i|PPN_BITS|Instruction physical page number
42
-
|ppn_d|PPN_BITS|Data physical page number
43
-
|page_type_i|2|Instruction page type ***explain
44
-
|page_type_d|2|Data page type
45
-
|read_access|1|Instruction reads data (loads, AMOs, ***CMO)
46
-
|write_access|1|Instruction writes data (stores, AMO, ***cbo.zero)
47
-
|execute_access|1|***define - is this jumps? when asserted, and does it only affect data accesses?
39
+
|g_phys_adr_i|PA_BITS|Guest physical address of instruction (when Hypervisor is active, 0 when inactive)
40
+
|g_phys_adr_d|PA_BITS|Guest physical address of data accessed by instruction (when Hypervisor is active, 0 when inactive)
41
+
|pte_i|XLEN|Instruction page table entry (VS-stage when Hypervisor is active)
42
+
|pte_d|XLEN|Data page table entry (VS-stage when Hypervisor is active)
43
+
|g_pte_i|XLEN|Instruction page table entry (G-stage when Hypervisor is active, 0 when inactive)
44
+
|g_pte_d|XLEN|Data page table entry (G-stage when Hypervisor is active, 0 when inactive)
45
+
|page_type_i|3|Instruction page type (VS-stage when hypervisor is active))
46
+
|page_type_d|3|Data page type (VS-stage when hypervisor is active))
47
+
|g_page_type_i|3|Instruction page type (G-stage when hypervisor is inactive, 0 when inactive)
48
+
|g_page_type_d|3|Data page type (G-stage when hypervisor is inactive, 0 when inactive)
48
49
|===
49
50
50
-
*** PA_BITS
51
-
PPN_BITS = PA_BITS - 12
52
-
*** why do we need ppn when we have phys_addr? Why not derive locally?
53
-
54
-
*** do we need to add guest physical address? Such as
55
-
56
-
* gpa_adr_i
57
-
* gpa_adr_d
51
+
[[t-pagetypes]]
52
+
.Page Types
53
+
[options=header]
54
+
[cols="1, 4" options=header]
55
+
[%AUTOWIDTH]
56
+
|===
57
+
|Code|Type
58
+
|000|kilopage
59
+
|001|megapage
60
+
|010|gigapage
61
+
|011|terapage
62
+
|100|petapage
63
+
|other|reserved
64
+
|===
58
65
59
-
maybe guest page table entries?
66
+
Some accesses touch more than one physical page. Examples include misaligned accesses wrapping a page boundary, and some vector accesses. Extended RVVI provideds the signals corresponding to the base address of the access. For vector, they correspond to the base address of the initial element access.
These additional exception tests are run on configurations with vector (V extension or subsets thereof that rely on mstatus.VS).
52
+
These additional exception tests are run on configurations with vector (V extension or subsets thereof that rely on mstatus.VS) related to vector integer instructions.
These additional exception tests are run on configurations with vector (V extension or subsets thereof that rely on mstatus.VS) related to vector floating-point instructions.
These additional exception tests are run on configurations with vector (V extension or subsets thereof that rely on mstatus.VS) related to vector load/store instructions.
Copy file name to clipboardExpand all lines: ctp/src/intro.adoc
+14Lines changed: 14 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -3,6 +3,20 @@
3
3
4
4
This Certification Test Plan describes the coverpoints and tests to certify RISC-V profiles. It summarizes the profiles intended to be supported and the test suites that need to run on each profile. It also summarizes the contents of each test suite.
5
5
6
+
=== Certificates and Certification
7
+
8
+
A RISC-V _Certificate_ is a named set of requirements for a RISC-V implementation, typically defined by a ratified profile and a set of additional requirements. For example, the RVA23 Certificate requires meeting the RVA23S64 profile and having a conforming machine mode implementation.***
9
+
10
+
_Certification_ is the process of testing that a RISC-V implementation meets the requirements of a RISC-V certificate. The goal of certification is to deliver software interoperability across implementations.
11
+
12
+
There is a fuzzy line between certification and verification. Certification involves testing that an implementation meets all of the normative rules in ratified specifications relevant to the certificate, but does not involve testing that requires detailed knowledge of the microarchitecture. Specifically, certification does not check timing (such as the arrival of interrupts relative to the start, middle, or end of multicycle instructions), pipeline hazards, power management features, etc.
13
+
14
+
Certification assumes the ratified specification is read and interpreted with knowledge of computer architecture and reasonable judgement, because not every detail is spelled out in normative rules. For example, certification that "ADD performs the addition of _rs1_ and _rs2_" involves testing ADD with a reasonable set of values. The test plan author exercises judgement selecting these values because they are not spelled out. For example, the values might involve every combination of {0, 1, -1, maximum positive integer, maximum negative integer, intermediate value} for the two source register values. The intermediate value involves an arbitrary choice. A reasonable author might pick some other sensible edge values, such as some values one more or less than those in the set above. However, certification does not attempt to prove every bit of a carry chain works for every possible input, or that all stuck-at faults would be detected. Similarly, the test plan author may exercise all 32 registers as sources or destinations for each instruction, which is implicitly required but not spelled out in a normative rule.
15
+
16
+
When in doubt, it is better to test slightly more than strictly necessary for normative rules, rather than slightly less. Over-testing is acceptable, as long as it does not cause false failures or excessive test time. It is often easier to test cross-products of all relevant inputs, even if not all combinations are explicitly named by normative rules. It also reduces the risk of human error missing a required combination.
17
+
18
+
An implementation that passes certification tests is said to be certified for the relevant certificate. The process of certification is described in ***.
19
+
6
20
=== Coverpoints and Tests
7
21
8
22
Coverpoints are the key to certification. They are the features of the RISC-V architecture that need to be tested in order to certify a profile. Each coverpoint has a set of tests that exercise it, and each test has a set of coverpoints that it hits.
** RV{32/64}IMAFDC_Zifencei_Zicntr_Zihpm with machine mode, no PMP
9
-
* Microcontroller Profile (Not Ratified, but market demand): Phase 1
10
-
** RV{32/64}IMZca_Zcb_Zifencei_Zicsr_Zicntr with machine mode, user mode, interrupts, PMP16 footnote:[Tentative; may need updating based on the MRD Market Requirements Document]
** RV{32/64}IMZca_Zcb_Zifencei_Zicsr_Zicntr with machine mode, user mode, interrupts, PMP16 footnote:[Tentative; may need updating based on the MRD Market Requirements Document] ***update
11
11
* https://drive.google.com/file/d/1Kg7Ner5ZlxFDclf92-9Tz88JvmZWt5Wb/view[RVA22S64 Profile] (Ratified): Phase 1.5, stepping stone to phase 2
12
12
** Application processor without vector, hypervisor, and other newer extensions
13
13
* https://github.com/riscv/riscv-profiles/blob/main/src/rvb23-profile.adoc#rvb23s64-profile[RVB23S64 Profile] (Ratified): Phase 1.8, stepping stone to phase 2
Copy file name to clipboardExpand all lines: ctp/src/strategy.adoc
+1-1Lines changed: 1 addition & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -175,7 +175,7 @@ _rs2_.#[#norm:inst:sub:operation]#SUB performs the subtraction of _rs2_ from _rs
175
175
176
176
=== Coverpoints
177
177
178
-
Coverpoints are written with one file that covers both RV32 and RV64, to reduce the duplication and risk of becoming out of sync. When a coverage file contains coverpoints that apply only to one XLEN or the other (e.g. 32 or 64-bit edge values), they are separated by ``ifdef XLEN32` or `XLEN64` directives. Similarly, when a coverpoint applies only to a certain parameter value (PMP NA4 regions are not supported for granularity coarser than 4 bytes), they uses ``ifdef`` to exclude tests based on the parameter value.
178
+
Coverpoints are written with one file that covers both RV32 and RV64, to reduce the duplication and risk of becoming out of sync. When a coverage file contains coverpoints that apply only to one XLEN or the other (e.g. 32 or 64-bit edge values), they are separated by ```ifdef XLEN32`` or ``XLEN64`` directives. Similarly, when a coverpoint applies only to a certain parameter value (PMP NA4 regions are not supported for granularity coarser than 4 bytes), they uses ```ifdef`` to exclude tests based on the parameter value.
Copy file name to clipboardExpand all lines: ctp/src/trickbox.adoc
+9-9Lines changed: 9 additions & 9 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -6,8 +6,8 @@ Each DUT requires a trick box to perform the following non-ISA functions:
6
6
* Run DUT-specific boot code
7
7
* Deliver each supported type of interrupt to the core (Machine/Supervisor External/Timer/Software + guest external interrupts)
8
8
* Send a character to a terminal to log a success message or test failure information
9
-
* Terminate a test
10
-
* If a debug module is supported, send commands to the DM
9
+
* Terminate a test with a pass or fail indication
10
+
* If a debug module is supported, send abstract commands to the DM and receive responses
11
11
12
12
=== Trick Box Macros
13
13
@@ -21,10 +21,11 @@ The trick box is implemented with DUT-specific macros in given in <<t-trickbox>>
21
21
|===
22
22
|Macro|Description
23
23
|RVMODEL_BOOT|Perform boot operations, such as turning on a phase-locked loop or DRAM controller
24
-
|RVMODEL_HALT|Terminate test. When the test is run in simulation, this should end the simulation.
24
+
|RVMODEL_HALT_PASS|Terminate test with a pass indication. When the test is run in simulation, this should end the simulation.
25
+
|RVMODEL_HALT_FAIL|Terminate test with a fail indication. When the test is run in simulation, this should end the simulation.
25
26
|RVMODEL_IO_INIT|Initialization steps needed prior to writing to the console
26
-
|RVMODEL_IO_WRITE_STR(_R, _STR)|Write a null-terminated ASCII string to the console, where _R *** and _STR ***
27
-
|RVMODE_SET_MEXT_INT| Sets the Machine External Interrupt (mip.MEIP = 1, if supported)
27
+
|RVMODEL_IO_WRITE_STR(_R, _STR)|Write a null-terminated ASCII string to the console, where _R is a temporary register that may be trashed by the macro and _STR is a register containing the address of the first byte of the string
28
+
|RVMODEL_SET_MEXT_INT| Sets the Machine External Interrupt (mip.MEIP = 1, if supported)
28
29
|RVMODEL_CLR_MEXT_INT|Clears the Machine External Interrupt (mip.MEIP = 0)
29
30
|RVMODEL_SET_MTIMER_INT|Sets the Machine Timer Interrupt (mip.MTIP = 1, if supported)
30
31
|RVMODEL_CLR_MTIMER_INT|Clears the Machine Timer Interrupt (mip.MTIP = 0)
@@ -34,18 +35,17 @@ The trick box is implemented with DUT-specific macros in given in <<t-trickbox>>
34
35
|RVMODEL_SET_SEXT_INT|Sets the Supervisor External Interrupt (sip.SEIP = 1, if supported)
35
36
|RVMODEL_CLR_SEXT_INT|Clears the Supervisor External Interrupt (sip.SEIP = 0)
36
37
|RVMODEL_SET_STIMER_INT|Sets the Supervisor Timer Interrupt (sip.STIP = 1, if supported)
37
-
|RVMODEL_CLR_STIMER_INT|Clears the Supervisor Timer Interrupt (sip.STIP = 0)\
38
+
|RVMODEL_CLR_STIMER_INT|Clears the Supervisor Timer Interrupt (sip.STIP = 0)
38
39
|RVMODEL_SET_STIMER_INT_SOON|Cause the Supervisor Timer Interrupt to rise soon, but not immediately.
39
40
|RVMODEL_SET_SSW_INT|Sets the Supervisor Software Interrupt (mip.SSIP = 1, if supported)
40
41
|RVMODEL_CLR_SSW_INT|Clears the Supervisor Software Interrupt (mip.SSIP = 0)
41
42
|RVMODEL_WRITE_GEIP(_R)|Write the value in _R to the Guext External Interrupt Pending (hgeip) register, if supported. This is used to test guest external interrupts. Only the bottom GEILEN bits are written.
42
43
|ACCESS_FAULT_ADDRESS|An address that causes an access fault when read or written. This is used to test exceptions.
43
44
|===
44
45
45
-
*** way to send success/fail code when terminating sim
46
-
*** is STIMER_INT_SOON necessary?
46
+
*** give a parameter defining delay for RVMODEL_SET_MTIMER_INT_SOON
47
47
48
-
The macros are defined in ***. *** shows sample implementations of these macros compatible with Spike.
48
+
The macros are defined in model_test.h. sail_test.h shows sample implementations of these macros compatible with Sail and Spike***.
Copy file name to clipboardExpand all lines: ctp/src/v.adoc
+1-2Lines changed: 1 addition & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -179,8 +179,7 @@ As with other unprivileged testplans, an x in the spreadsheet indicates to use t
179
179
* ls_e{8/16/32/64}: load/store edges with EEW=8,...,64. Used to convert strided loads from elements to bytes.
180
180
* ls: load/store edges instead of integer edges: vs2={0, random < 2*VLMAX}. rs2= {1, 2, -1, -2, 0}
181
181
* f: floating-point edges instead of integer edges: ***
182
-
183
-
*** discuss special cases
182
+
* cp_custom_*: custom coverpoint defined in the coverage file. See definitions for https://docs.google.com/spreadsheets/d/11VGlIA__UYr7H47ZNqXtyYnGH5Fb41E8P9h53rN72ok/edit?gid=389766666#gid=389766666[CustomVx], https://docs.google.com/spreadsheets/d/11VGlIA__UYr7H47ZNqXtyYnGH5Fb41E8P9h53rN72ok/edit?gid=704208158#gid=704208158[CustomVf], https://docs.google.com/spreadsheets/d/11VGlIA__UYr7H47ZNqXtyYnGH5Fb41E8P9h53rN72ok/edit?gid=704208158#gid=704208158[CustomVls].
184
183
185
184
The coverpoints for each vector instruction are given in the following sections.
0 commit comments