Contributors to all versions of the spec in alphabetical order
-
Allen Baum
-
Jordan Carlin
-
James Kaden Cassidy
-
David Harris
-
Georgia Tai
-
Mike Thompson
This document is released under a Creative Commons Attribution 4.0 International License.
This Certification Test Plan (CTP) is a work in progress. It describes the coverpoints and tests being developed by the RISC-V Certification Steering Committee. It is intended to be read in conjunction with the Certification Requirements Documents (CRDs) defining the features in each certificate, and the riscv-arch-test repository that contains information about how to use and contribute to the tests.
1. Introduction
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. This CTP will also include coverpoints and tests for features that are not part of a certified profile.
1.1. Certificates and Certification
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.
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.
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.
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.
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.
An implementation that passes certification tests is said to be certified for the relevant certificate. The process of certification is described in TODO CSC page.
1.2. Normative Rules, Coverpoints, and Tests
Normative rules 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. However, normative rules are human-readable portions of a specification and cannot be checked in an automated manner.
Instead, certification relies on coverpoints, which are machine-readable descriptions of the features to be tested. Every normative rule is tied to one or more coverpoints, such that if the coverpoints are hit, the normative rule is considered to be certified.
Each coverpoint has a set of tests that exercise it, and each test has a set of coverpoints that it hits.
This test plan defines the normative rules that must be hit for each profile, specifies the coverpoints that measure those rules, and outlines the tests that hit those coverpoints. The tests are self-checking, and report pass/fail results. The coverage report confirms that the tests hit all the coverpoints and thus all the normative rules.
Coverpoints are written in SystemVerilog, and are designed to be used with the Extended RISC-V Verification Interface (RVVI). They are written to be independent of the DUT (Device Under Test), so that they can be used with any RISC-V implementation. [1] Functional coverage is collected using SystemVerilog infrastructure adapted from riscvISACOV [2].
Coverpoints are organized into .svh SystemVerilog coverage files, each of which contain one or more covergroups, each of which contain one or more coverpoints. Coverage files apply to a DUT with a particular set of extensions. For example, the I_coverage.svh coverage file is used for any 32 or 64-bit DUT that supports the I extension. The ZicsrF_coverage.svh coverage file applies to a DUT that supports both the Zicsr and F extensions. Some covergroups in a coverage file apply only when another extension is also supported; for example, the half-double conversion covergroups in Zfh_coverage.svh are compiled only when D is supported.
Tests are written in assembly language .S files. Tests are organized into directories for each extension, and into a privileged directory. The coverpoints are hit by running all of the applicable tests in a directory. For example, RV32I coverage involves running add.S, addi.S, sub.S, etc. RV64I coverage also involves running addw.S, which is unique to RV64.
1.3. Glossary
The following terms are used in this test plan:
-
Extensions: named and ratified RISC-V extensions, such as RV32I, M, Zbb, Zicsr, or Svadu. Many extensions define instructions or CSRs, but some only define parameters (e.g. Sstvecd requires that STVEC_MODES includes 0).
-
Parameters: options describing the behavior of extensions. All parameters will be named by the Parameters Working Group (started February 2026) and will appear in UDB. For example, the PMP_GRANULARITY parameter defines the minimum size of a PMP region.
-
Configuration: A set of extensions and parameters partially or fully describing the behavior of a RISC-V hart. A full configuration is sufficient for a reference model to exactly match the behavior of a DUT except with regard to non-deterministic behaviors. Configurations are described in machine-readable YAML format that are read by UDB and used to generate configuration files for various tools.
-
Constrained Non-Deterministic Behaviors: behaviors that cannot be predicted based on either architectural configuration or defined parameters, but whose result are constrained to be a small number of possible values. The example of a tail-agnostic vector instruction is one of those, where the number of legal results is limited to just two: either the previous value, or all ones. Either behavior is correct, and the hart might change behaviors from one instruction to the next, so the DUT and reference model cannot be guaranteed to exactly match. Self-checking tests must accept all legal outcomes for non-deterministic behaviors.
-
Unconstrained Non-Deterministic Behaviors: behaviors that cannot be predicted based on either architectural configuration or defined parameters, and whose result is not constrained to a small number of possible values. For example, the value of an integer register after reset is an unconstrained non-deterministic behavior. Tests must not make any assumptions about the value of such behaviors, and must not check them against the reference model.
-
Profile: A named collection of required and optional extensions, such as RVI20 or RVA23S64. Profiles may be ratified by RISC-V or developed by the Certification Steering Committee to meet certification market needs, such as a simple microcontroller. A profile is a partial configuration. The test plan must allow the DUT configuration to indicate which optional extensions and other parameters are used, and fully test all optional profile extensions provided by the DUT.
-
UDB: Unified Database, a standardized way to describe the configuration and generate config files for various tools from a single point of truth.
-
Normative rule: Description of a single certifiable feature, preferably a direct quotation from a ratified specification.
-
Coverage files: a SystemVerilog .svh file containing all of the covergroups for an extension or combination of extensions, such as I_coverage.svh or ZfaD_coverage.svh.
-
Covergroup: A SystemVerilog construct that contains one or more coverpoints. Covergroups are used to collect functional coverage of a particular feature or set of features in the RISC-V architecture. For example, the I_coverage.svh file contains a covergroup for each instruction in the I extension, such as add, addi, sub, etc. The InterruptsSm_coverage.svh contains a single InterruptsSm_cg covergroup with all the coverpoints for machine-mode interrupts.
-
Coverpoint: A SystemVerilog construct describing a set of conditions to test. For example, the cp_rd coverpoint checks that all 32 destination registers x0-x31 are exercised by instructions that don’t trap. Each coverpoint has one or more bins; for example, cp_rd has 32 bins for the different registers.
-
Bin: One target value for a coverpoint. Each bin may be covered or not by a test suite.
-
Test files: A file containing one or more tests, typically written in assembly language. For example, rv32/I/add.S contains all of the RV32 tests to exercise the add_cg covergroup in I_coverage.svh.
-
Test: A snippet of code, typically a sequence of assembly language instructions, that exercises at least one bin of a coverpoint.
-
Test Suite: A collection of coverage and test files to test a particular extension, combination of extensions, or group of extensions. For example, the RV32I test suite contains the I_coverage.svh coverage file and the rv32/I/add.S, addi.S, sub.S, and other tests files with tests that hit the coverpoints in that coverage file. The RV64Zfa test suite contains the Zfa_coverage.svh coverage file and the rv64/Zfa/fround.s.S, fround.d.S, and other tests files with tests that hit the coverpoints in that coverage file. The RVA23S64 test suite contains all of the required and selected optional test suites for the profile, including RV64I, RV64Zfa, ExceptionsS, etc.
-
RVMODEL DUT-Specific Macros: A set of macros that perform semihosting/trick box functions such as booting the DUT, sending interrupts, and logging results. The macros are defined in RVMODEL DUT-Specific Macros.
|
Beware that Test Suite is also used outside this document to mean a full set of tests for a given profile from a given provider. For example, Synopsys, Breker, and riscv-arch-test all have test suites for the RVI20U32 profile. |
2. Certification Process
Certifying a RISC-V Device-Under-Test (DUT) involves the following steps:
-
Selecting a profile for the DUT
-
Providing a Unified Database (UDB) configuration for the DUT, such as optional extensions, peripheral addresses, and PMP granularity
-
Generating self-checking tests based on the selected profile and UDB
-
Running the tests and reporting pass/fail
Test developers also need to
-
Generate a coverage report confirming that the tests hit all the coverpoints based on a trace from the RISC-V Sail model
TODO: Update to point to CSC page when ready.
3. Profiles & Test Suites
This test plan contains test suites for all of the mandatory and optional extensions in the RVA23 and earlier profiles, and for various other extensions. Some of these profiles, ratified and unratified, are listed below:
-
RVI20 Profile (Ratified)
-
RV{32/64}IMAFDC_Zifencei_Zicntr_Zihpm with no Sm machine mode, no PMP. Zicsr instructions only access counters and floating-point CSRs. Optional support for misaligned loads/stores (MISALIGNED_LDST parameter).
-
-
MC100 Microcontroller Profile
-
RV{32/64}IMZca_Zifencei_Zicsr_Zicntr with machine mode 1.11, counters, exceptions, interrupts, PMP16
-
-
RVA22S64 Profile (Ratified)
-
Application processor without vector, hypervisor, and other newer extensions
-
-
RVB23S64 Profile (Ratified)
-
RVA23 less vector and hypervisor
-
-
RVA23 Profile (RVA23 CRD)
Where a CRD is available, it lists the mandatory and optional extensions and IN/OUT-OF_SCOPE parameters.
This test plan makes some further assumptions, which should be checked against the CRDs when they become available:
-
All certificates for profiles that support interrupts require that the platform be able to set and clear via software all implemented interrupt pending bits
-
Although the RVI20 profile states that ecall causes a trap to the execution environment, it also says that Zicsr instructions are not supported independent of the Zicntr or F instructions, so there is no way to control mtvec and write a trap handler. Therefore ecall is not exercised.
-
Atomics and fences are much more interesting in a multi-core / multi-master environment. The base test plan just checks that they execute on a single core.
3.1. Profile Coverage Matrix
Table 1 summarizes the coverage files applicable to each profile. x indicates a mandatory extension, and o indicates an optional extension. The certification test plan handles all mandatory and optional extensions.
Coverage files with multiple extensions in the name apply when all the extensions are supported; for example, ZicsrF is used in a system supporting the Zicsr and F extensions.
All privileged suites require at least version 1.12 of the privileged specification. Features specific to version 1.13 are tested separately in the Sm1p13 and Ss1p13 suites.
| Coverage File | Description | Test Plan | RVI20 | MC100 | RVA22S64 | RVB23S64 | RVA23S64 |
|---|---|---|---|---|---|---|---|
XLEN |
32/64 |
32 |
64 |
64 |
64 |
||
Unprivileged |
|||||||
I |
Integer |
x |
x |
x |
x |
x |
|
M |
Mult/Div |
o |
x |
x |
x |
x |
|
Zmmul |
Mult Only |
||||||
Zaamo |
Atomic Memory Ops |
o |
x |
x |
x |
||
Zalrsc |
Load Reserved / Store Cond |
o |
x |
x |
x |
||
Zca |
Compressed |
o |
x |
x |
x |
x |
|
Zcb |
Extra Compressed |
x |
x |
||||
Zcf |
Compressed Float |
o |
|||||
Zcd |
Compressed Double |
o |
x |
x |
x |
||
F |
Float |
o |
x |
x |
x |
||
D |
Double |
o |
x |
x |
x |
||
ZicsrF |
Float CSRs |
o |
x |
x |
x |
||
Zfh |
Half |
o |
o |
o |
|||
Zfhmin |
Half Converts |
x |
o |
x |
|||
Zfa |
Additional Float |
x |
x |
||||
Zba |
Address Generation |
x |
x |
x |
|||
Zbb |
Basic Bit Manipulation |
x |
x |
x |
|||
Zbc |
Carryless Multiplication |
o |
o |
o |
|||
Zbs |
Single-Bit |
x |
x |
x |
|||
Zbkb |
Bit Manip for Crypto |
o |
|||||
Zbkc |
Carryless Multiply for Crypto |
o |
|||||
Zbkx |
Permutations |
o |
|||||
Zknd |
AES Decryption |
o |
|||||
Zkne |
AES Encryption |
o |
|||||
Zknh |
SHA2 Hashing |
o |
|||||
Zksed |
SM4 Cipher |
o |
|||||
Zksh |
SM3 Hashing |
o |
|||||
Zicsr |
CSR Instructions |
x |
x |
x |
x |
||
Zicond |
Conditional Move |
x |
x |
||||
Zifencei |
Instruction Fence |
o |
x |
x |
x |
x |
|
Ziccif |
Main Memory Instruction Fetch |
x |
x |
x |
|||
Ziccrse |
Main Memory RsrvEventual |
x |
x |
x |
|||
Ziccamoa |
Main Memory AMOArithmetic |
x |
x |
x |
|||
Ziccamoc |
Main Memory AMOCASQ |
x |
x |
||||
Zicclsm |
Misaligned Loads / Stores |
o |
o |
x |
x |
x |
|
Zihintpause |
Pause Hint |
x |
x |
x |
|||
Zihintntl |
Nontemporal Locality Hint |
x |
x |
||||
Zicbom |
Cache Block Flush/Inval |
x |
x |
x |
|||
Zicboz |
Cache Block Zero |
x |
x |
x |
|||
Zicbop |
Cache Block Prefetch |
x |
x |
x |
|||
Za64rs |
Max 64B Reservation Sets |
x |
x |
x |
|||
Zic64b |
64B Cache Blocks |
x |
x |
x |
|||
Privileged |
|||||||
Sm |
Machine CSRs |
x |
x |
x |
x |
||
S |
Supervisor CSRs |
x |
x |
x |
|||
U |
User CSRs |
x |
x |
x |
|||
Zkr |
Entropy CSR |
o |
o |
o |
|||
Exceptions |
Exceptions |
x |
x |
x |
x |
||
InterruptsSm |
Machine Interrupts |
x |
x |
x |
x |
||
InterruptsS |
Supervisor Interrupts |
x |
x |
x |
|||
Sstc |
Supervisor Timer Compare |
x |
x |
x |
|||
Zihpm |
Hardware Performance Monitors |
o |
x |
x |
x |
x |
|
EndianSm |
Machine Endian |
||||||
EndianS |
Supervisor Endian |
||||||
EndianU |
User Endian |
||||||
EndianZaamo |
AMO Endian |
||||||
EndianZalrsc |
LR/SC Endian |
||||||
EndianF |
Float Endian |
||||||
EndianZca |
Compressed Endian |
||||||
PMP |
Physical Memory Protection |
||||||
Svbare |
No Virtual Memory |
x |
x |
x |
|||
Sv |
Sv32/39/48/57 Virtual Memory |
x |
x |
x |
|||
Svinval |
TLB Invalidation |
x |
x |
x |
|||
Svade |
Page Table A/D Exceptions |
x |
x |
x |
|||
Svadu |
Page Table Update |
o |
o |
||||
Svpbmt |
Page-based Memory Types |
x |
x |
x |
|||
Svnapot |
Naturally Aligned Pages |
o |
x |
x |
|||
Svvptc |
Valid PTEs Visible without Fence |
o |
o |
||||
Svukte |
User Kernel Translation Enable |
o |
o |
o |
|||
Sscofpmf |
Counter Filtering |
o |
x |
x |
|||
Ssstateen |
Supervisor State Enable |
o |
x |
||||
Ssu64xl |
64-bit UXL |
o |
x |
x |
|||
Sscounterenw |
Counter Enables Writable |
x |
x |
x |
|||
Sstvecd |
Direct Vector |
x |
x |
x |
|||
Sstvala |
stval Addresses |
x |
x |
x |
|||
Strict |
|||||||
Ssstrict |
Strict |
o |
o |
o |
|||
Vector |
|||||||
Vx8 |
Vector Integer 8-bit |
o |
o |
x |
|||
Vx16 |
Vector Integer 16-bit |
o |
o |
x |
|||
Vx32 |
Vector Integer 32-bit |
o |
o |
x |
|||
Vx64 |
Vector Integer 64-bit |
o |
o |
x |
|||
Vls8 |
Vector Load/Store 8-bit |
o |
o |
x |
|||
Vls16 |
Vector Load/Store 16-bit |
o |
o |
x |
|||
Vls32 |
Vector Load/Store 32-bit |
o |
o |
x |
|||
Vls64 |
Vector Load/Store 64-bit |
o |
o |
x |
|||
Vf8 (Zvfh) |
Vector Float conversions with 8-bit integers |
o |
o |
||||
Vf16 (Zvfh) |
Vector Float 16-bit |
o |
o |
||||
Vf32 |
Vector Float 32-bit |
o |
o |
x |
|||
Vf64 |
Vector Float 64-bit |
o |
o |
x |
|||
Zvfhmin |
Vector half conversions |
o |
o |
||||
Zvfbfmin |
Vector BF16 Convert |
o |
o |
||||
Zvfbfwma |
Vector BF16 MAC |
o |
o |
||||
Zvbb8 |
Vector Bit Manip 8-bit |
o |
x |
||||
Zvbb16 |
Vector Bit Manip 16-bit |
o |
x |
||||
Zvbb32 |
Vector Bit Manip 32-bit |
o |
x |
||||
Zvbb64 |
Vector Bit Manip 64-bit |
o |
x |
||||
Zvkb8 |
Vector Crypto Bit Manip 8-bit |
o |
o |
||||
Zvkb16 |
Vector Crypto Bit Manip 16-bit |
o |
o |
||||
Zvkb32 |
Vector Crypto Bit Manip 32-bit |
o |
o |
||||
Zvkb64 |
Vector Crypto Bit Manip 64-bit |
o |
o |
||||
Zvbc64 |
Vector Carryless Mult |
o |
o |
||||
Zvkg32 |
Vector GCM |
o |
o |
||||
Zvkned32 |
Vector Crypt |
o |
o |
||||
Zvknha32 |
Vector Hash 32-bit |
||||||
Zvknhb64 |
Vector Hash 64-bit |
o |
o |
||||
Zvksed32 |
Vector ShangMi Crypt |
o |
o |
||||
Zvksh32 |
Vector ShangMi Hash |
o |
o |
||||
Vector Privileged |
|||||||
ExceptionsVx |
Vector Integer Exceptions |
o |
o |
x |
|||
ExceptionsVf |
Vector Float Exceptions |
o |
o |
x |
|||
ExceptionsVls |
Vector Load/Store Exceptions |
o |
o |
x |
|||
MisalignV |
Vector Misalignment |
o |
o |
o |
|||
SsstrictV |
Vector Strict |
o |
o |
o |
|||
Hypervisor |
|||||||
H |
Hypervisor Instructions |
o |
o |
x |
|||
InterruptsH |
Hypervisor Interrupts |
o |
o |
x |
|||
EndianH |
Hypervisor Endian |
||||||
PMPH |
Hypervisor PMP |
o |
o |
x |
|||
Shcounterenw |
Counter Enables |
o |
o |
x |
|||
Shvsatpa |
VM Modes Supported |
o |
o |
x |
|||
Shgatpa |
VM x4 Modes Supported |
o |
o |
x |
|||
Shvstvecd |
Direct Vectoring |
o |
o |
x |
|||
Shvstvala |
vstval Addresses |
o |
o |
x |
|||
Shtvala |
htval Addresses |
o |
o |
x |
|||
Shlcofideleg |
Counter Overflow Delegation |
o |
o |
x |
|||
Miscellaneous RV{A/B}23 Extensions |
|||||||
Ss1p13 |
Supervisor 1p13 |
x |
x |
||||
Ssnpm |
Pointer Masking |
x |
x |
||||
Zacas |
Atomic Compare-And-Swap |
o |
o |
||||
Zabha |
Subword Atomics |
o |
o |
||||
Zama16b |
Main memory PMA supports misaligned atomics within 16-byte regions |
x |
|||||
Zicfilp |
Landing Pads |
o |
o |
||||
Zicfiss |
Shadow Stack |
o |
o |
||||
Zfbfmin |
BF16 Convert |
o |
o |
||||
Zimop |
Maybe-Ops |
x |
x |
||||
Zcmop |
Compressed Maybe-Ops |
x |
x |
||||
Zawrs |
Wait on Reservation Set |
x |
x |
||||
SdtrigSm |
Debug Triggers |
o |
o |
||||
Non-Profile Extensions |
|||||||
E |
Embedded 16 Regs |
||||||
Zfinx |
Float in Int Regs |
||||||
Zdinx |
Double in Int Regs |
||||||
Zhinx |
Half in Int Regs |
||||||
Zhinxmin |
Half Cvt in Int Regs |
||||||
Q |
Quad-Precision Float |
||||||
ZfhQ |
Half-Quad Converts |
||||||
ZfhminQ |
Half-Quad Converts |
||||||
ZfaQ |
Additional Quad |
||||||
ZfaZfhQ |
Additional Half-Quad Converts |
||||||
Zcmp |
Compressed Push/Pop |
none yet |
|||||
Zcmt |
Compressed Table Jumps |
none yet |
|||||
Zilsd |
Load/Store Double |
||||||
Zclsd |
Compressed Load/Store Double |
||||||
Smcsrind |
Machine Indirect CSRs |
||||||
Sscsrind |
Supervisor Indirect CSRs |
||||||
SscrindH |
Hypervisor Indirect CSR |
o |
o |
x |
|||
Smepmp |
Enhanced PMP |
||||||
Smrnmi |
Machine Resumable Interrupts |
||||||
Ssrnmi |
Supervisor Resumable Interrupts |
||||||
Sm1p13 |
Machine 1p13 |
x |
x |
||||
Smstateen |
Machine State Enable |
||||||
Smcntrpmf |
Cycle and Instret Mode Filtering |
||||||
Smcdeleg |
Counter Delegation |
||||||
Ssccfg |
Counter Delegation |
||||||
SscfgH |
Hypervisor Counter Delegation |
||||||
Smdbltrp |
Machine Double Trap |
||||||
Ssdbltrp |
Supervisor Double Trap |
||||||
SsdbltrpH |
Hypervisor Double Trap |
||||||
Smnpm |
Machine Pointer Masking |
||||||
Smmpm |
Pointer Masking |
||||||
SmnpmH |
Hypervisor Pointer Masking |
||||||
Smctr |
Control Transfer Records |
||||||
SmctrH |
Hypervisor Control Transfer Records |
||||||
Ssqosid |
Quality-of-Service ID |
||||||
Debug |
|||||||
DM |
Debug Module |
none yet |
|||||
DTM |
Debug Transport Module |
none yet |
|||||
Sdext |
Debug Mode |
none yet |
|||||
Advanced Interrupt Architecture |
|||||||
Smaia |
Machine Advanced Interrupts |
||||||
Ssaia |
Supervisor Advanced Interrupts |
||||||
IMSIC |
Incoming MSI Controller |
||||||
APLIC |
Advanced Platform-Level Interrupt Controller |
||||||
I/O Memory Management Unit |
|||||||
IOMMU |
I/O Memory Management Unit |
||||||
3.2. Out-of-Scope Extensions
Table 2 lists certain extensions whose behavior is presently outside the scope of certification. An x in the table means the extension is required for that profile. Some of these behaviors are not readily visible at the architectural level of observed program behavior, such as constant-time instructions. Measuring the latency of an instruction with a cycle counter is unreliable because instruction fetch, branch prediction, superscalar issue, and out-of-order execution make the count depend on where the instruction is and what surrounds it, not only on its operand data. PMA properties are implicitly tested by executing instructions that depend on the property, but not tested comprehensively across the entire memory map. Entropy generation requires statistical analysis beyond the present scope of certification. These extensions might be added to scope in the future.
| Coverage File | Description | RVI20 | uController | RVA22S64 | RVB23S64 | RVA23S64 |
|---|---|---|---|---|---|---|
Zkt |
Constant-time scalar crypto |
x |
x |
x |
||
Zvkt |
Constant-time vector crypto |
x |
x |
x |
Furthermore, the following features are not supported in this version of the certification test plan:
-
sfence.vma, sinval, and hypervisor fences are lightly tested because it is hard to prove they don’t work
-
Physical Memory Attributes (PMA): no standard representation yet; tests assume programs run in main memory with full capabilities. TODO: Add a mechanism to define memory region PMAs in UDB, and exercise each type of access (load/store/execute, misaligned, at start/middle/end/partially wrapping) to each region.
-
Testing privilege modes whose XLEN differs from MXLEN; low ROI
-
Testing extensions that have been disabled with
misafields; behavior is unspecified. -
Non-Maskable Interrupts (NMI) - no standard way to generate them yet
-
Reset behavior - no way for a program to reset itself
-
Delegation of MEI/MTI/MSI to S-mode - "most platforms will choose not to make these interrupts delegatable from M-mode to S-mode"
-
Multicore or multi-master systems; current tests only run on one core and atomics and memory consistency are only lightly tested. TODO: coming later.
-
Custom extensions
A hart with these features can still be certified if it meets all other requirements; these features are simply not tested.
4. General Test Plan Strategy
This CTP describes tests for all supported RISC-V profiles, but the tests run on a specific DUT. The DUT memory map is defined by a Linker Script. The DUT configuration is described with RISC-V Unified Database, and supplementary files such as simulator configuration files are (TODO) automatically generated from the UDB so there is a single configuration file to maintain. The UDB describes the supported extensions, and also has parameters defining optional behaviors of those extensions. If a behavior is UNSPECIFIED in the specification, it is not tested because there are no wrong answers. A common purpose of parameters is to define the behavior of WARL fields in CSRs.
4.1. Configuration
The DUT is described with a Unified Database (UDB) YAML file. This file lists:
-
all of the supported extensions
-
all of the parameters required to describe the behavior of the extensions
The DUT also needs to know how to boot the core, terminate a test with a success code, send a message to a console, and cause interrupts. These DUT-specific behaviors are defined by RVMODEL DUT-Specific Macros, which are an assembly-language library implementing an API using DUT-specific hardware.
4.2. Unified Database
Unified Database allows partially- and fully-configured descriptions. A profile is an example of a partially configured description because it has a mix of required and optional extensions, and does not specify parameter values for most of the extensions. A DUT needs to have a fully configured description including precisely which versions of which extensions are supported and what parameter values are implemented, so that a simulator can exactly match its behavior.
The certification framework requires a fully-configured UDB description of the DUT and RVMODEL macros for the DUT. It uses UDB to produce supplementary configuration files including:
-
JSON file configuring the RISC-V Sail reference model to match the DUT
-
Configuration files for other optional simulators, such as Spike, ImperasFPM
-
SystemVerilog coverage.svh file describing which coverage files and parameter values to use for coverage measurement
-
Optional DUT configuration files (CORE-V Wally Example) providing parameter values to configurable RTL
4.2.1. Configuration Parameters
The UDB parameters for each extension are defined in:
github.com/riscv/riscv-unified-db/tree/main/spec/std/isa/ext riscv.github.io/riscv-unified-db/index.html
-
The CSC Tests and Models working group developed the following list of configuration parameters. Need to check if they match the parameters in UDB extensions.
A partially-configured UDB description of each profile is given in:
4.3. Unspecified and Reserved Behaviors
Some RISC-V behaviors are UNSPECIFIED, which means an implementation can do anything. These behaviors are not tested because there is no wrong answer. Table 3 summarizes the normative rules regarding reserved behaviors.
Unimplemented opcodes (except in the custom space) and instructions accessing non-existent CSRs are reserved. The behavior of reserved instructions is UNSPECIFIED, so they should not be tested by most testplans. However, when the Ssstrict extension is enabled, reserved instructions raise an illegal instruction exception. This is tested by the Ssstrict_S test plan.
| Spec Section | Normative Rule |
|---|---|
Unpriv 1.7 |
The term UNSPECIFIED refers to a behavior or value that is intentionally unconstrained. |
Unpriv 2.2 |
For this purpose, we divide each RISC-V instruction-set encoding space (and related encoding spaces such as the CSRs) into three disjoint categories: standard, reserved, and custom. … Reserved encodings are currently not defined but are saved for future standard extensions; once thus used, they become standard encodings. … The behavior upon decoding a reserved instruction is UNSPECIFIED. |
Privileged 2.1 |
Instructions that access a non-existent CSR are reserved. |
Ssstrict No non-conforming extensions are present. Attempts to execute unimplemented opcodes or access unimplemented CSRs in the standard or reserved encoding spaces raises an illegal instruction exception that results in a contained trap to the supervisor-mode trap handler. |
TODO: Generate this table from norm rules via YAML when Ssstrict is tagged. Expand on definition of Ssstrict in light of github.com/riscv/riscv-isa-manual/issues/3258.
4.4. CSR Bitfields
CSR fields can be Write Preserves, Read Ignores (WPRI), Write Legal, Read Legal (WLRL), or Write Any, Read Legal (WARL). Examples of WPRI fields include undefined fields of xstatus, xenvcfg, mseccfg, and xstateen* that could have unintended side effects if they are subsequently defined and unwittingly set to nonzero values. Examples of WLRL fields include xcause.ExceptionCode and hstatus.VGEIN. Other CSR fields are generally WARL.
WPRI fields should be read-only zero if not furnished by the implementation, but are not tested because the test suite may be unaware of subsequently ratified extensions that furnish them. WLRL fields are tested with legal values but no illegal values. Similarly, WARL fields are tested with legal values. The legalization of illegal values is implementation-specific and can be difficult to convey to a reference model for multibit fields, so WARL fields are not tested with illegal values unless it is easy to determine their legality (e.g. 1-bit fields). Reserved values are never tested in CSRs because the behavior is implementation-defined.
Instructions and CSRs in the custom encoding space are never tested because the behavior is implementation-defined.
Table 4 summarizes the normative rules regarding CSR bitfields.
| Spec Section | Normative Rule |
|---|---|
Privileged 2.3 |
Some whole read/write fields are reserved for future use. Software should ignore the values read from these fields, and should preserve the values held in these fields when writing values to other fields of the same register. For forward compatibility, implementations that do not furnish these fields must make them read-only zero. These fields are labeled WPRI in the register descriptions. |
Privileged 2.3 |
Some read/write CSR fields specify behavior for only a subset of possible bit encodings, with other bit encodings reserved. Software should not write anything other than legal values to such a field, and should not assume a read will return a legal value unless the last write was of a legal value, or the register has not been written since another operation (e.g., reset) set the register to a legal value. These fields are labeled WLRL in the register descriptions. |
Privileged 2.3 |
Implementations are permitted but not required to raise an illegal-instruction exception if an instruction attempts to write a non-supported value to a WLRL field. Implementations can return arbitrary bit patterns on the read of a WLRL field when the last write was of an illegal value, but the value returned should deterministically depend on the illegal written value and the value of the field prior to the write. |
Privileged 2.3 |
Some read/write CSR fields are only defined for a subset of bit encodings, but allow any value to be written while guaranteeing to return a legal value whenever read. Assuming that writing the CSR has no other side effects, the range of supported values can be determined by attempting to write a desired setting then reading to see if the value was retained. These fields are labeled WARL in the register descriptions. |
Privileged 2.3 |
Implementations will not raise an exception on writes of unsupported values to a WARL field. Implementations can return any legal value on the read of a WARL field when the last write was of an illegal value, but the legal value returned should deterministically depend on the illegal written value and the architectural state of the hart. |
TODO: replace with references to normative rules tagged in spec.
4.5. Normative Rules
The testplan for each extension contains a list of normative rules applicable to that extension. Normative rules are generally direct quotations from a ratified RISC-V specification describing a single certifiable feature. Normative rules specify the behaviors an implementation must meet in order to be compliant with the standard. In particular, introductory overview and non-normative explanatory text is not quoted as a normative rule.
See tagging_normative_rules for more information about normative rules and IDs and how to tag them in the specification.
4.6. Coverpoints
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 UDB_MXLEN_32 or UDB_MXLEN_64 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.
Not all normative rules have coverpoints and tests. A normative rule that a behavior is UNSPECIFIED is not tested because there is no wrong answer. For example, writing satp.MODE = Bare with nonzero values in other fields has unspecified behavior and is untested. The CTP may declare that other normative rules are too difficult to test relative to their value (low return on investment) and choose not to test them. For example, if the Zcf extension is supported, misa.C depends on whether misa.F is supported. misa.F is WARL and may be read-only one, so it is not always possible to test the misa.C dependence on misa.F = 0 and, for simplicity, this dependence might never be tested.
To the extent that there are any normative rules associated with instruction opcodes or CSR numbers, if these rules can be tested by coverpoints that execute the instruction or access the CSR, then no other coverpoints are needed. For example, a normative rule that an add instruction has op = 0110011, funct3 = 000, and funct7 = 0000000 is tested by the ordinary coverpoints that exercise the add instruction.
4.7. Tests
Privileged tests are mostly generated by scripts. They preferably share a single .S file that can be compiled for either RV32 or RV64, again with ifdef directives to separate the two. Unprivileged tests are generated from a template using a Python script, and are divided into RV32 and RV64 directories because the random values differ with XLEN.
5. Test Suite Requirements
The test suites may be provided by multiple suppliers, but must meet a common set of requirements to interoperate transparently for the user:
-
All tests use a common set of DUT configuration files so the user only has to write them once:
-
<dut>.yamlfor the UDB configuration including supported extensions and parameter values -
rvmodel_macros.hfor the RVMODEL DUT-Specific Macros -
link.ldfor the linker script
-
-
All tests are self-checking
-
Able to run on simulators, RTL, and hardware
-
Expected values may be produced by the RISC-V Sail reference model or the test code itself, and must account for relevant parameters
-
Alternate reference model may be used for development until RISC-V Sail is sufficiently mature
-
-
Only test features whose behavior is specified for the given parameters (e.g. only test unimplemented instructions if Ssstrict is supported)
-
Calls
RVMODEL_BOOTfor DUT-specific boot code (can be empty or omitted) before starting the test -
Test begins in machine mode, if any privileged modes are implemented
-
Terminate with
RVMODEL_HALT_PASSorRVMODEL_HALT_FAILto indicate success -
Print meaningful information to localize a failure with
RVMODEL_IO_WRITE_STR, including:-
PC at failure point
-
Expected and actual values of mismatching registers
-
Name of coverpoint and bin that failed, if practical
-
-
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.
-
-
Tests are organized in a granular way so that each ISA feature can be tested independently of other features
-
All tests are written in assembly or C and work with the latest release of both GCC and Clang
-
The latest release is typically needed because new extensions are rapidly being added to these compilers
-
Certificates will be tied to specific compiler versions to ensure consistency
-
-
Qualifying each test includes running on the RISC-V Sail reference model, Spike, and Whisper for at least one choice of parameters
-
Exceptions can be made for specific tests when there are known bugs or unimplemented extensions
-
-
Tests are for certification, not verification
-
Every normative rule is addressed by at least one coverpoint, defined in the CTP
-
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
-
-
Every test is directed to a specific normative rule/coverpoint bin, not fuzzing in the hopes of randomly hitting a rule/coverpoint
-
Exception: Multicore memory ordering is necessarily nondeterministic
-
-
Tests emphasize RISC-V architectural behavior, not microarchitectural behavior such as complex pipeline hazards or timing
-
Runtime is important
-
Size is important
-
-
All tests have SystemVerilog coverpoints
-
Use standard syntax compatible with Questa, VCS and Xcelium (regression on at least Questa)
-
All coverpoints must use the RVVI interface
-
-
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
-
Hosted in the RISC-V architectural test repository under the stewardship of Architectural Certification Test (ACT) SIG
-
Repository contains tests for ratified and in-development features, not just features in certificates
-
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
-
-
Don’t let the perfect be the enemy of the good
-
If necessary to meet schedule, tests can be released addressing most of the normative rules and coverpoints for a feature, and improved over time
-
Initial test development prioritizes the common parameter choices (such as XLEN=MXLEN, Endian=Little), and other parameter choices can be added over time
-
All limitations must be documented in CTP
-
5.1. For discussion:
-
Testing of WARL, WLRL, WPRI fields, and the necessary parameters to define what fields should be tested and behaviors should be expected, in collaboration with the Parameters Working Group
-
Regression requirements, including multiple parameters
6. Abstraction Layer
The abstraction layer provides a set of macros that allow test programs and coverpoints to interact with the DUT in a platform-specific way. This allows the same test program and coverpoint source code to be used across different DUTs, with only the abstraction layer macros needing to be modified for each DUT. In particular, the abstraction layer includes
-
Boot macros to initialize state.
-
Trap handler
-
Supervisor Binary Interface (SBI) calls
-
RVMODEL DUT-specific macros (semihosting/trick box)
-
Memory map (linker script)
Fundamental design considerations are:
-
For unprivileged extensions, RISC-V tests cannot assume the existence of any privileged capabilities whatsoever unless a profile explicitly requires them. For example, RV32I tests should be able to run on a microcontroller that does not implement any CSRs, including
mtvec, and thus cannot have a trap handler. -
Even if machine-mode exists, the tests cannot assume the existence of a Standard Machine Mode, i.e. a machine mode that implements all of the features in the ISA specification. A DUT might implement a Custom Machine Mode, such as a minimal implementation for a specific application, or additional security features. In particular, the RVA23S64 profile of particular interest for certification does not require standard M-mode, only an execution environment that responds to certain things such as
ecall. -
Nevertheless, most users will implement standard M-mode on their DUT. Therefore, the abstraction layer should provide default implementations of boot macros, trap handler, and SBI calls that assume a standard M-mode, and users can override these implementations as needed for their DUT.
-
To reduce the risk of bugs from uninitialized state and the burden on test developers, the boot process places known values in all applicable GPRs and CSRs.
The boot sequence boots to the lowest available privilege mode sufficient to run the tests. Tests may define the BOOT_TO_MMODE or BOOT_TO_SMODE symbols to force booting to M-mode or S-mode, respectively, if the DUT supports those modes. If neither symbol is defined, the boot sequence boots to U-mode if supported, and M-mode (possibly custom) otherwise. Note that hypervisor tests should define BOOT_TO_SMODE to boot into S (effectively HS)-mode and then are responsible for setting up and switching to VS/VU mode if desired.
In the ACT framework, BOOT_TO_MMODE is defined when REQUIRED_EXTENSIONS contains Sm. BOOT_TO_SMODE is defined when REQUIRED_EXTENSIONS contains S. Otherwise, neither symbol is defined. Hence, privileged tests that specify Sm, S, or U will boot into these modes, respectively. Unprivileged tests run in U-mode if supported, and in M-mode (possibly custom) otherwise. Another consequence is that if the DUT defines STANDARD_SM_SUPPORTED, then the trap handler is enabled even for unprivileged tests, helping produce graceful error messages for illegal instructions. However, a simple core such as an RV32I microcontroller may not enable STANDARD_SM_SUPPORTED and will not set up a trap handler.
6.1. Controlling Parameters
Every DUT has S_SUPPORTED, U_SUPPORTED, and H_SUPPORTED parameters from the UDB that indicate which privilege modes are supported. All DUT UDB configs support Sm, but not necessarily standard M-mode (and possibly no CSRs at all). Therefore, the DUT’s rvmodel_macros.h defines STANDARD_SM_SUPPORTED when the DUT implements mandatory portions of the M-mode spec, and leaves it undefined otherwise.
A DUT with no CSRs at all, such as an RV32I microcontroller, still declares Sm in its UDB config, because UDB defines MXLEN only when Sm is implemented, but does not declare Zicsr. It leaves STANDARD_SM_SUPPORTED undefined, so the boot code and trap handler touch no CSRs, and sets include_priv_tests: False in its test_config.yaml, so the privileged tests that the Sm declaration would otherwise select are skipped. config/cores/picorv32/picorv32-rv32imc is an example.
6.2. Boot Sequence
The user is responsible for loading the test ELF onto the DUT and jumping to rvtest_entry_point. The user may optionally run some other firmware or custom boot loader that performs DUT-specific initialization before loading the test ELF.
The test ELF begins with the RVTEST_BEGIN macro, which defines rvtest_entry_point (at an address specified in the link.ld file), and jumps to rvmodel_boot.
rvmodel_boot in turn calls the RVMODEL_BOOT macro, which optionally contains DUT-specific boot code such as turning on a PLL or memory controller. This macro can be empty or undefined in the common case that no DUT-specific boot code is required or that the DUT-specific boot is performed earlier by a separate bootloader.
Next, rvmodel_boot calls RVMODEL_IO_INIT to perform any necessary I/O initialization, such as configuring baud rate and flow control in a UART. This macro can also be empty or undefined if no I/O initialization is needed.
Next, rvmodel_boot calls RVTEST_BOOT_TO_MMODE to set up the trap handlers and initialize M-mode CSRs. This macro first checks if RVMODEL_BOOT_TO_MMODE is defined. If undefined, it runs default boot code assuming standard M-mode. If defined, it runs the DUT-specific RVMODEL_BOOT_TO_MMODE that performs the same general steps for custom M-mode. The default boot code touches CSRs only when STANDARD_SM_SUPPORTED is defined, so a DUT with no M-mode CSRs, such as an RV32I DUT, leaves both STANDARD_SM_SUPPORTED and RVMODEL_BOOT_TO_MMODE undefined.
CSR initialization includes
-
mie/mip = 0 (disable all interrupts)
-
mideleg/medeleg = 0 (don’t delegate traps unless turned on during S-mode boot)
-
mstatus (SXLEN/UXLEN = MXLEN, SBE/UBE = MBE, other features off)
-
menvcfg (enable unpriv features if U supported)
-
mstateen0 (enable unpriv features if SMSTATEN_SUPPORTED)
-
mcountinhibit = 0 (if implemented)
-
mhpmenvent3…31/h = 0
-
mseccfg (disable features if supported)
-
mnstatus (disable resumable NMI fields if SMRNMI_SUPPORTED)
-
pmpaddr0/pmpcfg0 if PMP_ENTRIES > 0
-
turn off virtual memory and perform sfence.vma to synchronize MMU if SV32_SUPPORTED or SV39_SUPPORTED
Even if standard M-mode is not supported or RVMODEL_BOOT_TO_MMODE is defined, the boot code still attempts to turn on mstatus.FS/VS if float or vector is supported, because these are needed for unprivileged tests, even on a RV32I DUT that has no other M-mode features.
The boot process ends in M-mode if the BOOT_TO_MMODE symbol is defined in the test (for tests intended to run in machine mode), or if no lower privilege mode is supported.
If the test is continuing to boot to a lower privilege mode, it next checks if S_SUPPORTED and, if so, calls RVTEST_BOOT_TO_SMODE. This initializes S-mode CSRs, and adjusts M-mode CSRs such as trap delegation and environment configuration. It then enters S-mode. A DUT with a nonstandard M-mode replaces the reference T-SEE rather than this routine.
S-mode CSR initialization includes
-
medeleg = 0xFCB5FF (delegate all exceptions except for ecall from M and S mode, and double traps)
-
mideleg = 0x366 (delegate all user and supervisor-mode interrupts, including counter overflow)
-
sstateen0 (enable unprivileged features if SSSTATEEN)
-
scounteren = all 1s (enable counter access from lower priv modes)
-
senvcfg (enable unpriv features)
The boot process ends in S-mode if the BOOT_TO_SMODE symbol is defined in the test (for tests intended to run in supervisor mode).
If the test is not intended to run in S-mode, and U-mode is supported, rvmodel_boot calls RVTEST_BOOT_TO_UMODE, which switches to U-mode through T-SBI.
Finally, rvmodel_boot clears the trap counter and runs RVTEST_INIT_REGS, which initializes the integer, floating-point and vector registers, then sets up the signature pointer and checks a canary if applicable. It then jumps to rvtest_code_begin to start the test.
6.3. RVMODEL DUT-Specific Macros
Each DUT requires implementing a set of macros to perform the following non-ISA functions:
-
Run DUT-specific boot code
-
Terminate a test with a pass or fail indication
-
Send a character to a terminal
-
Deliver each supported type of interrupt to the core (Machine/Supervisor External/Timer/Software + guest external interrupts)
The macro names begin with RVMODEL, so they are called RVMODEL DUT-Specific Macros. Their functions are sometimes called semihosting or trick box.
The RVMODEL DUT-Specific Macros rely on the capabilities of the SoC and/or testbench. For example, a SoC with a 16550-compatible UART sends a character by writing a byte to the UART’s memory-mapped Transmit Holding Register. A SoC without a UART may have a testbench that monitors writes to a specific memory address and prints the byte written to that address.
6.3.1. Macros
The RVMODEL DUT-Specific Macros are given in Table 5. The "Can Be Empty?" field indicates circumstances under which the macro can be empty. The Mode column indicates the privilege mode from which the macro can be called. All macros can clobber a0, a1, and a2 if needed to make T-SBI calls.
| Macro | Description | Can be Empty? | Mode |
|---|---|---|---|
RVMODEL_BOOT |
Perform boot operations, such as turning on a phase-locked loop or DRAM controller or initializing custom state. Cannot clobber |
Empty or omitted if no boot operations are needed, or a separate DUT-specific executable is used for booting before loading and invoking the test ELF. |
Machine |
RVMODEL_BOOT_TO_MMODE |
Replaces the default M-mode boot in |
Omit for a standard M-mode, and for a DUT with no M-mode CSRs that leaves |
Machine |
RVMODEL_HALT_PASS |
Terminate test with a pass indication. When the test is run in simulation, this should end the simulation. |
No |
Any |
RVMODEL_HALT_FAIL |
Terminate test with a fail indication. When the test is run in simulation, this should end the simulation. |
No |
Any |
RVMODEL_IO_INIT(_R1, _R2, _R3) |
Initialization steps needed prior to writing to the console. _R1, _R2, and _R3 are temporary registers that may be trashed by the macro. |
Empty or omitted if no I/O initialization is needed. |
Machine |
RVMODEL_IO_WRITE_STR(_R1, _R2, _R3, _STR_PTR) |
Write a null-terminated ASCII string to the console, where _R1, _R2, and _R3 are temporary registers that may be trashed by the macro and _STR_PTR is a register containing the address of the first byte of the string. |
If the console is unavailable and the user implements an alternate way to signal success (such as test bench reporting or colored LEDs controlled by RVMODEL_HALT). However, a console is required for certification. |
Any |
RVMODEL_SET_MEXT_INT(_R1, _R2) |
Sets the Machine External Interrupt |
If machine external interrupts are not tested. |
Any |
RVMODEL_SET_MEXT_INT_M(_R1, _R2) |
Sets the Machine External Interrupt |
If machine external interrupts are not tested. |
Machine |
RVMODEL_CLR_MEXT_INT(_R1, _R2) |
Clears the Machine External Interrupt |
If machine external interrupts are not supported. |
Any |
RVMODEL_CLR_MEXT_INT_M(_R1, _R2) |
Clears the Machine External Interrupt |
If machine external interrupts are not tested. |
Machine |
RVMODEL_SET_MSW_INT(_R1, _R2) |
Sets the Machine Software Interrupt |
If RVMODEL_MSIP_ADDRESS is defined or machine software interrupts are not tested. |
Any |
RVMODEL_SET_MSW_INT_M(_R1, _R2) |
Sets the Machine Software Interrupt |
If RVMODEL_MSIP_ADDRESS is defined or machine software interrupts are not tested. |
Machine |
RVMODEL_CLR_MSW_INT(_R1, _R2) |
Clears the Machine Software Interrupt |
If RVMODEL_MSIP_ADDRESS is defined and accessible from lower privilege modes or if machine software interrupts are not tested. |
Any |
RVMODEL_CLR_MSW_INT_M(_R1, _R2) |
Clears the Machine Software Interrupt |
If RVMODEL_MSIP_ADDRESS is defined or machine software interrupts are not tested. |
Machine |
RVMODEL_SET_SEXT_INT(_R1, _R2) |
Sets the Supervisor External Interrupt |
If supervisor external interrupts are not supported. |
Any |
RVMODEL_SET_SEXT_INT_M(_R1, _R2) |
Sets the Supervisor External Interrupt |
If supervisor external interrupts are not supported. |
Machine |
RVMODEL_CLR_SEXT_INT(_R1, _R2) |
Clears the Supervisor External Interrupt |
If supervisor external interrupts are not supported. |
Any |
RVMODEL_CLR_SEXT_INT_M(_R1, _R2) |
Clears the Supervisor External Interrupt |
If supervisor external interrupts are not supported. |
Machine |
RVMODEL_SET_SSW_INT(_R1, _R2) |
Sets the Supervisor Software Interrupt |
If there is no platform-specific interrupt controller for SSI or no supervisor software interrupts. |
Any |
RVMODEL_SET_SSW_INT_M(_R1, _R2) |
Sets the Supervisor Software Interrupt |
If there is no platform-specific interrupt controller for SSI or no supervisor software interrupts. |
Machine |
RVMODEL_CLR_SSW_INT(_R1, _R2) |
Clears the Supervisor Software Interrupt |
If there is no platform-specific interrupt controller for SSI or no supervisor software interrupts. |
Any |
RVMODEL_CLR_SSW_INT_M(_R1, _R2) |
Clears the Supervisor Software Interrupt |
If there is no platform-specific interrupt controller for SSI or no supervisor software interrupts. |
Machine |
RVMODEL_SET_GUEST_EXT_INT(_GEI, _R1, _R2) |
Sets bit _GEI of |
If the hypervisor extension is not supported or GEILEN is 0. A platform that cannot raise guest external interrupts must declare GEILEN = 0. |
Any |
RVMODEL_SET_GUEST_EXT_INT_M(_GEI, _R1, _R2) |
Sets bit _GEI of |
If the hypervisor extension is not supported or GEILEN is 0. |
Machine |
RVMODEL_CLR_GUEST_EXT_INT(_GEI, _R1, _R2) |
Clears bit _GEI of |
Must be defined if RVMODEL_SET_GUEST_EXT_INT is. |
Any |
RVMODEL_CLR_GUEST_EXT_INT_M(_GEI, _R1, _R2) |
Clears bit _GEI of |
If the hypervisor extension is not supported or GEILEN is 0. |
Machine |
RVMODEL_HPM_COUNTER |
The index, 3 to 31, of the HPM counter used by the Sscofpmf tests. The tests derive the |
If Sscofpmf is not supported. |
n/a |
RVMODEL_MHPMEVENT_VAL |
The event selector written to bits 55:0 of the selected |
If Sscofpmf is not supported. |
n/a |
RVMODEL_MHPMEVENT_CODE(_R1, _R2) |
Code that makes the selected counter increment one or more times in the current privilege mode. The tests check that the counter moved, not by how much. _R1 holds the address of a writable scratch word; _R2 may be trashed. The code must not trap, and it must assemble to 4 bytes. |
If Sscofpmf is not supported. |
Any |
RVMODEL_ACCESS_FAULT_ADDRESS |
The base physical address of a region that causes a precise access fault when any part of the region is read, written or fetched. This is used to test exceptions. The faulting region must be at least 128 bytes; if vector fault-only-first loads are tested, it must be at least ceil(VLEN*LMUL/8) bytes (the vector coverpoints exercise up to 2*VLEN/8 bytes with LMUL=2). For typical implementations where address 0 is unmapped, the entire first page satisfies both requirements. It is the default value of each RVMODEL_ACCESS_FAULT_ADDRESS_<TYPE> macro below. See [access-fault-address]. |
Omit if the DUT does not generate access faults, or if it defines only some RVMODEL_ACCESS_FAULT_ADDRESS_<TYPE> macros. |
n/a |
RVMODEL_ACCESS_FAULT_ADDRESS_LOAD |
The base physical address of a region that gives a precise load access fault. Used for scalar, floating-point, compressed, hypervisor, and vector loads. The size requirements of RVMODEL_ACCESS_FAULT_ADDRESS apply. |
Defaults to RVMODEL_ACCESS_FAULT_ADDRESS. Omit, with RVMODEL_ACCESS_FAULT_ADDRESS, if the DUT cannot give precise load access faults. |
n/a |
RVMODEL_ACCESS_FAULT_ADDRESS_STORE |
The base physical address of a region that gives a precise store/AMO access fault for a store. Used for scalar, floating-point, compressed, hypervisor, and vector stores, and for cache-block operations. The size requirements of RVMODEL_ACCESS_FAULT_ADDRESS apply. |
Defaults to RVMODEL_ACCESS_FAULT_ADDRESS. Omit, with RVMODEL_ACCESS_FAULT_ADDRESS, if the DUT cannot give precise store access faults. |
n/a |
RVMODEL_ACCESS_FAULT_ADDRESS_FETCH |
The base physical address of a region that gives an instruction access fault when code is fetched from it. |
Defaults to RVMODEL_ACCESS_FAULT_ADDRESS. Omit, with RVMODEL_ACCESS_FAULT_ADDRESS, if the DUT cannot give precise instruction access faults. |
n/a |
RVMODEL_ACCESS_FAULT_ADDRESS_AMO |
The base physical address of a region that gives a precise store/AMO access fault for a Zaamo AMO. |
Defaults to RVMODEL_ACCESS_FAULT_ADDRESS. Omit, with RVMODEL_ACCESS_FAULT_ADDRESS, if the DUT cannot give precise AMO access faults. |
n/a |
RVMODEL_ACCESS_FAULT_ADDRESS_LRSC |
The base physical address of a region that gives a precise access fault for |
Defaults to RVMODEL_ACCESS_FAULT_ADDRESS. Omit, with RVMODEL_ACCESS_FAULT_ADDRESS, if the DUT cannot give precise LR/SC access faults. |
n/a |
RVMODEL_MSIP_ADDRESS |
The address of the memory-mapped |
Omit if machine software interrupts are not tested or require a platform-specific controller. |
n/a |
RVMODEL_MTIME_ADDRESS |
The address of the memory-mapped |
Omit only if machine timer interrupts are not implemented and Sstc, if implemented, has Zicntr to read |
n/a |
RVMODEL_MTIMECMP_ADDRESS |
The address of the memory-mapped |
Omit if machine timer interrupts are not implemented. |
n/a |
RVMODEL_INTERRUPT_LATENCY |
Expected latency (in cycles/NOPs) for interrupt trap processing. Ensures interrupt is received and can be processed before test continues. |
Can be 0 if interrupt controller adds no delay. Omit if the DUT has neither standard M-mode ( |
n/a |
RVMODEL_TIMER_INT_SOON_DELAY |
The delay (in timer ticks) before a timer interrupt fires when an interrupt is requested "soon". Used in logic such as |
If timer interrupts, |
n/a |
RVMODEL_DATA_SECTION |
DUT-specific data that will be placed in a .data section. Used for memory-mapped regions like |
Yes, if not needed by DUT. |
n/a |
RVMODEL_INVISIBLE_TRAP_HANDLER(_PC_REG, _INSTRUCTION_REG, _ACTION_REG, _DEST_REG, _VALUE_REG) |
Optionally emulates an illegal instruction in the M-mode invisible trap handler. |
Omit if the DUT has no invisible trap emulation. |
Machine |
RVMODEL_FENCEI |
The instruction that makes instruction fetch see code the framework has just stored (a relocated trap trampoline or code in a PMP region), used in place of |
Omit to use |
Any |
The RVMODEL_MTIME_ADDRESS, RVMODEL_MTIMECMP_ADDRESS and RVMODEL_TIMER_INT_SOON_DELAY macros are required when machine timer interrupts (MTI_INTR_IMPL) are implemented, because the tests arm mtimecmp relative to mtime. Similarly, the DUT or its test harness must provide the memory-mapped mtime and mtimecmp registers. Sstc timer interrupts are armed relative to the time CSR, so they need RVMODEL_MTIME_ADDRESS only when Zicntr is not implemented. The RVMODEL_SET_*INT and RVMODEL_CLR*_INT macros are only required for interrupts controlled in a platform-specific fashion. VS-level interrupts need no macros: the tests raise them through hvip.
|
|
The tests require precise access faults. The privileged specification permits imprecise reporting ( A DUT can throw access faults for some types of access and not for others. It can also throw them at different addresses for different types of access. For example, a core can fault on a fetch from a region but complete loads and stores there, or report store faults imprecisely through a bus error. Another core can give precise load and store faults but not have a region in which AMOs or LR/SC fault. Thus there is a separate Tests that put a page table in an access-fault region use the
To skip a type of access fault, do not define |
| If a macro needs machine mode privileges to perform its function but might be called from any mode, it must change privilege level. For example, if RVMODEL_IO_WRITE_STR needs machine mode to access a UART, it may call RVTEST_TSBI_GOTO_MMODE or use a T-SBI call to access UART memory. Printing (and halting) is done at the end of a test, so there is no need to return to the previous privilege mode. |
6.3.2. The M-Mode Dance
Because profiles such as RVA23 do not require portable M-mode, the test suites go through weird and wonderful gymnastics to avoid directly using M-mode for supervisor and user-level features. This is described further in the RVA23 Certification Requirement Document. Thus, tests are divided into machine and non-machine tests.
Machine test suites are usually but not always suffixed with Sm. They boot to M-mode and test M-mode features as defined in the privileged ISA manual. They can freely switch privilege modes within tests, such as to check traps from a lower privilege mode into M-mode. Examples include Sm, InterruptsSm, Exceptions_Sm, PMP, and Smstateen. Machine test suites are not part of the certification tests for RVA23 or other profiles that do not require M-mode.
Non-machine tests boot to S or U mode. They only access M-mode features via the T-SBI. They can switch privilege modes within tests, but never enter M-mode except via T-SBI calls that manipulate state and return to the calling mode. They expect all other traps to be delegated to supervisor level (or below) if supervisor exists.
All unprivileged tests are non-machine tests and run in the lowest available privilege mode (U if supported, otherwise M). These tests do not intentionally cause traps, though they do have the trap handler available to catch unexpected traps. Their behavior should be independent of the privilege mode. Examples include F, Zba, and Vx16.
All tests required for RVA23 certification are non-machine tests that require S-mode support.
Therefore, when booting to a non-M privilege mode, the boot code attempts to delegate all traps (aside from ecall from S/M modes, which are needed for the T-SBI; double trap, which is an undelegable M-mode feature; and machine-mode interrupts MEI/MTI/MSI, which are not part of a supervisor-level profile). Also, invisible traps must go to M-mode, be checked, and be relayed to lower-mode if not handled at M-mode, as described in the next section. The medeleg and mideleg CSRs may have read-only 0 bits that prevent such delegation. Therefore, on a system supporting S-mode, the M-mode trap handler performs the following functions even for non-machine tests:
-
Check if the trap is a T-SBI call and if so, perform the requested T-SBI function and return from the
ecall. -
Call custom firmware, if any exists, to handle invisible traps, as described in the next section.
-
Otherwise, delegate the trap to the S-mode handler via software. This involves setting up
sstatus,sepc,scause, andstvalwith values coming from the machine-mode trap CSRs, settingsstatus.SPP,SIE, andSPIEappropriately, and returning to the S-mode trap handler atstvec(possibly vectored). Traps from VS or VU must also sethtval,htinst, and relevanthstatusbits. A trap from VS or VU thathedelegalso delegates goes on to the VS-mode handler instead, throughvsstatus,vsepc,vscause,vstval, andvstvec.
The rvtest_setup.S and rvtest_trap_handler.S files implement the boot code, T-SBI, and machine-mode trap handler using standard M-mode capabilities. In theory, a DUT that does not implement standard M-mode might have to reimplement some or all of this code. In practice, we have not yet encountered any DUT that cannot use this standard M-mode code.
6.3.3. Invisible Trap Emulation
A DUT can use an invisible trap to emulate an instruction that is not implemented in hardware or has a known bug.
When invisible traps are enabled, all illegal-instruction exceptions are first sent to M-mode for possible
emulation before being forwarded to the normal trap handler. Invisible traps are enabled when RVMODEL_INVISIBLE_TRAP_HANDLER is defined or UDB_TIME_CSR_IMPLEMENTED is false. In the latter case, the framework emulates the time and timeh CSRs using mtime, adding htimedelta in VS and VU and applying the mcounteren, hcounteren, and scounteren checks.
Custom invisible traps implemented using the RVMODEL_INVISIBLE_TRAP_HANDLER macro must follow the conventions described below.
RVMODEL_INVISIBLE_TRAP_HANDLER gets five inputs:
-
_PC_REG: A register containing the trapping PC. Read-only. -
_INSTRUCTION_REG: A register containing the trapping instruction. Read-only. -
_ACTION_REG: The action to be taken by the trap handler. -
_DEST_REG: The destination GPR number for action 2. -
_VALUE_REG: The value to write for action 2.
The supported return codes in the _ACTION_REG are:
-
0: The macro did not handle the instruction. Continue with the normal trap handling._ACTION_REGis preset to 0 beforeRVMODEL_INVISIBLE_TRAP_HANDLER. -
1: The macro handled the instruction and wrote all required architectural state. Resume after the instruction. -
2: The macro handled the instruction and needs to write a GPR result. Write_VALUE_REGto the GPR whose number is in_DEST_REG, then resume after the instruction. -
3: The instruction raises a virtual-instruction exception, which is taken in HS-mode ifmedelegdelegates it and in M-mode otherwise. Valid only when H is supported. -
Any other code is invalid and the test will produce an error.
Action 2 must be used to write GPR results because a direct write to a saved GPR would be lost when the trap handler restores that register upon exiting. Floating-point and vector registers are not restored, so they can be directly written without using action 2.
The following example emulates a read of custom CSR 0xBC0 and returns 42.
It accepts CSRRS, CSRRC, CSRRSI, or CSRRCI only when rs1 or uimm is zero.
The mask ignores the rd field and CSR function bit 12.
#define RVMODEL_INVISIBLE_TRAP_HANDLER(_PC_REG, _INSTRUCTION_REG, _ACTION_REG, _DEST_REG, _VALUE_REG) \
li _VALUE_REG, INSN_FIELD_CSR | INSN_FIELD_RS1 | INSN_FIELD_OPCODE | (2 << 12); \
and _DEST_REG, _INSTRUCTION_REG, _VALUE_REG; \
li _VALUE_REG, (0xBC0 << 20) | (2 << 12) | 0x73; \
bne _DEST_REG, _VALUE_REG, 1f; \
li _VALUE_REG, 42; \
srli _DEST_REG, _INSTRUCTION_REG, 7; \
andi _DEST_REG, _DEST_REG, 0x1F; \
li _ACTION_REG, 2; \
1:
The built-in RVTEST_INVISIBLE_TIME_HANDLER macro in tests/env/rvtest_invisible_trap_handler.h uses the same interface and is a larger example.
It checks the CSR instruction and counter permissions, reads RVMODEL_MTIME_ADDRESS, and returns the value with action 2.
6.3.4. RVMODEL_BOOT Requirements
The RVMODEL_BOOT macro may be empty for a simple DUT.
For a complex SoC, the macro may need to perform initialization steps such as turning on a phase-locked loop or DRAM controller or initializing custom state. It must not clobber x1/ra, but any other registers may be trashed.
At the end of RVMODEL_BOOT, the system should be in standard machine mode, with XLEN and endianness for each lower privilege mode set to the same value as in machine mode (MXLEN = SXLEN = UXLEN = HSXLEN = VSXLEN and MBE = SBE = UBE = VSBE).
Alternatively, the DUT might run a separate proprietary bootloader executable file that initializes the system, then loads the test ELF and jumps to rvtest_entry_point. Or the DUT could modify link.ld to link proprietary bootloader code into the test ELF and jump to rvtest_entry_point. In these cases, RVMODEL_BOOT can be empty.
6.3.5. RVMODEL Macros for Spike and SAIL
RVMODEL macros for Spike are implemented in spike-rv64-max/rvmodel_macros.h. They use HTIF for termination, and write to a virtual UART at address 0x1000_0000 to print characters. TODO: Interrupts
RVMODEL macros for the RISC-V Sail model are implemented in tests/env/sail_test.h. They are similar to Spike but use HTIF for printing. TODO: interrupts
6.3.6. Host Target Interface
The host target interface (HTIF) is an unofficial semihosting method that has become widely used by RISC-V simulators (Spike, QEMU, RISC-V Sail) and test benches. If your SystemVerilog testbench supports it, you can share the same HTIF code as Spike and RISC-V Sail for the RVMODEL_HALT_PASS, RVMODEL_HALT_FAIL, and RVMODEL_IO_WRITE_STR DUT-specific macros. A drawback is that your testbench needs to parse the ELF labels to find the address of the tohost symbol, which is used for HTIF communication. If your testbench does not support HTIF, you can implement the RVMODEL macros using other methods, such as memory-mapped I/O to a SoC peripheral or an address monitored by the testbench.
For example, the testbench might implement the [unofficial HTIF semihosting specification] and print the character A by writing the doubleword 0x01010000_00000041 to a label called tohost in the .data section of the test program. The most significant byte is the device (console), the next byte is the command (write), and the least significant 4 bytes are the data (the ASCII code for A). Terminating with a failure code is done by writing the doubleword 0x00000000_00000003 to tohost, and terminating with a success code is done by writing the doubleword 0x00000000_00000001 to tohost.
Note that writing the upper word of the doubleword to tohost with sd is only properly defined for RV64. Therefore, RV32 can use HTIF to terminate with a success or failure code but not necessarily to write to the console.
6.3.7. RVMODEL Macros for Other DUTs
If you have a simple DUT designed to match the behavior of RISC-V Sail and Spike, you may be able to implement the RVMODEL macros with the same code used by RISC-V Sail. Your RVMODEL_BOOT macro can be empty. The interrupt macros for unsupported privilege modes can be empty.
If you have a complex DUT, you presumably have a team of sophisticated verification engineers who can adapt the example macros to your DUT’s requirements.
6.4. Linker Script
Each DUT needs a linker script tailored to its memory map. The linker script in config/<core>/<version>/link.ld defines where to place the code and data regions in the DUT’s memory map. It must contain .text.init, .text.rvtest, .data, and .text.rvmodel sections (in that order), and an ENTRY point named rvtest_entry_point. The first line of the list of SECTIONS in the linker script sets the starting address of the ELF (. = 0x…) and is the only part of the sample linker script that most users will need to change. Set it to your reset address for simple DUTs. Users with special needs can customize the linker script to start at their own boot code (leaving the RVMODEL_BOOT macro blank) and then jump to rvtest_entry_point.
The .text.rvmodel section contains DUT-specific (RVMODEL) code and must be placed after the .data section. This ensures that variable-size model-specific macro expansions (which may differ between the DUT build and the reference-model build) do not affect the addresses of test data symbols such as scratch and begin_signature, preventing signature mismatches.
On harts that support virtual memory, the test image must be placed where the virtual memory tests leave it mapped. 0x8000_0000, used by the sample configurations, works for both RV32 and RV64. The boot code identity-maps the superpage that contains the test data (a 4 MiB megapage on RV32, a 1 GiB gigapage on RV64), so the whole image must fit inside one aligned superpage. The tests also map fixed virtual addresses, such as 0, all ones, and aliases of the code and data. If one of these falls in the same superpage as the image, the test overwrites the image’s identity mapping and hangs. On RV64, the image must also lie in the Sv39 address space, below 2^38 (256 GiB), even on harts that support Sv48 or Sv57, because the Sv39 tests run on those harts too. The safe ranges are:
-
RV32: 0x0140_0000–0x03FF_FFFF, 0x0440_0000–0x2FFF_FFFF, 0x3040_0000–0x8FFF_FFFF and 0x90C0_0000–0xFFBF_FFFF.
-
RV64: 0x4000_0000–0xBFFF_FFFF (1–3 GiB) and 0x2_0000_0000–0x3F_FFFF_FFFF (8–256 GiB).
For some systems, this may involve configuring a non-default physical address and size for main memory.
6.5. File Organization
Standard macros are defined in tests/env. DUT-specific macros are defined in rvmodel_macros.h, which is in a DUT-specific config directory (e.g. config/<dut>/<version>/rvmodel_macros.h for predefined simulators, or out-of-tree for custom DUTs).
Standard framework macros begin with RVTEST. They include rvtest_setup.h for boot macros and rvtest_trap_handler.h for standard trap handlers, and rvtest_failure_code.h for error reporting. Other macros are defined in ***util.h, … describe further
DUT-specific macros begin with RVMODEL. Some RVTEST macros check if corresponding RVMODEL macros are defined and invoke the RVMODEL macro instead for DUTs with custom M-mode, when defined.
6.6. Test Supervisor Binary Interface (T-SBI)
The test must implement a custom Test Supervisor Binary Interface (T-SBI) providing an abstraction layer to facilitate S and U-mode tests requesting services from a possibly custom M-mode. These services include testing ECALL to the execution environment and accessing CSRs.
The ratified SBI compiles into a ~1MB OpenSBI firmware binary, which is unnecessarily large to load with every test. Moreover, the SBI calling convention uses a7 and a6, which are not available on RV32E. Therefore, T-SBI is a lighter-weight implementation with a custom calling convention that is incompatible with the ratified SBI.
The SBI is invoked with the ecall instruction. The operation is passed in a0. An additional argument could be passed in a1 (and possibly a2) and a result could be returned in a0 if needed. Other values of a0 are reserved.
| Function Name | Operation(a0) |
Description |
|---|---|---|
TSBI_ECALL_TEST |
0x00000073 |
Test |
TSBI_CSR_SET |
0x<CSR>5a073 |
Performs the functionality of a CSRS instruction specified by the opcode. |
TSBI_CSR_CLEAR |
0x<CSR>5b073 |
Performs CSRC instruction specified by the opcode. |
TSBI_CSR_WRITE |
0x<CSR>59073 |
Performs CSRW instruction specified by the opcode. |
TSBI_CSR_READ |
0x<CSR>02573 |
Performs CSRR instruction specified by the opcode. Returns result in |
TSBI_LW |
0x0005a503 |
LW a0, 0(a1) - Load word from physical address in |
TSBI_LWP4 |
0x0045a503 |
LW a0, 4(a1) - Load word from physical address in |
TSBI_LD |
0x0005b503 |
LD a0, 0(a1) - Load doubleword from physical address in |
TSBI_SW |
0x00c5a023 |
SW a2, 0(a1) - Store word to physical address in |
TSBI_SWP4 |
0x00c5a223 |
SW a2, 4(a1) - Store word to physical address in |
TSBI_SD |
0x00c5b023 |
SD a2, 0(a1) - Store doubleword to physical address in |
TSBI_SFENCE_VMA |
0x12000073 |
SFENCE.VMA x0, x0 - Flushes the address-translation caches. Used by a U-mode test that sets |
For example, an S-mode program can request setting mstatus.TW with a CSR_SET call corresponding to csrrs x0, mstatus, a1 (a0 = 0x3005a073) with a1 containing a 1 in bit 21 (the TW bit) and all other bits 0. The ACT trap handler implements this using an instruction table. If a custom M-mode does not implement mstatus.TW, it must emulate the behavior in some other way. Similarly, S-mode can read mip to a0 with a CSR_READ call corresponding to csrrs a0, mip, x0 (a0 = 0x34402573).
The ACT trap handlers implement an additional set of convenience calls changing between privilege modes in a standard fashion. This includes changing to M-mode. The behavior in M-mode is only predictable if STANDARD_SM_SUPPORTED is true. Another suite with different trap handlers might not support these calls.
| Function Name | Operation(a0) |
Description |
|---|---|---|
TSBI_GOTO_MMODE |
0x00000001 |
Switches to M-mode from any privilege mode. Behavior may be unpredictable if STANDARD_SM_SUPPORTED is false. |
TSBI_GOTO_SMODE |
0x00000002 |
Switches to S/HS-mode from any privilege mode. |
TSBI_GOTO_UMODE |
0x00000003 |
Switches to U-mode from any privilege mode. |
TSBI_GOTO_VSMODE |
0x00000004 |
Switches to VS-mode from any privilege mode. |
TSBI_GOTO_VUMODE |
0x00000005 |
Switches to VU-mode from any privilege mode. |
The ACT S/HS and VS-mode trap handlers implement the same calls. Each trap handler performs the request if possible at the current privilege level, or else makes another ecall to pass the request up the privilege chain if necessary. For example, GOTO_MMODE is always passed up the chain. A CSR access to S-mode CSRs is handled by the S-mode handler, while a CSR access to M-mode received by the S-mode handler is passed up to the M-mode handler by an ecall with unchanged arguments.
|
6.6.1. System Call Macros
The following macros are defined for developer convenience to access the T-SBI and ACT system calls. They are not required.
-
RVTEST_TSBI_ECALL_TEST(): records the
ecallin the trap signature and returns xEPC ina0 -
RVTEST_TSBI_CSR_SET(csr, imm)
-
RVTEST_TSBI_CSR_CLEAR(csr, imm)
-
RVTEST_TSBI_CSR_WRITE(csr, imm)
-
RVTEST_TSBI_CSR_WRITE_A1(csr): write value in
a1 -
RVTEST_TSBI_CSR_READ(csr): returns value in
a0 -
RVTEST_TSBI_SFENCE_VMA
csris the 12-bit CSR number (e.g.CSR_MIPfromencoding.h) andimmis a constant that the macro loads intoa1withlibefore the call. -
RVTEST_TSBI_GOTO_MMODE
-
RVTEST_TSBI_GOTO_SMODE
-
RVTEST_TSBI_GOTO_UMODE
-
RVTEST_TSBI_GOTO_VSMODE
-
RVTEST_TSBI_GOTO_VUMODE
-
RVTEST_TSBI_LW: performs
lw a0, 0(a1)with machine-mode privileges. Returns result ina0. Used to readmtimeor access other memory-mapped I/O. -
RVTEST_TSBI_LWP4: performs
lw a0, 4(a1)with machine-mode privileges. Returns result ina0. Used to readmtimeor access other memory-mapped I/O. -
RVTEST_TSBI_LD: performs
ld a0, 0(a1)with machine-mode privileges. Returns result ina0. Used to readmtimeor access other memory-mapped I/O. RV64 only. -
RVTEST_TSBI_SW: performs
sw a2, 0(a1)with machine-mode privileges. Used to write memory-mapped I/O such asmtimecmpormsip. -
RVTEST_TSBI_SWP4: performs
sw a2, 4(a1)with machine-mode privileges. Used to write memory-mapped I/O such asmtimecmph. -
RVTEST_TSBI_SD: performs
sd a2, 0(a1)with machine-mode privileges. Used to write memory-mapped I/O such asmtimecmpormsip. RV64 only.
TODO
testgen/src/testgen/io/templates.py format_params needs to accept STANDARD_SM_SUPPORTED parameter when available. How to deal with UDB? (Released in UDB 4/29/26).
remove mention of RVTEST_VECTOR from vector code
Test generator: Any test that lists Sm in REQUIRED_EXTENSIONS adds STANDARD_SM_SUPPORTED as a parameter (outdated; as of 9/16/26 it adds BOOT_TO_MMODE) DONE * edit generators/testgen/src/testgen/io/templates.py/generate_defines_from_extensions to define these boot_TO_*. DONE Drop RVTEST_FP and tweak where it was used (hopefully removed)
Restore this code when fully transitioned to S-SBI
if any(ext in ext_components for ext in ["H", "S"]):
extra_defines.append("#define BOOT_TO_SMODE")
elif any(ext in ext_components for ext in ["Sm"]):
extra_defines.append("#define BOOT_TO_MMODE")
7. Architectural Functional Coverage
In principle, a test plan could simply list a set of features to test, and a set of tests that exercise these features. Experienced verification engineers have learned that tests often have bugs and don’t exercise the feature that the author intended. Many of these bugs can be caught if a different engineer independently writes functional coverpoints that measure whether the tests exercised the features.
This Certification Test Plan focuses on whether a DUT implements all of the architectural features of a profile. Architectural features are those that are directly visible to the programmer, especially those defined in the unprivileged and privileged ISA specifications.
|
Later certificates may add ratified architectural features outside the ISA spec, such as IOMMU, debug, or AIA. |
Certification differs from design verification in that it does not systematically test microarchitectural features. Design verification must be aware of DUT-specific features such as the pipeline design. For example, DV should test design-specific interactions of interrupt arrival time, pipeline hazards, multicycle instructions, MMU, and memory system. Design verification also should test tricky implementation issues, such as hard floating-point rounding cases.
This plan uses the term Architectural Functional Coverage to describe the functional coverpoints required for certification. In contrast, full design verification also has Microarchitectural Functional Coverage.
Functional coverage also differs from code coverage, which measures whether the test suite exercises all of the lines of code in the RTL. Each of these detects different types of bugs. Code coverage is part of DV but not certification.
Architectural functional coverage requires a way to measure the architectural state of the machine after each instruction. The RISC-V Verification Interface (RVVI) provides a standard way to observe this state in the DUT. This document defines Extended RVVI with additional signals to facilitate testing virtual memory.
7.1. Extended RVVI
As compared to the base RVVI, Extended RVVI adds the following signals:
| Signal | Width | Description |
|---|---|---|
virt_adr_i |
XLEN |
Virtual address of instruction |
virt_adr_d |
XLEN |
Virtual address of data accessed by instruction |
phys_adr_i |
PA_BITS |
Physical address of instruction |
phys_adr_d |
PA_BITS |
Physical address of data accessed by instruction |
g_phys_adr_i |
PA_BITS |
Guest physical address of instruction (when Hypervisor is active, 0 when inactive) |
g_phys_adr_d |
PA_BITS |
Guest physical address of data accessed by instruction (when Hypervisor is active, 0 when inactive) |
pte_i |
XLEN |
Instruction page table entry (VS-stage when Hypervisor is active) |
pte_d |
XLEN |
Data page table entry (VS-stage when Hypervisor is active) |
g_pte_i |
XLEN |
Instruction page table entry (G-stage when Hypervisor is active, 0 when inactive) |
g_pte_d |
XLEN |
Data page table entry (G-stage when Hypervisor is active, 0 when inactive) |
page_type_i |
3 |
Instruction page type (VS-stage when hypervisor is active)) |
page_type_d |
3 |
Data page type (VS-stage when hypervisor is active)) |
g_page_type_i |
3 |
Instruction page type (G-stage when hypervisor is inactive, 0 when inactive) |
g_page_type_d |
3 |
Data page type (G-stage when hypervisor is inactive, 0 when inactive) |
tdata1[NTRIGGERS] |
XLEN*NTRIGGERS |
Sdtrig Trigger Data 1 for each debug trigger |
tdata2[NTRIGGERS] |
XLEN*NTRIGGERS |
Sdtrig Trigger Data 2 for each debug trigger |
tdata3[NTRIGGERS] |
XLEN*NTRIGGERS |
Sdtrig Trigger Data 3 for each debug trigger |
tinfo[NTRIGGERS] |
XLEN*NTRIGGERS |
Sdtrig Trigger Info for each debug trigger |
| Code | Type |
|---|---|
000 |
kilopage |
001 |
megapage |
010 |
gigapage |
011 |
terapage |
100 |
petapage |
other |
reserved |
Some accesses touch more than one physical page. Examples include misaligned accesses wrapping a page boundary, and some vector accesses. Extended RVVI provides the signals corresponding to the base address of the access. For vector, they correspond to the base address of the initial element access.
NTRIGGERS is a new parameter similar to FLEN defining the number of Sdtrig debug triggers supported by the platform.
7.2. riscvISACOV Signals
Coverpoints are described using the open riscvISACOV framework.
The framework collects data coming across the RVVI interface and presents it with ins.current and ins.prev data structures to allow easy access to the architectural state at the end of the current and previous instructions. For example, ins.current.rs1 is the source register for the current instruction, and ins.current.rd_val is the value written to the destination register by the current instruction.
|
Most coverpoints use |
The available fields are given in framework/src/act/fcov/coverage/RISCV_coverage_rvvi.svh. Most commonly used fields are summarized in Table 10. Other fields include floating-point and vector register IDs and values, MMU extended RVVI signals, vector type information, and pending interrupts. TODO: handling register pairs.
| Signal | Width | Description | Example |
|---|---|---|---|
insn |
ILEN |
Instruction bit pattern |
* add x10, x11, x12 |
inst_name |
string |
Instruction name |
add |
disass |
string |
Disassembled instruction |
|
trap |
1 |
Instruction trapped rather than retiring |
0 |
mode |
2 |
Privilege mode 11 = machine, 01 = supervisor, 00 = user |
11 |
pc_rdata |
XLEN |
PC of current instruction |
0x80000000 |
pc_wdata |
XLEN |
PC of next instruction |
0x80000004 |
rs1 |
5 |
Source register 1 ID |
11 |
rs2 |
5 |
Source register 2 ID |
12 |
rd |
5 |
Destination register ID |
10 |
rs1_val |
XLEN |
Source register 1 value |
42 |
rs2_val |
XLEN |
Source register 2 value |
69 |
rd_val |
XLEN |
Value written to destination register |
111 |
imm |
XLEN |
Value of immediate |
100 |
csr |
XLEN x 4096 |
Value of CSRs |
-
exact meaning of trap, importance in writing test
|
RVVI and riscvISACOV support the notion of multiple harts that retire multiple instructions per cycle. The number of instructions retired per cycle is a microarchitectural issue irrelevant to architectural functional verification, so it is set to 1, consistent with simulators that report each instruction retiring individually. |
|
Our riscvISACOV implementation uses a SystemVerilog disassembler in fcov/disassemble.svh, replacing a proprietary disassembler from Imperas. When adding new extensions, update the disassembler accordingly. |
7.3. Writing Coverpoints with riscvISACOV
Move this and the remainder to ACT repo
-
example of coverpoint
-
organization of files
7.4. Trace Coverage Flow
Coverage is measured by running tests on the RISC-V Sail model and generating a RVVI-Trace file, then passing this file to an RVVI agent in a SystemVerilog testbench that checks coverage.
|
The number of coverpoints and the number of tests both grow with the number of extensions, so the runtime to measure coverage can grow quadratically with the number of extensions, and becomes problematic. To avoid this, it is recommended to only enable coverpoints for one extension (or small group of extensions) at a time and to only run tests for that extension, and generate a Unified Coverage Database (UDCB) file and report for that extension. A script will kick off such tests in parallel for all extensions, and merge the coverage reports. |
The RISC-V Sail model produces the trace file in a standard RVVI-Trace format (see Section Section 7.5). Any other simulator that implements the same trace format can also be used to cross-check coverage.
-
Jordan add instructions on how to run this
7.5. RVVI-Trace Format
-
Jordan write
-
how to handle instructions that change multiple CSRs, such as a write to mstatus.SIE also affecting sstatus.SIE
8. Reference Model
Certification may rely on a reference model (simulator) to compute the expected results of a test, such as sum of two numbers in an add instruction or the answer for a fsqrt.d instruction. Self-checking tests compare the result from the DUT against the expected result that was precomputed by the reference model and flag mismatches. Alternatively, the test may be generated with a set of one or more expected results for each test case (without a reference model), and the test can check that the DUT produces one of the expected results.
TODO: Discuss one vs. many reference models. RISC-V International has blessed RISC-V Sail as the golden RISC-V model, so RISC-V Sail is used as the reference model.
8.1. Deterministic, Nondeterministic, and Unspecified Behaviors
RISC-V feature behavior can be classified as deterministic, nondeterministic, and unspecified. Deterministic features have a unique expected value for a given configuration, such as the result of sub 1 - 2 on RV32. Nondeterministic features have a fine set of possible outcomes, and might vary unpredictably even on the same DUT. For example, vector tail-agnostic elements can preserve the input value or propagate all 1s, with no guarantee whether the same instruction has the same behavior on all elements or when executed twice in a row. Unspecified features, such as unimplemented instructions, could do anything, from being ignored, to predictably or unpredictably changing architectural state, to halting and catching fire.
All RISC-V simulators, when properly configured to match the behavior of a DUT, should produce the same answers as the DUT and each other for deterministic features. For nondeterministic features, they should produce one of the legal outcomes. For unspecified features, they can do anything.
Self-checking certification tests must check that the result of deterministic features match the reference model. Nondeterministic features must produce one of the finite set of legal outcomes, which must be provided by the test developer because a reference model only produces a single outcome. Unspecified features are not tested because there are no wrong answers.
This is harder than it seems because RISC-V has many features whose behaviors are not fully specified. Many of these features are not yet named, and the set of legal behaviors is not yet enumerated. Unified Database (UDB) is in the process of naming and enumerating all of these features and behaviors to fully describe the behavior of a DUT. Moreover, no simulator yet is fully configurable to match every feature. Some simulators, such as Spike, intentionally have a minimal set of configuration options and are hardwired to particular behaviors.
Nevertheless, the RISC-V Sail model is making rapid progress and is aiming to fully implement the ratified RVA23 profile, read a UDB configuration, and support at least the most reasonable behaviors in time for certification.
8.2. List of Fundamentally Nondeterministic Behaviors
-
Mask- and tail-agnostic vector operations
-
Self-checking tests must accept undisturbed and all 1s in each element
-
-
Traps on misaligned accesses
-
If mtval is written with a nonzero value, it can be any address within the access***
-
When it also causes access fault / misaligned store, Allen has list of 7ish possible outcomes.
-
If nondeterministic behaviors are tested, the test must accept all legal outcomes. This is costly, so some nondeterministic behaviors may be untested. Nevertheless, agnostic vector operations will definitely be tested and accept all legal results.
When possible, the behavior should be made deterministic by a parameter such that the reference model can match the DUT with that parameter setting.
8.3. List of Theoretically Nondeterministic Behaviors with Configurable Deterministic Implementations
-
CSR WARL Fields: any legal value could be read, and the value is theoretically nondeterministic and could change from one write to another. UDB will define configurations with a single sensible behavior (such as all 0s), and we may limit certification to DUTs that implement a reasonable configuration.
Appendix A: Unprivileged Test Plan
Unprivileged tests exercise every instruction using every applicable source and destination register, and reasonable architectural edge values of sources. They are intended for certification, not verification. For example, they do not stress interrupts arriving in the midst of multicycle instructions.
The unprivileged test plan is written to be easily reviewed by a human, and to be automatically converted to machine-readable coverpoints and tests. It is defined with spreadsheets in comma-separated value (CSV) format. A testplan may have an ExtraExtensions column. A non-empty entry names one or more extensions, separated by colons, that the row requires in addition to the testplan’s own, such as D in Table 48 or Zfh:D in Table 50. The row’s tests are in the testplan’s test suite directory, but they run only on configurations that also implement those extensions. Its tests and covergroups are named after the testplan followed by the extensions, such as ZfhminD-fcvt.d.h-00.S and ZfhminD_fcvt_d_h_cg, and the covergroups are compiled only when the extensions are supported.
A.1. Unprivileged Tests
Every bin in every coverpoint is associated with a specific test [3]. Unprivileged tests sweep some feature under test (such as the destination register rd) while randomizing all applicable register IDs and source values (including values to be loaded from memory). For example, the unprivileged test for the cp_rd coverpoint of the add instruction contains 32 add instructions, using the 32 different choices of rd. The rs1 and rs2 register numbers and values are selected randomly. Appendix E gives examples of unprivileged coverpoints and tests meeting these requirements and the coverpoints of Table 18 for the add instruction. Each test is self-checking, checking the destination register value against one provided by a reference model. Certain tests also test other state such as stores or floating-point flags, as described in those sections.
|
The random values are preferably selected in a deterministic way so that regenerating tests use the same random values where possible, minimizing differences between tests. This can be done by seeding the random number generator with a has of the instruction and coverpoint name. |
Unprivileged tests are designed to never trap. Their results are independent of the privilege mode in which they are run, so they generally are run only in machine mode. They generally involve no privileged instructions, except that floating-point and vector tests turn on the mstatus.{FS/VS} bits to enable these extensions.
A.2. Unprivileged Coverpoints
The coverpoints in Table 11 are used in most of the unprivileged test plans in subsequent sections.
| Coverpoint | Bins | Definition |
|---|---|---|
Basic Coverpoints |
||
cp_asm_count |
1 |
Number of times the instruction is executed in the test, must be greater than 0. |
cp_rs1 |
32 |
The rs1 register number used in the instruction. |
cp_rs2 |
32 |
The rs2 register number used in the instruction. |
cp_rd |
32 |
The rd register number used in the instruction. |
cp_rs1_edges |
12 (RV32), 18 (RV64) |
Edge values for rs1 (see Table 12). |
cp_rs2_edges |
12 (RV32), 18 (RV64) |
Edge values for rs2 (see Table 12). |
cp_imm_edges |
20 |
Edge values for 12-bit immediates (see Table 13). |
cr_rs1_imm_edges |
12*20 (RV32), 18*20 (RV64) |
Cross-product of rs1 and 12-bit immediate edges (see Table 13). |
cr_rs1_rs2_edges |
12*12 (RV32), 18*18 (RV64) |
Cross-product of rs1 and rs2 edges, used for instructions with two source registers. |
cmp_rs1_rs2 |
32 |
The rs1 and rs2 registers have the same register number. |
cmp_rd_rs1 |
32 |
The rd register has the same register number as the rs1 register. |
cmp_rd_rs2 |
32 |
The rd register has the same register number as the rs2 register. |
cmp_rd_rs1_rs2 |
32 |
The rd register has the same register number as both the rs1 and rs2 registers. |
cp_offset |
2 |
A branch or jalr instruction has a positive and negative offset. |
cp_uimm |
|
Exercise all XLEN unsigned immediate values, such as shift amounts. |
cp_align |
≤ 8 |
Alignment of naturally-aligned sub-doubleword load/store operand within doubleword |
cp_memval |
5 |
Edge values for integer memory values loaded by load instructions. |
Coverpoints for Compressed Instructions |
||
cp_rs1_p |
8 |
The rs1 register number used in compressed instructions supporting x8-x15. |
cp_rs2_p |
8 |
The rs2 register number used in compressed instructions supporting x8-x15. |
cp_rd_p |
8 |
The rd register number used in compressed instructions supporting x8-x15. |
cp_fd_p |
8 |
The fd register number used in compressed floating-point instructions supporting f8-f15. |
cp_fs2_p |
8 |
The fs2 register number used in compressed floating-point instructions supporting f8-f15. |
cp_imm_mul |
32 |
Immediate offset for word-sized compressed loads/stores: multiples of 4 from 0 to 124. |
Coverpoints for Floating-Point Instructions |
||
cp_fs1 |
32 |
The fs1 register number used in the instruction. |
cp_fs2 |
32 |
The fs2 register number used in the instruction. |
cp_fs3 |
32 |
The fs3 register number used in the instruction. |
cp_fd |
32 |
The fd register number used in the instruction. |
cp_fs1_edges |
26 |
Edge values for fs1 (see Table 14) |
cp_fs2_edges |
26 |
Edge values for fs2 (see Table 14) |
cp_fs3_edges |
26 |
Edge values for fs3 (see Table 14) |
cmp_fd_fs1 |
32 |
The fd register has the same register number as the fs1 register. |
cmp_fd_fs2 |
32 |
The fd register has the same register number as the fs2 register. |
cmp_fd_fs3 |
32 |
The fd register has the same register number as the fs3 register. |
cp_frm |
5 |
The floating-point rounding mode used in the instruction: rne, rdn, rup, rtz, rmm, dyn. |
cp_csr_fflags |
10 |
The instruction sets the {NV, DZ, OF, UF, NX} flags in the fflags CSR. |
cp_csr_frm |
5 |
Dynamic rounding mode in the frm CSR: rne, rdn, rup, rtz, rmm |
cr_fs1_fs2_edges |
26*26 |
Cross product of edges of fs1 and fs2 registers. |
cr_fs1_fs3_edges |
26*26 |
Cross product of edges of fs1 and fs3 registers. |
cp_fclass |
10 |
All 10 fclass classes. |
cp_NaNBox |
1 |
Upper bits of NaN-boxed value are all 1s |
cp_fs1_badNB |
12 |
The fs1 register contains an incorrectly-NaN-boxed lower-precision value. |
cp_fs2_badNB |
12 |
The fs2 register contains an incorrectly-NaN-boxed lower-precision value. |
cp_fs3_badNB |
12 |
The fs3 register contains an incorrectly-NaN-boxed lower-precision value. |
cp_fpr_hazard |
4 |
Floating-point register hazard detection: RAW, WAR, WAW, and no hazard. [TODO: this should be dropped when full hazards are implemented] |
Miscellaneous Coverpoints |
||
cp_bs |
4 |
Byte select field for 32-bit AES instructions |
cp_rnum |
11 |
Round number for AES instructions |
Notes:
-
These coverpoints are adapted from the Imperas riscvISACOV functional coverage project.
-
Register number is a 5-bit ID (e.g. x7), while register value is an
XLEN-sized number. -
Most coverpoints typically have 32 bins because they exercise all 32 integer registers.
-
Cross-products exercise all combinations of two or more coverpoints. They can have a large number of bins.
-
Each of these coverpoints can optionally have a modifier appended. For example, cp_rs1_nx0 is a modified version of cp_rs1, covering all 31 rs1 register numbers excluding x0. It is used for load/store/jalr instructions that can’t rely on address 0 specified by x0 being legal. Modifiers are defined in the extensions that they apply to.
-
The cmp_* and cp_*_hazard coverpoints occupy the fuzzy land at the edge of certification and verification. They are included because they are easy.
-
It would be possible to add more floating-point coverpoints such as cmp_fd_fs1_fs2_fs3 but the value is considered low.
-
The riscvISACOV test plan had cmp_rd_{rs1/rs2}_eqval coverpoints that compare if rd and one of the sources have the same value. These are generally hit by the cr_rs1_rs2_edges tests, so they don’t add interesting additional coverage and were dropped. riscvISACOV also had cp_{rs1/rs2/rd}_toggle tests that checked if each bit changed from 1 to 0 and vice versa. This is trivially exercised by providing all 0s followed by all 1s followed by all 0s again, so they were dropped.
| Bin | RV32 | RV64 |
|---|---|---|
zero |
|
|
one |
|
|
two |
|
|
min |
|
|
minp1 |
|
|
max |
|
|
maxm1 |
|
|
ones |
|
|
onesm1 |
|
|
walkodd |
|
|
walkeven |
|
|
random |
|
|
Wmax |
n/a |
|
Wmaxm1 |
n/a |
|
Wmaxp1 |
n/a |
|
Wmaxp2 |
n/a |
|
W80 |
n/a |
|
W7F |
n/a |
|
| Bin | 12-bit Signed Value |
|---|---|
zero |
0 |
p0 |
1 |
p1 |
2 |
three |
3 |
p2 |
4 |
p3 |
8 |
p4 |
16 |
p5 |
32 |
p6 |
64 |
p7 |
128 |
p8 |
256 |
p9 |
512 |
hm1 |
1023 |
p10 |
1024 |
max |
2047 |
min |
-2048 |
minp1 |
-2047 |
onesm1 |
-2 |
ones |
-1 |
randomp |
1795 |
| Bin | Half | BF16 | Float | Double |
|---|---|---|---|---|
pos0 |
|
|
|
|
neg0 |
|
|
|
|
pos1 |
|
|
|
|
neg1 |
|
|
|
|
pos2p5 |
|
|
|
|
neg2p5 |
|
|
|
|
pos2prec |
|
|
|
|
neg2prec |
|
|
|
|
posminnorm |
|
|
|
|
negminnorm |
|
|
|
|
posmaxnorm |
|
|
|
|
negmaxnorm |
|
|
|
|
posmax_subnorm |
|
|
|
|
negmax_subnorm |
|
|
|
|
posmid_subnorm |
|
|
|
|
negmid_subnorm |
|
|
|
|
posmin_subnorm |
|
|
|
|
negmin_subnorm |
|
|
|
|
posinfinity |
|
|
|
|
neginfinity |
|
|
|
|
posQNaN |
|
|
|
|
posSNaN |
|
|
|
|
negQNaN |
|
|
|
|
negSNaN |
|
|
|
|
posrandom |
|
|
|
|
negrandom |
|
|
|
|
±2.5 and ±2p (p is the format’s precision: 11 for half, 8 for BF16, 24 for float, 53 for double) are exact ties for some operations, so they distinguish RMM from RNE. Converting ±2.5 to an integer is a tie between 2 and 3. Adding ±1.0 to ±2p is a tie between 2p and 2p+2.
|
The register edge cases are selected to include extreme values and their immediate neighbors. They also include walking 1s and an arbitrary intermediate value. RV64 adds edge cases near the 32-bit boundary to stress W-type instructions. Immediate edge cases exercise each bit of the immediate, extreme values, and one random intermediate value. |
A.2.1. Hazards
Hazard tests are applied to every unprivileged Instruction Under Test (IUT) that uses a source or destination. The hazard receives the source from Secondary_Producer_Instruction (SPI) or sends the destination value to a Secondary Consumer Instruction (SCI). All relevant Read-After-Write (RAW), Write-After-Read (WAR), and Write-After-Write (WAW) hazards are exercised. They are tested with the SI being adjacent to the IUT, and being separated by a small amount. The SI is selected as a representative instruction from each of many categories of instructions to exercise forwarding between different functional units.
| Category | ALU | Complex | Memory | Control | CSR (Zicsr) | Mult (Zmmul/M) | Float (F) | VectorInt (Zve32x + Zvl64b) | VectorFloat (Zve32f+Zvl64b) |
|---|---|---|---|---|---|---|---|---|---|
Int (rd) |
auipc, li |
sll, cpop (Zbb), clmul (Zbc), sha256sig0 (Zknh) |
lw, amoswap.w (Zaamo) |
jal |
csrr |
mul, div |
fcvt.w.s, fmv.x.w, fclass.s, feq.s |
vmv.x.s |
|
PC |
jal, jalr, beq |
||||||||
FP (fd) |
flw |
fmadd.s, fdiv.s, fli.s (Zfa), fsqrt.d (D), fsqrt.h (Zfh), fsqrt.q (Q) |
vmv.f.s |
||||||
Vector (vd) |
vle32.v |
vadd.vi |
vfadd.vf |
||||||
Memory |
sw, amoswap.w (Zaamo), cbo.zero (Zicboz) |
fsw |
vse32.v |
||||||
CSR (rd) |
csrr fflags |
csrr vcsr |
| Category | ALU | Complex | Memory | Control | CSR (Zicsr) | Mult (Zmmul/M) | Float (F) | VectorInt (Zve32x + Zvl64b) | VectorFloat (Zve32f+Zvl64b) |
|---|---|---|---|---|---|---|---|---|---|
Int |
add (rs1/2), addi (rs1) |
srl, sh1add (Zba), binv (Zbs), aes32dsmi (Zknd32), aes64dsm (Zknd32) |
sw (rs2), amoswap.w (rs2, Zaamo) |
beq (rs1/2) |
csrw (rs1) |
mul (rs1/2), div (rs1/2) |
fcvt.s.w (rs1), fmv.w.x (rs1) |
vadd.vx (rs1), vmv.v.x (rs1) |
|
PC |
auipc (implicit) |
jal, jalr (implicit) |
|||||||
FP |
fsw (fs2) |
fmadd.s (fs1/2/3), fdiv.s (fs1/2), fli.s (fs1), fsqrt.d (fs1, D), fsqrt.h (fs1, Zfh), fsqrt.q (fs1, Q) |
vfadd.vf (fs1), vmv.v.f (fs1) |
||||||
Vector |
vse32.v(vs2) |
vadd.vv (vs1/2), vadd.vi (vs2), vmacc.vv (vs1/2/vd) |
vfadd.vv (vs1/2), vfsqrt.v (vs2), vfmacc.vv (vs1/2/vd) |
||||||
Memory |
lw, amoswap.w (Zaamo) |
fsw |
vle32.v |
||||||
CSR |
csrw fflags |
csrw vcsr |
The types of hazards exercised are given in Table 17. Not all IUT have a source or destination, so not all hazard types are exercised for every IUT.
| Type | IUT First | IUT Second |
|---|---|---|
RAW |
IUT dest → SCI source |
SPI dest → IUT source |
WAR |
IUT source → SPI dest |
SCI source → IUT dest |
WAW |
IUT dest → SPI dest |
SPI dest → IUT dest |
When multiple representative instructions are listed, one is randomly selected from the list for each test. Certain categories and certain instructions in a category (amoswap, fli, fsqrt.d/h/q) only may be selected if the relevant extension is present. Different source instructions consume one, two, or three sources. Loads, stores, and atomics always use rs1 as a pointer to a scratch memory location holding a random value. Subword load, store, and atomic IUTs use a random naturally aligned offset in the range [0, 3]. Tests assume mstatus.FS/VS are dirty, if applicable. Loads and atomics have a memory source operand. Stores, atomics, and cbo.zero have a memory destination operand. Vector instructions operate on a vector of 2 32-bit elements. They are omitted if the vector unit does not support this. Note that li is the pseudo-instruction for addi rd, x0, imm12.
The test cases are as follows:
-
If the IUT has {int/pc/fp/vector/memory/CSR} source operand:
-
For each IUT source
-
For each hazard_type in {RAW, WAR}
-
For each supported SPI category that can produce the source category (gated by #ifdef EXT_SUPPORTED)
-
For each delay in (0, random[1,3])
-
Pick random unused registers for IUT source(s) and destination from X1-x31 (-x15 for E), f0-f31, v0-v31. Ok to duplicate source registers.
-
Pick random representative SPI from category, and random unused source registers for SPI.
-
Initialize IUT and SPI sources to random values
-
If hazard_type = RAW // SPI dest → IUT source
-
SPI dest = random IUT source
-
Perform SPI
-
If delay > 0, perform delay dependent instructions
-
Perform IUT
-
SIGUPD IUT dest or otherwise test IUT result
-
-
If hazard_type = WAR // IUT source → SPI dest
-
SPI dest = random IUT source
-
Perform IUT
-
If delay > 0, perform delay dependent instructions
-
Perform SPI
-
SIGUPD IUT dest or otherwise test IUT result
-
SIGUPD SPI dest
-
-
-
-
-
-
-
If the IUT has {int/pc/fp/vector/memory/CSR} destination operand:
-
For each hazard_type in {RAW, WAR}
-
For each supported SCI category that can read the source category (gated by #ifdef EXT_SUPPORTED)
-
For each delay in (0, random[1,3])
-
Pick random unused registers for IUT source(s) and destination from X1-x15, f0-f31, v0-v31. Ok to duplicate source registers.
-
Pick random representative SCI from category, and random unused source registers for SCI.
-
Initialize IUT and SCI sources to random values
-
If hazard_type = RAW // IUT dest → SCI source
-
random SCI source = IUT dest
-
Perform IUT
-
If delay > 0, perform delay dependent instructions
-
Perform SCI
-
SIGUPD SI dest or otherwise test SI result
-
-
If hazard_type = WAR // SCI source → IUT dest
-
random SCI source = IUT dest
-
Perform SCI
-
If delay > 0, perform delay dependent instructions
-
Perform IUT
-
SIGUPD IUT dest or otherwise test IUT result
-
SIGUPD SCI dest
-
-
-
-
-
For hazard_type = WAW
-
For each supported SPI category that can produce the source category (gated by #ifdef EXT_SUPPORTED)
-
For each delay in (0, random[1,3])
-
Pick random unused registers for IUT source(s) and destination from X1-x31 (-x15 for E), f0-f31, v0-v31. Ok to duplicate source registers.
-
Pick random representative SPI from category, and random unused source registers for SPI.
-
Initialize IUT and SPI sources to random values
-
SPI dest = IUT dest
-
Perform SPI // SPI dest → IUT dest
-
If delay > 0, perform delay dependent instructions
-
Perform IUT
-
SIGUPD IUT dest or otherwise test IUT result
-
Perform IUT // IUT dest → SPI dest
-
If delay > 0, perform delay dependent instructions
-
Perform SPI
-
SIGUPD SPI dest or otherwise test SPI result
-
-
-
-
Hazard coverpoints are named cp_hazard_{hazard_type}_{IUT source/dest}_{to/from}_{SI category}_{delay}. IUT source/dest is one of {rs1, rs2, rd, fs1, fs2, fs3, fd, vs1, vs2, vd, memr, memw, csrr, csrw, pc}.
The number of hazard bins for a typical R-type integer IUT is 2 sources) * (2 hazard types) + (1 destination) * (4 hazard types * (8 categories) * (2 delays) = 128 bins.
A.3. I Base Integer Extension
Table 18 summarizes the coverpoints for the I extension. The Type column is used to generate tests with the appropriate operands. An x in the RV32 or RV64 column indicates that the instruction is supported in that XLEN. The remaining columns refer to coverpoints defined in Table 11. An x in a coverpoint column selects that coverpoint. Any other entry selects a modified coverpoint whose name is the column name followed by an underscore and the entry. For example, nx0 in the cp_rs1 column selects cp_rs1_nx0. Table 19 defines the modified coverpoints.
| Instruction | add | addi | addiw | addw | and | andi | auipc | beq | bge | bgeu | blt | bltu |
|---|---|---|---|---|---|---|---|---|---|---|---|---|
RV32 |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
||
RV64 |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
cp_asm_count |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
cp_rs1 |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
|
cp_rs2 |
x |
x |
x |
x |
x |
x |
x |
x |
||||
cp_rd |
x |
x |
x |
x |
x |
x |
x |
|||||
cp_rs1_edges |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
|
cp_rs2_edges |
x |
x |
x |
x |
x |
x |
x |
x |
||||
cr_rs1_imm_edges |
x |
x |
x |
|||||||||
cr_rs1_rs2_edges |
x |
x |
x |
offset |
offset |
offset |
offset |
offset |
||||
cmp_rs1_rs2 |
x |
x |
x |
x |
x |
x |
x |
x |
||||
cmp_rd_rs1 |
x |
x |
x |
x |
x |
x |
||||||
cmp_rd_rs2 |
x |
x |
x |
|||||||||
cmp_rd_rs1_rs2 |
x |
x |
x |
|||||||||
cp_offset |
x |
x |
x |
x |
x |
|||||||
cp_imm_edges |
x |
x |
x |
20bit |
branch |
branch |
branch |
branch |
branch |
| Instruction | bne | fence | jal | jalr | lb | lbu | ld | lh | lhu | lui | lw | lwu |
|---|---|---|---|---|---|---|---|---|---|---|---|---|
RV32 |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
||
RV64 |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
cp_asm_count |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
cp_rs1 |
x |
nx0 |
nx0 |
nx0 |
nx0 |
nx0 |
nx0 |
nx0 |
nx0 |
|||
cp_rs2 |
x |
|||||||||||
cp_rd |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
||
cp_rs1_edges |
x |
|||||||||||
cp_rs2_edges |
x |
|||||||||||
cr_rs1_rs2_edges |
offset |
|||||||||||
cmp_rs1_rs2 |
x |
|||||||||||
cmp_rd_rs1 |
nx0 |
nx0 |
nx0 |
nx0 |
nx0 |
nx0 |
nx0 |
nx0 |
||||
cp_offset |
x |
x |
jalr |
|||||||||
cp_imm_edges |
branch |
jal |
x |
x |
x |
x |
x |
x |
20bit |
x |
x |
|
cp_align |
byte |
byte |
hword |
hword |
word |
word |
||||||
cp_memval |
byte |
byte |
double |
hword |
hword |
word |
word |
|||||
cp_custom |
fence |
| Instruction | nop | or | ori | sb | sd | sh | sll | slli | slliw | sllw | slt | slti |
|---|---|---|---|---|---|---|---|---|---|---|---|---|
RV32 |
x |
x |
x |
x |
x |
x |
x |
x |
x |
|||
RV64 |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
cp_asm_count |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
cp_rs1 |
x |
x |
nx0 |
nx0 |
nx0 |
x |
x |
x |
x |
x |
x |
|
cp_rs2 |
x |
x |
x |
x |
x |
x |
x |
|||||
cp_rd |
x |
x |
x |
nx0 |
nx0 |
x |
nx0 |
nx0 |
||||
cp_rs1_edges |
x |
x |
x |
x |
x |
x |
x |
x |
||||
cp_rs2_edges |
x |
x |
x |
x |
x |
x |
x |
|||||
cr_rs1_imm_edges |
x |
uimm |
uimmw |
x |
||||||||
cr_rs1_rs2_edges |
x |
x |
x |
x |
||||||||
cmp_rs1_rs2 |
x |
x |
x |
x |
||||||||
cmp_rd_rs1 |
x |
x |
x |
nx0 |
nx0 |
x |
nx0 |
nx0 |
||||
cmp_rd_rs2 |
x |
x |
x |
nx0 |
||||||||
cmp_rd_rs1_rs2 |
x |
x |
x |
nx0 |
||||||||
cp_uimm |
x |
5 |
||||||||||
cp_imm_edges |
x |
x |
x |
x |
x |
|||||||
cp_align |
byte |
hword |
| Instruction | sltiu | sltu | sra | srai | sraiw | sraw | srl | srli | srliw | srlw | sub | subw |
|---|---|---|---|---|---|---|---|---|---|---|---|---|
RV32 |
x |
x |
x |
x |
x |
x |
x |
|||||
RV64 |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
cp_asm_count |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
cp_rs1 |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
cp_rs2 |
x |
x |
x |
x |
x |
x |
x |
|||||
cp_rd |
nx0 |
nx0 |
x |
nx0 |
nx0 |
x |
x |
nx0 |
nx0 |
x |
x |
x |
cp_rs1_edges |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
cp_rs2_edges |
x |
x |
x |
x |
x |
x |
x |
|||||
cr_rs1_imm_edges |
x |
uimm |
uimmw |
uimm |
uimmw |
|||||||
cr_rs1_rs2_edges |
x |
x |
x |
x |
x |
x |
x |
|||||
cmp_rs1_rs2 |
x |
x |
x |
x |
x |
x |
x |
|||||
cmp_rd_rs1 |
nx0 |
nx0 |
x |
nx0 |
nx0 |
x |
x |
nx0 |
nx0 |
x |
x |
x |
cmp_rd_rs2 |
nx0 |
x |
x |
x |
x |
x |
x |
|||||
cmp_rd_rs1_rs2 |
nx0 |
x |
x |
x |
x |
x |
x |
|||||
cp_uimm |
x |
5 |
x |
5 |
||||||||
cp_imm_edges |
x |
| Instruction | sw | xor | xori |
|---|---|---|---|
RV32 |
x |
x |
x |
RV64 |
x |
x |
x |
cp_asm_count |
x |
x |
x |
cp_rs1 |
nx0 |
x |
x |
cp_rs2 |
x |
x |
|
cp_rd |
x |
x |
|
cp_rs1_edges |
x |
x |
|
cp_rs2_edges |
x |
x |
|
cr_rs1_imm_edges |
x |
||
cr_rs1_rs2_edges |
x |
||
cmp_rs1_rs2 |
x |
||
cmp_rd_rs1 |
x |
x |
|
cmp_rd_rs2 |
x |
||
cmp_rd_rs1_rs2 |
x |
||
cp_imm_edges |
x |
x |
|
cp_align |
word |
| Modified Coverpoint | Bins | Definition |
|---|---|---|
cp_rs1_nx0 |
31 |
The rs1 register number, excluding x0. Used by loads, stores, and |
cp_rd_nx0 |
31 |
The rd register number, excluding x0. Used by instructions whose rd = x0 encodings are custom HINTs (see below). |
cmp_rd_rs1_nx0, cmp_rd_rs2_nx0, cmp_rd_rs1_rs2_nx0 |
31 |
cmp_rd_rs1, cmp_rd_rs2, and cmp_rd_rs1_rs2, excluding x0. Used with cp_rs1_nx0 or cp_rd_nx0. |
cp_offset_jalr |
2 + 4 |
Expands to two coverpoints for |
cp_imm_edges_branch |
8 |
Branch offsets 4, 8, 16, 2048, 4092, -4, -8, and -4096. These include the most negative offset and the largest positive multiple of 4. |
cr_rs1_rs2_edges_offset |
12*12*2 (RV32), 18*18*2 (RV64) |
Cross-product of rs1 edges, rs2 edges (see Table 12) and branch direction (cp_offset) for branches. |
cr_rs1_imm_edges_uimm |
5 + 12*5 (RV32), 10 + 18*10 (RV64) |
Expands to cp_imm_edges_uimm and its cross-product with cp_rs1_edges, for |
cr_rs1_imm_edges_uimmw |
5 + 18*5 |
Expands to cp_imm_edges_uimmw and its cross-product with cp_rs1_edges, for |
cp_uimm_5 |
32 |
5-bit unsigned shift amount for |
cp_imm_edges_20bit |
27 |
20-bit variant of Table 13 for |
cp_imm_edges_jal |
24 |
|
cp_align_{byte/hword/word} |
8/4/2 |
Position of a naturally aligned byte, halfword, or word access within a doubleword in memory. |
cp_memval_{byte/hword/word/double} |
5 |
The loaded value in the low 8, 16, 32, or 64 bits of rd is 0, 1, the largest positive value, the most negative value, or all ones. |
cp_custom_fence_pred_succ |
256 |
Every fence pred and succ set with fm = 0 and rd = rs1 = x0 executes without trapping, including the HINT encodings with pred = 0 or succ = 0. |
cp_custom_fence_reserved |
9 |
|
Table 20 summarizes the normative rules in the RV{32/64}I specification and the unprivileged coverpoints that check they have been exercised. Privileged coverpoints related to integer instructions are described in the relevant parts of Privileged Test Plan such as Sm and Exceptions. In particular, ebreak and ecall are only tested in the Privileged test plan because their behavior is UNSPECIFIED without an mtvec trap vector CSR. Reserved behaviors are checked in Section B.5. Note that the testplans always test the following fundamental capabilities, even if no normative rule is cited:
-
Opcodes (cp_asm_count)
-
All Source and Destination Registers (cp_rs1, cp_rs2, cp_rd)
-
Edge values (cp_rs1_edges, cp_rs2_edges, cp_imm_edges, cr_rs1_rs2_edges, cr_rs1_imm_edges)
-
All other bitfields in the instruction
| Normative Rule | Rule Text | Coverpoints |
|---|---|---|
ee_impl_flex |
Descriptive spec text with no separately testable behavior |
|
base_integer_variants |
Definition, checked through UDB |
|
xlen_definition |
We use the term XLEN to refer to the width of an integer register in bits (either 32 or 64). |
Definition, checked through UDB |
exception_def |
Descriptive spec text with no separately testable behavior |
|
interrupt_def |
Descriptive spec text with no separately testable behavior |
|
trap_def |
Descriptive spec text with no separately testable behavior |
|
rv32i_xreg_sz |
For RV32I, the 32 x registers are each 32 bits wide, i.e., XLEN=32. |
I_add_cg/{cp_rs1, cp_rs2, cp_rd, cr_rs1_rs2_edges} |
rv32i_rv64i_other_xregs |
I_add_cg/{cp_rs1, cp_rs2, cp_rd, cr_rs1_rs2_edges} |
|
pcreg_op |
I_auipc_cg/{cp_rd, cp_imm_edges_20bit} |
|
slti_sltiu_op |
I_slti_cg/{cp_rs1, cp_rd_nx0, cr_rs1_imm_edges}, I_sltiu_cg/{cp_rs1, cp_rd_nx0, cr_rs1_imm_edges} |
|
x0eq0 |
I_add_cg/{cp_rs1, cp_rs2, cp_rd, cr_rs1_rs2_edges} |
|
twos_complement_signed_integers |
The base integer instruction sets use a two’s-complement representation for signed integer values. |
I_slt_cg/cr_rs1_rs2_edges, I_slti_cg/cr_rs1_imm_edges, I_blt_cg/cr_rs1_rs2_edges_offset, I_sra_cg/cr_rs1_rs2_edges |
nop_enc |
I_nop_cg/cp_asm_count |
|
nop_op |
I_nop_cg/{cp_asm_count} |
|
addi_op |
ADDI adds the sign-extended 12-bit immediate to register rs1. |
I_addi_cg/{cp_rs1, cp_rd, cr_rs1_imm_edges} |
addi_overflow |
Arithmetic overflow is ignored and the result is simply the low XLEN bits of the result. |
I_addi_cg/cr_rs1_imm_edges. Cases such as all 1s + all 1s overflow. |
andi_ori_xori_op |
{I_andi_cg, I_ori_cg, I_xori_cg}/{cp_rs1, cp_rd, cr_rs1_imm_edges} |
|
slli_op |
SLLI is a logical left shift (zeros are shifted into the lower bits); |
I_slli_cg/{cp_rs1, cp_rd_nx0, cr_rs1_imm_edges_uimm} |
srli_op |
SRLI is a logical right shift (zeros are shifted into the upper bits); |
I_srli_cg/{cp_rs1, cp_rd_nx0, cr_rs1_imm_edges_uimm} |
srai_op |
SRAI is an arithmetic right shift (the original sign bit is copied into the vacated upper bits). |
I_srai_cg/{cp_rs1, cp_rd_nx0, cr_rs1_imm_edges_uimm} |
lui_op |
I_lui_cg/{cp_rd, cp_imm_edges_20bit} |
|
auipc_op |
I_auipc_cg/{cp_rd, cp_imm_edges_20bit} |
|
R-type_operands |
I_add_cg/{cp_rs1, cp_rs2, cp_rd, cmp_rd_rs1_rs2} |
|
add_op |
I_add_cg/{cp_rs1, cp_rs2, cp_rd, cr_rs1_rs2_edges} |
|
sub_op |
I_sub_cg/{cp_rs1, cp_rs2, cp_rd, cr_rs1_rs2_edges} |
|
add_sub_overflow |
Overflows are ignored and the low XLEN bits of results are written to the destination rd. |
{I_add_cg, I_sub_cg}/cr_rs1_rs2_edges. Cases such as all 1s + all 1s overflow. |
slt_sltu_op |
I_slt_cg/{cp_rs1, cp_rs2, cp_rd_nx0, cr_rs1_rs2_edges}, I_sltu_cg/{cp_rs1, cp_rs2, cp_rd_nx0, cr_rs1_rs2_edges} |
|
and_or_xor_op |
{I_and_cg, I_or_cg, I_xor_cg}/{cp_rs1, cp_rs2, cp_rd, cr_rs1_rs2_edges} |
|
sll_srl_sra_op |
{I_sll_cg, I_srl_cg, I_sra_cg}/{cp_rs1, cp_rs2, cp_rd, cr_rs1_rs2_edges} |
|
no_cti_delay_slots |
Control transfer instructions in RV32I do not have architecturally visible delay slots. |
{I_beq_cg, I_jal_cg, I_jalr_cg}/cp_offset |
jal_target |
I_jal_cg/cp_offset |
|
jal_op |
JAL stores the address of the instruction following the jump (pc+4) into register rd. |
I_jal_cg/{cp_rd} |
jalr_target |
I_jalr_cg/{cp_imm_edges, cp_offset_lsbs} |
|
jalr_op |
The address of the instruction following the jump (pc+4) is written to register rd. |
I_jalr_cg/{cp_rd} |
br_target |
{I_beq_cg, I_bne_cg}/{cp_offset, cp_imm_edges_branch} |
|
beq_bne_op |
BEQ and BNE take the branch if registers rs1 and rs2 are equal or unequal respectively. |
{I_beq_cg, I_bne_cg}/{cp_rs1, cp_rs2, cr_rs1_rs2_edges_offset} |
blt_bltu_op |
{I_blt_cg, I_bltu_cg}/{cp_rs1, cp_rs2, cr_rs1_rs2_edges_offset} |
|
bge_bgeu_op |
{I_bge_cg, I_bgeu_cg}/{cp_rs1, cp_rs2, cr_rs1_rs2_edges_offset} |
|
ldst_ea |
The effective address is obtained by adding register rs1 to the sign-extended 12-bit offset. |
{I_lw_cg, I_sw_cg}/{cp_rs1_nx0, cp_imm_edges} |
ldst_no_exc_aligned |
I_lw_cg/cp_align_word, I_lh_cg/cp_align_hword, I_sw_cg/cp_align_word, I_sh_cg/cp_align_hword |
|
load_op |
I_lw_cg/{cp_memval_word} |
|
store_op |
I_sw_cg/{cp_rs2_edges} |
|
lw_op |
The LW instruction loads a 32-bit value from memory into rd. |
I_lw_cg/{cp_rs1_nx0, cp_rd, cp_imm_edges, cp_memval_word} |
lh_op |
LH loads a 16-bit value from memory, then sign-extends to 32-bits before storing in rd. |
I_lh_cg/{cp_rs1_nx0, cp_rd, cp_imm_edges, cp_memval_hword} |
lhu_op |
LHU loads a 16-bit value from memory but then zero extends to 32-bits before storing in rd. |
I_lhu_cg/{cp_rs1_nx0, cp_rd, cp_imm_edges, cp_memval_hword} |
lb_lbu_op |
I_lb_cg/{cp_rs1_nx0, cp_rd, cp_imm_edges, cp_memval_byte}, I_lbu_cg/{cp_rs1_nx0, cp_rd, cp_imm_edges, cp_memval_byte} |
|
sw_sh_sb_op |
I_sw_cg/{cp_rs1_nx0, cp_rs2, cp_rs2_edges, cp_imm_edges}, I_sh_cg/{cp_rs1_nx0, cp_rs2, cp_rs2_edges, cp_imm_edges}, I_sb_cg/{cp_rs1_nx0, cp_rs2, cp_rs2_edges, cp_imm_edges} |
|
ldst_atomicity_for_aligned |
naturally aligned loads and stores are guaranteed to execute atomically |
{I_lw_cg, I_sw_cg}/cp_align_word, Not tested: atomicity is not observable in single-hart signature tests |
fence_op |
I_fence_cg/{cp_custom_fence_pred_succ}, ordering not tested |
|
fence-tso_op |
I_fence_cg/{cp_custom_fence_reserved}, ordering not tested |
|
fence_unused_flds_rsv |
I_fence_cg/{cp_custom_fence_reserved, cp_custom_fence_pred_succ} |
|
hints_enc |
{I_add_cg, I_addi_cg, I_lui_cg}/cp_rd, I_fence_cg/{cp_custom_fence_pred_succ, cp_custom_fence_reserved} |
|
hints_op |
{I_add_cg, I_addi_cg}/cp_rd, I_fence_cg/{cp_custom_fence_pred_succ, cp_custom_fence_reserved} |
|
rvwmo_single_hart_op |
{I_sw_cg, I_sh_cg, I_sb_cg, I_sd_cg}/cp_rs2_edges, Observation by other harts OUT-OF-SCOPE for single hart |
|
rvwmo_single_copy_atomic |
OUT-OF-SCOPE for single hart |
|
rvwmo_aligned_memop |
OUT-OF-SCOPE for single hart |
|
rvwmo_aligned_amo_memop |
OUT-OF-SCOPE for single hart |
|
rvwmo_misaligned_ldst_memops |
OUT-OF-SCOPE for single hart |
|
rvwmo_fp_gt_xlen_memops |
OUT-OF-SCOPE for single hart |
|
rvwmo_order_multi_memops |
OUT-OF-SCOPE for single hart |
|
rvwmo_misaligned_in_atomic_pma |
OUT-OF-SCOPE for single hart |
|
rvwmo_ppo_lead_in |
OUT-OF-SCOPE for single hart |
|
rvwmo_ppo_overlap1 |
b is a store, and a and b access overlapping memory addresses |
TODO: load then store, and store then store, to one address, checking the load returns the old value and the later store’s value persists, Ordering seen by other harts OUT-OF-SCOPE for single hart |
rvwmo_ppo_overlap2 |
OUT-OF-SCOPE for single hart |
|
rvwmo_ppo_overlap3 |
a is generated by an AMO or SC instruction, b is a load, and b returns a value written by a |
OUT-OF-SCOPE for single hart |
rvwmo_ppo_sync1 |
OUT-OF-SCOPE for single hart |
|
rvwmo_ppo_sync2 |
OUT-OF-SCOPE for single hart |
|
rvwmo_ppo_sync3 |
OUT-OF-SCOPE for single hart |
|
rvwmo_ppo_sync4 |
OUT-OF-SCOPE for single hart |
|
rvwmo_ppo_sync5 |
OUT-OF-SCOPE for single hart |
|
rvwmo_ppo_dep1 |
OUT-OF-SCOPE for single hart |
|
rvwmo_ppo_dep2 |
OUT-OF-SCOPE for single hart |
|
rvwmo_ppo_dep3 |
OUT-OF-SCOPE for single hart |
|
rvwmo_ppo_pipe1 |
OUT-OF-SCOPE for single hart |
|
rvwmo_ppo_pipe2 |
OUT-OF-SCOPE for single hart |
|
rvwmo_obeyed |
OUT-OF-SCOPE for single hart |
|
rvwmo_ld_val_axiom_lead_in |
{I_sw_cg, I_sh_cg, I_sb_cg, I_sd_cg}/cp_rs2_edges, Stores from other harts OUT-OF-SCOPE for single hart |
|
rvwmo_ld_val_axiom_list |
{I_sw_cg, I_sh_cg, I_sb_cg, I_sd_cg}/cp_rs2_edges, Stores from other harts OUT-OF-SCOPE for single hart |
|
rvwmo_atomicity_axiom |
OUT-OF-SCOPE for single hart |
|
rvwmo_progress_axiom |
OUT-OF-SCOPE for single hart |
|
lui_enc |
I_lui_cg/cp_asm_count |
|
auipc_enc |
I_auipc_cg/cp_asm_count |
|
jal_enc |
I_jal_cg/cp_asm_count |
|
jalr_enc |
I_jalr_cg/cp_asm_count |
|
beq_enc |
I_beq_cg/cp_asm_count |
|
bne_enc |
I_bne_cg/cp_asm_count |
|
blt_enc |
I_blt_cg/cp_asm_count |
|
bge_enc |
I_bge_cg/cp_asm_count |
|
bltu_enc |
I_bltu_cg/cp_asm_count |
|
bgeu_enc |
I_bgeu_cg/cp_asm_count |
|
lb_enc |
I_lb_cg/cp_asm_count |
|
lh_enc |
I_lh_cg/cp_asm_count |
|
lw_enc |
I_lw_cg/cp_asm_count |
|
lbu_enc |
I_lbu_cg/cp_asm_count |
|
lhu_enc |
I_lhu_cg/cp_asm_count |
|
sb_enc |
I_sb_cg/cp_asm_count |
|
sh_enc |
I_sh_cg/cp_asm_count |
|
sw_enc |
I_sw_cg/cp_asm_count |
|
addi_enc |
I_addi_cg/cp_asm_count |
|
slti_enc |
I_slti_cg/cp_asm_count |
|
sltiu_enc |
I_sltiu_cg/cp_asm_count |
|
xori_enc |
I_xori_cg/cp_asm_count |
|
ori_enc |
I_ori_cg/cp_asm_count |
|
andi_enc |
I_andi_cg/cp_asm_count |
|
slli_enc |
I_slli_cg/cp_asm_count |
|
srli_enc |
I_srli_cg/cp_asm_count |
|
srai_enc |
I_srai_cg/cp_asm_count |
|
add_enc |
I_add_cg/cp_asm_count |
|
sub_enc |
I_sub_cg/cp_asm_count |
|
sll_enc |
I_sll_cg/cp_asm_count |
|
slt_enc |
I_slt_cg/cp_asm_count |
|
sltu_enc |
I_sltu_cg/cp_asm_count |
|
xor_enc |
I_xor_cg/cp_asm_count |
|
srl_enc |
I_srl_cg/cp_asm_count |
|
sra_enc |
I_sra_cg/cp_asm_count |
|
or_enc |
I_or_cg/cp_asm_count |
|
and_enc |
I_and_cg/cp_asm_count |
|
fence_enc |
I_fence_cg/cp_asm_count |
|
fence-tso_enc |
I_fence_cg/cp_custom_fence_reserved |
|
ecall_enc |
Exceptions_Sm_cg/cp_ecall_m |
|
ebreak_enc |
Exceptions_Sm_cg/cp_breakpoint |
|
rv64i_xreg_sz |
RV64I widens the integer registers and supported user address space to 64 bits, i.e., XLEN=64. |
I_addw_cg/{cp_rs1, cp_rs2, cp_rd, cr_rs1_rs2_edges} |
addiw_op |
I_addiw_cg/{cp_rs1, cp_rd, cr_rs1_imm_edges} |
|
addiw_overflow |
Overflows are ignored and the result is the low 32 bits of the result sign-extended to 64 bits. |
I_addiw_cg/cr_rs1_imm_edges |
addw_subw_op |
{I_addw_cg, I_subw_cg}/{cp_rs1, cp_rs2, cp_rd, cr_rs1_rs2_edges} |
|
addw_subw_overflow |
{I_addw_cg, I_subw_cg}/cr_rs1_rs2_edges |
|
auipc_op_rv64i |
I_auipc_cg/{cp_rd, cp_imm_edges_20bit} |
|
ld_op_rv64i |
The LD instruction loads a 64-bit value from memory into register rd for RV64I. |
I_ld_cg/{cp_rs1_nx0, cp_rd, cp_imm_edges, cp_memval_double} |
lw_op_rv64i |
I_lw_cg/cp_memval_word |
|
lh_lhu_lb_lbu_op_rv64i |
LH and LHU are defined analogously for 16-bit values, as are LB and LBU for 8-bit values. |
I_lb_cg/cp_memval_byte, I_lbu_cg/cp_memval_byte, I_lh_cg/cp_memval_hword, I_lhu_cg/cp_memval_hword |
lui_op_rv64i |
I_lui_cg/cp_imm_edges_20bit |
|
lwu_op |
The LWU instruction, on the other hand, zero-extends the 32-bit value from memory for RV64I. |
I_lwu_cg/cp_memval_word |
rv64_w_sex |
{I_addw_cg, I_sraw_cg}/cr_rs1_rs2_edges, I_addiw_cg/cr_rs1_imm_edges, I_sraiw_cg/cr_rs1_imm_edges_uimmw |
|
sd_sw_sh_sb_op_rv64i |
I_sb_cg/cp_rs2_edges, I_sd_cg/cp_rs2_edges, I_sh_cg/cp_rs2_edges, I_sw_cg/cp_rs2_edges |
|
sll_srl_sra_shamt_rv64i |
In RV64I, only the low 6 bits of rs2 are considered for the shift amount. |
I_sll_cg/cr_rs1_rs2_edges, I_sra_cg/cr_rs1_rs2_edges, I_srl_cg/cr_rs1_rs2_edges |
slliw_srliw_sraiw_imm5_rsv |
SLLIW, SRLIW, and SRAIW encodings with imm[5]≠0 are reserved. |
I_slliw_cg/cp_uimm_5, See also Ssstrict in Section B.5, I_sraiw_cg/cp_uimm_5, See also Ssstrict in Section B.5, I_srliw_cg/cp_uimm_5, See also Ssstrict in Section B.5 |
slliw_srliw_sraiw_op |
I_slliw_cg/{cp_rs1, cp_rd_nx0, cp_uimm_5, cr_rs1_imm_edges_uimmw}, I_sraiw_cg/{cp_rs1, cp_rd_nx0, cp_uimm_5, cr_rs1_imm_edges_uimmw}, I_srliw_cg/{cp_rs1, cp_rd_nx0, cp_uimm_5, cr_rs1_imm_edges_uimmw} |
|
sllw_srlw_sraw_op |
I_sllw_cg/{cp_rs1, cp_rs2, cp_rd, cr_rs1_rs2_edges}, I_sraw_cg/{cp_rs1, cp_rs2, cp_rd, cr_rs1_rs2_edges}, I_srlw_cg/{cp_rs1, cp_rs2, cp_rd, cr_rs1_rs2_edges} |
|
lwu_enc |
I_lwu_cg/cp_asm_count |
|
ld_enc |
I_ld_cg/cp_asm_count |
|
sd_enc |
I_sd_cg/cp_asm_count |
|
addiw_enc |
I_addiw_cg/cp_asm_count |
|
slliw_enc |
I_slliw_cg/cp_asm_count |
|
srliw_enc |
I_srliw_cg/cp_asm_count |
|
sraiw_enc |
I_sraiw_cg/cp_asm_count |
|
addw_enc |
I_addw_cg/cp_asm_count |
|
subw_enc |
I_subw_cg/cp_asm_count |
|
sllw_enc |
I_sllw_cg/cp_asm_count |
|
srlw_enc |
I_srlw_cg/cp_asm_count |
|
sraw_enc |
I_sraw_cg/cp_asm_count |
UDB Parameters: None.
HINTs are covered as follows:
-
Standard HINTs encoded as integer computational instructions with rd =
x0are executed by the x0 bin of cp_rd. These instructions arelui,auipc,addi,andi,ori,xori,add,sub,and,or,xor,sll,srl, andsra, plusaddiw,addw,subw,sllw,srlw, andsrawon RV64. -
fenceHINTs are covered by cp_custom_fence_pred_succ and cp_custom_fence_reserved. -
Ratified HINTs such as Zihintpause and Zihintntl are covered in Section A.10.
-
The semihosting markers
slli x0, x0, 31andsrai x0, x0, 7are standard HINTs, but they are not tested. -
Custom HINTs are not tested. They are the other rd =
x0encodings ofslti,sltiu,slli,srli,srai,slt, andsltu, plusslliw,srliw, andsraiwon RV64. These instructions use cp_rd_nx0 and the cmp_*_nx0 coverpoints, so their tests never writex0.
A.4. M Extension for Integer Multiplication and Division
Table 21 summarizes the coverpoints for the M extension. Table 22 summarizes the relevant normative rules.
| Instruction | div | divu | divuw | divw | mul | mulh | mulhsu | mulhu | mulw | rem | remu | remuw |
|---|---|---|---|---|---|---|---|---|---|---|---|---|
RV32 |
x |
x |
x |
x |
x |
x |
x |
x |
||||
RV64 |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
cp_asm_count |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
cp_rs1 |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
cp_rs2 |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
cp_rd |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
cp_rs1_edges |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
cp_rs2_edges |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
cr_rs1_rs2_edges |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
cmp_rs1_rs2 |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
cmp_rd_rs1 |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
cmp_rd_rs2 |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
cmp_rd_rs1_rs2 |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
| Instruction | remw |
|---|---|
RV64 |
x |
cp_asm_count |
x |
cp_rs1 |
x |
cp_rs2 |
x |
cp_rd |
x |
cp_rs1_edges |
x |
cp_rs2_edges |
x |
cr_rs1_rs2_edges |
x |
cmp_rs1_rs2 |
x |
cmp_rd_rs1 |
x |
cmp_rd_rs2 |
x |
cmp_rd_rs1_rs2 |
x |
| Normative Rule | Rule Text | Coverpoints |
|---|---|---|
mul_op |
M_mul_cg/{cp_rs1, cp_rs2, cp_rd, cr_rs1_rs2_edges} |
|
mulh_mulhu_mulhsu_op |
{M_mulh_cg, M_mulhu_cg, M_mulhsu_cg}/{cp_rs1, cp_rs2, cp_rd, cr_rs1_rs2_edges} |
|
div_divu_op |
{M_div_cg, M_divu_cg}/{cp_rs1, cp_rs2, cp_rd, cr_rs1_rs2_edges} |
|
divw_divuw_op |
{M_divw_cg, M_divuw_cg}/{cp_rs1, cp_rs2, cp_rd, cr_rs1_rs2_edges} |
|
rem_remu_op |
REM and REMU provide the remainder of the corresponding division operation. |
{M_rem_cg, M_remu_cg}/{cp_rs1, cp_rs2, cp_rd, cr_rs1_rs2_edges} |
remw_remuw_op |
{M_remw_cg, M_remuw_cg}/{cp_rs1, cp_rs2, cp_rd, cr_rs1_rs2_edges} |
|
div_by_zero |
{M_div_cg, M_divu_cg, M_divw_cg, M_divuw_cg}/{cr_rs1_rs2_edges} |
|
rem_by_zero |
{M_rem_cg, M_remu_cg, M_remw_cg, M_remuw_cg}/{cr_rs1_rs2_edges} |
|
signed_div_overflow |
{M_div_cg, M_rem_cg, M_divw_cg, M_remw_cg}/{cr_rs1_rs2_edges} |
|
rem_result_sign |
For REM, the sign of a nonzero result equals the sign of the dividend. |
{M_rem_cg, M_remw_cg}/{cr_rs1_rs2_edges} |
remw_remuw_result_sign |
Both REMW and REMUW always sign-extend the 32-bit result to 64 bits, including on a divide by zero. |
{M_remw_cg, M_remuw_cg}/{cr_rs1_rs2_edges} |
mulw_op |
M_mulw_cg/{cp_rs1, cp_rs2, cp_rd, cr_rs1_rs2_edges} |
|
mul_enc |
M_mul_cg/cp_asm_count |
|
mulh_enc |
M_mulh_cg/cp_asm_count |
|
mulhsu_enc |
M_mulhsu_cg/cp_asm_count |
|
mulhu_enc |
M_mulhu_cg/cp_asm_count |
|
div_enc |
M_div_cg/cp_asm_count |
|
divu_enc |
M_divu_cg/cp_asm_count |
|
rem_enc |
M_rem_cg/cp_asm_count |
|
remu_enc |
M_remu_cg/cp_asm_count |
|
mulw_enc |
M_mulw_cg/cp_asm_count |
|
divw_enc |
M_divw_cg/cp_asm_count |
|
divuw_enc |
M_divuw_cg/cp_asm_count |
|
remw_enc |
M_remw_cg/cp_asm_count |
|
remuw_enc |
M_remuw_cg/cp_asm_count |
UDB Parameters: None.
A.4.1. Zmmul
The Zmmul extension is a subset of the M extension that includes only the multiply instructions. The coverpoints are listed in Table 23. If a configuration supports M, it implicitly also supports Zmmul, and thus these multiply instructions are tested twice. The runtime is negligible so multiplication is left in M to avoid confusion.
| Instruction | mul | mulh | mulhsu | mulhu | mulw |
|---|---|---|---|---|---|
RV32 |
x |
x |
x |
x |
|
RV64 |
x |
x |
x |
x |
x |
cp_asm_count |
x |
x |
x |
x |
x |
cp_rs1 |
x |
x |
x |
x |
x |
cp_rs2 |
x |
x |
x |
x |
x |
cp_rd |
x |
x |
x |
x |
x |
cp_rs1_edges |
x |
x |
x |
x |
x |
cp_rs2_edges |
x |
x |
x |
x |
x |
cr_rs1_rs2_edges |
x |
x |
x |
x |
x |
cmp_rs1_rs2 |
x |
x |
x |
x |
x |
cmp_rd_rs1 |
x |
x |
x |
x |
x |
cmp_rd_rs2 |
x |
x |
x |
x |
x |
cmp_rd_rs1_rs2 |
x |
x |
x |
x |
x |
| Normative Rule | Rule Text | Coverpoints |
|---|---|---|
Zmmul_insns |
{Zmmul_mul_cg, Zmmul_mulh_cg, Zmmul_mulhu_cg, Zmmul_mulhsu_cg}/cp_asm_count |
|
Zmmul_enc_same |
The encodings and semantics are identical to those of the corresponding instructions in |
{Zmmul_mul_cg, Zmmul_mulh_cg, Zmmul_mulhu_cg, Zmmul_mulhsu_cg}/cr_rs1_rs2_edges |
M_implies_Zmmul |
Definition, checked through UDB |
|
mul_op |
Zmmul_mul_cg/{cp_rs1, cp_rs2, cp_rd, cr_rs1_rs2_edges} |
|
mulh_mulhu_mulhsu_op |
{Zmmul_mulh_cg, Zmmul_mulhu_cg, Zmmul_mulhsu_cg}/cr_rs1_rs2_edges |
|
mulw_op |
Zmmul_mulw_cg/{cp_rs1, cp_rs2, cp_rd, cr_rs1_rs2_edges} |
UDB Parameters: None.
A.5. C Compressed Extension
The C extension is subdivided into Zca, Zcf, and Zcd. All configurations supporting C contain Zca. RV32CF configurations also contain Zcf, and RV{32/64}CD configurations also contain Zcd. A configuration supporting C should test all of the applicable Zc* extensions.
Compressed-instruction behavior that traps (reserved encodings, illegal instructions, misaligned and faulting loads and stores) is covered by the Exceptions_Zc (Table 184) and Ssstrict_S (Table 215) test plans. Table 190 summarizes the normative rules for compressed-instruction exceptions.
A.5.1. Zca Compressed Extension
Table 25 summarizes the coverpoints for the Zca extension.
These include the standard compressed HINTs in the cp_c_hint_* family. Note that some of these HINTs (c.add x0, x2-x5) are also Zihintntl HINTs.
The c.slli, c.srli, and c.srai HINT encodings (shamt = 0, and c.slli with rd = x0) are designated for custom use, so they are deliberately not tested.
| Instruction | c.add | c.addi | c.addi16sp | c.addi4spn | c.addiw | c.addw | c.and | c.andi | c.beqz | c.bnez | c.j | c.jal |
|---|---|---|---|---|---|---|---|---|---|---|---|---|
RV32 |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
||
RV64 |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
|
cp_asm_count |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
cp_rs1 |
nx0 |
nx0 |
nx0 |
p |
p |
p |
p |
p |
||||
cp_rs2 |
nx0 |
p |
p |
|||||||||
cp_rd |
p |
|||||||||||
cp_rs1_edges |
x |
x |
x |
x |
x |
x |
x |
x |
||||
cp_rs2_edges |
x |
x |
x |
|||||||||
cr_rs1_imm_edges |
6bit_n0 |
6bit |
6bit |
|||||||||
cr_rs1_rs2_edges |
x |
x |
x |
|||||||||
cmp_rs1_rs2 |
nx0 |
c |
c |
|||||||||
cp_offset |
x |
x |
x |
x |
||||||||
cp_imm_edges |
c_branch |
c_branch |
c_jal |
c_jal |
||||||||
cp_imm_mul |
addi16sp |
addi4spn |
||||||||||
cp_c_hint |
add |
addi |
| Instruction | c.jalr | c.jr | c.ld | c.ldsp | c.li | c.lui | c.lw | c.lwsp | c.mv | c.nop | c.or | c.sd |
|---|---|---|---|---|---|---|---|---|---|---|---|---|
RV32 |
x |
x |
x |
x |
x |
x |
x |
x |
x |
|||
RV64 |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
cp_asm_count |
x |
x |
x |
x |
x |
x |
x |
x |
x |
nop |
x |
x |
cp_rs1 |
nx0 |
nx0 |
p |
nx0 |
nx2 |
p |
p |
p |
||||
cp_rs2 |
nx0 |
p |
p |
|||||||||
cp_rd |
p |
nx0 |
p |
nx0 |
nx0 |
|||||||
cp_rs1_edges |
x |
|||||||||||
cp_rs2_edges |
x |
x |
x |
|||||||||
cr_rs1_rs2_edges |
x |
|||||||||||
cmp_rs1_rs2 |
nx0 |
c |
||||||||||
cmp_rd_rs1 |
c |
c |
||||||||||
cp_offset |
c_jr |
c_jr |
||||||||||
cp_imm_edges |
6bit |
6bit_n0 |
||||||||||
cp_imm_mul |
8 |
8sp |
x |
4sp |
8 |
|||||||
cp_c_hint |
li |
lui |
mv |
nop |
||||||||
cp_memval |
double |
double |
word |
word |
| Instruction | c.sdsp | c.slli | c.srai | c.srli | c.sub | c.subw | c.sw | c.swsp | c.xor |
|---|---|---|---|---|---|---|---|---|---|
RV32 |
x |
x |
x |
x |
x |
x |
x |
||
RV64 |
x |
x |
x |
x |
x |
x |
x |
x |
x |
cp_asm_count |
x |
x |
x |
x |
x |
x |
x |
x |
x |
cp_rs1 |
nx0 |
p |
p |
p |
p |
p |
p |
||
cp_rs2 |
x |
p |
p |
p |
x |
p |
|||
cp_rs1_edges |
x |
x |
x |
x |
x |
x |
|||
cp_rs2_edges |
x |
x |
x |
x |
x |
x |
|||
cr_rs1_imm_edges |
c |
c |
c |
||||||
cr_rs1_rs2_edges |
x |
x |
x |
||||||
cmp_rs1_rs2 |
c |
c |
c |
||||||
cp_uimm |
n0 |
n0 |
n0 |
||||||
cp_imm_mul |
8sp |
x |
4sp |
Modified coverpoints for Zc* are summarized in Table 26. As defined in Table 11, the p versions of coverpoints work on registers x8-x15.
| Modified Coverpoint | Bins | Definition |
|---|---|---|
cp_asm_count_nop |
1 |
Number of times the canonical |
cp_rs1_nx2 |
30 |
rs1 (the destination of |
cp_uimm_n0 |
31 (RV32), 63 (RV64) |
Nonzero 5- or 6-bit shift amounts 1 to XLEN-1 |
cp_imm_edges_6bit |
13 |
Signed 6-bit immediates 0, 1, 2, 3, 4, 8, 16, 30, 31, -32, -31, -2, -1 |
cp_imm_edges_6bit_n0 |
12 |
cp_imm_edges_6bit excluding 0 |
cp_imm_edges_c |
11 (RV32), 16 (RV64) |
Unsigned 5- or 6-bit shift amounts 1, 2, 3, 4, 8, 14, 15, 16, 17, 30, 31. XLEN=64 adds 32, 33, 48, 62, 63 |
cr_rs1_imm_edges_6bit |
12*13 (RV32), 18*13 (RV64) |
rs1 edges x cp_imm_edges_6bit |
cr_rs1_imm_edges_6bit_n0 |
12*12 (RV32), 18*12 (RV64) |
rs1 edges x cp_imm_edges_6bit_n0 |
cr_rs1_imm_edges_c |
12*11 (RV32), 18*16 (RV64) |
rs1 edges x cp_imm_edges_c |
cp_imm_edges_c_jal |
21 |
Selected signed multiples of 2 from -2048 to 1024 |
cp_imm_edges_c_branch |
15 |
Branch offsets for |
cmp_rs1_rs2_c |
8 |
Same register x8-x15 for both rs1 and rs2 (and hence rd) |
cmp_rd_rs1_c |
8 |
Same register x8-x15 for both rd and rs1 (the base address of a compressed load) |
cp_imm_mul |
32 |
Multiples of 4 from 0 to 124 |
cp_imm_mul_4sp |
64 |
Multiples of 4 from 0 to 252 |
cp_imm_mul_8 |
32 |
Multiples of 8 from 0 to 248 |
cp_imm_mul_8sp |
64 |
Multiples of 8 from 0 to 504 |
cp_imm_mul_addi16sp |
63 |
Nonzero multiples of 16 from -512 to 496 |
cp_imm_mul_addi4spn |
255 |
Multiples of 4 from 4 to 1020 |
cp_offset_lsbs |
4 |
rs1_val[1:0] of the |
cp_uimm_2 |
4 |
Zcb byte offsets 0-3 for |
cp_uimm_2h |
2 |
Zcb halfword offsets 0 and 2 for |
cp_c_hint_{nop,addi,li,lui,mv,add} |
63+31+64+63+31+31 |
Compressed standard HINTs |
| Normative Rule | Rule Text | Coverpoints |
|---|---|---|
C_dep_Zca |
Definition, checked through UDB |
|
Zca_offsets_mul2 |
Zca_c_j_cg/{cp_imm_edges_c_jal}, Zca_c_beqz_cg/{cp_imm_edges_c_branch} |
|
Zca_regs8 |
Zca_c_and_cg/{cp_rs1_p, cp_rs2_p} |
|
c-add_op |
Zca_c_add_cg/{cp_rs1_nx0, cp_rs2_nx0, cr_rs1_rs2_edges} |
|
c-add_val |
Zca_c_add_cg/{cp_rs1_nx0, cp_rs2_nx0} |
|
c-addi16sp_op |
Zca_c_addi16sp_cg/{cp_imm_mul_addi16sp} |
|
c-addi4spn_op |
Zca_c_addi4spn_cg/{cp_imm_mul_addi4spn} |
|
c-addi_nop |
Zca_c_nop_cg/{cp_asm_count_nop, cp_c_hint_nop} |
|
c-addi_op |
Zca_c_addi_cg/{cp_rs1_nx0, cr_rs1_imm_edges_6bit_n0} |
|
c-addiw_op |
Zca_c_addiw_cg/{cp_rs1_nx0, cr_rs1_imm_edges_6bit} |
|
c-addw_op |
Zca_c_addw_cg/{cp_rs1_p, cp_rs2_p, cr_rs1_rs2_edges} |
|
c-and_op |
Zca_c_and_cg/{cp_rs1_p, cp_rs2_p, cr_rs1_rs2_edges} |
|
c-andi_op |
Zca_c_andi_cg/{cp_rs1_p, cr_rs1_imm_edges_6bit} |
|
c-beqz_op |
Zca_c_beqz_cg/{cp_rs1_p, cp_rs1_edges, cp_offset, cp_imm_edges_c_branch} |
|
c-bnez_op |
Zca_c_bnez_cg/{cp_rs1_p, cp_rs1_edges, cp_offset, cp_imm_edges_c_branch} |
|
c-j_op |
Zca_c_j_cg/{cp_imm_edges_c_jal} |
|
c-jal_op |
Zca_c_jal_cg/{cp_imm_edges_c_jal} |
|
c-jalr_op |
Zca_c_jalr_cg/{cp_rs1_nx0, cp_offset_lsbs} |
|
c-jr_op |
Zca_c_jr_cg/{cp_rs1_nx0, cp_offset_lsbs} |
|
c-ld_op |
Zca_c_ld_cg/{cp_rs1_p, cp_rd_p, cp_imm_mul_8, cp_memval_double} |
|
c-ldsp_op |
Zca_c_ldsp_cg/{cp_rd_nx0, cp_imm_mul_8sp, cp_memval_double} |
|
c-li_op |
Zca_c_li_cg/{cp_rs1_nx0, cp_imm_edges_6bit} |
|
c-lui_op |
Zca_c_lui_cg/{cp_rs1_nx2, cp_imm_edges_6bit_n0} |
|
c-lw_op |
Zca_c_lw_cg/{cp_rs1_p, cp_rd_p, cp_imm_mul, cp_memval_word} |
|
c-lwsp_op |
Zca_c_lwsp_cg/{cp_rd_nx0, cp_imm_mul_4sp, cp_memval_word} |
|
c-mv_jr |
C.MV is valid only when rs2≠x0; the code points with rs2=x0 correspond to the C.JR instruction. |
Zca_c_jr_cg/{cp_rs1_nx0, cp_offset_lsbs} |
c-mv_op |
C.MV copies the value in register rs2 into register rd. It expands into ADD rd, x0, rs2. |
Zca_c_mv_cg/{cp_rd_nx0, cp_rs2_nx0} |
c-nop_op |
Zca_c_nop_cg/{cp_asm_count_nop} |
|
c-or_op |
Zca_c_or_cg/{cp_rs1_p, cp_rs2_p, cr_rs1_rs2_edges} |
|
c-sd_op |
Zca_c_sd_cg/{cp_rs1_p, cp_rs2_p, cp_rs2_edges, cp_imm_mul_8} |
|
c-sdsp_op |
Zca_c_sdsp_cg/{cp_rs2, cp_rs2_edges, cp_imm_mul_8sp} |
|
c-slli_op |
Zca_c_slli_cg/{cp_rs1_nx0, cr_rs1_imm_edges_c} |
|
c-slli_shamt5 |
Zca_c_slli_cg/{cp_uimm_n0} |
|
c-srai_op |
Zca_c_srai_cg/{cp_rs1_p, cr_rs1_imm_edges_c} |
|
c-srli_op |
Zca_c_srli_cg/{cp_rs1_p, cr_rs1_imm_edges_c} |
|
c-srli_shamt5 |
Zca_c_srli_cg/{cp_uimm_n0} |
|
c-sub_op |
Zca_c_sub_cg/{cp_rs1_p, cp_rs2_p, cr_rs1_rs2_edges} |
|
c-subw_op |
Zca_c_subw_cg/{cp_rs1_p, cp_rs2_p, cr_rs1_rs2_edges} |
|
c-sw_op |
Zca_c_sw_cg/{cp_rs1_p, cp_rs2_p, cp_rs2_edges, cp_imm_mul} |
|
c-swsp_op |
Zca_c_swsp_cg/{cp_rs2, cp_rs2_edges, cp_imm_mul_4sp} |
|
c-xor_op |
Zca_c_xor_cg/{cp_rs1_p, cp_rs2_p, cr_rs1_rs2_edges} |
|
Zca_hints |
Zca_c_add_cg/{cp_c_hint_add} |
|
c-add_hint |
Zca_c_add_cg/{cp_c_hint_add} |
|
c-addi_hint |
Zca_c_addi_cg/{cp_c_hint_addi} |
|
c-li_hint |
Zca_c_li_cg/{cp_c_hint_li} |
|
c-lui_hint |
Zca_c_lui_cg/{cp_c_hint_lui} |
|
c-mv_hint |
Zca_c_mv_cg/{cp_c_hint_mv} |
|
c-nop_hint |
Zca_c_nop_cg/{cp_c_hint_nop} |
|
c-slli_hint |
The C.SLLI code points with shamt=0 or with rd=x0 are HINTs. |
N/A custom hints not certified |
c-srli_hint |
N/A custom hints not certified |
UDB Parameters: None.
A.5.2. Zcf Compressed Floating-Point Extension
Table 28 summarizes the coverpoints for the Zcf extension.
| Instruction | c.flw | c.flwsp | c.fsw | c.fswsp |
|---|---|---|---|---|
RV32 |
x |
x |
x |
x |
cp_asm_count |
x |
x |
x |
x |
cp_rs1 |
p |
p |
||
cp_fd |
p |
x |
||
cp_fs2 |
p |
x |
||
cp_imm_mul |
x |
4sp |
x |
4sp |
cp_memval |
fp_single |
fp_single |
| Normative Rule | Rule Text | Coverpoints |
|---|---|---|
c-flwsp_op |
Zcf_c_flwsp_cg/{cp_fd, cp_imm_mul_4sp, cp_memval_fp_single} |
|
c-fswsp_op |
Zcf_c_fswsp_cg/{cp_fs2, cp_imm_mul_4sp} |
|
Zc_fp_regs |
Zcf_c_flw_cg/cp_fd_p, Zcf_c_fsw_cg/cp_fs2_p |
|
c-flw_op |
Zcf_c_flw_cg/{cp_rs1_p, cp_fd_p, cp_imm_mul, cp_memval_fp_single} |
|
c-fsw_op |
Zcf_c_fsw_cg/{cp_rs1_p, cp_fs2_p, cp_imm_mul} |
|
C_dep_Zcf |
Not tested: extension dependency checked by the UDB configuration |
|
Zce_dep_Zcf |
Not tested: extension dependency checked by the UDB configuration |
UDB Parameters: None.
A.5.3. Zcd Compressed Double-Precision FP Extension
Table 30 summarizes the coverpoints for the Zcd extension.
| Instruction | c.fld | c.fldsp | c.fsd | c.fsdsp |
|---|---|---|---|---|
RV32 |
x |
x |
x |
x |
RV64 |
x |
x |
x |
x |
cp_asm_count |
x |
x |
x |
x |
cp_rs1 |
p |
p |
||
cp_fd |
p |
x |
||
cp_fs2 |
p |
x |
||
cp_imm_mul |
8 |
8sp |
8 |
8sp |
cp_memval |
fp_double |
fp_double |
| Normative Rule | Rule Text | Coverpoints |
|---|---|---|
Zc_fp_regs |
Zcd_c_fld_cg/cp_fd_p, Zcd_c_fsd_cg/cp_fs2_p |
|
c-fldsp_op |
Zcd_c_fldsp_cg/{cp_fd, cp_imm_mul_8sp, cp_memval_fp_double} |
|
c-fsdsp_op |
Zcd_c_fsdsp_cg/{cp_fs2, cp_imm_mul_8sp} |
|
c-fld_op |
Zcd_c_fld_cg/{cp_rs1_p, cp_fd_p, cp_imm_mul_8, cp_memval_fp_double} |
|
c-fsd_op |
Zcd_c_fsd_cg/{cp_rs1_p, cp_fs2_p, cp_imm_mul_8} |
|
C_dep_Zcd |
If the |
Not tested: extension dependency checked by the UDB configuration |
UDB Parameters: None.
A.5.4. Zcb Additional Compressed Instructions
Table 32 summarizes the coverpoints for the Zcb extension. The rows with an entry in the ExtraExtensions column apply only when that extension is also supported: c.mul needs Zmmul (which M implies), c.zext.w needs Zba, and c.sext.b, c.sext.h, and c.zext.h need Zbb.
| Instruction | c.lbu | c.lh | c.lhu | c.not | c.sb | c.sh | c.zext.b | c.mul | c.zext.w | c.sext.b | c.sext.h | c.zext.h |
|---|---|---|---|---|---|---|---|---|---|---|---|---|
RV32 |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
|
RV64 |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
ExtraExtensions |
Zmmul |
Zba |
Zbb |
Zbb |
Zbb |
|||||||
cp_asm_count |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
cp_rs1 |
p |
p |
p |
p |
p |
p |
p |
p |
p |
p |
p |
p |
cp_rs2 |
p |
p |
p |
|||||||||
cp_rd |
p |
p |
p |
|||||||||
cp_rs1_edges |
x |
x |
x |
x |
x |
x |
x |
|||||
cp_rs2_edges |
x |
x |
x |
|||||||||
cr_rs1_rs2_edges |
x |
|||||||||||
cmp_rs1_rs2 |
c |
|||||||||||
cmp_rd_rs1 |
c |
c |
c |
|||||||||
cp_uimm |
2 |
2h |
2h |
2 |
2h |
| Normative Rule | Rule Text | Coverpoints |
|---|---|---|
c-lbu_op |
Zcb_c_lbu_cg/{cp_rs1_p, cp_rd_p, cp_uimm_2} |
|
c-lh_op |
Zcb_c_lh_cg/{cp_rs1_p, cp_rd_p, cp_uimm_2h} |
|
c-lhu_op |
Zcb_c_lhu_cg/{cp_rs1_p, cp_rd_p, cp_uimm_2h} |
|
c-mul_op |
ZcbZmmul_c_mul_cg/{cp_rs1_p, cp_rs2_p, cr_rs1_rs2_edges} |
|
c-not_op |
takes the one’s complement of rd'/rs1' and writes the result to the same register. |
Zcb_c_not_cg/{cp_rs1_p, cp_rs1_edges} |
c-sb_op |
Zcb_c_sb_cg/{cp_rs1_p, cp_rs2_p, cp_rs2_edges, cp_uimm_2} |
|
c-sext-b_op |
ZcbZbb_c_sext_b_cg/{cp_rs1_p, cp_rs1_edges} |
|
c-sext-h_op |
ZcbZbb_c_sext_h_cg/{cp_rs1_p, cp_rs1_edges} |
|
c-sh_op |
Zcb_c_sh_cg/{cp_rs1_p, cp_rs2_p, cp_rs2_edges, cp_uimm_2h} |
|
c-zext-b_op |
Zcb_c_zext_b_cg/{cp_rs1_p, cp_rs1_edges} |
|
c-zext-h_op |
ZcbZbb_c_zext_h_cg/{cp_rs1_p, cp_rs1_edges} |
|
c-zext-w_op |
ZcbZba_c_zext_w_cg/{cp_rs1_p, cp_rs1_edges} |
|
Zce_dep |
The |
Definition, checked through UDB |
UDB Parameters: None.
A.6. A Atomic Extension
The A extension is subdivided into Zaamo and Zalrsc.
This section exercises unprivileged tests that will not trap. Privileged tests are in other sections, such as Exceptions_Zaamo.
A.6.1. Zaamo Atomic Memory Operations Extension
Table 34 summarizes the coverpoints for the Zaamo extension.
| Instruction | amoadd.d | amoadd.w | amoand.d | amoand.w | amomax.d | amomax.w | amomaxu.d | amomaxu.w | amomin.d | amomin.w | amominu.d | amominu.w |
|---|---|---|---|---|---|---|---|---|---|---|---|---|
RV32 |
x |
x |
x |
x |
x |
x |
||||||
RV64 |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
cp_asm_count |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
cp_rs1 |
nx0 |
nx0 |
nx0 |
nx0 |
nx0 |
nx0 |
nx0 |
nx0 |
nx0 |
nx0 |
nx0 |
nx0 |
cp_rs2 |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
cp_rd |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
cp_rs2_edges |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
cmp_rs1_rs2 |
nx0 |
nx0 |
nx0 |
nx0 |
nx0 |
nx0 |
nx0 |
nx0 |
nx0 |
nx0 |
nx0 |
nx0 |
cmp_rd_rs1 |
nx0 |
nx0 |
nx0 |
nx0 |
nx0 |
nx0 |
nx0 |
nx0 |
nx0 |
nx0 |
nx0 |
nx0 |
cmp_rd_rs2 |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
cmp_rd_rs1_rs2 |
nx0 |
nx0 |
nx0 |
nx0 |
nx0 |
nx0 |
nx0 |
nx0 |
nx0 |
nx0 |
nx0 |
nx0 |
cp_align |
word |
word |
word |
word |
word |
word |
||||||
cp_memval |
double |
word |
double |
word |
double |
word |
double |
word |
double |
word |
double |
word |
cp_custom |
amo_aqrl |
amo_aqrl |
amo_aqrl |
amo_aqrl |
amo_aqrl |
amo_aqrl |
amo_aqrl |
amo_aqrl |
amo_aqrl |
amo_aqrl |
amo_aqrl |
amo_aqrl |
cr_memval_rs2_edges |
double |
word |
double |
word |
double |
word |
double |
word |
| Instruction | amoor.d | amoor.w | amoswap.d | amoswap.w | amoxor.d | amoxor.w |
|---|---|---|---|---|---|---|
RV32 |
x |
x |
x |
|||
RV64 |
x |
x |
x |
x |
x |
x |
cp_asm_count |
x |
x |
x |
x |
x |
x |
cp_rs1 |
nx0 |
nx0 |
nx0 |
nx0 |
nx0 |
nx0 |
cp_rs2 |
x |
x |
x |
x |
x |
x |
cp_rd |
x |
x |
x |
x |
x |
x |
cp_rs2_edges |
x |
x |
x |
x |
x |
x |
cmp_rs1_rs2 |
nx0 |
nx0 |
nx0 |
nx0 |
nx0 |
nx0 |
cmp_rd_rs1 |
nx0 |
nx0 |
nx0 |
nx0 |
nx0 |
nx0 |
cmp_rd_rs2 |
x |
x |
x |
x |
x |
x |
cmp_rd_rs1_rs2 |
nx0 |
nx0 |
nx0 |
nx0 |
nx0 |
nx0 |
cp_align |
word |
word |
word |
|||
cp_memval |
double |
word |
double |
word |
double |
word |
cp_custom |
amo_aqrl |
amo_aqrl |
amo_aqrl |
amo_aqrl |
amo_aqrl |
amo_aqrl |
| Coverpoint | Bins | Definition |
|---|---|---|
cp_custom_amo_aqrl coverpoints |
||
cp_custom_aqrl |
4 |
none, aq, rl, aqrl |
cr_memval_rs2_edges coverpoints (amomin, amomax, amominu, amomaxu) |
||
cr_memval_rs2_edges |
cp_memval bins x cp_rs2_edges bins |
Cross of the standard memory-value and rs2 edge coverpoints |
| Normative Rule | Rule Text | Coverpoints |
|---|---|---|
A_aq_rl_bits |
Zaamo_amoadd_w_cg/cp_custom_aqrl |
|
amo_release_consistency |
OUT-OF-SCOPE for single hart |
|
A_domain_specific_ordering |
OUT-OF-SCOPE for single hart |
|
A_no_aq_rl |
OUT-OF-SCOPE for single hart |
|
A_acquire_semantics |
OUT-OF-SCOPE for single hart |
|
A_release_semantics |
OUT-OF-SCOPE for single hart |
|
A_seq_cst_semantics |
OUT-OF-SCOPE for single hart |
|
A_comprises |
Definition, checked through UDB |
|
amo_op |
Zaamo_amoadd_w_cg/{cp_memval_word, cp_rs2_edges}, Zaamo_amoadd_d_cg/{cp_memval_double, cp_rs2_edges} |
|
amo_ops_supported |
{Zaamo_amoswap_w_cg, Zaamo_amoadd_w_cg, Zaamo_amoand_w_cg, Zaamo_amoor_w_cg, Zaamo_amoxor_w_cg}/cp_asm_count, {Zaamo_amomin_w_cg, Zaamo_amomax_w_cg, Zaamo_amominu_w_cg, Zaamo_amomaxu_w_cg}/cr_memval_rs2_edges_word |
|
amo_operand_size |
Zaamo_amoadd_w_cg/{cp_memval_word, cp_rs2_edges}, Zaamo_amoadd_d_cg/{cp_memval_double, cp_rs2_edges} |
|
misaligned_atomicity_granule_size |
OUT-OF-SCOPE: aligned AMOs only; misaligned AMOs are exercised by Zama16b and Exceptions_Zaamo |
|
amo_alignment |
Zaamo_amoadd_w_cg/cp_align_word |
|
pma_amo_sz_support |
{Zaamo_amoadd_w_cg, Zaamo_amoadd_d_cg}/cp_asm_count |
UDB Parameters: None.
| This test suite is unprivileged and does not perform misaligned accesses. The MISALIGNED_AMO parameter affects the expected results of Exceptions_Zaamo/cp_amo_address_misaligned (Table 183). |
A.6.2. Zalrsc Load-Reserved / Store-Conditional Extension
Table 37 summarizes the coverpoints for the Zalrsc extension.
| Instruction | lr.d | lr.w | sc.d | sc.w |
|---|---|---|---|---|
RV32 |
x |
x |
||
RV64 |
x |
x |
x |
x |
cp_asm_count |
x |
x |
x |
x |
cp_rs1 |
nx0 |
nx0 |
nx0 |
nx0 |
cp_rs2 |
x |
x |
||
cp_rd |
x |
x |
x |
x |
cp_rs2_edges |
x |
x |
||
cmp_rs1_rs2 |
nx0 |
nx0 |
||
cmp_rd_rs1 |
nx0 |
nx0 |
nx0 |
nx0 |
cmp_rd_rs2 |
x |
x |
||
cmp_rd_rs1_rs2 |
nx0 |
nx0 |
||
cp_custom |
lr |
lr |
sc |
sc |
| Coverpoint | Bins | Definition |
|---|---|---|
cp_custom_lr coverpoints |
||
cp_custom_aqrl |
3 |
none, aq, aqrl |
cp_custom_rd_edges |
3 |
rd_value = 0, 1, -1 |
cp_custom_sc coverpoints |
||
cp_custom_aqrl |
3 |
none, rl, aqrl. Each sc is retried in a constrained LR/SC loop of up to 100 attempts. |
cp_custom_sc_after_sc |
2 |
sc immediately preceded or not preceded by another sc |
cp_custom_sc_lr |
2 |
lr followed by sc that fails and passes, sc pairs with most recent lr. The passing sc is retried in a constrained LR/SC loop of up to 100 attempts. |
cp_custom_sc_addresses |
32 |
lr followed by sc of the same size at an address 0, 8, …, 248 bytes above the lr address. The sc may succeed if the reservation set includes its address, so it is retried up to 100 times. This is not a constrained LR/SC loop, because the sc and lr addresses differ. |
A single LR/SC pair may fail spuriously, and only a constrained LR/SC loop is guaranteed to succeed eventually. Therefore, every sc test that can succeed retries its lr/sc pair up to 100 times, including the standard register and value coverpoints of sc.w and sc.d.
| Normative Rule | Rule Text | Coverpoints |
|---|---|---|
A_aq_rl_bits |
Zalrsc_lr_w_cg/cp_custom_aqrl |
|
A_domain_specific_ordering |
OUT-OF-SCOPE for single hart without defined I/O domains |
|
A_no_aq_rl |
OUT-OF-SCOPE for single hart |
|
A_acquire_semantics |
OUT-OF-SCOPE for single hart |
|
A_release_semantics |
OUT-OF-SCOPE for single hart |
|
A_seq_cst_semantics |
OUT-OF-SCOPE for single hart |
|
A_comprises |
Definition, checked through UDB |
|
lr-w_op |
Zalrsc_lr_w_cg/{cp_rs1_nx0, cp_rd, cp_custom_rd_edges} |
|
sc-w_success |
Zalrsc_sc_w_cg/cp_sc_pass_fail |
|
sc-w_failure |
If the SC.W fails, the instruction does not write to memory, and it writes a nonzero value to rd. |
Zalrsc_sc_w_cg/cp_sc_pass_fail |
sc_failed_side_effects |
NONE: Behavior is UNSPECIFIED and OUT-OF-SCOPE |
|
sc_reservation_invalidate |
Zalrsc_sc_w_cg/cp_custom_sc_after_sc |
|
lr_sc_rv64 |
Zalrsc_lr_d_cg/{cp_rs1_nx0, cp_rd}, Zalrsc_sc_d_cg/cp_sc_pass_fail, Zalrsc_lr_w_cg/cp_custom_rd_edges; its max bin on RV64 checks that LR.W sign-extends |
|
sc_failure_code |
Zalrsc_sc_w_cg/cp_sc_pass_fail |
|
lr_reservation_set_size |
Zalrsc_sc_w_cg/cp_custom_sc_addresses |
|
sc_pairs_latest_lr |
An SC can only pair with the most recent LR in program order. |
Zalrsc_sc_w_cg/cp_custom_sc_lr; the LR, LR (other address), SC testcase is directed and hits no bin of its own |
sc_success_conditions |
Zalrsc_sc_w_cg/cp_custom_sc_after_sc; multihart not tested |
|
sc_device_write_failure |
OUT-OF-SCOPE: device writes not modeled |
|
sc_addr_not_in_reservation_fail |
Zalrsc_sc_w_cg/cp_custom_sc_addresses |
|
sc_other_hart_store_fail |
OUT-OF-SCOPE for single hart |
|
sc_other_device_write_fail |
OUT-OF-SCOPE: device writes not modeled |
|
sc_intervening_sc_fail |
An SC must fail if there is another SC (to any address) between the LR and the SC in program order. |
Zalrsc_sc_w_cg/cp_custom_sc_after_sc |
lr_sc_atomicity_axiom |
OUT-OF-SCOPE for single hart |
|
sc_not_observable_before_lr |
OUT-OF-SCOPE for single hart |
|
constrained_lrsc_loop_size |
Untested |
|
constrained_lrsc_instruction_set |
Untested |
|
constrained_lrsc_compressed_allowed |
Untested |
|
constrained_lrsc_retry_code |
Untested |
|
lrsc_eventuality_region |
PMAs not tested |
|
lrsc_same_address_and_size |
Zalrsc_sc_w_cg/cp_custom_sc_addresses |
|
unconstrained_lrsc_no_progress |
Behavior is unconstrained |
|
constrained_lrsc_forward_progress_intro |
{Zalrsc_sc_w_cg, Zalrsc_sc_d_cg}/cp_custom_sc_lr; SC success cases (except rd = x0) run in a bounded constrained LR/SC loop, other harts and devices OUT-OF-SCOPE for single hart |
|
constrained_lrsc_forward_progress_sc |
{Zalrsc_sc_w_cg, Zalrsc_sc_d_cg}/cp_custom_sc_lr; SC success cases (except rd = x0) run in a bounded constrained LR/SC loop, other harts OUT-OF-SCOPE for single hart |
|
constrained_lrsc_forward_progress_store_amo |
OUT-OF-SCOPE for single hart |
|
constrained_lrsc_forward_progress_branch |
H executes a branch or jump that exits the constrained LR/SC loop. |
Descriptive spec text with no separately testable behavior |
constrained_lrsc_forward_progress_trap |
Descriptive spec text with no separately testable behavior |
| Parameter | Description | Coverpoint | Effect |
|---|---|---|---|
LRSC_RESERVATION_STRATEGY |
Strategy used to handle reservation sets. * "reserve naturally-aligned 64-byte region": Always reserve the 64-byte block containing the LR/SC address * "reserve naturally-aligned 128-byte region": Always reserve the 128-byte block containing the LR/SC address * "reserve exactly enough to cover the access": Always reserve exactly the LR/SC access, and no more * "custom": Custom behavior, leading to an 'unpredictable' call on any LR/SC |
Zalrsc_sc_w_cg/cp_custom_sc_addresses |
Expected results |
LRSC_FAIL_ON_NON_EXACT_LRSC |
Whether or not a Store Conditional fails if its physical address and size do not exactly match the physical address and size of the last Load Reserved in program order (independent of whether or not the SC is in the current reservation set) |
Zalrsc_sc_d_cg/cp_custom_sc_lr, Zalrsc_sc_w_cg/cp_custom_sc_addresses |
Expected results |
LRSC_FAIL_ON_VA_SYNONYM |
Whether or not an |
Not tested because spec does not require any specific behavior |
The spec imposes no requirements on reservation set form, including alignment, NAPOT, or even being contiguous. Therefore, it is not practical to build reference models that reliably predict whether a sc would succeed or fail on every DUT. Current profiles require Za64rs or Za128rs, which can be supported by reference models. However, unusual DUTs that do not match any reasonable reference model may not be able to pass this test suite. The expected outcome of an sc to an address other than that of the latest lr but within its reservation set follows the LRSC_RESERVATION_STRATEGY and LRSC_FAIL_ON_NON_EXACT_LRSC parameters.
The sc tests follow these conventions:
-
An
scmay fail spuriously, so every testcase that expects anscto succeed runs thelr/scpair in a constrained LR/SC loop ([sec:lrscseq]) that retries up to 100 times. If rd is also rs1 or rs2, the loop restores that register from a copy before each attempt, because a failingscoverwrites it with the failure code. When rd isx0, thescreports no status, so the loop reads back the target to decide whether to retry. That load takes the loop out of the constrained form, but the loop is still bounded. -
Before each
sc, the XLEN-bit word at the target is filled with the complement of rs2, so thescchanges every bit it writes. The test reads the target back afterward, so anscthat reports success but drops its store or writes another address fails, as does anscthat reports failure but writes memory. -
A failing
scis checked for rd = 1. The other nonzero failure codes are reserved. -
cp_custom_sc_after_sc executes
lr, then anscto the address 8 bytes above, whose outcome is not checked, then anscto thelraddress. That secondscmust fail and leave its target unchanged, whether or not the first one succeeded. -
The testcase for sc_pairs_latest_lr makes a single attempt, because its
scis expected to fail. -
The suite does not deliberately place compressed instructions in its constrained loops, so constrained_lrsc_compressed_allowed is not tested.
A.7. Floating-Point Extensions
Supporting floating-point involves enabling at least the F extension. Other extensions depend on F. The coverpoints are specified in the following sections. Some tests only apply when multiple extensions are supported.
The basic coverpoints are defined in Table 11. Modified coverpoints for floating-point instructions are defined in Table 41. D and H suffixes apply to double-precision and half-precision floating-point instructions, respectively.
| Modified Coverpoint | Bins | Definition |
|---|---|---|
cp_frm_{2, 3, 4} |
6 |
Rounding modes for instructions with 2/3/4 arguments |
cr_fs1_edges_frm |
26 * 6 |
Cross product of fs1 edges and rounding modes |
cp_csr_fflags_{n, v, vn, von, voun, vdoun} |
2-10 |
Set / preserve fflags bits |
cp_memval_fp_single |
26 |
Single-precision edge values loaded by fp memory load instructions |
cp_memval_fp_double |
26 |
Double-precision edge values loaded by fp memory load instructions |
cp_memval_fp_half |
26 |
Half-precision edge values loaded by fp memory load instructions |
cr_fs1_fs2_edges_frm |
26 * 26 * 6 |
Cross product of fs1 and fs2 edges and rounding modes |
cr_fs1_fs2_edges_frm4 |
26 * 26 * 6 |
Cross product of fs1 and fs2 edges and rounding modes for fma |
cr_fs1_fs3_edges_frm4 |
26 * 26 * 6 |
Cross product of fs1 and fs3 edges and rounding modes for fma |
These coverpoints do not yet certify that floating-point operations conform to the IEEE 754 standard. More robust coverpoints based on the IBM suite are under development.
cr_fs1_fs2_edges_frm includes cases that affect all of the flags in each rounding mode.
A.7.1. F Single-Precision FP
| Instruction | fadd.s | fclass.s | fcvt.l.s | fcvt.lu.s | fcvt.s.l | fcvt.s.lu | fcvt.s.w | fcvt.s.wu | fcvt.w.s | fcvt.wu.s | fdiv.s | feq.s |
|---|---|---|---|---|---|---|---|---|---|---|---|---|
RV32 |
x |
x |
x |
x |
x |
x |
x |
x |
||||
RV64 |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
cp_asm_count |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
cp_rs1 |
x |
x |
x |
x |
||||||||
cp_rd |
x |
x |
x |
x |
x |
x |
||||||
cp_rs1_edges |
x |
x |
x |
x |
||||||||
cp_fs1 |
x |
x |
x |
x |
x |
x |
x |
x |
||||
cp_fs2 |
x |
x |
x |
|||||||||
cp_fd |
x |
x |
x |
x |
x |
x |
||||||
cp_fs1_edges |
x |
x |
frm |
frm |
frm |
frm |
x |
x |
||||
cp_fs2_edges |
x |
x |
x |
|||||||||
cmp_fd_fs1 |
x |
x |
||||||||||
cmp_fd_fs2 |
x |
x |
||||||||||
cp_frm |
3 |
2 |
2 |
2 |
2 |
2 |
2 |
2 |
2 |
3 |
||
cp_csr_fflags |
von |
vn |
vn |
n |
n |
n |
n |
vn |
vn |
vdoun |
v |
|
cp_csr_frm |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
||
cr_fs1_fs2_edges |
frm |
frm |
x |
|||||||||
cp_fclass |
x |
| Instruction | fle.s | flt.s | flw | fmadd.s | fmax.s | fmin.s | fmsub.s | fmul.s | fmv.w.x | fmv.x.w | fnmadd.s | fnmsub.s |
|---|---|---|---|---|---|---|---|---|---|---|---|---|
RV32 |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
RV64 |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
cp_asm_count |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
cp_rs1 |
nx0 |
x |
||||||||||
cp_rd |
x |
x |
x |
|||||||||
cp_rs1_edges |
x |
|||||||||||
cp_imm_edges |
x |
|||||||||||
cp_fs1 |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
||
cp_fs2 |
x |
x |
x |
x |
x |
x |
x |
x |
x |
|||
cp_fs3 |
x |
x |
x |
x |
||||||||
cp_fd |
x |
x |
x |
x |
x |
x |
x |
x |
x |
|||
cp_fs1_edges |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
||
cp_fs2_edges |
x |
x |
x |
x |
x |
x |
x |
x |
x |
|||
cp_fs3_edges |
x |
x |
x |
x |
||||||||
cmp_fd_fs1 |
x |
x |
x |
x |
x |
x |
x |
|||||
cmp_fd_fs2 |
x |
x |
x |
x |
x |
x |
x |
|||||
cmp_fd_fs3 |
x |
x |
x |
x |
||||||||
cp_frm |
4 |
4 |
3 |
4 |
4 |
|||||||
cp_csr_fflags |
v |
v |
voun |
v |
v |
voun |
voun |
voun |
voun |
|||
cp_csr_frm |
x |
x |
x |
x |
x |
|||||||
cr_fs1_fs2_edges |
x |
x |
frm4 |
x |
x |
frm4 |
frm |
frm4 |
frm4 |
|||
cr_fs1_fs3_edges |
frm4 |
frm4 |
frm4 |
frm4 |
||||||||
cp_memval |
fp_single |
| Instruction | fsgnj.s | fsgnjn.s | fsgnjx.s | fsqrt.s | fsub.s | fsw |
|---|---|---|---|---|---|---|
RV32 |
x |
x |
x |
x |
x |
x |
RV64 |
x |
x |
x |
x |
x |
x |
cp_asm_count |
x |
x |
x |
x |
x |
x |
cp_rs1 |
nx0 |
|||||
cp_imm_edges |
x |
|||||
cp_fs1 |
x |
x |
x |
x |
x |
|
cp_fs2 |
x |
x |
x |
x |
x |
|
cp_fd |
x |
x |
x |
x |
x |
|
cp_fs1_edges |
x |
x |
x |
frm |
x |
|
cp_fs2_edges |
x |
x |
x |
x |
x |
|
cmp_fd_fs1 |
x |
x |
x |
x |
x |
|
cmp_fd_fs2 |
x |
x |
x |
x |
||
cp_frm |
2 |
3 |
||||
cp_csr_fflags |
vn |
von |
||||
cp_csr_frm |
x |
x |
||||
cr_fs1_fs2_edges |
x |
x |
x |
frm |
| Normative Rule | Rule Text | Coverpoints |
|---|---|---|
flen_def |
FLEN can be 32, 64, or 128 depending on which of the |
Definition, checked through UDB |
Zfinx_Zdinx_incompatible_F_D |
These extensions, intended for lower-cost systems, are incompatible with the |
Definition, checked through UDB |
F_ieee_compliance |
{F_fadd_s_cg, F_fdiv_s_cg}/cr_fs1_fs2_edges_frm, F_fmadd_s_cg/cr_fs1_fs2_edges_frm4, F_fsqrt_s_cg/cr_fs1_edges_frm |
|
F_depends_Zicsr |
Not tested: extension dependency checked by the UDB configuration |
|
flen |
F_fadd_s_cg/{cp_fs1, cp_fs2, cp_fd} |
|
roundingmode_dynamic |
F_fadd_s_cg/{cp_frm_3, cp_csr_frm}, {F_fsqrt_s_cg, F_fcvt_w_s_cg}/cp_csr_frm |
|
dyn_round_enc |
F_fadd_s_cg/{cp_frm_3, cp_csr_frm}, F_fmadd_s_cg/{cp_frm_4, cp_csr_frm} |
|
canonical_nan |
{F_fadd_s_cg, F_fdiv_s_cg}/cr_fs1_fs2_edges_frm, F_fsqrt_s_cg/cp_fs1_edges, F_fmin_s_cg/cr_fs1_fs2_edges |
|
F_canonical_nan |
{F_fadd_s_cg, F_fdiv_s_cg}/cr_fs1_fs2_edges_frm, F_fsqrt_s_cg/cp_fs1_edges, F_fmin_s_cg/cr_fs1_fs2_edges |
|
ieee_std_subnormal |
Operations on subnormal numbers are handled in accordance with IEEE 754-2008. |
{F_fadd_s_cg, F_fmul_s_cg}/cr_fs1_fs2_edges_frm, F_fclass_s_cg/cp_fclass, ZicsrF_cg/cp_underflow_after_rounding_fma_s |
ieee_std_tininess |
In the parlance of IEEE 754-2008, tininess is detected after rounding. |
ZicsrF_cg/{cp_underflow_after_rounding_fma_s, cp_underflow_after_rounding_fmul_s} |
fsw_flw_op |
{F_flw_cg, F_fsw_cg}/{cp_rs1_nx0, cp_imm_edges} |
|
fsw_flw_atomic_align |
FLW and FSW are only guaranteed to execute atomically if the effective address is naturally aligned. |
Not tested: atomicity is not observable in single-hart signature tests |
fsw_flw_bits_maintained |
F_flw_cg/cp_memval_fp_single, F_fsw_cg/cp_fs2_edges |
|
fadd-s_fmul-s_op |
{F_fadd_s_cg, F_fmul_s_cg}/{cp_fd, cr_fs1_fs2_edges_frm} |
|
fsub-s_op |
FSUB.S performs the single-precision floating-point subtraction of rs2 from rs1 |
F_fsub_s_cg/{cp_fs1, cp_fs2, cp_fd, cr_fs1_fs2_edges_frm} |
fdiv-s_op |
FDIV.S performs the single-precision floating-point division of rs1 by rs2 |
F_fdiv_s_cg/{cp_fs1, cp_fs2, cp_fd, cr_fs1_fs2_edges_frm} |
fsqrt-s_op |
F_fsqrt_s_cg/{cp_fs1, cp_fd, cr_fs1_edges_frm} |
|
fp_rd |
{F_fadd_s_cg, F_fmul_s_cg, F_fdiv_s_cg, F_fsqrt_s_cg}/cp_fd |
|
F_fmt_single |
{F_fadd_s_cg, F_fmadd_s_cg, F_fcvt_w_s_cg, F_fsgnj_s_cg}/cp_asm_count |
|
F_rm_field |
F_fadd_s_cg/cr_fs1_fs2_edges_frm, F_fmadd_s_cg/cr_fs1_fs2_edges_frm4, F_fsqrt_s_cg/cr_fs1_edges_frm, F_fcvt_w_s_cg/cr_fs1_edges_frm |
|
fmin-s_fmax-s_op |
{F_fmin_s_cg, F_fmax_s_cg}/{cp_fd, cr_fs1_fs2_edges} |
|
fmin-s_fmax-s_zero_compare |
{F_fmin_s_cg, F_fmax_s_cg}/cr_fs1_fs2_edges |
|
fmin-s_fmax-s_both_nan_input |
{F_fmin_s_cg, F_fmax_s_cg}/cr_fs1_fs2_edges |
|
fmin-s_fmax-s_one_nan_input |
If only one operand is a NaN, the result is the non-NaN operand |
{F_fmin_s_cg, F_fmax_s_cg}/cr_fs1_fs2_edges |
fmin-s_fmax-s_signaling_nan_nv |
Signaling NaN inputs set the invalid operation exception flag, even when the result is not NaN |
{F_fmin_s_cg, F_fmax_s_cg}/{cr_fs1_fs2_edges, cp_csr_fflags_v} |
fma_rs3 |
{F_fmadd_s_cg, F_fmsub_s_cg, F_fnmadd_s_cg, F_fnmsub_s_cg}/cp_fs3 |
|
fmadd-s_op |
F_fmadd_s_cg/{cp_fs3, cp_fd, cr_fs1_fs2_edges_frm4, cr_fs1_fs3_edges_frm4} |
|
fmsub-s_op |
F_fmsub_s_cg/{cp_fs3, cp_fd, cr_fs1_fs2_edges_frm4, cr_fs1_fs3_edges_frm4} |
|
fnmsub-s_op |
F_fnmsub_s_cg/{cp_fs3, cp_fd, cr_fs1_fs2_edges_frm4, cr_fs1_fs3_edges_frm4} |
|
fnmadd-s_op |
F_fnmadd_s_cg/{cp_fs3, cp_fd, cr_fs1_fs2_edges_frm4, cr_fs1_fs3_edges_frm4} |
|
fma_nv_flag |
||
fcvt-l-s_fcvt-w-s_op |
{F_fcvt_w_s_cg, F_fcvt_l_s_cg}/{cp_rd, cr_fs1_edges_frm} |
|
fcvt-s-w_fcvt-s-l_op |
{F_fcvt_s_w_cg, F_fcvt_s_l_cg}/{cp_fd, cp_rs1_edges} |
|
fcvt-wu-s_fcvt-lu-s_fcvt-s-wu_fcvt-s-lu_op |
{F_fcvt_wu_s_cg, F_fcvt_lu_s_cg}/cr_fs1_edges_frm, {F_fcvt_s_wu_cg, F_fcvt_s_lu_cg}/cp_rs1_edges |
|
fcvt_long_float_rv64_only |
FCVT.L.S, FCVT.LU.S, FCVT.S.L, and FCVT.S.LU are RV64-only instructions |
{F_fcvt_l_s_cg, F_fcvt_lu_s_cg, F_fcvt_s_l_cg, F_fcvt_s_lu_cg}/cp_asm_count |
fcvt_unrepresentable_nv |
{F_fcvt_w_s_cg, F_fcvt_wu_s_cg, F_fcvt_l_s_cg, F_fcvt_lu_s_cg}/cr_fs1_edges_frm |
|
fcvt_int_float_valid_input |
{F_fcvt_w_s_cg, F_fcvt_wu_s_cg, F_fcvt_l_s_cg, F_fcvt_lu_s_cg}/cr_fs1_edges_frm |
|
fcvt_round |
{F_fcvt_w_s_cg, F_fcvt_l_s_cg}/cr_fs1_edges_frm, {F_fcvt_s_w_cg, F_fcvt_s_l_cg}/cp_frm_2 |
|
fcvt_nx |
F_fcvt_w_s_cg/{cr_fs1_edges_frm, cp_csr_fflags_vn}, F_fcvt_s_w_cg/{cp_rs1_edges, cp_csr_fflags_n} |
|
fsgnj-s_fsgnjn-s_fsgnjx-s_op |
{F_fsgnj_s_cg, F_fsgnjn_s_cg, F_fsgnjx_s_cg}/cr_fs1_fs2_edges |
|
fmv-x-w_op |
F_fmv_x_w_cg/{cp_rd, cp_fs1, cp_fs1_edges} |
|
fmv-w-x_op |
F_fmv_w_x_cg/{cp_rs1, cp_rs1_edges, cp_fd} |
|
feq-s_flt-s_fle-s_op |
{F_feq_s_cg, F_flt_s_cg, F_fle_s_cg}/cr_fs1_fs2_edges |
|
flt-s_fle-s_signaling |
{F_fle_s_cg, F_flt_s_cg}/{cr_fs1_fs2_edges, cp_csr_fflags_v} |
|
feq-s_quiet |
F_feq_s_cg/{cr_fs1_fs2_edges, cp_csr_fflags_v} |
|
feq-s_flt-s_fle-s_nan_input |
For all three instructions, the result is 0 if either operand is NaN |
{F_feq_s_cg, F_fle_s_cg, F_flt_s_cg}/cr_fs1_fs2_edges |
fclass-s_op |
F_fclass_s_cg/{cp_rd, cp_fs1, cp_fs1_edges, cp_fclass} |
UDB Parameters: None.
A.7.2. D Double-Precision FP
| Instruction | fadd.d | fclass.d | fcvt.d.l | fcvt.d.lu | fcvt.d.s | fcvt.d.w | fcvt.d.wu | fcvt.l.d | fcvt.lu.d | fcvt.s.d | fcvt.w.d | fcvt.wu.d |
|---|---|---|---|---|---|---|---|---|---|---|---|---|
RV32 |
x |
x |
x |
x |
x |
x |
x |
x |
||||
RV64 |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
cp_asm_count |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
cp_rs1 |
x |
x |
x |
x |
||||||||
cp_rd |
x |
x |
x |
x |
x |
|||||||
cp_rs1_edges |
x |
x |
x |
x |
||||||||
cp_fs1 |
x |
x |
x |
x |
x |
x |
x |
x |
||||
cp_fs2 |
x |
|||||||||||
cp_fd |
x |
x |
x |
x |
x |
x |
x |
|||||
cp_fs1_edges |
D |
D |
x |
frm_D |
frm_D |
frm_D |
frm_D |
frm_D |
||||
cp_fs2_edges |
D |
|||||||||||
cmp_fd_fs1 |
x |
x |
x |
|||||||||
cmp_fd_fs2 |
x |
|||||||||||
cp_frm |
3 |
2 |
2 |
2 |
2 |
2 |
2 |
2 |
||||
cp_csr_fflags |
von |
n |
n |
v |
vn |
vn |
voun |
vn |
vn |
|||
cp_csr_frm |
x |
x |
x |
x |
x |
x |
x |
x |
||||
cr_fs1_fs2_edges |
frm_D |
|||||||||||
cp_fclass |
x |
|||||||||||
cp_NaNBox |
D_S |
|||||||||||
cp_fs1_badNB |
D_S |
| Instruction | fdiv.d | feq.d | fld | fle.d | flt.d | fmadd.d | fmax.d | fmin.d | fmsub.d | fmul.d | fmv.d.x | fmv.x.d |
|---|---|---|---|---|---|---|---|---|---|---|---|---|
RV32 |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
||
RV64 |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
cp_asm_count |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
cp_rs1 |
nx0 |
x |
||||||||||
cp_rd |
x |
x |
x |
x |
||||||||
cp_rs1_edges |
x |
|||||||||||
cp_imm_edges |
x |
|||||||||||
cp_fs1 |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
||
cp_fs2 |
x |
x |
x |
x |
x |
x |
x |
x |
x |
|||
cp_fs3 |
x |
x |
||||||||||
cp_fd |
x |
x |
x |
x |
x |
x |
x |
x |
||||
cp_fs1_edges |
D |
D |
D |
D |
D |
D |
D |
D |
D |
D |
||
cp_fs2_edges |
D |
D |
D |
D |
D |
D |
D |
D |
D |
|||
cp_fs3_edges |
D |
D |
||||||||||
cmp_fd_fs1 |
x |
x |
x |
x |
x |
x |
||||||
cmp_fd_fs2 |
x |
x |
x |
x |
x |
x |
||||||
cmp_fd_fs3 |
x |
x |
||||||||||
cp_frm |
3 |
4 |
4 |
3 |
||||||||
cp_csr_fflags |
vdoun |
v |
v |
v |
voun |
v |
v |
voun |
voun |
|||
cp_csr_frm |
x |
x |
x |
x |
||||||||
cr_fs1_fs2_edges |
frm_D |
D |
D |
D |
frm4_D |
D |
D |
frm4_D |
frm_D |
|||
cr_fs1_fs3_edges |
frm4_D |
frm4_D |
||||||||||
cp_memval |
fp_double |
| Instruction | fnmadd.d | fnmsub.d | fsd | fsgnj.d | fsgnjn.d | fsgnjx.d | fsqrt.d | fsub.d |
|---|---|---|---|---|---|---|---|---|
RV32 |
x |
x |
x |
x |
x |
x |
x |
x |
RV64 |
x |
x |
x |
x |
x |
x |
x |
x |
cp_asm_count |
x |
x |
x |
x |
x |
x |
x |
x |
cp_rs1 |
nx0 |
|||||||
cp_imm_edges |
x |
|||||||
cp_fs1 |
x |
x |
x |
x |
x |
x |
x |
|
cp_fs2 |
x |
x |
x |
x |
x |
x |
x |
|
cp_fs3 |
x |
x |
||||||
cp_fd |
x |
x |
x |
x |
x |
x |
x |
|
cp_fs1_edges |
D |
D |
D |
D |
D |
D |
D |
|
cp_fs2_edges |
D |
D |
x |
D |
D |
D |
D |
|
cp_fs3_edges |
D |
D |
||||||
cmp_fd_fs1 |
x |
x |
x |
x |
x |
x |
x |
|
cmp_fd_fs2 |
x |
x |
x |
x |
x |
x |
||
cmp_fd_fs3 |
x |
x |
||||||
cp_frm |
4 |
4 |
2 |
3 |
||||
cp_csr_fflags |
voun |
voun |
vn |
von |
||||
cp_csr_frm |
x |
x |
x |
x |
||||
cr_fs1_fs2_edges |
frm4_D |
frm4_D |
D |
D |
D |
frm_D |
||
cr_fs1_fs3_edges |
frm4_D |
frm4_D |
| Instruction | fadd.s | fclass.s | fcvt.l.s | fcvt.lu.s | fcvt.s.l | fcvt.s.lu | fcvt.s.w | fcvt.s.wu | fcvt.w.s | fcvt.wu.s | fdiv.s | feq.s |
|---|---|---|---|---|---|---|---|---|---|---|---|---|
RV32 |
x |
x |
x |
x |
x |
x |
x |
x |
||||
RV64 |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
cp_NaNBox |
D_S |
D_S |
D_S |
D_S |
D_S |
D_S |
||||||
cp_fs1_badNB |
D_S |
D_S |
D_S |
D_S |
D_S |
D_S |
D_S |
D_S |
||||
cp_fs2_badNB |
D_S |
D_S |
D_S |
| Instruction | fle.s | flt.s | flw | fmadd.s | fmax.s | fmin.s | fmsub.s | fmul.s | fmv.w.x | fmv.x.w | fnmadd.s | fnmsub.s |
|---|---|---|---|---|---|---|---|---|---|---|---|---|
RV32 |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
RV64 |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
cp_NaNBox |
D_S |
D_S |
D_S |
D_S |
D_S |
D_S |
D_S |
D_S |
D_S |
|||
cp_fs1_badNB |
D_S |
D_S |
D_S |
D_S |
D_S |
D_S |
D_S |
D_S |
D_S |
D_S |
||
cp_fs2_badNB |
D_S |
D_S |
D_S |
D_S |
D_S |
D_S |
D_S |
D_S |
D_S |
|||
cp_fs3_badNB |
D_S |
D_S |
D_S |
D_S |
| Instruction | fsgnj.s | fsgnjn.s | fsgnjx.s | fsqrt.s | fsub.s | fsw |
|---|---|---|---|---|---|---|
RV32 |
x |
x |
x |
x |
x |
x |
RV64 |
x |
x |
x |
x |
x |
x |
cp_NaNBox |
D_S |
D_S |
D_S |
D_S |
D_S |
|
cp_fs1_badNB |
D_S |
D_S |
D_S |
D_S |
D_S |
|
cp_fs2_badNB |
D_S |
D_S |
D_S |
D_S |
D_S |
| Normative Rule | Rule Text | Coverpoints |
|---|---|---|
roundingmode_dynamic |
D_fadd_d_cg/{cp_frm_3, cp_csr_frm}, {D_fsqrt_d_cg, D_fcvt_s_d_cg}/cp_csr_frm |
|
dyn_round_enc |
D_fadd_d_cg/{cp_frm_3, cp_csr_frm}, D_fmadd_d_cg/{cp_frm_4, cp_csr_frm} |
|
ieee_std_subnormal |
Operations on subnormal numbers are handled in accordance with IEEE 754-2008. |
{D_fadd_d_cg, D_fmul_d_cg}/cr_fs1_fs2_edges_frm_D, D_fclass_d_cg/cp_fclass, ZicsrF_cg/cp_underflow_after_rounding_fma_d |
ieee_std_tininess |
In the parlance of IEEE 754-2008, tininess is detected after rounding. |
ZicsrF_cg/{cp_underflow_after_rounding_fma_d, cp_underflow_after_rounding_fmul_d, cp_underflow_after_rounding_fcvt_s_d} |
fcvt_unrepresentable_nv |
{D_fcvt_w_d_cg, D_fcvt_wu_d_cg, D_fcvt_l_d_cg, D_fcvt_lu_d_cg}/cr_fs1_edges_frm_D |
|
fcvt_round |
{D_fcvt_w_d_cg, D_fcvt_l_d_cg}/cr_fs1_edges_frm_D, {D_fcvt_d_l_cg, D_fcvt_d_lu_cg}/cp_frm_2 |
|
fcvt_nx |
D_fcvt_w_d_cg/{cr_fs1_edges_frm_D, cp_csr_fflags_vn}, D_fcvt_s_d_cg/{cr_fs1_edges_frm_D, cp_csr_fflags_voun} |
|
D_canonical_nan |
{D_fadd_d_cg, D_fdiv_d_cg}/cr_fs1_fs2_edges_frm_D, D_fsqrt_d_cg/cp_fs1_edges_D, D_fmin_d_cg/cr_fs1_fs2_edges_D |
|
D_flen_64 |
D_fadd_d_cg/cr_fs1_fs2_edges_frm_D, D_fld_cg/cp_memval_fp_double |
|
fp_nan_boxing |
{D_fadd_s_cg, D_fcvt_s_d_cg, D_flw_cg, D_fmv_w_x_cg}/cp_NaNBox_D_S |
|
fp_transfer_instrs_narrow_transfer_in |
A narrower n-bit transfer, n<FLEN, into the f registers will create a valid NaN-boxed value |
{D_flw_cg, D_fmv_w_x_cg}/cp_NaNBox_D_S |
fp_transfer_instrs_narrow_transfer_out |
D_fsw_cg/cp_fs2_badNB_D_S, D_fmv_x_w_cg/cp_fs1_badNB_D_S |
|
fp_nontransfer_instrs_improper_nan_boxed_input |
D_fadd_s_cg/{cp_fs1_badNB_D_S, cp_fs2_badNB_D_S}, D_fmadd_s_cg/cp_fs3_badNB_D_S, D_fsqrt_s_cg/cp_fs1_badNB_D_S |
|
fld_op |
D_fld_cg/{cp_rs1_nx0, cp_imm_edges, cp_fd, cp_memval_fp_double} |
|
fsd_op |
FSD stores a double-precision value from the floating-point registers to memory |
D_fsd_cg/{cp_rs1_nx0, cp_imm_edges, cp_fs2, cp_fs2_edges} |
fld_fsd_atomic_align |
Not tested: atomicity is not observable in single-hart signature tests |
|
fld_fsd_bits_maintained |
D_fld_cg/cp_memval_fp_double |
|
D_computational_instrs |
{D_fadd_d_cg, D_fdiv_d_cg}/cr_fs1_fs2_edges_frm_D, D_fmadd_d_cg/cr_fs1_fs2_edges_frm4_D, D_fsqrt_d_cg/cp_fs1_edges_D |
|
fcvt-w-d_fcvt-l-d_op |
{D_fcvt_w_d_cg, D_fcvt_l_d_cg}/{cp_rd, cr_fs1_edges_frm_D} |
|
fcvt-d-w_fcvt-d-l_op |
{D_fcvt_d_w_cg, D_fcvt_d_l_cg}/{cp_fd, cp_rs1_edges} |
|
fcvt-wu-d_fcvt-lu-d_fcvt-d-wu_fcvt-d-lu_op |
FCVT.WU.D, FCVT.LU.D, FCVT.D.WU, and FCVT.D.LU variants convert to or from unsigned integer values |
{D_fcvt_wu_d_cg, D_fcvt_lu_d_cg}/cr_fs1_edges_frm_D, {D_fcvt_d_wu_cg, D_fcvt_d_lu_cg}/cp_rs1_edges |
fcvt-w-d_fcvt-wu-d_sign_ext |
For RV64, FCVT.W.D and FCVT.WU.D sign-extend the 32-bit result |
{D_fcvt_w_d_cg, D_fcvt_wu_d_cg}/cr_fs1_edges_frm_D |
fcvt_long_double_rv64_only |
FCVT.L.D, fcvt.lu.d[], fcvt.d.l[], and fcvt.d.lu[] are RV64-only instructions. |
{D_fcvt_l_d_cg, D_fcvt_lu_d_cg, D_fcvt_d_l_cg, D_fcvt_d_lu_cg}/cp_asm_count |
fcvt_int_double_valid_input |
{D_fcvt_w_d_cg, D_fcvt_wu_d_cg, D_fcvt_l_d_cg, D_fcvt_lu_d_cg}/cr_fs1_edges_frm_D |
|
fcvt-s-d_fcvt-d-s_op |
D_fcvt_s_d_cg/{cp_fd, cr_fs1_edges_frm_D}, D_fcvt_d_s_cg/{cp_fd, cp_fs1_edges} |
|
fcvt_float_rounding |
FCVT.S.D rounds according to the rm field; FCVT.D.S will never round |
D_fcvt_s_d_cg/cr_fs1_edges_frm_D, D_fcvt_d_s_cg/{cp_fs1_edges, cp_csr_fflags_v}, ZicsrF_cg/cp_underflow_after_rounding_fcvt_s_d |
fsgnj-d_fsgnjn-d_fsgnjx-d_op |
{D_fsgnj_d_cg, D_fsgnjn_d_cg, D_fsgnjx_d_cg}/cr_fs1_fs2_edges_D |
|
fmv-x-d_op |
D_fmv_x_d_cg/{cp_rd, cp_fs1, cp_fs1_edges_D} |
|
fmv-d-x_op |
D_fmv_d_x_cg/{cp_rs1, cp_rs1_edges, cp_fd} |
|
fmv_bits_preserved |
D_fmv_x_d_cg/cp_fs1_edges_D, D_fmv_d_x_cg/cp_rs1_edges |
|
D_compare_instrs |
{D_feq_d_cg, D_flt_d_cg, D_fle_d_cg}/cr_fs1_fs2_edges_D, D_feq_d_cg/cp_csr_fflags_v |
|
fclass-d_op |
D_fclass_d_cg/{cp_rd, cp_fs1, cp_fs1_edges_D, cp_fclass} |
UDB Parameters: None.
A.7.3. Zfh Half-Precision FP
The rows of Table 46 with D in the ExtraExtensions column apply only when D is also supported. They cover fcvt.d.h, fcvt.h.d, and NaN-boxing of half-precision values in 64-bit registers.
| Instruction | fadd.h | fclass.h | fcvt.h.l | fcvt.h.lu | fcvt.h.s | fcvt.h.w | fcvt.h.wu | fcvt.l.h | fcvt.lu.h | fcvt.s.h | fcvt.w.h | fcvt.wu.h |
|---|---|---|---|---|---|---|---|---|---|---|---|---|
RV32 |
x |
x |
x |
x |
x |
x |
x |
x |
||||
RV64 |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
cp_asm_count |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
cp_rs1 |
x |
x |
x |
x |
||||||||
cp_rd |
x |
x |
x |
x |
x |
|||||||
cp_rs1_edges |
x |
x |
x |
x |
||||||||
cp_fs1 |
x |
x |
x |
x |
x |
x |
x |
x |
||||
cp_fs2 |
x |
|||||||||||
cp_fd |
x |
x |
x |
x |
x |
x |
x |
|||||
cp_fs1_edges |
H |
H |
frm |
frm_H |
frm_H |
H |
frm_H |
frm_H |
||||
cp_fs2_edges |
H |
|||||||||||
cmp_fd_fs1 |
x |
x |
x |
|||||||||
cmp_fd_fs2 |
x |
|||||||||||
cp_frm |
3 |
2 |
2 |
2 |
2 |
2 |
2 |
2 |
2 |
2 |
||
cp_csr_fflags |
von |
on |
on |
voun |
on |
on |
vn |
vn |
v |
vn |
vn |
|
cp_csr_frm |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
||
cr_fs1_fs2_edges |
frm_H |
|||||||||||
cp_fclass |
x |
|||||||||||
cp_NaNBox |
S_H |
S_H |
S_H |
S_H |
S_H |
S_H |
||||||
cp_fs1_badNB |
S_H |
S_H |
S_H |
S_H |
S_H |
S_H |
S_H |
|||||
cp_fs2_badNB |
S_H |
| Instruction | fdiv.h | feq.h | fle.h | flh | flt.h | fmadd.h | fmax.h | fmin.h | fmsub.h | fmul.h | fmv.h.x | fmv.x.h |
|---|---|---|---|---|---|---|---|---|---|---|---|---|
RV32 |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
RV64 |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
cp_asm_count |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
cp_rs1 |
nx0 |
x |
||||||||||
cp_rd |
x |
x |
x |
x |
||||||||
cp_rs1_edges |
x |
|||||||||||
cp_imm_edges |
x |
|||||||||||
cp_fs1 |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
||
cp_fs2 |
x |
x |
x |
x |
x |
x |
x |
x |
x |
|||
cp_fs3 |
x |
x |
||||||||||
cp_fd |
x |
x |
x |
x |
x |
x |
x |
x |
||||
cp_fs1_edges |
H |
H |
H |
H |
H |
H |
H |
H |
H |
H |
||
cp_fs2_edges |
H |
H |
H |
H |
H |
H |
H |
H |
H |
|||
cp_fs3_edges |
H |
H |
||||||||||
cmp_fd_fs1 |
x |
x |
x |
x |
x |
x |
||||||
cmp_fd_fs2 |
x |
x |
x |
x |
x |
x |
||||||
cmp_fd_fs3 |
x |
x |
||||||||||
cp_frm |
3 |
4 |
4 |
3 |
||||||||
cp_csr_fflags |
vdoun |
v |
v |
v |
voun |
v |
v |
voun |
voun |
|||
cp_csr_frm |
x |
x |
x |
x |
||||||||
cr_fs1_fs2_edges |
frm_H |
H |
H |
H |
frm4_H |
H |
H |
frm4_H |
frm_H |
|||
cr_fs1_fs3_edges |
frm4_H |
frm4_H |
||||||||||
cp_NaNBox |
S_H |
S_H |
S_H |
S_H |
S_H |
S_H |
S_H |
S_H |
||||
cp_fs1_badNB |
S_H |
S_H |
S_H |
S_H |
S_H |
S_H |
S_H |
S_H |
S_H |
S_H |
||
cp_fs2_badNB |
S_H |
S_H |
S_H |
S_H |
S_H |
S_H |
S_H |
S_H |
S_H |
|||
cp_fs3_badNB |
S_H |
S_H |
||||||||||
cp_memval |
fp_half |
| Instruction | fnmadd.h | fnmsub.h | fsgnj.h | fsgnjn.h | fsgnjx.h | fsh | fsqrt.h | fsub.h | fcvt.d.h | fcvt.h.d | fadd.h | fclass.h |
|---|---|---|---|---|---|---|---|---|---|---|---|---|
RV32 |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
RV64 |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
ExtraExtensions |
D |
D |
D |
D |
||||||||
cp_asm_count |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
||
cp_rs1 |
nx0 |
|||||||||||
cp_imm_edges |
x |
|||||||||||
cp_fs1 |
x |
x |
x |
x |
x |
x |
x |
x |
x |
|||
cp_fs2 |
x |
x |
x |
x |
x |
x |
x |
|||||
cp_fs3 |
x |
x |
||||||||||
cp_fd |
x |
x |
x |
x |
x |
x |
x |
x |
x |
|||
cp_fs1_edges |
H |
H |
H |
H |
H |
H |
H |
H |
frm_D |
|||
cp_fs2_edges |
H |
H |
H |
H |
H |
H |
H |
|||||
cp_fs3_edges |
H |
H |
||||||||||
cmp_fd_fs1 |
x |
x |
x |
x |
x |
x |
x |
x |
x |
|||
cmp_fd_fs2 |
x |
x |
x |
x |
x |
x |
||||||
cmp_fd_fs3 |
x |
x |
||||||||||
cp_frm |
4 |
4 |
2 |
3 |
2 |
|||||||
cp_csr_fflags |
voun |
voun |
vn |
von |
v |
voun |
||||||
cp_csr_frm |
x |
x |
x |
x |
x |
|||||||
cr_fs1_fs2_edges |
frm4_H |
frm4_H |
H |
H |
H |
frm_H |
||||||
cr_fs1_fs3_edges |
frm4_H |
frm4_H |
||||||||||
cp_NaNBox |
S_H |
S_H |
S_H |
S_H |
S_H |
S_H |
S_H |
D_H |
D_H |
|||
cp_fs1_badNB |
S_H |
S_H |
S_H |
S_H |
S_H |
S_H |
S_H |
D_H |
D_H |
D_H |
||
cp_fs2_badNB |
S_H |
S_H |
S_H |
S_H |
S_H |
S_H |
S_H |
D_H |
||||
cp_fs3_badNB |
S_H |
S_H |
| Instruction | fcvt.h.l | fcvt.h.lu | fcvt.h.s | fcvt.h.w | fcvt.h.wu | fcvt.l.h | fcvt.lu.h | fcvt.s.h | fcvt.w.h | fcvt.wu.h | fdiv.h | feq.h |
|---|---|---|---|---|---|---|---|---|---|---|---|---|
RV32 |
x |
x |
x |
x |
x |
x |
x |
x |
||||
RV64 |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
ExtraExtensions |
D |
D |
D |
D |
D |
D |
D |
D |
D |
D |
D |
D |
cp_NaNBox |
D_H |
D_H |
D_H |
D_H |
D_H |
D_S |
D_H |
|||||
cp_fs1_badNB |
D_H |
D_H |
D_H |
D_H |
D_H |
D_H |
D_H |
D_H |
||||
cp_fs2_badNB |
D_H |
D_H |
| Instruction | fle.h | flh | flt.h | fmadd.h | fmax.h | fmin.h | fmsub.h | fmul.h | fmv.h.x | fmv.x.h | fnmadd.h | fnmsub.h |
|---|---|---|---|---|---|---|---|---|---|---|---|---|
RV32 |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
RV64 |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
ExtraExtensions |
D |
D |
D |
D |
D |
D |
D |
D |
D |
D |
D |
D |
cp_NaNBox |
D_H |
D_H |
D_H |
D_H |
D_H |
D_H |
D_H |
D_H |
D_H |
|||
cp_fs1_badNB |
D_H |
D_H |
D_H |
D_H |
D_H |
D_H |
D_H |
D_H |
D_H |
D_H |
||
cp_fs2_badNB |
D_H |
D_H |
D_H |
D_H |
D_H |
D_H |
D_H |
D_H |
D_H |
|||
cp_fs3_badNB |
D_H |
D_H |
D_H |
D_H |
| Instruction | fsgnj.h | fsgnjn.h | fsgnjx.h | fsh | fsqrt.h | fsub.h |
|---|---|---|---|---|---|---|
RV32 |
x |
x |
x |
x |
x |
x |
RV64 |
x |
x |
x |
x |
x |
x |
ExtraExtensions |
D |
D |
D |
D |
D |
D |
cp_NaNBox |
D_H |
D_H |
D_H |
D_H |
D_H |
|
cp_fs1_badNB |
D_H |
D_H |
D_H |
D_H |
D_H |
|
cp_fs2_badNB |
D_H |
D_H |
D_H |
D_H |
D_H |
| Normative Rule | Rule Text | Coverpoints |
|---|---|---|
roundingmode_dynamic |
Zfh_fadd_h_cg/{cp_frm_3, cp_csr_frm}, {Zfh_fsqrt_h_cg, Zfh_fcvt_h_s_cg}/cp_csr_frm |
|
dyn_round_enc |
Zfh_fadd_h_cg/{cp_frm_3, cp_csr_frm}, Zfh_fmadd_h_cg/{cp_frm_4, cp_csr_frm} |
|
ieee_std_subnormal |
Operations on subnormal numbers are handled in accordance with IEEE 754-2008. |
{Zfh_fadd_h_cg, Zfh_fmul_h_cg}/cr_fs1_fs2_edges_frm_H, Zfh_fclass_h_cg/cp_fclass, ZicsrF_cg/cp_underflow_after_rounding_fma_h |
ieee_std_tininess |
In the parlance of IEEE 754-2008, tininess is detected after rounding. |
ZicsrF_cg/{cp_underflow_after_rounding_fma_h, cp_underflow_after_rounding_fmul_h, cp_underflow_after_rounding_fcvt_h_s} |
fcvt_unrepresentable_nv |
{Zfh_fcvt_w_h_cg, Zfh_fcvt_wu_h_cg, Zfh_fcvt_l_h_cg, Zfh_fcvt_lu_h_cg}/cr_fs1_edges_frm_H |
|
fcvt_round |
{Zfh_fcvt_w_h_cg, Zfh_fcvt_l_h_cg}/cr_fs1_edges_frm_H, {Zfh_fcvt_h_w_cg, Zfh_fcvt_h_l_cg}/cp_frm_2 |
|
fcvt_nx |
Zfh_fcvt_w_h_cg/{cr_fs1_edges_frm_H, cp_csr_fflags_vn}, Zfh_fcvt_h_w_cg/{cp_rs1_edges, cp_csr_fflags_on} |
|
fp_nan_boxing |
{Zfh_fadd_h_cg, Zfh_fcvt_h_s_cg, Zfh_flh_cg, Zfh_fmv_h_x_cg}/cp_NaNBox_S_H, {ZfhD_fadd_h_cg, ZfhD_fcvt_h_d_cg, ZfhD_flh_cg, ZfhD_fmv_h_x_cg}/cp_NaNBox_D_H |
|
fp_transfer_instrs_narrow_transfer_in |
A narrower n-bit transfer, n<FLEN, into the f registers will create a valid NaN-boxed value |
{Zfh_flh_cg, Zfh_fmv_h_x_cg}/cp_NaNBox_S_H, {ZfhD_flh_cg, ZfhD_fmv_h_x_cg}/cp_NaNBox_D_H |
fp_transfer_instrs_narrow_transfer_out |
Zfh_fsh_cg/cp_fs2_badNB_S_H, Zfh_fmv_x_h_cg/cp_fs1_badNB_S_H, ZfhD_fsh_cg/cp_fs2_badNB_D_H, ZfhD_fmv_x_h_cg/cp_fs1_badNB_D_H |
|
fp_nontransfer_instrs_improper_nan_boxed_input |
Zfh_fadd_h_cg/{cp_fs1_badNB_S_H, cp_fs2_badNB_S_H}, Zfh_fmadd_h_cg/cp_fs3_badNB_S_H, Zfh_fcvt_s_h_cg/cp_fs1_badNB_S_H, ZfhD_fadd_h_cg/{cp_fs1_badNB_D_H, cp_fs2_badNB_D_H}, ZfhD_fmadd_h_cg/cp_fs3_badNB_D_H, ZfhD_fcvt_d_h_cg/cp_fs1_badNB_D_H |
|
Zfh_canonical_nan |
For half-precision floating-point, the canonical NaN corresponds to the pattern 0x7e00. |
{Zfh_fadd_h_cg, Zfh_fdiv_h_cg}/cr_fs1_fs2_edges_frm_H, Zfh_fsqrt_h_cg/cp_fs1_edges_H, Zfh_fmin_h_cg/cr_fs1_fs2_edges_H, ZfhD_fcvt_h_d_cg/cr_fs1_edges_frm_D |
fsh_flh_op |
{Zfh_flh_cg, Zfh_fsh_cg}/{cp_rs1_nx0, cp_imm_edges} |
|
fsh_flh_bits_maintained |
Zfh_flh_cg/{cp_memval_fp_half, cp_NaNBox_S_H}, Zfh_fsh_cg/{cp_fs2_edges_H, cp_fs2_badNB_S_H}, ZfhD_flh_cg/cp_NaNBox_D_H, ZfhD_fsh_cg/cp_fs2_badNB_D_H |
|
Zfh_computational_instrs |
{Zfh_fadd_h_cg, Zfh_fdiv_h_cg}/cr_fs1_fs2_edges_frm_H, Zfh_fmadd_h_cg/cr_fs1_fs2_edges_frm4_H, Zfh_fsqrt_h_cg/cp_fs1_edges_H |
|
fcvt-w-h_fcvt-l-h_op |
{Zfh_fcvt_w_h_cg, Zfh_fcvt_l_h_cg}/{cp_rd, cr_fs1_edges_frm_H} |
|
fcvt-h-w_fcvt-h-l_op |
{Zfh_fcvt_h_w_cg, Zfh_fcvt_h_l_cg}/{cp_fd, cp_rs1_edges} |
|
fcvt-wu-h_fcvt-lu-h_fcvt-h-wu_fcvt-h-lu_op |
FCVT.WU.H, FCVT.LU.H, FCVT.H.WU, and FCVT.H.LU variants convert to or from unsigned integer values |
{Zfh_fcvt_wu_h_cg, Zfh_fcvt_lu_h_cg}/cr_fs1_edges_frm_H, {Zfh_fcvt_h_wu_cg, Zfh_fcvt_h_lu_cg}/cp_rs1_edges |
fcvt_long_half_rv64_only |
FCVT.L.H, FCVT.LU.H, FCVT.H.L, and FCVT.H.LU are RV64-only instructions. |
{Zfh_fcvt_l_h_cg, Zfh_fcvt_lu_h_cg, Zfh_fcvt_h_l_cg, Zfh_fcvt_h_lu_cg}/cp_asm_count |
fcvt-s-h_fcvt-h-s_op |
Zfh_fcvt_h_s_cg/{cp_fd, cr_fs1_edges_frm}, Zfh_fcvt_s_h_cg/{cp_fd, cp_fs1_edges_H}, ZfhD_fcvt_h_s_cg/cp_NaNBox_D_H, ZfhD_fcvt_s_h_cg/{cp_NaNBox_D_S, cp_fs1_badNB_D_H} |
|
fcvt-d-h_fcvt-h-d_op |
ZfhD_fcvt_d_h_cg/{cp_fd, cp_fs1_edges_H}, ZfhD_fcvt_h_d_cg/{cp_fd, cr_fs1_edges_frm_D} |
|
fsgnj-h_fsgnjn-h_fsgnjx-h_op |
{Zfh_fsgnj_h_cg, Zfh_fsgnjn_h_cg, Zfh_fsgnjx_h_cg}/cr_fs1_fs2_edges_H |
|
fmv-x-h_op |
Zfh_fmv_x_h_cg/{cp_rd, cp_fs1, cp_fs1_edges_H}, ZfhD_fmv_x_h_cg/cp_fs1_badNB_D_H |
|
fmv-h-x_op |
Zfh_fmv_h_x_cg/{cp_rs1, cp_rs1_edges, cp_fd, cp_NaNBox_S_H}, ZfhD_fmv_h_x_cg/cp_NaNBox_D_H |
|
Zfh_compare_instrs |
{Zfh_feq_h_cg, Zfh_flt_h_cg, Zfh_fle_h_cg}/cr_fs1_fs2_edges_H, Zfh_feq_h_cg/cp_csr_fflags_v |
|
fclass-h_op |
Zfh_fclass_h_cg/{cp_rd, cp_fs1, cp_fs1_edges_H, cp_fclass} |
UDB Parameters: None.
Zfhmin
The rows of Table 48 with D in the ExtraExtensions column apply only when D is also supported. They cover fcvt.d.h, fcvt.h.d, and NaN-boxing of half-precision values in 64-bit registers.
| Instruction | fcvt.h.s | fcvt.s.h | flh | fmv.h.x | fmv.x.h | fsh | fcvt.d.h | fcvt.h.d | fcvt.h.s | fcvt.s.h | flh | fmv.h.x |
|---|---|---|---|---|---|---|---|---|---|---|---|---|
RV32 |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
RV64 |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
ExtraExtensions |
D |
D |
D |
D |
D |
D |
||||||
cp_asm_count |
x |
x |
x |
x |
x |
x |
x |
x |
||||
cp_rs1 |
nx0 |
x |
nx0 |
|||||||||
cp_rd |
x |
|||||||||||
cp_rs1_edges |
x |
|||||||||||
cp_imm_edges |
x |
x |
||||||||||
cp_fs1 |
x |
x |
x |
x |
x |
|||||||
cp_fs2 |
x |
|||||||||||
cp_fd |
x |
x |
x |
x |
x |
x |
||||||
cp_fs1_edges |
x |
H |
H |
H |
frm_D |
|||||||
cp_fs2_edges |
H |
|||||||||||
cmp_fd_fs1 |
x |
x |
x |
x |
||||||||
cp_frm |
2 |
2 |
||||||||||
cp_csr_fflags |
voun |
v |
v |
voun |
||||||||
cp_csr_frm |
x |
x |
||||||||||
cp_NaNBox |
S_H |
S_H |
S_H |
D_H |
D_H |
D_H |
D_H |
|||||
cp_fs1_badNB |
S_H |
S_H |
D_H |
D_H |
||||||||
cp_fs2_badNB |
S_H |
|||||||||||
cp_memval |
fp_half |
| Instruction | fmv.x.h | fsh |
|---|---|---|
RV32 |
x |
x |
RV64 |
x |
x |
ExtraExtensions |
D |
D |
cp_fs1_badNB |
D_H |
|
cp_fs2_badNB |
D_H |
| Normative Rule | Rule Text | Coverpoints |
|---|---|---|
ieee_std_tininess |
In the parlance of IEEE 754-2008, tininess is detected after rounding. |
ZicsrF_cg/cp_underflow_after_rounding_fcvt_h_s |
fp_nan_boxing |
{Zfhmin_flh_cg, Zfhmin_fmv_h_x_cg, Zfhmin_fcvt_h_s_cg}/cp_NaNBox_S_H, {ZfhminD_fcvt_h_d_cg, ZfhminD_fcvt_h_s_cg, ZfhminD_flh_cg, ZfhminD_fmv_h_x_cg}/cp_NaNBox_D_H |
|
fp_transfer_instrs_narrow_transfer_in |
A narrower n-bit transfer, n<FLEN, into the f registers will create a valid NaN-boxed value |
{Zfhmin_flh_cg, Zfhmin_fmv_h_x_cg}/cp_NaNBox_S_H, {ZfhminD_flh_cg, ZfhminD_fmv_h_x_cg}/cp_NaNBox_D_H |
fp_transfer_instrs_narrow_transfer_out |
Zfhmin_fmv_x_h_cg/cp_fs1_badNB_S_H, Zfhmin_fsh_cg/cp_fs2_badNB_S_H, ZfhminD_fmv_x_h_cg/cp_fs1_badNB_D_H, ZfhminD_fsh_cg/cp_fs2_badNB_D_H |
|
fp_nontransfer_instrs_improper_nan_boxed_input |
Zfhmin_fcvt_s_h_cg/cp_fs1_badNB_S_H, {ZfhminD_fcvt_d_h_cg, ZfhminD_fcvt_s_h_cg}/cp_fs1_badNB_D_H |
|
Zfh_canonical_nan |
For half-precision floating-point, the canonical NaN corresponds to the pattern 0x7e00. |
Zfhmin_fcvt_h_s_cg/cp_fs1_edges, ZfhminD_fcvt_h_d_cg/cr_fs1_edges_frm_D |
fsh_flh_op |
{Zfhmin_flh_cg, Zfhmin_fsh_cg}/{cp_rs1_nx0, cp_imm_edges} |
|
fsh_flh_atomic_align |
FLH and FSH are only guaranteed to execute atomically if the effective address is naturally aligned. |
Not tested: atomicity is not observable in single-hart signature tests |
fsh_flh_bits_maintained |
Zfhmin_flh_cg/{cp_memval_fp_half, cp_NaNBox_S_H}, Zfhmin_fsh_cg/{cp_fs2_edges_H, cp_fs2_badNB_S_H}, ZfhminD_flh_cg/cp_NaNBox_D_H, ZfhminD_fsh_cg/cp_fs2_badNB_D_H |
|
fcvt-s-h_fcvt-h-s_op |
Zfhmin_fcvt_h_s_cg/{cp_fd, cp_fs1_edges, cp_frm_2}, Zfhmin_fcvt_s_h_cg/cp_fs1_edges_H, ZfhminD_fcvt_h_s_cg/cp_NaNBox_D_H, ZfhminD_fcvt_s_h_cg/cp_fs1_badNB_D_H |
|
fcvt-d-h_fcvt-h-d_op |
ZfhminD_fcvt_d_h_cg/{cp_fd, cp_fs1_edges_H}, ZfhminD_fcvt_h_d_cg/{cp_fd, cr_fs1_edges_frm_D} |
|
fcvt-q-h_fcvt-h-q_op |
||
fmv-x-h_op |
Zfhmin_fmv_x_h_cg/{cp_rd, cp_fs1, cp_fs1_edges_H}, ZfhminD_fmv_x_h_cg/cp_fs1_badNB_D_H |
|
fmv-h-x_op |
Zfhmin_fmv_h_x_cg/{cp_rs1, cp_rs1_edges, cp_fd, cp_NaNBox_S_H}, ZfhminD_fmv_h_x_cg/cp_NaNBox_D_H |
|
fmv_half_bits_preserved |
Zfhmin_fmv_x_h_cg/cp_fs1_edges_H, Zfhmin_fmv_h_x_cg/cp_rs1_edges |
|
Zfhmin |
{Zfhmin_flh_cg, Zfhmin_fsh_cg, Zfhmin_fmv_x_h_cg, Zfhmin_fcvt_h_s_cg}/cp_asm_count |
UDB Parameters: None.
A.7.4. Zfa Additional FP
The rows of Table 50 with an entry in the ExtraExtensions column apply only when those extensions are also supported. The D rows cover the double-precision instructions and NaN-boxing of single-precision values in 64-bit registers, and the Zfh rows cover the half-precision instructions. The Zfh:D rows, which need both Zfh and D, cover NaN-boxing of half-precision values in 64-bit registers. The Zvfh row covers fli.h, which Zfa provides with Zvfh even when Zfh is not supported.
| Instruction | fleq.s | fli.s | fltq.s | fmaxm.s | fminm.s | fround.s | froundnx.s | fcvtmod.w.d | fleq.d | fli.d | fltq.d | fmaxm.d |
|---|---|---|---|---|---|---|---|---|---|---|---|---|
RV32 |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
RV64 |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
ExtraExtensions |
D |
D |
D |
D |
D |
|||||||
cp_asm_count |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
cp_rs1 |
fli |
fli |
||||||||||
cp_rd |
x |
x |
x |
x |
x |
|||||||
cp_fs1 |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
||
cp_fs2 |
x |
x |
x |
x |
x |
x |
x |
|||||
cp_fd |
x |
x |
x |
x |
x |
x |
x |
|||||
cp_fs1_edges |
x |
x |
x |
x |
x |
x |
D |
D |
D |
D |
||
cp_fs2_edges |
x |
x |
x |
x |
D |
D |
D |
|||||
cmp_fd_fs1 |
x |
x |
x |
x |
x |
|||||||
cmp_fd_fs2 |
x |
x |
x |
|||||||||
cp_frm |
2 |
2 |
||||||||||
cp_csr_fflags |
v |
v |
v |
v |
v |
vn |
vn |
v |
v |
v |
||
cp_csr_frm |
x |
x |
||||||||||
cr_fs1_fs2_edges |
x |
x |
x |
x |
D |
D |
D |
| Instruction | fminm.d | fmvh.x.d | fmvp.d.x | fround.d | froundnx.d | fleq.s | fli.s | fltq.s | fmaxm.s | fminm.s | fround.s | froundnx.s |
|---|---|---|---|---|---|---|---|---|---|---|---|---|
RV32 |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
RV64 |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
||
ExtraExtensions |
D |
D |
D |
D |
D |
D |
D |
D |
D |
D |
D |
D |
cp_asm_count |
x |
x |
x |
x |
x |
|||||||
cp_rs1 |
x |
|||||||||||
cp_rs2 |
x |
|||||||||||
cp_rd |
x |
|||||||||||
cp_rs1_edges |
x |
|||||||||||
cp_rs2_edges |
x |
|||||||||||
cp_fs1 |
x |
x |
x |
x |
||||||||
cp_fs2 |
x |
|||||||||||
cp_fd |
x |
x |
x |
x |
||||||||
cp_fs1_edges |
D |
D |
D |
D |
||||||||
cp_fs2_edges |
D |
|||||||||||
cmp_fd_fs1 |
x |
x |
x |
|||||||||
cmp_fd_fs2 |
x |
|||||||||||
cp_frm |
2 |
2 |
||||||||||
cp_csr_fflags |
v |
v |
vn |
|||||||||
cp_csr_frm |
x |
x |
||||||||||
cr_fs1_fs2_edges |
D |
|||||||||||
cp_NaNBox |
D_S |
D_S |
D_S |
D_S |
D_S |
|||||||
cp_fs1_badNB |
D_S |
D_S |
D_S |
D_S |
D_S |
D_S |
||||||
cp_fs2_badNB |
D_S |
D_S |
D_S |
D_S |
| Instruction | fleq.h | fli.h | fltq.h | fmaxm.h | fminm.h | fround.h | froundnx.h | fli.h | fleq.h | fli.h | fltq.h | fmaxm.h |
|---|---|---|---|---|---|---|---|---|---|---|---|---|
RV32 |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
RV64 |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
ExtraExtensions |
Zfh |
Zfh |
Zfh |
Zfh |
Zfh |
Zfh |
Zfh |
Zvfh |
Zfh:D |
Zfh:D |
Zfh:D |
Zfh:D |
cp_asm_count |
x |
x |
x |
x |
x |
x |
x |
x |
||||
cp_rs1 |
fli |
fli |
||||||||||
cp_rd |
x |
x |
||||||||||
cp_fs1 |
x |
x |
x |
x |
x |
x |
||||||
cp_fs2 |
x |
x |
x |
x |
||||||||
cp_fd |
x |
x |
x |
x |
x |
x |
||||||
cp_fs1_edges |
H |
H |
H |
H |
H |
H |
||||||
cp_fs2_edges |
H |
H |
H |
H |
||||||||
cmp_fd_fs1 |
x |
x |
x |
x |
||||||||
cmp_fd_fs2 |
x |
x |
||||||||||
cp_frm |
2 |
2 |
||||||||||
cp_csr_fflags |
v |
v |
v |
v |
v |
vn |
||||||
cp_csr_frm |
x |
x |
||||||||||
cr_fs1_fs2_edges |
H |
H |
H |
H |
||||||||
cp_NaNBox |
S_H |
S_H |
S_H |
S_H |
S_H |
S_H |
D_H |
D_H |
||||
cp_fs1_badNB |
S_H |
S_H |
S_H |
S_H |
S_H |
S_H |
D_H |
D_H |
D_H |
|||
cp_fs2_badNB |
S_H |
S_H |
S_H |
S_H |
D_H |
D_H |
D_H |
| Instruction | fminm.h | fround.h | froundnx.h |
|---|---|---|---|
RV32 |
x |
x |
x |
RV64 |
x |
x |
x |
ExtraExtensions |
Zfh:D |
Zfh:D |
Zfh:D |
cp_NaNBox |
D_H |
D_H |
D_H |
cp_fs1_badNB |
D_H |
D_H |
D_H |
cp_fs2_badNB |
D_H |
| Normative Rule | Rule Text | Coverpoints |
|---|---|---|
fp_nan_boxing |
{ZfaD_fli_s_cg, ZfaD_fminm_s_cg, ZfaD_fround_s_cg, ZfaD_froundnx_s_cg}/cp_NaNBox_D_S, {ZfaZfh_fli_h_cg, ZfaZfh_fminm_h_cg, ZfaZfh_fround_h_cg}/cp_NaNBox_S_H, {ZfaZfhD_fli_h_cg, ZfaZfhD_fminm_h_cg, ZfaZfhD_fround_h_cg, ZfaZfhD_froundnx_h_cg}/cp_NaNBox_D_H |
|
fp_nontransfer_instrs_improper_nan_boxed_input |
{ZfaD_fleq_s_cg, ZfaD_fminm_s_cg}/{cp_fs1_badNB_D_S, cp_fs2_badNB_D_S}, {ZfaZfh_fleq_h_cg, ZfaZfh_fminm_h_cg}/{cp_fs1_badNB_S_H, cp_fs2_badNB_S_H}, {ZfaZfhD_fleq_h_cg, ZfaZfhD_fminm_h_cg}/{cp_fs1_badNB_D_H, cp_fs2_badNB_D_H} |
|
fli-s_op |
Zfa_fli_s_cg/{cp_rs1_fli, cp_fd} |
|
fli-d_op |
ZfaD_fli_d_cg/{cp_rs1_fli, cp_fd} |
|
fli-q_op |
||
fli-h_op |
ZfaZfh_fli_h_cg/{cp_rs1_fli, cp_fd}, ZfaZvfh_fli_h_cg/{cp_rs1_fli, cp_fd, cp_NaNBox_S_H}, ZfaZfhD_fli_h_cg/cp_NaNBox_D_H |
|
fmaxm-s_fminm-s_op |
{Zfa_fminm_s_cg, Zfa_fmaxm_s_cg}/{cr_fs1_fs2_edges, cp_csr_fflags_v} |
|
fmaxm-d_fminm-d_op |
{ZfaD_fminm_d_cg, ZfaD_fmaxm_d_cg}/{cr_fs1_fs2_edges_D, cp_csr_fflags_v} |
|
fmaxm-q_fminm-q_op |
||
fmaxm-h_fminm-h_op |
{ZfaZfh_fminm_h_cg, ZfaZfh_fmaxm_h_cg}/{cr_fs1_fs2_edges_H, cp_csr_fflags_v}, {ZfaZfhD_fminm_h_cg, ZfaZfhD_fmaxm_h_cg}/{cp_fs1_badNB_D_H, cp_fs2_badNB_D_H} |
|
fround-s_op |
Zfa_fround_s_cg/{cp_fs1_edges, cp_frm_2, cp_csr_frm, cp_csr_fflags_v} |
|
fround-s_zero_inf |
{Zfa_fround_s_cg, Zfa_froundnx_s_cg}/cp_fs1_edges |
|
fround-s_nan_nv |
Zfa_fround_s_cg/{cp_fs1_edges, cp_csr_fflags_v}, Zfa_froundnx_s_cg/{cp_fs1_edges, cp_csr_fflags_vn} |
|
froundnx-s_op |
Zfa_froundnx_s_cg/{cp_fs1_edges, cp_frm_2, cp_csr_frm, cp_csr_fflags_vn} |
|
fround-d_froundnx-d_op |
{ZfaD_fround_d_cg, ZfaD_froundnx_d_cg}/{cp_fs1_edges_D, cp_frm_2} |
|
fround-q_froundnx-q_op |
||
fround-h_froundnx-h_op |
{ZfaZfh_fround_h_cg, ZfaZfh_froundnx_h_cg}/{cp_fs1_edges_H, cp_frm_2}, {ZfaZfhD_fround_h_cg, ZfaZfhD_froundnx_h_cg}/{cp_NaNBox_D_H, cp_fs1_badNB_D_H} |
|
fcvtmod-w-d_op |
ZfaD_fcvtmod_w_d_cg/{cp_rd, cp_fs1, cp_fs1_edges_D, cp_csr_fflags_vn} |
|
fcvtmod-w-d_flags |
ZfaD_fcvtmod_w_d_cg/{cp_fs1_edges_D, cp_csr_fflags_vn} |
|
fmvh-x-d_op |
ZfaD_fmvh_x_d_cg/{cp_rd, cp_fs1, cp_fs1_edges_D} |
|
fmvp-d-x_op |
ZfaD_fmvp_d_x_cg/{cp_rs1_edges, cp_rs2_edges, cp_fd} |
|
fmvh-x-q_op |
||
fmvp-q-x_op |
||
fleq-s_fltq-s_op |
{Zfa_fleq_s_cg, Zfa_fltq_s_cg}/{cr_fs1_fs2_edges, cp_csr_fflags_v} |
|
fleq-d_fltq-d_op |
{ZfaD_fleq_d_cg, ZfaD_fltq_d_cg}/{cr_fs1_fs2_edges_D, cp_csr_fflags_v} |
|
fleq-q_fltq-q_op |
||
fleq-h_fltq-h_op |
{ZfaZfh_fleq_h_cg, ZfaZfh_fltq_h_cg}/{cr_fs1_fs2_edges_H, cp_csr_fflags_v}, {ZfaZfhD_fleq_h_cg, ZfaZfhD_fltq_h_cg}/{cp_fs1_badNB_D_H, cp_fs2_badNB_D_H} |
UDB Parameters: None.
Zfbfmin Scalar BF16 Converts
| Instruction | fcvt.bf16.s | fcvt.s.bf16 | flh | fmv.h.x | fmv.x.h | fsh |
|---|---|---|---|---|---|---|
RV32 |
x |
x |
x |
x |
x |
x |
RV64 |
x |
x |
x |
x |
x |
x |
cp_asm_count |
x |
x |
x |
x |
x |
x |
cp_rs1 |
nx0 |
x |
nx0 |
|||
cp_rd |
x |
|||||
cp_rs1_edges |
x |
|||||
cp_imm_edges |
x |
x |
||||
cp_fs1 |
x |
x |
x |
|||
cp_fs2 |
x |
|||||
cp_fd |
x |
x |
x |
x |
||
cp_fs1_edges |
x |
BF16 |
H |
|||
cp_fs2_edges |
H |
|||||
cmp_fd_fs1 |
x |
x |
||||
cp_frm |
2 |
|||||
cp_csr_fflags |
voun |
v |
||||
cp_csr_frm |
x |
|||||
cp_NaNBox |
S_H |
S_H |
S_H |
|||
cp_fs1_badNB |
S_H |
S_H |
||||
cp_fs2_badNB |
S_H |
| Normative Rule | Rule Text | Coverpoints |
|---|---|---|
fp_nan_boxing |
{Zfbfmin_fcvt_bf16_s_cg, Zfbfmin_flh_cg, Zfbfmin_fmv_h_x_cg}/cp_NaNBox_S_H |
|
fp_transfer_instrs_narrow_transfer_in |
A narrower n-bit transfer, n<FLEN, into the f registers will create a valid NaN-boxed value |
{Zfbfmin_flh_cg, Zfbfmin_fmv_h_x_cg}/cp_NaNBox_S_H |
fp_transfer_instrs_narrow_transfer_out |
Zfbfmin_fmv_x_h_cg/cp_fs1_badNB_S_H, Zfbfmin_fsh_cg/cp_fs2_badNB_S_H |
|
fp_nontransfer_instrs_improper_nan_boxed_input |
Zfbfmin_fcvt_s_bf16_cg/cp_fs1_badNB_S_H |
|
fsh_flh_op |
{Zfbfmin_flh_cg, Zfbfmin_fsh_cg}/{cp_rs1_nx0, cp_imm_edges} |
|
fmv-x-h_op |
Zfbfmin_fmv_x_h_cg/{cp_rd, cp_fs1, cp_fs1_edges_H} |
|
fmv-h-x_op |
Zfbfmin_fmv_h_x_cg/{cp_rs1, cp_rs1_edges, cp_fd, cp_NaNBox_S_H} |
|
bf16_subnorm |
Zfbfmin_fcvt_bf16_s_cg/{cp_fs1_edges, cp_frm_2, cp_csr_fflags_voun} |
|
bf16_canonical_nan |
For BF16, the canonical NaN corresponds to the pattern 0x7fc0. |
Zfbfmin_fcvt_bf16_s_cg/cp_fs1_edges |
fcvt-bf16-s_op |
Narrowing convert FP32 value to a BF16 value. Round according to the RM field. |
Zfbfmin_fcvt_bf16_s_cg/{cp_fd, cp_fs1_edges, cp_frm_2, cp_csr_frm} |
fcvt-s-bf16_op |
Converts a BF16 value to an FP32 value. The conversion is exact. |
Zfbfmin_fcvt_s_bf16_cg/{cp_fd, cp_fs1_edges_BF16, cp_csr_fflags_v} |
UDB Parameters: None.
See also Zfhmin normative rules.
A.7.5. ZicsrF Floating-Point CSRs
These test additional CSRs that exist when floating-point is supported. Although these tests, like most privileged tests, are generated from a spreadsheet and manual coverpoints rather than a CSV, they do not assume any privileged capabilities, including the existence of machine mode. Hence they are compatible with RVI20 and simple cores that lack privileged modes.
Note that this suite also tests that the underflow flag is set only if the result is tiny after rounding, per the RISC-V spec.
| Coverpoint | Goal | Feature Description | Normative Rule |
|---|---|---|---|
cp_fcsr_access |
Writing to the CSR field |
csr read, write all 1s, write all 0s, set all 1s, clear all 1s, write back initial value of each register: fcsr, fflags, frm |
fcsr_op_sz_acc |
cp_fcsr_frm_write |
Writing to the CSR field |
Write 0-7 to fcsr.frm and read back fcsr and frm and fflags |
fflags_op_sz_acc |
cp_fcsr_fflags_write |
Writing to the CSR field |
Write 0-31 to fcsr.fflags and read back fcsr and frm and fflags |
fflags_op_sz_acc |
cp_fcsr_walk |
Writing to the CSR field |
Write walking 1s to fcsr, frm, fflags |
fcsr_op_sz_acc |
cp_frm_write |
Writing to the CSR field |
Write 0-7 to frm and read back fcsr, frm, fflags |
fflags_op_sz_acc |
cp_fflags_write |
Writing to the CSR field |
write 0-31 to fflags and read back fflags, frm, fcsr |
fflags_op_sz_acc |
csr_fflags_set_m_* |
Writing to the CSR field |
Reset fflags to 0, then execute following instructions: 1/0 (DivZero), 1/3 (Inexact), largest + largest (overflow), smallest * smallest (underflow), infinity - infinity (invalid) |
|
cp_underflow_after_rounding |
Test each of the following floating-point operations does not set the underflow flag, even though it would if underflow were detected before rounding. Note that these test cases are obtained from TestFloat. |
ieee_std_tininess |
|
These are unprivileged tests that should never trap. Suitable for RVI20 and other systems with no machine mode. |
|||
Tests run in M mode with mstatus.FS = 11 if Sm is supported, or else mode is not set |
|||
fdiv.h.rne 07FF 4000 = 03FF |
|||
| Normative Rule | Rule Text | Coverpoints |
|---|---|---|
fcsr_op_sz_acc |
ZicsrF_cg/{cp_fcsr_access, cp_fcsr_walk}, F_fadd_s_cg/cp_csr_frm |
|
fcsr_rsv |
ZicsrF_cg/{cp_fcsr_walk, cp_fcsr_access} |
|
fflags_op_sz_acc, frm_op_sz_acc |
fflags_op_sz_acc: The |
ZicsrF_cg/{cp_fcsr_frm_write, cp_frm_write, cp_fcsr_fflags_write, cp_fflags_write, cp_fcsr_swap} |
dyn_round_enc |
ZicsrF_cg/cp_frm_reserved_static_rm, F_fadd_s_cg/cp_csr_frm |
|
roundingmode_dynamic |
ZicsrF_cg/cp_frm_reserved_static_rm, F_fadd_s_cg/{cp_frm_3, cp_csr_frm} |
|
fcsr_fflags_op |
ZicsrF_cg/{cp_fflags_set_m_NV, cp_fflags_set_m_DZ, cp_fflags_set_m_OF, cp_fflags_set_m_UF, cp_fflags_set_m_NX}, F_fdiv_s_cg/cp_csr_fflags_vdoun |
|
ieee_std_subnormal |
Operations on subnormal numbers are handled in accordance with IEEE 754-2008. |
ZicsrF_cg/cp_underflow_after_rounding_fma_s |
ieee_std_tininess |
In the parlance of IEEE 754-2008, tininess is detected after rounding. |
ZicsrF_cg/{cp_underflow_after_rounding_fma_s, cp_underflow_after_rounding_fmul_s} |
UDB Parameters: None.
A.8. Zb* Bit Manipulation Extensions
A.8.1. Zba Bit-Manipulation for Addressing
| Instruction | add.uw | sh1add | sh1add.uw | sh2add | sh2add.uw | sh3add | sh3add.uw | slli.uw |
|---|---|---|---|---|---|---|---|---|
RV32 |
x |
x |
x |
|||||
RV64 |
x |
x |
x |
x |
x |
x |
x |
x |
cp_asm_count |
x |
x |
x |
x |
x |
x |
x |
x |
cp_rs1 |
x |
x |
x |
x |
x |
x |
x |
x |
cp_rs2 |
x |
x |
x |
x |
x |
x |
x |
|
cp_rd |
x |
x |
x |
x |
x |
x |
x |
x |
cp_rs1_edges |
x |
x |
x |
x |
x |
x |
x |
x |
cp_rs2_edges |
x |
x |
x |
x |
x |
x |
x |
|
cr_rs1_rs2_edges |
x |
x |
x |
x |
x |
x |
x |
|
cmp_rs1_rs2 |
x |
x |
x |
x |
x |
x |
x |
|
cmp_rd_rs1 |
x |
x |
x |
x |
x |
x |
x |
x |
cmp_rd_rs2 |
x |
x |
x |
x |
x |
x |
x |
|
cmp_rd_rs1_rs2 |
x |
x |
x |
x |
x |
x |
x |
|
cp_uimm |
x |
|||||||
cr_rs1_imm_edges |
uimm |
| Normative Rule | Rule Text | Coverpoints |
|---|---|---|
Zba_insns_tbl |
{Zba_sh1add_cg, Zba_sh2add_cg, Zba_sh3add_cg, Zba_add_uw_cg}/cp_asm_count |
|
bitmanip_rv32_rv64 |
Zba_sh1add_cg/cr_rs1_rs2_edges |
|
bitmanip_uw_suffix_semantics |
{Zba_add_uw_cg, Zba_sh1add_uw_cg}/cr_rs1_rs2_edges, Zba_slli_uw_cg/cr_rs1_imm_edges_uimm |
|
slli-uw_op |
Zba_slli_uw_cg/cr_rs1_imm_edges_uimm |
|
sh1add_enc |
Zba_sh1add_cg/cr_rs1_rs2_edges |
|
sh1add_op |
Zba_sh1add_cg/cr_rs1_rs2_edges |
|
sh1add-uw_enc |
Zba_sh1add_uw_cg/cr_rs1_rs2_edges |
|
sh1add-uw_op |
Zba_sh1add_uw_cg/cr_rs1_rs2_edges |
|
sh2add_enc |
Zba_sh2add_cg/cr_rs1_rs2_edges |
|
sh2add_op |
Zba_sh2add_cg/cr_rs1_rs2_edges |
|
sh2add-uw_enc |
Zba_sh2add_uw_cg/cr_rs1_rs2_edges |
|
sh2add-uw_op |
Zba_sh2add_uw_cg/cr_rs1_rs2_edges |
|
sh3add_enc |
Zba_sh3add_cg/cr_rs1_rs2_edges |
|
sh3add_op |
Zba_sh3add_cg/cr_rs1_rs2_edges |
|
sh3add-uw_enc |
Zba_sh3add_uw_cg/cr_rs1_rs2_edges |
|
sh3add-uw_op |
Zba_sh3add_uw_cg/cr_rs1_rs2_edges |
|
add-uw_enc |
Zba_add_uw_cg/cr_rs1_rs2_edges |
|
add-uw_op |
Zba_add_uw_cg/cr_rs1_rs2_edges |
|
slli-uw_enc |
Zba_slli_uw_cg/cr_rs1_imm_edges_uimm |
UDB Parameters: None.
A.8.2. Zbb Basic Bit-Manipulation
| Instruction | andn | clz | clzw | cpop | cpopw | ctz | ctzw | max | maxu | min | minu | orc.b |
|---|---|---|---|---|---|---|---|---|---|---|---|---|
RV32 |
x |
x |
x |
x |
x |
x |
x |
x |
x |
|||
RV64 |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
cp_asm_count |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
cp_rs1 |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
cp_rs2 |
x |
x |
x |
x |
x |
|||||||
cp_rd |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
cp_rs1_edges |
x |
walkone |
walkonew |
walkmask |
walkmaskw |
walkone |
walkonew |
x |
x |
x |
x |
orcb |
cp_rs2_edges |
x |
x |
x |
x |
x |
|||||||
cr_rs1_rs2_edges |
x |
x |
x |
x |
x |
|||||||
cmp_rs1_rs2 |
x |
x |
x |
x |
x |
|||||||
cmp_rd_rs1 |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
cmp_rd_rs2 |
x |
x |
x |
x |
x |
|||||||
cmp_rd_rs1_rs2 |
x |
x |
x |
x |
x |
| Instruction | orn | rev8 | rol | rolw | ror | rori | roriw | rorw | sext.b | sext.h | xnor | zext.h |
|---|---|---|---|---|---|---|---|---|---|---|---|---|
RV32 |
x |
x |
x |
x |
x |
x |
x |
x |
x |
|||
RV64 |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
cp_asm_count |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
cp_rs1 |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
cp_rs2 |
x |
x |
x |
x |
x |
x |
||||||
cp_rd |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
cp_rs1_edges |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
cp_rs2_edges |
x |
x |
x |
x |
x |
x |
||||||
cr_rs1_rs2_edges |
x |
x |
x |
x |
x |
x |
||||||
cmp_rs1_rs2 |
x |
x |
x |
x |
x |
x |
||||||
cmp_rd_rs1 |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
cmp_rd_rs2 |
x |
x |
x |
x |
x |
x |
||||||
cmp_rd_rs1_rs2 |
x |
x |
x |
x |
x |
x |
||||||
cp_uimm |
x |
5 |
||||||||||
cr_rs1_imm_edges |
uimm |
uimmw |
| Normative Rule | Rule Text | Coverpoints |
|---|---|---|
bitmanip_w_suffix_semantics |
Zbb_clzw_cg/cp_rs1_edges_walkonew, Zbb_cpopw_cg/cp_rs1_edges_walkmaskw, Zbb_rolw_cg/cr_rs1_rs2_edges, Zbb_roriw_cg/cr_rs1_imm_edges_uimmw |
|
bitmanip_bhw_suffix_semantics |
Zbb_orc_b_cg/cp_rs1_edges_orcb, {Zbb_sext_b_cg, Zbb_sext_h_cg}/cp_rs1_edges |
|
B_extension_composition |
The |
Definition, checked through UDB |
Zbb_sign_zero_extension_function |
{Zbb_sext_b_cg, Zbb_sext_h_cg, Zbb_zext_h_cg}/cp_rs1_edges |
|
Zbb_rotate_semantics |
{Zbb_rol_cg, Zbb_ror_cg}/cr_rs1_rs2_edges, Zbb_rori_cg/cr_rs1_imm_edges_uimm |
|
Zbb_orc-b_semantics |
Zbb_orc_b_cg/cp_rs1_edges_orcb |
|
andn_enc |
Zbb_andn_cg/cr_rs1_rs2_edges |
|
andn_op |
Zbb_andn_cg/cr_rs1_rs2_edges |
|
clz_enc |
Zbb_clz_cg/cp_rs1_edges_walkone |
|
clz_op |
Zbb_clz_cg/cp_rs1_edges_walkone |
|
clzw_enc |
Zbb_clzw_cg/cp_rs1_edges_walkonew |
|
clzw_op |
Zbb_clzw_cg/cp_rs1_edges_walkonew |
|
cpop_enc |
Zbb_cpop_cg/cp_rs1_edges_walkmask |
|
cpop_op |
Zbb_cpop_cg/cp_rs1_edges_walkmask |
|
cpopw_enc |
Zbb_cpopw_cg/cp_rs1_edges_walkmaskw |
|
cpopw_op |
Zbb_cpopw_cg/cp_rs1_edges_walkmaskw |
|
ctz_enc |
Zbb_ctz_cg/cp_rs1_edges_walkone |
|
ctz_op |
Zbb_ctz_cg/cp_rs1_edges_walkone |
|
ctzw_enc |
Zbb_ctzw_cg/cp_rs1_edges_walkonew |
|
ctzw_op |
Zbb_ctzw_cg/cp_rs1_edges_walkonew |
|
max_enc |
Zbb_max_cg/cr_rs1_rs2_edges |
|
max_op |
Zbb_max_cg/cr_rs1_rs2_edges |
|
maxu_enc |
Zbb_maxu_cg/cr_rs1_rs2_edges |
|
maxu_op |
Zbb_maxu_cg/cr_rs1_rs2_edges |
|
min_enc |
Zbb_min_cg/cr_rs1_rs2_edges |
|
min_op |
Zbb_min_cg/cr_rs1_rs2_edges |
|
minu_enc |
Zbb_minu_cg/cr_rs1_rs2_edges |
|
minu_op |
Zbb_minu_cg/cr_rs1_rs2_edges |
|
orc-b_enc |
Zbb_orc_b_cg/cp_rs1_edges_orcb |
|
orc-b_op |
Zbb_orc_b_cg/cp_rs1_edges_orcb |
|
orn_enc |
Zbb_orn_cg/cr_rs1_rs2_edges |
|
orn_op |
Zbb_orn_cg/cr_rs1_rs2_edges |
|
rev8_rv32_enc |
Zbb_rev8_cg/cp_rs1_edges |
|
rev8_rv64_enc |
Zbb_rev8_cg/cp_rs1_edges |
|
rev8_op |
Zbb_rev8_cg/cp_rs1_edges |
|
rol_enc |
Zbb_rol_cg/cr_rs1_rs2_edges |
|
rol_op |
Zbb_rol_cg/cr_rs1_rs2_edges |
|
rolw_enc |
Zbb_rolw_cg/cr_rs1_rs2_edges |
|
rolw_op |
Zbb_rolw_cg/cr_rs1_rs2_edges |
|
ror_enc |
Zbb_ror_cg/cr_rs1_rs2_edges |
|
ror_op |
Zbb_ror_cg/cr_rs1_rs2_edges |
|
rori_rv32_enc |
Zbb_rori_cg/cr_rs1_imm_edges_uimm |
|
rori_rv64_enc |
Zbb_rori_cg/cr_rs1_imm_edges_uimm |
|
rori_op |
Zbb_rori_cg/cr_rs1_imm_edges_uimm |
|
roriw_enc |
Zbb_roriw_cg/cr_rs1_imm_edges_uimmw |
|
roriw_op |
Zbb_roriw_cg/cr_rs1_imm_edges_uimmw |
|
rorw_enc |
Zbb_rorw_cg/cr_rs1_rs2_edges |
|
rorw_op |
Zbb_rorw_cg/cr_rs1_rs2_edges |
|
sext-b_enc |
Zbb_sext_b_cg/cp_rs1_edges |
|
sext-b_op |
Zbb_sext_b_cg/cp_rs1_edges |
|
sext-h_enc |
Zbb_sext_h_cg/cp_rs1_edges |
|
sext-h_op |
Zbb_sext_h_cg/cp_rs1_edges |
|
xnor_enc |
Zbb_xnor_cg/cr_rs1_rs2_edges |
|
xnor_op |
Zbb_xnor_cg/cr_rs1_rs2_edges |
|
zext-h_rv32_enc |
Zbb_zext_h_cg/cp_rs1_edges |
|
zext-h_rv64_enc |
Zbb_zext_h_cg/cp_rs1_edges |
|
zext-h_op |
Zbb_zext_h_cg/cp_rs1_edges |
UDB Parameters: None.
A.8.3. Zbc Carry-less Multiplication
| Instruction | clmul | clmulh | clmulr |
|---|---|---|---|
RV32 |
x |
x |
x |
RV64 |
x |
x |
x |
cp_asm_count |
x |
x |
x |
cp_rs1 |
x |
x |
x |
cp_rs2 |
x |
x |
x |
cp_rd |
x |
x |
x |
cp_rs1_edges |
x |
x |
x |
cp_rs2_edges |
x |
x |
x |
cr_rs1_rs2_edges |
x |
x |
x |
cmp_rs1_rs2 |
x |
x |
x |
cmp_rd_rs1 |
x |
x |
x |
cmp_rd_rs2 |
x |
x |
x |
cmp_rd_rs1_rs2 |
x |
x |
x |
| Normative Rule | Rule Text | Coverpoints |
|---|---|---|
Zbc_clmul_clmulh_results |
Zbc_clmul_cg/cr_rs1_rs2_edges, Zbc_clmulh_cg/cr_rs1_rs2_edges |
|
Zbc_clmulr_results |
CLMULR produces bits 2×XLEN−2:XLEN-1 of the 2×XLEN carry-less product. |
Zbc_clmulr_cg/cr_rs1_rs2_edges |
clmul_enc |
Zbc_clmul_cg/cr_rs1_rs2_edges |
|
clmul_op |
Zbc_clmul_cg/cr_rs1_rs2_edges |
|
clmulh_enc |
Zbc_clmulh_cg/cr_rs1_rs2_edges |
|
clmulh_op |
Zbc_clmulh_cg/cr_rs1_rs2_edges |
|
clmulr_enc |
Zbc_clmulr_cg/cr_rs1_rs2_edges |
|
clmulr_op |
Zbc_clmulr_cg/cr_rs1_rs2_edges |
UDB Parameters: None.
A.8.4. Zbs Single-Bit Manipulation
| Instruction | bclr | bclri | bext | bexti | binv | binvi | bset | bseti |
|---|---|---|---|---|---|---|---|---|
RV32 |
x |
x |
x |
x |
x |
x |
x |
x |
RV64 |
x |
x |
x |
x |
x |
x |
x |
x |
cp_asm_count |
x |
x |
x |
x |
x |
x |
x |
x |
cp_rs1 |
x |
x |
x |
x |
x |
x |
x |
x |
cp_rs2 |
x |
x |
x |
x |
||||
cp_rd |
x |
x |
x |
x |
x |
x |
x |
x |
cp_rs1_edges |
x |
x |
x |
x |
x |
x |
x |
x |
cp_rs2_edges |
x |
x |
x |
x |
||||
cr_rs1_rs2_edges |
x |
x |
x |
x |
||||
cmp_rs1_rs2 |
x |
x |
x |
x |
||||
cmp_rd_rs1 |
x |
x |
x |
x |
x |
x |
x |
x |
cmp_rd_rs2 |
x |
x |
x |
x |
||||
cmp_rd_rs1_rs2 |
x |
x |
x |
x |
||||
cp_uimm |
x |
x |
x |
x |
||||
cr_rs1_imm_edges |
uimm |
uimm |
uimm |
uimm |
| Normative Rule | Rule Text | Coverpoints |
|---|---|---|
Zbs_single_bit_functionality |
{Zbs_bset_cg, Zbs_bclr_cg, Zbs_binv_cg}/cr_rs1_rs2_edges, Zbs_bexti_cg/cr_rs1_imm_edges_uimm |
|
bclr_enc |
Zbs_bclr_cg/cr_rs1_rs2_edges |
|
bclr_op |
Zbs_bclr_cg/cr_rs1_rs2_edges |
|
bclri_rv32_enc |
Zbs_bclri_cg/cr_rs1_imm_edges_uimm |
|
bclri_rv64_enc |
Zbs_bclri_cg/cr_rs1_imm_edges_uimm |
|
bclri_op |
Zbs_bclri_cg/cr_rs1_imm_edges_uimm |
|
bext_enc |
Zbs_bext_cg/cr_rs1_rs2_edges |
|
bext_op |
Zbs_bext_cg/cr_rs1_rs2_edges |
|
bexti_rv32_enc |
Zbs_bexti_cg/cr_rs1_imm_edges_uimm |
|
bexti_rv64_enc |
Zbs_bexti_cg/cr_rs1_imm_edges_uimm |
|
bexti_op |
Zbs_bexti_cg/cr_rs1_imm_edges_uimm |
|
binv_enc |
Zbs_binv_cg/cr_rs1_rs2_edges |
|
binv_op |
Zbs_binv_cg/cr_rs1_rs2_edges |
|
binvi_rv32_enc |
Zbs_binvi_cg/cr_rs1_imm_edges_uimm |
|
binvi_rv64_enc |
Zbs_binvi_cg/cr_rs1_imm_edges_uimm |
|
binvi_op |
Zbs_binvi_cg/cr_rs1_imm_edges_uimm |
|
bset_enc |
Zbs_bset_cg/cr_rs1_rs2_edges |
|
bset_op |
Zbs_bset_cg/cr_rs1_rs2_edges |
|
bseti_rv32_enc |
Zbs_bseti_cg/cr_rs1_imm_edges_uimm |
|
bseti_rv64_enc |
Zbs_bseti_cg/cr_rs1_imm_edges_uimm |
|
bseti_op |
Zbs_bseti_cg/cr_rs1_imm_edges_uimm |
UDB Parameters: None.
A.8.5. Zbkb Bit-Manipulation for Cryptography
| Instruction | andn | brev8 | orn | pack | packh | packw | rev8 | rol | rolw | ror | rori | roriw |
|---|---|---|---|---|---|---|---|---|---|---|---|---|
RV32 |
x |
x |
x |
x |
x |
x |
x |
x |
x |
|||
RV64 |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
cp_asm_count |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
cp_rs1 |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
cp_rs2 |
x |
x |
nx0 |
x |
nx0 |
x |
x |
x |
||||
cp_rd |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
cp_rs1_edges |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
cp_rs2_edges |
x |
x |
x |
x |
x |
x |
x |
x |
||||
cr_rs1_rs2_edges |
x |
x |
x |
x |
x |
x |
x |
x |
||||
cmp_rs1_rs2 |
x |
x |
nx0 |
x |
nx0 |
x |
x |
x |
||||
cmp_rd_rs1 |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
||
cmp_rd_rs2 |
x |
x |
nx0 |
x |
nx0 |
x |
x |
x |
||||
cmp_rd_rs1_rs2 |
x |
x |
nx0 |
x |
nx0 |
x |
x |
x |
||||
cp_uimm |
x |
5 |
||||||||||
cr_rs1_imm_edges |
uimm |
uimmw |
| Instruction | rorw | unzip | xnor | zip |
|---|---|---|---|---|
RV32 |
x |
x |
x |
|
RV64 |
x |
x |
||
cp_asm_count |
x |
x |
x |
x |
cp_rs1 |
x |
x |
x |
x |
cp_rs2 |
x |
x |
||
cp_rd |
x |
x |
x |
x |
cp_rs1_edges |
x |
x |
x |
x |
cp_rs2_edges |
x |
x |
||
cr_rs1_rs2_edges |
x |
x |
||
cmp_rs1_rs2 |
x |
x |
||
cmp_rd_rs1 |
x |
x |
x |
x |
cmp_rd_rs2 |
x |
x |
||
cmp_rd_rs1_rs2 |
x |
x |
| Normative Rule | Rule Text | Coverpoints |
|---|---|---|
Zbkb_insns_tbl |
{Zbkb_rol_cg, Zbkb_andn_cg, Zbkb_pack_cg, Zbkb_brev8_cg}/cp_asm_count |
|
pack_enc |
Zbkb_pack_cg/cr_rs1_rs2_edges |
|
pack_op |
Zbkb_pack_cg/cr_rs1_rs2_edges |
|
packh_enc |
Zbkb_packh_cg/cr_rs1_rs2_edges |
|
packh_op |
Zbkb_packh_cg/cr_rs1_rs2_edges |
|
packw_enc |
Zbkb_packw_cg/cr_rs1_rs2_edges |
|
packw_op |
Zbkb_packw_cg/cr_rs1_rs2_edges |
|
brev8_enc |
Zbkb_brev8_cg/cp_rs1_edges |
|
brev8_op |
Zbkb_brev8_cg/cp_rs1_edges |
|
unzip_enc |
Zbkb_unzip_cg/cp_rs1_edges |
|
unzip_op |
Zbkb_unzip_cg/cp_rs1_edges |
|
zip_enc |
Zbkb_zip_cg/cp_rs1_edges |
|
zip_op |
Zbkb_zip_cg/cp_rs1_edges |
UDB Parameters: None.
See also normative rules from Zbb.
A.8.6. Zbkc Carry-less Multiplication for Cryptography
| Instruction | clmul | clmulh |
|---|---|---|
RV32 |
x |
x |
RV64 |
x |
x |
cp_asm_count |
x |
x |
cp_rs1 |
x |
x |
cp_rs2 |
x |
x |
cp_rd |
x |
x |
cp_rs1_edges |
x |
x |
cp_rs2_edges |
x |
x |
cr_rs1_rs2_edges |
x |
x |
cmp_rs1_rs2 |
x |
x |
cmp_rd_rs1 |
x |
x |
cmp_rd_rs2 |
x |
x |
cmp_rd_rs1_rs2 |
x |
x |
| Normative Rule | Rule Text | Coverpoints |
|---|---|---|
Zbkc_insns |
This extension is a subset of the |
{Zbkc_clmul_cg, Zbkc_clmulh_cg}/cr_rs1_rs2_edges |
UDB Parameters: None.
See also normative rules from Zbc.
A.8.7. Zbkx Permutation
| Instruction | xperm4 | xperm8 |
|---|---|---|
RV32 |
x |
x |
RV64 |
x |
x |
cp_asm_count |
x |
x |
cp_rs1 |
x |
x |
cp_rs2 |
x |
x |
cp_rd |
x |
x |
cp_rs1_edges |
x |
x |
cp_rs2_edges |
x |
x |
cr_rs1_rs2_edges |
x |
x |
cmp_rs1_rs2 |
x |
x |
cmp_rd_rs1 |
x |
x |
cmp_rd_rs2 |
x |
x |
cmp_rd_rs1_rs2 |
x |
x |
| Normative Rule | Rule Text | Coverpoints |
|---|---|---|
Zbkx_lookup_table_model |
{Zbkx_xperm4_cg, Zbkx_xperm8_cg}/cr_rs1_rs2_edges |
|
Zbkx_indexing_behavior |
{Zbkx_xperm4_cg, Zbkx_xperm8_cg}/cr_rs1_rs2_edges |
|
xperm8_enc |
Zbkx_xperm8_cg/cr_rs1_rs2_edges |
|
xperm8_op |
Zbkx_xperm8_cg/cr_rs1_rs2_edges |
|
xperm4_enc |
Zbkx_xperm4_cg/cr_rs1_rs2_edges |
|
xperm4_op |
Zbkx_xperm4_cg/cr_rs1_rs2_edges |
UDB Parameters: None.
A.9. Zk* Cryptographic Extensions
A.9.1. Zkne NIST AES Encryption
| Instruction | aes32esi | aes32esmi | aes64es | aes64esm | aes64ks1i | aes64ks2 |
|---|---|---|---|---|---|---|
RV32 |
x |
x |
||||
RV64 |
x |
x |
x |
x |
||
cp_asm_count |
x |
x |
x |
x |
x |
x |
cp_rs1 |
x |
x |
x |
x |
x |
x |
cp_rs2 |
x |
x |
x |
x |
x |
|
cp_rd |
x |
x |
x |
x |
x |
x |
cp_rs1_edges |
x |
x |
x |
x |
x |
x |
cp_rs2_edges |
x |
x |
x |
x |
x |
|
cr_rs1_rs2_edges |
x |
x |
x |
x |
x |
|
cmp_rs1_rs2 |
x |
x |
x |
x |
x |
|
cmp_rd_rs1 |
x |
x |
x |
x |
x |
x |
cmp_rd_rs2 |
x |
x |
x |
x |
x |
|
cmp_rd_rs1_rs2 |
x |
x |
x |
x |
x |
|
cp_bs |
x |
x |
||||
cp_rnum |
x |
|||||
cp_sbox |
x |
x |
x |
x |
rs1 |
| Normative Rule | Rule Text | Coverpoints |
|---|---|---|
Zkn_impl_all |
A core which implements |
Definition, checked through UDB |
Zk_impl_all |
A core which implements |
Definition, checked through UDB |
Zk_scalar_xreg_op |
{Zkne_aes32esi_cg, Zkne_aes64es_cg}/{cr_rs1_rs2_edges} |
|
aes32esi_enc |
Zkne_aes32esi_cg/{cr_rs1_rs2_edges} |
|
aes32esi_op |
Zkne_aes32esi_cg/{cr_rs1_rs2_edges, cp_bs, cp_sbox} |
|
aes32esmi_enc |
Zkne_aes32esmi_cg/{cr_rs1_rs2_edges, cp_bs, cp_sbox} |
|
aes32esmi_op |
Zkne_aes32esmi_cg/{cr_rs1_rs2_edges, cp_bs, cp_sbox} |
|
aes64es_enc |
Zkne_aes64es_cg/{cr_rs1_rs2_edges, cp_sbox} |
|
aes64es_op |
Zkne_aes64es_cg/{cr_rs1_rs2_edges, cp_sbox} |
|
aes64esm_enc |
Zkne_aes64esm_cg/{cr_rs1_rs2_edges, cp_sbox} |
|
aes64esm_op |
Zkne_aes64esm_cg/{cr_rs1_rs2_edges, cp_sbox} |
|
aes64ks1i_enc |
Zkne_aes64ks1i_cg/{cp_rs1_edges, cp_rnum, cp_sbox_rs1} |
|
aes64ks1i_op |
Zkne_aes64ks1i_cg/{cp_rs1_edges, cp_rnum, cp_sbox_rs1} |
|
aes64ks2_enc |
Zkne_aes64ks2_cg/cr_rs1_rs2_edges |
|
aes64ks2_op |
Zkne_aes64ks2_cg/cr_rs1_rs2_edges |
UDB Parameters: None.
A.9.2. Zknd NIST AES Decryption
| Instruction | aes32dsi | aes32dsmi | aes64ds | aes64dsm | aes64im | aes64ks1i | aes64ks2 |
|---|---|---|---|---|---|---|---|
RV32 |
x |
x |
|||||
RV64 |
x |
x |
x |
x |
x |
||
cp_asm_count |
x |
x |
x |
x |
x |
x |
x |
cp_rs1 |
x |
x |
x |
x |
x |
x |
x |
cp_rs2 |
x |
x |
x |
x |
x |
||
cp_rd |
x |
x |
x |
x |
x |
x |
x |
cp_rs1_edges |
x |
x |
x |
x |
x |
x |
x |
cp_rs2_edges |
x |
x |
x |
x |
x |
||
cr_rs1_rs2_edges |
x |
x |
x |
x |
x |
||
cmp_rs1_rs2 |
x |
x |
x |
x |
x |
||
cmp_rd_rs1 |
x |
x |
x |
x |
x |
x |
x |
cmp_rd_rs2 |
x |
x |
x |
x |
x |
||
cmp_rd_rs1_rs2 |
x |
x |
x |
x |
x |
||
cp_bs |
x |
x |
|||||
cp_rnum |
x |
||||||
cp_sbox |
x |
x |
x |
x |
rs1 |
| Normative Rule | Rule Text | Coverpoints |
|---|---|---|
aes32dsi_enc |
Zknd_aes32dsi_cg/{cr_rs1_rs2_edges, cp_bs, cp_sbox} |
|
aes32dsi_op |
Zknd_aes32dsi_cg/{cr_rs1_rs2_edges, cp_bs, cp_sbox} |
|
aes32dsmi_enc |
Zknd_aes32dsmi_cg/{cr_rs1_rs2_edges, cp_bs, cp_sbox} |
|
aes32dsmi_op |
Zknd_aes32dsmi_cg/{cr_rs1_rs2_edges, cp_bs, cp_sbox} |
|
aes64ds_enc |
Zknd_aes64ds_cg/{cr_rs1_rs2_edges, cp_sbox} |
|
aes64ds_op |
Zknd_aes64ds_cg/{cr_rs1_rs2_edges, cp_sbox} |
|
aes64dsm_enc |
Zknd_aes64dsm_cg/{cr_rs1_rs2_edges, cp_sbox} |
|
aes64dsm_op |
Zknd_aes64dsm_cg/{cr_rs1_rs2_edges, cp_sbox} |
|
aes64im_enc |
Zknd_aes64im_cg/cp_rs1_edges |
|
aes64im_op |
Zknd_aes64im_cg/cp_rs1_edges |
UDB Parameters: None.
A.9.3. Zknh NIST SHA2 Hashing
| Instruction | sha256sig0 | sha256sig1 | sha256sum0 | sha256sum1 | sha512sig0 | sha512sig0h | sha512sig0l | sha512sig1 | sha512sig1h | sha512sig1l | sha512sum0 | sha512sum0r |
|---|---|---|---|---|---|---|---|---|---|---|---|---|
RV32 |
x |
x |
x |
x |
x |
x |
x |
x |
x |
|||
RV64 |
x |
x |
x |
x |
x |
x |
x |
|||||
cp_asm_count |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
cp_rs1 |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
cp_rs2 |
x |
x |
x |
x |
x |
|||||||
cp_rd |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
cp_rs1_edges |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
cp_rs2_edges |
x |
x |
x |
x |
x |
|||||||
cr_rs1_rs2_edges |
x |
x |
x |
x |
x |
|||||||
cmp_rs1_rs2 |
x |
x |
x |
x |
x |
|||||||
cmp_rd_rs1 |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
cmp_rd_rs2 |
x |
x |
x |
x |
x |
|||||||
cmp_rd_rs1_rs2 |
x |
x |
x |
x |
x |
| Instruction | sha512sum1 | sha512sum1r |
|---|---|---|
RV32 |
x |
|
RV64 |
x |
|
cp_asm_count |
x |
x |
cp_rs1 |
x |
x |
cp_rs2 |
x |
|
cp_rd |
x |
x |
cp_rs1_edges |
x |
x |
cp_rs2_edges |
x |
|
cr_rs1_rs2_edges |
x |
|
cmp_rs1_rs2 |
x |
|
cmp_rd_rs1 |
x |
x |
cmp_rd_rs2 |
x |
|
cmp_rd_rs1_rs2 |
x |
| Normative Rule | Rule Text | Coverpoints |
|---|---|---|
sha256sig0_enc |
Zknh_sha256sig0_cg/cp_rs1_edges |
|
sha256sig0_op |
Zknh_sha256sig0_cg/cp_rs1_edges |
|
sha256sig1_enc |
Zknh_sha256sig1_cg/cp_rs1_edges |
|
sha256sig1_op |
Zknh_sha256sig1_cg/cp_rs1_edges |
|
sha256sum0_enc |
Zknh_sha256sum0_cg/cp_rs1_edges |
|
sha256sum0_op |
Zknh_sha256sum0_cg/cp_rs1_edges |
|
sha256sum1_enc |
Zknh_sha256sum1_cg/cp_rs1_edges |
|
sha256sum1_op |
Zknh_sha256sum1_cg/cp_rs1_edges |
|
sha512sig0h_enc |
Zknh_sha512sig0h_cg/cr_rs1_rs2_edges |
|
sha512sig0h_op |
Zknh_sha512sig0h_cg/cr_rs1_rs2_edges |
|
sha512sig0l_enc |
Zknh_sha512sig0l_cg/cr_rs1_rs2_edges |
|
sha512sig0l_op |
Zknh_sha512sig0l_cg/cr_rs1_rs2_edges |
|
sha512sig1h_enc |
Zknh_sha512sig1h_cg/cr_rs1_rs2_edges |
|
sha512sig1h_op |
Zknh_sha512sig1h_cg/cr_rs1_rs2_edges |
|
sha512sig1l_enc |
Zknh_sha512sig1l_cg/cr_rs1_rs2_edges |
|
sha512sig1l_op |
Zknh_sha512sig1l_cg/cr_rs1_rs2_edges |
|
sha512sum0r_enc |
Zknh_sha512sum0r_cg/cr_rs1_rs2_edges |
|
sha512sum0r_op |
Zknh_sha512sum0r_cg/cr_rs1_rs2_edges |
|
sha512sum1r_enc |
Zknh_sha512sum1r_cg/cr_rs1_rs2_edges |
|
sha512sum1r_op |
Zknh_sha512sum1r_cg/cr_rs1_rs2_edges |
|
sha512sig0_enc |
Zknh_sha512sig0_cg/cp_rs1_edges |
|
sha512sig0_op |
Zknh_sha512sig0_cg/cp_rs1_edges |
|
sha512sig1_enc |
Zknh_sha512sig1_cg/cp_rs1_edges |
|
sha512sig1_op |
Zknh_sha512sig1_cg/cp_rs1_edges |
|
sha512sum0_enc |
Zknh_sha512sum0_cg/cp_rs1_edges |
|
sha512sum0_op |
Zknh_sha512sum0_cg/cp_rs1_edges |
|
sha512sum1_enc |
Zknh_sha512sum1_cg/cp_rs1_edges |
|
sha512sum1_op |
Zknh_sha512sum1_cg/cp_rs1_edges |
UDB Parameters: None.
A.9.4. Zksed ShangMi SM4 Block Cipher
| Instruction | sm4ed | sm4ks |
|---|---|---|
RV32 |
x |
x |
RV64 |
x |
x |
cp_asm_count |
x |
x |
cp_rs1 |
x |
x |
cp_rs2 |
x |
x |
cp_rd |
x |
x |
cp_rs1_edges |
x |
x |
cp_rs2_edges |
x |
x |
cr_rs1_rs2_edges |
x |
x |
cmp_rs1_rs2 |
x |
x |
cmp_rd_rs1 |
x |
x |
cmp_rd_rs2 |
x |
x |
cmp_rd_rs1_rs2 |
x |
x |
cp_bs |
x |
x |
cp_sbox |
x |
x |
| Normative Rule | Rule Text | Coverpoints |
|---|---|---|
Zks_impl_all |
A core which implements |
Definition, checked through UDB |
sm4ed_enc |
Zksed_sm4ed_cg/{cr_rs1_rs2_edges, cp_bs, cp_sbox} |
|
sm4ed_op |
Zksed_sm4ed_cg/{cr_rs1_rs2_edges, cp_bs, cp_sbox} |
|
sm4ks_enc |
Zksed_sm4ks_cg/{cr_rs1_rs2_edges, cp_bs, cp_sbox} |
|
sm4ks_op |
Zksed_sm4ks_cg/{cr_rs1_rs2_edges, cp_bs, cp_sbox} |
UDB Parameters: None.
A.9.5. Zksh ShangMi SM3 Hashing
| Instruction | sm3p0 | sm3p1 |
|---|---|---|
RV32 |
x |
x |
RV64 |
x |
x |
cp_asm_count |
x |
x |
cp_rs1 |
x |
x |
cp_rd |
x |
x |
cp_rs1_edges |
x |
x |
cmp_rd_rs1 |
x |
x |
| Normative Rule | Rule Text | Coverpoints |
|---|---|---|
sm3p0_enc |
Zksh_sm3p0_cg/{cp_rs1_edges} |
|
sm3p0_op |
Zksh_sm3p0_cg/{cp_rs1_edges} |
|
sm3p1_enc |
Zksh_sm3p1_cg/{cp_rs1_edges} |
|
sm3p1_op |
Zksh_sm3p1_cg/{cp_rs1_edges} |
UDB Parameters: None.
A.9.6. Zkt Constant-Time Instructions
Zkt requires the instructions it lists to have data-independent latency. Latency is not architecturally visible, and measuring it with a cycle counter is unreliable: instruction fetch, branch prediction, superscalar issue, and out-of-order execution make the count depend on where the instruction is and what surrounds it, not only on its operand data. Zkt is therefore out of scope for certification and is not tested (Table 2).
| Normative Rule | Rule Text | Coverpoints |
|---|---|---|
Zkt_optional_instr |
Vendors do not have to implement all of the list’s instructions to be |
Definition, checked through UDB |
Zkt_impl_must_constant_latency |
Not tested: microarchitectural timing |
UDB Parameters: None.
A.10. Zi* Additional Unpriv Extensions
This section includes a variety of unprivileged extensions.
A.10.1. Zibi Branch with Immediate
The Zibi extension adds the beqi and bnei instructions, which compare an
integer register with a small immediate value and conditionally branch.
| Instruction | beqi | bnei |
|---|---|---|
RV32 |
x |
x |
RV64 |
x |
x |
cp_asm_count |
x |
x |
cp_rs1 |
x |
x |
cp_rs1_edges |
x |
x |
cr_rs1_imm_edges |
5bit_u_n0_offset |
5bit_u_n0_offset |
cp_offset |
x |
x |
cp_imm_edges |
5bit_u_n0 |
5bit_u_n0 |
cr_imm_edges_5bit_u_n0_rs1_rel |
x |
x |
| Modified Coverpoint | Bins | Definition |
|---|---|---|
cp_imm_edges_5bit_u_n0 |
9 |
The Zibi comparison constants -1, 1, 2, 3, 4, 8, 16, 30, and 31. The value -1 exercises the all-zero |
cr_rs1_imm_edges_5bit_u_n0_offset |
RV32: 216; RV64: 288 |
Cross-product of |
cr_imm_edges_5bit_u_n0_rs1_rel |
RV32: 27; RV64: 36 |
Cross-product of |
cp_instr_adr_misaligned_zibi_branch |
2 |
Taken |
cp_instr_adr_misaligned_zibi_branch_nottaken |
2 |
Not-taken |
The instruction-address-misaligned exception rule uses Zibi-specific tests in
Exceptions_Sm, Exceptions_S, and Exceptions_U, which check both taken
branches that trap and not-taken branches that do not trap for beqi and
bnei.
| Normative Rule | Rule Text | Coverpoints |
|---|---|---|
zibi_btype_offset |
{Zibi_beqi_cg, Zibi_bnei_cg}/{cp_offset, cr_rs1_imm_edges_5bit_u_n0_offset} |
|
zibi_enc |
{Zibi_beqi_cg, Zibi_bnei_cg}/cp_asm_count |
|
zibi_cimm_decode |
{Zibi_beqi_cg, Zibi_bnei_cg}/{cp_imm_edges_5bit_u_n0, cr_rs1_imm_edges_5bit_u_n0_offset, cr_imm_edges_5bit_u_n0_rs1_rel} |
|
zibi_misaligned_exception |
Exceptions_Sm_cg/{cp_instr_adr_misaligned_zibi_branch, cp_instr_adr_misaligned_zibi_branch_nottaken}, Exceptions_S_cg/{cp_instr_adr_misaligned_zibi_branch, cp_instr_adr_misaligned_zibi_branch_nottaken}, Exceptions_U_cg/{cp_instr_adr_misaligned_zibi_branch, cp_instr_adr_misaligned_zibi_branch_nottaken} |
|
zibi_beqi_op |
Zibi_beqi_cg/{cp_rs1, cp_rs1_edges, cp_imm_edges_5bit_u_n0, cp_offset, cr_rs1_imm_edges_5bit_u_n0_offset} |
|
zibi_bnei_op |
Zibi_bnei_cg/{cp_rs1, cp_rs1_edges, cp_imm_edges_5bit_u_n0, cp_offset, cr_rs1_imm_edges_5bit_u_n0_offset} |
UDB Parameters: None.
A.10.2. Zicsr Control/Status Register Instructions
| Instruction | csrrc | csrrci | csrrs | csrrsi | csrrw | csrrwi |
|---|---|---|---|---|---|---|
RV32 |
x |
x |
x |
x |
x |
x |
RV64 |
x |
x |
x |
x |
x |
x |
cp_asm_count |
x |
x |
x |
x |
x |
x |
cp_rs1 |
x |
x |
x |
|||
cp_rd |
x |
x |
x |
x |
x |
x |
cp_rs1_edges |
x |
x |
x |
|||
cmp_rd_rs1 |
x |
x |
x |
|||
cp_uimm |
5 |
5 |
5 |
| Normative Rule | Rule Text | Coverpoints |
|---|---|---|
csrrc_op |
Zicsr_csrrc_cg/{cp_rs1, cp_rd, cp_rs1_edges} |
|
csrrwi_csrrsi_csrrci_ops |
{Zicsr_csrrwi_cg, Zicsr_csrrsi_cg, Zicsr_csrrci_cg}/cp_uimm_5 |
|
csrrs_op |
Zicsr_csrrs_cg/{cp_rs1, cp_rd, cp_rs1_edges} |
|
csrrw_op |
Zicsr_csrrw_cg/{cp_rs1, cp_rd, cp_rs1_edges} |
|
csrrs_csrrc_rs1_x0 |
Zicsr_csrrs_cg/cp_rs1, Zicsr_csrrc_cg/cp_rs1, Zicntr_csrrs_cg/cp_cntr, Zicntr_csrrc_cg/cp_cntr |
|
csrrw_rs1_x0 |
A CSRRW with rs1=x0 will attempt to write zero to the destination CSR. |
Zicsr_csrrw_cg/cp_rs1 |
csrrsi_csrrci_uimm_zero |
Zicsr_csrrsi_cg/cp_uimm_5, Zicsr_csrrci_cg/cp_uimm_5, TODO: csrrsi and csrrci with uimm=0 on a read-only CSR must not trap |
|
csrrwi_rd_x0 |
Zicsr_csrrwi_cg/cp_rd, Skipping the read is not observable: standard CSRs have no read side effects |
|
csr_side_effects |
Zicsr_csrrw_cg/cp_rd, Zicsr_csrrs_cg/cp_rs1, Zicsr_csrrwi_cg/cp_rd, Zicsr_csrrsi_cg/cp_uimm_5 |
|
csr_rs1_uimm_side_effect |
Not tested: no standard CSR has side effects on field writes |
|
csr_access_order |
ZicsrF_cg/{cp_fflags_set_m_NV, cp_fflags_set_m_NX}, F_fadd_s_cg/cp_csr_frm |
|
csrr_order |
an explicit CSR read returns the CSR state before the execution of the instruction |
{Zicsr_csrrw_cg, Zicsr_csrrs_cg, Zicsr_csrrc_cg}/cp_rs1_edges, Sm_mcsr_cg/cp_minstret_wraparound |
csrw_order |
Sm_mcsr_cg/cp_minstret_wraparound |
|
csr_side_effects_synchronous |
||
csr_weakly_ordered |
OUT-OF-SCOPE for single hart |
|
csr_memory_access_ordering |
OUT-OF-SCOPE for single hart |
|
csr_fence_ordering |
OUT-OF-SCOPE for single hart |
|
csr_strongly_ordered |
OUT-OF-SCOPE for single hart |
|
Zicsr_no_read_side_effects |
Standard CSRs do not have side effects on reads but may have side effects on writes. |
|
Zicsr_nonexistent_rsv |
Instructions that access a non-existent CSR address are reserved. |
Ssstrict_Sm_mcsr_cg/{cp_csrr, cp_csrw_edges, cp_csrcs}, Ssstrict_U_ucsr_cg/cp_csrr |
Zicsr_debug_range |
SdtrigSm_trig_module_reg_cg/{cp_csr_access_global, cp_csr_access_local} |
|
Zicsr_wlrl_deterministic |
Not tested: the value read after an illegal WLRL write is implementation-specific |
|
Zicsr_warl_def |
Sm_mcsr_cg/{cp_mcsrwalk, cp_mcsrwalk_masked}, S_scsr_cg/cp_scsrwalk |
|
Zicsr_warl_deterministic |
Not tested: the legal value returned after an illegal WARL write is implementation-specific; CSR walks check only that it is legal |
|
Zicsr_field_modulation |
Not tested: behavior is UNSPECIFIED |
|
Zicsr_field_modulation_no_side_effects |
||
Zicsr_implicit_read |
F_fadd_s_cg/cp_csr_frm, Sm_mprivinst_cg/cp_mret |
|
Zicsr_width_modulation |
Not tested: changing SXLEN or UXLEN is not tested |
|
Zicsr_width_modulation_no_side_effects |
Not tested: changing SXLEN or UXLEN is not tested |
|
Zicsr_wide_csr_access |
Sm_mcsr_cg/{cp_mcycle_wraparound, cp_minstret_wraparound} |
|
Zicsr_high_half_alias |
Sm_mcsr_cg/{cp_mtimeh_write, cp_mcycleh_wraparound, cp_minstreth_wraparound} |
|
Zicsr_high_half_rv64_rsv |
Ssstrict_Sm_mcsr_cg/{cp_csrr, cp_csrw_edges, cp_csrcs} |
UDB Parameters: None.
| === TRAP_ON_UNIMPLEMENTED_CSR affects the results of Ssstrict/cp_csrr (Table 215). It does not affect Zicsr because this is an unprivileged test that should never perform operations that trap. === |
A.10.3. Zifencei Instruction-Fetch Fence
| Instruction | fence.i |
|---|---|
RV32 |
x |
RV64 |
x |
cp_asm_count |
x |
cp_custom |
fencei |
| Normative Rule | Rule Text | Coverpoints |
|---|---|---|
fence-i_op |
Zifencei_fence_i_cg/{cp_custom_fencei} |
|
fence-i_rsv |
Zifencei_fence_i_cg/{cp_custom_fencei} |
UDB Parameters: None.
| Coverpoint | Bins | Definition |
|---|---|---|
cp_custom_fencei |
4 |
Executes normal |
The Zifencei tests must write an instruction to an address, execute fence.i, and then execute the instruction to check that the new instruction is executed.
A.10.4. Zicclsm: Misaligned Loads/Stores
Zicclsm requires misaligned loads and stores to main memory regions with both the coherence and cacheability PMAs to be supported. This applies to both scalar and vector accesses. It does not apply to Za* atomic extensions. It can be handled in hardware or with invisible software emulation.
The misaligned family of tests exercises integer, compressed, and single/double-precision floating-point loads/stores. It uses the cp_misalign and cp_misalign_cross64_{hword/word/double} coverpoints defined in Table 91. Each instruction is tested at byte offsets 0-8 in two 16-byte windows of the scratch area: one at the start of the 256-byte-aligned scratch area, and one starting 56 bytes in, so that misaligned accesses straddle the 64-byte boundary (and hence any 16-, 32- or 64-byte cache line or bus beat) at scratch+64. Each window is filled with 16 distinct bytes before the accesses. Loads are repeated with the bitwise complement of the pattern so that every width and offset is loaded with both a clear and a set sign bit, checking sign and zero extension. Stores check all 16 bytes of the window. It assumes that if these work, then Zfh and Zcb loads/stores will also work correctly. Misaligned atomics are exercised with {ExceptionsZaamo, ExceptionsZalrsc}/{cp_amo/load/store_address_misaligned}. Misaligned vector load/stores are exercised in Section B.9.1.
The rows with Zca, F or D in the ExtraExtensions column apply only when that extension is also supported.
| Instruction | ld | lh | lhu | lw | lwu | sd | sh | sw | c.lw | c.lwsp | c.ld | c.ldsp |
|---|---|---|---|---|---|---|---|---|---|---|---|---|
RV32 |
x |
x |
x |
x |
x |
x |
x |
|||||
RV64 |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
ExtraExtensions |
Zca |
Zca |
Zca |
Zca |
||||||||
cp_asm_count |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
cp_misalign |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
cp_misalign_cross64 |
double |
hword |
hword |
word |
word |
double |
hword |
word |
word |
word |
double |
double |
| Instruction | c.sw | c.swsp | c.sd | c.sdsp | flw | fsw | fld | fsd |
|---|---|---|---|---|---|---|---|---|
RV32 |
x |
x |
x |
x |
x |
x |
||
RV64 |
x |
x |
x |
x |
x |
x |
x |
x |
ExtraExtensions |
Zca |
Zca |
Zca |
Zca |
F |
F |
D |
D |
cp_asm_count |
x |
x |
x |
x |
x |
x |
x |
x |
cp_misalign |
x |
x |
x |
x |
x |
x |
x |
x |
cp_misalign_cross64 |
word |
word |
double |
double |
word |
word |
double |
double |
| Normative Rule | Rule Text | Coverpoints |
|---|---|---|
Zicclsm_misaligned_support |
{Zicclsm_lw_cg, Zicclsm_sw_cg}/cp_misalign, ZicclsmZca_c_lw_cg/cp_misalign, MisalignV_vle32_v_cg/cp_misalignv_ls_element_misaligned |
|
misaligned_ldst_hw_support |
{Zicclsm_lw_cg,Zicclsm_sw_cg,Zicclsm_ld_cg,Zicclsm_sd_cg}/{cp_misalign} |
|
misaligned_ldst_eei_dependent_behavior |
{Zicclsm_lw_cg,Zicclsm_sw_cg}/{cp_misalign} |
|
misaligned_ldst_exc_type |
{Zicclsm_lw_cg,Zicclsm_sw_cg}/{cp_misalign} |
|
lh_op |
LH loads a 16-bit value from memory, then sign-extends to 32-bits before storing in rd. |
Zicclsm_lh_cg/{cp_misalign} |
lhu_op |
LHU loads a 16-bit value from memory but then zero extends to 32-bits before storing in rd. |
Zicclsm_lhu_cg/{cp_misalign} |
lw_op |
The LW instruction loads a 32-bit value from memory into rd. |
Zicclsm_lw_cg/{cp_misalign} |
sw_sh_sb_op |
Zicclsm_sh_cg/{cp_misalign}, Zicclsm_sw_cg/{cp_misalign} |
|
lwu_op |
The LWU instruction, on the other hand, zero-extends the 32-bit value from memory for RV64I. |
Zicclsm_lwu_cg/{cp_misalign} |
ld_op_rv64i |
The LD instruction loads a 64-bit value from memory into register rd for RV64I. |
Zicclsm_ld_cg/{cp_misalign} |
sd_sw_sh_sb_op_rv64i |
Zicclsm_sd_cg/{cp_misalign} |
|
c-lw_op |
ZicclsmZca_c_lw_cg/{cp_misalign} |
|
c-lwsp_op |
ZicclsmZca_c_lwsp_cg/{cp_misalign} |
|
c-ld_op |
ZicclsmZca_c_ld_cg/{cp_misalign} |
|
c-ldsp_op |
ZicclsmZca_c_ldsp_cg/{cp_misalign} |
|
c-sw_op |
ZicclsmZca_c_sw_cg/{cp_misalign} |
|
c-swsp_op |
ZicclsmZca_c_swsp_cg/{cp_misalign} |
|
c-sd_op |
ZicclsmZca_c_sd_cg/{cp_misalign} |
|
c-sdsp_op |
ZicclsmZca_c_sdsp_cg/{cp_misalign} |
|
fsw_flw_op |
ZicclsmF_flw_cg/{cp_misalign}, ZicclsmF_fsw_cg/{cp_misalign} |
|
fp_misaligned |
{ZicclsmF_flw_cg,ZicclsmF_fsw_cg,ZicclsmD_fld_cg,ZicclsmD_fsd_cg}/{cp_misalign} |
|
fld_op |
ZicclsmD_fld_cg/{cp_misalign} |
|
fsd_op |
FSD stores a double-precision value from the floating-point registers to memory |
ZicclsmD_fsd_cg/{cp_misalign} |
fsq_flq_op |
UDB Parameters: None.
| Modified Coverpoint | Bins | Definition |
|---|---|---|
cp_misalign |
8 |
All 8 byte offsets within a doubleword: the three least significant bits of the effective address, on both RV32 and RV64. |
cp_misalign_cross64_{hword/word/double} |
2 |
Whether a 2-, 4-, or 8-byte access crosses a 64-byte boundary, from effective address bits [5:0]. |
A.10.5. Ziccif Main Memory Instruction Fetch
The Ziccif suite executes an uncompressed and a compressed instruction from main memory. It is short and largely redundant with the instruction suites; a single hart cannot observe atomicity, so atomicity is not tested.
Ziccif requires main memory regions with the coherence and cacheability PMAs to support instruction fetch, with naturally aligned fetches of up to min(ILEN, XLEN) bits atomic.
These tests run on a single hart, so they cannot check fetch atomicity, which is only observable when another hart or agent modifies the code being fetched concurrently. They show basic functionality of the extension and are largely redundant with the I and Zca suites.
| Coverpoint | Goal | Feature Description | Expectation | Bins | Normative Rule |
|---|---|---|---|---|---|
cp_ziccif_fetch |
Fetch and execute instructions from main memory |
Execute add with three distinct registers from main memory; if Zca is supported, execute c.add |
Each instruction executes and writes the sum to rd |
2 (1 without Zca) |
Ziccif_if_atomicity |
| Normative Rule | Rule Text | Coverpoints |
|---|---|---|
Ziccif_if_atomicity |
Ziccif_cg/cp_ziccif_fetch |
|
Ziccif_fetch_mechanism |
OUT-OF-SCOPE for single hart |
|
Ziccif_pma_application |
OUT-OF-SCOPE: not observable with ILEN=32 |
UDB Parameters: None.
A.10.6. Ziccrse Main Memory RsrvEventual
The Ziccrse suite performs one constrained LR/SC sequence on main memory. It is short and largely redundant with the instruction suites; a single hart cannot observe atomicity, so atomicity is not tested.
Ziccrse requires main memory regions with the coherence and cacheability PMAs to support the RsrvEventual PMA, so a constrained LR/SC loop eventually succeeds.
These tests run on a single hart, so they cannot check eventual success in the presence of contending harts or agents. They show basic functionality of the extension and are largely redundant with the Zalrsc suites.
| Coverpoint | Goal | Feature Description | Expectation | Bins | Normative Rule |
|---|---|---|---|---|---|
cp_ziccrse |
LR/SC on main memory eventually succeeds |
lr.w then sc.w on scratch in a constrained loop, retrying until sc.w succeeds or the retry limit is reached, as in the Zalrsc suite |
sc.w succeeds (rd = 0), lr.w returns the stored value, and memory holds the sc.w value |
1 |
Ziccrse_rsrv_eventual |
| Normative Rule | Rule Text | Coverpoints |
|---|---|---|
Ziccrse_rsrv_eventual |
Ziccrse_cg/cp_ziccrse, {Zalrsc_sc_w_cg, Zalrsc_sc_d_cg}/cp_sc_pass_fail |
|
Ziccrse_pma_rsrv_req |
Ziccrse_cg/cp_ziccrse, {Zalrsc_sc_w_cg, Zalrsc_sc_d_cg}/cp_sc_pass_fail |
UDB Parameters: None.
A.10.7. Ziccamoa Main Memory AMOArithmetic
The Ziccamoa suite performs each supported AMOArithmetic-level AMO on main memory. It is short and largely redundant with the instruction suites; a single hart cannot observe atomicity, so atomicity is not tested.
Ziccamoa requires main memory regions with the coherence and cacheability PMAs to provide AMOArithmetic-level PMA support.
These tests run on a single hart, so they cannot check atomicity, which is only observable when another hart or agent accesses the same memory concurrently. They show basic functionality of the extension and are largely redundant with the Zaamo and Zabha suites.
| Coverpoint | Goal | Feature Description | Expectation | Bins | Normative Rule |
|---|---|---|---|---|---|
cp_ziccamoa |
AMOArithmetic-level AMOs on main memory |
For each op in {amoswap, amoadd, amoand, amoor, amoxor, amomin, amomax, amominu, amomaxu}, in .w, .d (RV64) and .b/.h (Zabha) forms, run the AMO once on scratch holding a nonzero pattern with a different source value |
The AMO returns the old memory value and leaves the expected result in memory |
9 (RV32), 18 (RV64), +18 with Zabha |
Ziccamoa_amo_pma |
| Normative Rule | Rule Text | Coverpoints |
|---|---|---|
Ziccamoa_amo_pma |
Ziccamoa_cg/cp_ziccamoa, Zaamo_amoswap_w_cg/cp_asm_count, Zaamo_amoand_w_cg/cp_asm_count, Zaamo_amoadd_w_cg/cp_asm_count, Zaamo_amomax_w_cg/cp_asm_count |
|
Ziccamoa_pma_amo_req |
Ziccamoa_cg/cp_ziccamoa, Zaamo_amoswap_w_cg/cp_asm_count, Zaamo_amoand_w_cg/cp_asm_count, Zaamo_amoadd_w_cg/cp_asm_count, Zaamo_amomax_w_cg/cp_asm_count |
UDB Parameters: None.
A.10.8. Ziccamoc Main Memory AMOCASQ
The Ziccamoc suite performs each supported AMOCASQ-level AMO on main memory. It is short and largely redundant with the instruction suites; a single hart cannot observe atomicity, so atomicity is not tested.
Ziccamoc requires main memory regions with the coherence and cacheability PMAs to provide AMOCASQ-level PMA support, which includes AMOArithmetic-level support and the compare-and-swap AMOs.
These tests run on a single hart, so they cannot check atomicity, which is only observable when another hart or agent accesses the same memory concurrently. They show basic functionality of the extension and are largely redundant with the Zaamo, Zabha and Zacas suites.
| Coverpoint | Goal | Feature Description | Expectation | Bins | Normative Rule |
|---|---|---|---|---|---|
cp_ziccamoc |
AMOCASQ-level AMOs on main memory |
Every AMO of cp_ziccamoa, plus amocas.w, amocas.d, amocas.q (RV64) and amocas.b/amocas.h (Zabha), each run once on scratch, with the compare value equal to memory so the swap happens |
The AMO returns the old memory value and leaves the expected result in memory |
11 (RV32), 21 (RV64), +20 with Zabha |
Ziccamoc_casq_pma |
| Normative Rule | Rule Text | Coverpoints |
|---|---|---|
Ziccamoc_casq_pma |
Ziccamoc_cg/cp_ziccamoc, Zacas_amocas_w_cg/cp_asm_count, Zacas_amocas_d_cg/cp_asm_count, Zacas_amocas_q_cg/cp_asm_count |
|
Ziccamoc_pma_amo_req |
Ziccamoc_cg/cp_ziccamoc, Zacas_amocas_w_cg/cp_asm_count, Zacas_amocas_d_cg/cp_asm_count, Zacas_amocas_q_cg/cp_asm_count |
UDB Parameters: None.
A.10.9. Zicond Conditional Instructions
| Instruction | czero.eqz | czero.nez |
|---|---|---|
RV32 |
x |
x |
RV64 |
x |
x |
cp_asm_count |
x |
x |
cp_rs1 |
x |
x |
cp_rs2 |
x |
x |
cp_rd |
x |
x |
cp_rs1_edges |
x |
x |
cp_rs2_edges |
x |
x |
cr_rs1_rs2_edges |
x |
x |
cmp_rs1_rs2 |
x |
x |
cmp_rd_rs1 |
x |
x |
cmp_rd_rs2 |
x |
x |
cmp_rd_rs1_rs2 |
x |
x |
| Normative Rule | Rule Text | Coverpoints |
|---|---|---|
czero-eqz_op |
Zicond_czero_eqz_cg/{cp_rs1, cp_rs2, cp_rd, cr_rs1_rs2_edges} |
|
czero-eqz_inst_ctime |
Not tested: microarchitectural timing |
|
czero-nez_op |
Zicond_czero_nez_cg/{cp_rs1, cp_rs2, cp_rd, cr_rs1_rs2_edges} |
|
czero-nez_Zkt_timing |
Not tested: microarchitectural timing |
UDB Parameters: None.
A.10.10. Zicntr Counters
Zicntr provides unprivileged read access to the cycle, time, and instret counters.
Note that, like all other unprivileged tests, these tests are performed in M-mode.
The Zicntr groups of the S and U privileged tests exercise reading the counters in S-mode and U-mode,
with control by mcounteren and scounteren CSRs.
The Sm privileged tests exercise mcycle, minstret, and HPMs from M-mode.
| Instruction | csrrs | csrrc |
|---|---|---|
RV32 |
x |
x |
RV64 |
x |
x |
cp_cntr |
x |
x |
| Normative Rule | Rule Text | Coverpoints |
|---|---|---|
Zihpm_op_sz_mode_acc_count |
RISC-V ISAs provide a set of up to thirty-two 64-bit performance counters and timers |
Zicntr_csrrs_cg/{cp_cntr} |
Zihpm_op_sz_mode_acc_xlen32 |
when XLEN=32, the upper 32 bits are accessed via CSR registers 0xC80–0xC9F |
Zicntr_csrrs_cg/{cp_cntr} |
Zihpm_op_sz_mode_acc_partition |
These counters are divided between the |
Zicntr_csrrs_cg/{cp_cntr} |
Zihpm_op_sz_mode_acc_priv |
accessible via unprivileged XLEN-bit read-only CSR registers 0xC00–0xC1F |
Zicntr_csrrs_cg/{cp_cntr}, U_Zicntr_cg/cp_mcounteren_access_u, Sm_Zicntr_cg/cp_mcounteren_access_m |
Zicntr_rdcycle_op |
Zicntr_csrrs_cg/{cp_cntr} |
|
Zicntr_rdcycleh_op |
RDCYCLEH is only present when XLEN=32 and reads bits 63-32 of the same cycle counter. |
Zicntr_csrrs_cg/{cp_cntr} |
Zicntr_rdtime_op |
Zicntr_csrrs_cg/{cp_cntr} |
|
Zicntr_rdtimeh_op |
RDTIMEH is only present when XLEN=32 and reads bits 63-32 of the same real-time counter. |
Zicntr_csrrs_cg/{cp_cntr} |
Zicntr_rdinstret_op |
Zicntr_csrrs_cg/{cp_cntr}, U_Zicntr_cg/cp_instret_add, S_Zicntr_cg/cp_instret_add |
|
Zicntr_rdinstreth_op |
RDINSTRETH is only present when XLEN=32 and reads bits 63-32 of the same instruction counter. |
Zicntr_csrrs_cg/{cp_cntr} |
Zicntr_time_hart_sync |
The real-time clocks of all harts must be synchronized to within one tick of the real-time clock. |
OUT-OF-SCOPE for single hart |
| Parameter | Description | Coverpoint | Effect |
|---|---|---|---|
TIME_CSR_IMPLEMENTED |
Whether or not a real hardware Possible values: true::
false::
|
cp_cntr |
If False, |
MCOUNTENABLE_EN |
Indicates which counters can be delegated via
MCOUNTENABLE_EN[0:2] must all be false if |
cp_cntr |
With U-mode, skip each of |
SCOUNTENABLE_EN |
Indicates which counters can delegated via
SCOUNTENABLE_EN[0:2] must all be false if |
cp_cntr |
With S-mode, skip each of |
TODO: add normative rule for TIME_CSR_IMPLEMENTED UDB parameter referencing the following text from the priv spec:
This rule is checked by the time bin of cp_cntr coverpoint.`
emulate this
functionality on behalf of less-privileged modes in M-mode software.
`
| Coverpoint | Bins | Definition |
|---|---|---|
cp_cntr |
3 |
Read each of the counters ( |
A.10.11. Zihpm Hardware Performance Monitors
Zihpm provides unprivileged read access to custom hardware performance monitor CSRs.
| Instruction | csrrs | csrrc |
|---|---|---|
RV32 |
x |
x |
RV64 |
x |
x |
cp_cntr |
hpm |
hpm |
| Normative Rule | Rule Text | Coverpoints |
|---|---|---|
Zihpm_op_sz_mode_acc_count |
RISC-V ISAs provide a set of up to thirty-two 64-bit performance counters and timers |
Zihpm_csrrs_cg/{cp_cntr_hpm} |
Zihpm_op_sz_mode_acc_partition |
These counters are divided between the |
Zihpm_csrrs_cg/{cp_cntr_hpm} |
Zihpm_op_sz_mode_acc_priv |
accessible via unprivileged XLEN-bit read-only CSR registers 0xC00–0xC1F |
Zihpm_csrrs_cg/{cp_cntr_hpm} |
Zihpm_op_sz_mode_acc_xlen32 |
when XLEN=32, the upper 32 bits are accessed via CSR registers 0xC80–0xC9F |
Zihpm_csrrs_cg/{cp_cntr_hpm} |
hpmcounter_op_sz_mode |
Zihpm_csrrs_cg/{cp_cntr_hpm} |
|
hpm_counter_op_sz_mode_xlen32 |
Zihpm_csrrs_cg/cp_cntr_hpm/{hpmcounter3h, hpmcounter4h, hpmcounter5h, hpmcounter6h, hpmcounter7h, hpmcounter8h, hpmcounter9h, hpmcounter10h, hpmcounter11h, hpmcounter12h, hpmcounter13h, hpmcounter14h, hpmcounter15h, hpmcounter16h, hpmcounter17h, hpmcounter18h, hpmcounter19h, hpmcounter20h, hpmcounter21h, hpmcounter22h, hpmcounter23h, hpmcounter24h, hpmcounter25h, hpmcounter26h, hpmcounter27h, hpmcounter28h, hpmcounter29h, hpmcounter30h, hpmcounter31h} |
|
hpm_counter_op_sz_mode_dependency |
Not tested: extension dependency checked by the UDB configuration |
|
hpm_platform_specific_impl |
Not tested: platform-specific. The implemented counters come from HPM_COUNTER_EN, and events are not tested. |
|
hpm_misconfigured_event_behavior |
Not tested: event selection is platform-specific, so there is no portable misconfiguration to test. |
|
hpm_unimplemented_counter_access |
Not tested: implementation-defined behavior; an unimplemented counter may trap or return a constant value, so neither response can be required. cp_cntr_hpm reads only the counters HPM_COUNTER_EN implements. |
| Parameter | Description | Coverpoint | Effect |
|---|---|---|---|
HPM_COUNTER_EN |
Whether each HPM counter is implemented in hardware.
There is one entry for each hpmcounter, indexed 0-31. Indices 0-2 must be false: they are placeholders for the three counters
( |
cp_cntr_hpm |
Reads only hpmcounter<n> (and hpmcounter<n>h on RV32) with HPM_COUNTER_EN[n] true |
MCOUNTENABLE_EN |
Indicates which counters can be delegated via
MCOUNTENABLE_EN[0:2] must all be false if |
cp_cntr_hpm |
With U-mode, skip each hpmcounter<n> (and hpmcounter<n>h on RV32) whose bit n is False |
SCOUNTENABLE_EN |
Indicates which counters can delegated via
SCOUNTENABLE_EN[0:2] must all be false if |
cp_cntr_hpm |
With S-mode, skip each hpmcounter<n> (and hpmcounter<n>h on RV32) whose bit n is False |
| Coverpoint | Bins | Definition |
|---|---|---|
cp_cntr_hpm |
up to 29 (58 on RV32) |
Read each implemented |
Accessing an unimplemented counter may trap or return a constant value, so those counters are not read.
The suite assumes that mcounteren and scounteren allow reads of the implemented counters from U-mode (the boot code sets every bit).
See RISC-V ISA Manual Issue #2558 for discussion.
A.10.12. Zihintpause Pause Hint
| Instruction | pause |
|---|---|
RV32 |
x |
RV64 |
x |
cp_asm_count |
x |
| Normative Rule | Rule Text | Coverpoints |
|---|---|---|
pause_op |
Zihintpause_pause_cg/cp_asm_count |
|
pause_enc_fence |
PAUSE is encoded as a FENCE instruction with pred=W, succ=0, fm=0, rd=x0, and rs1=x0. |
Zihintpause_pause_cg/cp_asm_count |
pause_enc |
Zihintpause_pause_cg/cp_asm_count |
UDB Parameters: None.
A.10.13. Zihintntl Non-temporal Locality Hint
These instructions are hints that behave as nops. They are simply executed once.
The rows of Table 112 with Zca in the ExtraExtensions column are the compressed instructions c.ntl.p1, c.ntl.pall, c.ntl.s1, and c.ntl.all, a subset of the c.add hints, and apply only when Zca is also supported.
| Instruction | ntl.p1 | ntl.s1 | ntl.pall | ntl.all | c.ntl.p1 | c.ntl.s1 | c.ntl.pall | c.ntl.all |
|---|---|---|---|---|---|---|---|---|
RV32 |
x |
x |
x |
x |
x |
x |
x |
x |
RV64 |
x |
x |
x |
x |
x |
x |
x |
x |
ExtraExtensions |
Zca |
Zca |
Zca |
Zca |
||||
cp_asm_count |
x |
x |
x |
x |
x |
x |
x |
x |
| Normative Rule | Rule Text | Coverpoints |
|---|---|---|
ntl-p1_op |
Zihintntl_ntl_p1_cg/cp_asm_count |
|
ntl-p1_enc |
Zihintntl_ntl_p1_cg/cp_asm_count |
|
ntl-all_op |
Zihintntl_ntl_all_cg/cp_asm_count |
|
ntl-all_enc |
Zihintntl_ntl_all_cg/cp_asm_count |
|
ntl-pall_op |
Zihintntl_ntl_pall_cg/cp_asm_count |
|
ntl-pall_enc |
Zihintntl_ntl_pall_cg/cp_asm_count |
|
ntl-s1_op |
Zihintntl_ntl_s1_cg/cp_asm_count |
|
ntl-s1_enc |
Zihintntl_ntl_s1_cg/cp_asm_count |
|
ntl_compressed_variants |
{ZihintntlZca_c_ntl_p1_cg, ZihintntlZca_c_ntl_pall_cg, ZihintntlZca_c_ntl_s1_cg, ZihintntlZca_c_ntl_all_cg}/cp_asm_count |
|
ntl_target_definition |
{Zihintntl_ntl_p1_cg, Zihintntl_ntl_pall_cg, Zihintntl_ntl_s1_cg, Zihintntl_ntl_all_cg}/cp_asm_count |
|
ntl_range |
Not tested: no architecturally visible effect |
|
ntl_Zicbop_prefetch_outer |
Not tested: no architecturally visible effect |
|
ntl_trap_behavior |
Not tested: recommendation with no architecturally visible effect |
UDB Parameters: None.
A.10.14. Zicboz Cache Block Zero
The cbo.zero instruction zeros a cache line. The cache line size may vary from one machine to another.
| Coverpoint | Bins | Definition |
|---|---|---|
cp_custom_cbo |
65*2 |
Writes 65 words (260 bytes) of arbitrary data to scratch memory, executes |
| Instruction | cbo.zero |
|---|---|
RV32 |
x |
RV64 |
x |
cp_asm_count |
x |
cp_rs1 |
nx0 |
cp_custom |
cbo |
| Normative Rule | Rule Text | Coverpoints |
|---|---|---|
cache_block_size |
Zicboz_cbo_zero_cg/cp_custom_cbo |
|
cache_block_discovery |
Definition, checked through UDB |
|
cache_block_size_uniform |
Definition, checked through UDB |
|
cbo-zero_op |
Zicboz_cbo_zero_cg/cp_custom_cbo |
|
cbo-zero_unaligned |
It is not required that rs1 is aligned to the size of a cache block. |
Zicboz_cbo_zero_cg/cp_custom_cbo, Zic64b_cg/cp_zic64b |
cbo-zero_specified_block |
Zicboz_cbo_zero_cg/cp_custom_cbo |
UDB Parameters: None.
A.10.15. Zicbom Cache Block Flush/Invalidate
Zicbom runs the same tests as Zicboz. cbo.flush and cbo.clean should have no architecturally visible effect. cbo.inval could discard the cache block, leaving the initial value of 0s. This may be difficult to match against a reference model, so perhaps this test needs to accept both the original data and 0s as correct answers. TODO - adjust if any machines need this.
| Instruction | cbo.inval | cbo.clean | cbo.flush |
|---|---|---|---|
RV32 |
x |
x |
x |
RV64 |
x |
x |
x |
cp_asm_count |
x |
x |
x |
cp_rs1 |
nx0 |
nx0 |
nx0 |
cp_custom |
cbo |
cbo |
cbo |
| Normative Rule | Rule Text | Coverpoints |
|---|---|---|
ppo_overlap_1 |
if a precedes b in program order, then a will precede b in the global memory order if: |
Not testable on a single core without DMA or other non-coherent agents |
ppo_overlap_2 |
a is an invalidate, clean, or flush, b is a load, and a and b access overlapping memory addresses |
Not testable on a single core without DMA or other non-coherent agents |
invalidate_load_val_no_preceding_cmo |
Not testable on a single core without DMA or other non-coherent agents |
|
invalidate_load_val_no_store_before_cmo |
Not testable on a single core without DMA or other non-coherent agents |
|
invalidate_load_val_store_before_cmo |
Not testable on a single core without DMA or other non-coherent agents |
|
invalidate_load_val_noncoherent_store |
The value of any store to x by a non-coherent agent regardless of the above conditions |
Not testable on a single core without DMA or other non-coherent agents |
pmp_same |
Not tested: behavior is UNSPECIFIED |
|
pma_same |
Not tested: behavior is UNSPECIFIED |
|
cbo_rsv |
If the above constraints are not met, the behavior of a CBO instruction is UNSPECIFIED. |
Not tested: behavior is UNSPECIFIED |
H_trans_cache |
TODO: Hypervisor tests |
|
cbo-clean_op |
Zicbom_cbo_clean_cg/cp_custom_cbo |
|
cbo-flush_op |
Zicbom_cbo_flush_cg/cp_custom_cbo |
|
cbo-flush_unaligned |
It is not required that rs1 is aligned to the size of a cache block. |
Zicbom_cbo_flush_cg/cp_custom_cbo |
cbo-inval_op |
Zicbom_cbo_inval_cg/cp_custom_cbo |
|
cbo-inval_unaligned |
It is not required that rs1 is aligned to the size of a cache block. |
Zicbom_cbo_inval_cg/cp_custom_cbo |
UDB Parameters: None.
A.10.16. Zicbop Cache Block Prefetch
The Zicbop prefetch instructions are hints that do not have to do anything. They are tested by being executed with a variety of rs1 values and offsets to ensure that they are decoded and executed without trapping, but no specific behavior is required or checked except that the 65 words written to scratch are still read back correctly.
| Instruction | prefetch.i | prefetch.r | prefetch.w |
|---|---|---|---|
RV32 |
x |
x |
x |
RV64 |
x |
x |
x |
cp_asm_count |
x |
x |
x |
cp_rs1 |
x |
x |
x |
cp_custom |
prefetch |
prefetch |
prefetch |
| Normative Rule | Rule Text | Coverpoints |
|---|---|---|
prefetch-i_op |
Zicbop_prefetch_i_cg/cp_custom_prefetch |
|
prefetch-r_op |
Zicbop_prefetch_r_cg/cp_custom_prefetch |
|
prefetch-w_op |
Zicbop_prefetch_w_cg/cp_custom_prefetch |
|
prefetch_operating_block |
{Zicbop_prefetch_i_cg, Zicbop_prefetch_r_cg, Zicbop_prefetch_w_cg}/cp_custom_prefetch |
|
cbp_access |
{Zicbop_prefetch_i_cg, Zicbop_prefetch_r_cg, Zicbop_prefetch_w_cg}/cp_custom_prefetch |
|
cbp_unperm_noexcep |
PMP_Zicbo_cg/{cp_prefetch_i, cp_prefetch_r, cp_prefetch_w} |
UDB Parameters: None.
A.10.17. Za64rs Max 64B Reservation Set
| Coverpoint | Goal | Feature Description | Expectation | Bins | Normative Rule |
|---|---|---|---|---|---|
cp_za64rs |
reservation set size |
For each offset in [0, 64] that is a multiple of 4, lr.w from base address that a multiple of 64 and then sc.w to an address with that offset from base |
sc success code in rd matches reference model, succeeding for small offsets and failing for large offsets (definitely for 64, optionally smaller) |
17 |
Za64rs_res_set_req |
Note: |
|||||
Can borrow tests from sc.w unprivileged test |
|||||
| Normative Rule | Rule Text | Coverpoints |
|---|---|---|
Za128rs_res_set_req |
||
Za64rs_res_set_req |
Za64rs_cg/cp_za64rs |
|
Za64rs_implies_Za128rs |
Definition, checked through UDB |
UDB Parameters: None.
A.10.18. Zic64b 64B Cache Block Zero
| Coverpoint | Goal | Feature Description | Expectation | Bins | Normative Rule |
|---|---|---|---|---|---|
cp_zic64b |
Cache block zeros |
For each offset in range of [0, 64]: Write all 1s to 128 consecutive bytes, then do cbo with offset from 64-bit aligned base. Read back words at offsets of 0, 60, 64, 124 from base. |
Match ref model. Only 64 bytes written. When offset is 64, they are in the second block. |
65 |
Zic64b_cache_block_size |
| Normative Rule | Rule Text | Coverpoints |
|---|---|---|
Zic64b_cache_block_size |
Zic64b_cg/cp_zic64b |
UDB Parameters: None.
A.11. V Vector Extension
The vector coverpoints are intended to be flexible to support the full V extension, the Zve* embedded vector extensions, and arbitrary mixes of supported vector length (VLEN), element lengths (SEWMIN, ELEN), and floating-point precisions.
The vector extension is huge. The testplan is partitioned into three unprivileged portions discussed here, and two privileged portions (ExceptionsV, SsstrictV) discussed in Section B.9.
The full V extension supports all selected element widths SEW={8, 16, 32, 64}. The vector coverage files and tests are organized by SEW. Thus, a DUT could handle any contiguous subset of SEW from SEWMIN to ELEN. For example, a DUT with SEWMIN=16 and ELEN=32 would support SEW={16, 32}.
The tests detect VLMAX and set the vector length accordingly, up to some configurable maximum VLEN (default 4096 bits, although the vector extension theoretically supports up to 65536). Therefore, there is no need for different test suites for different VLENs.
A.11.1. Vector File Organization
Listing 1 summarizes the structure of the coverpoint and test files for the vector extension. The unprivileged vector tests are organized by integer (Vx), load/store (Vls), and floating-point (Vf) types of instructions. Each applies to SEW=8, 16, 32, and/or 64. The ExceptionsV, V, and SsstrictV privileged tests are described in section XREF.
The vector tests are organized by XLEN=32 and XLEN=64 because the scalar registers behavior differs by XLEN. For example, vadd.vx with SEW=64 sign-extends XLEN=32 scalar registers but does not modify XLEN=64 scalar registers. For a given XLEN, the vector tests are organized by type (Vx/Vls/Vf) and SEW (8/16/32/64). Each directory contains a .S file for every vector instruction of that type [4]. Vector load/store instructions run with any SEW but also specify EEW as part of the instruction name. For example, vle8.v and vle16.v can both be executed in either SEW=8 or SEW=16, and the EMUL behavior is different between these modes. Therefore, all the load/store variants are included in all of Vls{8/16/32/64}.
|
Vx and Vf are separated because certain extensions such as Zve64x do not support floating-point. Vls could be lumped with Vx, but the coverpoints are so different that it is easier to define the tests separately, and facilitates just running integer vs. load/store tests during development. |
fcov
unpriv
Vx8_coverage.svh
Vx16_coverage.svh
Vx32_coverage.svh
Vx64_coverage.svh
Vls8_coverage.svh
Vls16_coverage.svh
Vls32_coverage.svh
Vls64_coverage.svh
Vf8_coverage.svh
Vf16_coverage.svh
Vf32_coverage.svh
Vf64_coverage.svh
priv
ExceptionsVx_coverage.svh
ExceptionsVls_coverage.svh
ExceptionsVf16_coverage.svh
ExceptionsVf32_coverage.svh
ExceptionsVf64_coverage.svh
ExceptionsVfmin_coverage.svh
MisalignV_coverage.svh
SsstrictV_coverage.svh
Sm_coverage.svh (Sm_V_cg, Sm_VF_cg)
S_coverage.svh (S_V_cg, S_VF_cg)
U_coverage.svh (U_V_cg, U_VF_cg)
tests
rv32
Vx8
vadd.vv.S
vadd.vx.S
vadd.vi.S
vsub.vv.S
...
Vx16
vadd.vv.S
...
Vx32
vadd.vv.S
...
Vx64
vadd.vv.S
...
Vls8
vle8.v.S
vle16.v.S
vle32.v.S
vle64.v.S
vlseg2e8.v.S
...
Vls16
vle8.v.S
...
Vls32
vle8.v.S
...
Vls64
vle8.v.S
...
Vf8
vfwcvt.f.x.v.S
vfncvt.x.f.w.S
...
Vf16
vfadd.vv.S
vfadd.vf.S
vfwadd.vv.S
vfsub.vv.S
...
Vf32
vfadd.vv.S
...
Vf64
vfadd.vv.S
...
rv64
Vx8
Vx16
Vx32
Vx64
Vls8
Vls16
Vls32
Vls64
Vf8
Vf16
Vf32
Vf64
priv
ExceptionsVx
ExceptionsVls
ExceptionsVf16
ExceptionsVf32
MisalignV
SsstrictV
Sm (Sm_V_*.S, Sm_VF-*.S)
S (S_V_*.S, S_VF-*.S)
U (U_V_*.S, U_VF-*.S)
When an instruction’s EEW is not a supported SEW, the coverage files and tests exclude the instruction from testing. For example, vwadd.vv is not supported when SEW=32 and ELEN = 32 because it cannot widen to 64 bits.
The tests also account for unsupported register group overlap. For example, a widening add vwadd.wv v0, v2, v2
is unsupported because the source registers cannot be read with different EEWs. On the other hand vwadd.vv v0, v1, v8 with LMUL=1 is supported even though the destination vd=v0 widens to write [v0-v1], which overlaps with vs2=v1. The tests exercise all supported overlaps, but do not attempt any unsupported overlaps because the behavior is reserved and unpredictable.
A.11.2. Vector Configuration Parameters
The coverpoints and tests are parameterized by the minimum supported element width SEWMIN and the maximum supported element width ELEN. The coverpoints and tests exclude unsupported edge cases, such as widening to more than ELEN or using LMUL=1/8 with ELEN=32 but SEWMIN=8.
A.11.3. Vector Coverpoints
Running long vectors is computationally expensive, so only a subset of vectors tests run on multi-element vectors. Coverpoints for source and destination registers, edge values, etc. run on a vector length of vl = 1.
Table 125 defines the coverpoints used in vector instructions. Unless otherwise specified, each coverpoint uses vector length vl=1 and length multiplier LMUL=1, no mask (vm=1), and vstart=0. Hence, they act on exactly one vector element. For such coverpoints, instructions that require a mask use v0=0.
| Coverpoint | # Bins | Definition |
|---|---|---|
Coverpoints acting on single element vl=1 |
||
cp_vd |
32 |
All vector destination registers vd=0-31 |
cp_vs2 |
32 |
All vector source registers vs2=0-31 |
cp_vs1 |
32 |
All vector source registers vs1=0-31 |
cp_vs3 |
32 |
All vector source registers vs3=0-31 |
cp_rs1 |
32 |
All scalar registers rs1=0-31 |
cp_rs2 |
32 |
All scalar registers rs2=0-31 |
cp_imm_5bit |
32 |
Signed immediate values -16 to +15 |
cmp_rs1_rs2 |
32 |
rs1 and rs2 are same register ID |
cmp_vd_vs2 |
32 |
vd and vs2 are same register ID |
cmp_vd_vs1 |
32 |
vd and vs1 are same register ID |
cmp_vs2_vs1 |
32 |
vs2 and vs1 are same register ID |
cmp_vs3_vs2 |
32 |
vs3 and vs2 are the same register ID |
cmp_vd_vs1_vs2 |
32 |
vd and vs1 and vs2 are same register ID |
cp_rs1_edges |
9 |
0, 1, 2, -1, -2, most negative, most negative+1, most positive, most positive-1 |
cp_rs2_edges |
5 |
0, 1, 2, -1, -2 (for strided vector load/store) |
cp_fs1_edges |
20 |
0, -1, -smallest subnorm, -inf, 1, 1+ulp, 0.5, 1.5, 2, 4, pi, 2^emax, largest normal, smallest normal, largest subnormal, subnormal with leading 1 in fraction, infinity, canonical quite NaN, noncanonical quiet NaN, signaling NaN with payload of 1 |
cp_vs2_edges |
9 or 20 |
see cp_rs1_edges or cp_fs1_edges |
cp_vs1_edges |
9 or 20 |
see cp_rs1_edges |
cr_vs2_vs1_edges |
9^2 or 20^2 |
Cross-product of edges of vs2 and vs1 |
cr_vs2_rs1_edges |
9*9 |
Cross-product of edges of vs2 and rs1 |
cr_vs2_fs1_edges |
20*20 |
Cross-product of edges of vs2 and fs1 |
cr_vs2_imm_edges |
9*9 |
Cross-product of edges of vs2 and imm={0, 1, 2, 14, 15, -1, -2, -15,-16} |
cr_vxrm_vs2_vs1_edges |
9*9*4 |
Cross-product of edges of vs2 and vs1 with vector rounding mode={rod, rdn, rne, rnu} |
cr_vxrm_vs2_rs1_edges |
9*9*4 |
See cr_vxrm_vs2_vs1_edges |
cr_vxrm_vs2_imm_edges |
9*9*4 |
See cr_vxrm_vs2_vs1_edges |
cp_csr_frm |
5*10 |
Floating-point rounding mode={rdn, rmm, rne, rtz, rup} with 10 random inputs per mode |
cp_csr_fflags |
5*2 |
Floating-point sets and clears all applicable flags |
Coverpoints acting on multiple elements vl ≠ 1 |
||
cp_masking_edges |
5 |
Mask edge cases v0=all 1s, all 0s, random, first VLMAX-1 ones, first VLMAX/2+1 ones; vl=VLMAX, vm=1 to mask, vma = random, vta = 0 |
cr_vl_lmul |
7*3 |
Cross legal combinations of LMUL={1/2/4/8/f2/f4/f8} and vl={1, random, VLMAX}, while randomizing v0 mask value, vm, vta, vma. |
cr_vtype_agnostic |
4 |
Cross vta={0/1} and vma={0/1}. Random legal LMUL, random legal vl, vm=1, v0=random mask |
cp_vxsat |
2 |
vxsat={0, 1}. Hit by cr_vs2_vs1_edges so no tests needed. |
cp_vl_0 |
1 |
vl=0. LMUL=1, no mask, vma=0, vta=1 |
As with other unprivileged testplans, an x in the spreadsheet indicates to use the coverpoint. Other values in the spreadsheet indicate a variant of the coverpoint:
-
nv0: Do not include v0 in the coverpoint. For example, cp_vd_nv0 means that the destination register vd does not include v0.
-
emul2: Only exercise even-numbered registers. For example cp_vs2_emul2 uses vs2={v0, v2, v4, …v30}. For edge values, emul2 means the edge value is twice the width of SEW.
-
emul4/8: Similar to emul2
-
emulf2, emulf4, emulf8: edge values are 1/2, 1/4, or 1/8 the width of SEW. Used in extension instructions such as vsext.vf2.
-
u: Treat immediate as unsigned 0 to 31 rather than signed -16 to +15. For edge values, {0, 1, 2, 15, 16, 30, 31}.
-
eew1/mm: Mask instructions with 1-bit elements such as vmand.mm use at least vl=8 to operate on multi-bit masks.
-
wv: vs2 is double-width and uses emul2 for its edge values. vs1 is normal width.
-
wred: vs1 is double-width and uses emul2 for its edge values. vs2 is normal width.
-
wx: vs2 is double-width and uses emul2 for its edge values. rs1 is normal width.
-
wi/wiu: vs2 is double-width and uses emul2 for its edge values. immediate is 5 bit signed or unsigned.
-
lmul4max/emul4max: maximum LMUL/EMUL is 4 instead of 8. vwadd.vv uses lmul4max because it cannot accept LMUL=8 widened to 16. vlseg2e8.v uses emul4max because the number of segments * EMUL cannot exceed 8.
-
lmul2max/lmul1max/emul2max/emul1max: see lmul4max
-
lte30/…/lte24: Register number is less than or equal to 30, …, 24. Used for segmented load/store so segments won’t overflow the register file.
-
ls_e{8/16/32/64}: load/store edges with EEW=8,…,64. Used to convert strided loads from elements to bytes.
-
ls: load/store edges instead of integer edges: vs2={0, random < 2*VLMAX}. rs2= {1, 2, -1, -2, 0}
-
f: floating-point edges instead of integer edges: *
-
cp_custom_*: custom coverpoint defined in the coverage file. See definitions for "Vx_custom_definitions, "VxCustom", "Vf_custom_definitions", "Vls_custom_definitions".
The coverpoints for each vector instruction are given in the following sections.
A.11.4. Vx
The Vx testplan is the same for SEW={8, 16, 32, 64}. Each SEW has its own coverage file (e.g. Vx8_coverages.svh) independent of XLEN, as well as tests that depend on XLEN (e.g. rv32/Vx8/vadd.vx.S).
| Instruction | vadd.vv | vadd.vx | vadd.vi | vwadd.vv | vwadd.vx | vwaddu.vv | vwaddu.vx | vwadd.wv | vwadd.wx | vwaddu.wv | vwaddu.wx | vsub.vv |
|---|---|---|---|---|---|---|---|---|---|---|---|---|
RV32 |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
RV64 |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
EFFEW8 |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
EFFEW16 |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
EFFEW32 |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
EFFEW64 |
x |
x |
x |
x |
||||||||
cp_asm_count |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
cp_vd |
x |
x |
x |
emul2 |
emul2 |
emul2 |
emul2 |
emul2 |
emul2 |
emul2 |
emul2 |
x |
cp_vs2 |
x |
x |
x |
x |
x |
x |
x |
emul2 |
emul2 |
emul2 |
emul2 |
x |
cp_vs1 |
x |
x |
x |
x |
x |
x |
||||||
cp_rs1 |
x |
x |
x |
x |
x |
|||||||
cp_imm_5bit |
x |
|||||||||||
cmp_vd_vs2 |
x |
x |
x |
emul2 |
emul2 |
emul2 |
emul2 |
x |
||||
cmp_vd_vs1 |
x |
x |
||||||||||
cmp_vs1_vs2 |
x |
x |
x |
x |
||||||||
cmp_vd_vs1_vs2 |
x |
x |
||||||||||
cp_vs2_edges |
x |
x |
x |
x |
x |
x |
x |
emul2 |
emul2 |
emul2 |
emul2 |
x |
cp_vs1_edges |
x |
x |
x |
x |
x |
x |
||||||
cr_vs2_vs1_edges |
x |
x |
x |
wv |
wv |
x |
||||||
cp_rs1_edges |
x |
x |
x |
x |
x |
|||||||
cr_vs2_rs1_edges |
x |
x |
x |
wx |
wx |
|||||||
cr_vs2_imm_edges |
x |
|||||||||||
cp_masking_edges |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
cr_vl_lmul |
x |
x |
x |
lmul4max |
lmul4max |
lmul4max |
lmul4max |
lmul4max |
lmul4max |
lmul4max |
lmul4max |
x |
cr_vtype_agnostic |
x |
x |
x |
lmul4max |
lmul4max |
lmul4max |
lmul4max |
lmul4max |
lmul4max |
lmul4max |
lmul4max |
x |
cp_vl_0 |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
std_vec |
x |
x |
x |
x |
x |
x |
||||||
cp_custom |
wvv_all |
wvx_all |
wvv |
wvx |
wwv_all |
wwv |
| Instruction | vsub.vx | vwsub.vv | vwsub.vx | vwsubu.vv | vwsubu.vx | vwsub.wv | vwsub.wx | vwsubu.wv | vwsubu.wx | vrsub.vx | vrsub.vi | vzext.vf2 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|
RV32 |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
RV64 |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
EFFEW8 |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
|
EFFEW16 |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
EFFEW32 |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
EFFEW64 |
x |
x |
x |
x |
||||||||
cp_asm_count |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
cp_vd |
x |
emul2 |
emul2 |
emul2 |
emul2 |
emul2 |
emul2 |
emul2 |
emul2 |
x |
x |
x |
cp_vs2 |
x |
x |
x |
x |
x |
emul2 |
emul2 |
emul2 |
emul2 |
x |
x |
x |
cp_vs1 |
x |
x |
x |
x |
||||||||
cp_rs1 |
x |
x |
x |
x |
x |
x |
||||||
cp_imm_5bit |
x |
|||||||||||
cmp_vd_vs2 |
x |
emul2 |
emul2 |
emul2 |
emul2 |
x |
x |
|||||
cmp_vs1_vs2 |
x |
x |
||||||||||
cp_vs2_edges |
x |
x |
x |
x |
x |
emul2 |
emul2 |
emul2 |
emul2 |
x |
x |
emulf2 |
cp_vs1_edges |
x |
x |
x |
x |
||||||||
cr_vs2_vs1_edges |
x |
x |
wv |
wv |
||||||||
cp_rs1_edges |
x |
x |
x |
x |
x |
x |
||||||
cr_vs2_rs1_edges |
x |
x |
x |
wx |
wx |
x |
||||||
cr_vs2_imm_edges |
x |
|||||||||||
cp_masking_edges |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
cr_vl_lmul |
x |
lmul4max |
lmul4max |
lmul4max |
lmul4max |
lmul4max |
lmul4max |
lmul4max |
lmul4max |
x |
x |
x |
cr_vtype_agnostic |
x |
lmul4max |
lmul4max |
lmul4max |
lmul4max |
lmul4max |
lmul4max |
lmul4max |
lmul4max |
x |
x |
x |
cp_vl_0 |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
std_vec |
x |
x |
x |
x |
x |
x |
x |
|||||
cp_custom |
wvv |
wvx |
wvv |
wvx |
wwv |
wwv |
vext2 |
| Instruction | vzext.vf4 | vzext.vf8 | vsext.vf2 | vsext.vf4 | vsext.vf8 | vadc.vvm | vadc.vxm | vadc.vim | vsbc.vvm | vsbc.vxm | vmadc.vvm | vmadc.vxm |
|---|---|---|---|---|---|---|---|---|---|---|---|---|
RV32 |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
RV64 |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
EFFEW8 |
x |
x |
x |
x |
x |
x |
x |
|||||
EFFEW16 |
x |
x |
x |
x |
x |
x |
x |
x |
||||
EFFEW32 |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
||
EFFEW64 |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
cp_asm_count |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
cp_vd |
x |
x |
x |
x |
x |
nv0 |
nv0 |
nv0 |
nv0 |
nv0 |
x |
x |
cp_vs2 |
x |
x |
x |
x |
x |
nv0 |
nv0 |
nv0 |
nv0 |
nv0 |
nv0 |
nv0 |
cp_vs1 |
nv0 |
nv0 |
nv0 |
|||||||||
cp_rs1 |
x |
x |
x |
|||||||||
cp_imm_5bit |
x |
|||||||||||
cmp_vd_vs2 |
nv0 |
nv0 |
nv0 |
nv0 |
nv0 |
|||||||
cmp_vd_vs1 |
nv0 |
nv0 |
||||||||||
cmp_vs1_vs2 |
nv0 |
nv0 |
nv0 |
|||||||||
cmp_vd_vs1_vs2 |
nv0 |
nv0 |
||||||||||
cp_vs2_edges |
emulf4 |
emulf8 |
emulf2 |
emulf4 |
emulf8 |
x |
x |
x |
x |
x |
x |
x |
cp_vs1_edges |
x |
x |
x |
|||||||||
cr_vs2_vs1_edges |
x |
x |
x |
|||||||||
cp_rs1_edges |
x |
x |
x |
|||||||||
cr_vs2_rs1_edges |
x |
x |
x |
|||||||||
cr_vs2_imm_edges |
x |
|||||||||||
cp_masking_edges |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
cr_vl_lmul |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
cr_vtype_agnostic |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
cp_vl_0 |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
std_vec |
x |
x |
x |
x |
x |
x |
x |
|||||
cp_custom |
vext4 |
vext8 |
vext2 |
vext4 |
vext8 |
maskwrite_masked |
maskwrite_masked |
| Instruction | vmadc.vim | vmadc.vv | vmadc.vx | vmadc.vi | vmsbc.vvm | vmsbc.vxm | vmsbc.vv | vmsbc.vx | vand.vv | vand.vx | vand.vi | vor.vv |
|---|---|---|---|---|---|---|---|---|---|---|---|---|
RV32 |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
RV64 |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
EFFEW8 |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
EFFEW16 |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
EFFEW32 |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
EFFEW64 |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
cp_asm_count |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
cp_vd |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
cp_vs2 |
nv0 |
x |
x |
x |
nv0 |
nv0 |
x |
x |
x |
x |
x |
x |
cp_vs1 |
x |
nv0 |
x |
x |
x |
|||||||
cp_rs1 |
x |
x |
x |
x |
||||||||
cp_imm_5bit |
x |
x |
x |
|||||||||
cmp_vd_vs2 |
x |
x |
x |
x |
||||||||
cmp_vd_vs1 |
x |
x |
||||||||||
cmp_vs1_vs2 |
x |
nv0 |
x |
x |
x |
|||||||
cmp_vd_vs1_vs2 |
x |
x |
||||||||||
cp_vs2_edges |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
cp_vs1_edges |
x |
x |
x |
x |
x |
|||||||
cr_vs2_vs1_edges |
x |
x |
x |
x |
x |
|||||||
cp_rs1_edges |
x |
x |
x |
x |
||||||||
cr_vs2_rs1_edges |
x |
x |
x |
x |
||||||||
cr_vs2_imm_edges |
x |
x |
x |
|||||||||
cp_masking_edges |
x |
x |
x |
x |
x |
x |
x |
|||||
cr_vl_lmul |
x |
nomask |
nomask |
nomask |
x |
x |
nomask |
nomask |
x |
x |
x |
x |
cr_vtype_agnostic |
x |
nomask |
nomask |
nomask |
x |
x |
nomask |
nomask |
x |
x |
x |
x |
cp_vl_0 |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
std_vec |
x |
x |
x |
x |
x |
x |
x |
x |
||||
cp_custom |
maskwrite_masked |
maskwrite_unmasked |
maskwrite_unmasked |
maskwrite_unmasked |
maskwrite_masked |
maskwrite_masked |
maskwrite_unmasked |
maskwrite_unmasked |
| Instruction | vor.vx | vor.vi | vxor.vv | vxor.vx | vxor.vi | vsll.vv | vsll.vx | vsll.vi | vsrl.vv | vsrl.vx | vsrl.vi | vnsrl.wv |
|---|---|---|---|---|---|---|---|---|---|---|---|---|
RV32 |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
RV64 |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
EFFEW8 |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
EFFEW16 |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
EFFEW32 |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
EFFEW64 |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
|
cp_asm_count |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
cp_vd |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
cp_vs2 |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
emul2 |
cp_vs1 |
x |
x |
x |
x |
||||||||
cp_rs1 |
x |
x |
x |
x |
||||||||
cp_imm_5bit |
x |
x |
u |
u |
||||||||
cmp_vd_vs2 |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
|
cmp_vd_vs1 |
x |
x |
x |
x |
||||||||
cmp_vs1_vs2 |
x |
x |
x |
|||||||||
cmp_vd_vs1_vs2 |
x |
x |
x |
|||||||||
cp_vs2_edges |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
emul2 |
cp_vs1_edges |
x |
x |
x |
x |
||||||||
cr_vs2_vs1_edges |
x |
x |
x |
wv |
||||||||
cp_rs1_edges |
x |
x |
x |
x |
||||||||
cr_vs2_rs1_edges |
x |
x |
x |
x |
||||||||
cr_vs2_imm_edges |
x |
x |
u |
u |
||||||||
cp_masking_edges |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
cr_vl_lmul |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
lmul4max |
cr_vtype_agnostic |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
lmul4max |
cp_vl_0 |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
std_vec |
x |
x |
x |
x |
x |
|||||||
cp_custom |
shift_vv |
shift_vx |
shift_vv |
shift_vx |
shift_wv |
| Instruction | vnsrl.wx | vnsrl.wi | vsra.vv | vsra.vx | vsra.vi | vnsra.wv | vnsra.wx | vnsra.wi | vmseq.vv | vmseq.vx | vmseq.vi | vmsne.vv |
|---|---|---|---|---|---|---|---|---|---|---|---|---|
RV32 |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
RV64 |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
EFFEW8 |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
EFFEW16 |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
EFFEW32 |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
EFFEW64 |
x |
x |
x |
x |
x |
x |
x |
|||||
cp_asm_count |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
cp_vd |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
cp_vs2 |
emul2 |
emul2 |
x |
x |
x |
emul2 |
emul2 |
emul2 |
x |
x |
x |
x |
cp_vs1 |
x |
x |
x |
x |
||||||||
cp_rs1 |
x |
x |
x |
x |
||||||||
cp_imm_5bit |
u |
u |
u |
x |
||||||||
cmp_vd_vs2 |
x |
x |
x |
|||||||||
cmp_vd_vs1 |
x |
x |
||||||||||
cmp_vs1_vs2 |
x |
x |
x |
|||||||||
cmp_vd_vs1_vs2 |
x |
|||||||||||
cp_vs2_edges |
emul2 |
emul2 |
x |
x |
x |
emul2 |
emul2 |
emul2 |
x |
x |
x |
x |
cp_vs1_edges |
x |
x |
x |
x |
||||||||
cr_vs2_vs1_edges |
x |
wv |
x |
x |
||||||||
cp_rs1_edges |
x |
x |
x |
x |
||||||||
cr_vs2_rs1_edges |
wx |
x |
wx |
x |
||||||||
cr_vs2_imm_edges |
wiu |
u |
wiu |
x |
||||||||
cp_masking_edges |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
cr_vl_lmul |
lmul4max |
lmul4max |
x |
x |
x |
lmul4max |
lmul4max |
lmul4max |
x |
x |
x |
x |
cr_vtype_agnostic |
lmul4max |
lmul4max |
x |
x |
x |
lmul4max |
lmul4max |
lmul4max |
x |
x |
x |
x |
cp_vl_0 |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
std_vec |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
|
cp_custom |
shift_wx |
shift_wi |
shift_vv |
shift_vx |
shift_wv |
shift_wx |
shift_wi |
maskwrite_masked |
maskwrite_masked |
maskwrite_masked |
maskwrite_masked |
|
cp_custom_shift_wi_all |
x |
x |
| Instruction | vmsne.vx | vmsne.vi | vmslt.vv | vmslt.vx | vmsltu.vv | vmsltu.vx | vmsle.vv | vmsle.vx | vmsle.vi | vmsleu.vv | vmsleu.vx | vmsleu.vi |
|---|---|---|---|---|---|---|---|---|---|---|---|---|
RV32 |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
RV64 |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
EFFEW8 |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
EFFEW16 |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
EFFEW32 |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
EFFEW64 |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
cp_asm_count |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
cp_vd |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
cp_vs2 |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
cp_vs1 |
x |
x |
x |
x |
||||||||
cp_rs1 |
x |
x |
x |
x |
x |
|||||||
cp_imm_5bit |
x |
x |
x |
|||||||||
cmp_vs1_vs2 |
x |
x |
x |
x |
||||||||
cp_vs2_edges |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
cp_vs1_edges |
x |
x |
x |
x |
||||||||
cr_vs2_vs1_edges |
x |
x |
x |
x |
||||||||
cp_rs1_edges |
x |
x |
x |
x |
x |
|||||||
cr_vs2_rs1_edges |
x |
x |
x |
x |
x |
|||||||
cr_vs2_imm_edges |
x |
x |
x |
|||||||||
cp_masking_edges |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
cr_vl_lmul |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
cr_vtype_agnostic |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
cp_vl_0 |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
std_vec |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
cp_custom |
maskwrite_masked |
maskwrite_masked |
maskwrite_masked |
maskwrite_masked |
maskwrite_masked |
maskwrite_masked |
maskwrite_masked |
maskwrite_masked |
maskwrite_masked |
maskwrite_masked |
maskwrite_masked |
maskwrite_masked |
| Instruction | vmsgt.vx | vmsgt.vi | vmsgtu.vx | vmsgtu.vi | vmin.vv | vmin.vx | vminu.vv | vminu.vx | vmax.vv | vmax.vx | vmaxu.vv | vmaxu.vx |
|---|---|---|---|---|---|---|---|---|---|---|---|---|
RV32 |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
RV64 |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
EFFEW8 |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
EFFEW16 |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
EFFEW32 |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
EFFEW64 |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
cp_asm_count |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
cp_vd |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
cp_vs2 |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
cp_vs1 |
x |
x |
x |
x |
||||||||
cp_rs1 |
x |
x |
x |
x |
x |
x |
||||||
cp_imm_5bit |
x |
x |
||||||||||
cmp_vd_vs2 |
x |
x |
x |
x |
x |
x |
x |
x |
||||
cmp_vd_vs1 |
x |
x |
x |
x |
||||||||
cmp_vs1_vs2 |
x |
x |
x |
x |
||||||||
cmp_vd_vs1_vs2 |
x |
x |
x |
x |
||||||||
cp_vs2_edges |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
cp_vs1_edges |
x |
x |
x |
x |
||||||||
cr_vs2_vs1_edges |
x |
x |
x |
x |
||||||||
cp_rs1_edges |
x |
x |
x |
x |
x |
x |
||||||
cr_vs2_rs1_edges |
x |
x |
x |
x |
x |
x |
||||||
cr_vs2_imm_edges |
x |
x |
||||||||||
cp_masking_edges |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
cr_vl_lmul |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
cr_vtype_agnostic |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
cp_vl_0 |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
std_vec |
x |
x |
x |
x |
||||||||
cp_custom |
maskwrite_masked |
maskwrite_masked |
maskwrite_masked |
maskwrite_masked |
| Instruction | vmul.vv | vmul.vx | vmulh.vv | vmulh.vx | vmulhu.vv | vmulhu.vx | vmulhsu.vv | vmulhsu.vx | vwmul.vv | vwmul.vx | vwmulu.vv | vwmulu.vx |
|---|---|---|---|---|---|---|---|---|---|---|---|---|
RV32 |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
RV64 |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
EFFEW8 |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
EFFEW16 |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
EFFEW32 |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
EFFEW64 |
x |
x |
x |
x |
x |
x |
x |
x |
||||
cp_asm_count |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
cp_vd |
x |
x |
x |
x |
x |
x |
x |
x |
emul2 |
emul2 |
emul2 |
emul2 |
cp_vs2 |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
cp_vs1 |
x |
x |
x |
x |
x |
x |
||||||
cp_rs1 |
x |
x |
x |
x |
x |
x |
||||||
cmp_vd_vs2 |
x |
x |
x |
x |
x |
x |
x |
x |
||||
cmp_vd_vs1 |
x |
x |
x |
x |
||||||||
cmp_vs1_vs2 |
x |
x |
x |
x |
x |
x |
||||||
cmp_vd_vs1_vs2 |
x |
x |
x |
x |
||||||||
cp_vs2_edges |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
cp_vs1_edges |
x |
x |
x |
x |
x |
x |
||||||
cr_vs2_vs1_edges |
x |
x |
x |
x |
x |
x |
||||||
cp_rs1_edges |
x |
x |
x |
x |
x |
x |
||||||
cr_vs2_rs1_edges |
x |
x |
x |
x |
x |
x |
||||||
cp_masking_edges |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
cr_vl_lmul |
x |
x |
x |
x |
x |
x |
x |
x |
lmul4max |
lmul4max |
lmul4max |
lmul4max |
cr_vtype_agnostic |
x |
x |
x |
x |
x |
x |
x |
x |
lmul4max |
lmul4max |
lmul4max |
lmul4max |
cp_vl_0 |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
std_vec |
x |
x |
x |
x |
||||||||
cp_custom |
wvv |
wvx |
wvv |
wvx |
| Instruction | vwmulsu.vv | vwmulsu.vx | vdiv.vv | vdiv.vx | vdivu.vv | vdivu.vx | vrem.vv | vrem.vx | vremu.vv | vremu.vx | vmacc.vv | vmacc.vx |
|---|---|---|---|---|---|---|---|---|---|---|---|---|
RV32 |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
RV64 |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
EFFEW8 |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
EFFEW16 |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
EFFEW32 |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
EFFEW64 |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
||
cp_asm_count |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
cp_vd |
emul2 |
emul2 |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
cp_vs2 |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
cp_vs1 |
x |
x |
x |
x |
x |
x |
||||||
cp_rs1 |
x |
x |
x |
x |
x |
x |
||||||
cmp_vd_vs2 |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
||
cmp_vd_vs1 |
x |
x |
x |
x |
x |
|||||||
cmp_vs1_vs2 |
x |
x |
x |
x |
x |
x |
||||||
cmp_vd_vs1_vs2 |
x |
x |
x |
x |
x |
|||||||
cp_vs2_edges |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
cp_vs1_edges |
x |
x |
x |
x |
x |
x |
||||||
cr_vs2_vs1_edges |
x |
x |
x |
x |
x |
x |
||||||
cp_rs1_edges |
x |
x |
x |
x |
x |
x |
||||||
cr_vs2_rs1_edges |
x |
x |
x |
x |
x |
x |
||||||
cp_masking_edges |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
cr_vl_lmul |
lmul4max |
lmul4max |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
cr_vtype_agnostic |
lmul4max |
lmul4max |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
cp_vl_0 |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
std_vec |
x |
x |
||||||||||
cp_custom |
wvv |
wvx |
| Instruction | vnmsac.vv | vnmsac.vx | vmadd.vv | vmadd.vx | vnmsub.vv | vnmsub.vx | vwmacc.vv | vwmacc.vx | vwmaccu.vv | vwmaccu.vx | vwmaccsu.vv | vwmaccsu.vx |
|---|---|---|---|---|---|---|---|---|---|---|---|---|
RV32 |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
RV64 |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
EFFEW8 |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
EFFEW16 |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
EFFEW32 |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
EFFEW64 |
x |
x |
x |
x |
x |
x |
||||||
cp_asm_count |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
cp_vd |
x |
x |
x |
x |
x |
x |
emul2 |
emul2 |
emul2 |
emul2 |
emul2 |
emul2 |
cp_vs2 |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
cp_vs1 |
x |
x |
x |
x |
x |
x |
||||||
cp_rs1 |
x |
x |
x |
x |
x |
x |
||||||
cmp_vd_vs2 |
x |
x |
x |
x |
x |
x |
||||||
cmp_vd_vs1 |
x |
x |
x |
|||||||||
cmp_vs1_vs2 |
x |
x |
x |
x |
x |
x |
||||||
cmp_vd_vs1_vs2 |
x |
x |
x |
|||||||||
cp_vs2_edges |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
cp_vs1_edges |
x |
x |
x |
x |
x |
x |
||||||
cr_vs2_vs1_edges |
x |
x |
x |
x |
x |
x |
||||||
cp_rs1_edges |
x |
x |
x |
x |
x |
x |
||||||
cr_vs2_rs1_edges |
x |
x |
x |
x |
x |
x |
||||||
cp_masking_edges |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
cr_vl_lmul |
x |
x |
x |
x |
x |
x |
lmul4max |
lmul4max |
lmul4max |
lmul4max |
lmul4max |
lmul4max |
cr_vtype_agnostic |
x |
x |
x |
x |
x |
x |
lmul4max |
lmul4max |
lmul4max |
lmul4max |
lmul4max |
lmul4max |
cp_vl_0 |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
| Instruction | vwmaccus.vx | vmerge.vvm | vmerge.vxm | vmerge.vim | vmv.v.v | vmv.v.x | vmv.v.i | vsadd.vv | vsadd.vx | vsadd.vi | vsaddu.vv | vsaddu.vx |
|---|---|---|---|---|---|---|---|---|---|---|---|---|
RV32 |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
RV64 |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
EFFEW8 |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
EFFEW16 |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
EFFEW32 |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
EFFEW64 |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
|
cp_asm_count |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
cp_vd |
emul2 |
nv0 |
nv0 |
nv0 |
x |
x |
x |
x |
x |
x |
x |
x |
cp_vs2 |
x |
nv0 |
nv0 |
nv0 |
x |
x |
x |
x |
x |
|||
cp_vs1 |
nv0 |
x |
x |
x |
||||||||
cp_rs1 |
x |
x |
x |
x |
x |
|||||||
cp_imm_5bit |
x |
x |
x |
|||||||||
cmp_vd_vs2 |
nv0 |
nv0 |
nv0 |
x |
x |
x |
x |
x |
||||
cmp_vd_vs1 |
nv0 |
x |
x |
x |
||||||||
cmp_vs1_vs2 |
nv0 |
x |
x |
|||||||||
cmp_vd_vs1_vs2 |
nv0 |
x |
x |
|||||||||
cp_vs2_edges |
x |
x |
x |
x |
x |
x |
x |
x |
x |
|||
cp_vs1_edges |
x |
x |
x |
x |
||||||||
cr_vs2_vs1_edges |
x |
x |
x |
|||||||||
cp_rs1_edges |
x |
x |
x |
x |
x |
|||||||
cr_vs2_rs1_edges |
x |
x |
x |
x |
||||||||
cr_vs2_imm_edges |
x |
x |
||||||||||
cp_masking_edges |
x |
x |
x |
x |
x |
x |
x |
x |
x |
|||
cr_vl_lmul |
lmul4max |
x |
x |
x |
nomask |
nomask |
nomask |
x |
x |
x |
x |
x |
cr_vtype_agnostic |
lmul4max |
x |
x |
x |
nomask |
nomask |
nomask |
x |
x |
x |
x |
x |
cp_vl_0 |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
cp_csr_vxsat |
x |
x |
x |
x |
x |
| Instruction | vsaddu.vi | vssub.vv | vssub.vx | vssubu.vv | vssubu.vx | vaadd.vv | vaadd.vx | vaaddu.vv | vaaddu.vx | vasub.vv | vasub.vx | vasubu.vv |
|---|---|---|---|---|---|---|---|---|---|---|---|---|
RV32 |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
RV64 |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
EFFEW8 |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
EFFEW16 |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
EFFEW32 |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
EFFEW64 |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
cp_asm_count |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
cp_vd |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
cp_vs2 |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
cp_vs1 |
x |
x |
x |
x |
x |
x |
||||||
cp_rs1 |
x |
x |
x |
x |
x |
|||||||
cp_imm_5bit |
x |
|||||||||||
cmp_vd_vs2 |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
cmp_vd_vs1 |
x |
x |
x |
x |
x |
x |
||||||
cmp_vs1_vs2 |
x |
x |
x |
x |
x |
x |
||||||
cmp_vd_vs1_vs2 |
x |
x |
x |
x |
x |
x |
||||||
cp_vs2_edges |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
cp_vs1_edges |
x |
x |
x |
x |
x |
x |
||||||
cr_vs2_vs1_edges |
x |
x |
x |
x |
x |
x |
||||||
cr_vxrm_vs2_vs1_edges |
x |
x |
x |
x |
||||||||
cp_rs1_edges |
x |
x |
x |
x |
x |
|||||||
cr_vs2_rs1_edges |
x |
x |
x |
x |
x |
|||||||
cr_vxrm_vs2_rs1_edges |
x |
x |
x |
|||||||||
cr_vs2_imm_edges |
x |
|||||||||||
cp_masking_edges |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
cr_vl_lmul |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
cr_vtype_agnostic |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
cp_vl_0 |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
cp_csr_vxsat |
x |
x |
x |
x |
x |
| Instruction | vasubu.vx | vsmul.vv | vsmul.vx | vssrl.vv | vssrl.vx | vssrl.vi | vssra.vv | vssra.vx | vssra.vi | vnclip.wv | vnclip.wx | vnclip.wi |
|---|---|---|---|---|---|---|---|---|---|---|---|---|
RV32 |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
RV64 |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
EFFEW8 |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
EFFEW16 |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
EFFEW32 |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
EFFEW64 |
x |
x |
x |
x |
x |
x |
x |
x |
x |
|||
cp_asm_count |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
cp_vd |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
cp_vs2 |
x |
x |
x |
x |
x |
x |
x |
x |
x |
emul2 |
emul2 |
emul2 |
cp_vs1 |
x |
x |
x |
x |
||||||||
cp_rs1 |
x |
x |
x |
x |
x |
|||||||
cp_imm_5bit |
u |
u |
u |
|||||||||
cmp_vd_vs2 |
x |
x |
x |
x |
x |
x |
x |
x |
x |
|||
cmp_vd_vs1 |
x |
x |
x |
x |
||||||||
cmp_vs1_vs2 |
x |
x |
x |
|||||||||
cmp_vd_vs1_vs2 |
x |
x |
x |
|||||||||
cp_vs2_edges |
x |
x |
x |
x |
x |
x |
x |
x |
x |
emul2 |
emul2 |
emul2 |
cp_vs1_edges |
x |
x |
x |
x |
||||||||
cr_vs2_vs1_edges |
x |
x |
x |
wv |
||||||||
cr_vxrm_vs2_vs1_edges |
x |
x |
x |
wv |
||||||||
cp_rs1_edges |
x |
x |
x |
x |
x |
|||||||
cr_vs2_rs1_edges |
x |
x |
x |
x |
wx |
|||||||
cr_vxrm_vs2_rs1_edges |
x |
x |
x |
x |
wx |
|||||||
cr_vs2_imm_edges |
u |
u |
wiu |
|||||||||
cr_vxrm_vs2_imm_edges |
x |
x |
wi |
|||||||||
cp_masking_edges |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
cr_vl_lmul |
x |
x |
x |
x |
x |
x |
x |
x |
x |
lmul4max |
lmul4max |
lmul4max |
cr_vtype_agnostic |
x |
x |
x |
x |
x |
x |
x |
x |
x |
lmul4max |
lmul4max |
lmul4max |
cp_vl_0 |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
cp_csr_vxsat |
x |
no_rv32_sew64 |
||||||||||
std_vec |
x |
x |
x |
x |
x |
x |
x |
|||||
cp_custom |
shift_vv |
shift_vx |
shift_vv |
shift_vx |
shift_wv |
shift_wx |
shift_wi |
|||||
cp_custom_shift_wi_all |
x |
| Instruction | vnclipu.wv | vnclipu.wx | vnclipu.wi | vredsum.vs | vwredsum.vs | vwredsumu.vs | vredmax.vs | vredmaxu.vs | vredmin.vs | vredminu.vs | vredand.vs | vredor.vs |
|---|---|---|---|---|---|---|---|---|---|---|---|---|
RV32 |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
RV64 |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
EFFEW8 |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
EFFEW16 |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
EFFEW32 |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
EFFEW64 |
x |
x |
x |
x |
x |
x |
x |
|||||
cp_asm_count |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
cp_vd |
x |
x |
x |
x |
emul2 |
emul2 |
x |
x |
x |
x |
x |
x |
cp_vs2 |
emul2 |
emul2 |
emul2 |
x |
x |
x |
x |
x |
x |
x |
x |
x |
cp_vs1 |
x |
x |
emul2 |
emul2 |
x |
x |
x |
x |
x |
x |
||
cp_rs1 |
x |
|||||||||||
cp_imm_5bit |
u |
|||||||||||
cmp_vd_vs2 |
x |
x |
x |
x |
x |
x |
x |
|||||
cmp_vd_vs1 |
x |
x |
emul2 |
emul2 |
x |
x |
x |
x |
x |
x |
||
cmp_vs1_vs2 |
x |
x |
x |
x |
x |
x |
x |
|||||
cmp_vd_vs1_vs2 |
x |
x |
x |
x |
x |
x |
x |
|||||
cp_vs2_edges |
emul2 |
emul2 |
emul2 |
x |
x |
x |
x |
x |
x |
x |
x |
x |
cp_vs1_edges |
x |
x |
emul2 |
emul2 |
x |
x |
x |
x |
x |
x |
||
cr_vs2_vs1_edges |
wv |
x |
wred |
wred |
x |
x |
x |
x |
x |
x |
||
cr_vxrm_vs2_vs1_edges |
wv |
|||||||||||
cp_rs1_edges |
x |
|||||||||||
cr_vs2_rs1_edges |
wx |
|||||||||||
cr_vxrm_vs2_rs1_edges |
wx |
|||||||||||
cr_vs2_imm_edges |
wiu |
|||||||||||
cr_vxrm_vs2_imm_edges |
wi |
|||||||||||
cp_masking_edges |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
cr_vl_lmul |
lmul4max |
lmul4max |
lmul4max |
x |
lmul4max |
lmul4max |
x |
x |
x |
x |
x |
x |
cr_vtype_agnostic |
lmul4max |
lmul4max |
lmul4max |
x |
lmul4max |
lmul4max |
x |
x |
x |
x |
x |
x |
cp_vl_0 |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
std_vec |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
cp_custom |
shift_wv |
shift_wx |
shift_wi |
red |
wred |
wred |
red |
red |
red |
red |
red |
red |
cp_custom_shift_wi_all |
x |
|||||||||||
cp_custom_vreductionw |
x |
x |
| Instruction | vredxor.vs | vmand.mm | vmnand.mm | vmandn.mm | vmxor.mm | vmor.mm | vmnor.mm | vmorn.mm | vmxnor.mm | vcpop.m | vfirst.m | vmsbf.m |
|---|---|---|---|---|---|---|---|---|---|---|---|---|
RV32 |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
RV64 |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
EFFEW8 |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
EFFEW16 |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
EFFEW32 |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
EFFEW64 |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
cp_asm_count |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
cp_vd |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
||
cp_rd |
x |
x |
||||||||||
cp_vs2 |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
cp_vs1 |
x |
x |
x |
x |
x |
x |
x |
x |
x |
|||
cmp_vd_vs2 |
x |
x |
x |
x |
x |
x |
x |
x |
x |
|||
cmp_vd_vs1 |
x |
x |
x |
x |
x |
x |
x |
x |
x |
|||
cmp_vs1_vs2 |
x |
x |
x |
x |
x |
x |
x |
x |
x |
|||
cmp_vd_vs1_vs2 |
x |
x |
x |
x |
x |
x |
x |
x |
x |
|||
cp_vs2_edges |
x |
eew1 |
eew1 |
eew1 |
eew1 |
eew1 |
eew1 |
eew1 |
eew1 |
eew1 |
eew1 |
eew1 |
cp_vs1_edges |
x |
eew1 |
eew1 |
eew1 |
eew1 |
eew1 |
eew1 |
eew1 |
eew1 |
|||
cr_vs2_vs1_edges |
x |
mm |
mm |
mm |
mm |
mm |
mm |
mm |
mm |
|||
cp_masking_edges |
x |
x |
x |
x |
||||||||
cr_vl_lmul |
x |
nomask |
nomask |
nomask |
nomask |
nomask |
nomask |
nomask |
nomask |
x |
x |
x |
cr_vtype_agnostic |
x |
nomask |
nomask |
nomask |
nomask |
nomask |
nomask |
nomask |
nomask |
x |
x |
x |
cp_vl_0 |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
std_vec |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
cp_custom |
red |
maskwrite_unmasked |
maskwrite_unmasked |
maskwrite_unmasked |
maskwrite_unmasked |
maskwrite_unmasked |
maskwrite_unmasked |
maskwrite_unmasked |
maskwrite_unmasked |
gprwrite |
gprwrite |
maskwrite_unmasked |
| Instruction | vmsif.m | vmsof.m | viota.m | vid.v | vmv.x.s | vmv.s.x | vslideup.vx | vslideup.vi | vslidedown.vx | vslidedown.vi | vslide1up.vx | vslide1down.vx |
|---|---|---|---|---|---|---|---|---|---|---|---|---|
RV32 |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
RV64 |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
EFFEW8 |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
EFFEW16 |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
EFFEW32 |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
EFFEW64 |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
cp_asm_count |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
cp_vd |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
|
cp_rd |
x |
|||||||||||
cp_vs2 |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
||
cp_rs1 |
x |
x |
x |
x |
x |
|||||||
cp_imm_5bit |
u |
u |
||||||||||
cmp_vd_vs2 |
x |
x |
x |
|||||||||
cp_vs2_edges |
eew1 |
eew1 |
eew1 |
x |
x |
x |
x |
x |
x |
x |
||
cp_rs1_edges |
x |
x |
x |
x |
x |
|||||||
cr_vs2_rs1_edges |
x |
x |
x |
x |
||||||||
cr_vs2_imm_edges |
u |
u |
||||||||||
cp_masking_edges |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
||
cr_vl_lmul |
x |
x |
x |
x |
nomask |
nomask |
x |
x |
x |
x |
x |
x |
cr_vtype_agnostic |
x |
x |
x |
x |
nomask |
nomask |
x |
x |
x |
x |
x |
x |
cp_vl_0 |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
std_vec |
x |
x |
x |
x |
x |
|||||||
cp_custom |
maskwrite_unmasked |
maskwrite_unmasked |
vmv_x_s |
vmv_s_x |
vindexVX |
| Instruction | vrgather.vv | vrgather.vx | vrgather.vi | vrgatherei16.vv | vcompress.vm | vmv1r.v | vmv2r.v | vmv4r.v | vmv8r.v |
|---|---|---|---|---|---|---|---|---|---|
RV32 |
x |
x |
x |
x |
x |
x |
x |
x |
x |
RV64 |
x |
x |
x |
x |
x |
x |
x |
x |
x |
EFFEW8 |
x |
x |
x |
x |
x |
x |
x |
x |
x |
EFFEW16 |
x |
x |
x |
x |
x |
x |
x |
x |
x |
EFFEW32 |
x |
x |
x |
x |
x |
x |
x |
x |
x |
EFFEW64 |
x |
x |
x |
x |
x |
x |
x |
x |
x |
cp_asm_count |
x |
x |
x |
x |
x |
x |
x |
x |
x |
cp_vd |
x |
x |
x |
x |
x |
x |
emul2 |
emul4 |
emul8 |
cp_vs2 |
x |
x |
x |
x |
x |
x |
emul2 |
emul4 |
emul8 |
cp_vs1 |
x |
x |
x |
||||||
cp_rs1 |
x |
||||||||
cp_imm_5bit |
u |
||||||||
cmp_vd_vs2 |
x |
emul2 |
emul4 |
emul8 |
|||||
cmp_vs1_vs2 |
x |
sew16 |
|||||||
cp_vs2_edges |
x |
x |
x |
x |
x |
||||
cp_vs1_edges |
x |
eew16 |
x |
||||||
cr_vs2_vs1_edges |
x |
vs1_eew16 |
x |
||||||
cp_rs1_edges |
x |
||||||||
cr_vs2_rs1_edges |
x |
||||||||
cr_vs2_imm_edges |
u |
||||||||
cp_masking_edges |
x |
x |
x |
x |
|||||
cr_vl_lmul |
x |
x |
x |
e16 |
nomask |
nomask |
nomask |
nomask |
nomask |
cr_vtype_agnostic |
x |
x |
x |
e16 |
nomask |
nomask |
nomask |
nomask |
nomask |
cp_vl_0 |
x |
x |
x |
x |
x |
x |
x |
x |
x |
std_vec |
x |
x |
x |
||||||
cp_custom |
vindexVV |
vindexVX |
vindexVV_ei16 |
||||||
cp_custom_vindexCorners |
x |
ei16 |
| Normative Rule | Rule Text | Coverpoints |
|---|---|---|
elen |
Implicit |
|
vlen |
Implicit: a fixed implementation parameter - every other coverpoint’s vl/lmul arithmetic implicitly depends on it being correct |
|
hw_mstatus_vs_dirty_update |
Untestable: whether an implementation opportunistically marks mstatus.VS/vsstatus.VS Dirty is a permissive implementation choice with no single correct answer to assert |
|
reserved_vill_set |
Untestable: Implementation Specific, Theoretically Implicit with Correct Sail Config |
|
vreg_count |
The vector extension adds 32 architectural vector registers, v0-v31 to the base scalar RISC-V ISA. |
Vf16_vfmv_f_s_cg/cp_custom_fmv_fs_vs2_all_lmul_regs |
mstatus_vs_op |
Sm_V_cg/cp_vcsrs_walking1s, U_V_cg/cp_vcsrs_walking1s, S_V_cg/cp_vcsrs_walking1s, H_V_cg/cp_vcsrs_walking1s |
|
mstatus_vs_sstatus_vs_op |
Sm_V_cg/{cp_mstatus_vs_set_dirty_arithmetic, cp_mstatus_vs_off_arithmetic}, U_V_cg/{cp_mstatus_vs_set_dirty_arithmetic, cp_mstatus_vs_off_arithmetic}, S_V_cg/{cp_sstatus_vs_set_dirty_arithmetic, cp_sstatus_vs_off_arithmetic}, H_V_cg/{cp_vsstatus_vs_set_dirty_arithmetic, cp_vsstatus_vs_off_arithmetic} |
|
mstatus_vs_op_initial_clean |
Sm_V_cg/cp_mstatus_vs_set_dirty_arithmetic, U_V_cg/cp_mstatus_vs_set_dirty_arithmetic, S_V_cg/cp_sstatus_vs_set_dirty_arithmetic, H_V_cg/cp_vsstatus_vs_set_dirty_arithmetic, Sm_V_cg/cp_mstatus_vs_set_dirty_csr, U_V_cg/cp_mstatus_vs_set_dirty_csr, S_V_cg/cp_sstatus_vs_set_dirty_csr, H_V_cg/cp_vsstatus_vs_set_dirty_csr |
|
mstatus_vs_op_off |
Sm_V_cg/cp_mstatus_vs_off_arithmetic, U_V_cg/cp_mstatus_vs_off_arithmetic, S_V_cg/cp_sstatus_vs_off_arithmetic, H_V_cg/cp_vsstatus_vs_off_arithmetic |
|
vsstatus_vs_mstatus_vs_op_active |
Sm_V_cg/cp_mstatus_vs_set_dirty_arithmetic, Sm_V_cg/cp_mstatus_vs_set_dirty_csr |
|
vsstatus_vs_op |
Untestable: requires the H extension configured; see mstatus_vs_op_off for the non-hypervisor form |
|
vsstatus_sd_op_vs |
Untestable: vsstatus.SD is a CSR-layout consequence of VS state, not independently observable via a coverpoint |
|
mstatus_sd_summary_op |
Sm_mstatus_cg/cp_mstatus_sd_write |
|
mstatus_sd_vs_dirty_op |
Sm_mstatus_cg/cp_mstatus_sd_write |
|
mstatus_sd_op_vs |
Untestable: mstatus.SD is a CSR-layout consequence of VS state, not independently observable via a coverpoint |
|
mutable_misa_v |
Sm_mcsr_cg/cp_misa_v |
|
mstatus_vs_exists |
Untestable: field-existence-independent-of-misa.V is an implementation/config fact, not a runtime coverpoint |
|
vsstatus_vs_exists |
Untestable: field-existence-independent-of-misa.V is an implementation/config fact, not a runtime coverpoint |
|
vtype_sz_acc_op |
Sm_V_cg/cp_sew_lmul_vset_i_vli, U_V_cg/cp_sew_lmul_vset_i_vli, S_V_cg/cp_sew_lmul_vset_i_vli, H_V_cg/cp_sew_lmul_vset_i_vli, Sm_V_cg/cp_sew_lmul_vsetvl, U_V_cg/cp_sew_lmul_vsetvl, S_V_cg/cp_sew_lmul_vsetvl, H_V_cg/cp_sew_lmul_vsetvl |
|
vtype_fields_sz |
Sm_V_cg/cp_sew_lmul_vsetvl, U_V_cg/cp_sew_lmul_vsetvl, S_V_cg/cp_sew_lmul_vsetvl, H_V_cg/cp_sew_lmul_vsetvl |
|
vtype_vsew_op |
Sm_V_cg/cp_sew_lmul_vset_i_vli, U_V_cg/cp_sew_lmul_vset_i_vli, S_V_cg/cp_sew_lmul_vset_i_vli, H_V_cg/cp_sew_lmul_vset_i_vli, Vf16_vfadd_vf_cg/cr_vl_lmul_sew16 |
|
vtype_lmul_val |
Implementations must support LMUL integer values of 1, 2, 4, and 8. |
Vf16_vfadd_vf_cg/cr_vl_lmul_sew16, Sm_V_cg/cp_sew_lmul_vset_i_vli, U_V_cg/cp_sew_lmul_vset_i_vli, S_V_cg/cp_sew_lmul_vset_i_vli, H_V_cg/cp_sew_lmul_vset_i_vli |
vtype_lmul_fval |
Vf16_vfadd_vf_cg/cr_vl_lmul_sew16, Sm_V_cg/cp_sew_lmul_vset_i_vli, U_V_cg/cp_sew_lmul_vset_i_vli, S_V_cg/cp_sew_lmul_vset_i_vli, H_V_cg/cp_sew_lmul_vset_i_vli |
|
vtype_sew_val |
Sm_V_cg/cp_sew_lmul_vset_i_vli, U_V_cg/cp_sew_lmul_vset_i_vli, S_V_cg/cp_sew_lmul_vset_i_vli, H_V_cg/cp_sew_lmul_vset_i_vli |
|
vtype_lmul_fval_rsv |
Sm_V_cg/cp_vtype_vill_set_vl_0, U_V_cg/cp_vtype_vill_set_vl_0, S_V_cg/cp_vtype_vill_set_vl_0, H_V_cg/cp_vtype_vill_set_vl_0 |
|
lmul |
LMUL is set by the signed |
Vf16_vfadd_vf_cg/cr_vl_lmul_sew16 |
vlmax |
Vx16_vrgather_vv_cg/cp_custom_vindexCorners_index_ge_vlmax, Vx16_vrgather_vv_cg/cp_custom_vindexCorners_index_gt_vl_lt_vlmax |
|
vreg_offgroup_lmul2_rsv |
Out-of-Scope: reserved behavior that depends on prior CSR state is unspecified and outside Ssstrict’s encoding-only methodology |
|
vreg_offgroup_lmul4_rsv |
Out-of-Scope: reserved behavior that depends on prior CSR state is unspecified and outside Ssstrict’s encoding-only methodology |
|
vreg_offgroup_lmul8_rsv |
Out-of-Scope: reserved behavior that depends on prior CSR state is unspecified and outside Ssstrict’s encoding-only methodology |
|
vreg_mask_lmul_indp |
Mask registers are always contained in a single vector register, regardless of LMUL. |
Vls16_vlm_v_cg/cp_custom_maskLS_emul_ge_16, Vx16_vmadc_vi_cg/cp_custom_vmask_write_lmulge1 |
vtype_vta_vma_op |
Vf16_vfadd_vf_cg/cr_vtype_agnostic |
|
vtype_vta_vma_val |
Vf16_vfadd_vf_cg/cr_vtype_agnostic |
|
vreg_mask_tail_agn |
Vx8_vmor_mm_cg/cr_vtype_agnostic_nomask |
|
vreg_mask_op |
Vf16_vfadd_vf_cg/cp_masking_edges |
|
vreg_agnostic_op |
Vf16_vfadd_vf_cg/cp_masking_edges |
|
vreg_mask_tail_op |
Vx16_vmseq_vv_cg/cr_vtype_agnostic |
|
vtype_vill_op |
ExceptionsVx_vsaddu_vv_cg/cp_vill |
|
vl_acc |
Sm_V_cg/cp_vsetvl_i_rd_nx0_rs1_x0, U_V_cg/cp_vsetvl_i_rd_nx0_rs1_x0, S_V_cg/cp_vsetvl_i_rd_nx0_rs1_x0, H_V_cg/cp_vsetvl_i_rd_nx0_rs1_x0, Vls16_vle16ff_v_cg/cp_custom_ffLS_update_vl |
|
vl_op |
Vf16_vfadd_vf_cg/cr_vl_lmul_sew16, Vf16_vfadd_vf_cg/cp_vl_0 |
|
vlenb_acc_op |
Sm_V_cg/cp_vcsrrswc, U_V_cg/cp_vcsrrswc, S_V_cg/cp_vcsrrswc, H_V_cg/cp_vcsrrswc |
|
vstart_acc_sz |
Sm_V_cg/cp_vcsrs_walking1s, U_V_cg/cp_vcsrs_walking1s, S_V_cg/cp_vcsrs_walking1s, H_V_cg/cp_vcsrs_walking1s, Sm_V_cg/cp_vstart_out_of_bounds, U_V_cg/cp_vstart_out_of_bounds, S_V_cg/cp_vstart_out_of_bounds, H_V_cg/cp_vstart_out_of_bounds |
|
vstart_op |
Vx16_vcpop_m_cg/cp_custom_gprWriting_vstart_eq_vl, ExceptionsVls_vle8_v_cg/cp_vstart |
|
vstart_update |
||
vstart_unmodified |
|
|
vstart_sz_writable |
Sm_V_cg/cp_vstart_out_of_bounds, U_V_cg/cp_vstart_out_of_bounds, S_V_cg/cp_vstart_out_of_bounds, H_V_cg/cp_vstart_out_of_bounds |
|
vstart_val_rsv |
ExceptionsVx_vsaddu_vv_cg/cp_vstart_gt_vl |
|
vstart_vtype_dep |
Untestable: implementations are permitted, not required, to raise this exception, so no behavior can be asserted |
|
vxrm_val_sz_acc |
Sm_V_cg/cp_vcsrs_walking1s, U_V_cg/cp_vcsrs_walking1s, S_V_cg/cp_vcsrs_walking1s, H_V_cg/cp_vcsrs_walking1s, Vx16_vaadd_vv_cg/cr_vxrm_vs2_vs1_edges, Vx16_vaadd_vx_cg/cr_vxrm_vs2_rs1_edges, Vx16_vssra_vi_cg/cr_vxrm_vs2_imm_edges |
|
vcsr_vxrm_op |
Sm_V_cg/cp_vcsrrswc, U_V_cg/cp_vcsrrswc, S_V_cg/cp_vcsrrswc, H_V_cg/cp_vcsrrswc |
|
vxrm_op |
Vx16_vaadd_vx_cg/cr_vxrm_vs2_rs1_edges, Vx16_vssra_vi_cg/cr_vxrm_vs2_imm_edges, Vx16_vaadd_vv_cg/cr_vxrm_vs2_vs1_edges |
|
vxsat_op_acc_sz |
Sm_V_cg/cp_vcsrs_walking1s, U_V_cg/cp_vcsrs_walking1s, S_V_cg/cp_vcsrs_walking1s, H_V_cg/cp_vcsrs_walking1s, Vx16_vsaddu_vv_cg/cp_csr_vxsat |
|
vcsr_vxsat_op |
Sm_V_cg/cp_vcsrrswc, U_V_cg/cp_vcsrrswc, S_V_cg/cp_vcsrrswc, H_V_cg/cp_vcsrrswc |
|
vcsr_vxrm_vxsat_acc |
Sm_V_cg/cp_vcsrrswc, U_V_cg/cp_vcsrrswc, S_V_cg/cp_vcsrrswc, H_V_cg/cp_vcsrrswc |
|
vreg_lmul1_op |
Vx16_vadd_vv_cg/cp_vd |
|
vreg_flmul_op |
Vf16_vfadd_vf_cg/cr_vl_lmul_sew16 |
|
vreg_lmulge2_op |
Vx16_vsext_vf2_cg/cp_custom_vext2_overlapping_vd_vs2_lmul4, Vx16_vsext_vf2_cg/cp_custom_vext2_overlapping_vd_vs2_lmul8, Vx64_vsext_vf8_cg/cp_custom_vext8_overlapping_vd_vs2_lmul8, Vx16_vwaddu_vv_cg/cp_custom_vdOverlapTopVs1_vd_vs1_lmul4, Vx16_vwaddu_vv_cg/cp_custom_vdOverlapTopVs2_vd_vs2_lmul4, Vx16_vwadd_vv_cg/cp_custom_allVdOverlapTopVs2_vd_vs2_lmul2, Vf16_vfadd_vf_cg/cr_vl_lmul_sew16 |
|
vreg_mask_vtype_indp |
A vector mask occupies only one vector register regardless of SEW and LMUL. |
Vls16_vlm_v_cg/cp_custom_maskLS_emul_ge_16, Vx16_vmadc_vi_cg/cp_custom_vmask_write_lmulge1 |
vreg_mask_sz |
Vf16_vfadd_vf_cg/cp_masking_edges |
|
vreg_scalar_lmul_indp |
Any vector register can be used to hold a scalar regardless of the current LMUL setting. |
Vf16_vfmv_s_f_cg/cp_custom_fmv_sf_vd_all_lmul_regs, Vf16_vfmv_f_s_cg/cp_custom_fmv_fs_vs2_all_lmul_regs, Vx16_vmv_s_x_cg/cp_custom_voffgroup_vd_lmul2, Vx16_vredand_vs_cg/cp_custom_voffgroup_vs1_lmul2, Vx16_vmv_x_s_cg/cp_custom_voffgroup_vs2_lmul2, Vx16_vmv_s_x_cg/cp_custom_voffgroup_vd_lmul4, Vx16_vmv_s_x_cg/cp_custom_voffgroup_vd_lmul8, Vx16_vwredsum_vs_cg/cp_custom_vreductionw_vd_vs1_emul_16 |
eew_emul |
Vx16_vaadd_vv_cg/cp_vs2_edges, Vx16_vwadd_vv_cg/cp_custom_allVdOverlapTopVs2_vd_vs2_lmul2, Vx16_vwadd_wv_cg/cr_vl_lmul_lmul4max_sew16, Vx16_vsext_vf2_cg/cp_custom_vext2_overlapping_vd_vs2_lmul4 |
|
eew_emul_sew_lmul_dep |
Vx16_vwadd_wv_cg/cr_vl_lmul_lmul4max_sew16, Vx16_vsext_vf2_cg/cp_custom_vext2_overlapping_vd_vs2_lmul4 |
|
vnarrowing_eew_emul |
Vx16_vnclip_wi_cg/cp_custom_vdOverlapBtmVs2_vd_vs2_lmul2, Vx16_vnclip_wi_cg/cp_custom_allVdOverlapBtmVs2_vd_vs2_lmul2, Vx16_vnclip_wi_cg/cr_vl_lmul_lmul4max_sew16 |
|
emul_offgroup_rsv |
Out-of-Scope: this behavior is unspecified even under Ssstrict, which does not cover CSR-state-dependent reserved conditions |
|
vreg_source_eew_rsv |
SsstrictV_vwadd_wv_cg/cp_ssstrictv_widening_source_overlap |
|
vreg_overlap_legal |
Vx16_vsext_vf2_cg/cp_custom_vext2_overlapping_vd_vs2_lmul4, Vx32_vsext_vf4_cg/cp_custom_vext4_overlapping_vd_vs2_lmul4, Vx64_vsext_vf8_cg/cp_custom_vext8_overlapping_vd_vs2_lmul8, Vx16_vwaddu_vv_cg/cp_custom_vdOverlapTopVs1_vd_vs1_lmul2, Vx16_vwaddu_vv_cg/cp_custom_vdOverlapTopVs2_vd_vs2_lmul2, Vx16_vwadd_vv_cg/cp_custom_allVdOverlapTopVs1_vd_vs1_lmul2, Vx16_vwadd_vv_cg/cp_custom_allVdOverlapTopVs2_vd_vs2_lmul2, Vx16_vnclip_wi_cg/cp_custom_vdOverlapBtmVs2_vd_vs2_lmul2, Vf16_vfadd_vf_cg/cmp_vd_vs2, Vf16_vfadd_vv_cg/cmp_vd_vs1, Vf16_vfadd_vv_cg/cmp_vs1_vs2, Vf16_vfadd_vv_cg/cmp_vd_vs1_vs2, Vls16_vsoxei16_v_cg/cmp_vs3_vs2_eew_eq_sew |
|
vreg_mask_overlap |
For the purpose of determining register group overlap constraints, mask elements have EEW=1. |
SsstrictV_vwadd_wv_cg/cp_ssstrictv_masking_vd_eq_v0 |
vreg_overlap_rsv |
Any instruction encoding that violates the overlap constraints is reserved. |
SsstrictV_vwadd_wv_cg/cp_ssstrictv_widening_source_overlap |
vreg_overlap_agn |
Vx16_vnclip_wi_cg/cp_masking_edges |
|
emul_rsv |
Out-of-Scope: reserved behavior that is not covered by Ssstrict |
|
vreg_scalar_emul |
Vx16_vwredsum_vs_cg/cp_custom_vreductionw_vd_vs1_emul_16 |
|
vmask_inactive_op |
Element operations that are masked off (inactive) never generate exceptions. |
Vf16_vfrsqrt7_v_cg/cp_custom_vfp_flags_inactive_not_set, Vf16_vfadd_vf_cg/cp_masking_edges |
vmask_agn_op |
Vf16_vfrsqrt7_v_cg/cp_custom_vfp_flags_inactive_not_set, Vf16_vfadd_vf_cg/cp_masking_edges |
|
vmask_vm_enc |
Where available, masking is encoded in a single-bit vm field in the instruction (inst[25]). |
Implicit: the vm field encoding is exercised by every masked and unmasked vector instruction the suite runs |
vreg_vmask |
Vls16_vloxei16_v_cg/cp_masking_edges, Vf16_vfadd_vf_cg/cp_masking_edges |
|
vreg_vmask_rsv |
SsstrictV_vadd_vv_cg/cp_ssstrictv_masking_vd_eq_v0 |
|
vstart_vl_dep |
ExceptionsVx_vsaddu_vv_cg/cp_vstart_gt_vl |
|
vstart_vl_scalar_indp |
Vx16_vcpop_m_cg/cp_custom_gprWriting_vstart_eq_vl |
|
vector_prestart_element |
The prestart elements do not raise exceptions and do not update the destination vector register. |
ExceptionsVls_vle8_v_cg/cp_vstart |
vector_inactive_element |
Vf16_vfadd_vf_cg/cr_vtype_agnostic, Vf16_vfrsqrt7_v_cg/cp_custom_vfp_flags_inactive_not_set, Vx16_vadd_vv_cg/cp_masking_edges |
|
vector_tail_element |
Vf16_vfadd_vf_cg/cp_vl_0, Vf16_vfadd_vf_cg/cp_masking_edges |
|
vset_op |
Sm_V_cg/cp_sew_lmul_vsetvl, U_V_cg/cp_sew_lmul_vsetvl, S_V_cg/cp_sew_lmul_vsetvl, H_V_cg/cp_sew_lmul_vsetvl, Sm_V_cg/cp_sew_lmul_vset_i_vli, U_V_cg/cp_sew_lmul_vset_i_vli, S_V_cg/cp_sew_lmul_vset_i_vli, H_V_cg/cp_sew_lmul_vset_i_vli, Sm_V_cg/cp_vsetvl_i_avl_eq_vlmax, U_V_cg/cp_vsetvl_i_avl_eq_vlmax, S_V_cg/cp_vsetvl_i_avl_eq_vlmax, H_V_cg/cp_vsetvl_i_avl_eq_vlmax, Sm_V_cg/cp_vsetivli_avl_edges, U_V_cg/cp_vsetivli_avl_edges, S_V_cg/cp_vsetivli_avl_edges, H_V_cg/cp_vsetivli_avl_edges |
|
vtype_vstart_op |
Sm_V_cg/cp_sew_lmul_vset_i_vli, U_V_cg/cp_sew_lmul_vset_i_vli, S_V_cg/cp_sew_lmul_vset_i_vli, H_V_cg/cp_sew_lmul_vset_i_vli, Sm_V_cg/cp_sew_lmul_vsetvl, U_V_cg/cp_sew_lmul_vsetvl, S_V_cg/cp_sew_lmul_vsetvl, H_V_cg/cp_sew_lmul_vsetvl, Sm_V_cg/cp_vtype_vill_set_vl_0, U_V_cg/cp_vtype_vill_set_vl_0, S_V_cg/cp_vtype_vill_set_vl_0, H_V_cg/cp_vtype_vill_set_vl_0 |
|
vtype_acc |
Sm_V_cg/cp_sew_lmul_vset_i_vli, U_V_cg/cp_sew_lmul_vset_i_vli, S_V_cg/cp_sew_lmul_vset_i_vli, H_V_cg/cp_sew_lmul_vset_i_vli, Sm_V_cg/cp_sew_lmul_vsetvl, U_V_cg/cp_sew_lmul_vsetvl, S_V_cg/cp_sew_lmul_vsetvl, H_V_cg/cp_sew_lmul_vsetvl |
|
vtype_vill_val |
Vls16_vl1re16_v_cg/cp_custom_vwholeRegLS_vill, Sm_V_cg/cp_vill_vsetvl, U_V_cg/cp_vill_vsetvl, S_V_cg/cp_vill_vsetvl, H_V_cg/cp_vill_vsetvl |
|
vtype_vill_val_vill |
A |
Vls16_vl1re16_v_cg/cp_custom_vwholeRegLS_vill, Sm_V_cg/cp_vill_vsetvl, U_V_cg/cp_vill_vsetvl, S_V_cg/cp_vill_vsetvl, H_V_cg/cp_vill_vsetvl |
vtype_vill_all_bits |
Vls16_vl1re16_v_cg/cp_custom_vwholeRegLS_vill, Sm_V_cg/cp_vill_vsetvl, U_V_cg/cp_vill_vsetvl, S_V_cg/cp_vill_vsetvl, H_V_cg/cp_vill_vsetvl |
|
vsetvl_op |
Sm_V_cg/cp_vsetvl_i_rd_x0_rs1_x0, U_V_cg/cp_vsetvl_i_rd_x0_rs1_x0, S_V_cg/cp_vsetvl_i_rd_x0_rs1_x0, H_V_cg/cp_vsetvl_i_rd_x0_rs1_x0, Sm_V_cg/cp_vsetvl_i_rd_nx0_rs1_x0, U_V_cg/cp_vsetvl_i_rd_nx0_rs1_x0, S_V_cg/cp_vsetvl_i_rd_nx0_rs1_x0, H_V_cg/cp_vsetvl_i_rd_nx0_rs1_x0, Sm_V_cg/cp_vsetvl_i_avl_eq_zero, U_V_cg/cp_vsetvl_i_avl_eq_zero, S_V_cg/cp_vsetvl_i_avl_eq_zero, H_V_cg/cp_vsetvl_i_avl_eq_zero, Sm_V_cg/cp_vsetvl_i_avl_eq_vlmax, U_V_cg/cp_vsetvl_i_avl_eq_vlmax, S_V_cg/cp_vsetvl_i_avl_eq_vlmax, H_V_cg/cp_vsetvl_i_avl_eq_vlmax, Sm_V_cg/cp_vsetvl_i_avl_lt_2x_vlmax, U_V_cg/cp_vsetvl_i_avl_lt_2x_vlmax, S_V_cg/cp_vsetvl_i_avl_lt_2x_vlmax, H_V_cg/cp_vsetvl_i_avl_lt_2x_vlmax, Sm_V_cg/cp_vsetvl_i_avl_eq_2x_vlmax, U_V_cg/cp_vsetvl_i_avl_eq_2x_vlmax, S_V_cg/cp_vsetvl_i_avl_eq_2x_vlmax, H_V_cg/cp_vsetvl_i_avl_eq_2x_vlmax, Sm_V_cg/cp_vsetvl_i_avl_gt_2x_vlmax, U_V_cg/cp_vsetvl_i_avl_gt_2x_vlmax, S_V_cg/cp_vsetvl_i_avl_gt_2x_vlmax, H_V_cg/cp_vsetvl_i_avl_gt_2x_vlmax |
|
vsetvl_op_rs1_x0_rd_nx0 |
Sm_V_cg/cp_vsetvl_i_rd_nx0_rs1_x0, U_V_cg/cp_vsetvl_i_rd_nx0_rs1_x0, S_V_cg/cp_vsetvl_i_rd_nx0_rs1_x0, H_V_cg/cp_vsetvl_i_rd_nx0_rs1_x0 |
|
vsetvl_op_rs1_x0_rd_x0 |
Sm_V_cg/cp_vsetvl_i_rd_x0_rs1_x0, U_V_cg/cp_vsetvl_i_rd_x0_rs1_x0, S_V_cg/cp_vsetvl_i_rd_x0_rs1_x0, H_V_cg/cp_vsetvl_i_rd_x0_rs1_x0 |
|
vtype_vset_rsv |
Out-of-Scope: we cannot test reserved behavior that depends on prior vill state; outside Ssstrict’s encoding-only methodology |
|
vsetivli_op |
Sm_V_cg/cp_vsetivli_avl_edges, U_V_cg/cp_vsetivli_avl_edges, S_V_cg/cp_vsetivli_avl_edges, H_V_cg/cp_vsetivli_avl_edges |
|
vl_val_lead_in |
Sm_V_cg/cp_vsetvl_i_avl_eq_vlmax, U_V_cg/cp_vsetvl_i_avl_eq_vlmax, S_V_cg/cp_vsetvl_i_avl_eq_vlmax, H_V_cg/cp_vsetvl_i_avl_eq_vlmax, Sm_V_cg/cp_vsetvl_i_avl_lt_2x_vlmax, U_V_cg/cp_vsetvl_i_avl_lt_2x_vlmax, S_V_cg/cp_vsetvl_i_avl_lt_2x_vlmax, H_V_cg/cp_vsetvl_i_avl_lt_2x_vlmax, Sm_V_cg/cp_vsetvl_i_avl_gt_2x_vlmax, U_V_cg/cp_vsetvl_i_avl_gt_2x_vlmax, S_V_cg/cp_vsetvl_i_avl_gt_2x_vlmax, H_V_cg/cp_vsetvl_i_avl_gt_2x_vlmax, Sm_V_cg/cp_vsetvl_i_avl_eq_zero, U_V_cg/cp_vsetvl_i_avl_eq_zero, S_V_cg/cp_vsetvl_i_avl_eq_zero, H_V_cg/cp_vsetvl_i_avl_eq_zero |
|
vl_val_list |
Sm_V_cg/cp_vsetvl_i_avl_eq_vlmax, U_V_cg/cp_vsetvl_i_avl_eq_vlmax, S_V_cg/cp_vsetvl_i_avl_eq_vlmax, H_V_cg/cp_vsetvl_i_avl_eq_vlmax, Sm_V_cg/cp_vsetvl_i_avl_lt_2x_vlmax, U_V_cg/cp_vsetvl_i_avl_lt_2x_vlmax, S_V_cg/cp_vsetvl_i_avl_lt_2x_vlmax, H_V_cg/cp_vsetvl_i_avl_lt_2x_vlmax, Sm_V_cg/cp_vsetvl_i_avl_gt_2x_vlmax, U_V_cg/cp_vsetvl_i_avl_gt_2x_vlmax, S_V_cg/cp_vsetvl_i_avl_gt_2x_vlmax, H_V_cg/cp_vsetvl_i_avl_gt_2x_vlmax, Sm_V_cg/cp_vsetvl_i_avl_eq_zero, U_V_cg/cp_vsetvl_i_avl_eq_zero, S_V_cg/cp_vsetvl_i_avl_eq_zero, H_V_cg/cp_vsetvl_i_avl_eq_zero |
|
vector_ls_vstart |
All vector loads and stores may generate and accept a non-zero |
ExceptionsVls_vle8_v_cg/cp_vstart |
vector_ls_base_stride_regtype |
Vector load/store base registers and strides are taken from the x registers. |
Vls16_vlse16_v_cg/cp_rs1_nx0, Vls16_vlse16_v_cg/cp_rs2 |
vector_ls_base |
Vls16_vle8_v_cg/cp_rs1_nx0, Vls16_vse8_v_cg/cp_rs1_nx0 |
|
vector_ls_unit_stride_op |
Vls16_vle8_v_cg/cp_vd |
|
vector_ls_constant_stride_op |
Vls16_vlse8_v_cg/cp_rs2 |
|
vector_ls_strided_eew |
{Vls16_vlse16_v_cg,Vls32_vlse32_v_cg,Vls64_vlse64_v_cg}/cp_asm_count |
|
vector_ls_seg_unit_stride_vd_vs3 |
Vls16_vlseg2e8_v_cg/cp_vd_lte30, Vls16_vsseg2e8_v_cg/cp_vs3_lte30 |
|
vector_ls_scalar_misaligned_independence |
Untestable: independence from the scalar misaligned-access implementation cannot be observed from a self-checking test |
|
vector_ls_scalar_misaligned_dependence |
Not Tested: atomicity of misaligned vector accesses is not exercised by this suite |
|
vector_ls_seg_indexed_unordered |
Untestable: memory-ordering guarantees are not observable from a single-hart self-checking signature |
|
vector_ff_op |
Vls16_vle8ff_v_cg/cp_custom_ffLS_update_vl |
|
vector_ls_indexed_op |
Vls16_vloxei16_v_cg/cp_vs2, Vls16_vloxei16_v_cg/cp_vs2_edges_ls |
|
vector_ls_indexed_eew |
{Vls8_vloxei16_v_cg,Vls16_vloxei16_v_cg,Vls32_vloxei16_v_cg,Vls64_vloxei16_v_cg}/cp_asm_count |
|
vector_ls_ins_req |
{Vls8_vle8_v_cg,Vls16_vle16_v_cg,Vls32_vle32_v_cg,Vls64_vle64_v_cg}/cp_asm_count |
|
vector_ls_ins_rsv |
Vector load/store encodings for unsupported EEW widths are reserved. |
SsstrictV_vle8_v_cg/cp_ssstrictv_ls_eew_lt_sewmin |
vector_ls_bytewise |
The vector offset operand is treated as a vector of byte-address offsets. |
Vls16_vloxei16_v_cg/cp_vs2_edges_ls |
vector_ls_xlen_dep |
Vls16_vloxei64_v_cg/cp_custom_ls_indexed_truncated |
|
vector_ls_eew_rsv |
If the implementation does not support the EEW of the offset elements, the instruction is reserved. |
ExceptionsVls_vloxei16_v_cg/cp_exceptionsv_index_eew16 |
vector_ls_stride_ordered_op |
Vls16_vloxei16_v_cg/index_register_data_overlap |
|
vector_ls_stride_unordered_op |
Untestable: memory-ordering guarantees are not observable from a single-hart self-checking signature |
|
vector_ls_stride_unordered_precise |
ExceptionsVls_vsoxei16_v_cg/cp_exceptionsv_address_fault |
|
vector_ls_nf_op |
Vls16_vlseg2e8_v_cg/cp_asm_count |
|
vector_wholels_nf_op |
{Vls16_vl1re8_v_cg,Vls16_vl2re8_v_cg,Vls16_vl4re8_v_cg,Vls16_vl8re8_v_cg}/cp_asm_count |
|
vector_ls_eew_emul |
{Vls8_vle8_v_cg,Vls16_vle8_v_cg,Vls32_vle8_v_cg,Vls64_vle8_v_cg}/cp_asm_count, Vls16_vl2re8_v_cg/cp_vd_emul2 |
|
vector_ls_emul_rsv |
If the EMUL would be out of range (EMUL>8 or EMUL<1/8), the instruction encoding is reserved. |
ExceptionsVls_vloxei16_v_cg/cp_exceptionsv_index_eew16 |
vector_ls_emul_offgroup_rsv |
SsstrictV_vl8re8_v_cg/cp_ssstrictv_ls_wr_nreg8_vd_unaligned |
|
vector_ls_indexed_eew_emul |
Vls16_vloxei16_v_cg/cp_vd, Vls16_vloxei16_v_cg/cp_vs2_edges_ls |
|
vector_ls_mew_rsv |
SsstrictV_vle8_v_cg/cp_ssstrictv_ls_mew_reserved |
|
vector_ls_unit_stride_mask |
Vls16_vlm_v_cg/cp_custom_maskLS_emul_ge_16 |
|
vector_ls_neg_zero_stride |
Vls16_vlse8_v_cg/cp_rs2_edges_ls_e8 |
|
vector_ls_constant_stride_unordered |
Element accesses within a constant-stride instruction are unordered with respect to each other. |
Untestable: memory-ordering guarantees are not observable from a single-hart self-checking signature |
vector_ls_constant_stride_x0 |
Vls16_vlse8_v_cg/cp_rs2_edges_ls_e8 |
|
vector_ff_trigger |
Vls16_vle8ff_v_cg/cp_custom_ffLS_fault_addr |
|
vector_ls_overwrite_past_trap |
ExceptionsVls_vle8_v_cg/cp_exceptionsv_address_fault |
|
vector_ff_past_trap |
Untestable: implementation-defined spurious past-trap updates are not observable from a self-checking signature |
|
vector_ff_no_exception |
Vls16_vle8ff_v_cg/cp_custom_ffLS_update_vl |
|
vector_ff_interrupt_behavior |
||
nfields |
{Vls16_vlseg2e8_v_cg,Vls16_vlseg4e8_v_cg,Vls16_vlseg8e8_v_cg}/cp_asm_count |
|
nfields_op |
{Vls16_vlseg2e8_v_cg,Vls16_vlseg4e8_v_cg,Vls16_vlseg8e8_v_cg}/cp_asm_count |
|
emul_nfields_rsv |
SsstrictV_vlseg2e8_v_cg/cp_ssstrictv_ls_seg_vd_overflow |
|
vector_ls_seg_rsv |
SsstrictV_vlseg2e8_v_cg/cp_ssstrictv_ls_seg_vd_overflow |
|
vector_ls_seg_op |
Vls16_vlseg2e8_v_cg/cr_vl_lmul_e8_emul4max_sew16 |
|
vector_ls_seg_unordered |
Untestable: memory-ordering guarantees are not observable from a single-hart self-checking signature |
|
vector_ls_seg_vstart_dep |
ExceptionsVls_vlseg2e8_v_cg/cp_vstart |
|
vector_ls_seg_partial_access |
Untestable: implementation-defined partial-segment-access behavior is not observable from a self-checking signature |
|
vector_ls_seg_unit_stride_op |
Vls16_vlseg2e8_v_cg/cp_vd_lte30 |
|
vector_ls_seg_ff_unit_stride_op |
ExceptionsVls_vlseg2e8ff_v_cg/cp_exceptionsv_ffLS_first_elm_trap |
|
vector_ff_seg_partial_access |
In both cases, it is implementation-defined whether a subset of the segment is loaded. |
Untestable: implementation-defined partial-segment-access behavior is not observable from a self-checking signature |
vector_ls_seg_ff_overload |
Untestable: implementation-defined spurious past-trap updates are not observable from a self-checking signature |
|
vector_ls_seg_constant_stride_op |
Vls16_vlsseg2e8_v_cg/cp_rs2 |
|
vector_ls_seg_constant_stride_unordered |
Untestable: memory-ordering guarantees are not observable from a single-hart self-checking signature |
|
vector_ls_seg_indexed_op |
Vls16_vloxseg2ei8_v_cg/cp_vs2 |
|
vector_ls_seg_indexed_eew_emul_op |
Vls16_vloxseg2ei8_v_cg/cr_vl_lmul_e8_emul4max_sew16 |
|
vector_ls_seg_indexed_emul_nfields_val |
The EMUL * NFIELDS ≤ 8 constraint applies to the data vector register group. |
SsstrictV_vlseg2e8_v_cg/cp_ssstrictv_ls_seg_vd_overflow |
vector_ls_seg_indexed_vreg_rsv |
SsstrictV_vloxseg2ei8_v_cg/cp_ssstrictv_ls_seg_idx_vd_vs2_overlap |
|
vector_ls_seg_wholereg_eew |
Vls16_vl1re16_v_cg/cp_custom_vwholeRegLS_lmul, Vls16_vl1re8_v_cg/cp_asm_count, Vls16_vl1re16_v_cg/cp_asm_count, Vls16_vl1re32_v_cg/cp_asm_count, Vls16_vl1re64_v_cg/cp_asm_count, Vls16_vl2re8_v_cg/cp_asm_count, Vls16_vl2re16_v_cg/cp_asm_count, Vls16_vl2re32_v_cg/cp_asm_count, Vls16_vl2re64_v_cg/cp_asm_count, Vls16_vl4re8_v_cg/cp_asm_count, Vls16_vl4re16_v_cg/cp_asm_count, Vls16_vl4re32_v_cg/cp_asm_count, Vls16_vl4re64_v_cg/cp_asm_count, Vls16_vl8re8_v_cg/cp_asm_count, Vls16_vl8re16_v_cg/cp_asm_count, Vls16_vl8re32_v_cg/cp_asm_count, Vls16_vl8re64_v_cg/cp_asm_count |
|
vector_ls_seg_wholereg_op |
NFIELDS indicates the number of vector registers to transfer, numbered successively after the base. |
{Vls16_vl1re8_v_cg,Vls16_vl2re8_v_cg,Vls16_vl4re8_v_cg,Vls16_vl8re8_v_cg}/cp_asm_count |
vector_ls_seg_wholereg_nf_rsv |
Only NFIELDS values of 1, 2, 4, 8 are supported, with other values reserved. |
SsstrictV_vl1re8_v_cg/cp_ssstrictv_ls_wr_nf_not_pow2, SsstrictV_vs1r_v_cg/cp_ssstrictv_ls_wr_nf_not_pow2 |
vector_ls_seg_wholereg_op_cont |
Vls16_vl2re8_v_cg/cp_custom_vwholeRegLS_lmul |
|
vector_ls_seg_wholereg_evl |
Vls16_vl2re8_v_cg/cr_vl_lmul_lmul4max_sew16 |
|
vector_ls_wholereg_misaligned_exception |
MisalignV_vl1re16_v_cg/cp_misalignv_ls_wholereg_misaligned, MisalignV_vl1re32_v_cg/cp_misalignv_ls_wholereg_misaligned, MisalignV_vl1re64_v_cg/cp_misalignv_ls_wholereg_misaligned, MisalignV_vl1re8_v_cg/cp_misalignv_ls_wholereg_misaligned, MisalignV_vl2re16_v_cg/cp_misalignv_ls_wholereg_misaligned, MisalignV_vl2re32_v_cg/cp_misalignv_ls_wholereg_misaligned, MisalignV_vl2re64_v_cg/cp_misalignv_ls_wholereg_misaligned, MisalignV_vl2re8_v_cg/cp_misalignv_ls_wholereg_misaligned, MisalignV_vl4re16_v_cg/cp_misalignv_ls_wholereg_misaligned, MisalignV_vl4re32_v_cg/cp_misalignv_ls_wholereg_misaligned, MisalignV_vl4re64_v_cg/cp_misalignv_ls_wholereg_misaligned, MisalignV_vl4re8_v_cg/cp_misalignv_ls_wholereg_misaligned, MisalignV_vl8re16_v_cg/cp_misalignv_ls_wholereg_misaligned, MisalignV_vl8re32_v_cg/cp_misalignv_ls_wholereg_misaligned, MisalignV_vl8re64_v_cg/cp_misalignv_ls_wholereg_misaligned, MisalignV_vl8re8_v_cg/cp_misalignv_ls_wholereg_misaligned, MisalignV_vs1r_v_cg/cp_misalignv_ls_wholereg_misaligned, MisalignV_vs2r_v_cg/cp_misalignv_ls_wholereg_misaligned, MisalignV_vs4r_v_cg/cp_misalignv_ls_wholereg_misaligned, MisalignV_vs8r_v_cg/cp_misalignv_ls_wholereg_misaligned |
|
vector_ls_misaligned_exception |
MisalignV_vle16_v_cg/cp_misalignv_ls_element_misaligned, MisalignV_vle32_v_cg/cp_misalignv_ls_element_misaligned, MisalignV_vle64_v_cg/cp_misalignv_ls_element_misaligned, MisalignV_vle8_v_cg/cp_misalignv_ls_element_misaligned, MisalignV_vse16_v_cg/cp_misalignv_ls_element_misaligned, MisalignV_vse32_v_cg/cp_misalignv_ls_element_misaligned, MisalignV_vse64_v_cg/cp_misalignv_ls_element_misaligned, MisalignV_vse8_v_cg/cp_misalignv_ls_element_misaligned, MisalignV_vlm_v_cg/cp_misalignv_ls_element_misaligned, MisalignV_vlse16_v_cg/cp_misalignv_ls_element_misaligned, MisalignV_vlse32_v_cg/cp_misalignv_ls_element_misaligned, MisalignV_vlse64_v_cg/cp_misalignv_ls_element_misaligned, MisalignV_vlse8_v_cg/cp_misalignv_ls_element_misaligned, MisalignV_vsm_v_cg/cp_misalignv_ls_element_misaligned, MisalignV_vsse16_v_cg/cp_misalignv_ls_element_misaligned, MisalignV_vsse32_v_cg/cp_misalignv_ls_element_misaligned, MisalignV_vsse64_v_cg/cp_misalignv_ls_element_misaligned, MisalignV_vsse8_v_cg/cp_misalignv_ls_element_misaligned, MisalignV_vle16ff_v_cg/cp_misalignv_ls_element_misaligned, MisalignV_vle32ff_v_cg/cp_misalignv_ls_element_misaligned, MisalignV_vle64ff_v_cg/cp_misalignv_ls_element_misaligned, MisalignV_vle8ff_v_cg/cp_misalignv_ls_element_misaligned |
|
vector_ls_program_order |
Vector memory instructions appear to execute in program order on the local hart. |
Not Tested: RVWMO program-order guarantees would require a concurrent/multi-hart checking methodology this repo doesn’t have yet |
vector_ls_rvwmo |
Vector memory instructions follow RVWMO at the instruction level. |
Not Tested: RVWMO memory-ordering guarantees would require a concurrent/multi-hart checking methodology this repo doesn’t have yet |
vector_ls_indexed_ordered_ordered |
Untestable: memory-ordering guarantees are not observable from a single-hart self-checking signature |
|
vector_ls_indexed_ordered_rvwmo |
Not Tested: RVWMO memory-ordering guarantees would require a concurrent/multi-hart checking methodology this repo doesn’t have yet |
|
vl_control_dependency |
Not Tested: control-dependency timing is not exercised by any suite yet |
|
vmask_control_dependency |
Not Tested: control-dependency timing is not exercised by any suite yet |
|
V_fp_frm |
All vector floating-point operations use the dynamic rounding mode in the |
Vf16_vfadd_vv_cg/cp_csr_frm_v |
V_inv_frm_rsv |
Out-of-Scope: Ssstrict does not apply to CSR values |
|
vop-vv_vreg_vs2_vs1 |
Vx16_vadd_vv_cg/cr_vs2_vs1_edges |
|
vop-vx_vop-vi_vreg_vs2 |
{Vx16_vadd_vx_cg,Vx16_vadd_vi_cg}/cp_vs2 |
|
vop-vi_imm_5bit |
Vx16_vadd_vi_cg/cp_imm_edges_5bit |
|
vop-vx_xreg_rs1 |
For integer operations, the scalar can be taken from the scalar x register specified by rs1. |
Vx16_vadd_vx_cg/cp_rs1 |
vop-vx_rs1_trunc_lsb_sewbits |
If XLEN>SEW, the least-significant SEW bits of the x register are used, unless otherwise specified. |
Vx16_vadd_vx_cg/cp_rs1_edges |
vop-vx_rs1_sext_sewbits |
If XLEN<SEW, the value from the x register is sign-extended to SEW bits. |
Vx64_vadd_vx_cg/cp_rs1_edges |
vfop_freg |
For floating-point operations, the scalar can be taken from a scalar f register. |
Vf16_vfadd_vf_cg/cp_fs1 |
vfop_freg_nanbox_lsb_sewbits |
||
V_fp_eew_rsv |
ExceptionsVf16_vfadd_vv_cg/cp_vill |
|
V_masked |
Vector arithmetic instructions are masked under control of the vm field. |
Vx16_vadd_vv_cg/cp_masking_edges |
vwop_vd_eew_emul |
Vx16_vwaddu_vv_cg/cp_vd_emul2 |
|
vnop_vd_vs2_eew_emul |
Vx16_vnsrl_wv_cg/cp_vs2_emul2 |
|
vnop_vs1_eew_emul |
Vx16_vnsrl_wv_cg/cp_vs1_edges |
|
vadd_vsub_op |
Vx16_vadd_vv_cg/cp_vd, Vx16_vsub_vv_cg/cp_vd |
|
vrsub_op |
Reverse-subtract instructions are also provided for the vector-scalar forms. |
Vx16_vrsub_vx_cg/cp_vd |
vwaddu_vwadd_vwsubu_vwsub_op |
Vx16_vwaddu_vv_cg/cp_vd_emul2 |
|
vsext_vzext_op |
Vx16_vsext_vf2_cg/cp_vd |
|
vsext_vzext_vs_eew_emul |
The EEW of the source is 1/2, 1/4, or 1/8 of SEW, while EMUL of the source is (EEW/SEW)*LMUL. |
Vx16_vsext_vf2_cg/cp_vs2_edges_emulf2 |
vsext_vzext_vd_eew_emul |
The destination has EEW equal to SEW and EMUL equal to LMUL. |
Vx16_vsext_vf2_cg/cp_vd |
vsext_vzext_ill_eew_emul_rsv |
ExceptionsVx_vsext_vf2_cg/cp_vill |
|
vmadc_vmsbc_vadc_vsbc_carry_v0 |
Vx16_vadc_vvm_cg/cp_masking_edges |
|
vadc_vsbc_op |
Vx16_vadc_vvm_cg/cp_vd_nv0 |
|
vadc_vsbc_masked_write_all_elem |
Vx16_vadc_vvm_cg/cp_masking_edges |
|
vadc_vsbc_unmasked_rsv |
Encodings corresponding to the unmasked versions (vm=1) are reserved. |
{SsstrictV_vadc_vvm_cg,SsstrictV_vsbc_vvm_cg}/cp_ssstrictv_vadc_vsbc_vm1_reserved |
vmadc_vmsbc_op_masked |
Vx16_vmadc_vi_cg/cp_vd, Vx16_vmsbc_vvm_cg/cp_vd |
|
vmadc_vmsbc_op_unmasked |
Vx16_vmadc_vv_cg/cr_vs2_vs1_edges, Vx16_vmsbc_vv_cg/cr_vs2_vs1_edges |
|
vmadc_vmsbc_masked_write_all_elem |
These instructions operate on and write back all body elements, even if masked. |
Vx16_vmadc_vim_cg/cp_masking_edges |
vmadc_vmsbc_tail_agnostic |
Because these instructions produce a mask value, they always operate with a tail-agnostic policy. |
Vx16_vmadc_vim_cg/cr_vtype_agnostic |
vmsbc_borrow_neg |
For VMSBC, the borrow is defined to be 1 iff the difference, prior to truncation, is negative. |
Vx16_vmsbc_vvm_cg/cp_vs2_edges |
vadc_vsbc_vd_v0_rsv |
For VADC and VSBC, the instruction encoding is reserved if the destination vector register is v0. |
SsstrictV_vadc_vim_cg/cp_ssstrictv_masking_vd_eq_v0 |
vand_vor_vxor_op |
Vx16_vand_vv_cg/cp_vd |
|
vsll_vsrl_vsra_op |
Vx16_vsll_vv_cg/cp_vd |
|
vsll_vsrl_vsra_shamt |
Only the low lg2(SEW) bits of the shift-amount value are used to control the shift amount. |
Vx16_vsll_vv_cg/cp_custom_vshift_upperbits_vs1_ones, Vx16_vsll_vx_cg/cp_custom_vshift_upperbits_rs1_ones |
vnsrl_vnsra_op |
{Vx16_vnsrl_wv_cg,Vx16_vnsra_wv_cg}/cp_custom_vshiftn_upperbits_vs1_ones |
|
vnsrl_vnsra_shamt |
Vx16_vnsrl_wv_cg/cp_custom_vshiftn_upperbits_vs1_ones |
|
vmseq_vmsne_vmsltu_vmslt_vmsleu_vmsle_vmsgtu_vmsgt_op |
Vx16_vmseq_vv_cg/cp_vd |
|
vmseq_vmsne_vmsltu_vmslt_vmsleu_vmsle_vmsgtu_vmsgt_vd_v0_legal |
The destination mask vector register may be the same as the source vector mask register (v0). |
Vx16_vmseq_vv_cg/cp_custom_vmask_write_v0_masked |
vmseq_vmsne_vmsltu_vmslt_vmsleu_vmsle_vmsgtu_vmsgt_maskundisturbed |
Vx16_vmseq_vv_cg/cp_custom_vmask_write_v0_masked |
|
vmseq_vmsne_vmsltu_vmslt_vmsleu_vmsle_vmsgtu_vmsgt_tail_agnostic |
Compares write mask registers, and so always operate under a tail-agnostic policy. |
Vx16_vmseq_vv_cg/cr_vtype_agnostic |
vminu_vmin_vmaxu_vmax_op |
Signed and unsigned integer minimum and maximum instructions are supported. |
Vx16_vmin_vv_cg/cp_vd |
vmul_vmulh_vmulhu_vmulhsu_op |
Vx16_vmul_vv_cg/cp_vd |
|
vdivu_vdiv_vremu_vrem_op |
Vx16_vdiv_vv_cg/cp_vd |
|
vwmul_vwmulu_vwmulsu_op |
Vx16_vwmul_vv_cg/cp_vd_emul2 |
|
vmacc_vnmsac_vmadd_vnmsub_op |
Vx16_vmacc_vv_cg/cp_vd, Vx16_vnmsac_vv_cg/cp_vd, Vx16_vmadd_vv_cg/cp_vd, Vx16_vnmsub_vv_cg/cp_vd |
|
vmacc_vnmsac_vmadd_vnmsub_op_lowhalf |
The low half of the product is added or subtracted from the third operand. |
Vx16_vmacc_vv_cg/cr_vs2_vs1_edges, Vx16_vnmsac_vv_cg/cr_vs2_vs1_edges, Vx16_vmadd_vv_cg/cr_vs2_vs1_edges, Vx16_vnmsub_vv_cg/cr_vs2_vs1_edges |
vwmaccu_vwmacc_vwmaccsu_vwmaccus_op |
Vx16_vwmaccu_vv_cg/cp_vd_emul2 |
|
vmerge_op |
The vector integer merge instructions combine two source operands based on a mask. |
Vx16_vmerge_vvm_cg/cp_vd_nv0 |
vmerge_op_mask |
Vx16_vmerge_vvm_cg/cp_masking_edges, Vx16_vmerge_vvm_cg/cr_vs2_vs1_edges |
|
vmerge_all_elem |
Vx16_vmerge_vvm_cg/cp_masking_edges |
|
vmv_op |
{Vx16_vmv_v_v_cg,Vx16_vmv_v_x_cg,Vx16_vmv_v_i_cg}/cp_vd |
|
vmv_vs2_nv0_rsv |
SsstrictV_vmv_v_v_cg/cp_ssstrictv_vmv_vs2_not_v0_reserved, SsstrictV_vmv_v_x_cg/cp_ssstrictv_vmv_vs2_not_v0_reserved, SsstrictV_vmv_v_i_cg/cp_ssstrictv_vmv_vs2_not_v0_reserved |
|
vsaddu_vsadd_vssubu_vssub_op |
Saturating forms of integer add and subtract are provided, for both signed and unsigned integers. |
Vx16_vsaddu_vv_cg/cr_vs2_vs1_edges, Vx16_vsadd_vv_cg/cr_vs2_vs1_edges, Vx16_vssubu_vv_cg/cr_vs2_vs1_edges, Vx16_vssub_vv_cg/cr_vs2_vs1_edges |
vsaddu_vsadd_vssubu_vssub_op_overflow_vxsat_op_vsaddsub |
Vx16_vsaddu_vv_cg/cp_csr_vxsat, Vx16_vsadd_vv_cg/cp_csr_vxsat, Vx16_vssubu_vv_cg/cp_csr_vxsat, Vx16_vssub_vv_cg/cp_csr_vxsat |
|
vaaddu_vaadd_vasubu_vasub_op |
Vx16_vaadd_vv_cg/cr_vxrm_vs2_vs1_edges, Vx16_vasubu_vv_cg/cr_vxrm_vs2_vs1_edges, Vx16_vasub_vv_cg/cr_vxrm_vs2_vs1_edges |
|
vasub_vasubu_op_overflow |
For VASUB and VASUBU, overflow is ignored and the result wraps around. |
Vx16_vasub_vv_cg/cr_vxrm_vs2_vs1_edges, Vx16_vasubu_vv_cg/cr_vxrm_vs2_vs1_edges |
vsmul_op |
Vx16_vsmul_vv_cg/cp_csr_vxrm |
|
vxsat_op_vsmul |
Vx16_vsmul_vv_cg/cp_csr_vxsat |
|
vssrl_vssra_op |
Vx16_vssrl_vv_cg/cp_csr_vxrm |
|
vssrl_vssra_shamt |
Only the low lg2(SEW) bits of the shift-amount value are used to control the shift amount. |
Vx16_vssrl_vv_cg/cp_custom_vshift_upperbits_vs1_ones |
vnclipu_vnclip_op |
Vx16_vnclipu_wv_cg/cp_vd |
|
vnclipu_vnclip_shamt |
Vx16_vnclipu_wv_cg/cp_custom_vshiftn_upperbits_vs1_ones |
|
vnclipu_overflow |
Vx16_vnclipu_wv_cg/cp_vs2_edges_emul2 |
|
vnclip_overflow |
Vx16_vnclip_wv_cg/cp_vs2_edges_emul2 |
|
vxsat_op_vnclip_u |
If any destination element is saturated, the least-significant bit is set in the |
|
V_fp_eew_ieee_nsupported_rsv |
ExceptionsVf16_vfmv_f_s_cg/cp_vill |
|
mstatus_fs_off_V_fp_ill |
ExceptionsVf16_vfadd_vv_cg/cp_mstatus_fs_off |
|
mstatus_fs_dirty_V_fp |
Sm_VF_cg/cp_vectorfp_mstatus_fs_state_affecting_register, U_VF_cg/cp_vectorfp_mstatus_fs_state_affecting_register, S_VF_cg/cp_vectorfp_sstatus_fs_state_affecting_register, H_VF_cg/cp_vectorfp_vsstatus_fs_state_affecting_register |
|
vsstatus_mstatus_fs_off_hypervisor_V_fp_ill |
||
vsstatus_mstatus_fs_dirty_hypervisor_V_fp |
||
fflags_op_V_fp |
Vf16_vfadd_vv_cg/cp_csr_fflags_vdoun_set, Vf16_vfrsqrt7_v_cg/cp_custom_vfp_flags_inactive_not_set |
|
vfadd_vfsub_vfrsub_op |
Vf16_vfadd_vv_cg/cp_vd |
|
vfwadd_op |
Vf16_vfwadd_vv_cg/cp_vd_emul2 |
|
vfmul_vfdiv_vfrdiv_op |
Vf16_vfmul_vv_cg/cp_vd, Vf16_vfdiv_vv_cg/cp_vd |
|
vfwmul_op |
Vf16_vfwmul_vv_cg/cp_vd_emul2 |
|
vfmacc_vfnmacc_vfmsac_vfnmsac_vfmadd_vfnmadd_vfmsub_vfnmsub_op |
Vf16_vfmacc_vv_cg/cp_vd, Vf16_vfmadd_vv_cg/cp_vd |
|
vfwmacc_vfwnmacc_vfwmsac_vfwnmsac_op |
Vf16_vfwmacc_vv_cg/cp_vd_emul2 |
|
vfsqrt_op |
The VFSQRT.V instruction is a unary vector-vector instruction. |
Vf16_vfsqrt_v_cg/cp_vd |
vfrsqrt7_op |
This is a unary vector-vector instruction that returns an estimate of 1/sqrt(x) accurate to 7 bits. |
Vf16_vfrsqrt7_v_cg/cp_custom_FpRecSqrtEst_edges |
vfrsqrt7_op_unex |
Vf16_vfrsqrt7_v_cg/cp_custom_FpRecSqrtEst_edges |
|
vfrsqrt7_op_precise |
Vf16_vfrsqrt7_v_cg/cp_custom_FpRecSqrtEst_edges |
|
vfrec7_op |
This is a unary vector-vector instruction that returns an estimate of 1/x accurate to 7 bits. |
Vf16_vfrec7_v_cg/cp_custom_FpRecipEst_edges |
vfrec7_op_unex |
Vf16_vfrec7_v_cg/cp_custom_FpRecipEst_edges |
|
vfrec7_op_precise |
Vf16_vfrec7_v_cg/cp_custom_FpRecipEst_edges |
|
vfrec7_op_subnorm |
Vf16_vfrec7_v_cg/cp_custom_FpRecipEst_edges |
|
vfrec7_op_output |
Vf16_vfrec7_v_cg/cp_custom_FpRecipEst_edges |
|
vfmin_vfmax_op |
Vf16_vfmax_vv_cg/cp_vd |
|
vfsgnj_vfsgnjn_vfsgnjx_op |
Vf16_vfsgnj_vv_cg/cp_vd |
|
vmfeq_vmfne_vmflt_vmfle_vmfgt_vmfge_op |
Vf16_vmfeq_vv_cg/cp_vd |
|
vmfeq_vmfne_vmflt_vmfle_vmfgt_vmfge_vd_single_vreg |
{Vf32_vmfeq_vv_cg, Vf32_vmflt_vv_cg, Vf32_vmfle_vv_cg, Vf32_vmfne_vv_cg}/cr_vl_lmul_sew32 |
|
vmfeq_vmfne_vmflt_vmfle_vmfgt_vmfge_vd_eq_v0 |
The destination mask vector register may be the same as the source vector mask register (v0). |
SsstrictV_vmfeq_vv_cg/cp_ssstrictv_masking_vd_eq_v0 |
vmfeq_vmfne_vmflt_vmfle_vmfgt_vmfge_tail_agnostic |
Compares write mask registers, and so always operate under a tail-agnostic policy. |
Vf16_vmfeq_vv_cg/cr_vtype_agnostic |
vmfeq_vmfne_snan_invalid |
VMFEQ and VMFNE raise the invalid operation exception only on signaling NaN inputs. |
Vf16_vmfeq_vv_cg/cp_custom_vfp_NaN_input |
vmflt_vmfle_vmfgt_vmfge_sqnan_invalid |
Vf16_vmflt_vv_cg/cp_custom_vfp_flags_nv |
|
vmfne_vdval1_nan |
VMFNE writes 1 to the destination element when either operand is NaN, |
Vf16_vmfeq_vv_cg/cp_custom_vfp_NaN_input |
vmfeq_vmflt_vmfle_vmfgt_vmfge_vdval0_nan |
whereas the other compares write 0 when either operand is NaN. |
Vf16_vmfeq_vv_cg/cp_custom_vfp_NaN_input |
vfclass_op |
Vf16_vfclass_v_cg/cp_custom_vfclass_onehot |
|
vfclass_op_result |
Vf16_vfclass_v_cg/cp_custom_vfclass_onehot |
|
vfclass_sewge16 |
Vf16_vfclass_v_cg/cp_vd |
|
vfmerge_op |
A vector-scalar floating-point merge instruction is provided, |
Vf16_vfmerge_vfm_cg/cp_masking_edges |
vfmerge_op_mask |
Vf16_vfmerge_vfm_cg/cp_masking_edges |
|
vfmerge_all_elem |
Vf16_vfmerge_vfm_cg/cp_masking_edges |
|
vfmv_op |
Vf16_vfmv_v_f_cg/cp_vd |
|
vfmv_vs2_nv0_rsv |
The instruction must have the vs2 field set to v0, with all other values for vs2 reserved. |
SsstrictV_vfmv_v_f_cg/cp_ssstrictv_vfmv_vs2_not_v0_reserved |
vfcvt_op |
Vf16_vfcvt_x_f_v_cg/cp_vd |
|
vfcvt_op_exceptions |
Vf16_vfcvt_x_f_v_cg/cp_custom_vfp_flags_nv_nx |
|
vfcvt_op_frm |
Vf16_vfcvt_x_f_v_cg/cp_csr_frm_v |
|
vfwcvt_op |
Vf16_vfwcvt_x_f_v_cg/cp_vd_emul2 |
|
vfwcvt_vreg_constr |
Vf16_vfwadd_vv_cg/cp_custom_allVdOverlapTopVs2_vd_vs2_lmul1 |
|
vfncvt_op |
Vf16_vfncvt_x_f_w_cg/cp_vd |
|
vfncvt_vreg_constr |
SsstrictV_vfncvt_x_f_w_cg/cp_ssstrictv_vnarrow_overlapping_vd_vs2 |
|
vreduction_scalar_def |
Vx16_vredsum_vs_cg/cp_custom_voffgroup_vs1_lmul2, Vx16_vredsum_vs_cg/cp_custom_element0Masked |
|
vreduction_scalar_disregard_lmul |
Vx16_vredsum_vs_cg/cp_custom_voffgroup_vs1_lmul2 |
|
vreduction_scalar_disregard_maskval |
Vx16_vredsum_vs_cg/cp_custom_element0Masked |
|
vreduction_vd_overlap_vs |
The destination vector register can overlap the source operands, including the mask register. |
Vx16_vredsum_vs_cg/cmp_vd_vs2 |
vreduction_tail_policy |
Vx16_vredsum_vs_cg/cr_vtype_agnostic |
|
vreduction_vl_0 |
If |
Vx16_vredsum_vs_cg/cp_vl_0 |
vreduction_trap |
Traps on vector reduction instructions are always reported with a |
|
vreduction_vstart_n0_ill |
Vector reduction operations raise an illegal-instruction exception if |
ExceptionsVx_vredsum_vs_cg/cp_vstart, ExceptionsVx_vwredsum_vs_cg/cp_vstart, ExceptionsVf32_vfredosum_vs_cg/cp_vstart, ExceptionsVf32_vfwredosum_vs_cg/cp_vstart |
vredsum_vredmaxu_vredmax_vredminu_vredmin_vredand_vredor_vredxor_op |
All operands and results of single-width reduction instructions have the same SEW width. |
Vx8_vredsum_vs_cg/cp_vd, Vx16_vredsum_vs_cg/cp_vd, Vx32_vredsum_vs_cg/cp_vd, Vx64_vredsum_vs_cg/cp_vd, Vx8_vredmaxu_vs_cg/cp_vd, Vx16_vredmaxu_vs_cg/cp_vd, Vx32_vredmaxu_vs_cg/cp_vd, Vx64_vredmaxu_vs_cg/cp_vd, Vx8_vredmax_vs_cg/cp_vd, Vx16_vredmax_vs_cg/cp_vd, Vx32_vredmax_vs_cg/cp_vd, Vx64_vredmax_vs_cg/cp_vd, Vx8_vredminu_vs_cg/cp_vd, Vx16_vredminu_vs_cg/cp_vd, Vx32_vredminu_vs_cg/cp_vd, Vx64_vredminu_vs_cg/cp_vd, Vx8_vredmin_vs_cg/cp_vd, Vx16_vredmin_vs_cg/cp_vd, Vx32_vredmin_vs_cg/cp_vd, Vx64_vredmin_vs_cg/cp_vd, Vx8_vredand_vs_cg/cp_vd, Vx16_vredand_vs_cg/cp_vd, Vx32_vredand_vs_cg/cp_vd, Vx64_vredand_vs_cg/cp_vd, Vx8_vredor_vs_cg/cp_vd, Vx16_vredor_vs_cg/cp_vd, Vx32_vredor_vs_cg/cp_vd, Vx64_vredor_vs_cg/cp_vd, Vx8_vredxor_vs_cg/cp_vd, Vx16_vredxor_vs_cg/cp_vd, Vx32_vredxor_vs_cg/cp_vd, Vx64_vredxor_vs_cg/cp_vd |
vredsum_vredmaxu_vredmax_vredminu_vredmin_vredand_vredor_vredxor_overflow |
Vx8_vredsum_vs_cg/cr_vs2_vs1_edges, Vx16_vredsum_vs_cg/cr_vs2_vs1_edges, Vx32_vredsum_vs_cg/cr_vs2_vs1_edges, Vx64_vredsum_vs_cg/cr_vs2_vs1_edges, Vx8_vredmaxu_vs_cg/cr_vs2_vs1_edges, Vx16_vredmaxu_vs_cg/cr_vs2_vs1_edges, Vx32_vredmaxu_vs_cg/cr_vs2_vs1_edges, Vx64_vredmaxu_vs_cg/cr_vs2_vs1_edges, Vx8_vredmax_vs_cg/cr_vs2_vs1_edges, Vx16_vredmax_vs_cg/cr_vs2_vs1_edges, Vx32_vredmax_vs_cg/cr_vs2_vs1_edges, Vx64_vredmax_vs_cg/cr_vs2_vs1_edges, Vx8_vredminu_vs_cg/cr_vs2_vs1_edges, Vx16_vredminu_vs_cg/cr_vs2_vs1_edges, Vx32_vredminu_vs_cg/cr_vs2_vs1_edges, Vx64_vredminu_vs_cg/cr_vs2_vs1_edges, Vx8_vredmin_vs_cg/cr_vs2_vs1_edges, Vx16_vredmin_vs_cg/cr_vs2_vs1_edges, Vx32_vredmin_vs_cg/cr_vs2_vs1_edges, Vx64_vredmin_vs_cg/cr_vs2_vs1_edges, Vx8_vredand_vs_cg/cr_vs2_vs1_edges, Vx16_vredand_vs_cg/cr_vs2_vs1_edges, Vx32_vredand_vs_cg/cr_vs2_vs1_edges, Vx64_vredand_vs_cg/cr_vs2_vs1_edges, Vx8_vredor_vs_cg/cr_vs2_vs1_edges, Vx16_vredor_vs_cg/cr_vs2_vs1_edges, Vx32_vredor_vs_cg/cr_vs2_vs1_edges, Vx64_vredor_vs_cg/cr_vs2_vs1_edges, Vx8_vredxor_vs_cg/cr_vs2_vs1_edges, Vx16_vredxor_vs_cg/cr_vs2_vs1_edges, Vx32_vredxor_vs_cg/cr_vs2_vs1_edges, Vx64_vredxor_vs_cg/cr_vs2_vs1_edges |
|
vwredsumu_op |
Vx8_vwredsumu_vs_cg/cr_vs2_vs1_edges_wred, Vx16_vwredsumu_vs_cg/cr_vs2_vs1_edges_wred, Vx32_vwredsumu_vs_cg/cr_vs2_vs1_edges_wred |
|
vwredsumu_vwredsum_op_overflow |
For both VWREDSUMU.VS and VWREDSUM.VS, overflows wrap around. |
Vx8_vwredsumu_vs_cg/cr_vs2_vs1_edges_wred, Vx16_vwredsumu_vs_cg/cr_vs2_vs1_edges_wred, Vx32_vwredsumu_vs_cg/cr_vs2_vs1_edges_wred, Vx8_vwredsum_vs_cg/cr_vs2_vs1_edges_wred, Vx16_vwredsum_vs_cg/cr_vs2_vs1_edges_wred, Vx32_vwredsum_vs_cg/cr_vs2_vs1_edges_wred |
vwredsum_op |
The VWREDSUM.VS instruction sign-extends the SEW-wide vector elements before summing them. |
Vx8_vwredsum_vs_cg/cr_vs2_vs1_edges_wred, Vx16_vwredsum_vs_cg/cr_vs2_vs1_edges_wred, Vx32_vwredsum_vs_cg/cr_vs2_vs1_edges_wred |
vfredosum_op |
Vf16_vfredosum_vs_cg/cp_custom_vfredosum_ordered_sum |
|
vfredosum_op_exceptions |
Vf16_vfredosum_vs_cg/cp_custom_vfp_flags_nv_nx |
|
vfredosum_maskoff |
Vf16_vfredosum_vs_cg/cp_masking_edges |
|
vfredusum_op |
Vf16_vfredusum_vs_cg/cp_vd |
|
vfredusum_additive_impl |
The additive identity is +0.0 when rounding down (towards -∞) or -0.0 for all other rounding modes. |
Implicit: the additive-identity sign is whatever the reference model produces and is checked by the ordinary signature comparison, just not isolated by a dedicated coverpoint |
vfredusum_redtree |
The reduction tree structure must be deterministic for a given value in |
Untestable: reduction-tree determinism across runs is not observable from a single self-checking execution |
vfredmin_vfredmax_op |
Vf16_vfredmin_vs_cg/cp_vd |
|
vfwredosum_vfwredusum_op |
Vf16_vfwredosum_vs_cg/cp_vd_emul2, Vf16_vfwredusum_vs_cg/cp_vd_emul2 |
|
vfwredosum_vfwredusum_op_reduction |
Vf16_vfwredosum_vs_cg/cp_vd_emul2, Vf16_vfwredusum_vs_cg/cp_vd_emul2 |
|
vmask_maskreg_def |
Vx16_vmand_mm_cg/cp_vd |
|
vmask_vd_overlap_vs |
The destination vector register may be the same as either source vector register. |
Vx16_vmand_mm_cg/cmp_vd_vs1 |
vmask_vstart |
ExceptionsVx_vmand_mm_cg/cp_vstart |
|
vmasklogical_unmasked |
Vx16_vmand_mm_cg/cr_vtype_agnostic_nomask |
|
vmasklogical_masked_rsv |
so there are no inactive elements, and the encodings with vm=0 are reserved. |
SsstrictV_vmand_mm_cg/cp_ssstrictv_mask_logical_vm0_reserved, SsstrictV_vmnand_mm_cg/cp_ssstrictv_mask_logical_vm0_reserved, SsstrictV_vmor_mm_cg/cp_ssstrictv_mask_logical_vm0_reserved, SsstrictV_vmxor_mm_cg/cp_ssstrictv_mask_logical_vm0_reserved |
vmasklogical_tail_agnostic |
Mask elements past |
Vx16_vmand_mm_cg/cr_vtype_agnostic_nomask |
vmand_vmnand_vmandn_vmxor_vmor_vmnor_vmorn_vmxnor_op |
Vx16_vmand_mm_cg/cr_vs2_vs1_edges_mm, Vx16_vmnand_mm_cg/cr_vs2_vs1_edges_mm, Vx16_vmandn_mm_cg/cr_vs2_vs1_edges_mm, Vx16_vmxor_mm_cg/cr_vs2_vs1_edges_mm, Vx16_vmor_mm_cg/cr_vs2_vs1_edges_mm, Vx16_vmnor_mm_cg/cr_vs2_vs1_edges_mm, Vx16_vmorn_mm_cg/cr_vs2_vs1_edges_mm, Vx16_vmxnor_mm_cg/cr_vs2_vs1_edges_mm |
|
vcpop_vs_single_vreg |
Vx16_vcpop_m_cg/cp_vs2_edges_eew1 |
|
vcpop_op |
Vx16_vcpop_m_cg/cp_rd |
|
vcpop_op_mask |
The operation can be performed under a mask, in which case only the masked elements are counted. |
Vx16_vcpop_m_cg/cp_masking_edges |
vcpop_vl0 |
Vx16_vcpop_m_cg/cp_vl_0 |
|
vcpop_trap |
||
vcpop_vstart_n0_ill |
The VCPOP.M instruction will raise an illegal-instruction exception if |
ExceptionsVx_vcpop_m_cg/cp_vstart_gt_vl, ExceptionsVx_vcpop_m_cg/cp_vstart |
vfirst_op |
Vx16_vfirst_m_cg/cp_rd |
|
vfirst_vl0 |
Vx16_vfirst_m_cg/cp_vl_0 |
|
vfirst_trap |
||
vfirst_vstart_n0_ill |
The VFIRST instruction will raise an illegal-instruction exception if |
ExceptionsVx_vfirst_m_cg/cp_vstart_gt_vl, ExceptionsVx_vfirst_m_cg/cp_vstart |
vmsbf_op |
Vx16_vmsbf_m_cg/cp_vd |
|
vmsbf_tail_agnostic |
The tail elements in the destination mask register are updated under a tail-agnostic policy. |
Vx16_vmsbf_m_cg/cr_vtype_agnostic |
vmsbf_trap |
||
vmsbf_vstart_n0_ill |
The VMSBF.M instruction will raise an illegal-instruction exception if |
ExceptionsVx_vmsbf_m_cg/cp_vstart_gt_vl, ExceptionsVx_vmsbf_m_cg/cp_vstart |
vmsbf_vreg_constr |
SsstrictV_vmsbf_m_cg/cp_ssstrictv_masking_vd_eq_v0 |
|
vmsif_op |
Vx16_vmsif_m_cg/cp_vd |
|
vmsif_tail_agnostic |
The tail elements in the destination mask register are updated under a tail-agnostic policy. |
Vx16_vmsif_m_cg/cr_vtype_agnostic |
vmsif_trap |
||
vmsif_vstart_n0_ill |
The VMSIF.M instruction will raise an illegal-instruction exception if |
ExceptionsVx_vmsif_m_cg/cp_vstart_gt_vl, ExceptionsVx_vmsif_m_cg/cp_vstart |
vmsif_vreg_constr |
SsstrictV_vmsif_m_cg/cp_ssstrictv_masking_vd_eq_v0 |
|
vmsof_op |
Vx16_vmsof_m_cg/cp_vd |
|
vmsof_tail_agnostic |
The tail elements in the destination mask register are updated under a tail-agnostic policy. |
Vx16_vmsof_m_cg/cr_vtype_agnostic |
vmsof_trap |
||
vmsof_vstart_n0_ill |
The VMSOF.M instruction will raise an illegal-instruction exception if |
ExceptionsVx_vmsof_m_cg/cp_vstart_gt_vl, ExceptionsVx_vmsof_m_cg/cp_vstart |
vmsof_vreg_constr |
SsstrictV_vmsof_m_cg/cp_ssstrictv_masking_vd_eq_v0 |
|
viota_op |
Vx16_viota_m_cg/cp_vd |
|
viota_op_masked |
This instruction can be masked, in which case only the enabled elements contribute to the sum. |
Vx16_viota_m_cg/cp_masking_edges |
viota_op_zext |
The result value is zero-extended to fill the destination element if SEW is wider than the result. |
Vx16_viota_m_cg/cr_vl_lmul_sew16, Vx32_viota_m_cg/cr_vl_lmul_sew32, Vx64_viota_m_cg/cr_vl_lmul_sew64 |
viota_op_overflow |
If the result value would overflow the destination SEW, the least-significant SEW bits are retained. |
Vx8_viota_m_cg/cr_vl_lmul_sew8 |
viota_trap |
||
viota_vstart_n0_ill |
An illegal-instruction exception is raised if |
ExceptionsVx_viota_m_cg/cp_vstart_gt_vl, ExceptionsVx_viota_m_cg/cp_vstart |
viota_vreg_constr |
SsstrictV_viota_m_cg/cp_exceptionsv_vd_vs2_overlap, SsstrictV_viota_m_cg/cp_ssstrictv_masking_vd_eq_v0 |
|
vid_op |
Vx16_vid_v_cg/cp_vd |
|
vid_op_mask |
The instruction can be masked. Masking does not change the index value written to active elements. |
Vx16_vid_v_cg/cp_masking_edges |
vid_op_zext |
The result value is zero-extended to fill the destination element if SEW is wider than the result. |
Vx16_vid_v_cg/cr_vl_lmul_sew16, Vx32_vid_v_cg/cr_vl_lmul_sew32, Vx64_vid_v_cg/cr_vl_lmul_sew64 |
vid_op_overflow |
If the result value would overflow the destination SEW, the least-significant SEW bits are retained. |
Vx8_vid_v_cg/cr_vl_lmul_sew8 |
vid_vs2_nv0_rsv |
The vs2 field of the instruction must be set to v0, otherwise the encoding is reserved. |
SsstrictV_vid_v_cg/cp_ssstrictv_vid_vs2_not_v0_reserved |
vmv-x-s_vmv-s-x_ignorelmul |
The instructions ignore LMUL; EMUL is computed as ceil(EEW/VLEN). |
Vx16_vmv_s_x_cg/cp_custom_voffgroup_vd_lmul2, Vx16_vmv_x_s_cg/cp_custom_voffgroup_vs2_lmul2 |
vmv-x-s_op |
Vx16_vmv_x_s_cg/cp_rd, Vx16_vmv_x_s_cg/cp_custom_gprWriting_vstart_eq_vl, Vx16_vmv_x_s_cg/cp_vl_0 |
|
vmv-s-x_op |
Vx16_vmv_s_x_cg/cp_rs1_edges |
|
vmv-s-x_vstart_ge_vl |
If |
ExceptionsVx_vmv_s_x_cg/cp_vstart_gt_vl |
vmv-s-x_vmv-x-s_masked_rsv |
The encodings corresponding to the masked versions (vm=0) of VMV.X.S and VMV.S.X are reserved. |
SsstrictV_vmv_s_x_cg/cp_ssstrictv_vmv_xs_sx_vm0_reserved |
vfmv-f-s_vfmv-s-f_ignorelmul |
The instructions ignore LMUL; EMUL is computed as ceil(EEW/VLEN). |
Vf16_vfmv_f_s_cg/cp_custom_fmv_fs_vs2_all_lmul_regs, Vf16_vfmv_s_f_cg/cp_custom_fmv_sf_vd_all_lmul_regs |
vfmv-f-s_op |
Vf16_vfmv_f_s_cg/cp_fd |
|
vfmv-s-f_op |
Vf16_vfmv_s_f_cg/cp_fs1 |
|
vfmv-s-f_vstart_ge_vl |
If |
ExceptionsVf16_vfmv_s_f_cg/cp_vstart_gt_vl |
vfmv-s-f_masked_rsv |
The encodings corresponding to the masked versions (vm=0) of VFMV.F.S and VFMV.S.F are reserved. |
SsstrictV_vfmv_s_f_cg/cp_ssstrictv_vfmv_fs_sf_vm0_reserved |
vslide_vstart_ge_vl |
ExceptionsVx_vslideup_vx_cg/cp_vstart_gt_vl, ExceptionsVx_vslidedown_vx_cg/cp_vstart_gt_vl, ExceptionsVx_vslide1up_vx_cg/cp_vstart_gt_vl, ExceptionsVx_vslide1down_vx_cg/cp_vstart_gt_vl, ExceptionsVf16_vfslide1up_vf_cg/cp_vstart_gt_vl, ExceptionsVf16_vfslide1down_vf_cg/cp_vstart_gt_vl |
|
vslide_mask |
Vx16_vslideup_vx_cg/cp_masking_edges, Vx16_vslidedown_vx_cg/cp_masking_edges, Vx16_vslide1up_vx_cg/cp_masking_edges, Vx16_vslide1down_vx_cg/cp_masking_edges, Vf16_vfslide1up_vf_cg/cp_masking_edges, Vf16_vfslide1down_vf_cg/cp_masking_edges |
|
vslideup_op |
Vx16_vslideup_vx_cg/cr_vs2_rs1_edges |
|
vslideup_vreg_constr |
SsstrictV_vslideup_vx_cg/cp_ssstrictv_vslideup_vd_vs2_overlap, SsstrictV_vslideup_vi_cg/cp_ssstrictv_vslideup_vd_vs2_overlap |
|
vslidedown_op |
Vx16_vslidedown_vx_cg/cr_vs2_rs1_edges |
|
vslidedown_op_src |
Vx16_vslidedown_vx_cg/cp_rs1_edges, Vx16_vslidedown_vx_cg/cp_custom_vindexVX_rs1_not_truncated_32, Vx16_vslidedown_vx_cg/cp_custom_vindexVX_rs1_not_truncated_64 |
|
vslide1up-vx_op |
Vx16_vslide1up_vx_cg/cr_vs2_rs1_edges |
|
vslide1up-vx_op_rem_elem |
Vx16_vslide1up_vx_cg/cr_vs2_rs1_edges |
|
vslide1up-vx_op_vl |
Vx16_vslide1up_vx_cg/cp_csr_vl_edges |
|
vslide1up-vx_vreg_constr |
SsstrictV_vslide1up_vx_cg/cp_ssstrictv_vslide1up_vd_vs2_overlap |
|
vslide1up-vf_op |
Vf16_vfslide1up_vf_cg/cr_vs2_fs1_edges_f_sew16 |
|
vslide1down-vx_op |
Vx16_vslide1down_vx_cg/cr_vs2_rs1_edges |
|
vslide1down-vx_op_vl |
Vx16_vslide1down_vx_cg/cp_csr_vl_edges |
|
vslide1down-vx_op_details |
Vx16_vslide1down_vx_cg/cp_masking_edges, Vx16_vslide1down_vx_cg/cr_vl_lmul_sew16 |
|
vslide1down-vf_op |
Vf16_vfslide1down_vf_cg/cr_vs2_fs1_edges_f_sew16 |
|
vrgather_vrgatherei16_vs2_uint |
The index values in the second vector are treated as unsigned integers. |
Vx16_vrgather_vv_cg/cp_vs1_edges, Vx16_vrgatherei16_vv_cg/cp_vs1_edges |
vrgather_vrgatherei16_vs_ignore_vl |
The source vector can be read at any index < VLMAX regardless of |
Vx16_vrgather_vv_cg/cp_custom_vindexCorners_index_gt_vl_lt_vlmax, Vx16_vrgatherei16_vv_cg/cp_custom_vindexCorners_index_gt_vl_lt_vlmax |
vrgather_vrgatherei16_vl |
The maximum number of elements to write to the destination register is given by |
Vx16_vrgather_vv_cg/cr_vl_lmul_sew16, Vx16_vrgatherei16_vv_cg/cr_vl_lmul_sew16 |
vrgather_vrgatherei16_tail |
and the remaining elements past |
Vx16_vrgather_vv_cg/cr_vtype_agnostic, Vx16_vrgatherei16_vv_cg/cr_vtype_agnostic |
vrgather_vrgatherei16_mask |
Vx16_vrgather_vv_cg/cp_masking_edges, Vx16_vrgatherei16_vv_cg/cp_masking_edges |
|
vrgather-vv_sew_lmul |
The VRGATHER.VV form uses SEW/LMUL for both the data and indices. |
Vx16_vrgather_vv_cg/cr_vl_lmul_sew16 |
vrgatherei16-vv_sew_lmul |
Vx32_vrgatherei16_vv_cg/cp_vs1_edges |
|
vrgather_vrgatherei16_id_ge_vlmax |
If an element index is out of range ( vs1[i] ≥ VLMAX ) then zero is returned for the element value. |
{Vx16_vrgather_vv_cg,Vx16_vrgatherei16_vv_cg}/cp_custom_vindexCorners_index_ge_vlmax |
vrgather-vx_vrgather-vi_op |
{Vx16_vrgather_vx_cg,Vx16_vrgather_vi_cg}/cp_vd, Vx16_vrgather_vx_cg/cp_custom_vindexVX_rs1_not_truncated_64 |
|
vrgather_vrgatherei16_vreg_constr |
{SsstrictV_vrgather_vv_cg,SsstrictV_vrgatherei16_vv_cg}/cp_ssstrictv_vrgather_vd_vs2_overlap |
|
vcompress_op |
Vx16_vcompress_vm_cg/cr_vs2_vs1_edges |
|
vcompress_enc |
Vx8_vcompress_vm_cg/cp_asm_count, Vx16_vcompress_vm_cg/cp_asm_count, Vx32_vcompress_vm_cg/cp_asm_count, Vx64_vcompress_vm_cg/cp_asm_count, SsstrictV_vcompress_vm_cg/cp_ssstrictv_vcompress_vm0_reserved |
|
vcompress_masked_rsv |
SsstrictV_vcompress_vm_cg/cp_ssstrictv_vcompress_vm0_reserved |
|
vcompress_vreg_constr |
SsstrictV_vcompress_vm_cg/cp_ssstrictv_vcompress_vd_vs2_overlap |
|
vcompress_trap |
A trap on a VCOMPRESS instruction is always reported with a |
|
vcompress_vstart_n0_ill |
Executing a VCOMPRESS instruction with a non-zero |
ExceptionsVx_vcompress_vm_cg/cp_vstart_gt_vl, ExceptionsVx_vcompress_vm_cg/cp_vstart |
vmv-nr-r_op |
Vx8_vmv1r_v_cg/cr_vl_lmul_sew8, Vx8_vmv2r_v_cg/cr_vl_lmul_sew8, Vx8_vmv4r_v_cg/cr_vl_lmul_sew8, Vx8_vmv8r_v_cg/cr_vl_lmul_sew8 |
|
vmv-nr-r_enc |
SsstrictV_vmv1r_v_cg/cp_ssstrictv_vmvnr_simm_reserved, Vx8_vmv1r_v_cg/cp_asm_count, Vx8_vmv2r_v_cg/cp_asm_count, Vx8_vmv4r_v_cg/cp_asm_count, Vx8_vmv8r_v_cg/cp_asm_count |
|
vmv-nr-r_nreg_rsv |
SsstrictV_vmv1r_v_cg/cp_ssstrictv_vmvnr_simm_reserved |
|
vmv-nr-r_vreg_constr |
SsstrictV_vmv2r_v_cg/cp_ssstrictv_vmv2r_both_unaligned |
|
vmv-nr-r_unaligned_rsv |
SsstrictV_vmv4r_v_cg/cp_ssstrictv_vmv4r_both_unaligned |
|
epc_vstart_op_V_trap |
ExceptionsVx_vsaddu_vv_cg/cp_vstart |
|
Zve_xlen |
Implicit: extension-support requirement exercised by the config simply running under that XLEN |
|
Zve32f_Zve64x_dependent_Zve32x |
Implicit: extension-composition fact exercised implicitly whenever the config runs at all |
|
Zve64f_dependent_Zve32f_Zve64x |
Implicit: extension-composition fact exercised implicitly whenever the config runs at all |
|
Zve64d_dependent_Zve64f |
The |
Implicit: extension-composition fact exercised implicitly whenever the config runs at all |
Zve_precise_traps |
Untestable: trap precision is a cross-cutting property of every exception test, not something one coverpoint can isolate |
|
Zve_eew |
Implicit: extension-support requirement exercised implicitly by which EEWs the generated suite runs at all |
|
Zve_nsupport_eew64_xlen32 |
Implicit: extension-support exclusion exercised implicitly by config-driven test generation filtering |
|
Zve64_eew64_nsupport_vmulh |
Implicit: config-driven instruction exclusion exercised implicitly by test generation filtering |
|
Zve64_eew64_nsupport_vsmul |
Implicit: config-driven instruction exclusion exercised implicitly by test generation filtering |
|
Zve32x_Zve64x_nsupport_freg |
|
Implicit: extension-support requirement exercised implicitly by config-driven test generation filtering |
Zve32x_dependent_Zicsr |
Sm_V_cg/cp_vcsrrswc, U_V_cg/cp_vcsrrswc, S_V_cg/cp_vcsrrswc, H_V_cg/cp_vcsrrswc |
|
Zve32f_Zve64f_dependent_F |
The |
Implicit: extension-composition fact exercised implicitly whenever the config runs at all |
misa_v_op |
The |
Sm_mcsr_cg/cp_misa_v |
V_precise_traps |
Untestable: trap precision is a cross-cutting property of every exception test, not something one coverpoint can isolate |
|
V_dependent_Zvl128b_Zve64d |
The V vector extension depends upon the Zvl128b and Zve64d extensions. |
Implicit: extension-composition fact exercised implicitly whenever the config runs at all |
V_supported_eew |
{Vx8_vadd_vv_cg,Vx16_vadd_vv_cg,Vx32_vadd_vv_cg,Vx64_vadd_vv_cg}/cp_asm_count |
|
V_instr_config |
The V extension supports the vector configuration instructions (sec-vector-config). |
Implicit: extension-support requirement exercised implicitly by which instructions the generated suite runs at all |
V_instr_ls_eew64_nsupported_xlen32 |
Implicit: extension-support requirement exercised implicitly by which instructions the generated suite runs at all |
|
V_instr_int |
The V extension supports all vector integer instructions (sec-vector-integer). |
Implicit: extension-support requirement exercised implicitly by which instructions the generated suite runs at all |
V_instr_fixedpt |
The V extension supports all vector fixed-point arithmetic instructions (sec-vector-fixed-point). |
Implicit: extension-support requirement exercised implicitly by which instructions the generated suite runs at all |
V_instr_red |
Implicit: extension-support requirement exercised implicitly by which instructions the generated suite runs at all |
|
V_instr_mask |
The V extension supports all vector mask instructions (sec-vector-mask). |
Implicit: extension-support requirement exercised implicitly by which instructions the generated suite runs at all |
V_instr_perm |
Implicit: extension-support requirement exercised implicitly by which instructions the generated suite runs at all |
|
V_dependent_F_D |
Implicit: the F and D dependency is satisfied by the configuration under test; the vector floating-point tests cannot run without it |
|
Zvfhmin_dependent_Zve32f |
Implicit: extension-composition fact exercised implicitly whenever the config runs at all |
|
Zvfh_instr |
Implicit: extension-support requirement exercised implicitly by which instructions the generated suite runs at all |
|
Zvfh_instr_cvt |
Vf16_vfwcvt_f_x_v_cg/cp_asm_count, Vf16_vfwcvt_f_xu_v_cg/cp_asm_count, Vf16_vfncvt_x_f_w_cg/cp_asm_count, Vf16_vfncvt_xu_f_w_cg/cp_asm_count, Vf16_vfncvt_rtz_x_f_w_cg/cp_asm_count, Vf16_vfncvt_rtz_xu_f_w_cg/cp_asm_count |
|
Zvfh_eew16 |
The EEW=16 floating-point operands of these instructions use the binary16 format. |
Implicit: extension-support requirement exercised implicitly by which EEWs the generated suite runs at all |
Zvfh_dependent_Zve32f_Zfhmin |
The |
Implicit: extension-composition fact exercised implicitly whenever the config runs at all |
egs_ge_vlmax_rsv |
Out-of-Scope: no Ssstrict-equivalent suite exists for the vector-crypto (Zvk*) extensions, and this reserved condition depends on CSR state, matching Ssstrict’s own encoding-only scope boundary |
|
egs_vl_rsv |
Out-of-Scope: no Ssstrict-equivalent suite exists for the vector-crypto (Zvk*) extensions, and this reserved condition depends on CSR state, matching Ssstrict’s own encoding-only scope boundary |
|
egs_vl_avl |
Untestable: AVL-to-vl rounding under EGSMAX is not exercised by any suite and depends on an implementation-chosen EGSMAX |
|
egs_sew_eew |
Zvknha_vsha2ch_vv_cg/cp_csr_vtype_lmul_egs4_sew32 |
|
egs_lmul_emul |
Zvknha_vsha2ch_vv_cg/cr_vl_lmul_egs4_sew32 |
|
egs_egw |
Zvknha_vsha2ch_vv_cg/cp_vd_egs4 |
|
vector_active_element |
The active elements can raise exceptions and update the destination vector register group. |
Vx16_vadd_vv_cg/cp_masking_edges |
vector_ls_rvtso |
Not Tested: no Ztso-configured vector test config exists yet to exercise RVTSO ordering |
|
vnclipu_vnclip_rounding |
{Vx16_vnclip_wv_cg,Vx16_vnclipu_wv_cg}/cr_vxrm_vs2_vs1_edges_wv |
|
vf_requires_vx |
Implicit: the vector floating-point tests cannot run unless the scalar floating-point extensions are present |
|
instrgrp_vmask_disregard_vlmul |
Vx16_vmseq_vv_cg/cp_custom_vmask_write_lmulge1 |
|
viota_restart |
execution is always restarted from the beginning when resuming after a trap handler. |
Not Tested: restart-from-vstart-after-trap sequencing is not generated by this suite yet |
vrgather-vv_op_vrgatherei16-vv_op |
Vx16_vrgather_vv_cg/cp_custom_vindexCorners_index_gt_vl_lt_vlmax |
|
vector_reset_state |
Untestable: reset-time CSR state is not observable via a coverpoint in a self-checking test that boots past reset |
|
Zve32f_instr_perm |
Implicit: extension-support requirement exercised implicitly by which instructions the generated suite runs at all |
|
Zve64d_instr_perm |
Implicit: extension-support requirement exercised implicitly by which instructions the generated suite runs at all |
|
vset_vstart |
The configuration-setting instructions do not depend on |
TODO: vset* with nonzero vstart; result unaffected and vstart reset to 0 |
vec_store_nonidempotent_no_update |
Untestable: no I/O devices defined in profile |
UDB Parameters: None.
A.11.5. Vls
| Instruction | vle8.v | vle16.v | vle32.v | vle64.v | vlseg2e8.v | vlseg2e16.v | vlseg2e32.v | vlseg2e64.v | vlseg3e8.v | vlseg3e16.v | vlseg3e32.v | vlseg3e64.v |
|---|---|---|---|---|---|---|---|---|---|---|---|---|
RV32 |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
RV64 |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
EFFEW8 |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
EFFEW16 |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
EFFEW32 |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
EFFEW64 |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
cp_asm_count |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
cp_vd |
x |
x |
x |
x |
lte30 |
lte30 |
lte30 |
lte30 |
lte29 |
lte29 |
lte29 |
lte29 |
cp_rs1 |
nx0 |
nx0 |
nx0 |
nx0 |
nx0 |
nx0 |
nx0 |
nx0 |
nx0 |
nx0 |
nx0 |
nx0 |
cp_masking_edges |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
cr_vl_lmul |
e8 |
e16 |
e32 |
e64 |
e8_emul4max |
e16_emul4max |
e32_emul4max |
e64_emul4max |
e8_emul2max |
e16_emul2max |
e32_emul2max |
e64_emul2max |
cr_vtype_agnostic |
e8 |
e16 |
e32 |
e64 |
e8_emul4max |
e16_emul4max |
e32_emul4max |
e64_emul4max |
e8_emul2max |
e16_emul2max |
e32_emul2max |
e64_emul2max |
cp_vl_0 |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
std_vec |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
| Instruction | vlseg4e8.v | vlseg4e16.v | vlseg4e32.v | vlseg4e64.v | vlseg5e8.v | vlseg5e16.v | vlseg5e32.v | vlseg5e64.v | vlseg6e8.v | vlseg6e16.v | vlseg6e32.v | vlseg6e64.v |
|---|---|---|---|---|---|---|---|---|---|---|---|---|
RV32 |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
RV64 |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
EFFEW8 |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
EFFEW16 |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
EFFEW32 |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
EFFEW64 |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
cp_asm_count |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
cp_vd |
lte28 |
lte28 |
lte28 |
lte28 |
lte27 |
lte27 |
lte27 |
lte27 |
lte26 |
lte26 |
lte26 |
lte26 |
cp_rs1 |
nx0 |
nx0 |
nx0 |
nx0 |
nx0 |
nx0 |
nx0 |
nx0 |
nx0 |
nx0 |
nx0 |
nx0 |
cp_masking_edges |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
cr_vl_lmul |
e8_emul2max |
e16_emul2max |
e32_emul2max |
e64_emul2max |
e8_emul1max |
e16_emul1max |
e32_emul1max |
e64_emul1max |
e8_emul1max |
e16_emul1max |
e32_emul1max |
e64_emul1max |
cr_vtype_agnostic |
e8_emul2max |
e16_emul2max |
e32_emul2max |
e64_emul2max |
e8_emul1max |
e16_emul1max |
e32_emul1max |
e64_emul1max |
e8_emul1max |
e16_emul1max |
e32_emul1max |
e64_emul1max |
cp_vl_0 |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
std_vec |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
| Instruction | vlseg7e8.v | vlseg7e16.v | vlseg7e32.v | vlseg7e64.v | vlseg8e8.v | vlseg8e16.v | vlseg8e32.v | vlseg8e64.v | vle8ff.v | vle16ff.v | vle32ff.v | vle64ff.v |
|---|---|---|---|---|---|---|---|---|---|---|---|---|
RV32 |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
RV64 |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
EFFEW8 |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
EFFEW16 |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
EFFEW32 |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
EFFEW64 |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
cp_asm_count |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
cp_vd |
lte25 |
lte25 |
lte25 |
lte25 |
lte24 |
lte24 |
lte24 |
lte24 |
x |
x |
x |
x |
cp_rs1 |
nx0 |
nx0 |
nx0 |
nx0 |
nx0 |
nx0 |
nx0 |
nx0 |
nx0 |
nx0 |
nx0 |
nx0 |
cp_masking_edges |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
cr_vl_lmul |
e8_emul1max |
e16_emul1max |
e32_emul1max |
e64_emul1max |
e8_emul1max |
e16_emul1max |
e32_emul1max |
e64_emul1max |
e8 |
e16 |
e32 |
e64 |
cr_vtype_agnostic |
e8_emul1max |
e16_emul1max |
e32_emul1max |
e64_emul1max |
e8_emul1max |
e16_emul1max |
e32_emul1max |
e64_emul1max |
e8 |
e16 |
e32 |
e64 |
cp_vl_0 |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
std_vec |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
cp_custom_ffLS_update_vl |
x |
x |
x |
sew_ge16 |
||||||||
cp_custom_ffLS |
x |
x |
x |
x |
| Instruction | vlseg2e8ff.v | vlseg2e16ff.v | vlseg2e32ff.v | vlseg2e64ff.v | vlseg3e8ff.v | vlseg3e16ff.v | vlseg3e32ff.v | vlseg3e64ff.v | vlseg4e8ff.v | vlseg4e16ff.v | vlseg4e32ff.v | vlseg4e64ff.v |
|---|---|---|---|---|---|---|---|---|---|---|---|---|
RV32 |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
RV64 |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
EFFEW8 |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
EFFEW16 |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
EFFEW32 |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
EFFEW64 |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
cp_asm_count |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
cp_vd |
lte30 |
lte30 |
lte30 |
lte30 |
lte29 |
lte29 |
lte29 |
lte29 |
lte28 |
lte28 |
lte28 |
lte28 |
cp_rs1 |
nx0 |
nx0 |
nx0 |
nx0 |
nx0 |
nx0 |
nx0 |
nx0 |
nx0 |
nx0 |
nx0 |
nx0 |
cp_masking_edges |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
cr_vl_lmul |
e8_emul4max |
e16_emul4max |
e32_emul4max |
e64_emul4max |
e8_emul2max |
e16_emul2max |
e32_emul2max |
e64_emul2max |
e8_emul2max |
e16_emul2max |
e32_emul2max |
e64_emul2max |
cr_vtype_agnostic |
e8_emul4max |
e16_emul4max |
e32_emul4max |
e64_emul4max |
e8_emul2max |
e16_emul2max |
e32_emul2max |
e64_emul2max |
e8_emul2max |
e16_emul2max |
e32_emul2max |
e64_emul2max |
cp_vl_0 |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
std_vec |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
|
cp_custom_ffLS_update_vl |
x |
x |
sew_ge16 |
sew_ge32 |
x |
sew_ge16 |
sew_ge64 |
x |
sew_ge16 |
sew_ge32 |
sew_ge64 |
|
cp_custom_ffLS |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
| Instruction | vlseg5e8ff.v | vlseg5e16ff.v | vlseg5e32ff.v | vlseg5e64ff.v | vlseg6e8ff.v | vlseg6e16ff.v | vlseg6e32ff.v | vlseg6e64ff.v | vlseg7e8ff.v | vlseg7e16ff.v | vlseg7e32ff.v | vlseg7e64ff.v |
|---|---|---|---|---|---|---|---|---|---|---|---|---|
RV32 |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
RV64 |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
EFFEW8 |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
EFFEW16 |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
EFFEW32 |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
EFFEW64 |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
cp_asm_count |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
cp_vd |
lte27 |
lte27 |
lte27 |
lte27 |
lte26 |
lte26 |
lte26 |
lte26 |
lte25 |
lte25 |
lte25 |
lte25 |
cp_rs1 |
nx0 |
nx0 |
nx0 |
nx0 |
nx0 |
nx0 |
nx0 |
nx0 |
nx0 |
nx0 |
nx0 |
nx0 |
cp_masking_edges |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
cr_vl_lmul |
e8_emul1max |
e16_emul1max |
e32_emul1max |
e64_emul1max |
e8_emul1max |
e16_emul1max |
e32_emul1max |
e64_emul1max |
e8_emul1max |
e16_emul1max |
e32_emul1max |
e64_emul1max |
cr_vtype_agnostic |
e8_emul1max |
e16_emul1max |
e32_emul1max |
e64_emul1max |
e8_emul1max |
e16_emul1max |
e32_emul1max |
e64_emul1max |
e8_emul1max |
e16_emul1max |
e32_emul1max |
e64_emul1max |
cp_vl_0 |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
std_vec |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
cp_custom_ffLS_update_vl |
sew_ge16 |
sew_ge32 |
sew_ge64 |
sew_ge16 |
sew_ge32 |
sew_ge64 |
sew_ge16 |
sew_ge32 |
sew_ge64 |
|||
cp_custom_ffLS |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
| Instruction | vlseg8e8ff.v | vlseg8e16ff.v | vlseg8e32ff.v | vlseg8e64ff.v | vlse8.v | vlse16.v | vlse32.v | vlse64.v | vlsseg2e8.v | vlsseg2e16.v | vlsseg2e32.v | vlsseg2e64.v |
|---|---|---|---|---|---|---|---|---|---|---|---|---|
RV32 |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
RV64 |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
EFFEW8 |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
EFFEW16 |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
EFFEW32 |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
EFFEW64 |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
cp_asm_count |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
cp_vd |
lte24 |
lte24 |
lte24 |
lte24 |
x |
x |
x |
x |
lte30 |
lte30 |
lte30 |
lte30 |
cp_rs1 |
nx0 |
nx0 |
nx0 |
nx0 |
nx0 |
nx0 |
nx0 |
nx0 |
nx0 |
nx0 |
nx0 |
nx0 |
cp_rs2 |
x |
x |
x |
x |
x |
x |
x |
x |
||||
cp_rs2_edges |
ls_e8 |
ls_e16 |
ls_e32 |
ls_e64 |
ls_e8 |
ls_e16 |
ls_e32 |
ls_e64 |
||||
cp_masking_edges |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
cr_vl_lmul |
e8_emul1max |
e16_emul1max |
e32_emul1max |
e64_emul1max |
e8 |
e16 |
e32 |
e64 |
e8_emul4max |
e16_emul4max |
e32_emul4max |
e64_emul4max |
cr_vtype_agnostic |
e8_emul1max |
e16_emul1max |
e32_emul1max |
e64_emul1max |
e8 |
e16 |
e32 |
e64 |
e8_emul4max |
e16_emul4max |
e32_emul4max |
e64_emul4max |
cp_vl_0 |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
std_vec |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
cp_custom_ffLS_update_vl |
sew_ge16 |
sew_ge32 |
sew_ge64 |
|||||||||
cp_custom_ffLS |
x |
x |
x |
x |
| Instruction | vlsseg3e8.v | vlsseg3e16.v | vlsseg3e32.v | vlsseg3e64.v | vlsseg4e8.v | vlsseg4e16.v | vlsseg4e32.v | vlsseg4e64.v | vlsseg5e8.v | vlsseg5e16.v | vlsseg5e32.v | vlsseg5e64.v |
|---|---|---|---|---|---|---|---|---|---|---|---|---|
RV32 |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
RV64 |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
EFFEW8 |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
EFFEW16 |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
EFFEW32 |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
EFFEW64 |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
cp_asm_count |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
cp_vd |
lte29 |
lte29 |
lte29 |
lte29 |
lte28 |
lte28 |
lte28 |
lte28 |
lte27 |
lte27 |
lte27 |
lte27 |
cp_rs1 |
nx0 |
nx0 |
nx0 |
nx0 |
nx0 |
nx0 |
nx0 |
nx0 |
nx0 |
nx0 |
nx0 |
nx0 |
cp_rs2 |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
cp_rs2_edges |
ls_e8 |
ls_e16 |
ls_e32 |
ls_e64 |
ls_e8 |
ls_e16 |
ls_e32 |
ls_e64 |
ls_e8 |
ls_e16 |
ls_e32 |
ls_e64 |
cp_masking_edges |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
cr_vl_lmul |
e8_emul2max |
e16_emul2max |
e32_emul2max |
e64_emul2max |
e8_emul2max |
e16_emul2max |
e32_emul2max |
e64_emul2max |
e8_emul1max |
e16_emul1max |
e32_emul1max |
e64_emul1max |
cr_vtype_agnostic |
e8_emul2max |
e16_emul2max |
e32_emul2max |
e64_emul2max |
e8_emul2max |
e16_emul2max |
e32_emul2max |
e64_emul2max |
e8_emul1max |
e16_emul1max |
e32_emul1max |
e64_emul1max |
cp_vl_0 |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
std_vec |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
| Instruction | vlsseg6e8.v | vlsseg6e16.v | vlsseg6e32.v | vlsseg6e64.v | vlsseg7e8.v | vlsseg7e16.v | vlsseg7e32.v | vlsseg7e64.v | vlsseg8e8.v | vlsseg8e16.v | vlsseg8e32.v | vlsseg8e64.v |
|---|---|---|---|---|---|---|---|---|---|---|---|---|
RV32 |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
RV64 |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
EFFEW8 |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
EFFEW16 |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
EFFEW32 |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
EFFEW64 |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
cp_asm_count |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
cp_vd |
lte26 |
lte26 |
lte26 |
lte26 |
lte25 |
lte25 |
lte25 |
lte25 |
lte24 |
lte24 |
lte24 |
lte24 |
cp_rs1 |
nx0 |
nx0 |
nx0 |
nx0 |
nx0 |
nx0 |
nx0 |
nx0 |
nx0 |
nx0 |
nx0 |
nx0 |
cp_rs2 |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
cp_rs2_edges |
ls_e8 |
ls_e16 |
ls_e32 |
ls_e64 |
ls_e8 |
ls_e16 |
ls_e32 |
ls_e64 |
ls_e8 |
ls_e16 |
ls_e32 |
ls_e64 |
cp_masking_edges |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
cr_vl_lmul |
e8_emul1max |
e16_emul1max |
e32_emul1max |
e64_emul1max |
e8_emul1max |
e16_emul1max |
e32_emul1max |
e64_emul1max |
e8_emul1max |
e16_emul1max |
e32_emul1max |
e64_emul1max |
cr_vtype_agnostic |
e8_emul1max |
e16_emul1max |
e32_emul1max |
e64_emul1max |
e8_emul1max |
e16_emul1max |
e32_emul1max |
e64_emul1max |
e8_emul1max |
e16_emul1max |
e32_emul1max |
e64_emul1max |
cp_vl_0 |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
std_vec |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
| Instruction | vluxei8.v | vluxei16.v | vluxei32.v | vluxei64.v | vluxseg2ei8.v | vluxseg2ei16.v | vluxseg2ei32.v | vluxseg2ei64.v | vluxseg3ei8.v | vluxseg3ei16.v | vluxseg3ei32.v | vluxseg3ei64.v |
|---|---|---|---|---|---|---|---|---|---|---|---|---|
RV32 |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
RV64 |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
EFFEW8 |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
EFFEW16 |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
EFFEW32 |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
EFFEW64 |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
cp_asm_count |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
cp_vd |
x |
x |
x |
x |
lte30 |
lte30 |
lte30 |
lte30 |
lte29 |
lte29 |
lte29 |
lte29 |
cp_vs2 |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
cp_vs2_edges |
ls |
ls |
ls |
ls |
ls |
ls |
ls |
ls |
ls |
ls |
ls |
ls |
cmp_vd_vs2 |
eew_eq_sew |
eew_eq_sew |
eew_eq_sew |
eew_eq_sew |
||||||||
cp_rs1 |
nx0 |
nx0 |
nx0 |
nx0 |
nx0 |
nx0 |
nx0 |
nx0 |
nx0 |
nx0 |
nx0 |
nx0 |
cp_masking_edges |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
cr_vl_lmul |
e8 |
e16 |
e32 |
e64 |
e8_emul4max |
e16_emul4max |
e32_emul4max |
e64_emul4max |
e8_emul2max |
e16_emul2max |
e32_emul2max |
e64_emul2max |
cr_vtype_agnostic |
e8 |
e16 |
e32 |
e64 |
e8_emul4max |
e16_emul4max |
e32_emul4max |
e64_emul4max |
e8_emul2max |
e16_emul2max |
e32_emul2max |
e64_emul2max |
cp_vl_0 |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
std_vec |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
cp_custom_ls_indexed_truncated |
x |
x |
x |
|||||||||
cp_custom_indexed_emul_data_only |
x |
x |
sew_ge16 |
sew_ge32 |
||||||||
cp_custom_indexed_overlap |
eew8 |
eew16 |
eew32 |
eew64 |
| Instruction | vluxseg4ei8.v | vluxseg4ei16.v | vluxseg4ei32.v | vluxseg4ei64.v | vluxseg5ei8.v | vluxseg5ei16.v | vluxseg5ei32.v | vluxseg5ei64.v | vluxseg6ei8.v | vluxseg6ei16.v | vluxseg6ei32.v | vluxseg6ei64.v |
|---|---|---|---|---|---|---|---|---|---|---|---|---|
RV32 |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
RV64 |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
EFFEW8 |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
EFFEW16 |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
EFFEW32 |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
EFFEW64 |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
cp_asm_count |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
cp_vd |
lte28 |
lte28 |
lte28 |
lte28 |
lte27 |
lte27 |
lte27 |
lte27 |
lte26 |
lte26 |
lte26 |
lte26 |
cp_vs2 |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
cp_vs2_edges |
ls |
ls |
ls |
ls |
ls |
ls |
ls |
ls |
ls |
ls |
ls |
ls |
cp_rs1 |
nx0 |
nx0 |
nx0 |
nx0 |
nx0 |
nx0 |
nx0 |
nx0 |
nx0 |
nx0 |
nx0 |
nx0 |
cp_masking_edges |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
cr_vl_lmul |
e8_emul2max |
e16_emul2max |
e32_emul2max |
e64_emul2max |
e8_emul1max |
e16_emul1max |
e32_emul1max |
e64_emul1max |
e8_emul1max |
e16_emul1max |
e32_emul1max |
e64_emul1max |
cr_vtype_agnostic |
e8_emul2max |
e16_emul2max |
e32_emul2max |
e64_emul2max |
e8_emul1max |
e16_emul1max |
e32_emul1max |
e64_emul1max |
e8_emul1max |
e16_emul1max |
e32_emul1max |
e64_emul1max |
cp_vl_0 |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
std_vec |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
cp_custom_ls_indexed_truncated |
x |
x |
x |
|||||||||
cp_custom_indexed_emul_data_only |
x |
x |
x |
sew_ge16 |
| Instruction | vluxseg7ei8.v | vluxseg7ei16.v | vluxseg7ei32.v | vluxseg7ei64.v | vluxseg8ei8.v | vluxseg8ei16.v | vluxseg8ei32.v | vluxseg8ei64.v | vloxei8.v | vloxei16.v | vloxei32.v | vloxei64.v |
|---|---|---|---|---|---|---|---|---|---|---|---|---|
RV32 |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
RV64 |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
EFFEW8 |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
EFFEW16 |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
EFFEW32 |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
EFFEW64 |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
cp_asm_count |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
cp_vd |
lte25 |
lte25 |
lte25 |
lte25 |
lte24 |
lte24 |
lte24 |
lte24 |
x |
x |
x |
x |
cp_vs2 |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
cp_vs2_edges |
ls |
ls |
ls |
ls |
ls |
ls |
ls |
ls |
ls |
ls |
ls |
ls |
cmp_vd_vs2 |
eew_eq_sew |
eew_eq_sew |
eew_eq_sew |
eew_eq_sew |
||||||||
cp_rs1 |
nx0 |
nx0 |
nx0 |
nx0 |
nx0 |
nx0 |
nx0 |
nx0 |
nx0 |
nx0 |
nx0 |
nx0 |
cp_masking_edges |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
cr_vl_lmul |
e8_emul1max |
e16_emul1max |
e32_emul1max |
e64_emul1max |
e8_emul1max |
e16_emul1max |
e32_emul1max |
e64_emul1max |
e8 |
e16 |
e32 |
e64 |
cr_vtype_agnostic |
e8_emul1max |
e16_emul1max |
e32_emul1max |
e64_emul1max |
e8_emul1max |
e16_emul1max |
e32_emul1max |
e64_emul1max |
e8 |
e16 |
e32 |
e64 |
cp_vl_0 |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
std_vec |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
cp_custom_ls_indexed_truncated |
x |
x |
x |
|||||||||
cp_custom_indexed_emul_data_only |
x |
x |
x |
x |
||||||||
cp_custom_indexed_overlap |
eew8 |
eew16 |
eew32 |
eew64 |
||||||||
cp_custom_ordered_index_overlap |
x |
x |
x |
x |
| Instruction | vloxseg2ei8.v | vloxseg2ei16.v | vloxseg2ei32.v | vloxseg2ei64.v | vloxseg3ei8.v | vloxseg3ei16.v | vloxseg3ei32.v | vloxseg3ei64.v | vloxseg4ei8.v | vloxseg4ei16.v | vloxseg4ei32.v | vloxseg4ei64.v |
|---|---|---|---|---|---|---|---|---|---|---|---|---|
RV32 |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
RV64 |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
EFFEW8 |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
EFFEW16 |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
EFFEW32 |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
EFFEW64 |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
cp_asm_count |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
cp_vd |
lte30 |
lte30 |
lte30 |
lte30 |
lte29 |
lte29 |
lte29 |
lte29 |
lte28 |
lte28 |
lte28 |
lte28 |
cp_vs2 |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
cp_vs2_edges |
ls |
ls |
ls |
ls |
ls |
ls |
ls |
ls |
ls |
ls |
ls |
ls |
cp_rs1 |
nx0 |
nx0 |
nx0 |
nx0 |
nx0 |
nx0 |
nx0 |
nx0 |
nx0 |
nx0 |
nx0 |
nx0 |
cp_masking_edges |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
cr_vl_lmul |
e8_emul4max |
e16_emul4max |
e32_emul4max |
e64_emul4max |
e8_emul2max |
e16_emul2max |
e32_emul2max |
e64_emul2max |
e8_emul2max |
e16_emul2max |
e32_emul2max |
e64_emul2max |
cr_vtype_agnostic |
e8_emul4max |
e16_emul4max |
e32_emul4max |
e64_emul4max |
e8_emul2max |
e16_emul2max |
e32_emul2max |
e64_emul2max |
e8_emul2max |
e16_emul2max |
e32_emul2max |
e64_emul2max |
cp_vl_0 |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
std_vec |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
cp_custom_ls_indexed_truncated |
x |
x |
x |
|||||||||
cp_custom_indexed_emul_data_only |
x |
x |
sew_ge16 |
sew_ge32 |
x |
x |
x |
sew_ge16 |
||||
cp_custom_ordered_index_overlap |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
| Instruction | vloxseg5ei8.v | vloxseg5ei16.v | vloxseg5ei32.v | vloxseg5ei64.v | vloxseg6ei8.v | vloxseg6ei16.v | vloxseg6ei32.v | vloxseg6ei64.v | vloxseg7ei8.v | vloxseg7ei16.v | vloxseg7ei32.v | vloxseg7ei64.v |
|---|---|---|---|---|---|---|---|---|---|---|---|---|
RV32 |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
RV64 |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
EFFEW8 |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
EFFEW16 |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
EFFEW32 |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
EFFEW64 |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
cp_asm_count |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
cp_vd |
lte27 |
lte27 |
lte27 |
lte27 |
lte26 |
lte26 |
lte26 |
lte26 |
lte25 |
lte25 |
lte25 |
lte25 |
cp_vs2 |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
cp_vs2_edges |
ls |
ls |
ls |
ls |
ls |
ls |
ls |
ls |
ls |
ls |
ls |
ls |
cp_rs1 |
nx0 |
nx0 |
nx0 |
nx0 |
nx0 |
nx0 |
nx0 |
nx0 |
nx0 |
nx0 |
nx0 |
nx0 |
cp_masking_edges |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
cr_vl_lmul |
e8_emul1max |
e16_emul1max |
e32_emul1max |
e64_emul1max |
e8_emul1max |
e16_emul1max |
e32_emul1max |
e64_emul1max |
e8_emul1max |
e16_emul1max |
e32_emul1max |
e64_emul1max |
cr_vtype_agnostic |
e8_emul1max |
e16_emul1max |
e32_emul1max |
e64_emul1max |
e8_emul1max |
e16_emul1max |
e32_emul1max |
e64_emul1max |
e8_emul1max |
e16_emul1max |
e32_emul1max |
e64_emul1max |
cp_vl_0 |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
std_vec |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
cp_custom_ls_indexed_truncated |
x |
x |
x |
|||||||||
cp_custom_ordered_index_overlap |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
| Instruction | vloxseg8ei8.v | vloxseg8ei16.v | vloxseg8ei32.v | vloxseg8ei64.v | vse8.v | vse16.v | vse32.v | vse64.v | vsseg2e8.v | vsseg2e16.v | vsseg2e32.v | vsseg2e64.v |
|---|---|---|---|---|---|---|---|---|---|---|---|---|
RV32 |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
RV64 |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
EFFEW8 |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
EFFEW16 |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
EFFEW32 |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
EFFEW64 |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
cp_asm_count |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
cp_vd |
lte24 |
lte24 |
lte24 |
lte24 |
||||||||
cp_vs3 |
x |
x |
x |
x |
lte30 |
lte30 |
lte30 |
lte30 |
||||
cp_vs2 |
x |
x |
x |
x |
||||||||
cp_vs2_edges |
ls |
ls |
ls |
ls |
||||||||
cp_rs1 |
nx0 |
nx0 |
nx0 |
nx0 |
nx0 |
nx0 |
nx0 |
nx0 |
nx0 |
nx0 |
nx0 |
nx0 |
cp_masking_edges |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
cr_vl_lmul |
e8_emul1max |
e16_emul1max |
e32_emul1max |
e64_emul1max |
e8 |
e16 |
e32 |
e64 |
e8_emul4max |
e16_emul4max |
e32_emul4max |
e64_emul4max |
cr_vtype_agnostic |
e8_emul1max |
e16_emul1max |
e32_emul1max |
e64_emul1max |
e8 |
e16 |
e32 |
e64 |
e8_emul4max |
e16_emul4max |
e32_emul4max |
e64_emul4max |
cp_vl_0 |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
std_vec |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
cp_custom_ls_indexed_truncated |
x |
|||||||||||
cp_custom_indexed_emul_data_only |
x |
x |
x |
x |
||||||||
cp_custom_ordered_index_overlap |
x |
x |
x |
x |
| Instruction | vsseg3e8.v | vsseg3e16.v | vsseg3e32.v | vsseg3e64.v | vsseg4e8.v | vsseg4e16.v | vsseg4e32.v | vsseg4e64.v | vsseg5e8.v | vsseg5e16.v | vsseg5e32.v | vsseg5e64.v |
|---|---|---|---|---|---|---|---|---|---|---|---|---|
RV32 |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
RV64 |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
EFFEW8 |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
EFFEW16 |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
EFFEW32 |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
EFFEW64 |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
cp_asm_count |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
cp_vs3 |
lte29 |
lte29 |
lte29 |
lte29 |
lte28 |
lte28 |
lte28 |
lte28 |
lte27 |
lte27 |
lte27 |
lte27 |
cp_rs1 |
nx0 |
nx0 |
nx0 |
nx0 |
nx0 |
nx0 |
nx0 |
nx0 |
nx0 |
nx0 |
nx0 |
nx0 |
cp_masking_edges |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
cr_vl_lmul |
e8_emul2max |
e16_emul2max |
e32_emul2max |
e64_emul2max |
e8_emul2max |
e16_emul2max |
e32_emul2max |
e64_emul2max |
e8_emul1max |
e16_emul1max |
e32_emul1max |
e64_emul1max |
cr_vtype_agnostic |
e8_emul2max |
e16_emul2max |
e32_emul2max |
e64_emul2max |
e8_emul2max |
e16_emul2max |
e32_emul2max |
e64_emul2max |
e8_emul1max |
e16_emul1max |
e32_emul1max |
e64_emul1max |
cp_vl_0 |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
std_vec |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
| Instruction | vsseg6e8.v | vsseg6e16.v | vsseg6e32.v | vsseg6e64.v | vsseg7e8.v | vsseg7e16.v | vsseg7e32.v | vsseg7e64.v | vsseg8e8.v | vsseg8e16.v | vsseg8e32.v | vsseg8e64.v |
|---|---|---|---|---|---|---|---|---|---|---|---|---|
RV32 |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
RV64 |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
EFFEW8 |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
EFFEW16 |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
EFFEW32 |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
EFFEW64 |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
cp_asm_count |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
cp_vs3 |
lte26 |
lte26 |
lte26 |
lte26 |
lte25 |
lte25 |
lte25 |
lte25 |
lte24 |
lte24 |
lte24 |
lte24 |
cp_rs1 |
nx0 |
nx0 |
nx0 |
nx0 |
nx0 |
nx0 |
nx0 |
nx0 |
nx0 |
nx0 |
nx0 |
nx0 |
cp_masking_edges |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
cr_vl_lmul |
e8_emul1max |
e16_emul1max |
e32_emul1max |
e64_emul1max |
e8_emul1max |
e16_emul1max |
e32_emul1max |
e64_emul1max |
e8_emul1max |
e16_emul1max |
e32_emul1max |
e64_emul1max |
cr_vtype_agnostic |
e8_emul1max |
e16_emul1max |
e32_emul1max |
e64_emul1max |
e8_emul1max |
e16_emul1max |
e32_emul1max |
e64_emul1max |
e8_emul1max |
e16_emul1max |
e32_emul1max |
e64_emul1max |
cp_vl_0 |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
std_vec |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
| Instruction | vsse8.v | vsse16.v | vsse32.v | vsse64.v | vssseg2e8.v | vssseg2e16.v | vssseg2e32.v | vssseg2e64.v | vssseg3e8.v | vssseg3e16.v | vssseg3e32.v | vssseg3e64.v |
|---|---|---|---|---|---|---|---|---|---|---|---|---|
RV32 |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
RV64 |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
EFFEW8 |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
EFFEW16 |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
EFFEW32 |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
EFFEW64 |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
cp_asm_count |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
cp_vs3 |
x |
x |
x |
x |
lte30 |
lte30 |
lte30 |
lte30 |
lte29 |
lte29 |
lte29 |
lte29 |
cp_rs1 |
nx0 |
nx0 |
nx0 |
nx0 |
nx0 |
nx0 |
nx0 |
nx0 |
nx0 |
nx0 |
nx0 |
nx0 |
cp_rs2 |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
cp_rs2_edges |
ls_e8 |
ls_e16 |
ls_e32 |
ls_e64 |
ls_e8 |
ls_e16 |
ls_e32 |
ls_e64 |
ls_e8 |
ls_e16 |
ls_e32 |
ls_e64 |
cp_masking_edges |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
cr_vl_lmul |
e8 |
e16 |
e32 |
e64 |
e8_emul4max |
e16_emul4max |
e32_emul4max |
e64_emul4max |
e8_emul2max |
e16_emul2max |
e32_emul2max |
e64_emul2max |
cr_vtype_agnostic |
e8 |
e16 |
e32 |
e64 |
e8_emul4max |
e16_emul4max |
e32_emul4max |
e64_emul4max |
e8_emul2max |
e16_emul2max |
e32_emul2max |
e64_emul2max |
cp_vl_0 |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
std_vec |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
| Instruction | vssseg4e8.v | vssseg4e16.v | vssseg4e32.v | vssseg4e64.v | vssseg5e8.v | vssseg5e16.v | vssseg5e32.v | vssseg5e64.v | vssseg6e8.v | vssseg6e16.v | vssseg6e32.v | vssseg6e64.v |
|---|---|---|---|---|---|---|---|---|---|---|---|---|
RV32 |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
RV64 |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
EFFEW8 |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
EFFEW16 |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
EFFEW32 |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
EFFEW64 |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
cp_asm_count |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
cp_vs3 |
lte28 |
lte28 |
lte28 |
lte28 |
lte27 |
lte27 |
lte27 |
lte27 |
lte26 |
lte26 |
lte26 |
lte26 |
cp_rs1 |
nx0 |
nx0 |
nx0 |
nx0 |
nx0 |
nx0 |
nx0 |
nx0 |
nx0 |
nx0 |
nx0 |
nx0 |
cp_rs2 |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
cp_rs2_edges |
ls_e8 |
ls_e16 |
ls_e32 |
ls_e64 |
ls_e8 |
ls_e16 |
ls_e32 |
ls_e64 |
ls_e8 |
ls_e16 |
ls_e32 |
ls_e64 |
cp_masking_edges |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
cr_vl_lmul |
e8_emul2max |
e16_emul2max |
e32_emul2max |
e64_emul2max |
e8_emul1max |
e16_emul1max |
e32_emul1max |
e64_emul1max |
e8_emul1max |
e16_emul1max |
e32_emul1max |
e64_emul1max |
cr_vtype_agnostic |
e8_emul2max |
e16_emul2max |
e32_emul2max |
e64_emul2max |
e8_emul1max |
e16_emul1max |
e32_emul1max |
e64_emul1max |
e8_emul1max |
e16_emul1max |
e32_emul1max |
e64_emul1max |
cp_vl_0 |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
std_vec |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
| Instruction | vssseg7e8.v | vssseg7e16.v | vssseg7e32.v | vssseg7e64.v | vssseg8e8.v | vssseg8e16.v | vssseg8e32.v | vssseg8e64.v | vsuxei8.v | vsuxei16.v | vsuxei32.v | vsuxei64.v |
|---|---|---|---|---|---|---|---|---|---|---|---|---|
RV32 |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
RV64 |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
EFFEW8 |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
EFFEW16 |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
EFFEW32 |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
EFFEW64 |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
cp_asm_count |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
cp_vs3 |
lte25 |
lte25 |
lte25 |
lte25 |
lte24 |
lte24 |
lte24 |
lte24 |
x |
x |
x |
x |
cp_vs2 |
x |
x |
x |
x |
||||||||
cp_vs2_edges |
ls |
ls |
ls |
ls |
||||||||
cmp_vs3_vs2 |
eew_eq_sew |
eew_eq_sew |
eew_eq_sew |
eew_eq_sew |
||||||||
cp_rs1 |
nx0 |
nx0 |
nx0 |
nx0 |
nx0 |
nx0 |
nx0 |
nx0 |
nx0 |
nx0 |
nx0 |
nx0 |
cp_rs2 |
x |
x |
x |
x |
x |
x |
x |
x |
||||
cp_rs2_edges |
ls_e8 |
ls_e16 |
ls_e32 |
ls_e64 |
ls_e8 |
ls_e16 |
ls_e32 |
ls_e64 |
||||
cp_masking_edges |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
cr_vl_lmul |
e8_emul1max |
e16_emul1max |
e32_emul1max |
e64_emul1max |
e8_emul1max |
e16_emul1max |
e32_emul1max |
e64_emul1max |
e8 |
e16 |
e32 |
e64 |
cr_vtype_agnostic |
e8_emul1max |
e16_emul1max |
e32_emul1max |
e64_emul1max |
e8_emul1max |
e16_emul1max |
e32_emul1max |
e64_emul1max |
e8 |
e16 |
e32 |
e64 |
cp_vl_0 |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
std_vec |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
cp_custom_ls_indexed_truncated |
x |
| Instruction | vsuxseg2ei8.v | vsuxseg2ei16.v | vsuxseg2ei32.v | vsuxseg2ei64.v | vsuxseg3ei8.v | vsuxseg3ei16.v | vsuxseg3ei32.v | vsuxseg3ei64.v | vsuxseg4ei8.v | vsuxseg4ei16.v | vsuxseg4ei32.v | vsuxseg4ei64.v |
|---|---|---|---|---|---|---|---|---|---|---|---|---|
RV32 |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
RV64 |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
EFFEW8 |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
EFFEW16 |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
EFFEW32 |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
EFFEW64 |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
cp_asm_count |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
cp_vs3 |
lte30 |
lte30 |
lte30 |
lte30 |
lte29 |
lte29 |
lte29 |
lte29 |
lte28 |
lte28 |
lte28 |
lte28 |
cp_vs2 |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
cp_vs2_edges |
ls |
ls |
ls |
ls |
ls |
ls |
ls |
ls |
ls |
ls |
ls |
ls |
cmp_vs3_vs2 |
eew_eq_sew_lte30 |
eew_eq_sew_lte30 |
eew_eq_sew_lte30 |
eew_eq_sew_lte30 |
eew_eq_sew_lte29 |
eew_eq_sew_lte29 |
eew_eq_sew_lte29 |
eew_eq_sew_lte29 |
eew_eq_sew_lte28 |
eew_eq_sew_lte28 |
eew_eq_sew_lte28 |
eew_eq_sew_lte28 |
cp_rs1 |
nx0 |
nx0 |
nx0 |
nx0 |
nx0 |
nx0 |
nx0 |
nx0 |
nx0 |
nx0 |
nx0 |
nx0 |
cp_masking_edges |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
cr_vl_lmul |
e8_emul4max |
e16_emul4max |
e32_emul4max |
e64_emul4max |
e8_emul2max |
e16_emul2max |
e32_emul2max |
e64_emul2max |
e8_emul2max |
e16_emul2max |
e32_emul2max |
e64_emul2max |
cr_vtype_agnostic |
e8_emul4max |
e16_emul4max |
e32_emul4max |
e64_emul4max |
e8_emul2max |
e16_emul2max |
e32_emul2max |
e64_emul2max |
e8_emul2max |
e16_emul2max |
e32_emul2max |
e64_emul2max |
cp_vl_0 |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
std_vec |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
cp_custom_ls_indexed_truncated |
x |
x |
x |
|||||||||
cp_custom_indexed_emul_data_only |
x |
x |
sew_ge16 |
sew_ge32 |
x |
x |
x |
sew_ge16 |
| Instruction | vsuxseg5ei8.v | vsuxseg5ei16.v | vsuxseg5ei32.v | vsuxseg5ei64.v | vsuxseg6ei8.v | vsuxseg6ei16.v | vsuxseg6ei32.v | vsuxseg6ei64.v | vsuxseg7ei8.v | vsuxseg7ei16.v | vsuxseg7ei32.v | vsuxseg7ei64.v |
|---|---|---|---|---|---|---|---|---|---|---|---|---|
RV32 |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
RV64 |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
EFFEW8 |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
EFFEW16 |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
EFFEW32 |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
EFFEW64 |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
cp_asm_count |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
cp_vs3 |
lte27 |
lte27 |
lte27 |
lte27 |
lte26 |
lte26 |
lte26 |
lte26 |
lte25 |
lte25 |
lte25 |
lte25 |
cp_vs2 |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
cp_vs2_edges |
ls |
ls |
ls |
ls |
ls |
ls |
ls |
ls |
ls |
ls |
ls |
ls |
cmp_vs3_vs2 |
eew_eq_sew_lte27 |
eew_eq_sew_lte27 |
eew_eq_sew_lte27 |
eew_eq_sew_lte27 |
eew_eq_sew_lte26 |
eew_eq_sew_lte26 |
eew_eq_sew_lte26 |
eew_eq_sew_lte26 |
eew_eq_sew_lte25 |
eew_eq_sew_lte25 |
eew_eq_sew_lte25 |
eew_eq_sew_lte25 |
cp_rs1 |
nx0 |
nx0 |
nx0 |
nx0 |
nx0 |
nx0 |
nx0 |
nx0 |
nx0 |
nx0 |
nx0 |
nx0 |
cp_masking_edges |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
cr_vl_lmul |
e8_emul1max |
e16_emul1max |
e32_emul1max |
e64_emul1max |
e8_emul1max |
e16_emul1max |
e32_emul1max |
e64_emul1max |
e8_emul1max |
e16_emul1max |
e32_emul1max |
e64_emul1max |
cr_vtype_agnostic |
e8_emul1max |
e16_emul1max |
e32_emul1max |
e64_emul1max |
e8_emul1max |
e16_emul1max |
e32_emul1max |
e64_emul1max |
e8_emul1max |
e16_emul1max |
e32_emul1max |
e64_emul1max |
cp_vl_0 |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
std_vec |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
cp_custom_ls_indexed_truncated |
x |
x |
x |
| Instruction | vsuxseg8ei8.v | vsuxseg8ei16.v | vsuxseg8ei32.v | vsuxseg8ei64.v | vsoxei8.v | vsoxei16.v | vsoxei32.v | vsoxei64.v | vsoxseg2ei8.v | vsoxseg2ei16.v | vsoxseg2ei32.v | vsoxseg2ei64.v |
|---|---|---|---|---|---|---|---|---|---|---|---|---|
RV32 |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
RV64 |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
EFFEW8 |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
EFFEW16 |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
EFFEW32 |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
EFFEW64 |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
cp_asm_count |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
cp_vs3 |
lte24 |
lte24 |
lte24 |
lte24 |
x |
x |
x |
x |
lte30 |
lte30 |
lte30 |
lte30 |
cp_vs2 |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
cp_vs2_edges |
ls |
ls |
ls |
ls |
ls |
ls |
ls |
ls |
ls |
ls |
ls |
ls |
cmp_vs3_vs2 |
eew_eq_sew_lte24 |
eew_eq_sew_lte24 |
eew_eq_sew_lte24 |
eew_eq_sew_lte24 |
eew_eq_sew |
eew_eq_sew |
eew_eq_sew |
eew_eq_sew |
eew_eq_sew_lte30 |
eew_eq_sew_lte30 |
eew_eq_sew_lte30 |
eew_eq_sew_lte30 |
cp_rs1 |
nx0 |
nx0 |
nx0 |
nx0 |
nx0 |
nx0 |
nx0 |
nx0 |
nx0 |
nx0 |
nx0 |
nx0 |
cp_masking_edges |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
cr_vl_lmul |
e8_emul1max |
e16_emul1max |
e32_emul1max |
e64_emul1max |
e8 |
e16 |
e32 |
e64 |
e8_emul4max |
e16_emul4max |
e32_emul4max |
e64_emul4max |
cr_vtype_agnostic |
e8_emul1max |
e16_emul1max |
e32_emul1max |
e64_emul1max |
e8 |
e16 |
e32 |
e64 |
e8_emul4max |
e16_emul4max |
e32_emul4max |
e64_emul4max |
cp_vl_0 |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
std_vec |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
cp_custom_ls_indexed_truncated |
x |
x |
x |
|||||||||
cp_custom_indexed_emul_data_only |
x |
x |
x |
x |
x |
x |
sew_ge16 |
sew_ge32 |
||||
cp_custom_ordered_index_overlap |
x |
x |
x |
x |
x |
x |
x |
x |
| Instruction | vsoxseg3ei8.v | vsoxseg3ei16.v | vsoxseg3ei32.v | vsoxseg3ei64.v | vsoxseg4ei8.v | vsoxseg4ei16.v | vsoxseg4ei32.v | vsoxseg4ei64.v | vsoxseg5ei8.v | vsoxseg5ei16.v | vsoxseg5ei32.v | vsoxseg5ei64.v |
|---|---|---|---|---|---|---|---|---|---|---|---|---|
RV32 |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
RV64 |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
EFFEW8 |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
EFFEW16 |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
EFFEW32 |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
EFFEW64 |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
cp_asm_count |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
cp_vs3 |
lte29 |
lte29 |
lte29 |
lte29 |
lte28 |
lte28 |
lte28 |
lte28 |
lte27 |
lte27 |
lte27 |
lte27 |
cp_vs2 |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
cp_vs2_edges |
ls |
ls |
ls |
ls |
ls |
ls |
ls |
ls |
ls |
ls |
ls |
ls |
cmp_vs3_vs2 |
eew_eq_sew_lte29 |
eew_eq_sew_lte29 |
eew_eq_sew_lte29 |
eew_eq_sew_lte29 |
eew_eq_sew_lte28 |
eew_eq_sew_lte28 |
eew_eq_sew_lte28 |
eew_eq_sew_lte28 |
eew_eq_sew_lte27 |
eew_eq_sew_lte27 |
eew_eq_sew_lte27 |
eew_eq_sew_lte27 |
cp_rs1 |
nx0 |
nx0 |
nx0 |
nx0 |
nx0 |
nx0 |
nx0 |
nx0 |
nx0 |
nx0 |
nx0 |
nx0 |
cp_masking_edges |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
cr_vl_lmul |
e8_emul2max |
e16_emul2max |
e32_emul2max |
e64_emul2max |
e8_emul2max |
e16_emul2max |
e32_emul2max |
e64_emul2max |
e8_emul1max |
e16_emul1max |
e32_emul1max |
e64_emul1max |
cr_vtype_agnostic |
e8_emul2max |
e16_emul2max |
e32_emul2max |
e64_emul2max |
e8_emul2max |
e16_emul2max |
e32_emul2max |
e64_emul2max |
e8_emul1max |
e16_emul1max |
e32_emul1max |
e64_emul1max |
cp_vl_0 |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
std_vec |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
cp_custom_ls_indexed_truncated |
x |
x |
x |
|||||||||
cp_custom_indexed_emul_data_only |
x |
x |
x |
sew_ge16 |
||||||||
cp_custom_ordered_index_overlap |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
| Instruction | vsoxseg6ei8.v | vsoxseg6ei16.v | vsoxseg6ei32.v | vsoxseg6ei64.v | vsoxseg7ei8.v | vsoxseg7ei16.v | vsoxseg7ei32.v | vsoxseg7ei64.v | vsoxseg8ei8.v | vsoxseg8ei16.v | vsoxseg8ei32.v | vsoxseg8ei64.v |
|---|---|---|---|---|---|---|---|---|---|---|---|---|
RV32 |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
RV64 |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
EFFEW8 |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
EFFEW16 |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
EFFEW32 |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
EFFEW64 |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
cp_asm_count |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
cp_vs3 |
lte26 |
lte26 |
lte26 |
lte26 |
lte25 |
lte25 |
lte25 |
lte25 |
lte24 |
lte24 |
lte24 |
lte24 |
cp_vs2 |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
cp_vs2_edges |
ls |
ls |
ls |
ls |
ls |
ls |
ls |
ls |
ls |
ls |
ls |
ls |
cmp_vs3_vs2 |
eew_eq_sew_lte26 |
eew_eq_sew_lte26 |
eew_eq_sew_lte26 |
eew_eq_sew_lte26 |
eew_eq_sew_lte25 |
eew_eq_sew_lte25 |
eew_eq_sew_lte25 |
eew_eq_sew_lte25 |
eew_eq_sew_lte24 |
eew_eq_sew_lte24 |
eew_eq_sew_lte24 |
eew_eq_sew_lte24 |
cp_rs1 |
nx0 |
nx0 |
nx0 |
nx0 |
nx0 |
nx0 |
nx0 |
nx0 |
nx0 |
nx0 |
nx0 |
nx0 |
cp_masking_edges |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
cr_vl_lmul |
e8_emul1max |
e16_emul1max |
e32_emul1max |
e64_emul1max |
e8_emul1max |
e16_emul1max |
e32_emul1max |
e64_emul1max |
e8_emul1max |
e16_emul1max |
e32_emul1max |
e64_emul1max |
cr_vtype_agnostic |
e8_emul1max |
e16_emul1max |
e32_emul1max |
e64_emul1max |
e8_emul1max |
e16_emul1max |
e32_emul1max |
e64_emul1max |
e8_emul1max |
e16_emul1max |
e32_emul1max |
e64_emul1max |
cp_vl_0 |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
std_vec |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
cp_custom_ls_indexed_truncated |
x |
x |
x |
|||||||||
cp_custom_indexed_emul_data_only |
x |
x |
x |
x |
||||||||
cp_custom_ordered_index_overlap |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
| Instruction | vl1re8.v | vl2re8.v | vl4re8.v | vl8re8.v | vl1re16.v | vl2re16.v | vl4re16.v | vl8re16.v | vl1re32.v | vl2re32.v | vl4re32.v | vl8re32.v |
|---|---|---|---|---|---|---|---|---|---|---|---|---|
RV32 |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
RV64 |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
EFFEW8 |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
EFFEW16 |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
EFFEW32 |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
EFFEW64 |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
cp_asm_count |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
cp_vd |
x |
emul2 |
emul4 |
emul8 |
x |
emul2 |
emul4 |
emul8 |
x |
emul2 |
emul4 |
emul8 |
cp_rs1 |
nx0 |
nx0 |
nx0 |
nx0 |
nx0 |
nx0 |
nx0 |
nx0 |
nx0 |
nx0 |
nx0 |
nx0 |
cr_vl_lmul |
x |
lmul4max |
lmul2max |
lmul1max |
x |
lmul4max |
lmul2max |
lmul1max |
x |
lmul4max |
lmul2max |
lmul1max |
cr_vtype_agnostic |
nomask |
lmul4max_nomask |
lmul2max_nomask |
lmul1max_nomask |
nomask |
lmul4max_nomask |
lmul2max_nomask |
lmul1max_nomask |
nomask |
lmul4max_nomask |
lmul2max_nomask |
lmul1max_nomask |
cp_vl_0 |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
std_vec |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
cp_custom_vwholeRegLS_vill |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
cp_custom_vwholeRegLS_lmul |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
| Instruction | vl1re64.v | vl2re64.v | vl4re64.v | vl8re64.v | vs1r.v | vs2r.v | vs4r.v | vs8r.v | vsm.v | vlm.v |
|---|---|---|---|---|---|---|---|---|---|---|
RV32 |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
RV64 |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
EFFEW8 |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
EFFEW16 |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
EFFEW32 |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
EFFEW64 |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
cp_asm_count |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
cp_vd |
x |
emul2 |
emul4 |
emul8 |
x |
|||||
cp_vs3 |
x |
emul2 |
emul4 |
emul8 |
x |
|||||
cp_rs1 |
nx0 |
nx0 |
nx0 |
nx0 |
nx0 |
nx0 |
nx0 |
nx0 |
nx0 |
nx0 |
cr_vl_lmul |
x |
lmul4max |
lmul2max |
lmul1max |
x |
x |
x |
x |
nomask |
nomask |
cr_vtype_agnostic |
nomask |
lmul4max_nomask |
lmul2max_nomask |
lmul1max_nomask |
nomask |
nomask |
nomask |
nomask |
nomask |
nomask |
cp_vl_0 |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
std_vec |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
cp_custom_vwholeRegLS_vill |
x |
x |
x |
x |
x |
x |
x |
x |
||
cp_custom_vwholeRegLS_lmul |
x |
x |
x |
x |
x |
x |
x |
x |
||
cp_custom_maskLS |
sew_ge16 |
sew_ge16 |
| Normative Rule | Rule Text | Coverpoints |
|---|---|---|
vector_load_store_semantics |
Vector loads and stores move values between vector registers and memory. |
Vls16_vle8_v_cg/cp_vd, Vls8_vle8_v_cg/cr_vl_lmul_e8_sew8, Vls8_vse8_v_cg/cr_vl_lmul_e8_sew8, Vls64_vle64_v_cg/cr_vl_lmul_e64_sew64, Vls64_vse64_v_cg/cr_vl_lmul_e64_sew64 |
vector_masked_memory_access |
Vls16_vle8_v_cg/cp_masking_edges |
|
vector_ls_strided_eew |
{Vls16_vlse16_v_cg,Vls32_vlse32_v_cg,Vls64_vlse64_v_cg}/cp_asm_count |
|
vector_ls_ins_req |
{Vls8_vle8_v_cg,Vls16_vle16_v_cg,Vls32_vle32_v_cg,Vls64_vle64_v_cg}/cp_asm_count |
|
vector_ls_ins_rsv |
Vector load/store encodings for unsupported EEW widths are reserved. |
SsstrictV_vle8_v_cg/cp_ssstrictv_ls_eew_lt_sewmin |
vector_ls_eew_rsv |
If the implementation does not support the EEW of the offset elements, the instruction is reserved. |
ExceptionsVls_vloxei16_v_cg/cp_exceptionsv_index_eew16 |
vector_ls_nf_op |
Vls16_vlseg2e8_v_cg/cp_asm_count |
|
vector_ls_emul_rsv |
If the EMUL would be out of range (EMUL>8 or EMUL<1/8), the instruction encoding is reserved. |
ExceptionsVls_vloxei16_v_cg/cp_exceptionsv_index_eew16 |
vector_ls_mew_rsv |
SsstrictV_vle8_v_cg/cp_ssstrictv_ls_mew_reserved |
|
emul_nfields_rsv |
SsstrictV_vlseg2e8_v_cg/cp_ssstrictv_ls_seg_vd_overflow |
|
vector_ls_seg_indexed_emul_nfields_val |
The EMUL * NFIELDS ≤ 8 constraint applies to the data vector register group. |
SsstrictV_vlseg2e8_v_cg/cp_ssstrictv_ls_seg_vd_overflow |
vector_ls_seg_wholereg_eew |
Vls16_vl1re16_v_cg/cp_custom_vwholeRegLS_lmul, Vls16_vl1re8_v_cg/cp_asm_count, Vls16_vl1re16_v_cg/cp_asm_count, Vls16_vl1re32_v_cg/cp_asm_count, Vls16_vl1re64_v_cg/cp_asm_count, Vls16_vl2re8_v_cg/cp_asm_count, Vls16_vl2re16_v_cg/cp_asm_count, Vls16_vl2re32_v_cg/cp_asm_count, Vls16_vl2re64_v_cg/cp_asm_count, Vls16_vl4re8_v_cg/cp_asm_count, Vls16_vl4re16_v_cg/cp_asm_count, Vls16_vl4re32_v_cg/cp_asm_count, Vls16_vl4re64_v_cg/cp_asm_count, Vls16_vl8re8_v_cg/cp_asm_count, Vls16_vl8re16_v_cg/cp_asm_count, Vls16_vl8re32_v_cg/cp_asm_count, Vls16_vl8re64_v_cg/cp_asm_count |
|
vector_masked_inactive_behavior |
Vls8_vle8_v_cg/cr_vtype_agnostic_e8, Vls16_vle16_v_cg/cr_vtype_agnostic_e16, Vls32_vle32_v_cg/cr_vtype_agnostic_e32, Vls64_vle64_v_cg/cr_vtype_agnostic_e64 |
UDB Parameters: None.
A.11.6. Vf
| Instruction | vfadd.vv | vfadd.vf | vfwadd.vv | vfwadd.vf | vfwadd.wv | vfwadd.wf | vfsub.vv | vfsub.vf | vfwsub.vv | vfwsub.vf | vfwsub.wv | vfwsub.wf |
|---|---|---|---|---|---|---|---|---|---|---|---|---|
RV32 |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
RV64 |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
EFFEW16 |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
EFFEW32 |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
EFFEW64 |
x |
x |
x |
x |
||||||||
cp_asm_count |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
cp_vd |
x |
x |
emul2 |
emul2 |
emul2 |
emul2 |
x |
x |
emul2 |
emul2 |
emul2 |
emul2 |
cp_vs2 |
x |
x |
x |
x |
emul2 |
emul2 |
x |
x |
x |
x |
emul2 |
emul2 |
cp_vs1 |
x |
x |
x |
x |
x |
x |
||||||
cp_fs1 |
x |
x |
x |
x |
x |
x |
||||||
cmp_vd_vs2 |
x |
x |
emul2 |
emul2 |
x |
x |
emul2 |
emul2 |
||||
cmp_vd_vs1 |
x |
x |
||||||||||
cmp_vs1_vs2 |
x |
x |
x |
x |
||||||||
cmp_vd_vs1_vs2 |
x |
x |
||||||||||
cp_vs2_edges |
f |
f |
f |
f |
f_emul2 |
f_emul2 |
f |
f |
f |
f |
f_emul2 |
f_emul2 |
cp_vs1_edges |
f |
f |
f |
f |
f |
f |
||||||
cr_vs2_vs1_edges |
f |
f |
fwv |
f |
f |
fwv |
||||||
cp_fs1_edges |
v |
v |
v |
v |
v |
v |
||||||
cr_vs2_fs1_edges |
x |
x |
wf |
x |
x |
wf |
||||||
cp_masking_edges |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
cr_vl_lmul |
x |
x |
lmul4max |
lmul4max |
lmul4max |
lmul4max |
x |
x |
lmul4max |
lmul4max |
lmul4max |
lmul4max |
cr_vtype_agnostic |
x |
x |
lmul4max |
lmul4max |
lmul4max |
lmul4max |
x |
x |
lmul4max |
lmul4max |
lmul4max |
lmul4max |
cp_vl_0 |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
cp_csr_fflags |
von |
von |
vn |
vn |
vn |
vn |
von |
von |
vn |
vn |
vn |
vn |
cp_csr_frm |
v |
v |
v |
v |
v |
v |
v |
v |
v |
v |
v |
v |
std_vec |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
cp_custom_vfp_NaN_input |
x |
x |
x |
x |
w |
w |
x |
x |
x |
x |
w |
w |
cp_custom_vfp_flags_set |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
cp_custom_vfp_flags |
nv_nx_of |
nv_nx_of |
nv |
nv |
nv_nx |
nv_nx |
nv_nx |
nv_nx |
nv |
nv |
nv_nx |
nv_nx |
cp_custom |
wvv_all |
wvx_all |
wwv_all |
wvv_all |
wvx_all |
wwv_all |
| Instruction | vfrsub.vf | vfmul.vv | vfmul.vf | vfwmul.vv | vfwmul.vf | vfdiv.vv | vfdiv.vf | vfrdiv.vf | vfmacc.vv | vfmacc.vf | vfnmacc.vv | vfnmacc.vf |
|---|---|---|---|---|---|---|---|---|---|---|---|---|
RV32 |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
RV64 |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
EFFEW16 |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
EFFEW32 |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
EFFEW64 |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
||
cp_asm_count |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
cp_vd |
x |
x |
x |
emul2 |
emul2 |
x |
x |
x |
x |
x |
x |
x |
cp_vs2 |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
cp_vs1 |
x |
x |
x |
x |
x |
|||||||
cp_fs1 |
x |
x |
x |
x |
x |
x |
x |
|||||
cmp_vd_vs2 |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
||
cmp_vd_vs1 |
x |
x |
x |
x |
||||||||
cmp_vs1_vs2 |
x |
x |
x |
x |
x |
|||||||
cmp_vd_vs1_vs2 |
x |
x |
x |
x |
||||||||
cp_vs2_edges |
f |
f |
f |
f |
f |
f |
f |
f |
f |
f |
f |
f |
cp_vs1_edges |
f |
f |
f |
f |
f |
|||||||
cr_vs2_vs1_edges |
f |
f |
f |
f |
f |
|||||||
cp_fs1_edges |
v |
v |
v |
v |
v |
v |
v |
|||||
cr_vs2_fs1_edges |
x |
x |
x |
x |
x |
x |
x |
|||||
cp_masking_edges |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
cr_vl_lmul |
x |
x |
x |
lmul4max |
lmul4max |
x |
x |
x |
x |
x |
x |
x |
cr_vtype_agnostic |
x |
x |
x |
lmul4max |
lmul4max |
x |
x |
x |
x |
x |
x |
x |
cp_vl_0 |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
cp_csr_fflags |
von |
voun |
voun |
v |
v |
vdoun |
vdoun |
vdoun |
voun |
voun |
voun |
voun |
cp_csr_frm |
v |
v |
v |
v |
v |
v |
v |
v |
v |
v |
v |
v |
std_vec |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
cp_custom_vfp_NaN_input |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
cp_custom_vfp_flags_set |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
cp_custom_vfp_flags |
nv_nx |
nv_nx_of_uf |
nv_nx_of_uf |
nv |
nv |
nv_nx_dz |
nv_nx_dz |
nv_nx_dz |
nv_nx |
nv_nx |
nv_nx |
nv_nx |
cp_custom |
wvv_all |
wvx_all |
| Instruction | vfmsac.vv | vfmsac.vf | vfnmsac.vv | vfnmsac.vf | vfmadd.vv | vfmadd.vf | vfnmadd.vv | vfnmadd.vf | vfmsub.vv | vfmsub.vf | vfnmsub.vv | vfnmsub.vf |
|---|---|---|---|---|---|---|---|---|---|---|---|---|
RV32 |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
RV64 |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
EFFEW16 |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
EFFEW32 |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
EFFEW64 |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
cp_asm_count |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
cp_vd |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
cp_vs2 |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
cp_vs1 |
x |
x |
x |
x |
x |
x |
||||||
cp_fs1 |
x |
x |
x |
x |
x |
x |
||||||
cmp_vd_vs2 |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
cmp_vd_vs1 |
x |
x |
x |
x |
x |
x |
||||||
cmp_vs1_vs2 |
x |
x |
x |
x |
x |
x |
||||||
cmp_vd_vs1_vs2 |
x |
x |
x |
x |
x |
x |
||||||
cp_vs2_edges |
f |
f |
f |
f |
f |
f |
f |
f |
f |
f |
f |
f |
cp_vs1_edges |
f |
f |
f |
f |
f |
f |
||||||
cr_vs2_vs1_edges |
f |
f |
f |
f |
f |
f |
||||||
cp_fs1_edges |
v |
v |
v |
v |
v |
v |
||||||
cr_vs2_fs1_edges |
x |
x |
x |
x |
x |
x |
||||||
cp_masking_edges |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
cr_vl_lmul |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
cr_vtype_agnostic |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
cp_vl_0 |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
cp_csr_fflags |
voun |
voun |
voun |
voun |
voun |
voun |
voun |
voun |
voun |
voun |
voun |
voun |
cp_csr_frm |
v |
v |
v |
v |
v |
v |
v |
v |
v |
v |
v |
v |
std_vec |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
cp_custom_vfp_NaN_input |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
cp_custom_vfp_flags_set |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
cp_custom_vfp_flags |
nv_nx |
nv_nx |
nv_nx |
nv_nx |
nv_nx |
nv_nx |
nv_nx |
nv_nx |
nv_nx |
nv_nx |
nv_nx |
nv_nx |
| Instruction | vfwmacc.vv | vfwmacc.vf | vfwnmacc.vv | vfwnmacc.vf | vfwmsac.vv | vfwmsac.vf | vfwnmsac.vv | vfwnmsac.vf | vfsqrt.v | vfrsqrt7.v | vfrec7.v | vfmin.vv |
|---|---|---|---|---|---|---|---|---|---|---|---|---|
RV32 |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
RV64 |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
EFFEW16 |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
EFFEW32 |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
EFFEW64 |
x |
x |
x |
x |
||||||||
cp_asm_count |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
cp_vd |
emul2 |
emul2 |
emul2 |
emul2 |
emul2 |
emul2 |
emul2 |
emul2 |
x |
x |
x |
x |
cp_vs2 |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
cp_vs1 |
x |
x |
x |
x |
x |
|||||||
cp_fs1 |
x |
x |
x |
x |
||||||||
cmp_vd_vs2 |
x |
x |
x |
x |
||||||||
cmp_vd_vs1 |
x |
|||||||||||
cmp_vs1_vs2 |
x |
x |
x |
x |
x |
|||||||
cmp_vd_vs1_vs2 |
x |
|||||||||||
cp_vs2_edges |
f |
f |
f |
f |
f |
f |
f |
f |
f |
f |
f |
f |
cp_vs1_edges |
f |
f |
f |
f |
f |
|||||||
cr_vs2_vs1_edges |
f |
f |
f |
f |
f |
|||||||
cp_fs1_edges |
v |
v |
v |
v |
||||||||
cr_vs2_fs1_edges |
x |
x |
x |
x |
||||||||
cp_masking_edges |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
cr_vl_lmul |
lmul4max |
lmul4max |
lmul4max |
lmul4max |
lmul4max |
lmul4max |
lmul4max |
lmul4max |
x |
x |
x |
x |
cr_vtype_agnostic |
lmul4max |
lmul4max |
lmul4max |
lmul4max |
lmul4max |
lmul4max |
lmul4max |
lmul4max |
x |
x |
x |
x |
cp_vl_0 |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
cp_csr_fflags |
vn |
vn |
vn |
vn |
vn |
vn |
vn |
vn |
vn |
vd |
vdon |
v |
cp_csr_frm |
v |
v |
v |
v |
v |
v |
v |
v |
v |
v |
v |
|
std_vec |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
cp_custom_FpRecSqrtEst_flag_edges |
x |
|||||||||||
cp_custom_FpRecipEst_flag_edges |
x |
|||||||||||
cp_custom_FpRecSqrtEst_edges |
x |
|||||||||||
cp_custom_FpRecipEst_edges |
x |
|||||||||||
cp_custom_vfp_NaN_input |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
cp_custom_vfp_flags_set |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
cp_custom_vfp_flags |
nv_nx |
nv_nx |
nv_nx |
nv_nx |
nv_nx |
nv_nx |
nv_nx |
nv_nx |
nv_nx |
nv_dz |
nv_dz |
nv |
cp_custom_vfp_flags_inactive_not_set |
x |
| Instruction | vfmin.vf | vfmax.vv | vfmax.vf | vfsgnj.vv | vfsgnj.vf | vfsgnjn.vv | vfsgnjn.vf | vfsgnjx.vv | vfsgnjx.vf | vfredosum.vs | vfwredosum.vs | vfredusum.vs |
|---|---|---|---|---|---|---|---|---|---|---|---|---|
RV32 |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
RV64 |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
EFFEW16 |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
EFFEW32 |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
EFFEW64 |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
|
cp_asm_count |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
cp_vd |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
emul2 |
x |
cp_vs2 |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
cp_vs1 |
x |
x |
x |
x |
x |
emul2 |
x |
|||||
cp_fs1 |
x |
x |
x |
x |
x |
|||||||
cmp_vd_vs2 |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
|
cmp_vd_vs1 |
x |
x |
x |
x |
x |
emul2 |
x |
|||||
cmp_vs1_vs2 |
x |
x |
x |
x |
x |
x |
||||||
cmp_vd_vs1_vs2 |
x |
x |
x |
x |
x |
x |
||||||
cp_vs2_edges |
f |
f |
f |
f |
f |
f |
f |
f |
f |
f |
f |
f |
cp_vs1_edges |
f |
f |
f |
f |
f |
f_emul2 |
f |
|||||
cr_vs2_vs1_edges |
f |
f |
f |
f |
f |
fwred |
f |
|||||
cp_fs1_edges |
v |
v |
v |
v |
v |
|||||||
cr_vs2_fs1_edges |
x |
x |
x |
x |
x |
|||||||
cp_masking_edges |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
cr_vl_lmul |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
lmul4max |
x |
cr_vtype_agnostic |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
lmul4max |
x |
cp_vl_0 |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
cp_csr_fflags |
v |
v |
v |
von |
vn |
von |
||||||
cp_csr_frm |
v |
v |
v |
|||||||||
std_vec |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
cp_custom_vfp_NaN_input |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
cp_custom_vfredosum_ordered_sum |
x |
|||||||||||
cp_custom_vfredosum_NAN_vl0 |
x |
x |
||||||||||
cp_custom_vfp_flags_set |
x |
x |
x |
x |
x |
x |
||||||
cp_custom_vfp_flags |
nv |
nv |
nv |
nv_nx |
nv_nx |
nv_nx |
||||||
cp_custom |
wred |
| Instruction | vfwredusum.vs | vfredmax.vs | vfredmin.vs | vmfeq.vv | vmfeq.vf | vmfne.vv | vmfne.vf | vmflt.vv | vmflt.vf | vmfle.vv | vmfle.vf | vmfgt.vf |
|---|---|---|---|---|---|---|---|---|---|---|---|---|
RV32 |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
RV64 |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
EFFEW16 |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
EFFEW32 |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
EFFEW64 |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
|
cp_asm_count |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
cp_vd |
emul2 |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
cp_vs2 |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
cp_vs1 |
emul2 |
x |
x |
x |
x |
x |
x |
|||||
cp_fs1 |
x |
x |
x |
x |
x |
|||||||
cmp_vd_vs2 |
x |
x |
||||||||||
cmp_vd_vs1 |
emul2 |
x |
x |
|||||||||
cmp_vs1_vs2 |
x |
x |
x |
x |
x |
x |
||||||
cmp_vd_vs1_vs2 |
x |
x |
||||||||||
cp_vs2_edges |
f |
f |
f |
f |
f |
f |
f |
f |
f |
f |
f |
f |
cp_vs1_edges |
f_emul2 |
f |
f |
f |
f |
f |
f |
|||||
cr_vs2_vs1_edges |
fwred |
f |
f |
f |
f |
f |
f |
|||||
cp_fs1_edges |
v |
v |
v |
v |
v |
|||||||
cr_vs2_fs1_edges |
x |
x |
x |
x |
x |
|||||||
cp_masking_edges |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
cr_vl_lmul |
lmul4max |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
cr_vtype_agnostic |
lmul4max |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
cp_vl_0 |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
cp_csr_fflags |
vn |
v |
v |
v |
v |
v |
v |
v |
v |
v |
v |
v |
cp_csr_frm |
v |
|||||||||||
std_vec |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
cp_custom_vfp_NaN_input |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
cp_custom_vfp_flags_set |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
cp_custom_vfp_flags |
nv_nx |
nv |
nv |
nv |
nv |
nv |
nv |
nv |
nv |
nv |
nv |
nv |
cp_custom |
wred |
| Instruction | vmfge.vf | vfmerge.vfm | vfmv.v.f | vfmv.f.s | vfmv.s.f | vfslide1up.vf | vfslide1down.vf | vfcvt.xu.f.v | vfwcvt.xu.f.v | vfncvt.xu.f.w | vfcvt.x.f.v | vfwcvt.x.f.v |
|---|---|---|---|---|---|---|---|---|---|---|---|---|
RV32 |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
RV64 |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
EFFEW8 |
x |
|||||||||||
EFFEW16 |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
EFFEW32 |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
EFFEW64 |
x |
x |
x |
x |
x |
x |
x |
x |
x |
|||
cp_asm_count |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
cp_vd |
x |
nv0 |
x |
x |
x |
x |
x |
emul2 |
x |
x |
emul2 |
|
cp_fd |
x |
|||||||||||
cp_vs2 |
x |
nv0 |
x |
x |
x |
x |
x |
emul2 |
x |
x |
||
cp_fs1 |
x |
x |
x |
x |
x |
x |
||||||
cmp_vd_vs2 |
nv0 |
x |
x |
x |
||||||||
cp_vs2_edges |
f |
f |
f |
f |
f |
f |
f |
f_emul2 |
f |
f |
||
cp_fs1_edges |
v |
v |
v |
v |
v |
v |
||||||
cr_vs2_fs1_edges |
x |
x |
x |
x |
||||||||
cp_masking_edges |
x |
x |
x |
x |
x |
x |
x |
x |
x |
|||
cr_vl_lmul |
x |
x |
nomask |
nomask |
nomask |
x |
x |
x |
lmul4max |
lmul4max |
x |
lmul4max |
cr_vtype_agnostic |
x |
x |
nomask |
nomask |
nomask |
x |
x |
x |
lmul4max |
lmul4max |
x |
lmul4max |
cp_vl_0 |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
cp_csr_fflags |
v |
vn |
vn |
vn |
vn |
vn |
||||||
cp_csr_frm |
v |
v |
v |
v |
v |
|||||||
std_vec |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
cp_custom_vfp_state |
x |
|||||||||||
cp_custom_vfp_NaN_input |
x |
x |
x |
x |
x |
x |
x |
w |
x |
x |
||
cp_custom_fmv_sf_vd_all_lmul |
x |
|||||||||||
cp_custom_fmv_fs_vs2_all_lmul |
x |
|||||||||||
cp_custom_vfp_flags_set |
x |
x |
x |
x |
x |
x |
||||||
cp_custom_vfp_flags |
nv |
nv_nx |
nv_nx |
nv_nx |
nv_nx |
nv_nx |
||||||
cp_custom |
shift_wi |
| Instruction | vfncvt.x.f.w | vfcvt.rtz.xu.f.v | vfwcvt.rtz.xu.f.v | vfncvt.rtz.xu.f.w | vfcvt.rtz.x.f.v | vfwcvt.rtz.x.f.v | vfncvt.rtz.x.f.w | vfcvt.f.xu.v | vfwcvt.f.xu.v | vfncvt.f.xu.w | vfcvt.f.x.v | vfwcvt.f.x.v |
|---|---|---|---|---|---|---|---|---|---|---|---|---|
RV32 |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
RV64 |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
EFFEW8 |
x |
x |
x |
x |
x |
|||||||
EFFEW16 |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
EFFEW32 |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
EFFEW64 |
x |
x |
x |
x |
||||||||
cp_asm_count |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
cp_vd |
x |
x |
emul2 |
x |
x |
emul2 |
x |
x |
emul2 |
x |
x |
emul2 |
cp_vs2 |
emul2 |
x |
x |
emul2 |
x |
x |
emul2 |
x |
x |
emul2 |
x |
x |
cmp_vd_vs2 |
x |
x |
x |
x |
||||||||
cp_vs2_edges |
f_emul2 |
f |
f |
f_emul2 |
f |
f |
f_emul2 |
x |
x |
emul2 |
x |
x |
cp_masking_edges |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
cr_vl_lmul |
lmul4max |
x |
lmul4max |
lmul4max |
x |
lmul4max |
lmul4max |
x |
lmul4max |
lmul4max |
x |
lmul4max |
cr_vtype_agnostic |
lmul4max |
x |
lmul4max |
lmul4max |
x |
lmul4max |
lmul4max |
x |
lmul4max |
lmul4max |
x |
lmul4max |
cp_vl_0 |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
cp_csr_fflags |
vn |
vn |
vn |
vn |
vn |
vn |
vn |
n |
n |
n |
||
cp_csr_frm |
v |
v |
v |
v |
||||||||
std_vec |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
cp_custom_vfp_NaN_input |
w |
x |
x |
w |
x |
x |
w |
|||||
cp_custom_vfp_flags_set |
x |
x |
x |
x |
x |
x |
x |
|||||
cp_custom_vfp_flags |
nv_nx |
nv_nx |
nv_nx |
nv_nx |
nv_nx |
nv_nx |
nv_nx |
nx |
nx |
nx |
||
cp_custom |
shift_wi |
shift_wi |
shift_wi |
shift_wi |
| Instruction | vfncvt.f.x.w | vfwcvt.f.f.v | vfncvt.f.f.w | vfncvt.rod.f.f.w | vfclass.v |
|---|---|---|---|---|---|
RV32 |
x |
x |
x |
x |
x |
RV64 |
x |
x |
x |
x |
x |
EFFEW16 |
x |
x |
x |
x |
|
EFFEW32 |
x |
x |
x |
x |
x |
EFFEW64 |
x |
||||
cp_asm_count |
x |
x |
x |
x |
x |
cp_vd |
x |
emul2 |
x |
x |
x |
cp_vs2 |
emul2 |
x |
emul2 |
emul2 |
x |
cmp_vd_vs2 |
x |
||||
cp_vs2_edges |
emul2 |
f |
f_emul2 |
f_emul2 |
f |
cp_masking_edges |
x |
x |
x |
x |
x |
cr_vl_lmul |
lmul4max |
lmul4max |
lmul4max |
lmul4max |
x |
cr_vtype_agnostic |
lmul4max |
lmul4max |
lmul4max |
lmul4max |
x |
cp_vl_0 |
x |
x |
x |
x |
x |
cp_csr_fflags |
n |
v |
voun |
voun |
|
cp_csr_frm |
v |
v |
|||
std_vec |
x |
x |
x |
x |
x |
cp_custom_vfncvt_rup_overflow |
x |
x |
|||
cp_custom_vfp_NaN_input |
x |
w |
w |
x |
|
cp_custom_vfclass_onehot |
x |
||||
cp_custom_vfncvt_rod_overflow |
x |
||||
cp_custom_vfp_flags_set |
x |
x |
x |
||
cp_custom_vfp_flags |
nx |
nv |
nv_nx |
nv_nx |
|
cp_custom |
shift_wi |
shift_wi |
shift_wi |
| Normative Rule | Rule Text | Coverpoints |
|---|---|---|
vmfeq_vmfne_vmflt_vmfle_vmfgt_vmfge_vd_eq_v0 |
The destination mask vector register may be the same as the source vector mask register (v0). |
SsstrictV_vmfeq_vv_cg/cp_ssstrictv_masking_vd_eq_v0 |
vmflt_vmfle_vmfgt_vmfge_sqnan_invalid |
Vf16_vmflt_vv_cg/cp_custom_vfp_flags_nv |
|
vmfne_vdval1_nan |
VMFNE writes 1 to the destination element when either operand is NaN, |
Vf16_vmfeq_vv_cg/cp_custom_vfp_NaN_input |
vmfeq_vmflt_vmfle_vmfgt_vmfge_vdval0_nan |
whereas the other compares write 0 when either operand is NaN. |
Vf16_vmfeq_vv_cg/cp_custom_vfp_NaN_input |
vfmv_vs2_nv0_rsv |
The instruction must have the vs2 field set to v0, with all other values for vs2 reserved. |
SsstrictV_vfmv_v_f_cg/cp_ssstrictv_vfmv_vs2_not_v0_reserved |
vfmv-s-f_masked_rsv |
The encodings corresponding to the masked versions (vm=0) of VFMV.F.S and VFMV.S.F are reserved. |
SsstrictV_vfmv_s_f_cg/cp_ssstrictv_vfmv_fs_sf_vm0_reserved |
V_dependent_F_D |
Implicit: the F and D dependency is satisfied by the configuration under test; the vector floating-point tests cannot run without it |
|
vf_requires_vx |
Implicit: the vector floating-point tests cannot run unless the scalar floating-point extensions are present |
|
V_fp_reductions |
Vf32_vfredosum_vs_cg/cp_asm_count, Vf64_vfredosum_vs_cg/cp_asm_count, Vf32_vfwredosum_vs_cg/cp_asm_count, Vf32_vfwredusum_vs_cg/cp_asm_count |
|
Zve32f_instr_perm |
Vf32_vfmv_f_s_cg/cp_asm_count, Vf32_vfmv_s_f_cg/cp_asm_count, Vf32_vfslide1up_vf_cg/cp_asm_count, Vf32_vfslide1down_vf_cg/cp_asm_count |
|
Zve64d_instr_perm |
Vf64_vfmv_f_s_cg/cp_asm_count, Vf64_vfmv_s_f_cg/cp_asm_count, Vf64_vfslide1up_vf_cg/cp_asm_count, Vf64_vfslide1down_vf_cg/cp_asm_count |
UDB Parameters: None.
| vfredusum.vs is difficult to test because the results depend on the ordering. It may eventually need to exclude testing for multi-element vectors, but is presently passing multi-element vectors on the simulators tested. |
A.11.7. Temporarily Skipped Vector Tests
Some vector tests are currently skipped pending fixes to the Sail RISC-V reference model. These can be restored by uncommenting the corresponding generation lines or removing the hardcoded skips once the upstream issues are resolved:
-
vstartcoverpoint tests — skipped pending sail-riscv PR #1703. -
vmv<nr>r.vtests — skipped because Sail behavior is incorrect; tracked in sail-riscv issue #1709.
Both upstream fixes have since landed (sail-riscv PR #1703 was merged in June 2026 and issue #1709 was closed in May 2026), but the skips have not yet been removed. The vstart generation lines and the vmv<nr>r.v tests should be re-enabled once they have been verified against a Sail build that includes those fixes.
A.11.8. Zvfh Vector Half-Precision Floating-Point Extension
Half-precision vector floating-point is part of the Zvfh and Zvfhmin extensions, not the base V extension. Nevertheless, Zvfh tests are in the same directory structure as V, under Vf16. Zvfh uses Vf16 Table 130 to exercise all floating-point instructions with SEW=16. Zvfh’s conversions between 8-bit integers and binary16 (vfwcvt.f.x[u].v, vfncvt.x[u].f.w and vfncvt.rtz.x[u].f.w at SEW=8) are in Vf8. The Vf16 conversions between 16-bit integers and binary32 (vfwcvt.f.x[u].v, vfncvt.x[u].f.w and vfncvt.rtz.x[u].f.w at SEW=16) need only Zve32f, so they also run on harts without Zvfh.
A.11.9. Zvfhmin Half-Precision Conversions
Zvfhmin only exercises the widening and narrowing conversions: vfwcvt.f.f.v and vfncvt.f.f.w.
| Instruction | vfwcvt.f.f.v | vfncvt.f.f.w |
|---|---|---|
RV32 |
x |
x |
RV64 |
x |
x |
EFFEW16 |
x |
x |
cp_asm_count |
x |
x |
cp_vd |
emul2 |
x |
cp_vs2 |
x |
emul2 |
cp_vs2_edges |
f |
f_emul2 |
cp_masking_edges |
x |
x |
cr_vl_lmul |
lmul4max |
lmul4max |
cr_vtype_agnostic |
lmul4max |
lmul4max |
cp_vl_0 |
x |
x |
cp_csr_fflags |
v |
voun |
cp_csr_frm |
v |
No normative rules found for this section.
UDB Parameters: None.
A.11.10. Zvfbfmin BF16 Conversions
| Instruction | vfwcvtbf16.f.f.v | vfncvtbf16.f.f.w |
|---|---|---|
RV32 |
x |
x |
RV64 |
x |
x |
EFFEW16 |
x |
x |
cp_asm_count |
x |
x |
cp_vd |
emul2 |
x |
cp_vs2 |
x |
emul2 |
cp_vs2_edges |
f_bf16 |
f_emul2 |
cp_masking_edges |
x |
x |
cr_vl_lmul |
lmul4max |
lmul4max |
cr_vtype_agnostic |
lmul4max |
lmul4max |
cp_vl_0 |
x |
x |
cp_csr_fflags |
v |
voun |
cp_csr_frm |
v |
|
std_vec |
x |
|
cp_custom |
vfncvt_rup_overflow_bf16 |
| Normative Rule | Rule Text | Coverpoints |
|---|---|---|
Zvfbfmin_depends_Zve32f |
Definition, checked through UDB |
|
vfwcvtbf16-f-f-v_op |
Widening convert from BF16 to FP32. The conversion is exact. |
Zvfbfmin_vfwcvtbf16_f_f_v_cg/{cp_vd_emul2, cp_vs2, cp_vs2_edges_f_bf16_sew16, cp_masking_edges, cr_vl_lmul_lmul4max_sew16, cr_vtype_agnostic_lmul4max, cp_vl_0, cp_csr_fflags_v} |
vfwcvtbf16-f-f-v_enc |
Zvfbfmin_vfwcvtbf16_f_f_v_cg/cp_asm_count |
|
vfwcvtbf16-f-f-v_sew_rsv |
TODO: SsstrictV test with SEW other than 16 |
|
vfncvtbf16-f-f-w_op |
Narrowing convert from FP32 to BF16. Round according to the frm register. |
Zvfbfmin_vfncvtbf16_f_f_w_cg/{cp_vd, cp_vs2_emul2, cp_vs2_edges_f_emul2_sew16, cp_masking_edges, cr_vl_lmul_lmul4max_sew16, cr_vtype_agnostic_lmul4max, cp_vl_0, cp_csr_fflags_voun, cp_csr_frm_v} |
vfncvtbf16-f-f-w_enc |
Zvfbfmin_vfncvtbf16_f_f_w_cg/cp_asm_count |
|
vfncvtbf16-f-f-w_sew_rsv |
TODO: SsstrictV test with SEW other than 16 |
UDB Parameters: None.
A.11.11. Zvfbfwma BF16 MAC
| Instruction | vfwmaccbf16.vv | vfwmaccbf16.vf |
|---|---|---|
RV32 |
x |
x |
RV64 |
x |
x |
EFFEW16 |
x |
x |
cp_asm_count |
x |
x |
cp_vd |
emul2 |
emul2 |
cp_vs2 |
x |
x |
cp_vs1 |
x |
|
cp_fs1 |
x |
|
cmp_vs1_vs2 |
x |
|
cp_vs2_edges |
f_bf16 |
f_bf16 |
cp_vs1_edges |
f_bf16 |
|
cr_vs2_vs1_edges |
f_bf16 |
|
cp_fs1_edges |
v_bf16 |
|
cr_vs2_fs1_edges |
bf16 |
|
cp_masking_edges |
x |
x |
cr_vl_lmul |
lmul4max |
lmul4max |
cr_vtype_agnostic |
lmul4max |
lmul4max |
cp_vl_0 |
x |
x |
cp_csr_fflags |
voun |
voun |
cp_csr_frm |
v |
v |
| Normative Rule | Rule Text | Coverpoints |
|---|---|---|
vfwmaccbf16_op |
Zvfbfwma_vfwmaccbf16_vv_cg/cr_vs2_vs1_edges_f_bf16_sew16, Zvfbfwma_vfwmaccbf16_vf_cg/cr_vs2_fs1_edges_f_bf16_sew16 |
|
vfwmaccbf16-vf |
Zvfbfwma_vfwmaccbf16_vf_cg/cr_vs2_fs1_edges_f_bf16_sew16 |
|
bf16_subnorm |
Zvfbfwma_vfwmaccbf16_vv_cg/cr_vs2_vs1_edges_f_bf16_sew16, Zvfbfwma_vfwmaccbf16_vf_cg/cr_vs2_fs1_edges_f_bf16_sew16 |
|
vfwmaccbf16_sew_rsv |
||
vfwmaccbf16-vv |
Zvfbfwma_vfwmaccbf16_vv_cg/cr_vs2_vs1_edges_f_bf16_sew16 |
|
Zvfbfwma_depends |
This extension depends upon the |
Definition, checked through UDB |
vfwmaccbf16_encoding_vv |
Zvfbfwma_vfwmaccbf16_vv_cg/cp_asm_count |
|
vfwmaccbf16_encoding_vf |
Zvfbfwma_vfwmaccbf16_vf_cg/cp_asm_count |
UDB Parameters: None.
A.12. Zvb* Vector Bit Manipulation Extension
Vector bit manipulation extensions include Zvbb and Zvbc. They use the same coverpoint definitions as Vx.
A.12.1. Zvbb Vector Basic Bit Manipulation Extension
Zvbb is organized by SEW like other unprivileged vector extensions.
| Instruction | vandn.vv | vandn.vx | vbrev.v | vbrev8.v | vrev8.v | vclz.v | vctz.v | vcpop.v | vrol.vv | vrol.vx | vror.vv | vror.vx |
|---|---|---|---|---|---|---|---|---|---|---|---|---|
RV32 |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
RV64 |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
EFFEW8 |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
EFFEW16 |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
EFFEW32 |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
EFFEW64 |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
cp_asm_count |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
cp_vd |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
cp_vs2 |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
cp_vs1 |
x |
x |
x |
|||||||||
cp_rs1 |
x |
x |
x |
|||||||||
cmp_vd_vs2 |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
cmp_vd_vs1 |
x |
x |
x |
|||||||||
cmp_vs1_vs2 |
x |
x |
x |
|||||||||
cmp_vd_vs1_vs2 |
x |
x |
x |
|||||||||
cp_vs2_edges |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
cp_vs1_edges |
x |
x |
x |
|||||||||
cr_vs2_vs1_edges |
x |
x |
x |
|||||||||
cp_rs1_edges |
x |
x |
x |
|||||||||
cr_vs2_rs1_edges |
x |
x |
x |
|||||||||
cp_masking_edges |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
cr_vl_lmul |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
cr_vtype_agnostic |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
cp_vl_0 |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
| Instruction | vror.vi | vwsll.vv | vwsll.vx | vwsll.vi |
|---|---|---|---|---|
RV32 |
x |
x |
x |
x |
RV64 |
x |
x |
x |
x |
EFFEW8 |
x |
x |
x |
x |
EFFEW16 |
x |
x |
x |
x |
EFFEW32 |
x |
x |
x |
x |
EFFEW64 |
x |
|||
cp_asm_count |
x |
x |
x |
x |
cp_vd |
x |
emul2 |
emul2 |
emul2 |
cp_vs2 |
x |
x |
x |
x |
cp_vs1 |
x |
|||
cp_rs1 |
x |
|||
cp_imm_5bit |
u |
|||
cp_uimm |
6bit_v |
|||
cmp_vd_vs2 |
x |
|||
cmp_vs1_vs2 |
x |
|||
cp_vs2_edges |
x |
x |
x |
x |
cp_vs1_edges |
x |
|||
cr_vs2_vs1_edges |
x |
|||
cp_rs1_edges |
x |
|||
cr_vs2_rs1_edges |
x |
|||
cr_vs2_imm_edges |
6bit_u |
u |
||
cp_masking_edges |
x |
x |
x |
x |
cr_vl_lmul |
x |
lmul4max |
lmul4max |
lmul4max |
cr_vtype_agnostic |
x |
lmul4max |
lmul4max |
lmul4max |
cp_vl_0 |
x |
x |
x |
x |
std_vec |
x |
x |
x |
|
cp_custom |
wvv_all |
wvx_all |
wvx_all |
| Normative Rule | Rule Text | Coverpoints |
|---|---|---|
Zvbb_dependent_Zve32x |
Definition, checked through UDB |
|
Zvbb_eew |
Zvbb8_vclz_v_cg/cp_asm_count, Zvbb16_vclz_v_cg/cp_asm_count, Zvbb32_vclz_v_cg/cp_asm_count |
|
vandn_op |
Each bit of Op1 is inverted and logically ANDed with the corresponding bits in vs2. |
Zvbb16_vandn_vv_cg/cp_vd |
vandn-vx_rs1 |
In the vector-scalar version, Op1 is the sign-extended or truncated value in scalar register rs1. |
Zvbb16_vandn_vx_cg/cp_rs1_edges |
vandn-vv_vs1 |
Zvbb16_vandn_vv_cg/cp_vs1 |
|
vbrev-v_op |
Zvbb8_vbrev_v_cg/cp_vs2_edges, Zvbb8_vbrev_v_cg/cr_vl_lmul_sew8, Zvbb64_vbrev_v_cg/cp_vs2_edges, Zvbb64_vbrev_v_cg/cr_vl_lmul_sew64 |
|
vbrev8-v_op |
Zvbb16_vbrev8_v_cg/cp_vd |
|
vclz-v_op |
Zvbb16_vclz_v_cg/cp_vs2_edges, Zvbb8_vclz_v_cg/cp_vs2_edges, Zvbb8_vclz_v_cg/cr_vl_lmul_sew8, Zvbb64_vclz_v_cg/cp_vs2_edges, Zvbb64_vclz_v_cg/cr_vl_lmul_sew64 |
|
vcpop-v_op |
Zvbb16_vcpop_v_cg/cp_vd, Zvbb8_vcpop_v_cg/cp_vs2_edges, Zvbb8_vcpop_v_cg/cr_vl_lmul_sew8, Zvbb64_vcpop_v_cg/cp_vs2_edges, Zvbb64_vcpop_v_cg/cr_vl_lmul_sew64 |
|
vctz-v_op |
Zvbb16_vctz_v_cg/cp_vd, Zvbb8_vctz_v_cg/cp_vs2_edges, Zvbb8_vctz_v_cg/cr_vl_lmul_sew8, Zvbb64_vctz_v_cg/cp_vs2_edges, Zvbb64_vctz_v_cg/cr_vl_lmul_sew64 |
|
vrev8-v_op |
A byte reversal is performed on each element of vs2, effectively performing an endian swap. |
Zvbb16_vrev8_v_cg/cp_vd |
vrol_op |
Zvbb16_vrol_vv_cg/cp_vs1_edges, Zvbb16_vrol_vx_cg/cp_rs1_edges |
|
vror_op |
Zvbb16_vror_vx_cg/cp_rs1_edges |
|
vwsll_op |
Zvbb16_vwsll_vx_cg/cp_rs1_edges, Zvbb8_vwsll_vv_cg/cr_vs2_vs1_edges, Zvbb8_vwsll_vx_cg/cr_vs2_rs1_edges, Zvbb8_vwsll_vi_cg/cr_vs2_imm_edges, Zvbb32_vwsll_vv_cg/cr_vs2_vs1_edges |
|
Zvbb_eew_Zve64x |
If |
Zvbb64_vclz_v_cg/cp_asm_count |
vclz-v_op_zeroinput |
Zvbb8_vclz_v_cg/cp_vs2_edges, Zvbb16_vclz_v_cg/cp_vs2_edges, Zvbb32_vclz_v_cg/cp_vs2_edges, Zvbb64_vclz_v_cg/cp_vs2_edges |
UDB Parameters: None.
A.12.2. Zvbc Vector Carryless Multiplication Extension
Zvbc only applies to SEW=64.
| Instruction | vclmul.vv | vclmul.vx | vclmulh.vv | vclmulh.vx |
|---|---|---|---|---|
RV32 |
x |
x |
x |
x |
RV64 |
x |
x |
x |
x |
EFFEW64 |
x |
x |
x |
x |
cp_asm_count |
x |
x |
x |
x |
cp_vd |
x |
x |
x |
x |
cp_vs2 |
x |
x |
x |
x |
cp_vs1 |
x |
x |
||
cp_rs1 |
x |
x |
||
cmp_vd_vs2 |
x |
x |
x |
x |
cmp_vd_vs1 |
x |
x |
||
cmp_vs1_vs2 |
x |
x |
||
cmp_vd_vs1_vs2 |
x |
x |
||
cp_vs2_edges |
x |
x |
x |
x |
cp_vs1_edges |
x |
x |
||
cr_vs2_vs1_edges |
x |
x |
||
cp_rs1_edges |
x |
x |
||
cr_vs2_rs1_edges |
x |
x |
||
cp_masking_edges |
x |
x |
x |
x |
cr_vl_lmul |
x |
x |
x |
x |
cr_vtype_agnostic |
x |
x |
x |
x |
cp_vl_0 |
x |
x |
x |
x |
| Normative Rule | Rule Text | Coverpoints |
|---|---|---|
Zvbc_dependent_Zve64x |
Definition, checked through UDB |
|
Zvbc_sew64only |
Zvbc64_vclmul_vv_cg/cp_asm_count, Zvbc64_vclmul_vx_cg/cp_asm_count, Zvbc64_vclmulh_vv_cg/cp_asm_count, Zvbc64_vclmulh_vx_cg/cp_asm_count |
|
vclmul_sewn64_rsv |
Out-of-Scope: reserved because of CSR state (vtype.sew); no Ssstrict-equivalent suite exists for Zvbc to exercise this reserved SEW encoding |
|
vclmul_op |
Zvbc64_vclmul_vv_cg/cp_vs2_edges, Zvbc64_vclmul_vv_cg/cr_vs2_vs1_edges, Zvbc64_vclmul_vv_cg/cr_vl_lmul_sew64, Zvbc64_vclmul_vx_cg/cr_vs2_rs1_edges, Zvbc64_vclmul_vx_cg/cr_vl_lmul_sew64 |
|
vclmulh_sewn64_rsv |
Out-of-Scope: reserved because of CSR state (vtype.sew); no Ssstrict-equivalent suite exists for Zvbc to exercise this reserved SEW encoding |
|
vclmulh_op |
Zvbc64_vclmulh_vv_cg/cp_vs2_edges, Zvbc64_vclmulh_vv_cg/cr_vs2_vs1_edges, Zvbc64_vclmulh_vv_cg/cr_vl_lmul_sew64, Zvbc64_vclmulh_vx_cg/cr_vs2_rs1_edges, Zvbc64_vclmulh_vx_cg/cr_vl_lmul_sew64 |
UDB Parameters: None.
A.13. Zvk* Vector Cryptography Extension
There are several Zvk* vector cryptography extensions.
A.13.1. Zvkb Vector Crypto Bit Manipulation Extension
Each SEW has its own suite.
| Instruction | vandn.vv | vandn.vx | vbrev8.v | vrev8.v | vrol.vv | vrol.vx | vror.vv | vror.vx | vror.vi |
|---|---|---|---|---|---|---|---|---|---|
RV32 |
x |
x |
x |
x |
x |
x |
x |
x |
x |
RV64 |
x |
x |
x |
x |
x |
x |
x |
x |
x |
EFFEW8 |
x |
x |
x |
x |
x |
x |
x |
x |
x |
EFFEW16 |
x |
x |
x |
x |
x |
x |
x |
x |
x |
EFFEW32 |
x |
x |
x |
x |
x |
x |
x |
x |
x |
EFFEW64 |
x |
x |
x |
x |
x |
x |
x |
x |
x |
cp_asm_count |
x |
x |
x |
x |
x |
x |
x |
x |
x |
cp_vd |
x |
x |
x |
x |
x |
x |
x |
x |
x |
cp_vs2 |
x |
x |
x |
x |
x |
x |
x |
x |
x |
cp_vs1 |
x |
x |
x |
||||||
cp_rs1 |
x |
x |
x |
||||||
cp_uimm |
6bit_v |
||||||||
cmp_vd_vs2 |
x |
x |
x |
x |
x |
x |
x |
x |
x |
cmp_vd_vs1 |
x |
x |
x |
||||||
cmp_vs1_vs2 |
x |
x |
x |
||||||
cmp_vd_vs1_vs2 |
x |
x |
x |
||||||
cp_vs2_edges |
x |
x |
x |
x |
x |
x |
x |
x |
x |
cp_vs1_edges |
x |
x |
x |
||||||
cr_vs2_vs1_edges |
x |
x |
x |
||||||
cp_rs1_edges |
x |
x |
x |
||||||
cr_vs2_rs1_edges |
x |
x |
x |
||||||
cr_vs2_imm_edges |
6bit_u |
||||||||
cp_masking_edges |
x |
x |
x |
x |
x |
x |
x |
x |
x |
cr_vl_lmul |
x |
x |
x |
x |
x |
x |
x |
x |
x |
cr_vtype_agnostic |
x |
x |
x |
x |
x |
x |
x |
x |
x |
cp_vl_0 |
x |
x |
x |
x |
x |
x |
x |
x |
x |
| Normative Rule | Rule Text | Coverpoints |
|---|---|---|
zvk_dataindep_timing |
TODO: data-independent execution timing (a side-channel-resistance property) cannot be observed from a final-state signature comparison |
|
veccrypto_eeweqsew |
For all of the vector crypto instructions in this specification, EEW=SEW. |
TODO: EEW=SEW is inherent in every vector-crypto instruction’s encoding; no dedicated coverpoint isolates it |
veccrypto_vl_vstart_egsconstr |
TODO: no coverpoint verifies vl/vstart are rejected when not a multiple of EGS - the functional suites only ever generate compliant values |
|
veccrypto_vl_vstart_rsv |
Instructions that violate the |
TODO: no Ssstrict-equivalent suite exists for the vector-crypto extensions to exercise vl/vstart values that violate the EGS constraint |
veccrypto_lmul_egwconstr |
TODO: no ExceptionsZvk-style suite exists yet to exercise the LMUL*VLEN<EGW illegal-instruction condition |
|
veccrypto_sew_rsv |
Out-of-Scope: reserved because of CSR state (vtype.sew); no Ssstrict-equivalent suite exists to exercise these reserved SEW encodings; see the per-instruction _sewn32_rsv/_sewn64_rsv rules in each extension’s own file |
|
veccrypto_vsins_vs2 |
Zvkned_vaesdf_vs_cg/cp_vs2_egs4 |
|
veccrypto_vsins_vdvs2overlap |
TODO: this is an SsstrictV-style reserved-encoding test; no register-overlap coverpoint exists yet for the *.vs instruction forms (e.g. Zvkned_vaesdf_vs_cg has no cmp_vd_vs2-style coverpoint) |
|
veccrypto_vsins_vd |
they return vector results to vd, which is also a source vector operand. |
Zvkg_vghsh_vv_cg/cp_vd_egs4 |
Zvknhb_Zvkn_Zvknc_Zvkng_Zvksc_depZve64x |
TODO: extension-composition fact; no dedicated coverpoint exists for it (Zvkn/Zvknc/Zvkng/Zvksc are not separate suites in this repo) |
|
Zvkb_Zvkg_Zvkned_Zvknha_Zvksed_Zvksh_Zvks_Zvksc_Zvksg_Zvkt_depZve32x |
TODO: extension-composition fact; no dedicated coverpoint exists for it (Zvks/Zvksc/Zvksg/Zvkt are not separate suites in this repo) |
|
veccrypto_indepZkt |
TODO: independence from an unrelated extension’s implementation is not something a coverpoint can assert one way or the other |
|
vandn_op |
Each bit of Op1 is inverted and logically ANDed with the corresponding bits in vs2. |
Zvkb8_vandn_vv_cg/cr_vs2_vs1_edges, Zvkb8_vandn_vx_cg/cr_vs2_rs1_edges, Zvkb64_vandn_vv_cg/cr_vs2_vs1_edges, Zvkb64_vandn_vx_cg/cr_vs2_rs1_edges |
vandn-vx_rs1 |
In the vector-scalar version, Op1 is the sign-extended or truncated value in scalar register rs1. |
Zvkb8_vandn_vx_cg/cr_vs2_rs1_edges, Zvkb16_vandn_vx_cg/cr_vs2_rs1_edges, Zvkb32_vandn_vx_cg/cr_vs2_rs1_edges, Zvkb64_vandn_vx_cg/cr_vs2_rs1_edges |
vandn-vv_vs1 |
Zvkb8_vandn_vv_cg/cr_vs2_vs1_edges, Zvkb16_vandn_vv_cg/cr_vs2_vs1_edges, Zvkb32_vandn_vv_cg/cr_vs2_vs1_edges, Zvkb64_vandn_vv_cg/cr_vs2_vs1_edges |
|
vbrev8-v_op |
Zvkb8_vbrev8_v_cg/{cp_vs2_edges, cr_vl_lmul_sew8}, Zvkb64_vbrev8_v_cg/{cp_vs2_edges, cr_vl_lmul_sew64} |
|
vrev8-v_op |
A byte reversal is performed on each element of vs2, effectively performing an endian swap. |
Zvkb8_vrev8_v_cg/{cp_vs2_edges, cr_vl_lmul_sew8}, Zvkb64_vrev8_v_cg/{cp_vs2_edges, cr_vl_lmul_sew64} |
vrol_op |
Zvkb8_vrol_vv_cg/cr_vs2_vs1_edges, Zvkb8_vrol_vx_cg/cr_vs2_rs1_edges, Zvkb64_vrol_vv_cg/cr_vs2_vs1_edges, Zvkb64_vrol_vx_cg/cr_vs2_rs1_edges |
|
vror_op |
Zvkb8_vror_vv_cg/cr_vs2_vs1_edges, Zvkb8_vror_vx_cg/cr_vs2_rs1_edges, Zvkb8_vror_vi_cg/cr_vs2_imm_edges, Zvkb64_vror_vi_cg/cr_vs2_imm_edges, TODO: vror.vi with i5=1 (rotate amounts 32-63 at SEW=64) |
|
Zvkt_req |
Untestable: microarchitectural timing |
|
Zvkt_diel_def |
Untestable: microarchitectural timing |
|
Zvkt_diel_constants_exempt |
Untestable: microarchitectural timing |
|
Zvkt_diel_control_exempt |
Untestable: microarchitectural timing |
UDB Parameters: None.
A.13.2. Zvkg Vector Crypto Galois Field Extension
Only SEW=32 is defined.
| Instruction | vghsh.vv | vgmul.vv |
|---|---|---|
RV32 |
x |
x |
RV64 |
x |
x |
EFFEW32 |
x |
x |
cp_asm_count |
x |
x |
cp_vd |
egs4 |
egs4 |
cp_vs2 |
egs4 |
egs4 |
cp_vs1 |
egs4 |
|
cmp_vd_vs2 |
egs4 |
egs4 |
cmp_vd_vs1 |
egs4 |
|
cmp_vs1_vs2 |
egs4 |
|
cmp_vd_vs1_vs2 |
egs4 |
|
cp_vs2_edges |
egs4 |
egs4 |
cp_vs1_edges |
egs4 |
|
cp_vd_edges |
egs4 |
egs4 |
cr_vs2_vs1_edges |
egs4 |
|
cr_vs1_vd_edges |
egs4 |
|
cr_vs2_vd_edges |
egs4 |
egs4 |
cr_vl_lmul |
egs4 |
egs4 |
cr_vtype_agnostic |
egs4 |
egs4 |
cp_custom |
nist_gcm |
nist_gcm |
| Normative Rule | Rule Text | Coverpoints |
|---|---|---|
Zvkg_egw128b_elem32b |
All of these instructions work on 128-bit element groups comprised of four 32-bit elements. |
Zvkg_vghsh_vv_cg/cp_csr_vtype_lmul_egs4_sew32, Zvkg_vghsh_vv_cg/cr_vl_lmul_egs4_sew32, Zvkg_vgmul_vv_cg/cr_vl_lmul_egs4_sew32 |
Zvkg_dataindeptiming |
Untestable: microarchitectural timing |
|
Zvkg_vl |
Zvkg_vghsh_vv_cg/cr_vl_lmul_egs4_sew32, Zvkg_vgmul_vv_cg/cr_vl_lmul_egs4_sew32 |
|
Zvkg_vstart |
TODO: no coverpoint samples vstart for this suite yet; nothing wired in coverpoints/unpriv/Zvkg_coverage.svh |
|
vghsh-vv_sewn32_rsv |
Out-of-Scope: reserved because of CSR state (vtype.sew); Zvkg only generates SEW=32 tests and there is no Ssstrict-equivalent suite for vector-crypto |
|
vghsh-vv_op |
Zvkg_vghsh_vv_cg/cp_vd_egs4, Zvkg_vghsh_vv_cg/cr_vs2_vs1_edges_egs4, Zvkg_vghsh_vv_cg/cr_vs1_vd_edges_egs4, Zvkg_vghsh_vv_cg/cr_vs2_vd_edges_egs4, Zvkg_vghsh_vv_cg/cr_vl_lmul_egs4_sew32 |
|
vghsh-vv_exeindepdata |
Untestable: microarchitectural timing |
|
vgmul-vv_sewn32_rsv |
Out-of-Scope: reserved because of CSR state (vtype.sew); Zvkg only generates SEW=32 tests and there is no Ssstrict-equivalent suite for vector-crypto |
|
vgmul-vv_op |
Zvkg_vgmul_vv_cg/cp_vd_egs4, Zvkg_vgmul_vv_cg/cr_vs2_vd_edges_egs4, Zvkg_vgmul_vv_cg/cr_vl_lmul_egs4_sew32 |
|
vgmul-vv_exeindepdata |
Untestable: microarchitectural timing |
|
vghsh-vv_op_gf |
Zvkg_vghsh_vv_cg/{cr_vs2_vs1_edges_egs4, cr_vs1_vd_edges_egs4, cr_vs2_vd_edges_egs4} |
|
vghsh-vv_op_coeff |
Zvkg_vghsh_vv_cg/{cr_vs2_vs1_edges_egs4, cr_vs1_vd_edges_egs4, cr_vs2_vd_edges_egs4} |
|
vgmul-vv_op_gf |
Zvkg_vgmul_vv_cg/cr_vs2_vd_edges_egs4 |
|
vgmul-vv_op_coeff |
Zvkg_vgmul_vv_cg/cr_vs2_vd_edges_egs4 |
UDB Parameters: None.
A.13.3. Zvkned Vector NIST Encryption and Decryption
Only SEW=32 is defined.
| Instruction | vaesef.vv | vaesef.vs | vaesem.vv | vaesem.vs | vaesdf.vv | vaesdf.vs | vaesdm.vv | vaesdm.vs | vaeskf1.vi | vaeskf2.vi | vaesz.vs |
|---|---|---|---|---|---|---|---|---|---|---|---|
RV32 |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
RV64 |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
EFFEW32 |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
cp_asm_count |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
cp_vd |
egs4 |
egs4 |
egs4 |
egs4 |
egs4 |
egs4 |
egs4 |
egs4 |
egs4 |
egs4 |
egs4 |
cp_vs2 |
egs4 |
egs4 |
egs4 |
egs4 |
egs4 |
egs4 |
egs4 |
egs4 |
egs4 |
egs4 |
egs4 |
cp_imm_5bit |
u |
u |
|||||||||
cmp_vd_vs2 |
egs4 |
egs4 |
egs4 |
egs4 |
egs4 |
egs4 |
|||||
cp_vs2_edges |
egs4 |
egs4 |
egs4 |
egs4 |
egs4 |
egs4 |
egs4 |
egs4 |
egs4_subbytes |
egs4_subbytes |
egs4 |
cp_vd_edges |
egs4_subbytes |
egs4_subbytes |
egs4_subbytes |
egs4_subbytes |
egs4_subbytes |
egs4_subbytes |
egs4_subbytes |
egs4_subbytes |
egs4 |
egs4 |
|
cr_vs2_vd_edges |
egs4_subbytes |
egs4_subbytes |
egs4_subbytes |
egs4_subbytes |
egs4_subbytes |
egs4_subbytes |
egs4_subbytes |
egs4_subbytes |
egs4_subbytes_vs2 |
egs4 |
|
cr_vl_lmul |
egs4 |
egs4 |
egs4 |
egs4 |
egs4 |
egs4 |
egs4 |
egs4 |
egs4 |
egs4 |
egs4 |
cr_vtype_agnostic |
egs4 |
egs4 |
egs4 |
egs4 |
egs4 |
egs4 |
egs4 |
egs4 |
egs4 |
egs4 |
egs4 |
cp_vl_0 |
egs4 |
egs4 |
|||||||||
cp_custom |
act3_crypto |
act3_crypto |
act3_crypto |
act3_crypto |
act3_crypto |
act3_crypto |
act3_crypto |
act3_crypto |
act3_crypto |
act3_crypto |
act3_crypto |
| Normative Rule | Rule Text | Coverpoints |
|---|---|---|
Zvkned_egw128b_elem32b |
All of these instructions work on 128-bit element groups comprised of four 32-bit elements. |
Zvkned_vaesef_vv_cg/cp_csr_vtype_lmul_egs4_sew32, Zvkned_vaesef_vv_cg/cr_vl_lmul_egs4_sew32, Zvkned_vaeskf1_vi_cg/cr_vl_lmul_egs4_sew32, Zvkned_vaesz_vs_cg/cr_vl_lmul_egs4_sew32 |
Zvkned_dataindeptiming |
Untestable: microarchitectural timing |
|
Zvkned_vl |
Zvkned_vaesef_vv_cg/cr_vl_lmul_egs4_sew32, Zvkned_vaeskf1_vi_cg/cr_vl_lmul_egs4_sew32, Zvkned_vaesz_vs_cg/cr_vl_lmul_egs4_sew32 |
|
Zvkned_vstart |
TODO: no coverpoint samples a vstart-multiple-of-EGS constraint for Zvkned; only vl is exercised |
|
vaesdf_final |
Zvkned_vaesdf_vv_cg/cp_vd_egs4, Zvkned_vaesdf_vv_cg/cr_vs2_vd_edges_egs4_subbytes_0, Zvkned_vaesdf_vv_cg/cr_vl_lmul_egs4_sew32, Zvkned_vaesdf_vs_cg/cr_vs2_vd_edges_egs4_subbytes_0, Zvkned_vaesdf_vs_cg/cr_vl_lmul_egs4_sew32 |
|
vaesdf_ops |
The InvShiftRows and InvSubBytes steps are applied to each round state element group from vd. |
Zvkned_vaesdf_vv_cg/cp_vd_egs4, Zvkned_vaesdf_vv_cg/cp_vd_edges_egs4_byte_0, Zvkned_vaesdf_vv_cg/cp_vd_edges_egs4_byte_15, Zvkned_vaesdf_vs_cg/cp_vd_edges_egs4_byte_0, Zvkned_vaesdf_vs_cg/cp_vd_edges_egs4_byte_15 |
vaesdf_xor_form |
{Zvkned_vaesdf_vv_cg,Zvkned_vaesdf_vs_cg}/cp_vs2_egs4, Zvkned_vaesdf_vv_cg/cp_vs2_edges_egs4, Zvkned_vaesdf_vv_cg/cr_vs2_vd_edges_egs4_subbytes_0, Zvkned_vaesdf_vs_cg/cp_vs2_edges_egs4, Zvkned_vaesdf_vs_cg/cr_vs2_vd_edges_egs4_subbytes_0 |
|
vaesdm_mid |
Zvkned_vaesdm_vv_cg/cp_vd_egs4, Zvkned_vaesdm_vv_cg/cr_vs2_vd_edges_egs4_subbytes_0, Zvkned_vaesdm_vv_cg/cr_vl_lmul_egs4_sew32, Zvkned_vaesdm_vs_cg/cr_vs2_vd_edges_egs4_subbytes_0, Zvkned_vaesdm_vs_cg/cr_vl_lmul_egs4_sew32 |
|
vaesdm_ops |
The InvShiftRows and InvSubBytes steps are applied to each round state element group from vd. |
Zvkned_vaesdm_vv_cg/cp_vd_egs4, Zvkned_vaesdm_vv_cg/cp_vd_edges_egs4_byte_0, Zvkned_vaesdm_vv_cg/cp_vd_edges_egs4_byte_15, Zvkned_vaesdm_vs_cg/cp_vd_edges_egs4_byte_0, Zvkned_vaesdm_vs_cg/cp_vd_edges_egs4_byte_15 |
vaesdm_xor_form |
{Zvkned_vaesdm_vv_cg,Zvkned_vaesdm_vs_cg}/cp_vs2_egs4, Zvkned_vaesdm_vv_cg/cp_vs2_edges_egs4, Zvkned_vaesdm_vv_cg/cr_vs2_vd_edges_egs4_subbytes_0, Zvkned_vaesdm_vs_cg/cp_vs2_edges_egs4, Zvkned_vaesdm_vs_cg/cr_vs2_vd_edges_egs4_subbytes_0 |
|
vaesdm_invmix |
Zvkned_vaesdm_vv_cg/cp_vd_egs4, Zvkned_vaesdm_vv_cg/cr_vs2_vd_edges_egs4_subbytes_0, Zvkned_vaesdm_vs_cg/cr_vs2_vd_edges_egs4_subbytes_0 |
|
vaesef_final |
A final-round encryption function of the AES block cipher is performed. |
Zvkned_vaesef_vv_cg/cp_vd_egs4, Zvkned_vaesef_vv_cg/cr_vs2_vd_edges_egs4_subbytes_0, Zvkned_vaesef_vv_cg/cr_vl_lmul_egs4_sew32, Zvkned_vaesef_vs_cg/cr_vs2_vd_edges_egs4_subbytes_0, Zvkned_vaesef_vs_cg/cr_vl_lmul_egs4_sew32 |
vaesef_ops |
The SubBytes and ShiftRows steps are applied to each round state element group from vd. |
Zvkned_vaesef_vv_cg/cp_vd_egs4, Zvkned_vaesef_vv_cg/cp_vd_edges_egs4_byte_0, Zvkned_vaesef_vv_cg/cp_vd_edges_egs4_byte_15, Zvkned_vaesef_vs_cg/cp_vd_edges_egs4_byte_0, Zvkned_vaesef_vs_cg/cp_vd_edges_egs4_byte_15 |
vaesef_xor_form |
{Zvkned_vaesef_vv_cg,Zvkned_vaesef_vs_cg}/cp_vs2_egs4, Zvkned_vaesef_vv_cg/cp_vs2_edges_egs4, Zvkned_vaesef_vv_cg/cr_vs2_vd_edges_egs4_subbytes_0, Zvkned_vaesef_vs_cg/cp_vs2_edges_egs4, Zvkned_vaesef_vs_cg/cr_vs2_vd_edges_egs4_subbytes_0 |
|
vaesem_mid |
A middle-round encryption function of the AES block cipher is performed. |
Zvkned_vaesem_vv_cg/cp_vd_egs4, Zvkned_vaesem_vv_cg/cr_vs2_vd_edges_egs4_subbytes_0, Zvkned_vaesem_vv_cg/cr_vl_lmul_egs4_sew32, Zvkned_vaesem_vs_cg/cr_vs2_vd_edges_egs4_subbytes_0, Zvkned_vaesem_vs_cg/cr_vl_lmul_egs4_sew32 |
vaesem_ops |
The SubBytes, ShiftRows, and MixColumns steps are applied to each round state element group from vd. |
Zvkned_vaesem_vv_cg/cp_vd_egs4, Zvkned_vaesem_vv_cg/cp_vd_edges_egs4_byte_0, Zvkned_vaesem_vv_cg/cp_vd_edges_egs4_byte_15, Zvkned_vaesem_vs_cg/cp_vd_edges_egs4_byte_0, Zvkned_vaesem_vs_cg/cp_vd_edges_egs4_byte_15 |
vaesem_xor_form |
{Zvkned_vaesem_vv_cg,Zvkned_vaesem_vs_cg}/cp_vs2_egs4, Zvkned_vaesem_vv_cg/cp_vs2_edges_egs4, Zvkned_vaesem_vv_cg/cr_vs2_vd_edges_egs4_subbytes_0, Zvkned_vaesem_vs_cg/cp_vs2_edges_egs4, Zvkned_vaesem_vs_cg/cr_vs2_vd_edges_egs4_subbytes_0 |
|
vaeskf1_round |
A single round of the forward AES-128 KeySchedule is performed. |
Zvkned_vaeskf1_vi_cg/cp_vd_egs4, Zvkned_vaeskf1_vi_cg/cp_imm_5bit_u, Zvkned_vaeskf1_vi_cg/cp_vs2_edges_egs4_byte_0, Zvkned_vaeskf1_vi_cg/cp_vs2_edges_egs4_byte_15, Zvkned_vaeskf1_vi_cg/cr_vl_lmul_egs4_sew32 |
vaeskf1_wordgen |
Zvkned_vaeskf1_vi_cg/cp_vs2_egs4, Zvkned_vaeskf1_vi_cg/cp_vs2_edges_egs4_byte_0, Zvkned_vaeskf1_vi_cg/cp_vs2_edges_egs4_byte_15 |
|
vaeskf1_uimm_src |
ranges from 1 to 10, comes from uimm[3:0]; uimm[4] is ignored. |
Zvkned_vaeskf1_vi_cg/cp_imm_5bit_u |
vaeskf1_uimm_map |
Zvkned_vaeskf1_vi_cg/cp_imm_5bit_u |
|
vaeskf2_round |
A single round of the forward AES-256 KeySchedule is performed. |
Zvkned_vaeskf2_vi_cg/cp_vd_egs4, Zvkned_vaeskf2_vi_cg/cp_imm_5bit_u, Zvkned_vaeskf2_vi_cg/cr_vs2_vd_edges_egs4_subbytes_vs2_0, Zvkned_vaeskf2_vi_cg/cr_vs2_vd_edges_egs4_subbytes_vs2_15, Zvkned_vaeskf2_vi_cg/cr_vl_lmul_egs4_sew32 |
vaeskf2_wordgen |
Zvkned_vaeskf2_vi_cg/cp_vd_edges_egs4, Zvkned_vaeskf2_vi_cg/cr_vs2_vd_edges_egs4_subbytes_vs2_0 |
|
vaeskf2_rcon_lsw |
Zvkned_vaeskf2_vi_cg/cp_vs2_egs4, Zvkned_vaeskf2_vi_cg/cp_imm_5bit_u, Zvkned_vaeskf2_vi_cg/cp_vs2_edges_egs4_byte_12, Zvkned_vaeskf2_vi_cg/cp_vs2_edges_egs4_byte_15 |
|
vaeskf2_rcon_func |
The round number is used to select the round constant as well as the function. |
Zvkned_vaeskf2_vi_cg/cp_imm_5bit_u |
vaeskf2_uimm_src |
ranges from 2 to 14, comes from uimm[3:0]; uimm[4] is ignored. |
Zvkned_vaeskf2_vi_cg/cp_imm_5bit_u |
vaeskf2_uimm_map |
Zvkned_vaeskf2_vi_cg/cp_imm_5bit_u |
|
vaesz_round0 |
Zvkned_vaesz_vs_cg/cp_vd_egs4, Zvkned_vaesz_vs_cg/cr_vs2_vd_edges_egs4, Zvkned_vaesz_vs_cg/cr_vl_lmul_egs4_sew32 |
|
vaesz-vs_only |
Zvkned_vaesz_vs_cg/cp_asm_count |
|
vaesz_vs2_rk |
Zvkned_vaesz_vs_cg/cp_vs2_egs4, Zvkned_vaesz_vs_cg/cp_vs2_edges_egs4, Zvkned_vaesz_vs_cg/cr_vl_lmul_egs4_sew32 |
|
zvk_dataindep_timing |
Untestable: microarchitectural timing |
|
veccrypto_eeweqsew |
For all of the vector crypto instructions in this specification, EEW=SEW. |
Zvkned_vaesef_vv_cg/cr_vl_lmul_egs4_sew32, Zvkg_vghsh_vv_cg/cr_vl_lmul_egs4_sew32, Zvknhb64_vsha2ch_vv_cg/cr_vl_lmul_egs4_sew64, Zvksh_vsm3c_vi_cg/cr_vl_lmul_egs8_sew32 |
veccrypto_vl_vstart_egsconstr |
Zvkned_vaesef_vv_cg/cr_vl_lmul_egs4_sew32, Zvksh_vsm3me_vv_cg/cr_vl_lmul_egs8_sew32, TODO: vstart set to a nonzero multiple of EGS |
|
veccrypto_lmul_egwconstr |
TODO: LMUL×VLEN < EGW, even with vl=0, raises an illegal-instruction exception |
|
veccrypto_vsins_vs2 |
Zvkned_vaesef_vs_cg/cp_vs2_edges_egs4, Zvkned_vaesz_vs_cg/cp_vs2_edges_egs4, Zvksed_vsm4r_vs_cg/cp_vs2_edges_egs4 |
|
veccrypto_vsins_vd |
they return vector results to vd, which is also a source vector operand. |
Zvkned_vaesef_vs_cg/{cp_vd_edges_egs4_byte_0, cr_vl_lmul_egs4_sew32}, Zvksed_vsm4r_vs_cg/{cp_vd_edges_egs4_sm_byte_0, cr_vl_lmul_egs4_sew32} |
veccrypto_vsins_vs2function |
Zvkned_vaesef_vs_cg/cr_vl_lmul_egs4_sew32, Zvkned_vaesdf_vs_cg/cr_vl_lmul_egs4_sew32, Zvkned_vaesz_vs_cg/cr_vl_lmul_egs4_sew32, Zvksed_vsm4r_vs_cg/cr_vl_lmul_egs4_sew32 |
|
veccrypto_indepZkt |
Definition, checked through UDB |
|
Zvkn_def |
Included Extension|Description === |
Definition, checked through UDB |
Zvknc_def |
Included Extension|Description === |
Definition, checked through UDB |
Zvkng_def |
Included Extension|Description === |
Definition, checked through UDB |
UDB Parameters: None.
A.13.4. Zvknh{a/b} Vector NIST Hashing
Both Zvknha32 and Zvknhb64 are defined.
| Instruction | vsha2ms.vv | vsha2ch.vv | vsha2cl.vv |
|---|---|---|---|
RV32 |
x |
x |
x |
RV64 |
x |
x |
x |
EFFEW32 |
x |
x |
x |
cp_asm_count |
x |
x |
x |
cp_vd |
egs4 |
egs4 |
egs4 |
cp_vs2 |
egs4 |
egs4 |
egs4 |
cp_vs1 |
egs4 |
egs4 |
egs4 |
cmp_vs1_vs2 |
egs4 |
egs4 |
egs4 |
cp_vs2_edges |
egs4 |
egs4 |
egs4 |
cp_vs1_edges |
egs4 |
egs4 |
egs4 |
cp_vd_edges |
egs4 |
egs4 |
egs4 |
cr_vs2_vs1_edges |
egs4 |
egs4 |
egs4 |
cr_vs2_vd_edges |
egs4 |
egs4 |
egs4 |
cr_vs1_vd_edges |
egs4 |
egs4 |
egs4 |
cr_vl_lmul |
egs4 |
egs4 |
egs4 |
cr_vtype_agnostic |
egs4 |
egs4 |
egs4 |
cp_custom |
nist_sha |
nist_sha |
nist_sha |
| Instruction | vsha2ms.vv | vsha2ch.vv | vsha2cl.vv |
|---|---|---|---|
RV32 |
x |
x |
x |
RV64 |
x |
x |
x |
EFFEW32 |
x |
x |
x |
EFFEW64 |
x |
x |
x |
cp_asm_count |
x |
x |
x |
cp_vd |
egs4 |
egs4 |
egs4 |
cp_vs2 |
egs4 |
egs4 |
egs4 |
cp_vs1 |
egs4 |
egs4 |
egs4 |
cmp_vs1_vs2 |
egs4 |
egs4 |
egs4 |
cp_vs2_edges |
egs4 |
egs4 |
egs4 |
cp_vs1_edges |
egs4 |
egs4 |
egs4 |
cp_vd_edges |
egs4 |
egs4 |
egs4 |
cr_vs2_vs1_edges |
egs4 |
egs4 |
egs4 |
cr_vs2_vd_edges |
egs4 |
egs4 |
egs4 |
cr_vs1_vd_edges |
egs4 |
egs4 |
egs4 |
cr_vl_lmul |
egs4 |
egs4 |
egs4 |
cr_vtype_agnostic |
egs4 |
egs4 |
egs4 |
cp_custom |
nist_sha |
nist_sha |
nist_sha |
| Normative Rule | Rule Text | Coverpoints |
|---|---|---|
Zvknhb_impZvknha |
Zvknhb32_vsha2ch_vv_cg/cp_asm_count |
|
Zvknhb_sha512_egw256b_elem64b |
SHA-512: these instructions work on 256-bit element groups comprised of four 64-bit elements. |
Zvknhb64_vsha2ch_vv_cg/cp_csr_vtype_lmul_egs4_sew64, Zvknhb64_vsha2ch_vv_cg/cr_vl_lmul_egs4_sew64, Zvknhb64_vsha2cl_vv_cg/cr_vl_lmul_egs4_sew64, Zvknhb64_vsha2ms_vv_cg/cr_vl_lmul_egs4_sew64 |
Zvknhb_sha256_sha512 |
Zvknhb32_vsha2ch_vv_cg/cp_asm_count, Zvknhb32_vsha2ms_vv_cg/cp_asm_count, Zvknhb64_vsha2ch_vv_cg/cp_asm_count, Zvknhb64_vsha2ms_vv_cg/cp_asm_count |
|
Zvknha_sha256 |
Zvknha_vsha2ch_vv_cg/cp_asm_count, Zvknha_vsha2cl_vv_cg/cp_asm_count, Zvknha_vsha2ms_vv_cg/cp_asm_count |
|
Zvknha_Zvknhb_vstart |
TODO: no coverpoint samples vstart for this suite and no ExceptionsZvk-style suite exists to exercise a non-multiple-of-EGS vstart value |
|
vsha2chl-vv_Zvknha_sewn32_rsv |
Out-of-Scope: reserved because of CSR state (vtype.sew); no suite drives it to a reserved value under Zvknha and there is no Ssstrict-equivalent suite for vector-crypto |
|
vsha2chl-vv_Zvknhb_sewn32or64_rsv |
Out-of-Scope: reserved because of CSR state (vtype.sew); no suite drives it to a reserved value under Zvknhb and there is no Ssstrict-equivalent suite for vector-crypto |
|
vsha2chl-vv_vdoverlapvs1vs2_rsv |
TODO: this is an SsstrictV-style reserved-encoding test; no cmp_vd_vs1/cmp_vd_vs2-style register-aliasing coverpoint exists for this suite and no SsstrictV-equivalent suite exists for vector crypto |
|
vsha2ms-vv_Zvknha_sewn32_rsv |
Out-of-Scope: reserved because of CSR state (vtype.sew); no suite drives it to a reserved value under Zvknha and there is no Ssstrict-equivalent suite for vector-crypto |
|
vsha2ms-vv_Zvknhb_sewn32or64_rsv |
Out-of-Scope: reserved because of CSR state (vtype.sew); no suite drives it to a reserved value under Zvknhb and there is no Ssstrict-equivalent suite for vector-crypto |
|
vsha2ms-vv_vdoverlapvs1vs2_rsv |
TODO: this is an SsstrictV-style reserved-encoding test; no cmp_vd_vs1/cmp_vd_vs2-style register-aliasing coverpoint exists for this suite and no SsstrictV-equivalent suite exists for vector crypto |
|
vsha2ms-vv_op |
Zvknha_vsha2ms_vv_cg/cp_vd_egs4, Zvknha_vsha2ms_vv_cg/cr_vs2_vs1_edges_egs4, Zvknha_vsha2ms_vv_cg/cr_vs1_vd_edges_egs4, Zvknha_vsha2ms_vv_cg/cr_vs2_vd_edges_egs4, Zvknhb64_vsha2ms_vv_cg/cr_vs2_vs1_edges_egs4 |
|
Zvknhb_Zvkn_Zvknc_Zvkng_Zvksc_depZve64x |
Definition, checked through UDB |
|
Zvknha_Zvknhb_sha256_egw128b_elem32b |
SHA-256: these instructions work on 128-bit element groups comprised of four 32-bit elements. |
Zvknha_vsha2ch_vv_cg/cp_csr_vtype_lmul_egs4_sew32, Zvknha_vsha2ch_vv_cg/cr_vl_lmul_egs4_sew32, Zvknha_vsha2ms_vv_cg/cr_vl_lmul_egs4_sew32, Zvknhb32_vsha2ch_vv_cg/cr_vl_lmul_egs4_sew32, Zvknhb32_vsha2ms_vv_cg/cr_vl_lmul_egs4_sew32 |
Zvknha_Zvknhb_dataindeptiming |
Untestable: microarchitectural timing |
|
Zvknha_Zvknhb_vl |
Zvknha_vsha2ch_vv_cg/cr_vl_lmul_egs4_sew32, Zvknhb32_vsha2ch_vv_cg/cr_vl_lmul_egs4_sew32, Zvknhb64_vsha2ch_vv_cg/cr_vl_lmul_egs4_sew64 |
|
vsha2chl-vv_op_sew32 |
riscv.github.io/riscv-isa-manual/snapshot/spec/index.html#norm%3Avsha2chl-vv_op_sew32 |
Zvknha_vsha2ch_vv_cg/cr_vs2_vd_edges_egs4, Zvknha_vsha2cl_vv_cg/cr_vs2_vd_edges_egs4, Zvknhb32_vsha2ch_vv_cg/cr_vs2_vd_edges_egs4, Zvknhb32_vsha2cl_vv_cg/cr_vs2_vd_edges_egs4 |
vsha2chl-vv_op_sew64 |
riscv.github.io/riscv-isa-manual/snapshot/spec/index.html#norm%3Avsha2chl-vv_op_sew64 |
Zvknhb64_vsha2ch_vv_cg/{cr_vs2_vd_edges_egs4, cr_vs2_vs1_edges_egs4}, Zvknhb64_vsha2cl_vv_cg/{cr_vs2_vd_edges_egs4, cr_vs2_vs1_edges_egs4} |
vsha2chl-vv_op |
Zvknha_vsha2ch_vv_cg/cp_vd_egs4, Zvknha_vsha2ch_vv_cg/{cr_vs2_vs1_edges_egs4, cr_vs1_vd_edges_egs4}, Zvknha_vsha2cl_vv_cg/{cr_vs2_vs1_edges_egs4, cr_vs1_vd_edges_egs4} |
|
vsha2ms-vv_op_sew32 |
riscv.github.io/riscv-isa-manual/snapshot/spec/index.html#norm%3Avsha2ms-vv_op_sew32 |
Zvknha_vsha2ms_vv_cg/{cr_vs2_vs1_edges_egs4, cr_vs1_vd_edges_egs4}, Zvknhb32_vsha2ms_vv_cg/{cr_vs2_vs1_edges_egs4, cr_vs1_vd_edges_egs4} |
vsha2ms-vv_op_sew64 |
riscv.github.io/riscv-isa-manual/snapshot/spec/index.html#norm%3Avsha2ms-vv_op_sew64 |
Zvknhb64_vsha2ms_vv_cg/{cr_vs2_vs1_edges_egs4, cr_vs1_vd_edges_egs4, cr_vs2_vd_edges_egs4} |
UDB Parameters: None.
A.13.5. Zvksed Vector ShangMi SM4 Block Cipher
Only Zvksed32 is defined.
| Instruction | vsm4k.vi | vsm4r.vv | vsm4r.vs |
|---|---|---|---|
RV32 |
x |
x |
x |
RV64 |
x |
x |
x |
EFFEW32 |
x |
x |
x |
cp_asm_count |
x |
x |
x |
cp_vd |
egs4 |
egs4 |
egs4 |
cp_vs2 |
egs4 |
egs4 |
egs4 |
cp_imm_5bit |
u |
||
cmp_vd_vs2 |
egs4 |
egs4 |
|
cp_vs2_edges |
egs4_subbytes_sm |
egs4 |
egs4 |
cp_vd_edges |
egs4_subbytes_sm |
egs4_subbytes_sm |
|
cr_vs2_vd_edges |
egs4_subbytes_sm |
egs4_subbytes_sm |
|
cr_vl_lmul |
egs4 |
egs4 |
egs4 |
cr_vtype_agnostic |
egs4 |
egs4 |
egs4 |
cp_vl_0 |
egs4 |
| Normative Rule | Rule Text | Coverpoints |
|---|---|---|
Zvksed_egw128b_elem32b |
All of these instructions work on 128-bit element groups comprised of four 32-bit elements. |
Zvksed_vsm4k_vi_cg/cp_csr_vtype_lmul_egs4_sew32, Zvksed_vsm4k_vi_cg/cr_vl_lmul_egs4_sew32, Zvksed_vsm4r_vv_cg/cr_vl_lmul_egs4_sew32, Zvksed_vsm4r_vs_cg/cr_vl_lmul_egs4_sew32 |
Zvksed_dataindeptiming |
Untestable: microarchitectural timing |
|
Zvksed_vl |
Zvksed_vsm4k_vi_cg/cr_vl_lmul_egs4_sew32, Zvksed_vsm4r_vv_cg/cr_vl_lmul_egs4_sew32, Zvksed_vsm4r_vs_cg/cr_vl_lmul_egs4_sew32 |
|
Zvksed_vstart |
TODO: no coverpoint samples vstart for this suite yet; nothing wired in coverpoints/unpriv/Zvksed_coverage.svh |
|
vsm4k-vi_sewn32_rsv |
Out-of-Scope: reserved because of CSR state (vtype.sew); Zvksed only generates SEW=32 tests and there is no Ssstrict-equivalent suite for vector-crypto |
|
vsm4k-vi_op |
Zvksed_vsm4k_vi_cg/cp_vd_egs4, Zvksed_vsm4k_vi_cg/cp_imm_5bit_u, Zvksed_vsm4k_vi_cg/cp_vs2_edges_egs4_sm_byte_0, Zvksed_vsm4k_vi_cg/cp_vs2_edges_egs4_sm_byte_3, Zvksed_vsm4k_vi_cg/cr_vl_lmul_egs4_sew32 |
|
vsm4r_sewn32_rsv |
Out-of-Scope: reserved because of CSR state (vtype.sew); Zvksed only generates SEW=32 tests and there is no Ssstrict-equivalent suite for vector-crypto |
|
vsm4r-vs_vdoverlapvs2_rsv |
Only for the *.VS form: the vd register group overlaps the vs2 register |
TODO: this is an SsstrictV-style reserved-encoding test; Zvksed_vsm4r_vs_cg has no vd/vs2 register-aliasing coverpoint and there is no Ssstrict-equivalent suite for vector-crypto |
vsm4r_op |
Zvksed_vsm4r_vv_cg/cp_vd_egs4, Zvksed_vsm4r_vv_cg/cr_vs2_vd_edges_egs4_subbytes_sm_0, Zvksed_vsm4r_vv_cg/cr_vl_lmul_egs4_sew32, Zvksed_vsm4r_vs_cg/cr_vs2_vd_edges_egs4_subbytes_sm_0, Zvksed_vsm4r_vs_cg/cr_vl_lmul_egs4_sew32 |
|
Zvks_def |
Included Extension|Description === |
Definition, checked through UDB |
Zvksc_def |
Included Extension|Description === |
Definition, checked through UDB |
Zvksg_def |
Included Extension|Description === |
Definition, checked through UDB |
vsm4k-vi_op_sm4k |
Zvksed_vsm4k_vi_cg/{cp_vs2_edges_egs4_sm_byte_0, cp_vs2_edges_egs4_sm_byte_1, cp_vs2_edges_egs4_sm_byte_2, cp_vs2_edges_egs4_sm_byte_3} |
|
vsm4k-vi_op_rnd |
Zvksed_vsm4k_vi_cg/cp_imm_5bit_u |
|
vsm4r_op_sm4encdec |
Zvksed_vsm4r_vv_cg/{cp_vd_edges_egs4_sm_byte_0, cr_vs2_vd_edges_egs4_subbytes_sm_0}, Zvksed_vsm4r_vs_cg/{cp_vd_edges_egs4_sm_byte_0, cr_vs2_vd_edges_egs4_subbytes_sm_0} |
UDB Parameters: None.
A.13.6. Zvksh Vector ShangMi SM3 Hashing
Only Zvksh32 is defined.
| Instruction | vsm3me.vv | vsm3c.vi |
|---|---|---|
RV32 |
x |
x |
RV64 |
x |
x |
EFFEW32 |
x |
x |
cp_asm_count |
x |
x |
cp_vd |
egs8 |
egs8 |
cp_vs2 |
egs8 |
egs8 |
cp_vs1 |
egs8 |
|
cp_imm_5bit |
u |
|
cmp_vd_vs1 |
egs8 |
|
cmp_vs1_vs2 |
egs8 |
|
cp_vs2_edges |
egs8 |
egs8 |
cp_vd_edges |
egs8 |
|
cp_vs1_edges |
egs8 |
|
cr_vs2_vs1_edges |
egs8 |
|
cr_vs2_vd_edges |
egs8 |
|
cr_vl_lmul |
egs8 |
egs8 |
cr_vtype_agnostic |
egs8 |
egs8 |
cp_vl_0 |
egs8 |
egs8 |
| Normative Rule | Rule Text | Coverpoints |
|---|---|---|
Zvksh_egw256b_elem32b |
All of these instructions work on 256-bit element groups comprised of eight 32-bit elements. |
Zvksh_vsm3c_vi_cg/cp_csr_vtype_lmul_egs8_sew32, Zvksh_vsm3c_vi_cg/cr_vl_lmul_egs8_sew32, Zvksh_vsm3me_vv_cg/cr_vl_lmul_egs8_sew32 |
Zvksh_dataindeptiming |
Untestable: microarchitectural timing |
|
Zvksh_vl |
Zvksh_vsm3c_vi_cg/cr_vl_lmul_egs8_sew32, Zvksh_vsm3me_vv_cg/cr_vl_lmul_egs8_sew32 |
|
Zvksh_vstart |
TODO: no coverpoint samples vstart for this suite yet; nothing wired in coverpoints/unpriv/Zvksh_coverage.svh |
|
vsm3c-vi_sewn32_rsv |
Out-of-Scope: reserved because of CSR state (vtype.sew); Zvksh only generates SEW=32 tests and there is no Ssstrict-equivalent suite for vector-crypto |
|
vsm3c-vi_vdoverlapvs2_rsv |
TODO: this is an SsstrictV-style reserved-encoding test; Zvksh_vsm3c_vi_cg has no vd/vs2 register-aliasing coverpoint and there is no Ssstrict-equivalent suite for vector-crypto |
|
vsm3c-vi_op |
Zvksh_vsm3c_vi_cg/cp_vd_egs8, Zvksh_vsm3c_vi_cg/cp_imm_5bit_u, Zvksh_vsm3c_vi_cg/cr_vs2_vd_edges_egs8, Zvksh_vsm3c_vi_cg/cr_vl_lmul_egs8_sew32 |
|
vsm3me-vv_sewn32_rsv |
Out-of-Scope: reserved because of CSR state (vtype.sew); Zvksh only generates SEW=32 tests and there is no Ssstrict-equivalent suite for vector-crypto |
|
vsm3me-vv_vdoverlapvs2_rsv |
TODO: this is an SsstrictV-style reserved-encoding test; Zvksh_vsm3me_vv_cg has no vd/vs2 register-aliasing coverpoint (only vd/vs1 and vs1/vs2) and there is no Ssstrict-equivalent suite for vector-crypto |
|
vsm3me-vv_op |
Zvksh_vsm3me_vv_cg/cp_vd_egs8, Zvksh_vsm3me_vv_cg/cr_vs2_vs1_edges_egs8, Zvksh_vsm3me_vv_cg/cr_vl_lmul_egs8_sew32 |
|
vsm3c-vi_op_sm3 |
Zvksh_vsm3c_vi_cg/{cp_vd_edges_egs8, cp_vs2_edges_egs8, cr_vs2_vd_edges_egs8, cp_imm_5bit_u} |
|
vsm3c-vi_op_rnd |
Zvksh_vsm3c_vi_cg/cp_imm_5bit_u |
|
vsm3me-vv_op_sm3 |
Zvksh_vsm3me_vv_cg/{cp_vs1_edges_egs8, cp_vs2_edges_egs8, cr_vs2_vs1_edges_egs8} |
UDB Parameters: None.
A.13.7. Zvkt Constant-Time Vector Instructions
Not tested yet.
A.14. Miscellaneous RV23 Unprivileged Extensions
A.14.1. Zacas Atomic Compare-and-Swap
Table 154 summarizes the coverpoints for the Zacas extension. The rows with Zabha in the ExtraExtensions column, amocas.b and amocas.h, apply only when Zabha is also supported.
| Instruction | amocas.w | amocas.d | amocas.d | amocas.q | amocas.h | amocas.b |
|---|---|---|---|---|---|---|
RV32 |
x |
x |
x |
x |
||
RV64 |
x |
x |
x |
x |
x |
|
ExtraExtensions |
Zabha |
Zabha |
||||
cp_asm_count |
x |
x |
x |
x |
x |
x |
cp_rs1 |
nx0 |
nx0 |
nx0 |
nx0 |
nx0 |
nx0 |
cp_rs2 |
x |
x |
pair |
pair |
x |
x |
cp_rd |
x |
x |
pair |
pair |
x |
x |
cp_rs2_edges |
x |
x |
x |
x |
x |
x |
cmp_rs1_rs2 |
nx0 |
nx0 |
nx0_pair |
nx0_pair |
nx0 |
nx0 |
cmp_rd_rs1 |
nx0 |
nx0 |
nx0_pair |
nx0_pair |
nx0 |
nx0 |
cmp_rd_rs2 |
x |
x |
pair |
pair |
x |
x |
cmp_rd_rs1_rs2 |
nx0 |
nx0 |
nx0_pair |
nx0_pair |
nx0 |
nx0 |
cp_align |
word |
hword |
byte |
|||
cmp_rd_rs1_val_eq |
x |
x |
x |
x |
||
cmp_rd_rs1_val_lsb |
x |
x |
x |
x |
||
cmp_rd_rs1_val_hw |
x |
x |
x |
x |
||
cmp_rd_rs1_val_w |
x |
x |
||||
cmp_rd_rs1_pair_partial_val |
x |
x |
||||
cmp_rd_sign_ext |
x |
|||||
cp_custom |
amo_aqrl |
amo_aqrl |
amo_aqrl |
amo_aqrl |
amo_aqrl |
amo_aqrl |
| Coverpoint | Bins | Definition |
|---|---|---|
Zacas Value Comparison Coverpoints |
||
cmp_rd_rs1_val_eq |
2 |
original rd value and rs1 value are equal/not equal. |
cmp_rd_rs1_val_lsb |
2 |
Least significant byte of original rd and rs1 are equal/not equal. |
cmp_rd_rs1_val_hw |
2 |
Lowest 16 bits of original rd and rs1 are equal/not equal. |
cmp_rd_rs1_val_w |
2 |
Lowest 32 bits of original rd and rs1 are equal/not equal. |
cmp_rd_rs1_pair_partial_val |
2 |
For register pairs, original rd and rs1 have matching high or low halves, but not both. |
cmp_rd_sign_ext |
2 |
Value loaded into rd by amocas.w is sign-extended from bit 31 or not. |
| Normative Rule | Rule Text | Coverpoints |
|---|---|---|
Zacas_rv32_amocas-w_op |
Zacas_amocas_w_cg/{cp_rs1_nx0, cp_rs2, cp_rd, cmp_rd_rs1_val_eq} |
|
Zacas_rv32_amocas-d_op |
Zacas_amocas_d_cg/{cp_rs2_pair, cp_rd_pair, cmp_rd_rs1_val_eq, cmp_rd_rs1_pair_partial_val} |
|
Zacas_rv32_amocas-d_frst_pair_entry_reg_even |
Zacas_amocas_d_cg/{cp_rs2_pair, cp_rd_pair} |
|
Zacas_rv32_amocas-d_rs2_frst_reg_x0 |
When the first register of a source register pair is x0, then both halves of the pair read as zero. |
Zacas_amocas_d_cg/cp_rs2_pair |
Zacas_rv32_amocas-d_rd_frst_reg_x0 |
Zacas_amocas_d_cg/cp_rd_pair |
|
Zacas_rv64_amocas-w_op |
Zacas_amocas_w_cg/{cp_rs2, cp_rd, cmp_rd_rs1_val_eq, cmp_rd_sign_ext} |
|
Zacas_rv64_amocas-d_op |
Zacas_amocas_d_cg/{cp_rs1_nx0, cp_rs2, cp_rd, cmp_rd_rs1_val_eq} |
|
Zacas_rv64_amocas-q_op |
Zacas_amocas_q_cg/{cp_rs2_pair, cp_rd_pair, cmp_rd_rs1_val_eq, cmp_rd_rs1_pair_partial_val} |
|
Zacas_rv64_amocas-q_frst_pair_entry_reg_even |
Zacas_amocas_q_cg/{cp_rs2_pair, cp_rd_pair} |
|
Zacas_rv64_amocas-q_rs2_frst_reg_x0 |
When the first register of a source register pair is x0, then both halves of the pair read as zero. |
Zacas_amocas_q_cg/cp_rs2_pair |
Zacas_rv64_amocas-q_rd_frst_reg_x0 |
Zacas_amocas_q_cg/cp_rd_pair |
|
Zacas_amocas_rs1_addr_alignment |
Exceptions_Zaamo_cg/{cp_amo_address_misaligned} |
|
Zacas_amocas_mem_op_success_aq_rl |
{Zacas_amocas_w_cg, Zacas_amocas_d_cg, Zacas_amocas_q_cg}/cp_custom_aqrl, Ordering OUT-OF-SCOPE for single hart |
|
Zacas_amocas_mem_op_fail_aq_rl |
{Zacas_amocas_w_cg, Zacas_amocas_d_cg, Zacas_amocas_q_cg}/cp_custom_aqrl, Ordering OUT-OF-SCOPE for single hart |
|
Zacas_amocas_w_permission |
An AMOCAS.W/D/Q instruction always requires write permissions. |
|
Zabha_amocas-bh_ignore_bits |
The AMOCAS.B/H instructions similarly ignore the 1 bits of the original value in rd. |
UDB Parameters: None.
A.14.2. Zabha Subword Atomics
| Instruction | amoadd.b | amoadd.h | amoand.b | amoand.h | amomax.b | amomax.h | amomaxu.b | amomaxu.h | amomin.b | amomin.h | amominu.b | amominu.h |
|---|---|---|---|---|---|---|---|---|---|---|---|---|
RV32 |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
RV64 |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
cp_asm_count |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
cp_rs1 |
nx0 |
nx0 |
nx0 |
nx0 |
nx0 |
nx0 |
nx0 |
nx0 |
nx0 |
nx0 |
nx0 |
nx0 |
cp_rs2 |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
cp_rd |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
cp_rs2_edges |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
cmp_rs1_rs2 |
nx0 |
nx0 |
nx0 |
nx0 |
nx0 |
nx0 |
nx0 |
nx0 |
nx0 |
nx0 |
nx0 |
nx0 |
cmp_rd_rs1 |
nx0 |
nx0 |
nx0 |
nx0 |
nx0 |
nx0 |
nx0 |
nx0 |
nx0 |
nx0 |
nx0 |
nx0 |
cmp_rd_rs2 |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
cmp_rd_rs1_rs2 |
nx0 |
nx0 |
nx0 |
nx0 |
nx0 |
nx0 |
nx0 |
nx0 |
nx0 |
nx0 |
nx0 |
nx0 |
cp_align |
byte |
hword |
byte |
hword |
byte |
hword |
byte |
hword |
byte |
hword |
byte |
hword |
cp_memval |
byte |
hword |
byte |
hword |
byte |
hword |
byte |
hword |
byte |
hword |
byte |
hword |
cp_custom |
amo_aqrl |
amo_aqrl |
amo_aqrl |
amo_aqrl |
amo_aqrl |
amo_aqrl |
amo_aqrl |
amo_aqrl |
amo_aqrl |
amo_aqrl |
amo_aqrl |
amo_aqrl |
| Instruction | amoor.b | amoor.h | amoswap.b | amoswap.h | amoxor.b | amoxor.h |
|---|---|---|---|---|---|---|
RV32 |
x |
x |
x |
x |
x |
x |
RV64 |
x |
x |
x |
x |
x |
x |
cp_asm_count |
x |
x |
x |
x |
x |
x |
cp_rs1 |
nx0 |
nx0 |
nx0 |
nx0 |
nx0 |
nx0 |
cp_rs2 |
x |
x |
x |
x |
x |
x |
cp_rd |
x |
x |
x |
x |
x |
x |
cp_rs2_edges |
x |
x |
x |
x |
x |
x |
cmp_rs1_rs2 |
nx0 |
nx0 |
nx0 |
nx0 |
nx0 |
nx0 |
cmp_rd_rs1 |
nx0 |
nx0 |
nx0 |
nx0 |
nx0 |
nx0 |
cmp_rd_rs2 |
x |
x |
x |
x |
x |
x |
cmp_rd_rs1_rs2 |
nx0 |
nx0 |
nx0 |
nx0 |
nx0 |
nx0 |
cp_align |
byte |
hword |
byte |
hword |
byte |
hword |
cp_memval |
byte |
hword |
byte |
hword |
byte |
hword |
cp_custom |
amo_aqrl |
amo_aqrl |
amo_aqrl |
amo_aqrl |
amo_aqrl |
amo_aqrl |
| Normative Rule | Rule Text | Coverpoints |
|---|---|---|
Zabha_rd_sign_extension |
{Zabha_amoswap_b_cg, Zabha_amoswap_h_cg}/cp_rs2_edges, Zabha_amoswap_b_cg/cp_memval_byte, Zabha_amoswap_h_cg/cp_memval_hword |
|
Zabha_rs1_align_addr |
Zabha_amoswap_b_cg/cp_align_byte, Zabha_amoswap_h_cg/cp_align_hword, Exceptions_Zaamo_cg/cp_amo_address_misaligned |
|
pma_amo_sz_support |
{Zabha_amoadd_b_cg, Zabha_amoadd_h_cg}/cp_asm_count |
UDB Parameters: None.
A.14.3. Zimop Maybe-Ops
Should write 0 to rd unless an extension redefines them.
| Instruction | mop.r.0 | mop.r.1 | mop.r.2 | mop.r.3 | mop.r.4 | mop.r.5 | mop.r.6 | mop.r.7 | mop.r.8 | mop.r.9 | mop.r.10 | mop.r.11 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|
RV32 |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
RV64 |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
cp_asm_count |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
cp_rd |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
cp_rs1 |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
cp_rs1_edges |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
cmp_rd_rs1 |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
| Instruction | mop.r.12 | mop.r.13 | mop.r.14 | mop.r.15 | mop.r.16 | mop.r.17 | mop.r.18 | mop.r.19 | mop.r.20 | mop.r.21 | mop.r.22 | mop.r.23 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|
RV32 |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
RV64 |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
cp_asm_count |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
cp_rd |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
cp_rs1 |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
cp_rs1_edges |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
cmp_rd_rs1 |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
| Instruction | mop.r.24 | mop.r.25 | mop.r.26 | mop.r.27 | mop.r.28 | mop.r.29 | mop.r.30 | mop.r.31 | mop.rr.0 | mop.rr.1 | mop.rr.2 | mop.rr.3 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|
RV32 |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
RV64 |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
cp_asm_count |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
cp_rd |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
cp_rs1 |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
cp_rs2 |
x |
x |
x |
x |
||||||||
cp_rs1_edges |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
cp_rs2_edges |
x |
x |
x |
x |
||||||||
cmp_rd_rs1 |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
cmp_rs1_rs2 |
x |
x |
x |
x |
||||||||
cmp_rd_rs2 |
x |
x |
x |
x |
||||||||
cmp_rd_rs1_rs2 |
x |
x |
x |
x |
| Instruction | mop.rr.4 | mop.rr.5 | mop.rr.6 | mop.rr.7 |
|---|---|---|---|---|
RV32 |
x |
x |
x |
x |
RV64 |
x |
x |
x |
x |
cp_asm_count |
x |
x |
x |
x |
cp_rd |
x |
x |
x |
x |
cp_rs1 |
x |
x |
x |
x |
cp_rs2 |
x |
x |
x |
x |
cp_rs1_edges |
x |
x |
x |
x |
cp_rs2_edges |
x |
x |
x |
x |
cmp_rd_rs1 |
x |
x |
x |
x |
cmp_rs1_rs2 |
x |
x |
x |
x |
cmp_rd_rs2 |
x |
x |
x |
x |
cmp_rd_rs1_rs2 |
x |
x |
x |
x |
| Normative Rule | Rule Text | Coverpoints |
|---|---|---|
Zimop_mop-r_op |
{Zimop_mop_r_0_cg, Zimop_mop_r_31_cg}/{cp_rd, cp_rs1_edges} |
|
Zimop_mop-rr_op |
{Zimop_mop_rr_0_cg, Zimop_mop_rr_7_cg}/{cp_rd, cp_rs1_edges} |
|
Zimop_mop-r_enc |
{Zimop_mop_r_0_cg, Zimop_mop_r_1_cg, Zimop_mop_r_30_cg, Zimop_mop_r_31_cg}/cp_asm_count |
|
Zimop_mop-rr_enc |
{Zimop_mop_rr_0_cg, Zimop_mop_rr_1_cg, Zimop_mop_rr_6_cg, Zimop_mop_rr_7_cg}/cp_asm_count |
UDB Parameters: None.
A.14.4. Zcmop Compressed Maybe-Ops
Should write 0 to rd unless an extension redefines them.
| Instruction | c.mop.1 | c.mop.3 | c.mop.5 | c.mop.7 | c.mop.9 | c.mop.11 | c.mop.13 | c.mop.15 |
|---|---|---|---|---|---|---|---|---|
RV32 |
x |
x |
x |
x |
x |
x |
x |
x |
RV64 |
x |
x |
x |
x |
x |
x |
x |
x |
cp_asm_count |
x |
x |
x |
x |
x |
x |
x |
x |
cp_custom |
mop_no_write |
mop_no_write |
mop_no_write |
mop_no_write |
mop_no_write |
mop_no_write |
mop_no_write |
mop_no_write |
| Normative Rule | Rule Text | Coverpoints |
|---|---|---|
Zcmop_op |
{Zcmop_c_mop_1_cg, Zcmop_c_mop_3_cg, Zcmop_c_mop_5_cg, Zcmop_c_mop_7_cg}/cp_asm_count |
|
Zcmop_enc |
{Zcmop_c_mop_1_cg, Zcmop_c_mop_3_cg, Zcmop_c_mop_5_cg, Zcmop_c_mop_7_cg}/cp_asm_count |
|
c-mop_enc |
{Zcmop_c_mop_1_cg, Zcmop_c_mop_3_cg, Zcmop_c_mop_5_cg, Zcmop_c_mop_7_cg}/cp_asm_count |
|
Zcmop_instr_write |
{Zcmop_c_mop_1_cg, Zcmop_c_mop_3_cg, Zcmop_c_mop_5_cg, Zcmop_c_mop_7_cg}/cp_custom_mop_no_write |
UDB Parameters: None.
A.15. Miscellaneous Non-RV23 Unprivileged Extensions
A.15.1. Zfinx Float in Integer Regs
Zfinx replaces the F extension with a similar set of instructions that operate on x registers instead of f registers. Zdinx and Zhinx are similar.
A.15.2. Zdinx Double in Integer Regs
A.15.3. Zhinx Half in Integer Regs
A.15.4. Zhinxmin Half Converts in Integer Regs
A.15.5. Q Quad-Precision Floating-Point
A.15.6. ZfhQ Half-Quad Instructions
A.15.7. ZfhminQ Half-Quad Conversion Instructions
Note that ZfhminQ is the same as ZfhQ
A.15.8. ZfaQ Additional Quad-Precision Floating-Point Instructions
A.15.9. ZfaZfhQ Additional Half-Quad Conversion Instructions
A.15.10. Zcmp Compressed Push/Pop
| Normative Rule | Rule Text | Coverpoints |
|---|---|---|
Zcmp_bus_fault |
TODO |
|
Zcmp_pop_sp_commit |
TODO |
|
Zcmp_push_sp_commit |
TODO |
|
Zcmp_reexecute |
TODO |
|
Zcmp_trap |
TODO |
UDB Parameters: None.
A.15.11. Zcmt Compressed Jump Tables
UDB Parameters: None.
A.15.12. Zilsd Load/Store Double
A.15.13. Zclsd Compressed Load/Store Double
A.16. E Base Embedded Extension
The E Base ISA is a variant of I with 16 general purpose registers. This test plan also includes tests restricted to these 16 registers for simple extensions most likely to be implemented on an embedded core.
All unprivileged tests for RV32 and RV64 can have E equivalents. They are distinguished in the tests directory by rv32i, rv64i, rv32e, and rv64e subdirectories. By default, the test generator only creates rv32e/rv64e tests for the following extensions because embedded cores are most likely to implement these extensions. However, embedded tests for more extensions can be generated by editing the E_EXTENSION_TESTS variable in the riscv-arch-test generators/testgen/src/testgen/testgen.py script.
-
E (base ISA)
-
M (multiply/divide)
-
Zmmul (multiply)
-
Zca (compressed)
-
Zcb (more compressed)
-
Zcmp (compressed push/pop)
-
Zcmt (compressed table jumps)
-
Zba (bitmanip address)
-
Zbb (bitmanip basic)
-
Zbs (bitmanip single-bit)
The normative rule specific to the E base ISA is given in Table 165. Each instruction also has normative rules inherited from its extension.
| Normative Rule | Rule Text | Coverpoints |
|---|---|---|
diff_rv32e_rv32i |
E_add_cg/{cp_rs1, cp_rs2, cp_rd}, Ssstrict_Sm_instr_cg/cp_upperreg_rs1 |
UDB Parameters: None.
The E base ISA and other extensions based on it use the same coverpoints as the I base ISA. However, the register coverpoints such as cp_rd, cpr_rs1, cp_rs2, cmp_rd_rs1, etc. only exercise the 16 registers x0 through x15 when E is enabled. (See the get_gpr_reg function in framework/src/act/fcov/coverage/RISCV_instruction_base.svh, which is controlled by the COVER_E symbol).
Privileged tests are written using only x0-x15, so they work for both E and I base ISAs. One exception is that Ssstrict tests using the upper registers, which should be reserved and trap in E.
Appendix B: Privileged Test Plan
Privileged test plan spreadsheets are available. They need to be edited into a more standardized format. Each test plan spreadsheet contains multiple columns for the applicable configurations. For example, Sm applies to any configuration with machine mode, S applies to any configuration with supervisor mode, and the Sm_F tests within Sm apply to any configuration that also has floating-point.
The privileged testplan is organized by major categories of behaviors or extensions in the following sections.
Each of these categories has multiple coverage files with suffixes indicating the circumstances to which they apply.
For example, InterruptsSm applies to any configuration with Zicsr and M-mode, and InterruptsS applies to any configuration with Zicsr and S-mode.
Each test boots to the mode in its suffix and then runs in every supported privilege mode at or below that mode: InterruptsSm exercises M-, S-, U-, VS- and VU-mode,
while InterruptsS boots to S-mode and exercises S-, U-, VS- and VU-mode with mideleg left at its boot value, so a delegated interrupt taken in U-mode is checked to arrive in S-mode.
B.1. Priv
The privileged tests exercise CSRs that are mandatory in each privilege mode.
They also test mandatory privileged instructions: ecall, ebreak, mret, and sret.
The CSR read/write/set/clear instructions themselves are tested in the
unprivileged Zicsr tests of Section A.10.2.
wfi is tested in Section B.3 and sfence.vma is tested in Section B.7.
Privileged tests do not test reserved or custom instructions or CSRs because their behavior is UNSPECIFIED. Reserved instructions and CSRs are tested in the Section B.5 Ssstrict tests, where they should throw an Illegal Instruction exception if not implemented.
B.1.1. Sm Machine-Mode CSRs and Instructions
These test CSRs and privileged instructions in machine mode.
The Sm suite also contains the Sm_F, Sm_V, and Sm_VF tests of the floating-point and vector CSRs and mstatus.FS/mstatus.VS, which run only when F, Zve32x, or Zve32f is also supported.
The Sm_Zicntr group runs when Zicntr is also supported. It reads cycle, time, instret and hpmcounter[31:3] from M-mode under walking mcounteren and scounteren values, and checks instret across retiring instructions, exceptions and interrupts.
The Sm_H group runs when H is also supported. It tests the hypervisor CSRs and instructions from M-mode, mret with mstatus.MPV, and the mstatus.TVM tests of HS-mode and VS-mode, whose traps are taken in M-mode because the HS-mode trap handler reads satp and hgatp.
The Sm_Zicntr_H tests of the hypervisor counter enables are described with the H suite.
| Coverpoint | Goal | Feature Description | Expectation | Bins | Normative Rule | Status | Notes |
|---|---|---|---|---|---|---|---|
cp_mcsr_access |
Access to all M-mode CSRs |
csr read, write all 1s, write all 0s, set all 1s, clear all 1s, write back initial value of each register below plus read-only mvendorid, marchid, mimpid, mhartid, mconfigptr |
Traps on writes to read-only registers. Otherwise writable bits match reference model. |
(14+5) regs * 6 ops |
m_mode_first_at_reset |
||
cp_mcsrwalk |
Walking 1s and 0s in each writeable M-mode CSR |
Set and clear each bit of each writable M-mode CSR to exercise bitfields: mstatus, medeleg, mideleg, mie, mtvec, mcounteren, mscratch, mepc, mcause, mtval, mip, menvcfg, mseccfg. For RV32 also mstatush, medelegh, menvcfgh, mseccfgh, mcountinhibit, mhpmevent31:3.. misa is fussy to model and is tested in cp_misa* instead. Iterations that write a reserved mstatus.MPP, menvcfg.CBIE, or menvcfg/mseccfg.PMM value check the other bits exactly and only check that the field reads back a legal value. |
Writable bits match reference model. |
14 regs * (64 set + 64 clear) |
mip_meip_rdonly |
||
cp_misa_mxl |
misa.MXL |
Attempt to write all four values to misa.MXL, clear, set.. Read back |
matches MXLEN and does not change |
7 |
misa_acc |
||
cp_misa_dependencies |
Attempt to write I, E = 1. E should read 0 if I reads 1 |
See tests |
7 |
misa_acc |
|||
cp_misa_clear_c |
Attempt to clear C when subsequent instruction is not a multiple of 2. C should not change. |
C should not change |
1 |
misa_inc_ialign |
|||
cp_mepc_ialign32_read |
mepc[1] is masked on reads, including mret’s, while IALIGN = 32 |
Only with Zca and a writable misa.C (MUTABLE_MISA_C). Clear misa.C, write mepc with bit 1 set, execute mret with mstatus.MPP = M, then read mepc; then set misa.C again and read mepc. |
While misa.C = 0, mepc reads with bit 1 clear and mret returns to the masked address; after misa.C is set again, mepc reads with bit 1 set. Match reference model. |
2 |
mepc_bit1_dyn_ialign_op |
||
cp_sepc_ialign32_read |
sepc[1] is masked on reads, including sret’s, while IALIGN = 32 |
Only with Zca, S and a writable misa.C (MUTABLE_MISA_C). Clear misa.C in M-mode. Write sepc with bit 1 set and execute sret with sstatus.SPP = S, from M-mode and then from S-mode (entered with T-SBI); write sepc with bit 1 set again and read it, in M-mode and in S-mode. Then set misa.C again in M-mode and read sepc. |
While misa.C = 0, sepc reads with bit 1 clear and sret returns to the masked address; after misa.C is set again, sepc reads with bit 1 set. Match reference model. |
2 modes * 2 |
sepc_op_mask_ialign32 |
||
cp_csr_insufficient_priv |
Debug registers should be inaccessible from M-mode |
Read Debug CSRS 7B0-7BF |
Illegal Instruction |
16 |
Zicsr_illegal_mode |
||
cp_csr_ro |
Read-only registers should trap when written |
Write read-only CSRs (C00-FFF) |
Illegal Instruction |
1024 CSRs |
cycle_instret_hpmcounter_op_rdonly |
||
cp_cntr_access |
Access to all 32 counters |
csr_read, write nonzero, write 0, set nonzero, clear all for each of for mcycle, minstret, mhpmcounter31…3. If RV32 is supported, also do mcycleh, minstreth, mhpmcounterh31…3. Read back value and check if it is within some threshold of the written value (because counters will continue to increment). |
Writable bits match reference model. |
32 regs * 6 ops |
mcycle_op |
||
cp_mtime_write |
Writing memory-mapped MTIME shows up in time CSR |
If Zicntr is supported, Write walking 1s and 0s to memory-mapped mtime, read back from time CSR |
Time reflects memory-mapped mtime. Difference should be small. |
time_op_rdonly |
|||
cp_inhibit |
mcountinhibit prevents counting |
With mcountinhibit[2/0] = {0, 1}, read mcycle and minstret multiple times and check whether they increment. |
Count when not inhibited, remain constant when inhibited |
2 |
mcountinhibit_sz_warl |
||
cp_mcause_write |
Legal values can be written to mcause |
with interrupt = 1: 0-13 |
writes mcause |
81 values |
mcause_sz_acc |
||
cp_mstatus_sd_write |
FS/VS/XS combinations can be written and SD is true when any are dirty. |
Write 1 and 0 to SD with FS/VS/XS all 0. Write cross-product of all bits of SD/ FS/ VS/XS. 128 bins of writes. |
FS =1 iff any of FS/VS/XS are dirty. |
2 SD * 4 FS * 4 VS * 4 XS = 128 |
mstatus_sd_acc |
||
cp_mprivinst |
ecall and ebreak cause traps |
Execute ecall and ebreak in machine mode |
ecall and breakpoint exceptions |
2 |
ecall_ebreak_epc_value |
||
cp_mret |
mret returns and affects status bits |
Execute mret in machine mode with cross-product of values written to mstatus.MPP/ MPRV/ MPIE/MIE. Return to machine mode and MIE = 1 after each mret. |
2 MPRV * 2 MIPE * 2 MIE = 8 |
mstatus_xret_op |
|||
cp_sret |
sret returns and affects status bits |
Execute sret in machine mode with cross-product of mstatus.SPP/MPRV/TSR/SPIE/SIE |
Illegal instruction if TSR |
2 SPP * 2 MPRV * 2 TSR * 2 SPIE * 2 SIE = 32 |
mstatus_xret_op |
||
cp_sret_s |
If S_SUPPORTED: |
sstatus_spp |
|||||
cp_scsr_from_m |
If S supported, read/write/set/clear each S-mode CSR: sstatus, sie, stvec, scounteren, senvcfg, sscratch, sepc, stval, sip. stvec is WARL with complex legal values, so only MODE[1], which must read 0, is checked. scause is tested in cp_scause_from_m. |
Zicsr_higher_priv |
|||||
cp_scause_from_m |
If S supported, write scause from M-mode with each Exception Code 0-9, 12, 13 and 15 and read it back. If Ss1p12 or later is supported, also write codes 10, 11, 14 and 16-31; otherwise also write 18 if Zicfilp or Zicfiss is supported and 10 and 20-23 if H is supported. |
The Exception Code is WLRL. Ss1p12 and later must hold the values 0-31, so each reads back as written. Ss1p11 need only hold the codes of supported causes, such as software check (18) with Zicfilp or Zicfiss and the H causes (10 and 20-23) with H. |
13, plus 1 with Zicfilp or Zicfiss and 5 with H (32 on Ss1p12 or later) |
scause_exception_code_sz |
|||
cp_satp_from_m |
If S is supported, read satp with mstatus.TVM=0/1 |
shouldn’t trap on either TVM. Value is not predictable. |
|||||
cp_satp_from_s |
If S is supported, read satp with mstatus.TVM=0/1 from S mode |
||||||
cp_shadow |
Check subset |
If S_supported: |
sstatus_subset_mstatus |
||||
cp_shadow_deleg |
Delegation affects shadowing |
With delegation on and off, write mip/mie, read back sip/sie. Write sip/sie, read back mip/mie |
|||||
cp_shadow_deleg_walk |
With walking 1s in mideleg, mip/mie = 1s, read back sip/sie |
||||||
Sm does not access unsupported lower privilege mode CSRs because they are reserved if not implemented, and their behavior is UNSPECIFIED. |
|||||||
If F is mutable, zeroing it should also zero D and Q and V. Same with D zeroing Q and V. Zeroing U should zero S. |
|||||||
Writing misa may increase IALIGN, e.g., by disabling the "C" extension. If an instruction that would write misa increases IALIGN, and the subsequent instruction’s address is not IALIGN-bit aligned, the write to misa is suppressed, leaving misa unchanged." |
|||||||
Sm_F tests (Sm_F-NN.S): the floating-point CSRs and mstatus.FS, run when F is also supported. |
|||||||
cp_fcsr_access |
Writing to the CSR field |
Write 0s and 1s to fcsr, frm, fflags cross with mstatus.FS init/clean/dirty |
Zicsr_higher_priv |
||||
cp_mstatus_FS_transition |
Writing to the CSR field |
Each different type of floating-point instruction crossed with four values of FS. Includes integer-result instructions that raise a flag after fflags is cleared (feq.s with a signaling NaN, fcvt.w.s of an inexact value, fcvt.wu.s of an out-of-range value, fcvtmod.w.d of a NaN). |
mstatus_fs_op |
||||
cp_mstatus_FS_transition_nondeterministic |
Writing to the CSR field |
Floating-point instructions that need not modify floating-point state (fsw, fmv.x.w, fclass.s, csrr of the FP CSRs, fmvh.x.d) crossed with mstatus.FS = Off and Dirty |
Illegal-instruction trap when FS = Off; FS stays Dirty when Dirty. Initial and Clean are omitted because these instructions may dirty FS imprecisely. |
mstatus_fs_imprecise |
|||
Sm_V tests (Sm_V_vcsr-NN.S, Sm_V_vset-NN.S, Sm_V_vl_walk-NN.S): the vector CSRs, vset{i}vl{i}, vstart and mstatus.VS, run when Zve32x is also supported. |
|||||||
cp_vcsrrswc |
Confirm that all vector CSR properties are properly set with regards to read write, clear, and set privileges with the csr instructions |
With each of the vector CSRs conduct a read, write, clear, and set operation on the CSR |
Will abide by spec’s read and write permissions for each csr |
3 csr instructions * 7 CSRs |
Zicsr_higher_priv |
test written: yes |
|
cp_vcsrs_walking1s |
Confirm that that all writable vector CSRs have the correct bits writeable |
With each of the vector CSRs that are writable, write all XLEN 1-hot values to the csr |
csrs will be updated based on which bits they support to be writable |
4 CSRs * XLEN 1-hot values |
mstatus_vs_op |
test written: yes |
|
cp_mstatus_vs_set_dirty_arithmetic |
Confirm that after running an arithmetic vector instruction that mstatus.VS is set to dirty when set to "clean" or "initial" |
Run a .vv vector arithmetic instruction with mstatus.VS = {clean, initial} |
mstatus.VS is set to dirty |
2 mstatus.VS bins |
mstatus_vs_sstatus_vs_op |
test written: yes |
|
cp_mstatus_vs_set_dirty_csr |
Confirm that after running a vsetvli instruction that mstatus.VS is set to dirty when set to "clean" or "initial" |
Run a vsetvli instruction with mstatus.VS = {clean, initial} |
mstatus.VS is set to dirty |
2 mstatus.VS bins |
mstatus_vs_op |
test written: yes |
|
Analogous to the way in which the floating-point unit is handled, the mstatus.VS field may exist even if misa.V is clear. |
feature (coverpoint written): Untestable |
||||||
cp_mstatus_vs_off_arithmetic |
Confirm that when misa.V is 1 and mstatus.VS is off, an arithmetic vector instruction raises an illegal instruction exception |
With misa.V = 1 (its reset value), set mstatus.VS = {00} and run a .vv vector instruction |
illegal instruction exception |
1 |
mstatus_vs_sstatus_vs_op |
test written: yes, confirm sig |
|
cp_mstatus_vs_off_csr |
Confirm that when misa.V is 1 and mstatus.VS is off, an csr vector instruction raises an illegal instruction exception |
With misa.V = 1 (its reset value), set mstatus.VS = {00} and run a vsetvli |
illegal instruction exception |
1 |
mstatus_fs_vs_xs_off_op |
test written: yes, confirm sig |
|
For implementations with a writable misa.V field, the vsstatus.VS field may exist even if misa.V is clear. |
feature (coverpoint written): Untestable |
||||||
Vset{i}vl{i} |
|||||||
cp_sew_lmul_vset_i_vli |
Confirm that all combinations of lmul crossed with sew correctly set the vtype register in accordance with the vill field |
Use all vset{i}vli instructions to cross eSEW={8/16/32/64} with mLMUL = {f8/f4/f2/1/2/4/8} rd and uimm can be any nonzero value |
vtype.vill becomes 1 and other bits become 0 on illegal combinations, such as sew = 1xx. |
2 instructions * 7 lmul bins * 4 sew bins |
vtype_sz_acc_op |
test written: yes |
|
cp_sew_lmul_vsetvl |
Confirm that all combinations of lmul crossed with sew correctly set the type register in accordance with the vill field |
Use vsetvl to cross rs2.sew= [3’b000:3’b011] with rs2.lmul = [000, 001, 010, 011, 101, 110, 111]. rd and uimm can be any nonzero value. Make sure rs2_val[`XLEN-1:8] = 0 |
vtype.vill becomes 1 and other bits become 0 on illegal combinations, such as sew = 1xx. |
7 lmul bins * 4 sew bins |
vtype_sz_acc_op |
test written: yes |
|
cp_sew_lmul_vset_i_vli / cp_sew_lmul_vsetvl |
Confirm on the supported values of lmul are recognized as legal |
Use vsetivli rd, 1, sew={supported}, vlmul={supported(mf8/mf4/mf2/)m1/m2/m4/m8}, tu, mu to attempt to set all values of lmul |
Expect vill is set for all values of lmul that aren’t legal, otherwise the correct lmul is set |
0 |
feature (coverpoint written): Covered by coverpoint above |
||
cp_sew_lmul_vset_i_vli / cp_sew_lmul_vsetvl |
Check all values of sew to Confirm only correctly supported values are recognized as legal |
Use vsetivli rd, 1, sew={e8/e16/e32/e64}, vlmul={m1}, tu, mu to attempt to set all values of lmul |
Expect vill will be set when an attempted unsupported sew values are attempted to be written, otherwise vtype will contain supported sew |
0 |
feature (coverpoint written): Covered by coverpoint above |
||
cp_vill_vset_i_vli |
Check that vset{i}vli instructions properly clear the vill bit when writing a valid vtype configuration |
Run vsetvli and vsetivli with eSEW = {8/16/32/64} with mLMUL = {8} and vtype.vill = {1} |
expect vill bit is cleared and vtype written when sew is legal |
2 instructions * 4 sew bins |
test written: yes |
||
cp_vill_vsetvl |
Check that vsetvl instruction properly clears the vill bit when writing a valid vtype configuration |
Run vsetvl with rs2.sew = {8/16/32/64} with rs2.lmul = {8} and vtype.vill = {1} making sure rs2_val[`XLEN-1:8] = 0 |
expect vill bit is cleared and vtype written when sew is legal |
4 sew bins |
vtype_vill_val |
test written: yes |
|
cp_vill_vsetvl_rs2_vill |
Check that when attempting to set a valid configuration but with the rs2.vill bit set, and the vtype.vill bit set, that the register remains all zeros besides the vill bit |
Run vsetvl with rs2.sew = {8/16/32/64} with vtype.lmul = {8} and vtype.vill = {1} making sure rs2_val[`XLEN-2:8] = 0 and rs2[XLEN-1] = 1 |
vtype register remains unchanged |
4 sew bins |
test written: yes |
||
cp_vsetvl_rs2_vill |
Confirm that with vsetvl if rs2 has the vill bit set that it is treated as an unsupported configuration |
run a vsetvl with rs2[XLEN-1] = 1, rs2[XLEN-2:8]=0 and rs2.sew = {supported} and rs2.lmul = 1 and vtype.vill = {0} |
vill bit should be set |
spec: A vtype value with vill set is treated as an unsupported configuration. |
|||
cp_vset_vill |
Confirm that writing 1 to vill clears other bits of vtype |
Set rs1 nonzero, rs1 = 1 in XLEN-1, 11 in 7:6 (vma/vta). vsetvl rd, rs1, rs2 and vtype.vill = {0} |
vtype.vill becomes 1 and other bits become 0 |
1 |
feature (coverpoint written): covered by coverpoint above |
||
cp_vtype_vill_set_vl_0 |
Confirm that if an unsupported configuration is set, that vl is set to zero |
Run vsetvl with rs1 non-zero and rs2 vill bit set and vl =! 0 |
vl should be set to zero |
1 |
vtype_lmul_fval_rsv |
test written: yes |
|
cp_vsetvl_i_rd_nx0_rs1_x0 |
Confirm that when running a vsetvl or vsetvli instruction with rd != x0 and rs1 = x0 that vl is set to vlmax |
with vl != vlmax, conduct vsetvl and vsetvli with rd != x0 and rs1 = x0. Cross with sew = {8/16/32/64} and respective supported lmul {supported(f8,f4,f2,)1,2,4,8} |
vl csr is set to vlmax |
2 instructions * 4 sew bins * 7 lmul bins |
vl_acc |
test written: yes |
|
cp_vsetvl_i_rd_x0_rs1_x0 |
Confirm that when running a vsetvl or vsetvli instruction with rd = x0 and rs1 = x0 that vl is unchanged |
with vl != 0, conduct vsetvl and vsetvli with rd = x0 and rs1 = x0. sew and lmul must be such that vlmax does not change |
vl is unchanged |
2 |
vsetvl_op |
test written: yes |
|
AVL |
|||||||
cp_vsetvl_i_avl_eq_zero |
Confirm that vsetvl{i} instructions follow vl requirements when avl is zero |
Run vsetvli and vsetvl with rs1 = 0 |
vl = 0 |
1 |
vsetvl_op |
test written: yes |
|
cp_vsetvl_i_avl_eq_vlmax |
Confirm that vsetvl{i} instructions follow avl requirements when equal to vlmax |
Run vsetvli and vsetvl with rs1 = vlmax |
vl = avl |
1 |
vset_op |
test written: yes |
|
cp_vsetvl_i_avl_lt_2x_vlmax |
Confirm that vsetvl{i} instructions follow avl requirements when greater than vlmax and less than equal to 2*vlmax (if avl is less than 2* vlmax) |
Run vsetvli and vsetvl with vlmax < rs1 < 2 *vlmax |
ceil(AVL / 2) ≤ vl ≤ VLMAX |
1 |
vsetvl_op |
test written: yes, is a chance that sig don’t match |
|
cp_vsetvl_i_avl_eq_2x_vlmax |
Confirm that vsetvl{i} instructions follow avl requirements when greater than 2 * vlmax (when avl is greater than equal to 2 * vlmax) |
Run vsetvli and vsetvl with rs1 ≥ 2 *vlmax |
vl = VLMAX |
1 |
vsetvl_op |
test written: yes |
|
cp_vsetvl_i_avl_gt_2x_vlmax |
Confirm that vsetvl{i} instructions follow avl requirements when greater than 2 * vlmax (when avl is greater than equal to 2 * vlmax) |
Run vsetvli and vsetvl with rs1 ≥ 2 *vlmax |
vl = VLMAX |
1 |
vsetvl_op |
test written: yes |
|
cp_vsetivli_avl_edges |
Confirm that vsetivli abides by the avl corners |
Run vsetivli with all values of imm = {[0:31]} with sew = {all_supported} and lmul = 1 |
Abides by avl rules depending on |
4 sew bins * 32 imm bins |
vset_op |
test written: yes |
|
vstart |
|||||||
cp_vstart_out_of_bounds |
Confirm that the vstart CSR only has enough writeable bits to hold the largest element index (2^16-1) |
conduct a csr write with rs1 = 2^16 on the vstart register |
Not defined in spec, either vstart takes the bottom bits or sets to vlmax-1 |
1 |
vstart_acc_sz |
test written: yes |
|
cp_sew_illegal |
Cannot set SEW < 8, all set SEW must be powers of 2 (can accomplish this by looping and setting sew of 2x until vill bit is set and then confirm that vill bit is set whenever setting a non power of 2 sew in that range) |
feature (coverpoint written): can’t be tested |
|||||
cp_vl_walking1s_sew_lmul |
Confirm that all vl CSR bit fields are correctly set for all combinations of sew and lmul (thus all VLMAX) |
Running the vsetvli instruction, cross all sew = {8/16/32/64} lmul = {f8, f4,f2, 1, 2, 4, 8} with rs1 ={XLEN 1-hot values} |
vl register will be set in accordance with vlmax |
4sew * 7 lmul * XLEN 1-hot values |
|||
cp_vlen_illegal |
Cannot set VLEN greater than 2^16, can check vl with eew = 8 |
vsetvli rs1={0, 1, 2, 3, 4, 7, 8, 9, 16, 32, 64… 2^16} |
feature (coverpoint written): covered by csr writing tests |
||||
The vector extension must have a consistent state at reset. In particular, vtype and vl must have values that can be read and then restored with a single vsetvl instruction. (make sure reset is called) |
feature (coverpoint written): untestable |
||||||
Sm_VF tests (Sm_VF-NN.S): vector floating-point instructions and mstatus.FS, run when Zve32f is also supported. |
|||||||
It should be understood that for most coverpoints that are based on arithmetic instructions, the coverpoints will check to make sure they’re non-trivial, meaning that vl != 0, vstart=0, vill=0, and they do not trap. It may be useful to know that when using vsetvl{i} instructions if rd != x0 and rs1 = x0, vl = vlmax |
|||||||
cp_vectorfp_mstatus_fs_state_affecting_register |
Confirm vector floating point instructions set mstatus.FS to dirty when modifying floating point register state |
Set mstatus.FS = {initial/clean} and run a fd writing instruction |
mstatus.FS is set to dirty |
1 |
mstatus_fs_dirty_V_fp |
spec: Any vector floating-point instruction that modifies any floating-point extension state (i.e., floating-point CSRs or f registers) must set mstatus.FS to Dirty. |
|
cp_vectorfp_mstatus_fs_state_affecting_csr |
Confirm vector floating point instructions set mstatus.FS to dirty when modifying floating point csr state |
Set mstatus.FS = {initial/clean} and run an instruction that would raise a fp flag after clearing the fp flags (vfdiv.vv divide by zero, vfadd.vv inf + -inf, and vmflt.vv with a NaN operand, which writes only a mask register) |
mstatus.FS is set to dirty |
1 |
spec: Any vector floating-point instruction that modifies any floating-point extension state (i.e., floating-point CSRs or f registers) must set mstatus.FS to Dirty. |
||
cp_vectorfp_mstatus_fs_state_nonaffecting |
Confirm vector floating point instructions properly set mstatus.FS when not modifying floating point state |
Set mstatus.FS = {initial/clean} and run a vector fp instruction that does not affect floating point state (chosen situation for coverpoint is a .vv ins where vs1 = vs2 = 0) |
mstatus.FS may be set to dirty or not depending on implementation |
1 |
spec: Any vector floating-point instruction that modifies any floating-point extension state (i.e., floating-point CSRs or f registers) must set mstatus.FS to Dirty. |
||
cp_vectorfp_mstatus_fs_off |
Confirm that vector floating point instructions (even if they dont modify fp state) raise an illegal instruction exception if mstatus.FS is set to off |
Set mstatus.FS = {off} and run a vector fp instruction that does not affect floating point state (chosen situation for coverpoint is a .vv ins where vs1 = vs2 = 0) |
illegal instruction exception |
1 |
spec: If the floating-point unit status field mstatus.FS is Off then any attempt to execute a vector floating-point instruction will raise an illegal instruction exception. |
||
Sm_H tests (Sm_H_*-NN.S): the hypervisor CSRs and instructions from M-mode, and the mstatus.TVM tests of HS-mode and VS-mode, whose traps are taken in M-mode because the HS-mode trap handler reads satp and hgatp. They run when H is also supported. The CSR lists are those of the H suite. |
|||||||
Tests executed in M-mode (Sm_H_mcsr_cg) |
|||||||
cp_hcsr_access |
All H-extension CSRs are able to read, write, set, and clear |
Write all 1s and all 0s, then set all bits, then clear all bits, then read each {Machine/HS/VS} H-Extension CSR. |
All registers are accessible, and checked fields read back as written. Writes to hgeip raise illegal instruction. |
5 * (2 + 14-17 + 9-11) |
hedeleg_bits_required |
||
cp_hcsrwalk |
Exercise each bit of H-extension CSRs |
Set and clear each bit of each {Machine/HS/VS} H-Extension CSR that holds more than zero. hstatus is walked over GVA, SPV, SPVP, HU, VTVM, VTW and VTSR, and henvcfg over FIOM, LPE, SSE, CBIE, CBCFE, CBZE, PMM, ADUE, PBMTE and STCE (cp_hcsrwalk_masked). The CSRs of cp_hcsr_access_zero are not walked, and hgatp and vsatp are walked by cp_atpwalk1/0. vsepc and vstval are not walked, because an invalid address may legally be converted; cp_vsepc_vaddr_* and cp_vstval_vaddr_* write them with valid addresses. |
All registers are accessible. Some fields are WARL and will not change. |
64*2*(13-16 + 8-10) |
H_vscsrs_acc_m_hs |
||
cp_atpwalk1 |
hgatp and vsatp hold each PPN, VMID and ASID bit |
With MODE = Sv39x4/Sv39 (RV64) or Sv32x4/Sv32 (RV32), write hgatp and vsatp with a walking 1 and a walking 0 through every non-MODE bit. MODE = Bare with nonzero fields is UNSPECIFIED and unsupported MODEs are legalized in an implementation-defined way, so MODE is held at a paged mode. |
Each bit reads back as written, except PPN bits at and above the physical address width, which are not checked, VMID and ASID bits above VMIDLEN and ASIDLEN, and hgatp.PPN[1:0], which may be read-only zero. |
2 CSRs * (60 (RV64) or 31 (RV32)) each |
hgatp_vmid_lsbs |
||
cp_vsepc_vaddr_walk1 |
vsepc and vstval hold every valid address |
csrrw vsepc and vstval with each canonical virtual address with a walking 1 (0s in the msbs) and a walking 0 (1s in the msbs) through bits 0 to VALEN-2 of the largest supported Sv mode, and with two physical addresses, the current pc and the scratch area. Only valid addresses are written, because an invalid address may legally be converted. |
Each value reads back as written (vsepc bit 0 reads 0, and bit 1 reads 0 unless 2-byte instruction alignment is allowed). |
walk1, walk0: 2 CSRs * (32 (Sv32), 38 (Sv39), 47 (Sv48) or 56 (Sv57)) each |
|||
cp_replica |
Writing to S/VS-mode CSRs doesn’t affect replica |
Write different values into S-mode CSRs and their VS-mode replicas (satp and vsatp only when both support Sv39 (RV64) or Sv32 (RV32)). Read back both. |
Each CSR should have value written. |
9 |
H_vscsrs_v0 |
||
cp_replica_vs |
In VS, writing to S-mode CSRs affects replica instead |
In M-mode, write different values into S-mode CSRs and their VS-mode replicas (satp and vsatp only when vsatp supports Sv39 (RV64) or Sv32 (RV32)). Switch to VS-mode and write and read back the S CSRs. VS-mode ecalls go to M-mode, so no trap changes the S CSRs. Back in M-mode, read both the S CSRs and the VS replicas. vsatp stays Bare while VS-mode runs; satp holds a paged value. |
VS replica should have changed but S CSR does not change. |
9 |
H_vscsrs_sub |
||
cp_mtvala |
mtval must not be read-only zero |
Write 1s to mtval |
nonzero |
1 |
H_mtval_nrz |
||
cp_vsepc_ialign32_read |
vsepc[1] is masked on reads, including sret’s in VS-mode, while IALIGN = 32 |
Only with Zca and a writable misa.C (MUTABLE_MISA_C). Clear misa.C in M-mode. In VS-mode (entered with T-SBI), write sepc (vsepc) with bit 1 set, execute sret with sstatus.SPP = S, then write and read sepc. Write and read vsepc in M-mode and in HS-mode. Then set misa.C again in M-mode and read vsepc. |
While misa.C = 0, vsepc reads with bit 1 clear in every mode and sret returns to the masked address; after misa.C is set again, vsepc reads with bit 1 set. Match reference model. |
2 modes + 1 + 1 |
vsepc_sz_acc_op |
||
mstatus.TVM and hstatus.VTVM (Sm_H_tvm_cg) |
|||||||
cp_tvm_hs |
TVM traps access to satp and hgatp, but not vsatp; VTVM does not affect HS-mode |
With mstatus.TVM = {0/1} cross hstatus.VTVM = {0/1}, in HS-mode read and write satp, hgatp and vsatp |
Illegal instruction fault for satp and hgatp if TVM = 1. vsatp accesses never trap. VTVM has no effect. |
3 regs * 2 accesses * 2 TVM * 2 VTVM |
mstatus_tvm_hs |
||
cp_tvm_vs |
VTVM traps access to satp |
With mstatus.TVM = {0/1} cross hstatus.VTVM = {0/1}, in VS-mode read and write satp |
Virtual instruction fault if VTVM = 1. TVM does not affect VS-mode. |
2 TVM * 2 VTVM * 2 accesses |
mstatus_modes |
||
cp_hfence |
Basic fence |
Execute hfence.vvma, hfence.gvma in {M, HS, VS, U, VU mode} cross with mstatus.TVM = {0,1} and with hstatus.VTVM = {0,1} |
Executes in M-mode and HS-mode, except illegal instruction for HFENCE.GVMA in HS-mode with mstatus.TVM = 1. Illegal instruction in U-mode and virtual instruction in VS-mode and VU-mode. |
5 modes * 2 instr * 2 TVM * 2 VTVM |
mstatus_tvm_hs |
||
cp_sfence |
Basic fence |
Execute sfence.vma in {M, HS, VS, U, VU mode} cross with mstatus.TVM = {0,1} and with hstatus.VTVM = {0,1} |
Executes in M-mode, in HS-mode when TVM = 0 and in VS-mode when VTVM = 0. Illegal instruction in HS-mode when TVM = 1 and in U-mode; virtual instruction in VS-mode when VTVM = 1 and in VU-mode. |
5 modes * 2 TVM * 2 VTVM |
hstatus_vtvm_op |
||
Instructions (Sm_H_inst_cg) |
|||||||
cp_hlv |
Basic load |
Set up non-identity G and VS-stage page tables (Sv39x4 and Sv39, or Sv32x4 and Sv32). In M-mode: Write a value with the sign bit of every access size set to scratch. hlv.b, hlv.bu, hlv.h, hlv.hu, hlv.w from scratch. For rv64, also test hlv.wu, hlv.d. Random source and destination registers. |
Read and sign/zero extend |
5 instr (7 on RV64) |
hlsv_mode |
||
cp_hlvx |
Basic load |
Set up non-identity G and VS-stage page tables. In M-mode: Write a value to scratch. hlvx.hu, hlvx.wu from scratch. Random source and destination registers. |
Read and sign/zero extend |
2 instr |
hlsv_mode |
||
cp_hsv |
Basic store |
Set up non-identity G and VS-stage page tables. In M-mode: hsv.b, hsv.h, hsv.w to scratch, and read scratch through its physical address. For rv64, also test hsv.d. Random source and destination registers. |
Stores the low bytes of the source register |
3 instr (4 on RV64) |
hlsv_mode |
||
cp_guest_page_fault |
hlv and hsv guest-page faults record mtval2 and mtinst |
In M-mode with an empty G-stage root table, hlv.w and hsv.w with vsatp = Bare (a fault on the final translation) and with the VS-stage root table at an unmapped guest physical address (a fault on an implicit VS-stage access). |
Load or store guest-page fault into M-mode. mtval2 holds zero or the guest physical address >> 2. mtinst holds zero or the transformed instruction on the final translation, and the pseudoinstruction on the implicit access when mtval2 is nonzero. |
2 instr * 2 vsatp |
mtval2_sz_acc_op |
||
cp_mret_m |
mret uses MPV |
Execute mret in machine mode with cross-product of mstatus.MPP = {M, S, U} / MPV / MPIE. In a lower mode, a read of mscratch traps and the trap record shows the mode reached. Then record mstatus (and mstatush on RV32). |
Goes to appropriate mode. With MPP = M, mret stays in M-mode with V = 0. mret clears MPV. |
3 MPP * 2 MPV * 2 MPIE |
mstatus_mpv_op |
||
cp_sret_m |
sret from M mode |
Execute sret in machine mode with cross-product of mstatus.SPP / hstatus.SPV / SPIE. After the sret, a read of mscratch traps and the trap record shows the mode reached. Then check mstatus.SPP, SIE, SPIE and hstatus.SPV. |
Goes to appropriate mode |
2 SPP * 2 SPV * 2 SPIE |
sret_H |
||
Not tested |
|||||||
misa.H enables the hypervisor extension |
With MUTABLE_MISA_H, clear misa.H, check that hypervisor CSRs and instructions raise illegal instruction, and set it again. |
misa_H_op |
Not tested |
Blocked on the reference model: Sail’s writable_misa makes every misa bit writable, and no sail.json of a config with MUTABLE_MISA_H enables it. |
|||
Ssdbltrp requires mtval2 |
mtval2_Ssdbltrp |
Not tested |
An implementation requirement; with H, cp_hcsr_access_zero accesses mtval2. A hart with Ssdbltrp and without H belongs to an Ssdbltrp suite. |
||||
TODO: Plan how to check WARL, WPRI, WLRL fields. It seems every CSR needs parameters, either to tell the reference model how they should behave (to generate expected values), or to tell the tests and coverpoints which values are legal to test.
| Normative Rule | Rule Text | Coverpoints |
|---|---|---|
m_highest_priv_mode |
machine-mode (M-mode), which is the highest privilege mode in a RISC-V hart. |
Implicit |
m_mode_first_at_reset |
M-mode is used for low-level access to a hardware platform and is the first mode entered at reset. |
Sm_mcsr_cg/cp_mcsr_access |
m_access_all_lower_priv_csrs |
Sm_mcsr_cg/cp_scsr_from_m, Sm_F_cg/cp_fcsr_access, Sm_V_cg/cp_vcsrrswc, Sm_H_mcsr_cg/cp_hcsr_access |
|
misa_acc |
Sm_mcsr_cg/{cp_misa_mxl, cp_misa_dependencies} |
|
misa_always_rd |
Sm_mcsr_cg/cp_misa_mxl |
|
misa_csr_implemented |
a value of zero can be returned to indicate this feature has not been implemented |
Sm_mcsr_cg/cp_misa_mxl |
misa_enc_img |
Sm_mcsr_cg/{cp_misa_mxl, cp_misa_dependencies} |
|
misa_mxl_op_isa |
Sm_mcsr_cg/cp_misa_mxl |
|
misa_mxl_op_nz |
If |
Sm_mcsr_cg/cp_misa_mxl |
xlen_le_mxlen |
XLEN is never greater than MXLEN, but XLEN might be smaller than MXLEN in less-privileged modes. |
Sm_mcsr_cg/cp_misa_mxl |
misa_mxl_acc |
Sm_mcsr_cg/cp_misa_mxl |
|
misa_mxl_enc |
Sm_mcsr_cg/cp_misa_mxl |
|
misa_sz |
Sm_mcsr_cg/cp_misa_mxl |
|
misa_extensions_enc_txt |
Sm_mcsr_cg/{cp_misa_dependencies, cp_misa_b, cp_misa_v} |
|
misa_extensions_enc_tbl |
Sm_mcsr_cg/{cp_misa_dependencies, cp_misa_b, cp_misa_v} |
|
misa_extensions_warl_op |
Sm_mcsr_cg/{cp_misa_dependencies, cp_misa_b, cp_misa_v} |
|
misa_extensions_reset_maximal |
Sm_mcsr_cg/cp_misa_mxl |
|
misa_extensions_reset_ref |
The misa register is reset to enable the maximal set of supported extensions, as described in misa. |
Sm_mcsr_cg/cp_misa_mxl |
misa_extensions_disabling |
Out of scope; also untestable without Ssstrict because reserved instructions behavior is UNSPECIFIED |
|
misa_extensions_rsv_ret_0 |
All bits that are reserved for future use must return zero when read. |
Sm_mcsr_cg/cp_misa_mxl |
misa_i_op |
Sm_mcsr_cg/cp_misa_mxl |
|
misa_e_op |
Sm_mcsr_cg/cp_misa_mxl |
|
misa_x_op |
The |
Non-standard extensions are not certified |
misa_B_op |
Sm_mcsr_cg/cp_misa_b |
|
misa_m_op |
Sm_mcsr_cg/cp_misa_mxl |
|
misa_s_op |
When the |
Sm_mcsr_cg/cp_misa_mxl |
misa_u_op |
Sm_mcsr_cg/cp_misa_mxl |
|
misa_e_not_i |
Unless |
Sm_mcsr_cg/cp_misa_mxl |
Zmmul_misa_m |
TODO: execute Zmmul multiply instructions with misa.M cleared |
|
misa_e_acc |
TODO: write misa.E and check that it does not change |
|
misa_extensions_dependencies |
Sm_mcsr_cg/cp_misa_dependencies |
|
misa_extensions_collective_warl |
Sm_mcsr_cg/cp_misa_dependencies |
|
misa_inc_ialign |
Sm_mcsr_cg/cp_misa_clear_c |
|
misa_extensions_reenable_unspec |
Behavior is UNSPECIFIED by the specification; not tested |
|
mvendorid_sz_acc_op |
Sm_mcsr_cg/cp_mcsr_access_ro/mvendorid |
|
mvendorid_always_rd |
Sm_mcsr_cg/cp_mcsr_access_ro/mvendorid |
|
mvendorid_enc |
Sm_mcsr_cg/cp_mcsr_access_ro/mvendorid |
|
marchid_sz_acc_op |
The |
Sm_mcsr_cg/cp_mcsr_access_ro/marchid |
marchid_always_rd |
Sm_mcsr_cg/cp_mcsr_access_ro/marchid |
|
mimpid_op |
The |
Sm_mcsr_cg/cp_mcsr_access_ro/mimpid |
mimpid_always_rd |
Sm_mcsr_cg/cp_mcsr_access_ro/mimpid |
|
mhartid_sz_acc_op |
Sm_mcsr_cg/cp_mcsr_access_ro/mhartid |
|
mhartid_always_rd |
Sm_mcsr_cg/cp_mcsr_access_ro/mhartid |
|
mhartid_one_is_zero |
Sm_mcsr_cg/cp_mcsr_access_ro/mhartid |
|
mhartid_unique |
Sm_mcsr_cg/cp_mcsr_access_ro/mhartid |
|
mstatus_sz_acc |
Sm_mcsr_cg/cp_mcsr_access_masked/mstatus |
|
mstatush_sz_acc |
For RV32 only, |
Sm_mcsr_cg/cp_mcsr_access_masked/mstatush |
mstatus_xret_op |
Sm_mprivinst_cg/{cp_mret, cp_sret, cp_sret_s}, S_sprivinst_cg/cp_sret_s |
|
mstatush_enc |
Sm_mcsr_cg/cp_mcsr_access_masked/mstatush |
|
mstatus_sie_spie_rdonly0 |
Sm_mcsr_cg/cp_mcsr_access_masked/mstatush |
|
mstatus_xpp_enc |
Sm_mcsr_cg/cp_mcsr_access_masked/mstatus |
|
mstatus_mpp_sz |
Sm_mcsr_cg/cp_mcsr_access_masked/mstatus |
|
mstatus_xpp_warl |
Sm_mcsr_cg/{cp_mcsr_access_masked,cp_mcsrwalk_masked}/mstatus |
|
mstatus_xpp_rdonly0 |
If privilege mode x is not implemented, then xPP must be read-only 0. |
Sm_mcsr_cg/cp_mcsr_access_masked/mstatus |
mstatus_spp_sz |
Sm_mcsr_cg/cp_mcsr_access_masked/mstatus |
|
mstatus_mdt_sz_warl |
The M-mode-disable-trap ( |
Sm_mcsr_cg/cp_mcsr_access_masked/mstatus, Sm_mcsr_cg/cp_mcsrwalk_masked/mstatus |
mstatus_sxl_uxl_warl_op |
Sm_mcsr_cg/cp_mcsr_access_masked/mstatus |
|
mstatus_sxl_uxl_enc |
The encoding of these fields is the same as the |
Out of scope |
mstatus_sxl_uxl_sxlen_uxlen_mxlen32 |
When MXLEN=32, the |
Sm_mcsr_cg/cp_mcsr_access_masked/mstatus |
mstatus_sxl_acc_mxlen64 |
Sm_mcsr_cg/cp_mcsr_access_masked/mstatus |
|
mstatus_sxl_rdonly_mxlen64 |
an implementation may make |
Sm_mcsr_cg/cp_mcsr_access_masked/mstatus |
mstatus_uxl_acc_mxlen64 |
Sm_mcsr_cg/cp_mcsr_access_masked/mstatus |
|
mstatus_uxl_rdonly_mxlen64 |
Sm_mcsr_cg/cp_mcsr_access_masked/mstatus |
|
mstatus_uxl_legal_vals_smode |
Sm_mcsr_cg/cp_mcsr_access_masked/mstatus |
|
mstatus_mprv_ldst_op |
Sv_Sm_mstatus_mprv_cg/{cp_mprv_load, cp_mprv_store}, PMP_S_cg/cp_mprv_lw, PMP_U_cg/cp_mprv_sw |
|
mstatus_mprv_inst_xlat_op |
Instruction address-translation and protection are unaffected by the setting of |
Sv_Sm_mstatus_mprv_cg/{cp_mprv_ins, cp_mprv_upage_smode_sumset_exec}, PMP_S_cg/cp_mprv_jalr, PMP_U_cg/cp_mprv_jalr |
mstatus_mprv_rdonly0_no_umode |
|
Sm_mcsr_cg/cp_mcsr_access_masked/mstatus |
mstatus_mprv_clr_mret_sret_less_priv |
Sm_mprivinst_cg/{cp_mret, cp_sret, cp_sret_s}, S_sprivinst_cg/cp_sret_s |
|
xret_op |
Sm_mprivinst_cg/cp_mret |
|
sret_presence |
Sm_mprivinst_cg/cp_sret |
|
sret_ill_inst_exc_rst |
TODO |
|
xret_in_higher_mode |
Sm_mprivinst_cg/cp_sret |
|
mstatus_mxr_op |
Sv_vm_permissions_cg/{cp_xpage_mxrunset_read_s, cp_xpage_mxrunset_read_u}, Sv_vm_permissions_cg/{cp_xpage_mxrset_read_s, cp_xpage_mxrset_read_u} |
|
mstatus_mxr_rdonly0_no_smode |
Sm_mcsr_cg/cp_mcsr_access_masked/mstatus |
|
mstatus_sum_op |
Sv_vm_permissions_cg/{cp_upage_smode_sumunset_noread_s, cp_upage_smode_sumunset_nowrite_s}, Sv_vm_permissions_cg/{cp_upage_smode_sumset_read_s, cp_upage_smode_sumset_write_s} |
|
mstatus_sum_op_no_vm |
|
TODO |
mstatus_sum_op_mprv_mpp |
while |
Sv_Sm_mstatus_mprv_cg/{cp_mprv_upage_smode_sumunset_noread, cp_mprv_upage_smode_sumunset_nowrite}, Sv_Sm_mstatus_mprv_cg/{cp_mprv_upage_smode_sumset_read, cp_mprv_upage_smode_sumset_write} |
mstatus_sum_rdonly0 |
Sm_mcsr_cg/cp_mcsr_access_masked/mstatus |
|
mstatus_mxr_sum_op_acc_fault |
||
mstatus_mstatush_xbe_warl |
Sm_mcsr_cg/cp_mcsr_access_masked/mstatus, Sm_mcsr_cg/cp_mcsr_access_masked/mstatush |
|
mstatus_tvm_warl |
Sm_mcsr_cg/cp_mcsr_access_masked/mstatus |
|
mstatus_tvm_op |
Sv_Sm_mstatus_mprv_cg/cp_tvm_exception_s, Svinval_cg/cp_svinval |
|
mstatus_tvm_acc |
Sm_mcsr_cg/cp_mcsr_access_masked/mstatus, Sm_mcsr_cg/cp_mcsrwalk_masked/mstatus |
|
mstatus_tw_acc |
|
Sm_mcsr_cg/cp_mcsr_access_masked/mstatus |
mstatus_tsr_warl |
Sm_mcsr_cg/cp_mcsr_access_masked/mstatus |
|
mstatus_tsr_op |
Sm_mprivinst_cg/cp_sret_s |
|
mstatus_tsr_acc |
|
Sm_mcsr_cg/cp_mcsr_access_masked/mstatus |
mstatus_fs_vs_warl |
Sm_mcsr_cg/cp_mcsr_access_masked/mstatus, Sm_mcsr_cg/cp_mcsrwalk_masked/mstatus |
|
mstatus_fs_op |
Sm_F_cg/cp_mstatus_FS_transition, U_F_cg/cp_mstatus_FS_transition, S_F_cg/cp_sstatus_FS_transition, H_F_cg/cp_vsstatus_FS_transition |
|
mstatus_vs_op |
Sm_V_cg/{cp_mstatus_vs_set_dirty_vcsr, cp_mstatus_vs_set_dirty_csr}, U_V_cg/{cp_mstatus_vs_set_dirty_vcsr, cp_mstatus_vs_set_dirty_csr}, S_V_cg/{cp_sstatus_vs_set_dirty_vcsr, cp_sstatus_vs_set_dirty_csr}, H_V_cg/{cp_vsstatus_vs_set_dirty_vcsr, cp_vsstatus_vs_set_dirty_csr} |
|
mstatus_vs_sstatus_vs_op |
Sm_V_cg/{cp_mstatus_vs_set_dirty_arithmetic, cp_mstatus_vs_off_arithmetic}, U_V_cg/{cp_mstatus_vs_set_dirty_arithmetic, cp_mstatus_vs_off_arithmetic}, S_V_cg/{cp_sstatus_vs_set_dirty_arithmetic, cp_sstatus_vs_off_arithmetic}, H_V_cg/{cp_vsstatus_vs_set_dirty_arithmetic, cp_vsstatus_vs_off_arithmetic} |
|
mstatus_xs_encodes_op |
The |
Untested |
mstatus_xs_summary_op |
The |
Untested |
mstatus_fs_vs_xs_enc |
Sm_F_cg/cp_mstatus_FS_transition, U_F_cg/cp_mstatus_FS_transition, S_F_cg/cp_sstatus_FS_transition, H_F_cg/cp_vsstatus_FS_transition |
|
mstatus_fs_acc1 |
If the |
Sm_F_cg/cp_mstatus_FS_transition, U_F_cg/cp_mstatus_FS_transition, S_F_cg/cp_sstatus_FS_transition, H_F_cg/cp_vsstatus_FS_transition |
mstatus_fs_acc2 |
If neither the |
Sm_mcsr_cg/cp_mcsr_access_masked/mstatus |
mstatus_fs_rdonly0_s_no_F |
If S-mode is implemented but the |
Sm_mcsr_cg/cp_mcsr_access_masked/mstatus |
mstatus_vs_acc1 |
If the v registers are implemented, the |
Sm_mcsr_cg/cp_mcsr_access_masked/mstatus |
mstatus_vs_acc2 |
If neither the v registers nor S-mode is implemented, then |
Sm_mcsr_cg/cp_mcsr_access_masked/mstatus |
mstatus_vs_rdonly0_s_no_V |
If S-mode is implemented but the v registers are not, |
TODO |
mstatus_xs_acc |
In harts without additional user extensions requiring new state, the |
Sm_mcsr_cg/cp_mcsr_access_masked/mstatus |
mstatus_xs_equiv |
Out of scope |
|
mstatus_sd_acc |
Sm_mstatus_cg/cp_mstatus_sd_write |
|
mstatus_sd_summary_op |
Sm_mstatus_cg/cp_mstatus_sd_write, Sm_F_cg/cp_mstatus_FS_transition, U_F_cg/cp_mstatus_FS_transition, S_F_cg/cp_sstatus_FS_transition, H_F_cg/cp_vsstatus_FS_transition |
|
mstatus_sd_vs_dirty_op |
Sm_mstatus_cg/cp_mstatus_sd_write |
|
mstatus_sd_rdonly0 |
If |
Sm_mstatus_cg/cp_mstatus_sd_write |
mstatus_sd_formula |
Sm_mstatus_cg/cp_mstatus_sd_write, Sm_F_cg/cp_mstatus_FS_transition, U_F_cg/cp_mstatus_FS_transition, S_F_cg/cp_sstatus_FS_transition, H_F_cg/cp_vsstatus_FS_transition |
|
mstatus_fs_vs_xs_off_op |
Sm_F_cg/{cp_fcsr_access, cp_mstatus_FS_transition}, U_F_cg/{cp_fcsr_access, cp_mstatus_FS_transition}, S_F_cg/{cp_fcsr_access, cp_sstatus_FS_transition}, H_F_cg/{cp_fcsr_access, cp_vsstatus_FS_transition}, Sm_V_cg/{cp_mstatus_vs_off_arithmetic, cp_mstatus_vs_off_csr}, U_V_cg/{cp_mstatus_vs_off_arithmetic, cp_mstatus_vs_off_csr}, S_V_cg/{cp_sstatus_vs_off_arithmetic, cp_sstatus_vs_off_csr}, H_V_cg/{cp_vsstatus_vs_off_arithmetic, cp_vsstatus_vs_off_csr} |
|
mstatus_fs_vs_xs_initial_op |
When the status is Initial, the corresponding state should have an initial constant value. |
Not tested: the initial constant value is not specified and software can change it |
mstatus_fs_vs_xs_clean_op |
Not tested: whether the state matches the last context save depends on software |
|
mstatus_fs_vs_xs_dirty_op |
Sm_F_cg/{cp_mstatus_FS_transition, cp_fcsr_access}, U_F_cg/{cp_mstatus_FS_transition, cp_fcsr_access}, S_F_cg/{cp_sstatus_FS_transition, cp_fcsr_access}, H_F_cg/{cp_vsstatus_FS_transition, cp_fcsr_access} |
|
mstatus_vs_wr |
the setting of VS has no effect on the contents of the vector register state. |
TODO: test with vector |
mstatus_fs_no_dirty_track |
Sm_F_cg/cp_mstatus_FS_transition, U_F_cg/cp_mstatus_FS_transition, S_F_cg/cp_sstatus_FS_transition, H_F_cg/cp_vsstatus_FS_transition, Sm_mcsr_cg/cp_mcsrwalk_masked/mstatus |
|
mstatus_fs_no_change_dirty |
Not tested: implementation-defined whether FS becomes Dirty when the contents do not change, and no UDB parameter controls this behavior in the ref model |
|
mstatus_fs_imprecise |
Sm_F_cg/cp_mstatus_FS_transition_nondeterministic, U_F_cg/cp_mstatus_FS_transition_nondeterministic, S_F_cg/cp_sstatus_FS_transition_nondeterministic, H_F_cg/cp_vsstatus_FS_transition_nondeterministic |
|
mstatus_vs_imprecise |
Untestable |
|
mstatus_vs_no_change_dirty |
Untestable |
|
mtvec_enc |
TODO: Sm_mcsr_cg has no mtvec bin; Sm.py writes mtvec but checks only bit 1 |
|
mtvec_sz_warl_acc |
TODO: Sm_mcsr_cg has no mtvec bin; Sm.py writes mtvec but checks only bit 1 |
|
mtvec_mandatory |
TODO: Sm_mcsr_cg has no mtvec bin; Sm.py writes mtvec but checks only bit 1 |
|
mtvec_rdonly |
TODO: Sm_mcsr_cg has no mtvec bin; Sm.py writes mtvec but checks only bit 1 |
|
mtvec_base_align_4b |
The value in the |
TODO: Sm_mcsr_cg has no mtvec bin; Sm.py writes mtvec but checks only bit 1 |
mtvec_base_align_func_mode |
the |
TODO: Sm_mcsr_cg has no mtvec bin; Sm.py writes mtvec but checks only bit 1 |
medelegh_sz_acc_enc_xlen32 |
When XLEN=32, |
Sm_mcsr_cg/cp_mcsr_access/medelegh |
medelegh_omit_xlen64 |
Ssstrict_Sm_mcsr_cg/cp_csrr |
|
medeleg_sz_acc |
The machine exception delegation register ( |
Sm_mcsr_cg/cp_mcsr_access/medeleg |
mideleg_sz_acc |
The machine interrupt delegation ( |
Sm_mcsr_cg/cp_mcsr_access/mideleg |
medeleg_mideleg_mandatory_s_mode |
In harts with S-mode, the medeleg and mideleg registers must exist |
Sm_mcsr_cg/cp_mcsr_access/{medeleg, mideleg} |
medeleg_mideleg_omit_wo_s_mode |
In harts without S-mode, the |
Ssstrict_Sm_mcsr_cg/cp_csrr |
medeleg_mideleg_warl |
Sm_mcsr_cg/cp_mcsr_access/mideleg |
|
medeleg_no_rd1 |
An implementation shall not have any bits of |
Sm_mcsr_cg/cp_mcsr_access/medeleg |
mideleg_no_rd1 |
Sm_mcsr_cg/cp_mcsr_access/mideleg |
|
mideleg_rd1_lower_level |
Sm_mcsr_cg/cp_mcsr_access/mideleg |
|
medeleg_when_rd0 |
Sm_mcsr_cg/cp_mcsr_access/medeleg |
|
medeleg_16_rdonly0 |
The |
Sm_mcsr_cg/cp_mcsr_access/medeleg |
mip_sz_acc |
The |
Sm_mcsr_cg/cp_mcsr_access/mip |
mip_mandatory |
Sm_mcsr_cg/cp_mcsr_access/mip, Sm_mcsr_cg/cp_mcsrwalk/mip |
|
mie_sz_acc |
|
Sm_mcsr_cg/cp_mcsr_access/mie |
mie_mandatory |
Sm_mcsr_cg/cp_mcsr_access/mie |
|
mip_bits_wr_or_rdonly |
Each individual bit in register |
Sm_mcsr_cg/cp_mcsrwalk/mip |
mie_bits_wr |
A bit in |
Sm_mcsr_cg/cp_mcsrwalk/mie |
mie_bits_rdonly0 |
Sm_mcsr_cg/cp_mcsrwalk/mie |
|
mip_msip_mie_msie_maybe_rdonly0 |
Sm_mcsr_cg/cp_mcsrwalk/{mip,mie} |
|
std_mach_intr_impl |
Sm_mcsr_cg/cp_mcsrwalk/{mip,mie} |
|
mip_sxip_mie_sxie_rdonly0 |
Sm_mcsr_cg/cp_mcsrwalk/{mip,mie} |
|
mip_lcofip_acc |
Sm_mcsr_cg/cp_mcsrwalk/{mip,mie} |
|
mip_lcofip_mie_lcofie_rdonly0 |
If the |
Sm_mcsr_cg/cp_mcsrwalk/{mip,mie} |
menvcfg_sz_acc |
The menvcfg CSR is a 64-bit read/write register, formatted as shown in norm:menvcfg_enc_img |
Sm_mcsr_cg/cp_mcsr_access_masked/menvcfg, Sm_mcsr_cg/cp_mcsr_access_masked/menvcfgh |
menvcfg_op |
controls certain characteristics of the execution environment for modes less privileged than M. |
Descriptive spec text with no separately testable behavior |
menvcfg_enc_img |
Sm_mcsr_cg/cp_mcsrwalk_masked/menvcfg |
|
menvcfg_fiom_fence_op |
Untestable: no I/O devices defined in profile |
|
menvcfg_fiom_atomic_op |
Untestable: no I/O devices defined in profile |
|
menvcfg_fiom_rdonly0_ok |
Sm_mcsr_cg/cp_mcsrwalk_masked/menvcfg |
|
menvcfg_fiom_fence_presuc_op |
Untestable: no I/O devices defined in profile |
|
menvcfg_cde_rdonly0 |
TODO: check menvcfg.CDE in the Sm walk once Sail supports Smcdeleg |
|
menvcfg_stce_exists |
The Sstc extension adds the STCE (STimecmp Enable) bit to menvcfg CSR. |
Sm_mcsr_cg/cp_mcsrwalk_masked/menvcfg |
menvcfg_stce_rdonly0 |
When the Sstc extension is not implemented, STCE is read-only zero. |
Sm_mcsr_cg/cp_mcsrwalk_masked/menvcfg |
menvcfg_cbze_op |
Sm_mcsr_cg/cp_mcsrwalk_masked/menvcfg, Exceptions_ZicboS_cg/cp_cbze, Exceptions_ZicboU_cg/cp_cbze |
|
menvcfg_cbze_rdonly0 |
When the Zicboz extension is not implemented, CBZE is read-only zero. |
Sm_mcsr_cg/cp_mcsrwalk_masked/menvcfg |
menvcfg_cbcfe_op |
Sm_mcsr_cg/cp_mcsrwalk_masked/menvcfg, Exceptions_ZicboS_cg/cp_cbcfe, Exceptions_ZicboU_cg/cp_cbcfe |
|
menvcfg_cbcfe_rdonly0 |
When the Zicbom extension is not implemented, CBCFE is read-only zero. |
Sm_mcsr_cg/cp_mcsrwalk_masked/menvcfg |
menvcfg_cbie_warl_op |
Sm_mcsr_cg/cp_mcsrwalk_masked/menvcfg, Exceptions_ZicboS_cg/cp_cbie, Exceptions_ZicboU_cg/cp_cbie |
|
menvcfg_cbie_rdonly0 |
When the Zicbom extension is not implemented, CBIE is read-only zero. |
Sm_mcsr_cg/cp_mcsrwalk_masked/menvcfg |
menvcfg_cbie_cbo-inval_op_lead_in |
Exceptions_ZicboS_cg/cp_cbie, Exceptions_ZicboU_cg/cp_cbie |
|
menvcfg_cbie_cbo-inval_op_list |
Exceptions_ZicboS_cg/cp_cbie, Exceptions_ZicboU_cg/cp_cbie |
|
menvcfg_pmm_op |
Smnpm_S_cg/cp_pmlen_masking, Smnpm_U_cg/cp_pmlen_masking |
|
menvcfg_pmm_rdonly0 |
If Smnpm is not implemented, PMM is read-only zero. The PMM field is read-only zero for RV32. |
Sm_mcsr_cg/cp_mcsrwalk_masked/menvcfg, Sm_mcsr_cg/cp_mcsrwalk_masked/menvcfgh |
menvcfg_pmm_enc |
Smnpm_S_cg/cp_pmlen_masking, Smnpm_U_cg/cp_pmlen_masking, Sm_mcsr_cg/cp_mcsrwalk_masked/menvcfg |
|
menvcfg_dte_sdt_rdonly0 |
When Ssdbltrp is not implemented sstatus.SDT, vsstatus.SDT, and henvcfg.DTE bits are read-only zero. |
Sm_mcsr_cg/cp_mcsrwalk_masked/mstatus |
menvcfg_mandatory_u_mode |
In harts with U-mode, menvcfg must be implemented, but all WARL fields may be read-only zero. |
Sm_mcsr_cg/cp_mcsr_access_masked/menvcfg |
menvcfgh_mandatory_s_mode_rv32 |
For harts with S-mode and XLEN=32, menvcfgh must be similarly implemented. |
Sm_mcsr_cg/cp_mcsr_access_masked/menvcfgh |
mseccfg_sz_acc |
Sm_mcsr_cg/cp_mcsr_access_masked/mseccfg, Sm_mcsr_cg/cp_mcsr_access_masked/mseccfgh |
|
mseccfg_presence |
It exists if any extension that adds a field to mseccfg is implemented. Otherwise, it is reserved. |
Sm_mcsr_cg/cp_mcsr_access_masked/mseccfg, TODO: check that mseccfg is reserved when no extension adds a field to it |
mseccfg_enc_img |
Sm_mcsr_cg/cp_mcsrwalk_masked/mseccfg |
|
mseccfg_sseed_useed_presence |
Sm_mcsr_cg/cp_mcsrwalk_masked/mseccfg |
|
mseccfg_useed_rdonly0 |
If Zkr or U-mode is not implemented, USEED is read-only zero. |
Sm_mcsr_cg/cp_mcsrwalk_masked/mseccfg |
mseccfg_sseed_rdonly0 |
If Zkr or S-mode is not implemented, SSEED is read-only zero. |
Sm_mcsr_cg/cp_mcsrwalk_masked/mseccfg |
mseccfg_rlb_mmwp_mml_presence |
The Smepmp extension adds the RLB, MMWP, and the MML fields in mseccfg. |
TODO: check MML, MMWP, and RLB in the Sm mseccfg walk once Sail supports Smepmp |
mseccfg_rlb_op_warl |
TODO: Smepmp is not yet tested |
|
mseccfg_mmwp_op_warl |
TODO: Smepmp is not yet tested |
|
mseccfg_mml_warl |
TODO: Smepmp is not yet tested |
|
mseccfg_mml_sticky |
This is a sticky bit, meaning that once set it cannot be unset until a PMP reset. |
TODO: Smepmp is not yet tested |
mseccfg_mml_set |
When mseccfg.MML is set the system’s behavior changes in the following way: |
TODO: Smepmp is not yet tested |
mseccfg_mml_pmpcfg_l_op |
TODO: Smepmp is not yet tested |
|
mseccfg_mml_m_rule_op |
TODO: Smepmp is not yet tested |
|
mseccfg_mml_soru_rule_op |
TODO: Smepmp is not yet tested |
|
mseccfg_mml_shared_rule_op |
TODO: Smepmp is not yet tested |
|
mseccfg_mml_shared_l0_op |
TODO: Smepmp is not yet tested |
|
mseccfg_mml_shared_l1_op |
TODO: Smepmp is not yet tested |
|
mseccfg_mml_shared_lrwx_1111_op |
TODO: Smepmp is not yet tested |
|
mseccfg_mml_x_restrict |
TODO: Smepmp is not yet tested |
|
mseccfg_mml_exec_code |
TODO: Smepmp is not yet tested |
|
pmp_rw01_rsv |
If mseccfg.MML is not set, the combination of pmpcfg.RW=01 remains reserved for future standard use. |
Reserved encoding for future use; nothing to test |
mseccfg_pmm_presence_op |
Smmpm_cg/cp_pmlen_masking |
|
mseccfg_pmm_rdonly0 |
If Smmpm is not implemented, PMM is read-only zero. The PMM field is read-only zero for RV32. |
Sm_mcsr_cg/cp_mcsrwalk_masked/mseccfg, Sm_mcsr_cg/cp_mcsrwalk_masked/mseccfgh |
mseccfg_pmm_enc |
Smmpm_cg/cp_pmlen_masking, Sm_mcsr_cg/cp_mcsrwalk_masked/mseccfg |
|
mseccfgh_sz_acc_op |
When XLEN=32 only, mseccfgh is a 32-bit read/write register that aliases bits 63:32 of mseccfg. |
Sm_mcsr_cg/cp_mcsr_access_masked/mseccfgh, Sm_mcsr_cg/cp_mcsrwalk_masked/mseccfgh |
mcycle_op |
Sm_mcsr_cg/cp_cntr_access/mcycle, Sm_mcsr_cg/cp_mcycle_wraparound |
|
mcycle_minstret_sz |
The |
Sm_mcsr_cg/cp_cntr_access/mcycle, Sm_mcsr_cg/cp_cntr_access |
mcycle_minstret_rst |
Sm_mcsr_cg/cp_cntr_access/mcycle, Sm_mcsr_cg/cp_cntr_access/minstret |
|
mcycle_minstret_wr |
Any CSR write takes effect after the writing instruction has otherwise completed. |
Sm_mcsr_cg/cp_cntr_access |
mcycle_shared |
Not tested; requires multi-hart core |
|
mcycleh_minstreth_mhpmh_op |
Sm_mcsr_cg/cp_cntr_access/{mcycleh, minstreth, mhpmcounter3h}, Sscofpmf_Sm_cg/cp_sscofpmf_access |
|
minstret_op |
The |
Sm_mcsr_cg/cp_cntr_access/minstret, Sm_mcsr_cg/cp_minstret_wraparound, Sm_Zicntr_cg/cp_instret_add, Sm_Zicntr_cg/cp_instret_mret, Sm_Zicntr_cg/cp_instret_sret |
mhpmcounter_num |
Sm_mcsr_cg/cp_cntr_access |
|
mhpmcounter_warl |
Sm_mcsr_cg/cp_cntr_access |
|
mhpmcounter_mandatory |
Sm_mcsr_cg/cp_cntr_access |
|
mhpmcounter_mhpmevent_rdonly0 |
Sm_mcsr_cg/cp_cntr_access, Sm_mcsr_cg/cp_mcsr_access |
|
mhpmcounter_sz |
Sm_mcsr_cg/cp_cntr_access |
|
mhpmevent_sz_warl_op |
Sm_mcsr_cg/cp_mcsr_access |
|
mhpmevent_enc |
The meaning of these events is defined by the platform, but event 0 is defined to mean no event. |
TODO: check no counting on event 0 |
mcounteren_sz |
Sm_mcsr_cg/cp_mcsr_access/mcounteren |
|
mcounteren_enc_img |
Sm_mcsr_cg/cp_mcsr_access/mcounteren |
|
mcounteren_flds_mandatory_warl |
In harts with U-mode, the |
Sm_mcsr_cg/cp_mcsr_access/mcounteren |
mcounteren_flds_rdonly0 |
Sm_mcsr_cg/cp_mcsr_access/mcounteren |
|
mcounteren_presence |
In harts without U-mode, the |
Ssstrict_Sm_mcsr_cg/cp_csrr |
cycle_instret_hpmcounter_op_rdonly |
Zicntr_csrrs_cg/cp_cntr, Zihpm_csrrs_cg/cp_cntr_hpm, Sm_mcsr_cg/cp_csr_ro |
|
time_op_rdonly |
The |
Zicntr_csrrs_cg/cp_cntr/csr_time, Sm_mcsr_cg/{cp_mtime_write, cp_mtime_wraparound, cp_csr_ro} |
cycleh_instreth_hpmcounternh_op_rdonly |
Zicntr_csrrs_cg/cp_cntr, Zihpm_csrrs_cg/cp_cntr_hpm, Sm_mcsr_cg/cp_csr_ro |
|
timeh_op_rdonly |
Zicntr_csrrs_cg/cp_cntr/csr_timeh, Sm_mcsr_cg/{cp_mtimeh_write, cp_csr_ro} |
|
mcountinhibit_enc_img |
Sm_mcsr_cg/cp_mcsr_access/mcountinhibit |
|
mcountinhibit_sz_warl |
Sm_mcsr_cg/cp_mcsr_access/mcountinhibit, Sm_mcsr_cg/{cp_inhibit_mcycle, cp_inhibit_minstret}, Other counters do not increment predictably and are not tested |
|
mcountinhibit_only_inc |
TODO |
|
mcountinhibit_clear_op |
Sm_mcsr_cg/{cp_inhibit_mcycle, cp_inhibit_minstret}, Other counters do not increment predictably and are not tested |
|
mcountinhibit_cy_shared |
Untested because requires multi-hart core |
|
mcountinhibit_not_impl |
Sm_mcsr_cg/{cp_mcycle_wraparound, cp_minstret_wraparound} |
|
mscratch_sz_acc |
Sm_mcsr_cg/cp_mcsr_access/mscratch |
|
mscratch_enc_img |
Sm_mcsr_cg/cp_mcsr_access/mscratch |
|
mepc_sz_acc |
Sm_mcsr_cg/cp_mcsr_access/mepc |
|
mepc_align |
Sm_mcsr_cg/cp_mcsr_access/mepc |
|
mepc_bit1_dyn_ialign_op |
Sm_mcsr_cg/{cp_mepc_ialign32_read, cp_mepc_ialign32_mret} |
|
mepc_warl |
Sm_mcsr_cg/cp_mcsr_access/mepc |
|
mepc_inv_addr_conv |
Sm_mcsr_cg/cp_mepc_vaddr_walk1, Sm_mcsr_cg/cp_mepc_vaddr_walk0 |
|
mepc_enc_img |
Sm_mcsr_cg/cp_mcsr_access/mepc |
|
mcause_sz_acc |
Sm_mcause_cg/{cp_mcause_write_exception, cp_mcause_write_interrupt} |
|
mcause_mandatory |
Sm_mcause_cg/{cp_mcause_write_exception, cp_mcause_write_interrupt} |
|
mcause_enc_img |
Sm_mcause_cg/{cp_mcause_write_exception, cp_mcause_write_interrupt} |
|
mcause_exccode_enc_img |
See mcause_op |
|
mcause_exccode_wlrl |
The Exception Code is a WLRL field, so is only guaranteed to hold supported exception codes. |
Sm_mcause_cg/{cp_mcause_write_exception, cp_mcause_write_interrupt} |
custom_exc_priority |
The priority of any custom synchronous exceptions is implementation-defined. |
Custom exceptions are non-standard and not certified |
mtval_sz_acc |
The mtval register is an MXLEN-bit read-write register formatted as shown in norm:mtval_enc_img |
Sm_mcsr_cg/cp_mcsr_access/mtval |
mtval_per_exc_behavior |
Definition, checked through UDB |
|
mtval_rdonly0 |
Sm_mcsr_cg/cp_mcsr_access/mtval |
|
mtval_enc_img |
Sm_mcsr_cg/cp_mcsr_access/mtval |
|
mtval_vaddr_wr_misaligned_addr |
TODO: misaligned loads and stores that straddle a PMA, PMP, or page boundary and fault on the upper part |
|
mtval_other_traps_zero |
Exceptions_Sm_cg/cp_ecall_m, InterruptsSm_cg/cp_trigger |
|
mtval_vaddr_and_0_sz |
must be able to hold all valid virtual addresses and the value zero. |
Sm_mcsr_cg/{cp_mtval_zero, cp_mtval_vaddr_walk1, cp_mtval_vaddr_walk0} |
mtval_instr_bits_sz |
Sm_mcsr_cg/cp_mtval_ilen_walk1, Sm_mcsr_cg/cp_mtval_ilen_ones |
|
mtval_warl |
Sm_mcsr_cg/cp_mcsr_access/mtval |
|
mtval_inv_addr_conv |
Sm_mcsr_cg/cp_mtval_vaddr_walk1, Sm_mcsr_cg/cp_mtval_vaddr_walk0 |
|
mconfigptr_sz_acc |
The mconfigptr register is an MXLEN-bit read-only CSR formatted as shown in norm:mconfigptr_enc_img |
Sm_mcsr_cg/cp_mcsr_access_ro/mconfigptr |
mconfigptr_op |
holds the physical address of a configuration data structure. |
Definition, checked through UDB |
mconfigptr_enc_img |
Sm_mcsr_cg/cp_mcsr_access_ro/mconfigptr |
|
mconfigptr_align |
TODO: check that mconfigptr[log2(MXLEN/8)-1:0] reads as zero |
|
mconfigptr_mandatory |
Sm_mcsr_cg/cp_mcsr_access_ro/mconfigptr |
|
mconfigptr_val |
Sm_mcsr_cg/cp_mcsr_access_ro/mconfigptr |
|
sxlen_uxlen |
The effective XLEN in S-mode and U-mode are termed SXLEN and UXLEN, respectively. |
Sm_mcsr_cg/cp_mcsr_access_masked/mstatus |
xlen_reduction_op |
NOT TESTED |
|
xlen_reduction_hint_op |
Out of scope |
|
endianness_inst_fetch_little |
Tested by executing instructions |
|
trap_del_s_mode_no_m_mode |
The |
Untested; S-mode handler does not have access to M-mode CSRs and changing to M-mode disturbs CSRs |
Zicsr_illegal_acc |
Attempts to write a read-only CSR address raise illegal-instruction exceptions. |
Sm_mcsr_cg/cp_csr_ro |
Zicsr_illegal_mode |
Sm_mcsr_cg/cp_csr_insufficient_priv |
|
Zicsr_debug_illegal |
Sm_mcsr_cg/cp_csr_insufficient_priv |
|
Zicsr_write_ro |
Sm_mcsr_cg/{cp_mcsr_access, cp_misa_mxl} |
|
Zicsr_wpri_roz |
Sm_mcsr_cg/cp_mcsr_access_masked/mstatus |
|
Zicsr_wlrl |
Sm_mcause_cg/{cp_mcause_write_exception, cp_mcause_write_interrupt} |
|
Zicsr_warl |
Implementations will not raise an exception on writes of unsupported values to a WARL field. |
Sm_mcsr_cg/cp_mcsr_access |
mtime_acc |
Sm_mcsr_cg/{cp_mtime_write, cp_mtime_wraparound} |
|
mtime_op |
Sm_mcsr_cg/cp_mtime_wraparound, Constant frequency is untestable without an independent time reference |
|
mtime_tick_period |
the platform must provide a mechanism for determining the period of an mtime tick. |
Platform requirement outside the ISA; not tested |
mtime_wrap |
Sm_mcsr_cg/cp_mtime_wraparound |
|
mtime_sz |
The mtime register has a 64-bit precision on all RV32 and RV64 systems. |
Sm_mcsr_cg/{cp_mtimeh_write, cp_mtimeh_wraparound}, TODO: on RV64, check that mtime bits 63:32 are writable |
mtimecmp_sz |
Platforms provide a 64-bit memory-mapped machine-mode timer compare register (mtimecmp). |
TODO: write and read back all 64 bits of mtimecmp |
mtime_enc_img |
Sm_mcsr_cg/{cp_mtime_write, cp_mtime_wraparound} |
|
mtimecmp_enc_img |
TODO: write and read back all 64 bits of mtimecmp |
|
mtimecmp_rv32_wr |
In RV32, memory-mapped writes to mtimecmp modify only one 32-bit part of the register. |
TODO: on RV32, write each half of mtimecmp and read back both halves |
mtime_mtimecmp_rv64_wr |
Sm_mcsr_cg/cp_mtime_wraparound, Zawrs_Sm_cg/cp_wrs_resume, Atomicity is not observable in a single-hart test |
|
time_timeh_visibility_mtime |
Sm_mcsr_cg/{cp_mtime_write, cp_mtimeh_write} |
|
ecall_ebreak_epc_value |
Sm_mprivinst_cg/cp_mprivinst, Exceptions_Sm_cg/{cp_ecall_m, cp_breakpoint} |
|
xret_enc_img |
Sm_mprivinst_cg/{cp_mret, cp_sret} |
|
mret_presence |
Sm_mprivinst_cg/cp_mret |
|
xret_clr_lr_resv |
Either behavior is legal; not tested |
|
m_mode_priv_at_reset |
Sm_mcsr_cg/cp_mcsr_access |
|
mstatus_mie_mprv_rst |
TODO: record mstatus.MIE and MPRV before the boot code writes mstatus |
|
mstatus_mstatush_mbe_rst |
If little-endian memory accesses are supported, the mstatus/mstatush field MBE is reset to 0. |
TODO: record mstatus/mstatush.MBE before the boot code writes it |
ld_rsv_rst |
For implementations with the Zalrsc standard extension, there is no valid load reservation. |
TODO: execute an SC before any LR after reset and check that it fails |
pc_rst |
Tested with linker script |
|
mcause_rst1_val |
The mcause register is set to a value indicating the cause of the reset. |
Implementation-specific reset cause; not tested |
pmp_a_l_rst |
TODO: record the writable pmpcfg A and L fields before the boot code writes them |
|
hgatp_vsatp_mode_rst |
If the hypervisor extension is implemented, the hgatp.MODE and vsatp.MODE fields are reset to 0. |
TODO: record hgatp.MODE and vsatp.MODE after reset, before any write |
warl_rst |
TODO: check that WARL fields hold legal values before the boot code writes them |
|
rst_other_state_unspec |
Behavior is UNSPECIFIED by the specification; not tested |
|
mseccfg_mml_mmwp_rlb_rst |
TODO: record mseccfg.MML, MMWP, and RLB after reset, before any write |
|
mcause_rst2_val |
The mcause values after reset have implementation-specific interpretation |
Implementation-specific reset cause; not tested |
mcause_rst_zero |
Implementation-specific reset cause; not tested |
|
mseccfg_useed_sseed_rst |
TODO: record mseccfg.USEED and SSEED after reset, before any write |
|
nmi_op |
TODO: needs a platform mechanism (RVMODEL macro) to raise an NMI |
|
nmi_mcause_source |
TODO: needs a platform mechanism (RVMODEL macro) to raise an NMI |
|
nmi_mcause_impl_def |
The values written to mcause on an NMI are implementation-defined. |
Implementation-defined; not tested |
nmi_mcause_restrictions |
TODO: needs a platform mechanism (RVMODEL macro) to raise an NMI |
|
nmi_no_rst |
TODO: needs a platform mechanism (RVMODEL macro) to raise an NMI |
|
mcounteren_op |
Sm_Zicntr_cg/cp_mcounteren_access_m, Sm_Zicntr_H_cg/cp_mhscounteren_access_m (M-mode reads succeed for every counter-enable value) |
|
scounteren_op |
Sm_Zicntr_cg/cp_scounteren_access_m, Sm_Zicntr_H_cg/cp_mhscounteren_access_m (M-mode reads succeed for every counter-enable value) |
|
hcounteren_op |
Sm_Zicntr_H_cg/cp_mhscounteren_access_m (M-mode reads succeed for every counter-enable value) |
|
Zihpm_op_sz_mode_acc_priv |
accessible via unprivileged XLEN-bit read-only CSR registers 0xC00–0xC1F |
Sm_Zicntr_cg/{cp_mcounteren_access_m, cp_scounteren_access_m}, Sm_Zicntr_H_cg/cp_mhscounteren_access_m |
ecall_ebreak_no_minstret_inc |
Sm_Zicntr_cg/{cp_instret_ecall, cp_instret_ebreak} |
|
mtval2_sz_acc_op |
Sm_H_mcsr_cg/cp_hcsr_access_zero/mtval2, Sm_H_inst_cg/cp_guest_page_fault |
|
mtval2_val |
Sm_H_mcsr_cg/cp_hcsr_access_zero/mtval2 |
|
mtinst_sz_acc_op |
Sm_H_mcsr_cg/cp_hcsr_access_zero/mtinst, Sm_H_inst_cg/cp_guest_page_fault |
|
mtinst_val |
Sm_H_mcsr_cg/cp_hcsr_access_zero/mtinst |
|
H_vscsrs_acc_m_hs |
The VS CSRs can be accessed as themselves only from M-mode or HS-mode. |
Sm_H_mcsr_cg/cp_hcsr_access, Sm_H_mcsr_cg/cp_hcsrwalk, Sm_H_mcsr_cg/cp_hcsr_access_zero/vsatp, Sm_H_mcsr_cg/cp_atpwalk1/vsatp |
H_vscsrs_v0 |
Sm_H_mcsr_cg/cp_replica |
|
H_vscsrs_sub, H_vscsrs_v1 |
H_vscsrs_sub: When V=1, the VS CSRs substitute for the corresponding supervisor CSRs, taking over all functions of the usual supervisor CSRs except as specified otherwise. Instructions that normally read or modify a supervisor CSR shall instead access the corresponding VS CSR. H_vscsrs_v1: While V=1, the normal HS-level supervisor CSRs that are replaced by VS CSRs retain their values but do not affect the behavior of the machine unless specifically documented to do so. |
Sm_H_mcsr_cg/cp_replica_vs |
H_mtval_nrz |
Sm_H_mcsr_cg/cp_mtvala |
|
mstatus_tvm_hs |
Sm_H_tvm_cg/cp_tvm_hs, Sm_H_tvm_cg/cp_hfence |
|
hgatp_tvm_illegal |
Sm_H_tvm_cg/cp_tvm_hs/hgatp |
|
mstatus_modes |
Sm_H_tvm_cg/cp_tvm_vs |
|
hstatus_vtvm_op, H_virtinst_vs_sfence_sinval_satp_vtvm1 |
hstatus_vtvm_op: When VTVM=1, an attempt in VS-mode to execute SFENCE.VMA or SINVAL.VMA or to access CSR satp raises a virtual-instruction exception. H_virtinst_vs_sfence_sinval_satp_vtvm1: in VS-mode, attempts to execute an SFENCE.VMA or SINVAL.VMA instruction or to access satp, when hstatus.VTVM=1. |
Sm_H_tvm_cg/cp_tvm_vs, Sm_H_tvm_cg/cp_sfence |
hfence-vvma_hfence-gvma_op, hfence-vvma_mode |
hfence-vvma_hfence-gvma_op: The hypervisor memory-management fence instructions, HFENCE.VVMA and HFENCE.GVMA, perform a function similar to SFENCE.VMA (sfence.vma), except applying to the VS-level memory-management data structures controlled by CSR vsatp (HFENCE.VVMA) or the guest-physical memory-management data structures controlled by CSR hgatp (HFENCE.GVMA). Instruction SFENCE.VMA applies only to the memory-management data structures controlled by the current satp (either the HS-level satp when V=0 or vsatp when V=1). hfence-vvma_mode: HFENCE.VVMA is valid only in M-mode or HS-mode. Its effect is much the same as temporarily entering VS-mode and executing SFENCE.VMA. Executing an HFENCE.VVMA guarantees that any previous stores already visible to the current hart are ordered before all implicit reads by that hart done for VS-stage address translation for instructions that |
Sm_H_tvm_cg/cp_hfence, Sv_H_fence_cg/cp_hfence_vvma, Sv_H_fence_cg/cp_hfence_gvma |
hfence-gvma_mode, hfence-vvma_tvm, hfence-vvma_hfence-gvma_exceptions |
hfence-gvma_mode: If hgatp.MODE is changed for a given VMID, an HFENCE.GVMA with rs1=x0 (and rs2 set to either x0 or the VMID) must be executed to order subsequent guest translations with the MODE change—even if the old MODE or new MODE is Bare. hfence-vvma_tvm: Neither mstatus.TVM nor hstatus.VTVM causes HFENCE.VVMA to trap. hfence-vvma_hfence-gvma_exceptions: Attempts to execute HFENCE.VVMA or HFENCE.GVMA when V=1 cause a virtual-instruction exception, while attempts to do the same in U-mode cause an illegal-instruction exception. Attempting to execute HFENCE.GVMA in HS-mode when mstatus.TVM=1 also causes an illegal-instruction exception. |
Sm_H_tvm_cg/cp_hfence |
mstatus_mpv_op, mret_H |
mstatus_mpv_op: The MPV bit (Machine Previous Virtualization Mode) is written by the implementation whenever a trap is taken into M-mode. Just as the MPP field is set to the (nominal) privilege mode at the time of the trap, the MPV bit is set to the value of the virtualization mode V at the time of the trap. When an MRET instruction is executed, the virtualization mode V is set to MPV, unless MPP=3, in which case V remains 0. mret_H: The MRET instruction is used to return from a trap taken into M-mode. MRET first determines what the new privilege mode will be according to the values of MPP and MPV in mstatus or mstatush, as encoded in norm:H_trap_m_mpv_mpp_tbl. MRET then in mstatus/mstatush sets MPV=0, MPP=0, MIE=MPIE, and MPIE=1. Lastly, MRET sets the privilege mode as previously determined, and sets pc=mepc. |
Sm_H_inst_cg/cp_mret_m |
sret_H, sret_v0, hstatus_spv_sret |
sret_H: The SRET instruction is used to return from a trap taken into HS-mode or VS-mode. Its behavior depends on the current virtualization mode. sret_v0: When executed in M-mode or HS-mode (i.e., V=0), SRET first determines what the new privilege mode will be according to the values in hstatus.SPV and sstatus.SPP, as encoded in norm:H_trap_hs_spv_spp_tbl. SRET then sets hstatus.SPV=0, and in sstatus sets SPP=0, SIE=SPIE, and SPIE=1. Lastly, SRET sets the privilege mode as previously determined, and sets pc=sepc. hstatus_spv_sret: When an SRET instruction is executed when V=0, V is set to SPV. |
Sm_H_inst_cg/cp_sret_m |
hlsv_mode, hlsv_op, hlvx-wu_valid32 |
hlsv_mode: The hypervisor virtual-machine load and store instructions are valid only in M-mode or HS-mode, or in U-mode when hstatus.HU=1. hlsv_op: For every RV32I or RV64I load instruction, LB, LBU, LH, LHU, LW, LWU, and LD, there is a corresponding virtual-machine load instruction: HLV.B, HLV.BU, HLV.H, HLV.HU, HLV.W, HLV.WU, and HLV.D. For every RV32I or RV64I store instruction, SB, SH, SW, and SD, there is a corresponding virtual-machine store instruction: HSV.B, HSV.H, HSV.W, and HSV.D. Instructions HLV.WU, HLV.D, and HSV.D are not valid for RV32, of course. hlvx-wu_valid32: HLVX.WU is valid for RV32, even though LWU and HLV.WU are not. |
Sm_H_inst_cg/cp_hlv, Sm_H_inst_cg/cp_hlvx, Sm_H_inst_cg/cp_hsv |
H_guest_page_fault |
Sm_H_inst_cg/cp_guest_page_fault |
|
H_trap_xtinst |
Sm_H_inst_cg/cp_guest_page_fault |
|
H_trap_xtinst_exception_lead_in |
Sm_H_inst_cg/cp_guest_page_fault |
|
H_trap_xtinst_exception_list |
Sm_H_inst_cg/cp_guest_page_fault |
|
H_trap_xtinst_val |
Sm_H_inst_cg/cp_guest_page_fault |
|
H_trap_xtinst_guestpage |
Sm_H_inst_cg/cp_guest_page_fault |
|
mtval2_Ssdbltrp |
The Ssdbltrp extension (See ssdbltrp) requires the implementation of the mtval2 CSR. |
Not tested: an implementation requirement; with H, the Sm_H CSR access tests access mtval2 |
misa_H_op |
The hypervisor extension is enabled by setting bit 7 in the misa CSR |
Not tested: clearing misa.H needs a reference model with writable misa.H; Sail’s writable_misa makes every misa bit writable and no config with MUTABLE_MISA_H enables it |
hfence-gvma_op |
Sm_H_tvm_cg/cp_hfence, Sv_H_fence_cg/cp_hfence_gvma |
|
hfence-gvma_vmid |
Sv_H_fence_cg/cp_hfence_gvma_vmid (rs2 with every VMIDMAX bit set; ignoring bits above VMIDMAX is only a should) |
|
hfence-vvma_asid |
Sv_H_fence_cg/cp_hfence_vvma_asid (rs2 with every ASIDMAX bit set; ignoring bits above ASIDMAX is only a should) |
|
hfence-vvma_limits |
Sv_H_fence_cg/cp_hfence_vvma |
|
htimedelta_sz_acc_op, htimedeltah_sz_acc_op |
htimedelta_sz_acc_op: The htimedelta CSR is a 64-bit read/write register that contains the delta between the value of the time CSR and the value returned in VS-mode or VU-mode. That is, reading the time CSR in VS or VU mode returns the sum of the contents of htimedelta and the actual value of time. htimedeltah_sz_acc_op: When XLEN=32, htimedeltah is a 32-bit read/write register that aliases bits 63:32 of htimedelta. Register htimedeltah does not exist when XLEN=64. |
Sm_Zicntr_H_cg/cp_delta_m (M-mode reads of time ignore htimedelta) |
| Parameter | Description | Coverpoint | Effect |
|---|---|---|---|
MXLEN |
XLEN in machine mode, specified in bits |
all tests |
Implicitly tested by all the XLEN-dependent tests (e.g. add would fail if XLEN is wrong) |
MISA_CSR_IMPLEMENTED |
Options: true::
The false::
The |
cp_mcsr_access |
misa bin results depend on parameter |
TIME_CSR_IMPLEMENTED |
Whether or not a real hardware Possible values: true::
false::
|
cp_mtime_write |
coverpoint only applies if parameter is True |
COUNTINHIBIT_EN |
Indicates which hardware performance monitor counters can be disabled from
COUNTINHIBIT_EN[1] can never be true, since it corresponds to |
cp_inhibit |
bins 0 and 2 for |
MARCHID_IMPLEMENTED |
* false: |
cp_mcsr_access |
if false, |
ARCH_ID_VALUE |
The value of |
cp_mcsr_access |
|
MIMPID_IMPLEMENTED |
* false: |
cp_mcsr_access |
if false, |
IMP_ID_VALUE |
A unique encoding of the version of the processor implementation. |
cp_mcsr_access |
|
VENDOR_ID_BANK |
Encodes the number of one-byte continuation codes in the Bank field of iN JEDEC’s parlance, the bank number is one greater than the number of continuation codes; hence, the mvendorid Bank field encodes a value that is one less than the JEDEC bank number. |
cp_mcsr_access |
|
VENDOR_ID_OFFSET |
Encodes the final byte of a JEDEC manufactor ID, discarding the parity bit. |
cp_mcsr_access |
|
TODO: Many new normative rules have been added since this was written. Update Sm.yaml.
B.1.2. S Supervisor-Mode CSRs and Instructions
These test additional CSRs that exist in supervisor mode, and privileged instructions in supervisor mode.
The S suite also contains the S_F, S_V, and S_VF tests, which repeat the Sm_F, Sm_V, and Sm_VF tests from supervisor mode using sstatus.FS and sstatus.VS when F, Zve32x, or Zve32f is also supported.
The S_Zicntr group runs when Zicntr is also supported. It reads the counters from S-mode and U-mode under walking mcounteren and scounteren values, and checks instret across retiring instructions, exceptions, wfi and wrs in S-mode.
| Coverpoint | Goal | Feature Description | Expectation | Bins | Normative Rule | Notes |
|---|---|---|---|---|---|---|
cp_scsr_access |
csr read, write all 1s, write all 0s, set all 1s, clear all 1s, write back initial value of each register below |
sstatus |
||||
cp_scsrwalk |
Walking 1s of legal supervisor CSRs |
Set and clear each bit of each writable S-mode CSR to exercise bitfields: sstatus, scause, sie, stvec, scounteren, senvcfg, sscratch, sip. Iterations that write a reserved senvcfg.CBIE (0b10) or senvcfg.PMM (0b01) value check the other bits exactly and only check that the field reads back a legal value. sepc and stval are not tested because it is hard to express what values are legal. |
sstatus |
|||
cp_csr_ro |
Write read-only CSRs (C00-EFF) |
Zicsr_rw |
||||
cp_satp |
Read satp |
Read satp |
Reads when 0, illegal instruction when 1. Value is unpredictable because it is not reset and has WARL fields that might not even support Bare. |
|||
cp_ucsr_from_s |
In supervisor mode, read/write/set/clear from each U-mode CSR if F/V are supported |
Zicsr_higher_priv |
||||
cp_csr_insufficient_priv |
Read Machine CSRS 300-3FF, 700-7FF, B00-BFF, F000-FFF, excluding 7AA (mscontext) |
mtval2_sz_acc_op |
||||
cp_scause_write |
Write scause values |
Write scause values: |
scause |
|||
cp_sstatus_sd_write |
Writing to the CSR field |
Write 1 and 0 to SD with FS/VS/XS all 0. Write cross-product of all bits of SD/ FS/ VS/XS. 128 bins of writes. |
Illegal instruction exception |
|||
cp_sprivinst |
Execute ecall and ebreak and mret and and sfence.vma in supervisor mode |
Changes affecting coverpoints: |
ecall_service_request_op |
|||
cp_sret_s |
Execute sret in supervisor mode with cross-product of all values of sstatus.SPP/SPIE/SIE. Return to supervisor mode after each sret. |
sstatus_spp |
||||
SXL tested with EndianS |
||||||
* if other supervisor extensions are supported, ifdef them in to run in M-mode, such as sstc to test access to stimecmp. |
||||||
S_F tests (S_F-NN.S): the floating-point CSRs and sstatus.FS from S-mode, run when F is also supported. |
||||||
cp_fcsr_access |
Writing to the CSR field |
Write 0s and 1s to fcsr, frm, fflags cross with sstatus.FS init/clean/dirty |
Zicsr_higher_priv |
|||
cp_sstatus_FS_transition |
Writing to the CSR field |
Each different type of floating-point instruction crossed with four values of FS. Includes integer-result instructions that raise a flag after fflags is cleared (feq.s with a signaling NaN, fcvt.w.s of an inexact value, fcvt.wu.s of an out-of-range value, fcvtmod.w.d of a NaN). |
mstatus_fs_op |
|||
cp_sstatus_FS_transition_nondeterministic |
Writing to the CSR field |
Floating-point instructions that need not modify floating-point state (fsw, fmv.x.w, fclass.s, csrr of the FP CSRs, fmvh.x.d) crossed with sstatus.FS = Off and Dirty |
Illegal-instruction trap when FS = Off; FS stays Dirty when Dirty. Initial and Clean are omitted because these instructions may dirty FS imprecisely. |
mstatus_fs_imprecise |
||
S_V tests (S_V_vcsr-NN.S, S_V_vset-NN.S, S_V_vl_walk-NN.S): the vector CSRs, vset{i}vl{i}, vstart and sstatus.VS from S-mode, run when Zve32x is also supported. |
||||||
cp_vcsrrswc |
Confirm that all vector CSR properties are properly set with regards to read write, clear, and set privileges with the csr instructions |
With each of the vector CSRs conduct a read, write, clear, and set operation on the CSR |
Will abide by spec’s read and write permissions for each csr |
3 csr instructions * 7 CSRs |
Zicsr_higher_priv |
test written: yes |
cp_vcsrs_walking1s |
Confirm that that all writable vector CSRs have the correct bits writeable |
With each of the vector CSRs that are writable, write all XLEN 1-hot values to the csr |
csrs will be updated based on which bits they support to be writable |
4 CSRs * XLEN 1-hot values |
mstatus_vs_op |
test written: yes |
cp_sstatus_vs_set_dirty_arithmetic |
Confirm that after running an arithmetic vector instruction that sstatus.VS is set to dirty when set to "clean" or "initial" |
Run a .vv vector arithmetic instruction with sstatus.VS = {clean, initial} |
sstatus.VS is set to dirty |
2 sstatus.VS bins |
mstatus_vs_sstatus_vs_op |
test written: yes |
cp_sstatus_vs_set_dirty_csr |
Confirm that after running a vsetvli instruction that sstatus.VS is set to dirty when set to "clean" or "initial" |
Run a vsetvli instruction with sstatus.VS = {clean, initial} |
sstatus.VS is set to dirty |
2 sstatus.VS bins |
mstatus_vs_op |
test written: yes |
Analogous to the way in which the floating-point unit is handled, the sstatus.VS field may exist even if misa.V is clear. |
feature (coverpoint written): Untestable |
|||||
cp_sstatus_vs_off_arithmetic |
Confirm that when misa.V is 1 and sstatus.VS is off, an arithmetic vector instruction raises an illegal instruction exception |
With misa.V = 1 (its reset value), set sstatus.VS = {00} and run a .vv vector instruction |
illegal instruction exception |
1 |
mstatus_vs_sstatus_vs_op |
test written: yes, confirm sig |
cp_sstatus_vs_off_csr |
Confirm that when misa.V is 1 and sstatus.VS is off, an csr vector instruction raises an illegal instruction exception |
With misa.V = 1 (its reset value), set sstatus.VS = {00} and run a vsetvli |
illegal instruction exception |
1 |
mstatus_fs_vs_xs_off_op |
test written: yes, confirm sig |
For implementations with a writable misa.V field, the vsstatus.VS field may exist even if misa.V is clear. |
feature (coverpoint written): Untestable |
|||||
Vset{i}vl{i} |
||||||
cp_sew_lmul_vset_i_vli |
Confirm that all combinations of lmul crossed with sew correctly set the vtype register in accordance with the vill field |
Use all vset{i}vli instructions to cross eSEW={8/16/32/64} with mLMUL = {f8/f4/f2/1/2/4/8} rd and uimm can be any nonzero value |
vtype.vill becomes 1 and other bits become 0 on illegal combinations, such as sew = 1xx. |
2 instructions * 7 lmul bins * 4 sew bins |
vtype_sz_acc_op |
test written: yes |
cp_sew_lmul_vsetvl |
Confirm that all combinations of lmul crossed with sew correctly set the type register in accordance with the vill field |
Use vsetvl to cross rs2.sew= [3’b000:3’b011] with rs2.lmul = [000, 001, 010, 011, 101, 110, 111]. rd and uimm can be any nonzero value. Make sure rs2_val[`XLEN-1:8] = 0 |
vtype.vill becomes 1 and other bits become 0 on illegal combinations, such as sew = 1xx. |
7 lmul bins * 4 sew bins |
vtype_sz_acc_op |
test written: yes |
cp_sew_lmul_vset_i_vli / cp_sew_lmul_vsetvl |
Confirm on the supported values of lmul are recognized as legal |
Use vsetivli rd, 1, sew={supported}, vlmul={supported(mf8/mf4/mf2/)m1/m2/m4/m8}, tu, mu to attempt to set all values of lmul |
Expect vill is set for all values of lmul that aren’t legal, otherwise the correct lmul is set |
0 |
feature (coverpoint written): Covered by coverpoint above |
|
cp_sew_lmul_vset_i_vli / cp_sew_lmul_vsetvl |
Check all values of sew to Confirm only correctly supported values are recognized as legal |
Use vsetivli rd, 1, sew={e8/e16/e32/e64}, vlmul={m1}, tu, mu to attempt to set all values of lmul |
Expect vill will be set when an attempted unsupported sew values are attempted to be written, otherwise vtype will contain supported sew |
0 |
feature (coverpoint written): Covered by coverpoint above |
|
cp_vill_vset_i_vli |
Check that vset{i}vli instructions properly clear the vill bit when writing a valid vtype configuration |
Run vsetvli and vsetivli with eSEW = {8/16/32/64} with mLMUL = {8} and vtype.vill = {1} |
expect vill bit is cleared and vtype written when sew is legal |
2 instructions * 4 sew bins |
test written: yes |
|
cp_vill_vsetvl |
Check that vsetvl instruction properly clears the vill bit when writing a valid vtype configuration |
Run vsetvl with rs2.sew = {8/16/32/64} with rs2.lmul = {8} and vtype.vill = {1} making sure rs2_val[`XLEN-1:8] = 0 |
expect vill bit is cleared and vtype written when sew is legal |
4 sew bins |
vtype_vill_val |
test written: yes |
cp_vill_vsetvl_rs2_vill |
Check that when attempting to set a valid configuration but with the rs2.vill bit set, and the vtype.vill bit set, that the register remains all zeros besides the vill bit |
Run vsetvl with rs2.sew = {8/16/32/64} with vtype.lmul = {8} and vtype.vill = {1} making sure rs2_val[`XLEN-2:8] = 0 and rs2[XLEN-1] = 1 |
vtype register remains unchanged |
4 sew bins |
test written: yes |
|
cp_vsetvl_rs2_vill |
Confirm that with vsetvl if rs2 has the vill bit set that it is treated as an unsupported configuration |
run a vsetvl with rs2[XLEN-1] = 1, rs2[XLEN-2:8]=0 and rs2.sew = {supported} and rs2.lmul = 1 and vtype.vill = {0} |
vill bit should be set |
spec: A vtype value with vill set is treated as an unsupported configuration. |
||
cp_vset_vill |
Confirm that writing 1 to vill clears other bits of vtype |
Set rs1 nonzero, rs1 = 1 in XLEN-1, 11 in 7:6 (vma/vta). vsetvl rd, rs1, rs2 and vtype.vill = {0} |
vtype.vill becomes 1 and other bits become 0 |
1 |
feature (coverpoint written): covered by coverpoint above |
|
cp_vtype_vill_set_vl_0 |
Confirm that if an unsupported configuration is set, that vl is set to zero |
Run vsetvl with rs1 non-zero and rs2 vill bit set and vl =! 0 |
vl should be set to zero |
1 |
vtype_lmul_fval_rsv |
test written: yes |
cp_vsetvl_i_rd_nx0_rs1_x0 |
Confirm that when running a vsetvl or vsetvli instruction with rd != x0 and rs1 = x0 that vl is set to vlmax |
with vl != vlmax, conduct vsetvl and vsetvli with rd != x0 and rs1 = x0. Cross with sew = {8/16/32/64} and respective supported lmul {supported(f8,f4,f2,)1,2,4,8} |
vl csr is set to vlmax |
2 instructions * 4 sew bins * 7 lmul bins |
vl_acc |
test written: yes |
cp_vsetvl_i_rd_x0_rs1_x0 |
Confirm that when running a vsetvl or vsetvli instruction with rd = x0 and rs1 = x0 that vl is unchanged |
with vl != 0, conduct vsetvl and vsetvli with rd = x0 and rs1 = x0. sew and lmul must be such that vlmax does not change |
vl is unchanged |
2 |
vsetvl_op |
test written: yes |
AVL |
||||||
cp_vsetvl_i_avl_eq_zero |
Confirm that vsetvl{i} instructions follow vl requirements when avl is zero |
Run vsetvli and vsetvl with rs1 = 0 |
vl = 0 |
1 |
vsetvl_op |
test written: yes |
cp_vsetvl_i_avl_eq_vlmax |
Confirm that vsetvl{i} instructions follow avl requirements when equal to vlmax |
Run vsetvli and vsetvl with rs1 = vlmax |
vl = avl |
1 |
vset_op |
test written: yes |
cp_vsetvl_i_avl_lt_2x_vlmax |
Confirm that vsetvl{i} instructions follow avl requirements when greater than vlmax and less than equal to 2*vlmax (if avl is less than 2* vlmax) |
Run vsetvli and vsetvl with vlmax < rs1 < 2 *vlmax |
ceil(AVL / 2) ≤ vl ≤ VLMAX |
1 |
vsetvl_op |
test written: yes, is a chance that sig don’t match |
cp_vsetvl_i_avl_eq_2x_vlmax |
Confirm that vsetvl{i} instructions follow avl requirements when greater than 2 * vlmax (when avl is greater than equal to 2 * vlmax) |
Run vsetvli and vsetvl with rs1 ≥ 2 *vlmax |
vl = VLMAX |
1 |
vsetvl_op |
test written: yes |
cp_vsetvl_i_avl_gt_2x_vlmax |
Confirm that vsetvl{i} instructions follow avl requirements when greater than 2 * vlmax (when avl is greater than equal to 2 * vlmax) |
Run vsetvli and vsetvl with rs1 ≥ 2 *vlmax |
vl = VLMAX |
1 |
vsetvl_op |
test written: yes |
cp_vsetivli_avl_edges |
Confirm that vsetivli abides by the avl corners |
Run vsetivli with all values of imm = {[0:31]} with sew = {all_supported} and lmul = 1 |
Abides by avl rules depending on |
4 sew bins * 32 imm bins |
vset_op |
test written: yes |
vstart |
||||||
cp_vstart_out_of_bounds |
Confirm that the vstart CSR only has enough writeable bits to hold the largest element index (2^16-1) |
conduct a csr write with rs1 = 2^16 on the vstart register |
Not defined in spec, either vstart takes the bottom bits or sets to vlmax-1 |
1 |
vstart_acc_sz |
test written: yes |
cp_sew_illegal |
Cannot set SEW < 8, all set SEW must be powers of 2 (can accomplish this by looping and setting sew of 2x until vill bit is set and then confirm that vill bit is set whenever setting a non power of 2 sew in that range) |
feature (coverpoint written): can’t be tested |
||||
cp_vl_walking1s_sew_lmul |
Confirm that all vl CSR bit fields are correctly set for all combinations of sew and lmul (thus all VLMAX) |
Running the vsetvli instruction, cross all sew = {8/16/32/64} lmul = {f8, f4,f2, 1, 2, 4, 8} with rs1 ={XLEN 1-hot values} |
vl register will be set in accordance with vlmax |
4sew * 7 lmul * XLEN 1-hot values |
||
cp_vlen_illegal |
Cannot set VLEN greater than 2^16, can check vl with eew = 8 |
vsetvli rs1={0, 1, 2, 3, 4, 7, 8, 9, 16, 32, 64… 2^16} |
feature (coverpoint written): covered by csr writing tests |
|||
The vector extension must have a consistent state at reset. In particular, vtype and vl must have values that can be read and then restored with a single vsetvl instruction. (make sure reset is called) |
feature (coverpoint written): untestable |
|||||
S_VF tests (S_VF-NN.S): vector floating-point instructions and sstatus.FS from S-mode, run when Zve32f is also supported. |
||||||
It should be understood that for most coverpoints that are based on arithmetic instructions, the coverpoints will check to make sure they’re non-trivial, meaning that vl != 0, vstart=0, vill=0, and they do not trap. It may be useful to know that when using vsetvl{i} instructions if rd != x0 and rs1 = x0, vl = vlmax |
||||||
cp_vectorfp_sstatus_fs_state_affecting_register |
Confirm vector floating point instructions set sstatus.FS to dirty when modifying floating point register state |
Set sstatus.FS = {initial/clean} and run a fd writing instruction |
sstatus.FS is set to dirty |
1 |
mstatus_fs_dirty_V_fp |
spec: Any vector floating-point instruction that modifies any floating-point extension state (i.e., floating-point CSRs or f registers) must set mstatus.FS to Dirty. |
cp_vectorfp_sstatus_fs_state_affecting_csr |
Confirm vector floating point instructions set sstatus.FS to dirty when modifying floating point csr state |
Set sstatus.FS = {initial/clean} and run an instruction that would raise a fp flag after clearing the fp flags (vfdiv.vv divide by zero, vfadd.vv inf + -inf, and vmflt.vv with a NaN operand, which writes only a mask register) |
sstatus.FS is set to dirty |
1 |
spec: Any vector floating-point instruction that modifies any floating-point extension state (i.e., floating-point CSRs or f registers) must set mstatus.FS to Dirty. |
|
cp_vectorfp_sstatus_fs_state_nonaffecting |
Confirm vector floating point instructions properly set sstatus.FS when not modifying floating point state |
Set sstatus.FS = {initial/clean} and run a vector fp instruction that does not affect floating point state (chosen situation for coverpoint is a .vv ins where vs1 = vs2 = 0) |
sstatus.FS may be set to dirty or not depending on implementation |
1 |
spec: Any vector floating-point instruction that modifies any floating-point extension state (i.e., floating-point CSRs or f registers) must set mstatus.FS to Dirty. |
|
cp_vectorfp_sstatus_fs_off |
Confirm that vector floating point instructions (even if they dont modify fp state) raise an illegal instruction exception if sstatus.FS is set to off |
Set sstatus.FS = {off} and run a vector fp instruction that does not affect floating point state (chosen situation for coverpoint is a .vv ins where vs1 = vs2 = 0) |
illegal instruction exception |
1 |
spec: If the floating-point unit status field mstatus.FS is Off then any attempt to execute a vector floating-point instruction will raise an illegal instruction exception. |
|
| Normative Rule | Rule Text | Coverpoints |
|---|---|---|
sstatus |
S_scsr_cg/cp_scsr_access/sstatus, S_scsr_cg/cp_scsrwalk/sstatus |
|
sstatus_spp |
S_sprivinst_cg/cp_sret_s, Sm_mprivinst_cg/cp_sret_s (sweep with mstatus.TSR, runs in Sm) |
|
sstatus_sie |
InterruptsS_cg/{cp_trigger, cp_enable_zero} |
|
sstatus_spie |
InterruptsS_cg/cp_trigger_tsbi, Exceptions_Sm_cg/cp_medeleg_msu_illegalinstruction, S_sprivinst_cg/cp_sret_s, Sm_mprivinst_cg/cp_sret_s |
|
sstatus_subset_mstatus |
Sm_mcsr_cg/cp_shadow |
|
sstatus_uxl |
Ssu64xl_cg/cp_ssu64xl |
|
sstatus_uxl_sz |
S_sstatus_cg/cp_sxlen_ge_uxlen |
|
sstatus_uxl_behavior |
Not tested: ACT does not run U-mode with UXLEN different from SXLEN |
|
sstatus_uxl_addr_modulo |
Not tested: ACT does not run U-mode with UXLEN different from SXLEN |
|
hint_sxlen |
Not tested: ACT does not run U-mode with UXLEN different from SXLEN |
|
sstatus_sum_satp_mode |
S_scsr_cg/cp_scsrwalk |
|
stvec |
S_scsr_cg/{cp_stvec_vaddr_pc, cp_stvec_vaddr_scratch} |
|
stvec_img |
S_scsr_cg/{cp_stvec_vaddr_walk1, cp_stvec_vaddr_walk0} |
|
stvec_op |
S_scsr_cg/cp_stvec_vaddr_walk1, S_scsr_cg/cp_stvec_vaddr_walk0, S_scsr_cg/cp_stvec_vaddr_pc, S_scsr_cg/cp_stvec_vaddr_scratch |
|
stvec_sz_base |
S_scsr_cg/{cp_stvec_vaddr_walk1, cp_stvec_vaddr_walk0}, Exceptions_S_cg/cp_stvec |
|
stvec_mode_enc |
Exceptions_S_cg/cp_stvec (Direct), TODO: S-mode interrupts with stvec.MODE=Vectored, and a write of a reserved MODE value |
|
sip_sie |
S_scsr_cg/cp_scsrwalk, InterruptsS_cg/cp_priority_sip |
|
sie_sip_supervisor_strap |
InterruptsS_cg/{cp_trigger, cp_enable_one, cp_enable_zero} |
|
sie_sip_strap_time_constraint |
TODO |
|
s_interrupt_priority |
Interrupts to S-mode take priority over any interrupts to lower privilege modes. |
TODO: move to hypervisor VS interrupts |
sip_acc |
Each individual bit in register sip may be writable or may be read-only. |
S_scsr_cg/cp_scsrwalk/sip |
sip_op |
InterruptsS_cg/cp_trigger_reg_sip_ssip |
|
sie_acc |
S_scsr_cg/cp_scsrwalk/sie, InterruptsS_cg/cp_priority_sie |
|
sip_sie_bits_sz |
S_scsr_cg/cp_scsrwalk/sie |
|
sip_seip_sie_seie |
S_scsr_cg/cp_scsrwalk/sip, InterruptsS_cg/cp_trigger |
|
sip_stip_sie_stie |
S_scsr_cg/cp_scsrwalk/sip, InterruptsS_cg/{cp_trigger, cp_trigger_sti_sstc} |
|
mip_sip_stip_op |
S_scsr_cg/cp_scsrwalk/sip, InterruptsS_cg/cp_trigger_sti_sstc |
|
sip_ssip_sie_ssie |
S_scsr_cg/cp_scsrwalk/sip, InterruptsS_cg/{cp_trigger, cp_trigger_reg_sip_ssip} |
|
std_super_intr_impl |
S_scsr_cg/cp_scsr_access/{sie, sip} |
|
sip_sie_warl |
S_scsr_cg/{cp_scsr_access, cp_scsrwalk} |
|
sip_sie_priority_bit_order |
InterruptsS_cg/{cp_priority_sip, cp_priority_sie} |
|
supervisor_timer_scheduling |
OUT-OF-SCOPE: too vague if handled by software setting STIP. Tested by InterruptsS_cg/cp_trigger_sti_sstc when Sstc implemented |
|
sscratch |
The sscratch CSR is an SXLEN-bit read/write register, dedicated for use by the supervisor. |
S_scsr_cg/cp_scsr_access/sscratch |
sepc |
S_scsr_cg/cp_scsr_access/sepc |
|
sepc_op_mask_ialign32 |
Sm_mcsr_cg/{cp_sepc_ialign32_read, cp_sepc_ialign32_sret} |
|
sepc_acc_invalid_addr |
S_scsr_cg/cp_sepc_vaddr_walk1, S_scsr_cg/cp_sepc_vaddr_walk0 |
|
sepc_op_trap_write |
Exceptions_S_cg/cp_illegal_instruction, InterruptsS_cg/cp_trigger |
|
scause |
S_scause_cg/{cp_scause_write_exception, cp_scause_write_interrupt}, Exceptions_S_cg/cp_illegal_instruction, InterruptsS_cg/cp_trigger |
|
scause_interrupt |
S_scause_cg/cp_scause_write_{interrupt, exception}, Exceptions_S_cg/cp_illegal_instruction, InterruptsS_cg/cp_trigger |
|
scause_exception_code_acc |
S_scause_cg/cp_scause_write_{interrupt, exception} |
|
scause_exception_code_sz |
S_scause_cg/cp_scause_write_{interrupt, exception}, Sm_mcsr_cg/cp_scause_from_m |
|
scause_exccode_enc_tbl |
S_scause_cg/{cp_scause_write_exception, cp_scause_write_interrupt}, Exceptions_S_cg/{cp_illegal_instruction, cp_breakpoint} |
|
stval |
S_scsr_cg/cp_scsr_access/stval, Exceptions_S_cg/cp_illegal_instruction |
|
stval_op_faulting_addr |
Exceptions_S_cg/{cp_breakpoint, cp_load_address_misaligned, cp_instr_access_fault, cp_store_access_fault} |
|
stval_op_breakpoint |
Exceptions_S_cg/cp_breakpoint |
|
stval_op_load_store_fault |
TODO: write coverpoints for misaligned loads that wrap PMA/PMP/page boundaries to cause faults on upper part of access |
|
stval_faulting_address_variable_instr |
||
stval_op_illegal_instr |
Exceptions_S_cg/cp_illegal_instruction |
|
stval_op_illegal_instr_format |
On an illegal-instruction exception, the instruction bits are zero-extended and loaded into |
Exceptions_Zc_cg/cp_illegal_instruction, Ssstrict_S_comp_instr_cg/cp_compressed00 |
stval_op_other_traps |
InterruptsS_cg/cp_trigger |
|
stval_acc |
S_scsr_cg/cp_stval_vaddr_walk1, S_scsr_cg/cp_stval_vaddr_walk0 |
|
stval_inv_addr_conv |
Not tested: the tests write only valid addresses to stval |
|
stval_instr_bits_sz |
S_scsr_cg/{cp_stval_ilen_walk1, cp_stval_ilen_ones} |
|
senvcfg |
S_scsr_cg/cp_scsr_access/senvcfg |
|
senvcfg_fiom |
S_scsr_cg/cp_scsr_access/senvcfg |
|
senvcfg_fiom_op_atomic |
Not tested: I/O ordering is not observable in single-hart signature tests |
|
senvcfg_fiom_acc |
If satp.MODE is read-only zero (always Bare), the implementation may make FIOM read-only zero. |
S_scsr_cg/cp_scsr_access/senvcfg |
senvcfg_fiom_fence_presuc_op |
Not tested: I/O ordering is not observable in single-hart signature tests |
|
senvcfg_cbze_rdonly0 |
When the Zicboz extension is not implemented, CBZE is read-only zero. |
S_scsr_cg/cp_scsrwalk/senvcfg (configurations without Zicboz) |
senvcfg_cbcfe_rdonly0 |
When the Zicbom extension is not implemented, CBCFE is read-only zero. |
S_scsr_cg/cp_scsrwalk/senvcfg (configurations without Zicbom) |
senvcfg_cbie_rsv |
S_scsr_cg/cp_scsrwalk/senvcfg (the walk writes CBIE=0b10) |
|
senvcfg_cbie_rdonly0 |
When the Zicbom extension is not implemented, CBIE is read-only zero. |
S_scsr_cg/cp_scsrwalk/senvcfg (configurations without Zicbom) |
Zicsr_higher_priv |
Sm_mcsr_cg/cp_scsr_from_m, S_scsr_cg/cp_ucsr_from_s, Sm_F_cg/cp_fcsr_access, S_F_cg/cp_fcsr_access, H_F_cg/cp_fcsr_access, Sm_V_cg/cp_vcsrrswc, S_V_cg/cp_vcsrrswc, H_V_cg/cp_vcsrrswc |
|
Zicsr_rw |
S_scsr_cg/cp_csr_ro |
|
Zicsr_access |
S_scsr_cg/cp_csr_insufficient_priv |
|
Zicsr_illegal_mode |
S_scsr_cg/cp_csr_insufficient_priv |
|
Zicsr_illegal_acc |
Attempts to write a read-only CSR address raise illegal-instruction exceptions. |
S_scsr_cg/cp_csr_ro |
Zicsr_write_ro |
S_scsr_cg/cp_scsr_access checks this if applicable |
|
Zicsr_wpri_roz |
S_scsr_cg/cp_scsr_access (e.g. sstatus) |
|
Zicsr_wlrl |
S_scause_cg/{cp_scause_write_exception, cp_scause_write_interrupt} |
|
Zicsr_wlrl_exception |
Not tested: the exception is optional, so no result is wrong |
|
Zicsr_warl |
Implementations will not raise an exception on writes of unsupported values to a WARL field. |
S_scsr_cg/cp_scsr_access |
ecall_service_request_op |
The ECALL instruction is used to make a service request to the execution environment. |
S_sprivinst_cg/cp_sprivinst ecall bin |
ecall_priv_mode_op |
S_sprivinst_cg/cp_sprivinst ecall bin |
|
ebreak_debug_env_op |
The EBREAK instruction is used to return control to a debugging environment. |
S_sprivinst_cg/cp_sprivinst ebreak bin |
ebreak_debugger_transfer_op |
S_sprivinst_cg/cp_sprivinst ebreak bin |
|
xret_in_lower_mode |
S_sprivinst_cg/cp_sprivinst mret bin |
|
sret_presence |
S_sprivinst_cg/cp_sret_s |
|
sret_ill_inst_exc_rst |
Sm_mprivinst_cg/cp_sret_s |
|
xret_op |
S_sprivinst_cg/cp_sret_s |
|
sfence_vma_op |
S_sprivinst_cg/cp_sprivinst sfence_vma bin |
|
scounteren |
S_scsr_cg/cp_scsr_access |
|
scounteren_acc |
S_Zicntr_cg/cp_scounteren_access_u |
|
scounteren_op |
S_Zicntr_cg/{cp_scounteren_access_u, cp_mscounteren_access_u} |
|
mcounteren_inc_inaccessible |
S_Zicntr_cg/cp_mcounter_inc_inaccessible |
|
ecall_ebreak_no_minstret_inc |
S_Zicntr_cg/{cp_instret_ecall, cp_instret_ebreak} |
UDB Parameters: None.
|
sie_sip_strap_time_constraint is not tested yet. How to handle timing constraints in certification? How to handle interrupts that don’t get evaluated immediately after the macro sets them? The macro could spin until they fire, but needs to know if they should fire (e.g. not blocked by xstatus.xIE). |
B.1.3. U User-Mode CSRs and Instructions
These test additional CSRs that exist in user mode, and privileged instructions in user mode.
The U suite also contains the U_F, U_V, and U_VF tests, which repeat the Sm_F, Sm_V, and Sm_VF tests from user mode when F, Zve32x, or Zve32f is also supported, setting and reading sstatus.FS and sstatus.VS through T-SBI calls (mstatus when S-mode is not supported).
The U_Zicntr group runs when Zicntr is also supported. It reads the counters from U-mode under walking mcounteren values, and checks instret across retiring instructions, exceptions and interrupts.
| Coverpoint | Goal | Feature Description | Expectation | Bins | Normative Rule | Notes |
|---|---|---|---|---|---|---|
cp_uprivinst |
Execute ecall and ebreak, mret, uret in user mode |
non_priv_exc |
||||
cp_csr_insufficient_priv |
Read Machine, Hypervisor, Supervisor CSRS100-3FF, 500-7FF, 900-BFF, D000-FFF |
H_vscsrs_acc_m_hs |
||||
cp_csr_ro |
Write User read-only CSRs C00-CFF |
Zicsr_rw |
||||
User-mode access to the F and V CSRs is tested in the U_F and U_V rows below, and to the counters in Zicntr and Zihpm. |
||||||
U_F tests (U_F-NN.S): the floating-point CSRs and xstatus.FS from U-mode, run when F is also supported. xstatus.FS is written and read through T-SBI, in sstatus when S-mode is supported and otherwise in mstatus. |
||||||
cp_fcsr_access |
Writing to the CSR field |
Write 0s and 1s to fcsr, frm, fflags cross with mstatus.FS init/clean/dirty |
mstatus_fs_vs_xs_off_op |
|||
cp_mstatus_FS_transition |
Writing to the CSR field |
Each different type of floating-point instruction crossed with four values of FS. Includes integer-result instructions that raise a flag after fflags is cleared (feq.s with a signaling NaN, fcvt.w.s of an inexact value, fcvt.wu.s of an out-of-range value, fcvtmod.w.d of a NaN). |
mstatus_fs_op |
|||
cp_mstatus_FS_transition_nondeterministic |
Writing to the CSR field |
Floating-point instructions that need not modify floating-point state (fsw, fmv.x.w, fclass.s, csrr of the FP CSRs, fmvh.x.d) crossed with mstatus.FS = Off and Dirty |
Illegal-instruction trap when FS = Off; FS stays Dirty when Dirty. Initial and Clean are omitted because these instructions may dirty FS imprecisely. |
mstatus_fs_imprecise |
||
U_V tests (U_V_vcsr-NN.S, U_V_vset-NN.S, U_V_vl_walk-NN.S): the vector CSRs, vset{i}vl{i}, vstart and xstatus.VS from U-mode, run when Zve32x is also supported. xstatus.VS is written and read through T-SBI, in sstatus when S-mode is supported and otherwise in mstatus. |
||||||
cp_vcsrrswc |
Confirm that all vector CSR properties are properly set with regards to read write, clear, and set privileges with the csr instructions |
With each of the vector CSRs conduct a read, write, clear, and set operation on the CSR |
Will abide by spec’s read and write permissions for each csr |
3 csr instructions * 7 CSRs |
vlenb_acc_op |
test written: yes |
cp_vcsrs_walking1s |
Confirm that that all writable vector CSRs have the correct bits writeable |
With each of the vector CSRs that are writable, write all XLEN 1-hot values to the csr |
csrs will be updated based on which bits they support to be writable |
4 CSRs * XLEN 1-hot values |
mstatus_vs_op |
test written: yes |
cp_mstatus_vs_set_dirty_arithmetic |
Confirm that after running an arithmetic vector instruction that mstatus.VS is set to dirty when set to "clean" or "initial" |
Run a .vv vector arithmetic instruction with mstatus.VS = {clean, initial} |
mstatus.VS is set to dirty |
2 mstatus.VS bins |
mstatus_vs_sstatus_vs_op |
test written: yes |
cp_mstatus_vs_set_dirty_csr |
Confirm that after running a vsetvli instruction that mstatus.VS is set to dirty when set to "clean" or "initial" |
Run a vsetvli instruction with mstatus.VS = {clean, initial} |
mstatus.VS is set to dirty |
2 mstatus.VS bins |
mstatus_vs_op |
test written: yes |
Analogous to the way in which the floating-point unit is handled, the mstatus.VS field may exist even if misa.V is clear. |
feature (coverpoint written): Untestable |
|||||
cp_mstatus_vs_off_arithmetic |
Confirm that when misa.V is 1 and mstatus.VS is off, an arithmetic vector instruction raises an illegal instruction exception |
With misa.V = 1 (its reset value), set mstatus.VS = {00} and run a .vv vector instruction |
illegal instruction exception |
1 |
mstatus_vs_sstatus_vs_op |
test written: yes, confirm sig |
cp_mstatus_vs_off_csr |
Confirm that when misa.V is 1 and mstatus.VS is off, an csr vector instruction raises an illegal instruction exception |
With misa.V = 1 (its reset value), set mstatus.VS = {00} and run a vsetvli |
illegal instruction exception |
1 |
mstatus_fs_vs_xs_off_op |
test written: yes, confirm sig |
For implementations with a writable misa.V field, the vsstatus.VS field may exist even if misa.V is clear. |
feature (coverpoint written): Untestable |
|||||
Vset{i}vl{i} |
||||||
cp_sew_lmul_vset_i_vli |
Confirm that all combinations of lmul crossed with sew correctly set the vtype register in accordance with the vill field |
Use all vset{i}vli instructions to cross eSEW={8/16/32/64} with mLMUL = {f8/f4/f2/1/2/4/8} rd and uimm can be any nonzero value |
vtype.vill becomes 1 and other bits become 0 on illegal combinations, such as sew = 1xx. |
2 instructions * 7 lmul bins * 4 sew bins |
vtype_sz_acc_op |
test written: yes |
cp_sew_lmul_vsetvl |
Confirm that all combinations of lmul crossed with sew correctly set the type register in accordance with the vill field |
Use vsetvl to cross rs2.sew= [3’b000:3’b011] with rs2.lmul = [000, 001, 010, 011, 101, 110, 111]. rd and uimm can be any nonzero value. Make sure rs2_val[`XLEN-1:8] = 0 |
vtype.vill becomes 1 and other bits become 0 on illegal combinations, such as sew = 1xx. |
7 lmul bins * 4 sew bins |
vtype_sz_acc_op |
test written: yes |
cp_sew_lmul_vset_i_vli / cp_sew_lmul_vsetvl |
Confirm on the supported values of lmul are recognized as legal |
Use vsetivli rd, 1, sew={supported}, vlmul={supported(mf8/mf4/mf2/)m1/m2/m4/m8}, tu, mu to attempt to set all values of lmul |
Expect vill is set for all values of lmul that aren’t legal, otherwise the correct lmul is set |
0 |
feature (coverpoint written): Covered by coverpoint above |
|
cp_sew_lmul_vset_i_vli / cp_sew_lmul_vsetvl |
Check all values of sew to Confirm only correctly supported values are recognized as legal |
Use vsetivli rd, 1, sew={e8/e16/e32/e64}, vlmul={m1}, tu, mu to attempt to set all values of lmul |
Expect vill will be set when an attempted unsupported sew values are attempted to be written, otherwise vtype will contain supported sew |
0 |
feature (coverpoint written): Covered by coverpoint above |
|
cp_vill_vset_i_vli |
Check that vset{i}vli instructions properly clear the vill bit when writing a valid vtype configuration |
Run vsetvli and vsetivli with eSEW = {8/16/32/64} with mLMUL = {8} and vtype.vill = {1} |
expect vill bit is cleared and vtype written when sew is legal |
2 instructions * 4 sew bins |
test written: yes |
|
cp_vill_vsetvl |
Check that vsetvl instruction properly clears the vill bit when writing a valid vtype configuration |
Run vsetvl with rs2.sew = {8/16/32/64} with rs2.lmul = {8} and vtype.vill = {1} making sure rs2_val[`XLEN-1:8] = 0 |
expect vill bit is cleared and vtype written when sew is legal |
4 sew bins |
vtype_vill_val |
test written: yes |
cp_vill_vsetvl_rs2_vill |
Check that when attempting to set a valid configuration but with the rs2.vill bit set, and the vtype.vill bit set, that the register remains all zeros besides the vill bit |
Run vsetvl with rs2.sew = {8/16/32/64} with vtype.lmul = {8} and vtype.vill = {1} making sure rs2_val[`XLEN-2:8] = 0 and rs2[XLEN-1] = 1 |
vtype register remains unchanged |
4 sew bins |
test written: yes |
|
cp_vsetvl_rs2_vill |
Confirm that with vsetvl if rs2 has the vill bit set that it is treated as an unsupported configuration |
run a vsetvl with rs2[XLEN-1] = 1, rs2[XLEN-2:8]=0 and rs2.sew = {supported} and rs2.lmul = 1 and vtype.vill = {0} |
vill bit should be set |
spec: A vtype value with vill set is treated as an unsupported configuration. |
||
cp_vset_vill |
Confirm that writing 1 to vill clears other bits of vtype |
Set rs1 nonzero, rs1 = 1 in XLEN-1, 11 in 7:6 (vma/vta). vsetvl rd, rs1, rs2 and vtype.vill = {0} |
vtype.vill becomes 1 and other bits become 0 |
1 |
feature (coverpoint written): covered by coverpoint above |
|
cp_vtype_vill_set_vl_0 |
Confirm that if an unsupported configuration is set, that vl is set to zero |
Run vsetvl with rs1 non-zero and rs2 vill bit set and vl =! 0 |
vl should be set to zero |
1 |
vtype_lmul_fval_rsv |
test written: yes |
cp_vsetvl_i_rd_nx0_rs1_x0 |
Confirm that when running a vsetvl or vsetvli instruction with rd != x0 and rs1 = x0 that vl is set to vlmax |
with vl != vlmax, conduct vsetvl and vsetvli with rd != x0 and rs1 = x0. Cross with sew = {8/16/32/64} and respective supported lmul {supported(f8,f4,f2,)1,2,4,8} |
vl csr is set to vlmax |
2 instructions * 4 sew bins * 7 lmul bins |
vl_acc |
test written: yes |
cp_vsetvl_i_rd_x0_rs1_x0 |
Confirm that when running a vsetvl or vsetvli instruction with rd = x0 and rs1 = x0 that vl is unchanged |
with vl != 0, conduct vsetvl and vsetvli with rd = x0 and rs1 = x0. sew and lmul must be such that vlmax does not change |
vl is unchanged |
2 |
vsetvl_op |
test written: yes |
AVL |
||||||
cp_vsetvl_i_avl_eq_zero |
Confirm that vsetvl{i} instructions follow vl requirements when avl is zero |
Run vsetvli and vsetvl with rs1 = 0 |
vl = 0 |
1 |
vsetvl_op |
test written: yes |
cp_vsetvl_i_avl_eq_vlmax |
Confirm that vsetvl{i} instructions follow avl requirements when equal to vlmax |
Run vsetvli and vsetvl with rs1 = vlmax |
vl = avl |
1 |
vset_op |
test written: yes |
cp_vsetvl_i_avl_lt_2x_vlmax |
Confirm that vsetvl{i} instructions follow avl requirements when greater than vlmax and less than equal to 2*vlmax (if avl is less than 2* vlmax) |
Run vsetvli and vsetvl with vlmax < rs1 < 2 *vlmax |
ceil(AVL / 2) ≤ vl ≤ VLMAX |
1 |
vsetvl_op |
test written: yes, is a chance that sig don’t match |
cp_vsetvl_i_avl_eq_2x_vlmax |
Confirm that vsetvl{i} instructions follow avl requirements when greater than 2 * vlmax (when avl is greater than equal to 2 * vlmax) |
Run vsetvli and vsetvl with rs1 ≥ 2 *vlmax |
vl = VLMAX |
1 |
vsetvl_op |
test written: yes |
cp_vsetvl_i_avl_gt_2x_vlmax |
Confirm that vsetvl{i} instructions follow avl requirements when greater than 2 * vlmax (when avl is greater than equal to 2 * vlmax) |
Run vsetvli and vsetvl with rs1 ≥ 2 *vlmax |
vl = VLMAX |
1 |
vsetvl_op |
test written: yes |
cp_vsetivli_avl_edges |
Confirm that vsetivli abides by the avl corners |
Run vsetivli with all values of imm = {[0:31]} with sew = {all_supported} and lmul = 1 |
Abides by avl rules depending on |
4 sew bins * 32 imm bins |
vset_op |
test written: yes |
vstart |
||||||
cp_vstart_out_of_bounds |
Confirm that the vstart CSR only has enough writeable bits to hold the largest element index (2^16-1) |
conduct a csr write with rs1 = 2^16 on the vstart register |
Not defined in spec, either vstart takes the bottom bits or sets to vlmax-1 |
1 |
vstart_acc_sz |
test written: yes |
cp_sew_illegal |
Cannot set SEW < 8, all set SEW must be powers of 2 (can accomplish this by looping and setting sew of 2x until vill bit is set and then confirm that vill bit is set whenever setting a non power of 2 sew in that range) |
feature (coverpoint written): can’t be tested |
||||
cp_vl_walking1s_sew_lmul |
Confirm that all vl CSR bit fields are correctly set for all combinations of sew and lmul (thus all VLMAX) |
Running the vsetvli instruction, cross all sew = {8/16/32/64} lmul = {f8, f4,f2, 1, 2, 4, 8} with rs1 ={XLEN 1-hot values} |
vl register will be set in accordance with vlmax |
4sew * 7 lmul * XLEN 1-hot values |
||
cp_vlen_illegal |
Cannot set VLEN greater than 2^16, can check vl with eew = 8 |
vsetvli rs1={0, 1, 2, 3, 4, 7, 8, 9, 16, 32, 64… 2^16} |
feature (coverpoint written): covered by csr writing tests |
|||
The vector extension must have a consistent state at reset. In particular, vtype and vl must have values that can be read and then restored with a single vsetvl instruction. (make sure reset is called) |
feature (coverpoint written): untestable |
|||||
U_VF tests (U_VF-NN.S): vector floating-point instructions and xstatus.FS from U-mode, run when Zve32f is also supported. xstatus.FS and xstatus.VS are written and read through T-SBI, in sstatus when S-mode is supported and otherwise in mstatus. |
||||||
It should be understood that for most coverpoints that are based on arithmetic instructions, the coverpoints will check to make sure they’re non-trivial, meaning that vl != 0, vstart=0, vill=0, and they do not trap. It may be useful to know that when using vsetvl{i} instructions if rd != x0 and rs1 = x0, vl = vlmax |
||||||
cp_vectorfp_mstatus_fs_state_affecting_register |
Confirm vector floating point instructions set mstatus.FS to dirty when modifying floating point register state |
Set mstatus.FS = {initial/clean} and run a fd writing instruction |
mstatus.FS is set to dirty |
1 |
mstatus_fs_dirty_V_fp |
spec: Any vector floating-point instruction that modifies any floating-point extension state (i.e., floating-point CSRs or f registers) must set mstatus.FS to Dirty. |
cp_vectorfp_mstatus_fs_state_affecting_csr |
Confirm vector floating point instructions set mstatus.FS to dirty when modifying floating point csr state |
Set mstatus.FS = {initial/clean} and run an instruction that would raise a fp flag after clearing the fp flags (vfdiv.vv divide by zero, vfadd.vv inf + -inf, and vmflt.vv with a NaN operand, which writes only a mask register) |
mstatus.FS is set to dirty |
1 |
spec: Any vector floating-point instruction that modifies any floating-point extension state (i.e., floating-point CSRs or f registers) must set mstatus.FS to Dirty. |
|
cp_vectorfp_mstatus_fs_state_nonaffecting |
Confirm vector floating point instructions properly set mstatus.FS when not modifying floating point state |
Set mstatus.FS = {initial/clean} and run a vector fp instruction that does not affect floating point state (chosen situation for coverpoint is a .vv ins where vs1 = vs2 = 0) |
mstatus.FS may be set to dirty or not depending on implementation |
1 |
spec: Any vector floating-point instruction that modifies any floating-point extension state (i.e., floating-point CSRs or f registers) must set mstatus.FS to Dirty. |
|
cp_vectorfp_mstatus_fs_off |
Confirm that vector floating point instructions (even if they dont modify fp state) raise an illegal instruction exception if mstatus.FS is set to off |
Set mstatus.FS = {off} and run a vector fp instruction that does not affect floating point state (chosen situation for coverpoint is a .vv ins where vs1 = vs2 = 0) |
illegal instruction exception |
1 |
spec: If the floating-point unit status field mstatus.FS is Off then any attempt to execute a vector floating-point instruction will raise an illegal instruction exception. |
|
| Normative Rule | Rule Text | Coverpoints |
|---|---|---|
always_priv_level |
Descriptive spec text with no separately testable behavior |
|
priv_levels_txt |
Descriptive spec text with no separately testable behavior |
|
priv_levels_tbl |
Sm_mprivinst_cg/cp_mret, Sm_mcsr_cg/cp_mcsrwalk_masked |
|
non_priv_exc |
U_ucsr_cg/cp_csr_insufficient_priv, U_uprivinst_cg/cp_uprivinst |
|
m_level_high_priv_only_mandatory |
Definition, checked through UDB |
|
priv_combs_txt |
Implementations might provide anywhere from 1 to 3 privilege modes |
Definition, checked through UDB |
priv_combs_tbl |
Definition, checked through UDB |
|
m_mode_mandatory |
Definition, checked through UDB |
|
Zicsr_rw |
U_ucsr_cg/cp_csr_ro |
|
Zicsr_access |
U_ucsr_cg/cp_csr_insufficient_priv |
|
Zicsr_illegal_mode |
U_ucsr_cg/cp_csr_insufficient_priv |
|
Zicsr_illegal_acc |
Attempts to write a read-only CSR address raise illegal-instruction exceptions. |
U_ucsr_cg/cp_csr_ro |
ecall_service_request_op |
The ECALL instruction is used to make a service request to the execution environment. |
U_uprivinst_cg/cp_uprivinst/ecall |
ecall_priv_mode_op |
U_uprivinst_cg/cp_uprivinst/ecall |
|
ebreak_debug_env_op |
The EBREAK instruction is used to return control to a debugging environment. |
U_uprivinst_cg/cp_uprivinst/ebreak |
ebreak_debugger_transfer_op |
U_uprivinst_cg/cp_uprivinst/ebreak |
|
xret_in_lower_mode |
U_uprivinst_cg/cp_uprivinst/mret, U_uprivinst_cg/cp_uprivinst/sret |
|
sret_presence |
U_uprivinst_cg/cp_uprivinst/sret |
|
mstatus_fs_vs_xs_update_indep_priv |
The status fields are also updated during execution of instructions, regardless of privilege mode. |
Sm_F_cg/cp_mstatus_FS_transition, S_F_cg/cp_sstatus_FS_transition, H_F_cg/cp_vsstatus_FS_transition, U_F_cg/cp_mstatus_FS_transition, Sm_V_cg/cp_mstatus_vs_set_dirty_arithmetic, S_V_cg/cp_sstatus_vs_set_dirty_arithmetic, H_V_cg/cp_vsstatus_vs_set_dirty_arithmetic, U_V_cg/cp_mstatus_vs_set_dirty_arithmetic |
mcounteren_op |
S_Zicntr_cg/cp_mcounteren_access_s, U_Zicntr_cg/cp_mcounteren_access_u, Sm_Zicntr_cg/cp_mcounteren_access_m, H_Zicntr_cg/cp_mcounteren_access_vs |
|
mcounteren_inc_inaccessible |
U_Zicntr_cg/cp_mcounter_inc_inaccessible |
|
mcounteren_clr_ill_inst_exc |
S_Zicntr_cg/cp_mcounteren_access_s, U_Zicntr_cg/cp_mcounteren_access_u |
|
mcounteren_set_nxt_priv |
S_Zicntr_cg/cp_mcounteren_access_s, U_Zicntr_cg/cp_mcounteren_access_u |
|
ecall_ebreak_no_minstret_inc |
U_Zicntr_cg/{cp_instret_ecall, cp_instret_ebreak} |
UDB Parameters: None.
B.1.4. Zkr Entropy CSR
These test CSRs when the Zkr entropy extension is supported. The seed CSR tests run once per privilege mode: Zkr_Sm in M-mode, Zkr_S in S-mode, and Zkr_U in U-mode. With the H extension, Zkr_H repeats the seed accesses from VS-mode and VU-mode.
Zkr_Sm
| Coverpoint | Goal | Feature Description | Expectation | Bins | Normative Rule |
|---|---|---|---|---|---|
cp_zkr_seed_csrrw |
seed CSR is readable and writable across allowed privilege modes |
Execute csrrw rd, seed, rs1 crossed with {privilege mode = M, S, U for supported modes} crossed with {mseccfg.sseed = 0/1, mseccfg.useed = 0/1. |
No exception when access is allowed |
3 modes * 4 mseccfg = 12 bins |
Zkr_seed_addr |
cp_zkr_seed_illegal_csr_op |
Non-CSRRW CSR instructions on seed cause illegal instruction |
For each op in {CSRRS, CSRRC, CSRRW, CSRRWI, CSRRSI, CSRRCI} crossed with rs1/imm in {0/1} crossed with {mode = M, S (sseed=1), U (useed=1)} for supported modes: attempt the instruction on the seed CSR. |
An illegal instruction exception is raised for every effective read (CSRRS/C with x0 or imm 0), regardless of privilege mode or access control settings. |
6 ops * 2 rs1 * 3 modes = 30 bins |
seed_ro_illegal |
cp_zkr_seed_entropy_zero_non_es16 |
# When OPST is not ES16, entropy must be 0. |
Execute csrrw rd, seed, rs1 |
entropy is 0 if OPST is not ES16 |
1 |
seed_entropy_zero_non_es16 |
Zkr_S
| Coverpoint | Goal | Feature Description | Expectation | Bins | Normative Rule |
|---|---|---|---|---|---|
cp_zkr_seed_csrrw |
seed CSR is readable and writable across allowed privilege modes |
Execute csrrw rd, seed, rs1 crossed with {privilege mode = M, S, U for supported modes} crossed with {mseccfg.sseed = 0/1, mseccfg.useed = 0/1. |
No exception when access is allowed |
3 modes * 4 mseccfg = 12 bins |
Zkr_seed_addr |
cp_zkr_seed_illegal_csr_op |
Non-CSRRW CSR instructions on seed cause illegal instruction |
For each op in {CSRRS, CSRRC, CSRRW, CSRRWI, CSRRSI, CSRRCI} crossed with rs1/imm in {0/1} crossed with {mode = M, S (sseed=1), U (useed=1)} for supported modes: attempt the instruction on the seed CSR. |
An illegal instruction exception is raised for every effective read (CSRRS/C with x0 or imm 0), regardless of privilege mode or access control settings. |
6 ops * 2 rs1 * 3 modes = 30 bins |
seed_ro_illegal |
cp_zkr_seed_entropy_zero_non_es16 |
# When OPST is not ES16, entropy must be 0. |
Execute csrrw rd, seed, rs1 |
entropy is 0 if OPST is not ES16 |
1 |
seed_entropy_zero_non_es16 |
Zkr_U
| Coverpoint | Goal | Feature Description | Expectation | Bins | Normative Rule |
|---|---|---|---|---|---|
cp_zkr_seed_csrrw |
seed CSR is readable and writable across allowed privilege modes |
Execute csrrw rd, seed, rs1 crossed with {privilege mode = M, S, U for supported modes} crossed with {mseccfg.sseed = 0/1, mseccfg.useed = 0/1. |
No exception when access is allowed |
3 modes * 4 mseccfg = 12 bins |
Zkr_seed_addr |
cp_zkr_seed_illegal_csr_op |
Non-CSRRW CSR instructions on seed cause illegal instruction |
For each op in {CSRRS, CSRRC, CSRRW, CSRRWI, CSRRSI, CSRRCI} crossed with rs1/imm in {0/1} crossed with {mode = M, S (sseed=1), U (useed=1)} for supported modes: attempt the instruction on the seed CSR. |
An illegal instruction exception is raised for every effective read (CSRRS/C with x0 or imm 0), regardless of privilege mode or access control settings. |
6 ops * 2 rs1 * 3 modes = 30 bins |
seed_ro_illegal |
cp_zkr_seed_entropy_zero_non_es16 |
# When OPST is not ES16, entropy must be 0. |
Execute csrrw rd, seed, rs1 |
entropy is 0 if OPST is not ES16 |
1 |
seed_entropy_zero_non_es16 |
Zkr_H
covergroup Zkr_H The tests boot to HS-mode, enter VS-mode and then VU-mode, and write mseccfg through T-SBI. At V=1 every seed access traps, and only mseccfg.SSEED decides which exception.
| Coverpoint | Goal | Feature Description | Expectation | Bins | Normative Rule |
|---|---|---|---|---|---|
cp_zkr_seed_access_h |
seed accesses from VS-mode and VU-mode raise virtual instruction when HS-qualified, otherwise illegal instruction |
For each op in {CSRRS, CSRRC, CSRRW, CSRRWI, CSRRSI, CSRRCI} crossed with rs1/imm in {0/nonzero} crossed with {mseccfg.sseed = 0/1, mseccfg.useed = 0/1} crossed with {mode = VS, VU}: attempt the instruction on the seed CSR, then record rd. |
sseed = 0: illegal-instruction exception for every access. sseed = 1: virtual-instruction exception for the read-write forms (CSRRW, CSRRWI, and CSRRS/C, CSRRSI/CI with nonzero rs1/imm), illegal-instruction exception for the read-only forms (CSRRS/C with x0, CSRRSI/CI with imm 0). useed has no effect. rd is not written. |
6 ops * 2 rs1 * 4 mseccfg * 2 modes = 96 bins |
seed_ro_illegal |
| Normative Rule | Rule Text | Coverpoints |
|---|---|---|
Zkr_seed_addr |
{Zkr_Sm_cg,Zkr_S_cg,Zkr_U_cg}/{cp_zkr_seed_csrrw} |
|
seed_ro_illegal |
{Zkr_Sm_cg,Zkr_S_cg,Zkr_U_cg}/{cp_zkr_seed_illegal_csr_op}, Zkr_H_cg/cp_zkr_seed_access_h |
|
seed_write_ignore |
The write value (in rs1 or uimm) must be ignored by implementations. |
{Zkr_Sm_cg,Zkr_S_cg,Zkr_U_cg}/{cp_zkr_seed_csrrw} |
seed_csr_unpriv |
Zkr_U_cg/cp_zkr_seed_csrrw |
|
seed_exec_mode_control |
{Zkr_Sm_cg,Zkr_S_cg,Zkr_U_cg}/{cp_zkr_seed_csrrw}, Zkr_H_cg/cp_zkr_seed_access_h |
|
seed_entropy_unique |
Not tested: randomness quality is not observable in an architectural signature test |
|
seed_entropy_zero_non_es16 |
{Zkr_Sm_cg,Zkr_S_cg,Zkr_U_cg}/{cp_zkr_seed_entropy_zero_non_es16} |
|
seed_wipe_on_read |
Not tested: entropy values and OPST sequencing are nondeterministic, so they cannot be compared against a reference model |
|
seed_bist_latch |
Not tested: needs a platform mechanism to force a BIST alarm |
|
seed_min_security_256 |
Not tested: security strength is not architecturally observable |
|
seed_disable_if_weak |
If the security level is under 256 bits, then the interface must not be available. |
Not tested: security strength is not architecturally observable |
mseccfg_useed_u_mode_op |
Zkr_U_cg/{cp_zkr_seed_csrrw, cp_zkr_seed_illegal_csr_op} |
|
mseccfg_sseed_sorhs_mode_op |
Zkr_S_cg/{cp_zkr_seed_csrrw, cp_zkr_seed_illegal_csr_op} |
|
mseccfg_sseed_vsorvu_mode_op |
Zkr_H_cg/cp_zkr_seed_access_h |
|
mseccfg_sseed_useed_op_tbl |
{Zkr_Sm_cg,Zkr_S_cg,Zkr_U_cg}/{cp_zkr_seed_csrrw, cp_zkr_seed_illegal_csr_op}, Zkr_H_cg/cp_zkr_seed_access_h |
UDB Parameters: None.
B.2. Exceptions
The Exceptions suite has one covergroup and test plan per privilege mode or extension supported, named Exceptions_<group>_cg. For example, a configuration with Machine, Supervisor, User, and Floating-Point supported should run Exceptions_Sm, Exceptions_S, Exceptions_U, and Exceptions_F. Note that vector exceptions are in Section B.9.
B.2.1. Exceptions_Sm Machine-Mode Exceptions
These tests are run on any configuration with machine mode that supports exceptions.
exceptionsm covergroup
| Coverpoint | Goal | Feature Description | Expectation | Bins | Normative Rule |
|---|---|---|---|---|---|
cp_instr_adr_misaligned_branch |
Instruction Address Misaligned |
Branch taken to an address that is an odd multiple of 2 |
Instruction Misaligned Exception if C is not supported |
6 branches |
taken_cti_misaligned_exc |
cp_instr_adr_misaligned_branch_nottaken |
Instruction Address Misaligned |
Each type of branch not taken to an address that is an odd multiple of 2 |
No exception |
6 branches |
cond_br_no_ia_misaligned_exc_not_taken |
cp_instr_adr_misaligned_jal |
Instruction Address Misaligned |
jal to an address that is an odd multiple of 2 |
Instruction Misaligned Exception if C is not supported |
1 |
taken_cti_misaligned_exc |
cp_instr_adr_misaligned_jalr |
Instruction Address Misaligned |
jalr to an address that is an odd multiple of 2 and odd multiple of 2 + 1. |
Instruction Misaligned Exception if C is not supported |
4 rs1[1:0] * 4 offset[1:0] |
taken_cti_misaligned_exc |
cp_instr_access_fault |
Instruction Access Fault |
Fetch instruction from unimplemented memory |
Instruction Access Fault |
1 |
mcause_exccode_op |
cp_illegal_instruction |
Illegal Instruction |
Executing instruction 0x00000000 and 0xFFFFFFFF throws an illegal instruction exception. |
Illegal Instruction Exception |
2 instr |
mcause_exccode_op |
cp_illegal_instruction_seed |
Illegal Read-only access to a CSR |
csrrs x*, seed, x0 throws illegal instruction in machine mode, as do |
Illegal Instruction Exception |
4 csr ops |
|
cp_breakpoint |
Breakpoint |
ebreak throws breakpoint exception |
Breakpoint Exception |
1 |
mcause_exccode_op |
cp_load_address_misaligned |
Load Misaligned |
Attempt lb, lbu, lh, lhu, lw, lwu, ld with every combination of three address lsbs: 000 - 111 |
Possible Load Misaligned Instruction |
7 ops * 8 lsbs |
ldst_no_exc_aligned |
cp_load_access_fault |
Load Access Fault |
Attempt lb, lbu, lh, lhu, lw, lwu, ld from an illegal address (parameterized). Also exercised in PMP, VM. |
Load Access Fault |
7 ops |
mcause_exccode_op |
cp_store_address_misaligned |
Store Misaligned |
Attempt sb, sh, sw, (sd) with every combination of three lsbs: 000-111 |
Possible Store Misaligned Instruction |
4 ops * 8 lsbs |
ldst_no_exc_aligned |
cp_store_access_fault |
Store Access Fault |
Attempt sb, sh, sw, sd from an illegal address (parameterized). Also exercised in PMP, VM. |
Store Access Fault |
4 ops |
pma_precise_recom |
cp_ecall_m |
ecall |
ecall from machine mode |
Ecall from M Exception |
1 |
mepc_op |
cp_misaligned_priority_load |
Priority of exceptions |
Attempt lb, lbu, lh, lhu, lw, (lwu, ld) from memory location causing access fault and misaligned. Also exercised in PMP, VM. |
Highest priority exception should be taken. |
7 ops * 8 lsbs |
mcause_exccode_priority_misaligned |
cp_misaligned_priority_store |
Priority of exceptions |
Attempt sb, sh, sw, (sd) to memory location causing access fault and misaligned. Also exercised in PMP, VM. |
Highest priority exception should be taken. |
4 ops * 8 lsbs |
mcause_exccode_priority_misaligned |
cp_misaligned_priority_fetch |
Priority of exceptions |
Attempt fetch from aligned and misaligned legal and access-fault addresses. Also exercised in PMP, VM. |
Highest priority exception should be taken. |
2 alignments * 2 addresses |
exc_priority |
cp_mstatus_ie |
Interrupt Enables |
ecall with mstatus.MIE = {0/1} |
mpie gets mie, mie gets 0 |
2 MIE |
|
cp_xstatus_ie |
Interrupt Enables |
if S_SUPPORTED: |
xpie gets xie, xie gets 0 |
3 modes * 2 medleg * 2 mie * 2 sie |
|
cp_medeleg_msu |
Delegation to supervisor mode |
If S_SUPPORTED: |
Should delegate from user/supervisor but not machine when a 1 is in the appropriate column. Note medeleg[11] is hardwired to 0 because ecall from M cannot be delegated, and medeleg[9] is 0 because delegating an ecall from supervisor mode makes it impossible to get back to machine mode. |
9 ops * 3 modes * 14 medeleg |
trap_del_s_mode_op |
Notes: xepc, xcause, xtval, xtvec, mstatus.xpp are inherently tested with exceptions taking place |
|||||
Note: load/store misaligned, access fault, page fault for Zaamo, Zalrsc, Zicbo* are exercised in PMA, PMP, VM |
|||||
menvcfg.STCE = 0 causes access to stimecmp outside of M mode to illegal instruction |
|||||
B.2.2. Exceptions_S Supervisor-Mode Exceptions
These additional exception tests are run on configurations with supervisor mode.
The following exceptions should be exercised in supervisor mode unless otherwise noted. All inherently require Zicsr.
| Coverpoint | Goal | Feature Description | Expectation | Bins | Normative Rule | Notes |
|---|---|---|---|---|---|---|
cp_instr_adr_misaligned_branch |
Instruction Address Misaligned |
Each type of branch taken to an address that is an odd multiple of 2 |
Only throws an exception if C is not supported. |
6 branches |
taken_cti_misaligned_exc |
|
cp_instr_adr_misaligned_branch_nottaken |
Instruction Address Misaligned |
Each type of branch not taken to an address that is an odd multiple of 2 |
No exception |
6 branches |
cond_br_no_ia_misaligned_exc_not_taken |
|
cp_instr_adr_misaligned_jal |
Instruction Address Misaligned |
jal to an address that is an odd multiple of 2 |
Instruction at multiple of 4. Offset is an odd multiple of 2. |
1 |
taken_cti_misaligned_exc |
|
cp_instr_adr_misaligned_jalr |
Instruction Address Misaligned |
jalr to an address that is an odd multiple of 2 and odd multiple of 2 + 1. |
Only throws an exception if C is not supported. |
4 rs1[1:0] * 4 offset[1:0] |
taken_cti_misaligned_exc |
|
cp_instr_access_fault |
Instruction Access Fault |
Fetch instruction from unimplemented memory |
Access fault |
1 |
ia_fault_exc_on_target |
|
cp_illegal_instruction |
Illegal Instruction |
Executing instruction 0x00000000 and 0xFFFFFFFF |
throws an illegal instruction exception (trap and mcause) |
2 instr |
sstatus_spp |
|
cp_illegal_instruction_seed |
Illegal Read-only access to a CSR |
csrrs x*, seed, x0 throws illegal instruction as do |
Illegal instruction exception |
4 csr ops |
* this could be reserved and should be moved to an Zkr spreadsheet for all priv modes |
|
cp_breakpoint |
Breakpoint |
ebreak throws breakpoint exception |
throws breakpoint exception (trap and mcause) |
1 |
ebreak_debug_env_op |
|
cp_load_address_misaligned |
Load Misaligned |
Attempt lh, lhu, lw, lwu, ld with every combination of three address lsbs: 000 - 111 |
Might not cause exception |
7 ops * 8 lsbs |
ldst_no_exc_aligned |
|
cp_load_access_fault |
Load Access Fault |
Attempt lb, lbu, lh, lhu, lw, lwu, ld from an illegal address (parameterized) |
Load access fault |
7 ops |
mcause_exccode_ld_ldrsv |
|
cp_store_address_misaligned |
Store Misaligned |
Attempt sh, sw, sd with every combination of three lsbs: 000-111 |
Might not cause exception |
4 ops * 8 lsbs |
ldst_no_exc_aligned |
|
cp_store_access_fault |
Store Access Fault |
Attempt sb, sh, sw, sd from an illegal address (parameterized) |
Store access fault |
4 ops |
mcause_exccode_st_sc_amo |
|
cp_ecall_s |
ecall |
ecall from supervisor mode throws ecall supervisor exception (trap and mcause) |
ecall to M-mode (should not be delegated to S-mode because there would be no path to M-mode) |
1 |
ecall_ebreak_epc_value |
|
cp_misaligned_priority_load |
Priority of exceptions |
Attempt lw and sw and fetch from memory location causing access fault and misaligned |
System-dependent |
3 ops |
mcause_exccode_priority_misaligned |
|
cp_stvec |
Cause delegated exception in s and u mode with stvec != mtvec |
Delegates to stvec handler |
2 modes |
stvec_sz_base |
||
cp_xstatus_ie |
Interrupt Enables |
ecall cross {mode = user/supervisor, mstatus.mie = {0/1}, mstatus.sie = {0/1}} |
xpie gets xie, xie gets 0 |
3 modes * 2 medleg * 2 mie * 2 sie |
||
Note: instruction/load/store fault pages are being tested in Sv_Exceptions |
||||||
Note: tests that differ from Exceptions_Sm are cp_medeleg_mu and cp_stvec. cp_misaligned_priority is split by access type. |
||||||
B.2.3. Exceptions_U User-Mode Exceptions
These additional exception tests are run on configurations with user mode.
| Coverpoint | Goal | Feature Description | Expectation | Bins | Normative Rule |
|---|---|---|---|---|---|
cp_instr_adr_misaligned_branch |
Instruction Address Misaligned |
Branch taken to an address that is an odd multiple of 2 |
Only throws an exception if C is not supported. |
6 branches |
taken_cti_misaligned_exc |
cp_instr_adr_misaligned_branch_nottaken |
Instruction Address Misaligned |
Branch not taken to an address that is an odd multiple of 2 |
No exception |
6 branches |
cond_br_no_ia_misaligned_exc_not_taken |
cp_instr_adr_misaligned_jal |
Instruction Address Misaligned |
jal to an address that is an odd multiple of 2 |
Instruction at multiple of 4. Offset is an odd multiple of 2. |
1 |
taken_cti_misaligned_exc |
cp_instr_adr_misaligned_jalr |
Instruction Address Misaligned |
jalr to an address that is an odd multiple of 2 and odd multiple of 2 + 1. |
Only throws an exception if C is not supported. |
4 rs1[1:0] * 4 offset[1:0] |
taken_cti_misaligned_exc |
cp_instr_access_fault |
Instruction Access Fault |
Jump to access fault address |
Instruction access fault is raised (trap and mcause) |
1 |
ia_fault_exc_on_target |
cp_illegal_instruction |
Illegal Instruction |
Executing instruction 0x00000000 and 0xFFFFFFFF |
throws an illegal instruction exception (trap and mcause) |
2 instr |
sstatus_spp |
cp_illegal_instruction_seed |
Illegal Read-only access to a CSR |
csrrs x*, seed, x0 throws illegal instruction, as do |
illegal instruction exception |
4 csr ops |
* move to Zkr |
cp_breakpoint |
Breakpoint |
ebreak throws breakpoint exception |
throws breakpoint exception (trap and mcause) |
1 |
ebreak_debug_env_op |
cp_load_address_misaligned |
Load Misaligned |
Attempt lh, lhu, lw, lwu, ld with every combination of three address lsbs: 000 - 111 |
Might not cause exception |
7 ops * 8 lsbs |
ldst_no_exc_aligned |
cp_load_access_fault |
Load Access Fault |
Attempt lb, lbu, lh, lhu, lw, lwu, ld from an illegal address (parameterized) |
load access fault |
7 ops |
mcause_exccode_ld_ldrsv |
cp_store_address_misaligned |
Store Misaligned |
Attempt sh, sw, sd with every combination of three lsbs: 000-111 |
Might not cause exception |
4 ops * 8 lsbs |
ldst_no_exc_aligned |
cp_store_access_fault |
Store Access Fault |
Attempt sb, sh, sw, sd from an illegal address (parameterized) |
store access fault |
4 ops |
mcause_exccode_st_sc_amo |
cp_ecall_u |
ecall |
ecall from user mode |
throws ecall user exception (trap and mcause) |
1 |
ecall_ebreak_epc_value |
cp_misaligned_priority_load |
Priority of exceptions |
Attempt lb, lbu, lh, lhu, lw, (lwu, ld) from memory location causing access fault and misaligned |
priority may vary. |
7 ops * 8 lsbs |
mcause_exccode_priority_misaligned |
cp_misaligned_priority_store |
Priority of exceptions |
Attempt sb, sh, sw, (sd) to memory location causing access fault and misaligned |
priority may vary. |
4 ops * 8 lsbs |
mcause_exccode_priority_misaligned |
cp_mstatus_ie |
Interrupt Enables |
ecall to machine cross mie = {0/1} |
mpie gets xie, mie gets 0 |
2 mie |
B.2.4. Exceptions_F Floating-Point Exceptions
These additional exception tests are run on configurations with floating-point (at least the F extension).
| Coverpoint | Goal | Feature Description | Expectation | Bins | Normative Rule |
|---|---|---|---|---|---|
cp_mstatus_fs_illegal_instr |
Illegal Instruction |
Executing a floating-point instruction when mstatus.FS=00 |
causes illegal instruction exception. |
19 instructions selected for testing |
mstatus_fs_vs_xs_off_op |
cp_mstatus_fs_csr_access |
Illegal Instruction |
Access (read, write, set, clear) fcsr, fflags, frm when mstatus.FS=00 |
causes illegal instruction exception. |
3 instructions * 3 CSRs |
mstatus_fs_vs_xs_off_op |
cp_mstatus_fs_legal |
legal instruction |
Executing a floating-point instruction when mstatus.FS=01, 10, 11 |
does not cause an illegal instruction exception |
3 FS * 19 instructions * 5 legal frm values |
mstatus_fs_wr |
cp_load_address_misaligned |
misaligned load |
Execute flw with all 4 lsbs in address. If supported, also do flh, fld, flq. |
might cause misaligned load fault |
16 addresses * up to 4 instructions |
ldst_no_exc_aligned |
cp_load_access_fault |
load access fault |
Execute flw from access fault address. If supported, also do flh, fld, flq |
load access fault |
up to 4 instructions |
misaligned_ldst_exc_type |
cp_store_address_misaligned |
misaligned store |
Execute fsw with all 4 lsbs in address. If supported, also do fsh, fsd, fsq. |
might cause misaligned load fault |
16 addresses * up to 4 instructions |
ldst_no_exc_aligned |
cp_store_access_fault |
store access fault |
Execute fsw from access fault address. If supported, also do fsh, fsd, fsq. |
load access fault |
up to 4 instructions |
misaligned_ldst_exc_type |
B.2.5. Exceptions_Zalrsc Atomic LR/SC Exceptions
| Coverpoint | Goal | Feature Description | Expectation | Bins | Normative Rule |
|---|---|---|---|---|---|
cp_load_address_misaligned |
Load Misaligned |
Misaligned lr.w, lr.d (8 bins for bottom 3 bits of address) |
8 lsbs * 2 instr |
ldst_no_exc_aligned |
|
cp_load_access_fault |
Load Access Fault |
Access fault of lr.w, lr.d |
Access fault |
2 instructions |
mcause_exccode_ld_ldrsv |
cp_load_access_misaligned_priority |
Load with both faults |
Access fault of lr.w and lr.d with misaligned address |
2 instr |
mcause_exccode_priority_misaligned |
|
cp_store_address_misaligned |
Store Misaligned |
Misaligned sc.w, sc.d cross match lr address (8 bins for bottom 3 bits of address) cross rd having an initial value > 1 |
Faulting sc should not change rd |
8 lsbs * 2 instr |
lr_sc_alignment |
cp_store_access_fault |
Store Access Fault |
Access fault of sc.w, sc.d cross match lr address cross rd having an initial value > 1 |
Faulting sc should not change rd |
2 instr |
mcause_exccode_st_sc_amo |
cp_store_access_misaligned_priority |
Store with both faults |
Access fault and missalign of sc.w and sc.d cross match lr address cross rd having an initial value > 1 |
Faulting sc should not change rd |
2 instr |
mcause_exccode_priority_misaligned |
B.2.6. Exceptions_Zaamo Atomic Memory Operation Exceptions
| Coverpoint | Goal | Feature Description | Expectation | Bins | Normative Rule |
|---|---|---|---|---|---|
cp_amo_address_misaligned |
AMO Misaligned |
Misaligned amoswap.w, amoadd.w, amoxor.w, amoand.w, amoor.w, amomin.w, amomax.w, amominu.w, amomaxu.w. RV64: also .d. Zabha: also .h, .b. |
May produce misaligned or access fault or may succeed |
up to (9*4) instr * 32 lsbs |
mcause_exccode_st_sc_amo |
cp_amo_access_fault |
AMO Access Fault |
Access fault on amoswap.w, amoadd.w, amoxor.w, amoand.w, amoor.w, amomin.w, amomax.w, amominu.w, amomaxu.w. RV64: also .d. Zabha: also .h, .b. |
Access Fault. |
up to (9*4) instr |
mcause_exccode_st_sc_amo |
B.2.7. Exceptions_Zc Compressed Instruction Exceptions
These additional exception tests are run on configurations with compressed instructions (C, Zca, Zcb, etc.). They attempt to test all compressed loads and stores, but may throw an illegal instruction fault on compressed subword load/store if Zcb is not supported.
| Coverpoint | Goal | Feature Description | Expectation | Bins | Normative Rule |
|---|---|---|---|---|---|
cp_breakpoint |
Compressed breakpoint |
c.ebreak |
Breakpoint exception |
1 |
mtval_ebreak_op |
cp_load_address_misaligned |
Compressed loads with misaligned addresses |
Attempt c.lw, c.lwsp, c.ld, c.ldsp with every combination of three lsbs:000-111. |
If misaligned not supported, accesses that are not naturally aligned will throw load misaligned fault. |
up to 11 instructions * 8 addresses |
|
cp_load_access_fault |
Compressed loads to nonexistent address |
Attempt instructions above from an illegal address (parameterized) |
Load access fault |
up to 11 instructions |
|
cp_store_address_misaligned |
Compressed stores with misaligned addresses |
Attempt c.sw, c.swsp, c.sd,c.sdsp with every combination of three lsbs: 000-111 |
If misaligned not supported, accesses that are not naturally aligned will throw store misaligned fault. |
up to 10 instructions * 8 addresses |
|
cp_store_access_fault |
Compressed stores to nonexistent address |
Attempt instructions above to an illegal address (parameterized) |
Store access fault |
up to 10 instructions |
|
cp_illegal_instruction |
CompressedIllegal Instruction |
c.illegal (0x0000) |
Illegal instruction fault. |
1 |
mtval_instr_bits_list |
B.2.8. Exceptions_ZicboS Supervisor-Mode CBO Exceptions
Tests done in supervisor and user mode. Configure menvcfg via T-SBI.
| Coverpoint | Goal | Feature Description | Expectation | Bins | Normative Rule |
|---|---|---|---|---|---|
cp_cbie |
cbo.inval |
If ZICBOM_SUPPORTED & SM1P12P0_OR_LATER_SUPPORTED: |
Trap when prohibited |
2 modes * 3 menvcfg * 3 senvcfg |
menvcfg_cbie_warl_op |
cp_cbcfe |
cbo.flushclean |
If ZICBOM_SUPPORTED & SM1P12P0_OR_LATER_SUPPORTED: |
Trap when prohibited |
2 instr * 2 modes * 2 menvcfg * 2 senvcfg |
menvcfg_cbcfe_op |
cp_cbze |
cbo.zero |
If ZICBOZ_SUPPORTED & SM1P12P0_OR_LATER_SUPPORTED: |
Trap when prohibited |
2 modes * 2 menvcfg * 2 senvcfg |
menvcfg_cbze_op |
cp_cbo_access_fault |
Access fault |
For each supported cbo op {inval, clean, flush, zero, prefetch.{i/w/r}} |
CBO: Store access fault |
7 instr * 2 modes |
fault_excep_csr |
cp_cbo_address_misaligned |
No misaligned fault |
For each supported cbo op {inval, clean, flush, zero, prefetch.{i/w/r}} |
No misaligned faults |
7 instr * 2 modes |
no_addr_misaligned_excep |
B.2.9. Exceptions_ZicboU User-Mode CBO Exceptions
Tests done in user mode. Configure menvcfg via T-SBI.
| Coverpoint | Goal | Feature Description | Expectation | Bins | Normative Rule |
|---|---|---|---|---|---|
cp_cbie |
cbo.inval |
If ZICBOM_SUPPORTED & SM1P12P0_OR_LATER_SUPPORTED: |
Trap when prohibited |
3 vals |
menvcfg_cbie_warl_op |
cp_cbcfe |
cbo.flushclean |
If ZICBOM_SUPPORTED & SM1P12P0_OR_LATER_SUPPORTED: |
Trap when prohibited |
2 instr * 2 vals |
menvcfg_cbcfe_op |
cp_cbze |
cbo.zero |
If ZICBOM_SUPPORTED & SM1P12P0_OR_LATER_SUPPORTED: |
Trap when prohibited |
2 vals |
menvcfg_cbze_op |
cp_cbo_access_fault |
Access fault |
For each supported cbo op {inval, clean, flush, zero, prefetch.{i/w/r}} |
CBO: Store access fault |
7 instr |
fault_excep_csr |
cp_cbo_address_misaligned |
No misaligned fault |
For each supported cbo op {inval, clean, flush, zero, prefetch.{i/w/r}} |
No misaligned faults |
7 instr |
no_addr_misaligned_excep |
B.2.10. Exceptions_ZicboSm Machine-Mode CBO Exceptions
Tests done in machine mode. Only touch menvcfg if U is supported
| Coverpoint | Goal | Feature Description | Expectation | Bins | Normative Rule |
|---|---|---|---|---|---|
cp_cbie |
cbo.inval |
If ZICBOM_SUPORTED & U_SUPPORTED & SM1P12P0_OR_LATER_SUPPORTED: |
No trap |
3 vals |
menvcfg_cbie_warl_op |
cp_cbcfe |
cbo.flushclean |
If ZICBOM_SUPORTED & U_SUPPORTED & SM1P12P0_OR_LATER_SUPPORTED: |
No trap |
2 instr * 2 vals |
menvcfg_cbcfe_op |
cp_cbze |
cbo.zero |
If ZICBOZ_SUPORTED & U_SUPPORTED & SM1P12P0_OR_LATER_SUPPORTED: |
No trap |
2 vals |
menvcfg_cbze_op |
cp_cbo_access_fault |
Access fault |
For each supported cbo op {inval, clean, flush, zero, prefetch.{i/w/r}} |
CBO: Store access fault |
7 instr |
fault_excep_csr |
cp_cbo_address_misaligned |
No misaligned fault |
For each supported cbo op {inval, clean, flush, zero, prefetch.{i/w/r}} |
No misaligned faults |
7 instr |
no_addr_misaligned_excep |
B.2.11. Exceptions_HSm and Exceptions_H Hypervisor Exceptions
Exceptions_HSm boots to M-mode with nothing delegated and checks that exceptions from VS and VU reach M-mode whatever hedeleg holds, ecall and ebreak from every mode, sret in VS-mode with mstatus.TSR = 1, HLV/HSV misaligned and access faults taken in M-mode, and mtval2/mtinst. Exceptions_H boots to HS-mode, walks hedeleg for exceptions from VS and VU, checks that exceptions from HS and U ignore hedeleg, ecalls into HS-mode and VS-mode, vstvec, the virtual-instruction exceptions, HLV/HSV privilege and priority, and hstatus.GVA, htval and htinst. The trap handlers check htinst and mtinst on every recorded trap. The misaligned cp_xtinst cases run only on harts that trap misaligned accesses.
The group boots to M-mode and delegates nothing (medeleg = 0), so the M-mode handler takes every trap. Its record holds mcause, mepc, mtval, mtval2, mtinst, mstatus.MPP/MPIE and mstatus.MPV/GVA. With medeleg = 0, hedeleg has no effect, so it is set only to 0 and to all of its writable bits. Each checked ecall is the T-SBI call RVTEST_TSBI_ECALL_TEST, which the M-mode handler records like any other exception. mtinst is checked on every trap as in Exceptions_H.
| Coverpoint | Goal | Feature Description | Expectation | Bins | Normative Rule | Notes |
|---|---|---|---|---|---|---|
cp_hedeleg |
hedeleg has no effect with medeleg = 0 |
In VS-mode and VU-mode with medeleg = 0 and hedeleg = {0, all writable bits}, raise the exceptions of Exceptions_H cp_hedeleg: {jalr to a misaligned target at the access-fault address, jalr to the access-fault address, illegal instruction all 0s and all 1s, ebreak, each load and store at scratch + 0-7, each load and store at the access-fault address, ecall}. |
Every exception traps to M-mode with mstatus.MPV = 1 and mstatus.MPP = the nominal privilege. Misaligned fetches, loads and stores trap or complete as the reference model does. |
9 exceptions * 2 modes * 2 hedeleg (* 8 offsets for misaligned loads and stores) |
hedeleg_op |
|
cp_ecall_to_m |
ecall to M sets status bits |
With medeleg = 0, ecall from M/VS/VU. |
Trap to M-mode with mcause = 11, 10 or 8, mstatus.MPP = the nominal privilege, MPV = the old V, MPIE = the old MIE, MIE = 0 and GVA = 0. |
3 |
H_trap_m_csrwrites |
|
cp_ebreak_to_m |
ebreak to M sets status bits |
With medeleg = 0, ebreak from M/VS/VU. |
Trap to M-mode with mcause = 3, mstatus.MPP = the nominal privilege, MPV = the old V, MPIE = the old MIE and MIE = 0. GVA = 1 exactly when a trap from VS or VU writes the guest virtual address of the ebreak to mtval. |
3 |
H_trap_m_csrwrites |
|
cp_tsr_vs_sret |
mstatus.TSR does not affect VS-mode |
With mstatus.TSR = 1 and hstatus.VTSR = {0/1}, execute sret in VS-mode with vsstatus.SPP = 1 and SPIE = 0 |
sret executes and stays in VS-mode when VTSR = 0; virtual instruction exception when VTSR = 1 |
2 VTSR |
H_cause_virtual_instruction |
|
cp_loadstore_priv |
Hypervisor load/store in M-mode |
In M-mode with hstatus.HU = {0/1}, attempt {HLV.W, HLVX.WU, HSV.W} on scratch memory. vsatp and hgatp are Bare. |
Succeeds; HU has no effect outside U-mode. The hsv.w result is read back. |
3 instr * 2 HU |
||
cp_priority_hlv |
priority of misaligned and access fault in M-mode |
In M-mode with hstatus.HU = {0/1}, execute {hlv.w / hsv.w} x {scratch / access-fault address} x {addr[1:0] = 00/01}. vsatp and hgatp are Bare. |
An aligned access to scratch completes; the other accesses raise the access fault or address-misaligned exception the reference model raises (misaligned accesses to scratch may complete; the order of address-misaligned and access faults is implementation-defined). HU has no effect. |
2 instr * 2 access * 2 misaligned * 2 HU |
H_exception_priority |
|
cp_hlv_address_misaligned |
Hypervisor Load Misaligned |
In M-mode with vsatp and hgatp Bare, attempt hlv.{b, bu, h, hu, w} and hlvx.{hu, wu} at scratch + each offset 0-7. For RV64, also hlv.wu and hlv.d. |
Success, or for a misaligned address the load address-misaligned or access fault the reference model raises (implementation-defined). A trap sets mstatus.GVA = 1 and MPV = 0. |
7 instr * 8 addr, + 2 instr on RV64 |
mstatus_gva_op |
|
cp_hlv_access_fault |
Hypervisor Load Access Fault |
In M-mode with vsatp and hgatp Bare, attempt hlv.{b, bu, h, hu, w} and hlvx.{hu, wu} at the access-fault address. For RV64, also hlv.wu and hlv.d. |
Load access fault with mtval = the guest virtual address and mstatus.GVA = 1 |
7 instr, + 2 on RV64 |
hlsv_op |
|
cp_hsv_address_misaligned |
Hypervisor Store Misaligned |
In M-mode with vsatp and hgatp Bare, attempt hsv.{b, h, w} at scratch + each offset 0-7, then read back scratch. For RV64, also hsv.d. |
Success, or for a misaligned address the store address-misaligned or access fault the reference model raises (implementation-defined). A trap sets mstatus.GVA = 1 and MPV = 0. |
3 instr * 8 addr, + 1 instr on RV64 |
hlsv_op |
|
cp_hsv_access_fault |
Hypervisor Store Access Fault |
In M-mode with vsatp and hgatp Bare, attempt hsv.{b, h, w} at the access-fault address. For RV64, also hsv.d. |
Store access fault with mtval = the guest virtual address and mstatus.GVA = 1 |
3 instr, + 1 on RV64 |
mstatus_gva_op |
|
cp_xtinst_instr_access |
Exceptions taken into M-mode write mtval2 and mtinst |
From VS-mode with medeleg = hedeleg = 0, after M-mode writes a nonzero value to mtval2 and mtinst and enters VS-mode with mret (a T-SBI call would overwrite them), attempt each of: |
The exception traps to M-mode with mtval2 = 0 and mtinst = 0, or for lw and sw the transformed instruction. |
7 |
H_trap_xtinst |
|
cp_xtinst_instr_misaligned |
Misaligned exceptions taken into M-mode write mtval2 and mtinst |
As above, attempt a jump to a misaligned address, a misaligned lw and a misaligned sw. |
The exception traps to M-mode with mtval2 = 0 and mtinst = 0, or for lw and sw the transformed instruction. |
3 |
H_trap_xtinst |
cp_xtinst_instr_misaligned is compiled only without Zca, and the load and store cases only when the hart does not perform misaligned loads and stores (UDB MISALIGNED_LDST = false). Of the current H configurations only sargantana-rv64imafdb assembles them. |
The group boots to HS-mode. medeleg delegates to HS-mode every exception but the ecalls from HS-mode and M-mode (bits 9 and 11 are 0, so T-SBI calls from HS-mode reach M-mode). hedeleg is 0 except where a test delegates to VS-mode. Traps that must be taken in M-mode are in Exceptions_HSm. The trap handlers record every trap. An HS-mode record holds scause, sepc, stval, htval, htinst, sstatus.SPP/SPIE and hstatus.SPVP/SPV/GVA. An M-mode record holds mcause, mepc, mtval, mtval2, mtinst, mstatus.MPP/MPIE and mstatus.MPV/GVA. A VS-mode record holds vscause, vsepc, vstval and vsstatus.SPP/SPIE/SIE. Each checked ecall is the T-SBI call RVTEST_TSBI_ECALL_TEST, which the handler that takes it records like any other exception. htinst and mtinst are checked on every trap: zero, or for a load, store, AMO, HLV, HLVX or HSV exception (causes 4-7, 13, 15, 21, 23) the transformed instruction with Addr. Offset equal to xtval minus the original address. A required pseudoinstruction must match the reference model exactly.
| Coverpoint | Goal | Feature Description | Expectation | Bins | Normative Rule | Notes |
|---|---|---|---|---|---|---|
cp_hedeleg_instr_misaligned_jalr |
Delegation to HS or VS |
In VS-mode and VU-mode, attempt {jalr to a misaligned target at the access-fault address, jalr to the access-fault address, illegal instruction all 0s and all 1s, ebreak, each load and store at scratch + 0-7, each load and store at the access-fault address, ecall} with medeleg as set by the boot, crossed with hedeleg = {0, each of bits 0-8 alone, all writable bits}. |
An exception goes to VS-mode when its bit is set in both medeleg and hedeleg, and otherwise to HS-mode. An ecall from VS-mode always goes to HS-mode (hedeleg[10] is read-only 0). Misaligned fetches, loads and stores trap or complete as the reference model does. |
9 exceptions * 2 modes * 11 hedeleg (* 8 offsets for misaligned loads and stores) |
hedeleg_bits_required |
Also covers hstatus.GVA, which these traps set when they write a guest virtual address to stval. Page-fault and guest-page-fault delegation is in Sv_H_twostage_cg cp_hedeleg_page_fault and cp_hedeleg_guest_page_fault. |
cp_hedeleg_hs_u |
Traps from HS and U ignore hedeleg |
In HS-mode and U-mode with hedeleg = all writable bits, raise the same exceptions as cp_hedeleg. |
Only traps from V = 1 consult hedeleg. Each exception goes to HS-mode, except an ecall from HS-mode, which goes to M-mode (medeleg[9] = 0). |
9 exceptions * 2 modes |
hedeleg_bits_required |
|
cp_ecall_to_vs |
ecall to VS sets status bits |
With medeleg[8] = hedeleg[8] = 1 and vsstatus.SIE = {0/1}, ecall from VU-mode. |
Trap to VS-mode with vscause = 8, vsstatus.SPP = 0, vsstatus.SPIE = the old SIE and vsstatus.SIE = 0. |
2 vsstatus.SIE |
H_trap_vs_csrwrites |
|
cp_ecall_to_hs |
ecall to HS sets status bits |
With hedeleg = 0 and medeleg delegating ecalls from U and VS, ecall from {U, VS, VU} crossed with hstatus.SPVP = {0/1}, set before the ecall. |
Trap to HS-mode with scause = 8 (U, VU) or 10 (VS), sstatus.SPP = the nominal privilege, sstatus.SPIE = the old SIE, sstatus.SIE = 0, hstatus.SPV = the old V and hstatus.GVA = 0. |
3 modes * 2 SPVP |
H_trap_hs_csrwrites |
|
cp_vstvec |
Traps delegated to VS use vstvec |
With hedeleg[3] = hedeleg[8] = 1 and vstvec pointing to a different trap handler than stvec, ebreak from VS-mode and ebreak and ecall from VU-mode. |
Each trap goes to the vstvec handler. An ecall from VS-mode is never delegated to VS-mode (hedeleg[10] is read-only 0), so it is not part of this coverpoint. |
3 |
H_trap_vs_csrwrites |
|
cp_priority_hlv |
priority of illegal/virtual instruction, misaligned, access fault |
In each of HS, VS, U and VU modes with hstatus.HU = {0/1}, execute {hlv.w / hsv.w} x {scratch / access-fault address} x {addr[1:0] = 00/01}. vsatp and hgatp are Bare. |
Virtual instruction in VS and VU. Illegal instruction in U with HU = 0. Otherwise an aligned access to scratch completes, and the other accesses raise the access fault or address-misaligned exception the reference model raises (misaligned accesses to scratch may complete; the order of address-misaligned and access faults is implementation-defined). |
4 priv * 2 instr * 2 access * 2 misaligned * 2 HU |
hlsv_virtinst |
|
cp_virtual_instr_vs_execute_hypervisor |
exercise all ways to trigger virtual-instruction exceptions from VS |
In VS-mode with mstatus.TW = 0: |
virtual instruction exception; rd keeps its value and hsv.w does not write memory |
13, + 1 on RV32 |
H_cause |
wfi with hstatus.VTW = 1 is in InterruptsH cp_wfi_vs. Some of these cases are also sampled by H, HSm and H_Zicntr. |
cp_virtual_instr_vu_execute_h |
exercise all ways to trigger virtual-instruction exceptions from VU |
In VU-mode with mstatus.TW = 0: |
virtual instruction exception; rd keeps its value and hsv.w does not write memory |
13, + 1 on RV32 |
H_cause_virtual_instruction |
Some of these cases are also sampled by H, HSm and H_Zicntr. |
cp_loadstore_priv |
Valid privilege modes of hypervisor load/store |
In each privilege mode {HS/VS/U/VU} with hstatus.HU = {0/1}, attempt {HLV.W, HLVX.WU, HSV.W} on scratch memory. vsatp and hgatp are Bare. |
Succeeds in HS, and in U with HU = 1; virtual instruction in VS and VU; illegal instruction in U with HU = 0. The hsv.w result is read back. |
4 priv * 3 instr * 2 HU |
hlsv_virtinst |
|
cp_hstatus_gva_hlv |
An HLV or HSV fault taken into HS-mode sets hstatus.GVA |
In HS-mode, and in U-mode with hstatus.HU = 1, execute hlv.w and hsv.w at the access-fault address (part of the cp_priority_hlv and cp_priority_hsv tests). |
Access fault into HS-mode with stval = the guest virtual address and hstatus.GVA = 1. |
2 modes * 2 instr |
hstatus_gva_op |
|
cp_xtinst_instr_misaligned |
Instruction address misaligned writes xtinst |
From VS mode with hedeleg = 0, after HS-mode writes a nonzero value to htval and htinst, jump to a misaligned address. |
Instruction misaligned trap into HS-mode with htval = 0 and htinst = 0. |
1 |
htval_sz_acc_op |
Compiled only without Zca, when misaligned fetches trap. Of the current H configurations only sargantana-rv64imafdb assembles it. |
cp_xtinst_instr_access |
Instruction access fault writes xtinst |
From VS mode with hedeleg = 0, after HS-mode writes a nonzero value to htval and htinst, jump to the access-fault address. |
Instruction access fault into HS-mode with htval = 0 and htinst = 0. |
1 |
htval_sz_acc_op |
|
cp_xtinst_illegalinstr |
Illegal instruction writes xtinst |
From VS mode with hedeleg = 0, after HS-mode writes a nonzero value to htval and htinst, execute illegal instruction all 0s. |
Illegal instruction fault into HS-mode with htval = 0 and htinst = 0. |
1 |
htval_sz_acc_op |
|
cp_xtinst_breakpoint |
breakpoint writes xtinst |
From VS mode with hedeleg = 0, after HS-mode writes a nonzero value to htval and htinst, execute ebreak. |
Breakpoint exception into HS-mode with htval = 0 and htinst = 0. |
1 |
htval_sz_acc_op |
|
cp_xtinst_virtinstr |
Virtual instruction writes xtinst |
From VS mode with hedeleg = 0, after HS-mode writes a nonzero value to htval and htinst, csrr vstval. |
Virtual instruction exception into HS-mode with htval = 0 and htinst = 0. |
1 |
htval_sz_acc_op |
|
cp_xtinst_load_misaligned |
load misaligned writes xtinst |
From VS mode with hedeleg = 0, after HS-mode writes a nonzero value to htval and htinst, misaligned lw. |
Load misaligned exception into HS-mode with htval = 0 and htinst = 0 or the transformed lw. |
1 |
htval_sz_acc_op |
Compiled only when the hart does not perform misaligned loads and stores (UDB MISALIGNED_LDST = false). Of the current H configurations only sargantana-rv64imafdb assembles it. |
cp_xtinst_load_access |
load access fault writes xtinst |
From VS mode with hedeleg = 0, after HS-mode writes a nonzero value to htval and htinst, lw from the access-fault address. |
Load access fault into HS-mode with htval = 0 and htinst = 0 or the transformed lw. |
1 |
htval_sz_acc_op |
|
cp_xtinst_store_misaligned |
store misaligned writes xtinst |
From VS mode with hedeleg = 0, after HS-mode writes a nonzero value to htval and htinst, misaligned sw. |
Store misaligned exception into HS-mode with htval = 0 and htinst = 0 or the transformed sw. |
1 |
htval_sz_acc_op |
Compiled only when the hart does not perform misaligned loads and stores (UDB MISALIGNED_LDST = false). Of the current H configurations only sargantana-rv64imafdb assembles it. |
cp_xtinst_store_access |
store access fault writes xtinst |
From VS mode with hedeleg = 0, after HS-mode writes a nonzero value to htval and htinst, sw to the access-fault address. |
Store access fault into HS-mode with htval = 0 and htinst = 0 or the transformed sw. |
1 |
htval_sz_acc_op |
|
cp_xtinst_ecall |
ecall writes xtinst |
From VS mode with hedeleg = 0, after HS-mode writes a nonzero value to htval and htinst, ecall. |
Environment call from VS-mode (cause 10) into HS-mode with htval = 0 and htinst = 0. |
1 |
htval_sz_acc_op |
B.2.12. Exceptions Normative Rules
The rules apply to all Exceptions groups.
| Normative Rule | Rule Text | Coverpoints |
|---|---|---|
ldst_no_exc_aligned |
Exceptions_F_cg/cp_{load_address_misaligned, store_address_misaligned}, Exceptions_S_cg/cp_{load, store}_address_misaligned, Exceptions_Sm_cg/{cp_load_address_misaligned, cp_store_address_misaligned}, Exceptions_U_cg/cp_{load, store}_address_misaligned, Exceptions_Zalrsc_cg/{cp_load_address_misaligned, cp_store_address_misaligned_legal_w} |
|
misaligned_ldst_exc_type |
Exceptions_F_cg/cp_{load_address_misaligned, store_address_misaligned, load_access_fault, store_access_fault}, Exceptions_Sm_cg/{cp_load_address_misaligned, cp_store_address_misaligned} |
|
mstatus_fs_vs_xs_off_op |
Exceptions_F_cg/{cp_mstatus_fs_illegal_instr, cp_mstatus_fs_csr_access} |
|
mstatus_fs_wr |
Exceptions_F_cg/cp_mstatus_fs_legal |
|
mcause_exccode_op |
The Exception Code field contains a code identifying the last exception or interrupt. |
Exceptions_F_cg/cp_{load_address_misaligned, store_address_misaligned, load_access_fault, store_access_fault}, Exceptions_Sm_cg/{cp_instr_access_fault, cp_illegal_instruction, cp_breakpoint, cp_load_access_fault} |
mcause_exccode_ld_ldrsv |
Note that load and load-reserved instructions generate load exceptions |
Exceptions_F_cg/cp_{load_address_misaligned, load_access_fault}, Exceptions_S_cg/cp_load_access_fault, Exceptions_Sm_cg/{cp_load_address_misaligned, cp_load_access_fault}, Exceptions_Zalrsc_cg/{cp_load_address_misaligned, cp_load_access_fault}, Exceptions_U_cg/cp_load_access_fault |
taken_cti_misaligned_exc |
Exceptions_S_cg/cp_instr_adr_misaligned_{branch, jal, jalr}, Exceptions_Sm_cg/{cp_instr_adr_misaligned_branch, cp_instr_adr_misaligned_jal, cp_instr_adr_misaligned_jalr}, Exceptions_U_cg/cp_instr_adr_misaligned_{branch, jal, jalr} |
|
branch_misaligned_taken_exception |
Exceptions_S_cg/cp_instr_adr_misaligned_branch, Exceptions_Sm_cg/cp_instr_adr_misaligned_branch, Exceptions_U_cg/cp_instr_adr_misaligned_branch |
|
jump_misaligned_exception |
Exceptions_S_cg/cp_instr_adr_misaligned_{jal, jalr}, Exceptions_Sm_cg/{cp_instr_adr_misaligned_jal, cp_instr_adr_misaligned_jalr}, Exceptions_U_cg/cp_instr_adr_misaligned_{jal, jalr} |
|
cond_br_no_ia_misaligned_exc_not_taken |
No instruction-address-misaligned exception is generated for a conditional branch that is not taken. |
Exceptions_S_cg/cp_instr_adr_misaligned_branch_nottaken, Exceptions_Sm_cg/cp_instr_adr_misaligned_branch_nottaken, Exceptions_U_cg/cp_instr_adr_misaligned_branch_nottaken |
branch_misaligned_untaken_exception |
Exceptions_S_cg/cp_instr_adr_misaligned_branch_nottaken, Exceptions_Sm_cg/cp_instr_adr_misaligned_branch_nottaken, Exceptions_U_cg/cp_instr_adr_misaligned_branch_nottaken |
|
ia_fault_exc_on_target |
Exceptions_S_cg/cp_instr_access_fault, Exceptions_Sm_cg/cp_instr_access_fault, ExceptionsSv_cg/cp_instr_page_fault_s, Exceptions_U_cg/cp_instr_access_fault |
|
ebreak_debug_env_op, ebreak_debugger_transfer_op |
ebreak_debug_env_op: The EBREAK instruction is used to return control to a debugging environment. ebreak_debugger_transfer_op: The EBREAK instruction is used by debuggers to cause control to be transferred back to a debugging environment. Unless overridden by an external debug environment, EBREAK raises a breakpoint exception and performs no other operation. |
Exceptions_S_cg/cp_breakpoint, Exceptions_Sm_cg/cp_breakpoint, Exceptions_U_cg/cp_breakpoint |
ecall_ebreak_epc_value |
Exceptions_S_cg/{cp_ecall_s, cp_breakpoint}, Exceptions_U_cg/{cp_ecall_u, cp_breakpoint} |
|
mcause_exccode_st_sc_amo |
store, store-conditional, and AMO instructions generate store/AMO exceptions. |
Exceptions_S_cg/cp_store_access_fault, Exceptions_U_cg/cp_store_access_fault, Exceptions_Zaamo_cg/cp_amo_{address_misaligned, access_fault}, Exceptions_Zalrsc_cg/{cp_store_access_fault, cp_store_address_misaligned_illegal_w} |
mcause_exccode_priority_misaligned |
Exceptions_S_cg/cp_misaligned_priority_{load, store, fetch}, Exceptions_Sm_cg/{cp_misaligned_priority_load, cp_misaligned_priority_store}, Sv_ExceptionsSm_cg/cp_misaligned_priority_{load, store}_m, Exceptions_U_cg/cp_misaligned_priority_{load, store}, Exceptions_Zalrsc_cg/{cp_load_access_misaligned_priority, cp_store_access_misaligned_priority} |
|
trap_del_s_mode_op |
Exceptions_S_cg/{cp_breakpoint, cp_load_access_fault, cp_store_access_fault}, Exceptions_Sm_cg/{cp_medeleg_msu_illegalinstruction, cp_medeleg_msu_ebreak, cp_medeleg_msu_loadaccessfault}, Exceptions_U_cg/{cp_breakpoint, cp_load_access_fault, cp_store_access_fault} |
|
sstatus_spp |
Exceptions_S_cg/{cp_illegal_instruction, cp_breakpoint}, Exceptions_Sm_cg/{cp_medeleg_msu_illegalinstruction, cp_medeleg_msu_ebreak, cp_medeleg_msu_loadaccessfault}, Exceptions_U_cg/{cp_illegal_instruction, cp_breakpoint} |
|
mstatus_xpie_xie_xpp_trap_op |
Exceptions_S_cg/{cp_illegal_instruction, cp_breakpoint}, Exceptions_Sm_cg/{cp_medeleg_msu_illegalinstruction, cp_medeleg_msu_ebreak, cp_medeleg_msu_loadaccessfault}, Exceptions_U_cg/{cp_illegal_instruction, cp_breakpoint} |
|
mepc_op |
Exceptions_Sm_cg/{cp_instr_access_fault, cp_illegal_instruction, cp_breakpoint, cp_ecall_m} |
|
mcause_op |
Exceptions_Sm_cg/{cp_instr_access_fault, cp_illegal_instruction, cp_breakpoint, cp_load_access_fault} |
|
mcause_exccode_enc_img |
Exceptions_Sm_cg/{cp_instr_access_fault, cp_illegal_instruction, cp_breakpoint, cp_load_access_fault} |
|
mtvec_mode_enc |
Exceptions_Sm_cg/{cp_instr_access_fault, cp_illegal_instruction, cp_breakpoint, cp_load_access_fault} |
|
mtvec_mode_direct_op |
TODO: add a coverpoint for exceptions using mtvec direct and vectored |
|
mtvec_mode_vectored_op |
TODO: add a coverpoint for exceptions using mtvec direct and vectored |
|
trap_def_m_mode |
By default, all traps at any privilege level are handled in machine mode |
Exceptions_Sm_cg/{cp_instr_access_fault, cp_illegal_instruction, cp_breakpoint, cp_load_access_fault} |
load_exc_x0 |
TODO: currently have no cp in Exceptions_Sm that tests for load with rd = x0 |
|
misaligned_ldst_eei_dependent_behavior |
Exceptions_Sm_cg/{cp_load_address_misaligned, cp_store_address_misaligned} |
|
misaligned_ldst_hw_support |
Exceptions_Sm_cg/{cp_load_address_misaligned, cp_store_address_misaligned} |
|
misaligned_ldst_contained_or_fatal_trap |
Exceptions_Sm_cg/{cp_load_address_misaligned, cp_store_address_misaligned} |
|
ldst_atomicity_for_aligned |
naturally aligned loads and stores are guaranteed to execute atomically |
Exceptions_Sm_cg/{cp_load_address_misaligned, cp_store_address_misaligned} |
ecall_service_request_op |
The ECALL instruction is used to make a service request to the execution environment. |
Exceptions_Sm_cg/cp_ecall_m |
ecall_priv_mode_op |
Exceptions_Sm_cg/cp_ecall_m, Exceptions_U_cg/cp_ecall_u |
|
mcause_exccode_priority_order |
Exceptions_Sm_cg/{cp_misaligned_priority_load, cp_misaligned_priority_store}, Exceptions_U_cg/cp_misaligned_priority_{load, store} |
|
exc_priority |
Exceptions_Sm_cg/{cp_misaligned_priority_load, cp_misaligned_priority_store, cp_misaligned_priority_fetch} |
|
medeleg_enc_img |
Exceptions_Sm_cg/{cp_medeleg_msu_illegalinstruction, cp_medeleg_msu_ecall, cp_medeleg_msu_ebreak, cp_medeleg_msu_loadaccessfault} |
|
medeleg_enc_txt |
Exceptions_Sm_cg/{cp_medeleg_msu_illegalinstruction, cp_medeleg_msu_ecall, cp_medeleg_msu_ebreak, cp_medeleg_msu_loadaccessfault} |
|
trap_never_trans_lower |
Exceptions_Sm_cg/{cp_medeleg_msu_illegalinstruction, cp_medeleg_msu_ecall, cp_medeleg_msu_ebreak, cp_medeleg_msu_loadaccessfault} |
|
trap_horiz |
Exceptions_Sm_cg/{cp_medeleg_msu_illegalinstruction, cp_medeleg_msu_ecall, cp_medeleg_msu_ebreak, cp_medeleg_msu_loadaccessfault} |
|
pma_indep_exec_context |
Exceptions_Sm_cg/{cp_medeleg_msu_instraccessfault, cp_medeleg_msu_loadaccessfault, cp_medeleg_msu_storeaccessfault} |
|
pma_precise_recom |
Exceptions_Sm_cg/{cp_instr_access_fault, cp_load_access_fault, cp_store_access_fault} |
|
pma_imprecise_ok |
Untestable: no I/O devices defined in profile |
|
pma_mm_vs_io_def |
Descriptive spec text with no separately testable behavior |
|
pma_mm_rw |
Exceptions_Sm_cg/{cp_load_address_misaligned, cp_store_address_misaligned} |
|
pma_mm_ifetch |
Untestable: profile defines no main-memory region without instruction fetch |
|
pma_io_rwx_per_sz |
Untestable: no I/O devices defined in profile |
|
pma_vm_hw_tbl_acc |
TODO: walk a page table at RVMODEL_ACCESS_FAULT_ADDRESS_LOAD and check for an access fault |
|
pma_amo_levels |
Untestable: no I/O devices defined in profile |
|
pma_amo_far_subset_proc |
Untestable: no I/O devices defined in profile |
|
pma_amo_Zacas_levels1 |
The Zacas extension defines three additional levels of support: AMOCASW, AMOCASD, and AMOCASQ. |
Descriptive spec text with no separately testable behavior |
pma_amo_Zacas_levels2 |
Untestable: no I/O devices defined in profile |
|
pma_amo_Zabha_req |
Untestable: no I/O devices defined in profile |
|
pma_rsrv_levels |
Untestable: no I/O devices defined in profile |
|
pma_mag_exc |
Exceptions_Sm_cg/{cp_load_address_misaligned, cp_store_address_misaligned}, Exceptions_Zaamo_cg/cp_amo_address_misaligned |
|
pma_mo_io_chan_def |
Untestable: no I/O devices defined in profile |
|
pma_mo_io_chan_0 |
Untestable: no I/O devices defined in profile |
|
pma_mo_io_chan_1 |
Untestable: no I/O devices defined in profile |
|
pma_mo_io_chan_other |
Untestable: no I/O devices defined in profile |
|
pma_mo_dyn |
Systems might support dynamic configuration of ordering properties on each memory region. |
Descriptive spec text with no separately testable behavior |
pma_non_cacheable |
Untestable: no non-cacheable PMA region defined in profile |
|
pma_idp_mm |
Descriptive spec text with no separately testable behavior |
|
pma_idp_no_spec |
Untestable: no I/O devices defined in profile |
|
pma_idp_implicit_ok |
Untestable: no I/O devices defined in profile |
|
pma_idp_implicit_sz |
Untestable: no I/O devices defined in profile |
|
mtval_op |
Exceptions_Sm_cg/{cp_illegal_instruction, cp_breakpoint, cp_load_address_misaligned, cp_store_address_misaligned} |
|
mtval_ebreak_op |
Exceptions_Sm_cg/{cp_breakpoint, cp_ebreak_straddle64}, Exceptions_Zc_cg/cp_breakpoint |
|
mtval_instr_bits_lead_in |
Exceptions_Sm_cg/cp_illegal_instruction |
|
mtval_instr_bits_list |
Exceptions_Sm_cg/cp_illegal_instruction, Exceptions_Zc_cg/cp_illegal_instruction |
|
mtval_ill_instr_exc_in_low_bits |
On an illegal-instruction exception, the instruction bits are zero-extended and loaded into |
Exceptions_Sm_cg/cp_illegal_instruction, Exceptions_Zc_cg/cp_illegal_instruction |
amo_alignment |
Exceptions_Zaamo_cg/cp_amo_address_misaligned |
|
pma_mag_op_amo |
Exceptions_Zaamo_cg/cp_amo_address_misaligned |
|
misaligned_atomicity_granule_size, pma_mag_insts |
misaligned_atomicity_granule_size: The misaligned atomicity granule PMA, defined in sec:misaligned-atomicity-granule, optionally relaxes this alignment requirement. If present, the misaligned atomicity granule PMA specifies the size of a misaligned atomicity granule, a power-of-two number of bytes. The misaligned atomicity granule PMA applies only to AMOs defined in the |
Exceptions_Zaamo_cg/cp_amo_address_misaligned |
sc_retire_permission |
No SC.W instruction shall retire unless it passes memory permission checks, |
Exceptions_Zalrsc_cg/cp_store_access_fault |
sc_failed_as_store |
For the purposes of memory protection, a failed SC.W may be treated like a store. |
Exceptions_Zalrsc_cg/cp_store_access_fault |
lr_sc_alignment |
Exceptions_Zalrsc_cg/{cp_load_address_misaligned, cp_store_address_misaligned_illegal_w, cp_store_address_misaligned_illegal_d} |
|
Zca_no_misaligned |
Exceptions_Sm_cg/{cp_instr_adr_misaligned_branch, cp_instr_adr_misaligned_jal, cp_instr_adr_misaligned_jalr} |
|
Zca_illegal |
A 16-bit instruction with all bits zero is permanently reserved as an illegal instruction. |
Exceptions_Zc_cg/cp_illegal_instruction |
c-ebreak_op |
Exceptions_Zc_cg/cp_breakpoint |
|
c-jalr_ebreak |
Exceptions_Zc_cg/cp_breakpoint |
|
Zca_align16 |
Exceptions_Sm_cg/cp_ebreak_straddle64 |
|
menvcfg_cbze_op |
Exceptions_ZicboS_cg/cp_cbze, Exceptions_ZicboSm_cg/cp_cbze, Exceptions_ZicboU_cg/cp_cbze |
|
menvcfg_cbcfe_op |
Exceptions_ZicboS_cg/cp_cbcfe, Exceptions_ZicboSm_cg/cp_cbcfe, Exceptions_ZicboU_cg/cp_cbcfe |
|
menvcfg_cbie_warl_op |
Exceptions_ZicboS_cg/cp_cbie, Exceptions_ZicboSm_cg/cp_cbie, Exceptions_ZicboU_cg/cp_cbie |
|
menvcfg_cbie_cbo-inval_op_lead_in |
Exceptions_ZicboS_cg/cp_cbie, Exceptions_ZicboS_cg/cp_cbo_inval_data, Exceptions_ZicboU_cg/cp_cbie, Exceptions_ZicboU_cg/cp_cbo_inval_data |
|
menvcfg_cbie_cbo-inval_op_list |
Exceptions_ZicboS_cg/cp_cbie, Exceptions_ZicboS_cg/cp_cbo_inval_data, Exceptions_ZicboU_cg/cp_cbie, Exceptions_ZicboU_cg/cp_cbo_inval_data |
|
senvcfg_cbcfe |
Exceptions_ZicboS_cg/cp_cbcfe |
|
senvcfg_cbcfe_umode_op |
Exceptions_ZicboS_cg/cp_cbcfe |
|
senvcfg_cbie |
Exceptions_ZicboS_cg/cp_cbie, Exceptions_ZicboS_cg/cp_cbo_inval_data |
|
senvcfg_cbie_umode_op |
Exceptions_ZicboS_cg/cp_cbie |
|
cbo-inval_s_mode_enabled_op |
Exceptions_ZicboS_cg/cp_cbie, Exceptions_ZicboS_cg/cp_cbo_inval_data |
|
cbo-inval_s_mode_flush_enc |
0b01 — The instruction is executed and performs a flush operation. |
Exceptions_ZicboS_cg/cp_cbie, Exceptions_ZicboS_cg/cp_cbo_inval_data |
cbo-inval_s_mode_inval_enc |
0b11 — The instruction is executed and performs an invalidate operation. |
Exceptions_ZicboS_cg/cp_cbie, Exceptions_ZicboS_cg/cp_cbo_inval_data |
senvcfg_cbze |
The Zicboz extension adds the CBZE (Cache Block Zero instruction enable) field to senvcfg. |
Exceptions_ZicboS_cg/cp_cbze |
senvcfg_cbze_op |
The CBZE field controls execution of the cache block zero instruction (CBO.ZERO) in U-mode. |
Exceptions_ZicboS_cg/cp_cbze |
senvcfg_cbze_umode_op |
Exceptions_ZicboS_cg/cp_cbze |
|
cbxe_unaffected |
||
cbo-inval |
Exceptions_ZicboS_cg/cp_cbie, Exceptions_ZicboU_cg/cp_cbie |
|
cbo-clean_cbo-flush |
Exceptions_ZicboS_cg/cp_cbcfe, Exceptions_ZicboU_cg/cp_cbcfe |
|
cbo-zero_basedon_xenvcfg_cbze |
Exceptions_ZicboS_cg/cp_cbze, Exceptions_ZicboU_cg/cp_cbze |
|
fault_excep_csr |
Exceptions_ZicboS_cg/cp_cbo_access_fault, Exceptions_ZicboSm_cg/cp_cbo_access_fault, Exceptions_ZicboU_cg/cp_cbo_access_fault |
|
no_addr_misaligned_excep |
CMO instructions do not generate address-misaligned exceptions. |
Exceptions_ZicboS_cg/cp_cbo_address_misaligned, Exceptions_ZicboSm_cg/cp_cbo_address_misaligned, Exceptions_ZicboU_cg/cp_cbo_address_misaligned |
cbm_access |
Zicbom_cbo_clean_cg/cp_custom_cbo |
|
cbm_unperm_fault |
Exceptions_ZicboS_cg/cp_cbo_access_fault, Exceptions_ZicboSm_cg/cp_cbo_access_fault, Exceptions_ZicboU_cg/cp_cbo_access_fault |
|
cbz_access |
Zicboz_cbo_zero_cg/cp_custom_cbo |
|
cbz_unperm_fault |
Exceptions_ZicboS_cg/cp_cbo_access_fault, Exceptions_ZicboSm_cg/cp_cbo_access_fault, Exceptions_ZicboU_cg/cp_cbo_access_fault |
|
cbp_unperm_noexcep |
Exceptions_ZicboS_cg/cp_cbo_access_fault, Exceptions_ZicboSm_cg/cp_cbo_access_fault, Exceptions_ZicboU_cg/cp_cbo_access_fault |
|
cbo-zero_unaligned |
It is not required that rs1 is aligned to the size of a cache block. |
Exceptions_ZicboS_cg/{cp_cbo_access_fault, cp_cbo_address_misaligned}, Exceptions_ZicboSm_cg/{cp_cbo_access_fault, cp_cbo_address_misaligned}, Exceptions_ZicboU_cg/{cp_cbo_access_fault, cp_cbo_address_misaligned} |
cbo-flush_unaligned |
It is not required that rs1 is aligned to the size of a cache block. |
Exceptions_ZicboS_cg/{cp_cbo_access_fault, cp_cbo_address_misaligned}, Exceptions_ZicboSm_cg/{cp_cbo_access_fault, cp_cbo_address_misaligned}, Exceptions_ZicboU_cg/{cp_cbo_access_fault, cp_cbo_address_misaligned} |
cbo-inval_unaligned |
It is not required that rs1 is aligned to the size of a cache block. |
Exceptions_ZicboS_cg/{cp_cbo_access_fault, cp_cbo_address_misaligned}, Exceptions_ZicboSm_cg/{cp_cbo_access_fault, cp_cbo_address_misaligned}, Exceptions_ZicboU_cg/{cp_cbo_access_fault, cp_cbo_address_misaligned} |
hedeleg_bits_required, hedeleg_bit0_ialign32 |
hedeleg_bits_required: Many bits of hedeleg are required specifically to be writable or zero, as enumerated in norm:hedeleg_bits_acc_tbl. hedeleg_bit0_ialign32: Bit 0, corresponding to instruction address-misaligned exceptions, must be writable if IALIGN=32. |
Exceptions_H_cg/cp_hedeleg_{breakpoint, ecall, hs_u_breakpoint, hs_u_ecall, hs_u_illegal_instruction, hs_u_instr_access_fault, hs_u_instr_misaligned_jalr, hs_u_load_access_fault, hs_u_load_misaligned, hs_u_store_access_fault, hs_u_store_misaligned, illegal_instruction, instr_access_fault, instr_misaligned_jalr, load_access_fault, load_misaligned, store_access_fault, store_misaligned} |
hedeleg_op, H_trap_deleg |
hedeleg_op: A synchronous trap that has been delegated to HS-mode (using medeleg) is further delegated to VS-mode if V=1 before the trap and the corresponding hedeleg bit is set. H_trap_deleg: When a trap occurs in HS-mode or U-mode, it goes to M-mode, unless delegated by medeleg or mideleg, in which case it goes to HS-mode. When a trap occurs in VS-mode or VU-mode, it goes to M-mode, unless delegated by medeleg or mideleg, in which case it goes to HS-mode, unless further delegated by hedeleg or hideleg, in which case it goes to VS-mode. |
Exceptions_H_cg/cp_hedeleg_{breakpoint, ecall, hs_u_breakpoint, hs_u_ecall, hs_u_illegal_instruction, hs_u_instr_access_fault, hs_u_instr_misaligned_jalr, hs_u_load_access_fault, hs_u_load_misaligned, hs_u_store_access_fault, hs_u_store_misaligned, illegal_instruction, instr_access_fault, instr_misaligned_jalr, load_access_fault, load_misaligned, store_access_fault, store_misaligned}, Exceptions_HSm_cg/cp_hedeleg_{breakpoint, ecall, illegal_instruction, instr_access_fault, instr_misaligned_jalr, load_access_fault, load_misaligned, store_access_fault, store_misaligned} |
H_trap_hs_csrwrites, hstatus_spv_op, hstatus_spvp_op |
H_trap_hs_csrwrites: When a trap is taken into HS-mode, virtualization mode V is set to 0, and hstatus.SPV and sstatus.SPP are set according to norm:H_trap_hs_spv_spp_tbl. If V was 1 before the trap, field SPVP in hstatus is set the same as sstatus.SPP; otherwise, SPVP is left unchanged. A trap into HS-mode also writes field GVA in hstatus, fields SPIE and SIE in sstatus, and CSRs sepc, scause, stval, htval, and htinst. hstatus_spv_op: The SPV bit (Supervisor Previous Virtualization mode) is written by the implementation whenever a trap is taken into HS-mode. Just as the SPP bit in sstatus is set to the (nominal) privilege mode at the time of the trap, the SPV bit in hstatus is set to the value of the virtualization mode V at the time of the trap. hstatus_spvp_op: When V=1 and a trap is taken into HS-mode, bit SPVP (Supervisor Previous Virtual Privilege) is set to the nominal privilege mode at the time of the trap, the same as sstatus.SPP. But if V=0 before a trap, SPVP is left unchanged on trap entry. |
Exceptions_H_cg/cp_ecall_to_hs |
H_trap_vs_csrwrites, vstvec_sz_acc_op |
H_trap_vs_csrwrites: When a trap is taken into VS-mode, vsstatus.SPP is set according to norm:H_trap_vs_spp_tbl. Register hstatus and the HS-level sstatus are not modified, and the virtualization mode V remains 1. A trap into VS-mode also writes fields SPIE and SIE in vsstatus and writes CSRs vsepc, vscause, and vstval. vstvec_sz_acc_op: The vstvec register is a VSXLEN-bit read/write register that is VS-mode’s version of supervisor register stvec, formatted as shown in norm:vstvec_img. When V=1, vstvec substitutes for the usual stvec, so instructions that normally read or modify stvec actually access vstvec instead. When V=0, vstvec does not directly affect the behavior of the machine. |
Exceptions_H_cg/cp_ecall_to_vs, Exceptions_H_cg/cp_vstvec |
H_cause |
Exceptions_H_cg/cp_ecall_to_hs, Exceptions_H_cg/cp_virtual_instr_vs_execute_hypervisor |
|
H_cause_virtual_instruction |
Exceptions_H_cg/cp_virtual_instr_vs_{execute_hypervisor, mstatus_hgatp, mstatus_vsatp, read_vstval_htval, rv32_hedelegh, s_vma_instr, satp, sret}, Exceptions_H_cg/cp_virtual_instr_vu_{execute_h, read_stval, read_vstval_htval, rv32_hedelegh, satp, sfence_vma, sret, vsatp, wfi}, Exceptions_HSm_cg/cp_tsr_vs_sret |
|
H_virtinst_xtval |
Exceptions_H_cg/cp_virtual_instr_vs_{execute_hypervisor, mstatus_hgatp, mstatus_vsatp, read_vstval_htval, rv32_hedelegh, s_vma_instr, satp, sret}, Exceptions_H_cg/cp_virtual_instr_vu_{execute_h, read_stval, read_vstval_htval, rv32_hedelegh, satp, sfence_vma, sret, vsatp, wfi} |
|
H_virtinst_vu_vs_hinst |
in VS-mode or VU-mode, attempts to execute a hypervisor instruction (HLV, HLVX, HSV, or HFENCE); |
Exceptions_H_cg/cp_virtual_instr_vs_execute_hypervisor, Exceptions_H_cg/cp_virtual_instr_vu_execute_h |
H_virtinst_vu_vs_nonhigh_allowedhs_tvm0 |
Exceptions_H_cg/cp_virtual_instr_vs_{read_vstval_htval, mstatus_hgatp}, Exceptions_H_cg/cp_virtual_instr_vu_{read_vstval_htval, vsatp} |
|
H_virtinst_vu_vs32_high_allowedhs_tvm0 |
Exceptions_H_cg/cp_virtual_instr_{vs, vu}_rv32_hedelegh |
|
H_virtinst_vu_wfi_tw0 |
Exceptions_H_cg/cp_virtual_instr_vu_wfi |
|
H_virtinst_vu_sret_sfence |
Exceptions_H_cg/cp_virtual_instr_vu_{sret, sfence_vma} |
|
H_virtinst_vu_nonhigh_supervisor_allowedhs_tvm0 |
Exceptions_H_cg/cp_virtual_instr_vu_{read_stval, satp} |
|
H_virtinst_vs_sret_vtsr1, hstatus_vtsr_op |
H_virtinst_vs_sret_vtsr1: in VS-mode, attempts to execute SRET when hstatus.VTSR=1 hstatus_vtsr_op: When VTSR=1, an attempt in VS-mode to execute SRET raises a virtual-instruction exception. |
Exceptions_H_cg/cp_virtual_instr_vs_sret, Exceptions_HSm_cg/cp_tsr_vs_sret |
H_virtinst_vs_sfence_sinval_satp_vtvm1 |
Exceptions_H_cg/cp_virtual_instr_vs_{s_vma_instr, satp} |
|
hstatus_vtvm_op |
Exceptions_H_cg/cp_virtual_instr_vs_{s_vma_instr, satp} |
|
hlsv_virtinst |
Exceptions_H_cg/cp_virtual_instr_vs_execute_hypervisor, Exceptions_H_cg/cp_virtual_instr_vu_execute_h, Exceptions_H_cg/cp_loadstore_priv, Exceptions_H_cg/cp_priority_{hlv, hsv} |
|
hfence-vvma_hfence-gvma_exceptions |
Exceptions_H_cg/cp_virtual_instr_vs_execute_hypervisor, Exceptions_H_cg/cp_virtual_instr_vu_execute_h |
|
hstatus_hu_op |
Exceptions_H_cg/cp_loadstore_priv, Exceptions_H_cg/cp_priority_{hlv, hsv} |
|
hlsv_illegalinst |
Exceptions_H_cg/cp_loadstore_priv, Exceptions_H_cg/cp_priority_{hlv, hsv} |
|
H_exception_priority |
Exceptions_H_cg/cp_priority_{hlv, hsv}, Exceptions_HSm_cg/cp_priority_{hlv, hsv} |
|
hstatus_gva_op |
Exceptions_H_cg/cp_hstatus_gva_{hlv, hsv}, Exceptions_H_cg/cp_ecall_to_hs |
|
htval_sz_acc_op |
Exceptions_H_cg/cp_xtinst_{breakpoint, ecall, illegalinstr, instr_access, instr_misaligned, load_access, load_misaligned, store_access, store_misaligned, virtinstr} |
|
htinst_sz_acc_op |
Exceptions_H_cg/cp_xtinst_{breakpoint, ecall, illegalinstr, instr_access, instr_misaligned, load_access, load_misaligned, store_access, store_misaligned, virtinstr} |
|
H_trap_xtinst, H_trap_xtinst_exception_lead_in, H_trap_xtinst_exception_list, H_trap_xtinst_val, H_trap_xtinst_zero_ok |
H_trap_xtinst: On any trap into M-mode or HS-mode, one of these values is written automatically into the appropriate trap instruction CSR, mtinst or htinst: H_trap_xtinst_exception_lead_in: On a synchronous exception, if a nonzero value is written, one of the following shall be true about the value: H_trap_xtinst_exception_list: Bit 0 is 1, and replacing bit 1 with 1 makes the value into a valid encoding of a standard instruction. In this case, the instruction that trapped is the same kind as indicated by the register value, and the register value is the transformation of the trapping instruction, as defined later. For example, if bits 1:0 are binary 11 and the register value is the encoding of a standard LW (load word) instruction, then the trapping instruction is LW, and the register value is the transformation of the trapping LW instruction. Bit 0 is 1, and replacing bit 1 with 1 makes the value into an instruction encoding that is explicitly designated for a custom instruction (not an unused reserved encoding). This is a custom value. The instruction that trapped is a non-standard instruction. The interpretation of a custom value is not otherwise specified by this standard. The value is one of the special pseudoinstructions defined later, all of which have bits 1:0 equal to 00. H_trap_xtinst_val: norm:H_trap_xtinst_val_tbl shows the values that may be automatically written to the trap instruction register for each standard exception cause. For exceptions that prevent the fetching of an instruction, only zero or a pseudoinstruction value may be written. A custom value may be automatically written only if the instruction that traps is non-standard. A future standard or extension may permit other values to be written, chosen from the set of allowed values established earlier. H_trap_xtinst_zero_ok: Except when a pseudoinstruction value is required (described later), the value written to mtinst or htinst may always be zero, indicating that the hardware is providing no information in the register for this particular trap. |
Exceptions_H_cg/cp_xtinst_{breakpoint, ecall, illegalinstr, instr_access, instr_misaligned, load_access, load_misaligned, store_access, store_misaligned, virtinstr}, Exceptions_HSm_cg/cp_xtinst_{breakpoint, ecall, illegalinstr, instr_access, instr_misaligned, load_access, load_misaligned, store_access, store_misaligned, virtinstr} |
H_trap_m_csrwrites |
Exceptions_HSm_cg/cp_ecall_to_m, Exceptions_HSm_cg/cp_ebreak_to_m |
|
mstatus_mpv_op |
Exceptions_HSm_cg/cp_ecall_to_m, Exceptions_HSm_cg/cp_ebreak_to_m |
|
mstatus_gva_op |
Exceptions_HSm_cg/cp_ecall_to_m, Exceptions_HSm_cg/cp_ebreak_to_m, Exceptions_HSm_cg/cp_hlv_address_misaligned, Exceptions_HSm_cg/cp_hsv_access_fault |
|
hlsv_op |
Exceptions_HSm_cg/cp_{hlv_address_misaligned, hsv_address_misaligned, hlv_access_fault, hsv_access_fault} |
|
mtval2_sz_acc_op |
Exceptions_HSm_cg/cp_xtinst_{breakpoint, ecall, illegalinstr, instr_access, instr_misaligned, load_access, load_misaligned, store_access, store_misaligned, virtinstr} |
|
mtinst_sz_acc_op |
Exceptions_HSm_cg/cp_xtinst_{breakpoint, ecall, illegalinstr, instr_access, instr_misaligned, load_access, load_misaligned, store_access, store_misaligned, virtinstr} |
UDB Parameters: None.
B.2.13. Sv Virtual Memory Exceptions
The Sv suite contains the virtual-memory exception tests, in the Sv_Exceptions* groups. See Section B.7.
B.3. Interrupts
Interrupt tests are organized according to the privilege mode or extension supported. InterruptsSm boots to M-mode and exercises interrupts in every supported privilege mode; InterruptsS boots to S-mode and exercises only the interrupts visible to supervisor software. The Sstc tests check access to the stimecmp register; the timer interrupts that stimecmp generates are covered by the cp_trigger_sti_sstc and cp_write_stip_sstc coverpoints of the Interrupts tests.
B.3.1. InterruptsSm Machine-Mode Interrupts
These tests are run on any configuration with machine mode that supports interrupts.
Tests if Sm exists (not run for RVA23 certification) Boot to MMODE, run tests in each supported priv mode of <M,S,U,VS,VU> Reference model needs to know if each of the 10 types of interrupts are supported menvcfg.STCE = 0 unless otherwise stated mideleg = 0s unless otherwise stated. mtvec.MODE uses boot value RVTEST_SET_MTI_INT writes mtimecmp = 0 (with tsbi if necessary) Define ways to cause all of the interrupts that are standard as much as possible, only need RV macros for special stuff
| Step | Sm | S | U | VS | VU |
|---|---|---|---|---|---|
setup_interrupts_sm |
write mstatus.MIE = {0/1}, SIE = {0/1} |
Same as Sm |
Same as Sm |
Same as Sm |
Same as VS |
trigger_interrupts <type> |
RVTEST_SET_<type>_INT_<priv> |
Same as Sm but with priv = S |
Same as S but with priv = U |
||
Coverpoint |
mideleg<typ> = {0, 1 if UDB_<TYPE>_DELEGATION_SUPPORTED} |
Same as Sm |
Same as S |
||
Expectation |
<type> pending if UDB_<TYPE>_SUPPORTED and mideleg = 0, trap if MIE=1 |
<type> pending if UDB_<TYPE>_SUPPORTED, trap if SIE = 1 |
pending and trap if UDB_<TYPE>_SUPPORTED |
| Coverpoint | Goal | Feature Description | Expectation | Bins | Normative Rule |
|---|---|---|---|---|---|
cp_trigger |
Assert each interrupt |
For <type> = {LCOFI, MTI, MSI, MEI, STI, SSI, SEI, VSTI, VSEI, VSSI} |
supported interrupts will fire if |
10 int * 5 priv * 2 MIE * 2 SIE * 2 vecMODE * 2 mideleg |
trap_never_trans_lower |
cp_trigger_reg |
Same as cp_trigger, but use mip.SEIP, mip.SSIP, and sip.SSIP rather than macros. |
same as above |
3 int * 5 priv * 2 MIE * 2 SIE * 2 vecMODE * 2 mideleg |
mip_seip_rdcsr |
|
cp_trigger_sti_sstc |
STI with SSTC |
if SSTC_SUPPORTED: |
STI should trigger if |
5 priv * 2 STCE * 2 MIE * 2 SIE * 2 vecMODE * 2 mideleg |
mip_stip_mie_stie_op |
cp_trigger_vsti_sstc |
VSTI with Sstc |
if H_SUPPORTED and SSTC_SUPPORTED: |
VS-mode takes STI (cause 5) when hideleg.VSTI = 1; HS-mode takes VSTI (cause 6) otherwise |
2 hideleg |
hip_vstip_enable |
cp_enable |
Enables control interrupts |
mideleg = 0 (if S_SUPPORTED) |
Interrupt if mie and mip match |
10 int * 5 priv * 2 mie |
mip_mie_enc_txt |
cp_priority_mip |
Priority of pending interrupts |
mideleg = 0 (if S_SUPPORTED) |
if supported - higher priority interrupt will fire |
45 int * 5 priv |
mip_enc_img |
cp_priority_mie |
Priority of enabled interrupts |
mideleg = 0 (if S_SUPPORTED) |
if supported - higher priority enabled interrupt will fire |
45 int * 5 priv |
mie_enc_img |
cp_priority_mideleg |
Priority of delegated interrupts |
if S_SUPPORTED: |
if supported - undelegated interrupt takes priority |
21 int * 2 mideleg * 5 priv |
medeleg_mideleg_per_bit_rw |
cp_wfi |
WFI waits until timer interrupt |
Only test if machine timer interrupts are supported |
Wait for timer interrupt. MIE, SIE and TW should not affect results. |
4priv * 2 MIE + M mode * 2 MIE * 2 TW |
mstatus_tw_op |
cp_wfi_timeout |
WFI waits until timeout |
Only applies to modes < M |
Note: may need sufficient Sail parameter to determine if we get illegal instruction or if WFI just retires. Or may need to accept both behaviors. |
4 priv * 2 MIE * 2 MTIE |
mstatus_tw_warl |
cp_wfi_vs |
WFI waits in VS-mode until timer interrupt |
As cp_wfi, in VS-mode, with mstatus.TW = 0 and hstatus.VTW = 0 |
Wait for timer interrupt. mstatus.MIE does not affect results. |
2 MIE |
mstatus_tw_op |
cp_wfi_timeout_vs |
WFI in VS-mode follows mstatus.TW and hstatus.VTW |
As cp_wfi_timeout, in VS-mode, with (mstatus.TW, hstatus.VTW) = (1, 0), (1, 1), (0, 1) |
TW = 1 raises illegal instruction. TW = 0, VTW = 1 raises virtual instruction. Either may instead complete within a bounded time. |
3 TW/VTW * 2 MIE * 2 mie.MTIE |
mstatus_tw_op |
cp_wfi_vs_tw_vtw |
WFI in VS-mode with every mstatus.TW and hstatus.VTW |
The full cross of mstatus.TW and hstatus.VTW for VS-mode WFI with MIE = {0/1}: the waiting WFI of cp_wfi_vs (TW = VTW = 0) and the trapping WFIs of cp_wfi_timeout_vs and cp_wfi_timeout_vs_vtw_one. |
As cp_wfi_vs, cp_wfi_timeout_vs and cp_wfi_timeout_vs_vtw_one |
2 TW * 2 VTW * 2 MIE |
mstatus_tw_op |
cp_wfi_timeout_vu |
WFI in VU-mode follows mstatus.TW, not hstatus.VTW |
As cp_wfi_timeout, in VU-mode, with mstatus.TW = {0/1} and hstatus.VTW = {0/1} |
TW = 1 raises illegal instruction (or completes within a bounded time). TW = 0 raises virtual instruction whatever VTW is. |
2 TW * 2 VTW * 2 MIE * 2 mie.MTIE |
mstatus_tw_op |
cp_write_stip_sstc |
test STIP writability when SSTC supported |
if SSTC_SUPPORTED: |
mip.STIP is controlled by stimecmp, ignores writes. |
2 stimecmp x 2 STIP |
menvcfg_stce_enable_op |
| Normative Rule | Rule Text | Coverpoints |
|---|---|---|
mepc_op |
InterruptsSm_cg/{cp_trigger, cp_trigger_tsbi} |
|
mcause_op |
InterruptsSm_cg/{cp_trigger, cp_trigger_tsbi} |
|
mcause_intr_op |
The Interrupt bit in the mcause register is set if the trap was caused by an interrupt. |
InterruptsSm_cg/{cp_trigger, cp_trigger_tsbi} |
mcause_exccode_op |
The Exception Code field contains a code identifying the last exception or interrupt. |
InterruptsSm_cg/{cp_trigger, cp_trigger_tsbi} |
mcause_exccode_enc_img |
InterruptsSm_cg/{cp_trigger, cp_trigger_tsbi} |
|
trap_def_m_mode |
By default, all traps at any privilege level are handled in machine mode |
InterruptsSm_cg/{cp_trigger, cp_trigger_tsbi} |
mtvec_mode_enc |
InterruptsSm_cg/cp_trigger |
|
mtvec_mode_direct_op |
InterruptsSm_cg/{cp_trigger, cp_trigger_tsbi} |
|
mtvec_mode_vectored_op |
InterruptsSm_cg/{cp_trigger, cp_trigger_tsbi} |
|
mstatus_mie_sie_exist |
Global interrupt-enable bits, |
InterruptsSm_cg/cp_trigger |
mstatus_mie_sie_op |
InterruptsSm_cg/{cp_trigger, cp_wfi_m} |
|
mstatus_xie_intr_en_dis |
InterruptsSm_cg/{cp_trigger, cp_trigger_tsbi} |
|
mstatus_xpie_xpp_op |
InterruptsSm_cg/{cp_trigger, cp_trigger_tsbi} |
|
mstatus_xpie_xie_xpp_trap_op |
InterruptsSm_cg/{cp_trigger, cp_trigger_tsbi} |
|
mstatus_tw_warl |
The |
InterruptsSm_cg/{cp_wfi_m, cp_wfi_timeout} |
mstatus_tw_op |
InterruptsSm_cg/{cp_wfi, cp_wfi_vs, cp_wfi_timeout, cp_wfi_timeout_vs, cp_wfi_timeout_vu, cp_wfi_vs_tw_vtw} |
|
hstatus_vtw_op, H_virtinst_wfi_vtw1_tw0, vtw_virtinstr |
hstatus_vtw_op: When VTW=1 (and assuming mstatus.TW=0), an attempt in VS-mode to execute WFI raises a virtual-instruction exception if the WFI does not complete within an implementation-specific, bounded time limit. H_virtinst_wfi_vtw1_tw0: in VS-mode, attempts to execute WFI when hstatus.VTW=1 and mstatus.TW=0, unless the instruction completes within an implementation-specific, bounded time; vtw_virtinstr: An implementation may have WFI always raise a virtual-instruction exception in VS-mode when VTW=1 (and mstatus.TW=0), even if there are pending globally-disabled interrupts when the instruction is executed. |
InterruptsSm_cg/{cp_wfi_vs, cp_wfi_timeout_vs, cp_wfi_timeout_vs_vtw_one, cp_wfi_vs_tw_vtw} |
H_virtinst_vu_wfi_tw0 |
InterruptsSm_cg/cp_wfi_timeout_vu |
|
mstatus_tw_umode_op |
InterruptsSm_cg/{cp_wfi_timeout, cp_wfi_timeout_tw_zero} |
|
mstatus_tw_always_illegal |
Not tested: permission; no test executes WFI below M-mode with TW=1 while an interrupt is pending, so both behaviors pass |
|
mip_mie_enc_txt |
InterruptsSm_cg/{cp_trigger, cp_enable_one} |
|
mip_enc_img |
InterruptsSm_cg/{cp_trigger, cp_priority_mip} |
|
mie_enc_img |
InterruptsSm_cg/{cp_enable_one, cp_priority_mie} |
|
mip_mie_std_enc_txt |
InterruptsSm_cg/{cp_trigger, cp_enable_one} |
|
mip_std_enc_img |
InterruptsSm_cg/{cp_trigger, cp_priority_mip} |
|
mie_std_enc_img |
InterruptsSm_cg/{cp_enable_one, cp_priority_mie} |
|
mideleg_enc_img |
InterruptsSm_cg/cp_trigger, InterruptsSm_cg/cp_priority_mideleg |
|
mideleg_enc_txt |
InterruptsSm_cg/cp_trigger, InterruptsSm_cg/cp_priority_mideleg |
|
mip_bits_rdonly_op |
InterruptsSm_cg/cp_trigger |
|
mip_bits_wr_op |
When bit i in |
InterruptsSm_cg/{cp_trigger_reg_mip_ssip, cp_trigger_reg_mip_seip} |
mip_meip_mie_meie_op |
InterruptsSm_cg/{cp_trigger, cp_enable_one, cp_enable_zero} |
|
mip_meip_rdonly |
|
Sm_mcsr_cg/cp_mcsrwalk/mip, InterruptsSm_cg/cp_trigger |
mip_mtip_mie_mtie_op |
InterruptsSm_cg/{cp_trigger, cp_enable_one, cp_enable_zero} |
|
mip_mtip_rdonly |
Sm_mcsr_cg/cp_mcsrwalk/mip, InterruptsSm_cg/cp_trigger |
|
mip_msip_mie_msie_op |
InterruptsSm_cg/{cp_trigger, cp_enable_one, cp_enable_zero} |
|
mip_msip_rdonly |
Sm_mcsr_cg/cp_mcsrwalk/mip, Sm_mcsr_cg/cp_msip, InterruptsSm_cg/cp_trigger |
|
msip_sz_acc |
A hart’s memory-mapped |
Sm_mcsr_cg/cp_msip, InterruptsSm_cg/cp_trigger |
msip_enc |
bits 31‍–‍1 read as zero and bit 0 contains the |
Sm_mcsr_cg/cp_msip |
msip_update_max_time |
Sm_mcsr_cg/cp_msip, InterruptsSm_cg/cp_trigger |
|
mtime_intr_pending |
InterruptsSm_cg/{cp_trigger, cp_wfi_m} |
|
mtime_intr_taken |
InterruptsSm_cg/{cp_trigger, cp_enable_zero, cp_wfi_m} |
|
mtime_intr_mtip_visibility |
InterruptsSm_cg/{cp_trigger, cp_wfi_m} |
|
mip_seip_mie_seie_op |
InterruptsSm_cg/{cp_trigger, cp_trigger_reg_mip_seip, cp_enable_one} |
|
mip_seip_acc |
InterruptsSm_cg/cp_trigger_reg_mip_seip |
|
mip_seip_rdcsr |
InterruptsSm_cg/cp_trigger_reg |
|
mip_seip_wrcsr |
InterruptsSm_cg/cp_trigger_reg |
|
intr_sei_op |
InterruptsSm_cg/{cp_trigger, cp_trigger_reg_mip_seip} |
|
mip_stip_mie_stie_op |
InterruptsSm_cg/{cp_trigger, cp_trigger_sti_sstc, cp_enable_one} |
|
mip_stip_no_stimecmp_acc, mip_stip_no_stimecmp_mmode_write |
mip_stip_no_stimecmp_acc: If the |
InterruptsSm_cg/cp_trigger |
mip_stip_stimecmp_acc |
If the |
InterruptsSm_cg/{cp_write_stip_sstc_csrrs, cp_write_stip_sstc_csrrc} |
mip_stip_reflects_stimecmp, mip_stip_stimecmp_clr |
mip_stip_reflects_stimecmp: reflects the supervisor-level timer interrupt signal resulting from |
InterruptsSm_cg/{cp_trigger_sti_sstc, cp_trigger_sti_sstc_tsbi} |
mip_ssip_mie_ssie_op |
InterruptsSm_cg/{cp_trigger, cp_trigger_reg_mip_ssip, cp_enable_one} |
|
mip_ssip_acc |
InterruptsSm_cg/{cp_trigger_reg_mip_ssip, cp_trigger_reg_sip_ssip} |
|
mip_ssip_intr_ctrl |
may also be set to 1 by a platform-specific interrupt controller. |
InterruptsSm_cg/cp_trigger |
intr_mip_mie_op |
InterruptsSm_cg/{cp_trigger, cp_enable_one, cp_enable_zero, cp_priority_mideleg} |
|
intr_mip_mie_bounded_time |
InterruptsSm_cg/{cp_trigger, cp_wfi_m} |
|
intr_mip_mie_xret_csrwr |
InterruptsSm_cg/{cp_trigger_tsbi, cp_trigger_reg_mip_ssip, cp_trigger_reg_mip_seip, cp_enable_one_tsbi} |
|
intr_m_mode_pri |
InterruptsSm_cg/{cp_priority_mip, cp_priority_mie, cp_priority_mip_tsbi, cp_priority_mie_tsbi} |
|
trap_del_intr_priv_lvl |
InterruptsSm_cg/cp_trigger, InterruptsSm_cg/cp_priority_mideleg |
|
intr_m_mode_highest_pri |
Interrupts to M-mode take priority over any interrupts to lower privilege modes. |
InterruptsSm_cg/{cp_priority_mideleg, cp_priority_mideleg_tsbi} |
wfi_op |
InterruptsSm_cg/{cp_wfi_m, cp_wfi} |
|
wfi_enc_img |
InterruptsSm_cg/cp_wfi_m |
|
wfi_all_privileged_modes |
InterruptsSm_cg/{cp_wfi_m, cp_wfi} |
|
wfi_opt_u_mode |
InterruptsSm_cg/{cp_wfi, cp_wfi_timeout_tw_zero} |
|
wfi_ill_exc |
InterruptsSm_cg/cp_wfi_timeout |
|
wfi_mepc_val |
InterruptsSm_cg/{cp_wfi_m, cp_wfi} |
|
wfi_resume_reason |
InterruptsSm_cg/{cp_wfi_m, cp_wfi} |
|
wfi_intr_dis |
The WFI instruction can also be executed when interrupts are disabled. |
InterruptsSm_cg/cp_wfi_m |
wfi_unaffected_conditions |
InterruptsSm_cg/{cp_wfi_m, cp_wfi}, S_Zicntr_cg/{cp_instret_wfi_pending, cp_instret_wfi_wake} |
|
wfi_resume_any_priv |
InterruptsSm_cg/{cp_wfi_m, cp_wfi} |
|
wfi_no_intr_pc |
InterruptsSm_cg/cp_wfi_m, S_Zicntr_cg/{cp_instret_wfi_pending, cp_instret_wfi_wake} |
| Parameter | Description | Coverpoint | Effect |
|---|---|---|---|
MTVEC_ACCESS |
Options: ro::
rw::
|
all exception coverpoints |
If 'ro', tests cannot set |
MTVEC_BASE_ALIGNMENT_DIRECT |
Minimum alignment of the base pointer. Because |
all exception coverpoints |
Trap handler is aligned to the appropriate boundary |
MTVEC_BASE_ALIGNMENT_VECTORED |
Because |
all |
Trap handler is aligned to the appropriate boundary |
MTVEC_ILLEGAL_WRITE_BEHAVIOR |
Options: retain::
When either custom::
When either Other values may be added over time once other common behaviors are identified. |
all |
If |
MTVEC_MODES |
Options: 0::
Direct; All traps set If only one mode is given, |
TODO |
If direct or vectored are not supported, tests relying on those modes will not operate TODO should not be run |
TODO: coverpoints will need to ignore bins with mie.msie nonzero: # If a system has only one hart, or if a platform standard supports the delivery # of machine-level interprocessor interrupts through external interrupts (MEI) # instead, then mip.MSIP and mie.MSIE may both be read-only zeros. - name: mip_msip_mie_msie_maybe_rdonly0 TODO: mip.MSIP update time # When the memory-mapped msip register changes, it is guaranteed to be reflected # in mip.MSIP eventually, but not necessarily immediately. - name: msip_update_max_time
B.3.2. InterruptsS Supervisor-Mode Interrupts
These tests are run on any configuration with supervisor mode that supports interrupts. They boot to S-mode and also run in U-mode (and VS/VU-mode when the H extension is supported); mideleg keeps its boot value with all supervisor-level interrupts delegated.
Tests run if S exists (and don’t use MTI/MSI/MEI that are outside supervisor-mode spec) Boot to SMODE, run tests in each supported priv mode of <S,U,VS,VU> Reference model needs to know if each of the types of interrupts are supported menvcfg.STCE = 0 unless otherwise stated mideleg boots with 1s below M-mode and does not change stvec.MODE uses boot value RVTEST_SET_MTI_INT writes mtimecmp = 0 (with tsbi if necessary) Define ways to cause all of the interrupts that are standard as much as possible, only need RV macros for special stuff
| Step | S | U | VS | VU |
|---|---|---|---|---|
setup_interrupts_s |
mideleg boots with all non-M interrupts delegated |
Same as S |
Same as S, and also write hie = 1s |
Same as VS |
trigger_interrupts <type> |
RVTEST_SET_<type>_INT |
Same as but with priv = U |
||
Coverpoint |
mideleg<typ> = 1 if UDB_<TYPE>_DELEGATION_SUPPORTED |
Same as S |
||
Expectation |
<type> pending if UDB_<TYPE>_SUPPORTED, trap if SIE = 1 |
pending and trap if UDB_<TYPE>_SUPPORTED |
| Coverpoint | Goal | Feature Description | Expectation | Bins | Normative Rule |
|---|---|---|---|---|---|
cp_trigger |
Assert each interrupt |
For <type> = {LCOFI, STI, SSI, SEI, VSTI, VSEI, VSSI} |
in S mode, supported interrupt will fire if SIE = 1 |
4 priv * 7 int * 2 SIE * 2 vecMODE |
trap_del_s_mode_op |
cp_trigger_reg |
Same as cp_trigger, but use mip.SEIP, mip.SSIP, and sip.SSIP rather than macros. |
same as above |
4 priv * 3 int * 2 SIE * 2 vecMODE |
mip_bits_wr_op |
|
cp_trigger_sti_sstc |
STI with SSTC |
if SSTC_SUPPORTED: |
STI trigger if |
4 priv * 2 STCE * 2 SIE * 2 vecMODE |
mip_stip_mie_stie_op |
cp_trigger_vsti_sstc |
VSTI with Sstc |
if H_SUPPORTED and SSTC_SUPPORTED: |
HS-mode takes VSTI (cause 6) when hideleg.VSTI = 0; VS-mode takes STI (cause 5) when hideleg.VSTI = 1 |
2 hideleg |
hip_vstip_enable |
cp_trigger_vsti_sstc_vs |
VS-mode sets its own timer |
if H_SUPPORTED and SSTC_SUPPORTED: |
HS-mode takes VSTI (cause 6) when hideleg.VSTI = 0; VS-mode takes STI (cause 5) when hideleg.VSTI = 1 |
2 hideleg |
hip_vstip_enable |
cp_trigger_vsti_sstc_tsbi |
VSTI with Sstc in U-mode and VU-mode |
if H_SUPPORTED and SSTC_SUPPORTED: |
HS-mode takes VSTI (cause 6) on entry when hideleg.VSTI = 0. When hideleg.VSTI = 1, VS-mode takes STI (cause 5) on entry to VU-mode, and U-mode does not take it |
2 modes (U, VU) * 2 hideleg |
hip_vstip_enable |
cp_enable |
Enables control interrupts |
write sstatus.SIE = 1 |
Interrupt if sie and sip match |
4 priv * 2 sie * 7 int |
mip_mie_enc_txt |
cp_priority_sip |
Priority of pending interrupts |
write sstatus.SIE = 1 |
highest priority pending interrupt will fire |
21 int * 4 priv |
mip_mie_enc_txt |
cp_priority_sie |
Priority of enabled interrupts |
write sstatus.SIE = 1 |
highest priority enabled interrupt will fire |
21 int * 4 priv |
mip_mie_enc_txt |
cp_wfi |
WFI waits until timer interrupt |
Do not test in U mode. |
Wait for timer interrupt. MIE and SIE not affect results. |
4 priv * 2 SIE |
mstatus_tw_op |
cp_wfi_timeout |
WFI waits until timeout |
write mstatus.TW = 1 (also 0 in U-mode if S_SUPPORTED) |
mstatus_tw_op |
||
cp_wfi_vs |
WFI waits in VS-mode until timer interrupt |
As cp_wfi, in VS-mode, with mstatus.TW = 0 and hstatus.VTW = 0 |
Wait for timer interrupt. sstatus.SIE does not affect results. |
2 SIE |
mstatus_tw_op |
cp_wfi_timeout_vs |
WFI in VS-mode follows mstatus.TW and hstatus.VTW |
As cp_wfi_timeout, in VS-mode, with (mstatus.TW, hstatus.VTW) = (1, 0), (1, 1), (0, 1) |
TW = 1 raises illegal instruction. TW = 0, VTW = 1 raises virtual instruction. Either may instead complete within a bounded time. |
3 TW/VTW * 2 SIE * 2 sie.STIE |
mstatus_tw_op |
cp_wfi_vs_tw_vtw |
WFI in VS-mode with every mstatus.TW and hstatus.VTW |
The full cross of mstatus.TW and hstatus.VTW for VS-mode WFI with SIE = {0/1}: the waiting WFI of cp_wfi_vs (TW = VTW = 0) and the trapping WFIs of cp_wfi_timeout_vs and cp_wfi_timeout_vs_vtw_one. Needs Sstc, as cp_wfi_vs does. |
As cp_wfi_vs, cp_wfi_timeout_vs and cp_wfi_timeout_vs_vtw_one |
2 TW * 2 VTW * 2 SIE |
mstatus_tw_op |
cp_wfi_timeout_vu |
WFI in VU-mode follows mstatus.TW, not hstatus.VTW |
As cp_wfi_timeout, in VU-mode, with mstatus.TW = {0/1} and hstatus.VTW = {0/1} |
TW = 1 raises illegal instruction (or completes within a bounded time). TW = 0 raises virtual instruction whatever VTW is. |
2 TW * 2 VTW * 2 SIE * 2 sie.STIE |
mstatus_tw_op |
| Normative Rule | Rule Text | Coverpoints |
|---|---|---|
trap_del_s_mode_op |
InterruptsS_cg/cp_trigger |
|
medeleg_mideleg_per_bit_rw |
InterruptsS_cg/cp_trigger, InterruptsSm_cg/cp_priority_mideleg |
|
medeleg_mideleg_delegate_op |
InterruptsS_cg/cp_trigger, InterruptsSm_cg/cp_priority_mideleg |
|
mideleg_enc_img |
InterruptsS_cg/cp_trigger, InterruptsSm_cg/cp_priority_mideleg |
|
mideleg_enc_txt |
InterruptsS_cg/cp_trigger, InterruptsSm_cg/cp_priority_mideleg |
|
mstatus_mie_sie_exist |
Global interrupt-enable bits, |
InterruptsS_cg/cp_trigger |
mstatus_mie_sie_op |
InterruptsS_cg/cp_trigger |
|
mstatus_xie_intr_en_dis |
InterruptsS_cg/cp_trigger |
|
mstatus_xpie_xpp_op |
InterruptsS_cg/cp_trigger |
|
mstatus_xpie_xie_xpp_trap_op |
InterruptsS_cg/cp_trigger |
|
mstatus_tw_op |
InterruptsS_cg/{cp_wfi, cp_wfi_vs, cp_wfi_timeout, cp_wfi_timeout_vs, cp_wfi_timeout_vu, cp_wfi_vs_tw_vtw} |
|
hstatus_vtw_op, H_virtinst_wfi_vtw1_tw0, vtw_virtinstr |
hstatus_vtw_op: When VTW=1 (and assuming mstatus.TW=0), an attempt in VS-mode to execute WFI raises a virtual-instruction exception if the WFI does not complete within an implementation-specific, bounded time limit. H_virtinst_wfi_vtw1_tw0: in VS-mode, attempts to execute WFI when hstatus.VTW=1 and mstatus.TW=0, unless the instruction completes within an implementation-specific, bounded time; vtw_virtinstr: An implementation may have WFI always raise a virtual-instruction exception in VS-mode when VTW=1 (and mstatus.TW=0), even if there are pending globally-disabled interrupts when the instruction is executed. |
InterruptsS_cg/{cp_wfi_vs, cp_wfi_timeout_vs, cp_wfi_timeout_vs_vtw_one, cp_wfi_vs_tw_vtw} |
H_virtinst_vu_wfi_tw0 |
InterruptsS_cg/cp_wfi_timeout_vu |
|
mstatus_tw_umode_op |
InterruptsS_cg/cp_wfi_timeout |
|
mstatus_tw_always_illegal |
InterruptsS_cg/cp_wfi_timeout |
|
mip_mie_enc_txt |
InterruptsS_cg/{cp_enable_one, cp_priority_sip, cp_priority_sie} |
|
mip_enc_img |
InterruptsS_cg/{cp_enable_one, cp_priority_sip, cp_priority_sie} |
|
mip_bits_wr_op |
When bit i in |
InterruptsS_cg/{cp_trigger_reg_mip_ssip, cp_trigger_reg_mip_seip} |
intr_mip_mie_op |
InterruptsS_cg/{cp_trigger, cp_enable_one, cp_enable_zero} |
|
intr_mip_mie_xret_csrwr |
InterruptsS_cg/{cp_trigger_tsbi, cp_enable_one_tsbi, cp_priority_sie} |
|
intr_m_mode_highest_pri |
Interrupts to M-mode take priority over any interrupts to lower privilege modes. |
InterruptsSm_cg/cp_priority_mideleg |
intr_sei_op |
InterruptsS_cg/{cp_trigger, cp_trigger_reg_mip_seip} |
|
trap_never_trans_lower |
InterruptsSm_cg/cp_trigger |
|
trap_horiz |
InterruptsS_cg/cp_trigger |
|
trap_del_intr_priv_lvl |
InterruptsSm_cg/cp_trigger, InterruptsSm_cg/cp_priority_mideleg |
|
mip_seip_mie_seie_op |
InterruptsS_cg/{cp_trigger, cp_enable_one} |
|
mip_seip_acc |
InterruptsS_cg/cp_trigger_reg_mip_seip |
|
mip_seip_rdcsr |
TODO: read mip while software SEIP is clear and the interrupt controller asserts SEI |
|
mip_seip_wrcsr |
TODO: csrrs/csrrc mip with the SEIP bit clear in rs1 while the interrupt controller asserts SEI |
|
mip_stip_no_stimecmp_acc |
If the |
InterruptsS_cg/cp_trigger |
mip_stip_mie_stie_op |
InterruptsS_cg/{cp_trigger, cp_trigger_sti_sstc, cp_enable_one_tsbi} |
|
mip_stip_no_stimecmp_mmode_write |
may be written by M-mode software to deliver timer interrupts to S-mode. |
InterruptsS_cg/cp_trigger |
mip_stip_reflects_stimecmp |
reflects the supervisor-level timer interrupt signal resulting from |
InterruptsS_cg/cp_trigger_sti_sstc |
mip_stip_stimecmp_clr |
InterruptsS_cg/cp_trigger_sti_sstc, InterruptsS_cg/cp_wfi |
|
mip_ssip_acc |
InterruptsS_cg/cp_trigger_reg_mip_ssip |
|
mip_ssip_mie_ssie_op |
InterruptsS_cg/{cp_trigger, cp_enable_one} |
|
mip_ssip_intr_ctrl |
may also be set to 1 by a platform-specific interrupt controller. |
InterruptsS_cg/{cp_trigger_reg_mip_ssip, cp_trigger} |
sstatus_spp |
InterruptsS_cg/cp_trigger |
| Parameter | Description | Coverpoint | Effect |
|---|---|---|---|
STVEC_MODES |
Options: 0::
Direct; All traps set If only one mode is given, |
TODO |
If direct or vectored are not supported, tests relying on those modes will not operate TODO should not be run |
STVEC_BASE_ALIGNMENT_VECTORED |
Minimum alignment of the base pointer when |
all |
Trap handler is aligned to the appropriate boundary |
B.3.3. Sstc Supervisor Timer Compare
The Sstc suite has one covergroup per group of tests: Sstc_Sm_cg (M-mode), Sstc_cg (S-mode and U-mode), and, with the hypervisor extension, Sstc_HSm_cg (M-mode) and Sstc_H_cg (HS, VS, VU and U modes). The Sstc_Sm and Sstc_HSm tests require Sm, so they are not part of a certificate without Sm, such as RVA23. The Sstc suite takes no interrupts: timer interrupts raised through stimecmp and vstimecmp are tested by cp_trigger_sti_sstc and cp_trigger_vsti_sstc in InterruptsS and InterruptsSm.
Sstc Supervisor-Mode Supervisor Timer Compare
These tests are run on any configuration with supervisor mode when the Sstc supervisor timer compare extension is supported.
-
for RV32, also access stimcmph Boot to S-mode. Run S and U-mode tests.
| Coverpoint | Goal | Feature Description | Expectation | Pass/Fail Criteria | Normative Rule | Status | Coverage |
|---|---|---|---|---|---|---|---|
In supervisor mode |
|||||||
cp_supervisor_tm |
Access stimecmp |
Read stimecmp with mcounteren.TM = {0/1} for RV32, also access stimcmph |
stimecmp only readable in supervisor mode if mcounteren.TM = 1 |
Check against RM |
stimecmp_exist |
To be Done |
Uncovered |
cp_supervisor_stce |
Access stimecmp |
Read stimecmp with menvcfg.stce (menvcfgh in RV32) = {0/1} for RV32, also access stimcmph |
stimecmp only readable in supervisor mode if menvcfg.STCE = 1 |
Check against RM |
stimecmp_exist |
To be Done |
Uncovered |
In user mode |
|||||||
cp_user_tm |
Access stimecmp |
Read stimecmp with mcounteren.TM = {0/1} * scounteren.TM = {0/1} (if S_SUPPORTED) for RV32, also access stimcmph |
stimecmp never readable in user mode |
Check against RM |
To be Done |
Uncovered |
|
cp_user_stce |
Access stimecmp |
Read stimecmp with menvcfg.stce (menvcfgh in RV32) = {0/1} for RV32, also access stimcmph |
stimecmp never readable in user mode (too little privilege) |
Check against RM |
stce_bit_exist |
To be Done |
Uncovered |
Sstc_Sm Machine-Mode Supervisor Timer Compare
These tests are run on any configuration with machine mode when the Sstc supervisor timer compare extension is supported.
-
for RV32, also access stimcmph
| Coverpoint | Goal | Feature Description | Expectation | Pass/Fail Criteria | Normative Rule | Status | Coverage |
|---|---|---|---|---|---|---|---|
In machine mode |
|||||||
cp_machine_tm |
Access stimecmp |
Read stimecmp with mcounteren.TM = {0/1} * for RV32, also access stimcmph |
stimecmp always readable in machine mode |
Check against RM |
To be Done |
Uncovered |
|
cp_machine_stce |
Access stimecmp |
Read stimecmp with menvcfg.stce (menvcfgh in RV32) = {0/1} * for RV32, also access stimcmph |
stimecmp always readable in machine mode |
Check against RM |
menvcfg_stce_enable_op |
To be Done |
Uncovered |
Sstc_H Hypervisor Timer Compare
These tests are run on any configuration with the hypervisor extension when the Sstc supervisor timer compare extension is supported. They check vstimecmp and stimecmp access from HS, VS, VU and U modes, and from HS-mode hip.VSTIP as hvip.VSTIP OR the vstimecmp comparison with each menvcfg.STCE and henvcfg.STCE, and htimedelta (including 64-bit wrap).
The suite boots to HS-mode and writes menvcfg and mcounteren through T-SBI. An access that menvcfg.STCE or mcounteren.TM forbids raises illegal instruction; one that only henvcfg.STCE or hcounteren.TM forbids raises virtual instruction. henvcfg.STCE = 1 with menvcfg.STCE = 0 is skipped in every cross because henvcfg.STCE is read-only zero then. time has no reset value, so a check whose result depends on time compares hip.VSTIP with the comparison computed from a read of time, after waiting RVMODEL_INTERRUPT_LATENCY for a change of the comparison to reach hip.VSTIP. Sstc_HSm repeats cp_vstip and cp_htimedelta from M-mode and adds the M-mode vstimecmp accesses. H cp_hcsrwalk walks vstimecmp and vstimecmph.
| Coverpoint | Goal | Feature Description | Expectation | Bins | Normative Rule | Status | Notes |
|---|---|---|---|---|---|---|---|
In HS-Mode |
|||||||
cp_hs_vstimecmp_accessible |
TM and STCE control access depending on priv level |
With cross of menvcfg.STCE = {0/1}, henvcfg.STCE = {0/1} mcounteren.TM = {0/1}, hcounteren.TM = {0/1} read vstimecmp. For RV32, also vstimecmph |
illegal instruction if menvcfg.STCE = 0 or mcounteren.TM = 0 |
3 STCE * 2 mTM * 2 hTM * up to 2 regs |
menvcfg_stce_zero_op |
||
cp_hs_vstimecmp_accesses |
All types of access |
With cross of menvcfg.STCE = 1, henvcfg.STCE = 0 mcounteren.TM = 1, hcounteren.TM = 0, read/write (0s,1s)/set/clear vstimecmp. For RV32, also vstimecmph |
success |
5 accesses * up to 2 regs |
mcounteren_tm_set |
||
cp_vstip |
OR of vstimecmp and hvip |
Cross of menvcfg.STCE = {0/1}, henvcfg.STCE = {0/1}, hvip.VSTIP = {0/1}, htimedelta = 0, vstimecmp = {0, all 1s}. Check hip.VSTIP. henvcfg.STCE = 1 with menvcfg.STCE = 0 is skipped because henvcfg.STCE is read-only zero then. For RV32, htimedeltah and vstimecmph are also written. |
If both STCE = 1 and vstimecmp = 0, hip.VSTIP = 1. Else hip.VSTIP = hvip.VSTIP. |
3 STCE * 2 hvip * 2 vstimecmp |
menvcfg_stce_zero_op |
||
cp_htimedelta |
htimedelta affects vstimecmp |
menvcfg.STCE = 1, henvcfg.STCE = 1, hvip.VSTIP = 0, htimedelta = {0, 2^30, 2^32-1, 2^60, -1, -2^30, -2^60}, vstimecmp = {0, 2^29, 2^31, 2^61, -2^29, -2^31, -2^61}. Check hip.VSTIP against the value computed from a read of time. For RV32, htimedeltah and vstimecmph are involved; htimedelta = 2^32-1 exercises the carry into the high half and -1 the 64-bit wrap. |
hip.VSTIP = ((time + htimedelta) mod 2^64 >= vstimecmp), unsigned |
7 htimedelta * 7 vstimecmp |
hip_vstip_op |
||
In VS-Mode |
|||||||
cp_vs_stimecmp_accessible |
TM and STCE control access depending on priv level |
Put different values in stimecmp and vstimecmp. With cross of menvcfg.STCE = {0/1}, henvcfg.STCE = {0/1} mcounteren.TM = {0/1}, hcounteren.TM = {0/1} read stimecmp (not vstimecmp). For RV32, also stimecmph |
illegal instruction if menvcfg.STCE = 0 or mcounteren.TM = 0. virtual instruction trap if menvcfg.STCE = mcounteren.TM = 1 but henvcfg.STCE = 0 or hcounteren.TM = 0. Otherwise the read returns vstimecmp. |
3 STCE * 2 mTM * 2 hTM * up to 2 regs |
stce_bit_exist |
||
cp_vs_stimecmp_accesses |
All types of access |
Put different values in stimecmp and vstimecmp before entering VS-mode. With cross of menvcfg.STCE = 1, henvcfg.STCE = 1 mcounteren.TM = 1, hcounteren.TM = 1, read/write (0s,1s)/set/clear stimecmp. For RV32, also stimecmph. Then write stimecmp and check from HS-mode that the writes are reflected in vstimecmp/vstimecmph but not stimecmp/h. |
Changes should show up in vstimecmp/h |
5 accesses * up to 2 regs, and the HS-mode check |
mcounteren_tm_set |
||
cp_vs_vstimecmp_inaccessible |
With cross of menvcfg.STCE = {0/1}, henvcfg.STCE = {0/1} mcounteren.TM = {0/1}, hcounteren.TM = {0/1} read vstimecmp. For RV32, also vstimecmph |
Illegal instruction when HS-mode could not access it (menvcfg.STCE = 0 or mcounteren.TM = 0), else virtual instruction |
3 STCE * 2 mTM * 2 hTM * up to 2 regs |
H_vscsrs_acc_vs |
|||
In VU-Mode |
|||||||
cp_vu_timecmp_inaccessible |
With cross of menvcfg.STCE = {0/1}, henvcfg.STCE = {0/1} mcounteren.TM = {0/1}, hcounteren.TM = {0/1} read stimecmp, vstimecmp. For RV32, also stimecmph, vstimecmph |
Illegal instruction when HS-mode could not access them (menvcfg.STCE = 0 or mcounteren.TM = 0), else virtual instruction |
3 STCE * 2 mTM * 2 hTM * up to 4 regs |
menvcfg_stce_zero_op |
|||
In U-Mode |
|||||||
cp_u_timecmp_inaccessible |
With cross of menvcfg.STCE = {0/1}, henvcfg.STCE = {0/1} mcounteren.TM = {0/1}, hcounteren.TM = {0/1} read stimecmp, vstimecmp. For RV32, also stimecmph, vstimecmph |
Illegal instruction trap |
3 STCE * 2 mTM * 2 hTM * up to 4 regs |
H_vscsrs_acc_u |
|||
Without Sstc |
|||||||
henvcfg.STCE is read-only zero when Sstc is not implemented |
On an H implementation without Sstc, write henvcfg.STCE = 1 and read it |
henvcfg.STCE reads 0 |
henvcfg_stce_rdonly0 |
Not tested |
Sstc_H requires Sstc, and every configuration with H also implements Sstc. |
||
Sstc_HSm Machine-Mode Hypervisor Timer Compare
These tests are run on any configuration with machine mode and the hypervisor extension when the Sstc supervisor timer compare extension is supported. They check vstimecmp access from M-mode, and repeat the hip.VSTIP and htimedelta checks from M-mode.
The suite boots to M-mode, where vstimecmp is always accessible. time has no reset value, so a check whose result depends on time compares hip.VSTIP with the comparison computed from a read of time. A change of the comparison reaches hip.VSTIP eventually, so hip is read after waiting RVMODEL_INTERRUPT_LATENCY. cp_vstip and cp_htimedelta are also in Sstc_H, from HS-mode.
| Coverpoint | Goal | Feature Description | Expectation | Bins | Normative Rule |
|---|---|---|---|---|---|
In M-Mode |
|||||
cp_vstip |
OR of vstimecmp and hvip |
Cross of menvcfg.STCE = {0/1}, henvcfg.STCE = {0/1}, hvip.VSTIP = {0/1}, htimedelta = 0, vstimecmp = {0, all 1s}. Check hip.VSTIP. henvcfg.STCE = 1 with menvcfg.STCE = 0 is skipped because henvcfg.STCE is read-only zero then. For RV32, htimedeltah and vstimecmph are also written. |
If both STCE = 1 and vstimecmp = 0, hip.VSTIP = 1. Else hip.VSTIP = hvip.VSTIP. |
3 STCE * 2 hvip * 2 vstimecmp |
|
cp_htimedelta |
htimedelta affects vstimecmp |
menvcfg.STCE = 1, henvcfg.STCE = 1, hvip.VSTIP = 0, htimedelta = {0, 2^30, 2^32-1, 2^60, -1, -2^30, -2^60}, vstimecmp = {0, 2^29, 2^31, 2^61, -2^29, -2^31, -2^61}. Check hip.VSTIP against the value computed from a read of time. For RV32, htimedeltah and vstimecmph are involved; htimedelta = 2^32-1 exercises the carry into the high half and -1 the 64-bit wrap. |
hip.VSTIP = ((time + htimedelta) mod 2^64 >= vstimecmp), unsigned |
7 htimedelta * 7 vstimecmp |
|
cp_m_vstimecmp_accessible |
TM and STCE control access depending on priv level |
With cross of menvcfg.STCE = {0/1}, henvcfg.STCE = {0/1} mcounteren.TM = {0/1}, hcounteren.TM = {0/1} read vstimecmp. For RV32, also vstimecmph. henvcfg.STCE = 1 with menvcfg.STCE = 0 is skipped. |
success |
3 STCE * 2 mTM * 2 hTM * up to 2 regs |
vstimecmp_exist |
cp_m_vstimecmp_accesses |
All types of access |
With cross of menvcfg.STCE = 1, henvcfg.STCE = 0 mcounteren.TM = 0, hcounteren.TM =0, read/write (0s,1s)/set/clear vstimecmp. For RV32, also vstimecmph |
success |
5 accesses * up to 2 regs |
vstimecmp_exist |
Sstc Normative Rules
| Normative Rule | Rule Text | Coverpoints |
|---|---|---|
stimecmp_exist |
Sstc_cg/{cp_supervisor_stce, cp_supervisor_tm} |
|
stce_bit_exist |
This extension adds the STCE bit to the menvcfg (sec:menvcfg) and henvcfg (sec:henvcfg) CSRs. |
Sstc_cg/{cp_supervisor_stce, cp_user_stce}, Sstc_H_cg/cp_vs_stimecmp_accessible |
menvcfg_stce_enable_op |
Sstc_cg/cp_supervisor_stce, Sstc_Sm_cg/cp_machine_stce, InterruptsSm_cg/cp_trigger_sti_sstc, InterruptsSm_cg/cp_write_stip_sstc |
|
menvcfg_stce_zero_op |
Sstc_cg/{cp_supervisor_stce, cp_user_stce}, Sstc_Sm_cg/cp_machine_stce, Sstc_H_cg/{cp_hs_vstimecmp_accessible, cp_vs_stimecmp_accessible, cp_vu_timecmp_inaccessible}, Sstc_H_cg/cp_vstip, InterruptsSm_cg/cp_trigger_sti_sstc, InterruptsSm_cg/cp_write_stip_sstc |
|
menvcfg_stce_zero_vstip |
Sstc_Sm_cg/cp_machine_stce, Sstc_H_cg/cp_vstip, InterruptsSm_cg/cp_trigger_sti_sstc, InterruptsSm_cg/cp_write_stip_sstc |
|
mcounteren_tm_clr |
Sstc_cg/cp_supervisor_tm, Sstc_H_cg/{cp_hs_vstimecmp_accessible, cp_vs_stimecmp_accessible, cp_vu_timecmp_inaccessible} |
|
mcounteren_tm_set |
Sstc_cg/cp_supervisor_tm, Sstc_H_cg/cp_hs_vstimecmp_{accessible, accesses}, Sstc_H_cg/cp_vs_stimecmp_{accessible, accesses} |
|
stimecmp_stimecmph_sz_acc |
Sstc_cg/cp_supervisor_tm, Sstc_cg/cp_supervisor_tm_h, Sstc_cg/cp_supervisor_stce |
|
menvcfg_stce_exists |
The Sstc extension adds the STCE (STimecmp Enable) bit to menvcfg CSR. |
Sstc_Sm_cg/cp_machine_stce, Sstc_cg/cp_supervisor_stce, InterruptsSm_cg/cp_trigger_sti_sstc, InterruptsSm_cg/cp_write_stip_sstc |
menvcfg_stce_rdonly0 |
When the Sstc extension is not implemented, STCE is read-only zero. |
Sstc_Sm_cg/cp_machine_stce, InterruptsSm_cg/cp_trigger_sti_sstc, InterruptsSm_cg/cp_write_stip_sstc |
mip_sip_stip_op |
InterruptsS_cg/cp_trigger_sti_sstc, InterruptsSm_cg/cp_trigger_sti_sstc, InterruptsSm_cg/cp_write_stip_sstc |
|
sip_stip_sie_stie |
InterruptsS_cg/cp_trigger_sti_sstc, InterruptsSm_cg/cp_trigger_sti_sstc, InterruptsSm_cg/cp_write_stip_sstc |
|
henvcfg_stce_op |
Sstc_H_cg/cp_vs_stimecmp_{accessible, accesses}, Sstc_H_cg/cp_vstip |
|
henvcfg_stce_zero_op |
Sstc_H_cg/cp_vs_stimecmp_accessible, Sstc_H_cg/cp_vstip |
|
hcounteren_acc |
Sstc_H_cg/cp_vs_stimecmp_{accessible, accesses} |
|
H_vscsrs_acc_vs |
Sstc_H_cg/cp_vs_vstimecmp_inaccessible |
|
H_virtinst_vu_vs_nonhigh_allowedhs_tvm0 |
Sstc_H_cg/{cp_vs_vstimecmp_inaccessible, cp_vu_timecmp_inaccessible} |
|
H_virtinst_vu_vs32_high_allowedhs_tvm0 |
Sstc_H_cg/{cp_vs_vstimecmp_inaccessible, cp_vu_timecmp_inaccessible} |
|
H_virtinst_vu_nonhigh_supervisor_allowedhs_tvm0 |
Sstc_H_cg/cp_vu_timecmp_inaccessible |
|
H_virtinst_vu32_high_supervisor_allowedhs_tvm0 |
Sstc_H_cg/cp_vu_timecmp_inaccessible |
|
H_vscsrs_acc_u |
Attempts from U-mode cause an illegal-instruction exception as usual. |
Sstc_H_cg/cp_u_timecmp_inaccessible |
hip_vstip_enable, hideleg_op |
hip_vstip_enable: The interrupt will be taken based on the standard interrupt enable and delegation rules while V=1. hideleg_op: An interrupt that has been delegated to HS-mode (using mideleg) is further delegated to VS-mode if the corresponding hideleg bit is set. |
InterruptsS_cg/{cp_trigger_vsti_sstc, cp_trigger_vsti_sstc_vs, cp_trigger_vsti_sstc_tsbi}, InterruptsSm_cg/cp_trigger_vsti_sstc |
hip_vstip_defined_v0 |
The |
InterruptsS_cg/cp_trigger_vsti_sstc, Sstc_H_cg/cp_vstip |
hip_vstip_acc |
Sstc_H_cg/cp_vstip |
|
hip_vstip_op, hip_vstip_vstimecmp_op, hip_vstip_clear, htimedelta_sz_acc_op, htimedeltah_sz_acc_op |
hip_vstip_op: A virtual supervisor timer interrupt becomes pending, as reflected in the |
Sstc_H_cg/cp_htimedelta |
vstimecmp_exist, vstimecmp_sz, vstimecmp_acc |
vstimecmp_exist: and the VS-level vstimecmp CSR (vstimecmp). vstimecmp_sz: The |
Sstc_H_cg/cp_hs_vstimecmp_{accessible, accesses}, Sstc_HSm_cg/cp_m_vstimecmp_{accessible, accesses} |
henvcfg_stce |
The Sstc extension adds the STCE (STimecmp Enable) bit to henvcfg CSR. |
Sstc_H_cg/cp_vs_stimecmp_accessible |
henvcfg_stce_rdonly0 |
When the Sstc extension is not implemented, STCE is read-only zero. |
Not tested: needs an H implementation without Sstc |
UDB Parameters: None.
TODO: beef up testing stimecmp values, behavior near wraparound
B.4. Endian
B.4.1. EndianSm Machine-Mode Endianness
| Coverpoint | Goal | Feature Description | Notes | Normative Rule |
|---|---|---|---|---|
cp_mstatus_mbe_endianness |
Read from memory in an endian fashion |
For each endianness, sd 0x0102030405060708 to scratch, and also write all subwords with sw, sh, sb. For each endianness (independent), ld, lw, lwu, lh, lhu, lb, lbu it back. In RV32, use mstatush and don’t need the doubles. |
restore endianness to normal afterward |
mstatus_mbe_op |
| Normative Rule | Rule Text | Coverpoints |
|---|---|---|
mstatus_mbe_op |
EndianSm_cg/{cp_mstatus_mbe_endianness_sw, cp_mstatus_mbe_endianness_lw, cp_mstatus_mbe_endianness_sh, cp_mstatus_mbe_endianness_lbu} |
UDB Parameters: None.
B.4.2. EndianS Supervisor-Mode Endianness
| Coverpoint | Goal | Feature Description | Notes | Normative Rule |
|---|---|---|---|---|
cp_mstatus_sbe_endianness |
Read from memory in an endian fashion in supervisor mode. |
Run test in supervisor mode. For each endianness given by mstatus.SBE, sd 0x0102030405060708 to scratch, and also write all subwords with sw, sh, sb. For each endianness (independent), ld, lw, lwu, lh, lhu, lb, lbu it back. In RV32, use mstatush and don’t need the doubles. |
restore endianness to normal afterward |
mstatus_sbe_op |
cp_mstatus_mprv_sbe_endianness |
Read from memory in an endian fashion based on MBE and SBE for systems with supervisor mode. |
Run test in machine mode. Each endianness is a cross-product of MPRV = 0/1, MPP = 01/11, MBE = 0/1, SBE = 0/1 (16 bins). For each endianness, sd 0x0102030405060708 to scratch, and also write all subwords with sw, sh, sb. For each endianness (independent), ld, lw, lwu, lh, lhu, lb, lbu it back. In RV32, use mstatush and don’t need the doubles. |
restore endianness to normal afterward |
mstatus_mprv_ldst_op |
cp_sstatus_ube_endianness |
Read from memory in an endian fashion |
Run test in user mode. For each endianness given in sstatus.UBE, sd 0x0102030405060708 to scratch, and also write all subwords with sw, sh, sb. For each endianness (independent), ld, lw, lwu, lh, lhu, lb, lbu it back. In RV32, use mstatush and don’t need the doubles. |
restore endianness to normal afterward |
sstatus_ube_endianness_op |
| Normative Rule | Rule Text | Coverpoints |
|---|---|---|
sstatus_ube |
EndianS_cg/cp_sstatus_ube_endianness_lw |
|
sstatus_ube_implicit |
EndianS_cg/cp_sstatus_ube_endianness_lw |
|
sstatus_ube_endianness_op |
EndianS_cg/{cp_sstatus_ube_endianness_sw, cp_sstatus_ube_endianness_lw, cp_sstatus_ube_endianness_sh, cp_sstatus_ube_endianness_lbu} |
|
sstatus_ube_implicit_smode |
TODO: U-mode accesses through Sv translation with UBE≠SBE, checking page tables are read with S-mode endianness |
|
endianness |
The EEI will define whether the memory system is little-endian or big-endian. |
|
ldst_endian_byte_invariant |
||
mstatus_mprv_ldst_op |
EndianS_cg/cp_mstatus_mprv_sbe_endianness_sw, EndianS_cg/cp_mstatus_mprv_sbe_endianness_sb, EndianS_cg/cp_mstatus_mprv_sbe_endianness_lw, EndianS_cg/cp_mstatus_mprv_sbe_endianness_lbu |
|
mstatus_sbe_op |
EndianS_cg/{cp_mstatus_sbe_endianness_sw, cp_mstatus_sbe_endianness_lw, cp_mstatus_sbe_endianness_sh, cp_mstatus_sbe_endianness_lbu} |
|
mstatus_sbe_implicit |
||
mstatus_sbe_change_fence |
||
mstatus_sbe_rocopy |
If S-mode is supported, an implementation may make |
UDB Parameters: None.
B.4.3. EndianU User-Mode Endianness
| Coverpoint | Goal | Feature Description | Notes | Normative Rule |
|---|---|---|---|---|
cp_mstatus_ube_endianness |
Read from memory in an endian fashion |
Run in user mode. For each endianness, sd 0x0102030405060708 to scratch, and also write all subwords with sw, sh, sb. For each endianness (independent), ld, lw, lwu, lh, lhu, lb, lbu it back. In RV32, don’t need the doubles. |
restore endianness to normal afterward |
mstatus_ube_op |
cp_mstatus_mprv_ube_endianness |
Read from memory in an endian fashion |
Run in machine mode. Each endianness is a cross-product of MPRV = 0/1, MPP = 00/11, MBE = 0/1, UBE = 0/1 (16 bins). Run test in machine mode. For each endianness, sd 0x0102030405060708 to scratch, and also write all subwords with sw, sh, sb. For each endianness (independent), ld, lw, lwu, lh, lhu, lb, lbu it back. In RV32, don’t need the doubles. |
restore endianness to normal afterward |
mstatus_mprv_ldst_op |
UXL is not always modifiable, so there is no way to write coverpoints for different values |
||||
| Normative Rule | Rule Text | Coverpoints |
|---|---|---|
mstatus_mprv_ldst_op |
EndianU_cg/cp_mstatus_mprv_ube_endianness_sw, EndianU_cg/cp_mstatus_mprv_ube_endianness_sb, EndianU_cg/cp_mstatus_mprv_ube_endianness_lw, EndianU_cg/cp_mstatus_mprv_ube_endianness_lbu |
|
mstatus_ube_op |
EndianU_cg/{cp_mstatus_ube_endianness_sw, cp_mstatus_ube_endianness_lw, cp_mstatus_ube_endianness_sh, cp_mstatus_ube_endianness_lbu} |
|
mstatus_ube_rocopy |
If U-mode is supported, an implementation may make |
UDB Parameters: None.
B.4.4. EndianZaamo Endianness for AMOs
| Coverpoint | Goal | Feature Description | Notes |
|---|---|---|---|
cp_endianness_amo |
Read from memory in an endian fashion |
Write 0x0102030405060708 to scratch. For each endianness, amoadd.w a different value to scratch. For RV64, also amoadd.d |
restore endianness to normal afterward |
B.4.5. EndianZalrsc Endianness for LR/SC
| Coverpoint | Goal | Feature Description | Notes |
|---|---|---|---|
cp_endianness_lr |
Read from memory in an endian fashion |
Write 0x0102030405060708 to scratch. For each endianness, lr.w from scratch and sc.w a different value back to scratch. For RV64, also lr.d and sc.d |
restore endianness to normal afterward |
B.4.6. EndianF Endianness for Floats
| Coverpoint | Goal | Feature Description | Notes |
|---|---|---|---|
cp_endianness_f |
Read from memory in an endian fashion |
Write 0x0102030405060708 to scratch. For each endianness, flw from scratch, and fsw back to scratch. For D, also fld and fsd. |
restore endianness to normal afterward |
B.4.7. EndianZca Endianness for Compressed Instructions
| Coverpoint | Goal | Feature Description | Notes |
|---|---|---|---|
cp_endianness_zca |
Read from memory in an endian fashion |
Write 0x0102030405060708 to scratch. For each endianness, c.lw from scratch, and c.sw back to scratch. For RV64, also c.ld and c.sd. |
restore endianness to normal afterward |
B.5. Ssstrict
The Ssstrict extension indicates that executing unimplemented instructions or accessing unimplemented CSR in the standard or reserved encoding spaces raises an illegal instruction exception.
No non-conforming extensions are present. Attempts to execute unimplemented opcodes or access unimplemented CSRs in the standard or reserved encoding spaces raises an illegal instruction exception that results in a contained trap to the supervisor-mode trap handler.
The Ssstrict suite has one group per privilege mode the tests run in: Ssstrict_Sm (M-mode), Ssstrict_S (S-mode) and Ssstrict_U (U-mode), plus Ssstrict_H (VS-mode and VU-mode) when the H extension is implemented.
The Ssstrict_Sm tests require Sm, so they are not part of a certificate without Sm, such as RVA23.
Vector instructions introduce complex register constraints and are tested separately in SsstrictV.
B.5.1. Ssstrict_Sm
RISC-V does not have a ratified equivalent of Ssstrict for machine mode, but this optional test suite checks the behavior of unimplemented instructions and CSRs from machine mode. It runs the same tests as Ssstrict_S but from machine mode.
The following CSR accesses and instructions should be exercised in machine mode. All inherently require Zicsr.
| Coverpoint | Goal | Feature Description | Expectation | Bins | Normative Rule | Notes |
|---|---|---|---|---|---|---|
cp_csrr |
CSR Accesses |
Read all 4096 CSRs in M-mode (CSRR with rd≠x0). Skips: PMP regs 0x3A0-0x3EF, debug-only 0x7B0-0x7BF, and custom CSRs (0x7C0-0x7FF, 0xBC0-0xBFF, 0xFC0-0xFFF). |
Legal CSRs return a value; non-existent/inaccessible CSRs raise illegal-instruction exception. |
One bin per CSR address 0x000–0xFBF (excluding skips) |
medelegh_omit_xlen64 |
csrr instruction, save value |
cp_csrw_corners |
CSR Accesses |
Write all-zeros then all-ones to every CSR in M-mode. Skips PMP regs (0x3A0-0x3EF) to avoid corrupting PMP configuration and custom CSRs. |
Write to legal CSRs succeeds; write to read-only or non-existent CSRs raises illegal-instruction. |
Two bins per CSR: write 0x000…0 and write 0xFFF…F |
csrw instruction |
|
cp_csrcs |
CSR Accesses |
Set all bits (CSRRS with rs1=all-ones) then clear all bits (CSRRC with rs1=all-ones) for every CSR in M-mode. Skips PMP and custom CSRs. |
Same as cp_csrw_corners — legal writes succeed, illegal CSRs trap. |
Two bins per CSR: CSRRS all-ones, CSRRC all-ones |
stateen_rv32_upper_bits_csrs |
csrc -1 |
cp_illegal_instruction |
Illegal Uncompressed Instructions |
Exhaustively test reserved and illegal 32-bit instruction encodings across all major opcodes and sub-fields: reserved opcodes (op7/15/21/23/26/29/31), reserved funct3 in LOAD/STORE/BRANCH/JALR, reserved funct7 in R-type/FP, reserved immediate fields (IWshift imm[5]=1, aes64ks1i rnum), reserved FP fmt/rs2 combos, reserved SYSTEM encodings, reserved FENCE fm/rs1/rd fields, and reserved vector vset encodings. |
Each reserved encoding raises an illegal-instruction exception. Legal encodings of unimplemented extensions may also trap. |
One bin per distinct template×exhaustive-bit combination from illegalinstrtests.py. Templates use R=random, E=exhaustive, 0/1=fixed bits. |
||
cp_illegal_compressed_instruction |
Illegal Compressed Instructions |
Exhaustively test all 2^14 encodings in each 16-bit quadrant (quadrant 00 = bits[1:0]=00, quadrant 01, quadrant 10), covering reserved encodings in Zca/Zcb/Zcd/Zcf/Zcmt/Zcmp. |
Each reserved compressed encoding raises illegal-instruction. Legal encodings succeed or cause addressable exceptions for memory ops. |
One bin per swept encoding in each quadrant, except the excluded ranges. |
||
cp_upperreg |
Instructions using x16-x31 |
For each register x16–x31 as rd, rs1, or rs2, execute: ADD rd,rs1,rs2 / ADDI rd,rs1,0 / ADDI rd,rs1,-1 / MUL rd,rs1,rs2 (integer). Also: FADD.S fd,fs1,fs2 / FMV.X.W rd,fs1 / FMV.W.X fd,rs1 (float). Sweeps all 16 upper register positions in each operand slot. |
If RV32E/RV64E is active (misa.E=1): all x16-x31 accesses raise illegal-instruction. If standard I base: all succeed. F registers f0-f31 always succeed if F supported. |
16 bins × {rd, rs1, rs2} × {add, addi×2, mul} = 192 integer bins |
diff_rv32e_rv32i |
All f registers should succeed if F is supported. x16-31 should trap if E base extension is used. |
cp_misa_ext_disable |
Extension bits |
For each MUTABLE_MISA_* parameter (A, B, C, D, F, H, I, M, Q, V, S, U): disable the misa bit, execute a representative instruction from that extension, then re-enable. |
Each instruction raises illegal-instruction with the misa bit cleared. Zbc is NOT controlled by B bit (clmul should still work when B=0). Entering S/U mode with S/U bit cleared should trap. |
One bin per {extension × instruction-sample} |
Should throw illegal instruction. For B, run instruction from each of Zba, Zbb, Zbc, Zbs (Zbc should be unaffected). For I, run an instruction that uses x16-x31. |
|
cp_amocas_odd |
Zacas instructions with odd register IDs |
For each of AMOCAS.W, AMOCAS.D, AMOCAS.Q: attempt odd rd and odd rs2 register IDs (register pairs must be even-aligned). AMOCAS.D odd regs trap on RV32; AMOCAS.Q odd regs trap on both RV32/RV64. |
AMOCAS.D/Q with odd rd or rs2 raises illegal-instruction exception. |
Odd rd bins × {.w, .d, .q} + Odd rs2 bins × {.w, .d, .q} |
d should trap for RV32 and q for both |
|
cp_reserved_frm |
Reserved FP rounding modes |
Execute a floating-point instruction (FADD.S) with each rounding mode 0–7 written explicitly to FRM. Rounding modes 5 and 6 are reserved; mode 7 (DYN) with FRM=5/6/7 should raise invalid-operation exception (NV flag set). |
FRM=0-4: legal, no exception. FRM=5,6: reserved — DUT may raise illegal-instruction or invalid FP exception. FRM=7 with dynamic FRM=5/6/7: raises invalid FP exception. |
8 bins: FRM ∈ {0,1,2,3,4,5,6,7} with FADD.S using rounding mode 7 (DYN) |
||
* add vector Ssstrict instruction tests for all SEW to SsstrictV |
||||||
B.5.2. Ssstrict_S
Attempt to issue all flavors of 32-bit instructions in the standard and reserved spaces and all 16-bit compressed instructions. Also attempt to access all CSRs in the standard and reserved spaces that should be inaccessible. Expect illegal instruction trap for unimplemented instructions and CSRs, matching reference model.
According to the RVA23 profile spec, the illegal instruction should be cause a trap to the supervisor trap handler. However, delegation is the business of the firmware, not the hardware. These tests only check that a trap occurs and matches the reference model.
The following CSR accesses and instructions should be exercised in supervisor mode. All inherently require Zicsr.
| Coverpoint | Goal | Feature Description | Expectation | Bins | Normative Rule | Notes |
|---|---|---|---|---|---|---|
cp_csrr |
CSR Accesses |
Read all 4096 CSRs from S-mode (CSRR with rd≠x0). Skips: satp (0x180, would enable virtual memory), custom S/H CSRs (0x5C0-0x5FF, 0x6C0-0x6FF, 0x9C0-0x9FF, 0xAC0-0xAFF, 0xDC0-0xDFF, 0xEC0-0xEFF). |
S-mode CSRs return values; M-mode/H-mode/debug CSRs raise illegal-instruction from S-mode. |
One bin per CSR 0x000–0xFFF (excluding skips), executed from S-mode |
Ssstrict_unimplemented_opcodes_csr_exception |
Switch to S-mode (ecall with a0=1) before CSR sweep. |
cp_csrw_corners |
CSR Accesses |
Write all-zeros and all-ones to every CSR from S-mode. Skips satp and same custom CSRs as cp_csrr. |
S-mode writable CSRs accept writes; read-only or higher-privilege CSRs trap. |
Two bins per CSR: write 0 and write all-ones |
Same as SsstrictSm but with mode switch to S-mode first. |
|
cp_csrcs |
CSR Accesses |
Set and clear all bits of every CSR from S-mode using CSRRS/CSRRC with rs1=all-ones. |
Same as cp_csrw_corners. |
Two bins per CSR: CSRRS all-ones and CSRRC all-ones from S-mode |
Ssstrict_unimplemented_opcodes_csr_exception |
CSRRS/CSRRC with x=−1 from S-mode. |
cp_shadow_m |
Shadow CSR verification (M-mode write) |
Write all-ones and all-zeros to mstatus, mie, mip from M-mode, verifying the S-mode shadow registers (sstatus, sie, sip) reflect the correct subset of bits. Also write all-ones/zeros to sstatus, sie, sip from S-mode and verify the M-mode shadows reflect the changes. |
mstatus↔sstatus, mie↔sie, mip↔sip are consistent: bits shared between the views have the same value; sstatus-only bits do not appear in mstatus and vice versa. |
6 bins: {mstatus, mie, mip} × {write 0, write 1s} from M-mode |
From M-mode: csrrw x0, mstatus, x2 (x2=-1) then csrrw x0, mstatus, x0. |
|
cp_illegal_instruction |
Illegal Uncompressed Instructions |
Same encoding sweep as SsstrictSm but executed from S-mode. All reserved/illegal encodings must trap; M-mode-only instructions (MRET, debug CSR access) also trap from S-mode. |
Identical to M-mode case — illegal-instruction exception per reserved encoding. |
Same as SsstrictSm cp_illegal_instruction but with S-mode priv_mode context |
Switch to S-mode before #include of SsstrictInstr-Tests.h. |
|
cp_illegal_compressed_instruction |
Illegal Compressed Instructions |
Same compressed quadrant sweep (00/01/10) as SsstrictSm, including the separately swept reserved code points (c.jr with rs1 = x0, c.lwsp and c.ldsp with rd = x0, c.addi16sp with nzimm = 0, and c.addiw with rd = x0 on RV64), but from S-mode. |
Same as SsstrictSm — each reserved encoding traps. |
Same as SsstrictSm cp_illegal_compressed_instruction but S-mode context |
Switch to S-mode before #include of SsstrictInstrCompressed-Tests.h. |
|
cp_upperreg |
Instructions using x16-x31 from S-mode |
Same upper-register sweep as SsstrictSm but executed in S-mode. Tests that E-extension illegal-instruction behavior is consistent across privilege modes. |
If RV32E/RV64E: trap on x16-x31 access. If standard I: succeed. F regs always succeed. |
Same bins as SsstrictSm cp_upperreg, S-mode context |
diff_rv32e_rv32i |
Switch to S-mode first. Raw .word encodings for upper register positions. |
cp_misa_ext_disable |
Extension bits |
Same extension disable sweep as SsstrictSm but: disable misa bit from M-mode, switch to S-mode, execute instruction, switch back, re-enable. Extensions: A, B, C, D, F, H, I, M, Q, U, V (S-mode cannot disable S itself). U-mode entry with U=0 should trap. |
Each instruction executed in S-mode with misa bit cleared raises illegal-instruction. Entering U-mode with misa.U=0 should fail. |
One bin per extension per {M-mode-disable → S-mode-execute} |
M-mode: clear misa bit / ecall to S-mode / execute instruction / ecall back to M-mode / restore misa. |
|
cp_reserved_frm |
Reserved FP rounding modes from S-mode |
Same as SsstrictSm cp_reserved_frm but executed from S-mode. Verify reserved FRM behavior is consistent across privilege levels. |
Same as SsstrictSm — FRM 5/6 reserved, mode 7 with DYN FRM=5/6/7 raises FP exception. |
8 bins: FRM ∈ {0..7} with FADD.S in S-mode |
Switch to S-mode, then csrwi frm,N / fadd.s f0,f1,f2 for N=0..7. |
|
Note that satp is already tested in VM, so it is safe to exclude here |
||||||
B.5.3. Ssstrict_U
Same as Ssstrict_S, but runs from user mode and includes attempts to access supervisor CSRs that should be inaccessible from user mode.
The following CSR accesses and instructions should be exercised in user mode. All inherently require Zicsr.
| Coverpoint | Goal | Feature Description | Expectation | Bins | Normative Rule |
|---|---|---|---|---|---|
cp_csrr |
CSR Accesses |
Read all 4096 CSRs from U-mode (CSRR with rd≠x0). Skips user-custom CSRs only (0x800-0x8FF, 0xCC0-0xCFF). All non-user CSRs should raise illegal-instruction from U-mode. |
User-level CSRs (cycle, time, instret, hpmcounters, fflags, frm, fcsr, vtype etc.) succeed if enabled; all others trap. |
One bin per CSR 0x000–0xFFF (excluding user-custom ranges), executed from U-mode |
Zicsr_nonexistent_rsv |
cp_csrw_corners |
CSR Accesses |
Write all-zeros and all-ones to every CSR from U-mode. Skips user-custom CSRs. Writable user-level CSRs: fflags, frm, fcsr. All others trap. |
Only fflags/frm/fcsr accept writes from U-mode; all other writes raise illegal-instruction. |
Two bins per CSR: write 0 and write all-ones from U-mode |
|
cp_csrcs |
CSR Accesses |
CSRRS/CSRRC with rs1=all-ones for every CSR from U-mode. |
Same as cp_csrw_corners — only fp CSRs succeed, all others trap. |
Two bins per CSR: CSRRS and CSRRC all-ones from U-mode |
|
cp_illegal_instruction |
Illegal Uncompressed Instructions |
Same encoding sweep as SsstrictSm/S but from U-mode. S-mode and M-mode instructions (SRET, MRET, CSR M/S access) also trap from U-mode. |
All reserved encodings and privilege-elevated instructions raise illegal-instruction from U-mode. |
Same as SsstrictSm cp_illegal_instruction, U-mode priv_mode context |
|
cp_illegal_compressed_instruction |
Illegal Compressed Instructions |
Same compressed quadrant sweep (00/01/10) as SsstrictSm/S, including the separately swept reserved code points (c.jr with rs1 = x0, c.lwsp and c.ldsp with rd = x0, c.addi16sp with nzimm = 0, and c.addiw with rd = x0 on RV64), but from U-mode. |
All reserved encodings trap from U-mode. |
Same as SsstrictSm cp_illegal_compressed_instruction, U-mode context |
|
cp_upperreg |
Instructions using x16-x31 from U-mode |
Same upper-register sweep as SsstrictSm but executed in U-mode. |
If RV32E/RV64E: trap on x16-x31 use. Standard I: succeed. F regs succeed if F supported. |
Same bins as SsstrictSm cp_upperreg, U-mode context |
|
cp_misa_ext_disable |
Extension bits |
Same extension disable sweep as SsstrictSm but: disable misa bit from M-mode, switch to U-mode, execute instruction, switch back, re-enable. Extensions: A, B, C, D, F, H, I, M, Q, V. |
Each instruction executed in U-mode with misa bit cleared raises illegal-instruction. |
One bin per extension per {M-mode-disable → U-mode-execute} |
|
cp_reserved_frm |
Reserved FP rounding modes from U-mode |
Same as SsstrictSm cp_reserved_frm but from U-mode. Requires F extension with mstatus.FS≠Off (FP enabled by M-mode before switching). |
Same FRM reserved-mode behavior as M/S modes. |
8 bins: FRM ∈ {0..7} with FADD.S in U-mode |
B.5.4. Ssstrict_H
Same as Ssstrict_S from VS-mode and Ssstrict_U from VU-mode. Instructions and CSR accesses that are HS-qualified but prevented when V=1 raise virtual-instruction exceptions instead of illegal-instruction exceptions.
The Ssstrict_S CSR and instruction sweeps are exercised in VS-mode and the Ssstrict_U sweeps in VU-mode. The suite boots to HS-mode, enters VS-mode or VU-mode at the start of each block of tests and returns to HS-mode at its end. Boot delegates illegal-instruction and virtual-instruction exceptions to HS-mode and leaves hedeleg = 0, so the HS-mode fast trap handler records cause, epc and tval for every trap. vsatp and hgatp stay Bare.
| Coverpoint | Goal | Feature Description | Expectation | Bins | Normative Rule | Notes |
|---|---|---|---|---|---|---|
cp_csrr |
CSR Accesses |
Read the Ssstrict_S CSRs from VS-mode and the Ssstrict_U CSRs from VU-mode (CSRR with rd≠x0), with the same skips. |
S CSR numbers reach the VS replicas from VS-mode. Hypervisor and VS CSRs raise virtual-instruction from VS-mode. CSRs that do not exist raise illegal-instruction. From VU-mode, user CSRs behave as from U-mode. |
One bin per swept CSR in Ssstrict_H_vscsr_cg (VS-mode) and Ssstrict_H_vucsr_cg (VU-mode) |
Ssstrict_unimplemented_opcodes_csr_exception |
satp is skipped because a write to vsatp could turn on VS-stage translation. |
cp_csrw_edges |
CSR Accesses |
Write all-zeros and all-ones to the same CSRs as cp_csrr, from VS-mode and VU-mode, and restore each CSR. |
Writable CSRs accept the writes; read-only, higher-privilege and nonexistent CSRs trap as in cp_csrr. |
Two bins per CSR: write 0 and write all-ones |
H_cause_virtual_instruction |
|
cp_csrcs |
CSR Accesses |
CSRRS and CSRRC with rs1 = all-ones for the same CSRs as cp_csrr, from VS-mode and VU-mode. |
Same as cp_csrw_edges. |
Two bins per CSR: CSRRS and CSRRC all-ones |
H_cause_virtual_instruction |
|
cp_illegal_instruction |
Illegal Uncompressed Instructions |
Same encoding sweep as Ssstrict_S, including the upper-register and vector encodings, from VS-mode and from VU-mode. |
Reserved encodings raise illegal-instruction. HS-qualified instructions that V=1 prevents, such as hfence.vvma and hfence.gvma, raise virtual-instruction. |
Same as Ssstrict_S cp_illegal_instruction, crossed with VS-mode and VU-mode (Ssstrict_H_instr_cg) |
||
cp_illegal_compressed_instruction |
Illegal Compressed Instructions |
Same compressed quadrant sweep (00/01/10) as Ssstrict_S, including the separately swept reserved code points, from VS-mode and from VU-mode. |
Each reserved encoding raises illegal-instruction. |
Same as Ssstrict_S cp_illegal_compressed_instruction, crossed with VS-mode and VU-mode (Ssstrict_H_comp_instr_cg) |
B.5.5. Ssstrict Normative Rules
| Normative Rule | Rule Text | Coverpoints |
|---|---|---|
Ssstrict_no_nonconforming_extensions |
If the Ssstrict extension is implemented, then no non-conforming extensions are present. |
Ssstrict_S_instr_cg/{cp_illegal, cp_reserved}, Ssstrict_S_comp_instr_cg/{cp_compressed00, cp_compressed01} |
Ssstrict_unimplemented_opcodes_csr_exception |
Ssstrict_S_scsr_cg/cp_csrr, Ssstrict_S_scsr_cg/cp_csrw_edges, Ssstrict_S_scsr_cg/cp_csrcs, Ssstrict_S_instr_cg/cp_illegal, Ssstrict_H_vscsr_cg/cp_csrr, Ssstrict_H_vucsr_cg/cp_csrr, Ssstrict_H_instr_cg/cp_illegal |
|
H_cause_virtual_instruction |
Ssstrict_H_vscsr_cg/{cp_csrr, cp_csrw_edges, cp_csrcs}, Ssstrict_H_instr_cg/cp_privileged_000 |
|
H_cause_virtual_instruction_high |
Ssstrict_H_vscsr_cg/{cp_csrr, cp_csrw_edges, cp_csrcs} |
|
slliw_srliw_sraiw_imm5_rsv |
SLLIW, SRLIW, and SRAIW encodings with imm[5]≠0 are reserved. |
Ssstrict_S_instr_cg/cp_IWshift |
c-addi16sp_rsv |
C.ADDI16SP is valid only when nzimm≠0; the code point with nzimm=0 is reserved. |
Ssstrict_S_comp_instr_cg/cp_compressed01/illegal_c_addi16sp |
c-addi4spn_rsv |
C.ADDI4SPN is valid only when nzuimm≠0; the code points with nzuimm=0 are reserved. |
Ssstrict_S_comp_instr_cg/cp_compressed00 |
c-addiw_rsv |
C.ADDIW is valid only when rd≠x0; the code points with rd=x0 are reserved. |
Ssstrict_S_comp_instr_cg/cp_compressed01/illegal_c_addiw |
c-jr_rsv |
C.JR is valid only when rs1≠x0; the code point with rs1=x0 is reserved. |
Ssstrict_S_comp_instr_cg/cp_compressed10/illegal_c_jr |
c-ldsp_rsv |
C.LDSP is valid only when rd≠x0; the code points with rd=x0 are reserved. |
Ssstrict_S_comp_instr_cg/cp_compressed10/illegal_c_ldsp |
c-lui_rsv |
Ssstrict_S_comp_instr_cg/cp_compressed01 |
|
c-lwsp_rsv |
C.LWSP is valid only when rd≠x0; the code points with rd=x0 are reserved. |
Ssstrict_S_comp_instr_cg/cp_compressed10/illegal_c_lwsp |
Zilsd_c-ldsp_x0 |
Ssstrict_S_comp_instr_cg/cp_compressed10/illegal_c_ldsp |
|
roundingmode_rsv |
Ssstrict_S_instr_cg/cp_Ftype, Ssstrict_S_instr_cg/cp_reserved |
|
roundingmode_unaffected_rm_decode |
TODO: sweep reserved rm values (101, 110, and 111 with reserved frm) on widening conversions such as fcvt.d.s, fcvt.s.h, and fcvt.d.w |
|
fcvtmod-w-d_enc |
Ssstrict_S_instr_cg/cp_cvtmodwdfrm |
|
Zdinx_x_reg_pair |
TODO |
|
bclri_shamt_rsv_rv32 |
For RV32, the encodings corresponding to shamt[5]=1 are reserved. |
Ssstrict_S_instr_cg/cp_Itype |
bexti_shamt_rsv_rv32 |
For RV32, the encodings corresponding to shamt[5]=1 are reserved. |
Ssstrict_S_instr_cg/cp_Itype |
binvi_shamt_rsv_rv32 |
For RV32, the encodings corresponding to shamt[5]=1 are reserved. |
Ssstrict_S_instr_cg/cp_Itype |
bseti_shamt_rsv_rv32 |
For RV32, the encodings corresponding to shamt[5]=1 are reserved. |
Ssstrict_S_instr_cg/cp_Itype |
Zacas_rv32_amocas-d_frst_pair_entry_reg_even |
Ssstrict_S_instr_cg/cp_amocas_odd |
|
Zacas_rv64_amocas-q_frst_pair_entry_reg_even |
Ssstrict_S_instr_cg/cp_amocas_odd |
|
ldaq_no_aq_reserved |
TODO |
|
sdrl_no_rl_reserved |
TODO |
|
diff_rv32e_rv32i |
Ssstrict_S_instr_cg/cp_upperreg_rs1, Ssstrict_S_instr_cg/cp_upperreg_rs2, Ssstrict_S_instr_cg/cp_upperreg_rd, Ssstrict_S_instr_cg/cp_upperreg_imm_rd |
|
hedelegh_sz_acc_op |
Ssstrict_S_scsr_cg/{cp_csrr, cp_csrw_edges, cp_csrcs}/hedelegh |
|
henvcfgh_sz_acc_op |
Ssstrict_S_scsr_cg/{cp_csrr, cp_csrw_edges, cp_csrcs}/henvcfgh |
|
htimedeltah_sz_acc_op |
Ssstrict_S_scsr_cg/{cp_csrr, cp_csrw_edges, cp_csrcs}/htimedeltah |
|
stateen_rv32_upper_bits_csrs |
Ssstrict_S_scsr_cg/{cp_csrr, cp_csrw_edges, cp_csrcs}/{hstateen0h, hstateen1h, hstateen2h, hstateen3h}, Ssstrict_Sm_mcsr_cg/{cp_csrr, cp_csrw_edges, cp_csrcs}/{mstateen0h, mstateen1h, mstateen2h, mstateen3h} |
|
vstimecmp_acc |
Ssstrict_S_scsr_cg/{cp_csrr, cp_csrw_edges, cp_csrcs}/vstimecmph |
|
stimecmp_stimecmph_sz_acc |
Ssstrict_S_scsr_cg/{cp_csrr, cp_csrw_edges, cp_csrcs}/stimecmph |
|
medelegh_omit_xlen64 |
Ssstrict_Sm_mcsr_cg/{cp_csrr, cp_csrw_edges, cp_csrcs}/medelegh |
|
menvcfgh_sz_acc_op |
Ssstrict_Sm_mcsr_cg/{cp_csrr, cp_csrw_edges, cp_csrcs}/menvcfgh |
|
mseccfgh_presence |
Register mseccfgh exists when XLEN=32 and mseccfg is implemented; it does not exist when XLEN=64. |
Ssstrict_Sm_mcsr_cg/{cp_csrr, cp_csrw_edges, cp_csrcs}/mseccfgh |
mstatush_sz_acc |
For RV32 only, |
Ssstrict_Sm_mcsr_cg/{cp_csrr, cp_csrw_edges, cp_csrcs}/mstatush |
rv32_high_access |
Ssstrict_Sm_mcsr_cg/{cp_csrr, cp_csrw_edges, cp_csrcs}/{mcyclecfgh, minstretcfgh} |
|
menvcfg_menvcfgh_no_u_mode |
If U-mode is not supported, then registers menvcfg and menvcfgh do not exist. |
Ssstrict_Sm_mcsr_cg/{cp_csrr, cp_csrw_edges, cp_csrcs}/{menvcfg, menvcfgh} |
UDB Parameters: None.
B.6. PMP
B.6.1. PMP_Sm Machine
General Test Environment (PMP_Sm): - Runs when Sm is implemented and NUM_PMP_ENTRIES > 0. Boots to M-mode; every access on this sheet is made from M-mode. - Test files are split by UDB parameter: base, RV64 only (MXLEN = 64), PMP_NA4_SUPPORTED, PMP_NAPOT_SUPPORTED and PMP_TOR_SUPPORTED. The NA4 and TOR coverpoints are compiled out when the mode is not supported; the NAPOT ones are not. - Background entry: the highest usable entry (15 of 16, 63 of 64) is L=1, XWR=111, NAPOT over all of memory (TOR up to all ones when NAPOT is not supported), so accesses that match no lower entry succeed. cp_none_* runs before it is set. - Grain g = 2^(G+2) bytes from PMP_GRANULARITY. A standard region is a NAPOT region of max(g, 8) bytes in .data, g-aligned past the code. A TOR region is one grain. - Fetch probe = jalr into the region, which holds a return instruction. Loads = lb, lbu, lh, lhu, lw (+ lwu, ld on RV64). Stores = sb, sh, sw (+ sd on RV64). - Legal XWR = {000, 001, 011, 100, 101, 111}. R=0 with W=1 is reserved and never written. - After every PMP CSR write the tests execute sfence.vma when S-mode is implemented. - Coverpoints compare addresses and pmpaddr values on their low bits (PMP_ADDR_LOWMASK), so bins match wherever .data lands. - Entries 0-14 are the entries below the background entry of a 16-entry PMP; with 64 entries, cp_pmp64_* covers entries 15-62.
| Coverpoint | Goal | Feature Description | Expectation | Bins | Normative Rule |
|---|---|---|---|---|---|
Permission bits, locked entry |
|||||
cp_cfg_X |
Verify that X alone controls execute permission when the entry is locked (L=1). |
PMP_NAPOT_SUPPORTED only. One standard NAPOT region. Walk the six legal XWR values with L=1, each in its own entry (XWR=000 in entry 5 down to XWR=111 in entry 0), so the newest entry is the highest-priority match. jalr to the start of the region. |
Instruction access fault (mcause = 1) when X=0. The fetch completes when X=1. |
6 XWR × jalr = 6 |
pmp_rwx_check |
cp_cfg_R |
Verify that R controls every load width when the entry is locked. |
Same walk as cp_cfg_X. Every load (lb, lbu, lh, lhu, lw (+ lwu, ld on RV64)) at the start of the region. |
Load access fault (mcause = 5) when R=0. |
6 XWR × 5 loads = 30 (42 on RV64) |
pmp_load_fault |
cp_cfg_W |
Verify that W controls every store width when the entry is locked. |
Same walk as cp_cfg_X. Every store (sb, sh, sw (+ sd on RV64)) at the start of the region. |
Store/AMO access fault (mcause = 7) when W=0. |
6 XWR × 3 stores = 18 (24 on RV64) |
pmp_store_fault |
Permission bits in every entry |
|||||
cp_cfg_X0_all |
Verify that X is enforced by each of entries 0-14. |
Entries 0-14 all cover the same standard NAPOT region. Program L=1 and a rolling legal XWR into entries 14 down to 0, one entry at a time (four test files), and jalr to the region after each write. The newest entry is the lowest-numbered match. |
X=0: instruction access fault. X=1: the fetch completes. |
15 entries each |
pmp_l_bit_m_mode_enforcement |
cp_cfg_Rw00_all |
Verify that R is enforced by each of entries 0-14. |
Same walk as cp_cfg_X0_all. Every load (lb, lbu, lh, lhu, lw (+ lwu, ld on RV64)) after each write. The suffix gives R then W: Rw00 = R0 W0, Rw10 = R1 W0, Rw11 = R1 W1. |
Load access fault when R=0. |
3 RW values × 15 entries × 5 loads (7 on RV64) |
pmp_load_fault |
cp_cfg_rW00_all |
Verify that W is enforced by each of entries 0-14. |
Same walk as cp_cfg_X0_all. Every store (sb, sh, sw (+ sd on RV64)) after each write. The suffix gives R then W, as for cp_cfg_Rw*_all. |
Store/AMO access fault when W=0. |
3 RW values × 15 entries × 3 stores (4 on RV64) |
pmp_store_fault |
L bit |
|||||
cp_cfg_L_access_exec |
Verify that an unlocked entry (L=0) never restricts an M-mode access. |
For each of entries 0-14: L=0, A=NAPOT, XWR=000 over a standard region. jalr, lw and sw in the region. |
All accesses succeed. |
15 entries each |
pmp_l_bit_m_mode_enforcement |
cp_cfg_L_modify |
Verify that a locked entry ignores writes to its pmpcfg and pmpaddr, and that a locked TOR entry also protects the preceding pmpaddr. |
Entry 1: L={0,1}, A={OFF, TOR, NAPOT}, XWR=111, pmpaddr1 = 0x100. Clear pmpaddr1, clear pmpcfg0 (zeroing pmp1cfg), set pmp0cfg.XWR=111 through pmpcfg0, and write all ones to pmpaddr0; read each back. NA4 is not used because it is not selectable when G ≥ 1. |
L=1: pmp1cfg and pmpaddr1 keep their values; pmpaddr0 keeps its value only when entry 1 is TOR; pmp0cfg is always writable. L=0: every write takes effect. |
2 L × 3 A × 4 CSR writes = 24 (16 without TOR) |
pmp_l_bit_function |
Address-matching mode (A field) |
|||||
cp_cfg_A_all_even |
Verify that every pmpcfg byte accepts each address-matching mode. |
With L=0 and XWR=000, write A = OFF, TOR, NA4 and NAPOT into every byte of every pmpcfg CSR and read each back. cp_cfg_A_all_odd covers the odd pmpcfg CSRs (RV32 only). |
Readback matches the reference model. A supported mode reads back as written. NA4 when G ≥ 1, or a mode the hart does not support, reads back as a legal value of the WARL field. |
4 A (fewer without TOR or NA4) × even pmpcfg CSRs (2, or 8 with 64 entries); odd: 4 A × odd pmpcfg CSRs (RV32) |
pmp_na4_select_restriction |
cp_cfg_A_OFF_all_read |
Verify that A=OFF disables each of entries 0-14. |
For each entry: L=1, A=OFF, XWR=000, pmpaddr = a standard region. lw, sw and jalr in the region. |
All accesses succeed: the OFF entry matches nothing and the background entry grants access. |
15 entries each |
pmp_a_field_off |
cp_cfg_A_napot_all |
Verify that A=NAPOT matches exactly its region, in each of entries 0-14. |
PMP_NAPOT_SUPPORTED only. For each entry: L=1, A=NAPOT, XWR=000 over a standard region. lw 4 bytes below the region, at its base, and just past its top. |
Load access fault at the base only. The two accesses outside the region succeed. |
15 entries × 3 addresses = 45 |
pmp_access_fault_exception |
cp_cfg_A_napot_x |
Verify that XWR is enforced across a locked NAPOT region and not outside it. |
PMP_NAPOT_SUPPORTED only. Same walk as cp_cfg_X. jalr, lw and sw at base-4, base, base+4, the highest word, and just past the top. |
Inside the region: access fault when the permission is clear. Outside: the access succeeds. |
6 XWR × 5 addresses = 30 each |
pmp_exec_fault |
cp_cfg_A_NA4_all |
Verify that A=NA4 matches exactly four bytes, in each of entries 0-14. |
PMP_NA4_SUPPORTED only (G = 0). For each entry: L=1, A=NA4, XWR=000. lw at region-4, region and region+4. |
Load access fault at the region only. |
15 entries × 3 addresses = 45 |
pmp_a_field_napot_na4 |
cp_cfg_A_na4_x |
Verify that XWR is enforced on a locked NA4 region and not on its neighbors. |
PMP_NA4_SUPPORTED only. One NA4 region, six legal XWR with L=1. jalr, lw and sw at region-4, region and region+4. |
Access fault at the region when the permission is clear. The neighbors succeed. |
6 XWR × 3 addresses = 18 each |
pmp_a_field_napot_na4 |
cp_cfg_A_tor_all0 |
Verify that A=TOR works in each of entries 0-14, with each region’s bottom taken from the preceding pmpaddr. |
PMP_TOR_SUPPORTED only. Program pmpaddr0-14 so that TOR region i spans i+1 grains; region 0 runs from address 0 to pmpaddr0 and holds the code. All L=1, A=TOR; XWR=111 in entry 0, 001 in odd entries and 000 in even entries. lw in the last word of region 0 and at the start of every other region. |
Region 0 and the odd regions: the load succeeds. Even regions 2-14: load access fault. |
15 coverpoints × 1 bin |
pmp_cfg_rv32_layout |
cp_cfg_A_tor_x |
Verify that XWR is enforced across a locked TOR region and not outside it. |
PMP_TOR_SUPPORTED only. One TOR region of one grain [bottom, top) from a pair of entries (the odd entry is TOR, the even one below it holds the bottom). Six legal XWR with L=1. jalr, lw and sw at bottom-4, bottom, bottom+4, top-4 and top. |
Inside the region: access fault when the permission is clear. bottom-4 and top: the access succeeds. |
6 XWR × 5 addresses = 30 each |
pmp_exec_fault |
cp_cfg_A_tor0_r |
Verify that TOR entry 0 uses 0 as its bottom bound. |
PMP_TOR_SUPPORTED only. Entry 0: L=1, A=TOR, XWR=000, pmpaddr0 = one grain, so region 0 is [0, grain). lw, sw and jalr at 0 and pmpaddr0-4. Skipped if the image or mtvec lies in [0, grain). |
All accesses raise access faults from entry 0 before reaching the bus, whatever the platform maps at 0; without entry 0 the background entry would allow them. |
2 addresses each |
pmp_a_field_tor |
cp_cfg_A_tor_bot_L0_x |
Verify that TOR entry i spans [pmpaddr(i-1), pmpaddr(i)) whatever pmpcfg(i-1) holds. |
PMP_TOR_SUPPORTED only. Entry 1: L=1, A=TOR, XWR=101. Entry 0: A=OFF, XWR=000, with L=0 (L0 coverpoints) and then L=1 (L1 coverpoints). pmpaddr1 = pmpaddr0 + g. jalr, sw and lw at pmpaddr0-4, pmpaddr0, pmpaddr1-4 and pmpaddr1. |
In the region: jalr and lw succeed, sw raises a store/AMO access fault. Outside: all succeed. Entry 0’s L bit does not change the result. |
4 addresses each |
pmp_a_field_tor |
cp_cfg_A_tor_nonoverlap1_x |
Verify that a TOR entry matches nothing when pmpaddr(i-1) ≥ pmpaddr(i). |
PMP_TOR_SUPPORTED only. Entry 1: L=1, A=TOR, XWR=000, pmpaddr1 = R. Entry 0: A=OFF, L=0. pmpaddr0 = R (nonoverlap1), R + g (nonoverlap2), all ones (nonoverlap3). jalr, sw and lw at R-4, R and R+4. |
All accesses succeed. |
3 addresses each |
pmp_a_field_tor |
Priority and matching |
|||||
cp_priority_lw |
Verify that the lowest-numbered matching entry decides the access. |
PMP_NAPOT_SUPPORTED only. Entries 0-6: L=1, A=NAPOT, seven nested regions with a common base; entry i covers g·2^i bytes. XWR = 000, 101, 011, 100, 001, 111, 000 for entries 0-6. lw, sw and jalr at the last word of each region, which lies in entries i..6 only. |
Each access follows entry i’s XWR: access fault when its permission is clear. |
7 regions each |
pmp_entry_priority |
cp_priority_off_lw |
Verify that OFF entries are skipped and the first matching entry decides. |
PMP_NAPOT_SUPPORTED only. Entries 0-3, all L=1: entry 0 OFF XWR=000, entry 1 NAPOT XWR=101, entry 2 OFF XWR=000, entry 3 NAPOT XWR=111. pmpaddr0 and pmpaddr2 hold the probed address; entries 1 and 3 cover it. lw, sw and jalr at that address. |
jalr and lw succeed; sw raises a store/AMO access fault (entry 1 decides). |
1 each |
pmp_a_field_off |
cp_none_lw |
Verify that an M-mode access that matches no entry succeeds. |
Before the background entry is set: every pmpcfg.A = OFF and pmpaddr0-15 = 0. lw, sw and jalr. |
All accesses succeed. |
1 each |
pmp_no_entry_match |
Grain |
|||||
cp_grain_OFF_to_OFF |
Verify that the low pmpaddr bits read back according to G and the current mode, and keep their stored value when the mode changes. |
G ≥ 1 only (compiled out at PMP_GRANULARITY = 2). Write zeros, ones and a checkerboard to pmpaddr0 with pmpcfg0.A = NAPOT or OFF, then change A to OFF, NAPOT or TOR and read pmpaddr0[G-1:0]. |
NAPOT: pmpaddr0[G-2:0] read as ones and bit G-1 returns the written value, even if it was written while the entry was OFF. OFF and TOR: pmpaddr0[G-1:0] read as zeros. |
6 transitions (4 without TOR); the tests write 3 patterns per transition |
pmp_tor_off_addr_read_mask |
cp_grain_check_write |
Verify the grain G seen in pmpaddr0. |
pmpcfg0 = 0. Write all ones to pmpaddr0 and read it back. |
Bits G-1:0 read as zero and bit G reads as one, matching PMP_GRANULARITY. |
1 each |
pmp_addr_registers |
PMP CSR access |
|||||
cp_pmpaddr_upper_zero |
Verify that pmpaddr bits 63:54 are zero on RV64. |
RV64 only. Write all ones to every implemented pmpaddr CSR and read it back. |
Bits 63:54 read as zero. |
16 or 64 pmpaddr CSRs |
pmp_addr_registers |
cp_pmpcfg_walk |
Verify the layout and WARL behavior of the pmpcfg CSRs. |
Write zero, then a walking one through each bit of every implemented pmpcfg CSR (pmpcfg0-15 on RV32, the even pmpcfg CSRs on RV64), and read each back. The walk skips bit 1 (W alone is reserved) and bit 4 (A = NA4) of every byte. cp_pmpcfg_walk_odd and cp_pmpcfg_zero cover the odd CSRs on RV32. |
Readback matches the reference model: bits 6:5 of each byte read as zero, and a one written to bit 7 locks that entry. |
Walking-one values (24 on RV32, 48 on RV64) × even pmpcfg CSRs; on RV32 also × odd CSRs, plus zero to each odd CSR |
pmp_csrs_warl_access |
64 PMP entries |
|||||
cp_pmp64_write |
Verify that entries 15-62 of a 64-entry PMP enforce permissions. |
NUM_PMP_ENTRIES = 64 and PMP_NAPOT_SUPPORTED only. For each of entries 62 down to 15: L=1, A=NAPOT, XWR=101 over a standard region. sw and lw in the region (the test also issues jalr). |
lw succeeds; sw raises a store/AMO access fault. |
48 entries each |
pmp_entry_count |
cp_pmpcfg_odd_rv64 |
Verify that the odd pmpcfg CSRs are illegal on RV64. |
RV64 only. csrr and csrw each of pmpcfg1, pmpcfg3, …, pmpcfg15 from M-mode. |
Illegal-instruction exception (mcause = 2) on every access. |
8 CSRs × 2 operations = 16 |
pmp_cfg_rv64_illegal |
cp_na4_boundary |
Verify that an aligned doubleword that only half matches an NA4 entry fails. |
RV64, PMP_NA4_SUPPORTED only. Entry i: L=1, A=NA4, XWR=111 over the lower or the upper word of an aligned doubleword. ld and sd on the doubleword. |
Load or store/AMO access fault: the entry matches only some bytes of one memory operation. |
2 halves × 2 accesses = 4 |
pmp_full_match_required |
cp_tor_boundary |
Verify that an aligned doubleword that only half matches a TOR entry fails. |
RV64, G = 0, PMP_TOR_SUPPORTED only. Entry i: L=1, A=TOR, XWR=111, a 4-byte region over the lower or upper word of an aligned doubleword (entry i-1: OFF, pmpaddr(i-1) = pmpaddr(i) - 4). ld and sd on the doubleword. |
Load or store/AMO access fault. (The original plan also allowed success for a split access; an aligned doubleword is one memory operation.) |
2 halves × 2 accesses = 4 |
pmp_full_match_required |
cp_tor_doubleregionfail |
Verify that an aligned doubleword split across two TOR entries fails. |
RV64, G = 0, PMP_TOR_SUPPORTED only. Entries i and i+1: XWR=111, TOR, each covering one word of an aligned doubleword (entry i-1: OFF, pmpaddr at the doubleword). ld and sd on the doubleword. |
Load or store/AMO access fault: no single entry matches all bytes. |
2 accesses |
pmp_full_match_required |
cp_misaligned_napot |
Verify that a misaligned load or store that straddles a region boundary is checked byte by byte. |
Standard NAPOT region, NA4 region (G = 0) or one-grain TOR region with L={0,1}, XWR=111. Misaligned lh, lhu, lw, sh, sw (+ lwu, ld, sd on RV64) at each offset straddling the start and the end of the region. |
Address-misaligned exception, access fault, or success if the hart splits the access into operations that each match fully. Depends on MISALIGNED_LDST, MISALIGNED_LDST_EXCEPTION_PRIORITY and MISALIGNED_SPLIT_STRATEGY. |
~(3 lw + 3 sw + 1 lh + 1 lhu + 1 sh) offsets × 2 ends × 2 L, per mode |
pmp_misaligned_access_behavior |
cp_misaligned_off |
Verify that a misaligned access across an OFF entry’s region only sees the background entry. |
Standard region with A=OFF, L={0,1}, XWR=111. The same misaligned accesses as cp_misaligned_napot. |
Address-misaligned exception or success; never an access fault. |
~(3 lw + 3 sw + 1 lh + 1 lhu + 1 sh) offsets × 2 ends × 2 L |
pmp_a_field_off |
cp_misaligned_na4_wrap |
Verify that a doubleword that starts before and ends after a 4-byte region fails. |
RV64, G = 0. A 4-byte NA4 or TOR region with L={0,1}, XWR=111. ld and sd that start 2 bytes before the region and end 2 bytes after it. |
Address-misaligned exception or access fault (the entry matches only the middle bytes). Depends on MISALIGNED_LDST and MISALIGNED_LDST_EXCEPTION_PRIORITY. |
2 accesses × 2 L, per mode |
pmp_full_match_required |
Open item from the original plan: add mstatus.MXR to cp_cfg_R and cp_cfg_W. |
|||||
Open item from the original plan: add a check of the default (background) region. |
|||||
Open item from the original plan: add a check of different region types in combination. |
|||||
Open item from the original plan: a misaligned instruction or data access that spans a 4 KiB page boundary and translates to two physical pages, one outside the PMP region. Belongs in PMP_Sv. |
|||||
B.6.2. PMP_S Supervisor
General Test Environment (PMP_S): - Runs when S and Sm are implemented and NUM_PMP_ENTRIES > 0. The NA4, NAPOT and TOR test files also need PMP_NA4_SUPPORTED, PMP_NAPOT_SUPPORTED or PMP_TOR_SUPPORTED. - Boots to M-mode and programs the PMP there, then switches to S-mode (RVTEST_TSBI_GOTO_SMODE) for each set of probes and back to M-mode (RVTEST_TSBI_GOTO_MMODE). cp_mprv_* probes run in M-mode. - Background entry, grain, standard region, loads, stores and the fetch probe are as in PMP_Sm. - Entries under test are unlocked (L=0) unless a row says otherwise: R/W/X apply to S-mode accesses whatever L is.
| Coverpoint | Goal | Feature Description | Expectation | Bins | Normative Rule |
|---|---|---|---|---|---|
Permission bits |
|||||
cp_cfg_X |
Verify that X controls S-mode instruction fetch whether or not the entry is locked. |
One standard NAPOT region. Walk the six legal XWR values with L=1, then again with L=0, each in its own entry as in PMP_Sm cp_cfg_X. jalr to the start of the region from S-mode. |
Instruction access fault when X=0, for both L=0 and L=1. |
2 L × 6 XWR = 12 |
pmp_l_bit_m_mode_enforcement |
cp_cfg_R |
Verify that R controls every S-mode load width whether or not the entry is locked. |
Same walk as cp_cfg_X. Every load (lb, lbu, lh, lhu, lw (+ lwu, ld on RV64)) at the start of the region from S-mode. |
Load access fault when R=0, for both L=0 and L=1. |
2 L × 6 XWR × 5 loads = 60 (84 on RV64) |
pmp_load_fault |
cp_cfg_W |
Verify that W controls every S-mode store width whether or not the entry is locked. |
Same walk as cp_cfg_X. Every store (sb, sh, sw (+ sd on RV64)) at the start of the region from S-mode. |
Store/AMO access fault when W=0, for both L=0 and L=1. |
2 L × 6 XWR × 3 stores = 36 (48 on RV64) |
pmp_store_fault |
Address-matching modes |
|||||
cp_cfg_A_off_jalr |
Verify that an OFF entry does not match S-mode accesses. |
Entry 0: L=0, A=OFF, XWR=000, pmpaddr0 = all ones. jalr, lw and sw in the region from S-mode. |
All accesses succeed through the background entry. |
1 each |
pmp_a_field_off |
cp_cfg_A_napot_jalr |
Verify that XWR is enforced for S-mode across an unlocked NAPOT region and not outside it. |
PMP_NAPOT_SUPPORTED only. One standard NAPOT region, six legal XWR with L=0. jalr, lw and sw at base-4, base, base+4, the highest word and just past the top, from S-mode. |
Inside the region: access fault when the permission is clear. Outside: the access succeeds. |
6 XWR × 5 addresses = 30 each |
pmp_a_field_tor |
cp_cfg_A_na4_jalr |
Verify that XWR is enforced for S-mode on an unlocked NA4 region and not on its neighbors. |
PMP_NA4_SUPPORTED only. One NA4 region, six legal XWR with L=0. jalr, lw and sw at region-4, region and region+4, from S-mode. |
Access fault at the region when the permission is clear. The neighbors succeed. |
6 XWR × 3 addresses = 18 each |
pmp_a_field_tor |
cp_cfg_A_tor_jalr |
Verify that XWR is enforced for S-mode across an unlocked TOR region and not outside it. |
PMP_TOR_SUPPORTED only. One TOR region of one grain [bottom, top) from a pair of entries, six legal XWR with L=0. jalr, lw and sw at bottom-4, bottom, top-4 and top, from S-mode. |
Inside the region: access fault when the permission is clear. bottom-4 and top: the access succeeds. |
6 XWR × 4 addresses = 24 each |
pmp_a_field_tor |
MPRV |
|||||
cp_mprv_jalr |
Verify that M-mode loads and stores are checked as S-mode when mstatus.MPRV=1 and MPP=S, and that fetches are not. |
M-mode. Entry 0 over a standard region: L={0,1}, A=NAPOT, XWR={000, 111}. mstatus.MPP = S, MPRV = {0,1}. jalr, lw and sw in the region. |
XWR=111: all succeed. XWR=000: lw and sw fault when MPRV=1 (even with L=0) or when L=1, and succeed when MPRV=0 and L=0. jalr ignores MPRV: it faults only when L=1. |
2 MPRV × 2 L × 2 XWR = 8 each. MPP=M is not binned: with MPRV=1 it behaves as MPRV=0. |
pmp_exec_fault |
PMP CSR access |
|||||
cp_pmpaddr_access_s |
Verify that the pmpaddr CSRs are not accessible from S-mode. |
From S-mode, write all ones to pmpaddr0-63. |
Illegal-instruction exception on every write. |
64 CSRs |
pmp_csr_mode |
cp_pmpcfg_access_s |
Verify that the pmpcfg CSRs are not accessible from S-mode. |
From S-mode, write all ones to pmpcfg0-15. |
Illegal-instruction exception on every write. |
16 CSRs |
pmp_csr_mode |
Not yet implemented in ACT4 (no coverpoint or test yet) |
|||||
cp_none |
Verify that a S-mode access that matches no entry fails when PMP entries are implemented. |
No background entry. Program one entry that covers only the code the probes run from, then jalr, lw and sw from S-mode to an address that no entry matches. (The original plan cleared every entry, which faults on the first S-mode fetch and ends the test.) |
Instruction, load or store/AMO access fault. |
3 types of access |
pmp_no_entry_match |
B.6.3. PMP_U User
General Test Environment (PMP_U): - Runs when U and Sm are implemented and NUM_PMP_ENTRIES > 0. The NA4, NAPOT and TOR test files also need PMP_NA4_SUPPORTED, PMP_NAPOT_SUPPORTED or PMP_TOR_SUPPORTED. - Boots to M-mode and programs the PMP there, then switches to U-mode (RVTEST_TSBI_GOTO_UMODE) for each set of probes and back to M-mode (RVTEST_TSBI_GOTO_MMODE). cp_mprv_* probes run in M-mode. - Background entry, grain, standard region, loads, stores and the fetch probe are as in PMP_Sm. - Entries under test are unlocked (L=0) unless a row says otherwise: R/W/X apply to U-mode accesses whatever L is.
| Coverpoint | Goal | Feature Description | Expectation | Bins | Normative Rule |
|---|---|---|---|---|---|
Permission bits |
|||||
cp_cfg_X |
Verify that X controls U-mode instruction fetch whether or not the entry is locked. |
One standard NAPOT region. Walk the six legal XWR values with L=1, then again with L=0, each in its own entry as in PMP_Sm cp_cfg_X. jalr to the start of the region from U-mode. |
Instruction access fault when X=0, for both L=0 and L=1. |
2 L × 6 XWR = 12 |
pmp_l_bit_m_mode_enforcement |
cp_cfg_R |
Verify that R controls every U-mode load width whether or not the entry is locked. |
Same walk as cp_cfg_X. Every load (lb, lbu, lh, lhu, lw (+ lwu, ld on RV64)) at the start of the region from U-mode. |
Load access fault when R=0, for both L=0 and L=1. |
2 L × 6 XWR × 5 loads = 60 (84 on RV64) |
pmp_load_fault |
cp_cfg_W |
Verify that W controls every U-mode store width whether or not the entry is locked. |
Same walk as cp_cfg_X. Every store (sb, sh, sw (+ sd on RV64)) at the start of the region from U-mode. |
Store/AMO access fault when W=0, for both L=0 and L=1. |
2 L × 6 XWR × 3 stores = 36 (48 on RV64) |
pmp_store_fault |
Address-matching modes |
|||||
cp_cfg_A_off_jalr |
Verify that an OFF entry does not match U-mode accesses. |
Entry 0: L=0, A=OFF, XWR=000, pmpaddr0 = all ones. jalr, lw and sw in the region from U-mode. |
All accesses succeed through the background entry. |
1 each |
pmp_a_field_off |
cp_cfg_A_napot_jalr |
Verify that XWR is enforced for U-mode across an unlocked NAPOT region and not outside it. |
PMP_NAPOT_SUPPORTED only. One standard NAPOT region, six legal XWR with L=0. jalr, lw and sw at base-4, base, base+4, the highest word and just past the top, from U-mode. |
Inside the region: access fault when the permission is clear. Outside: the access succeeds. |
6 XWR × 5 addresses = 30 each |
pmp_a_field_tor |
cp_cfg_A_na4_jalr |
Verify that XWR is enforced for U-mode on an unlocked NA4 region and not on its neighbors. |
PMP_NA4_SUPPORTED only. One NA4 region, six legal XWR with L=0. jalr, lw and sw at region-4, region and region+4, from U-mode. |
Access fault at the region when the permission is clear. The neighbors succeed. |
6 XWR × 3 addresses = 18 each |
pmp_a_field_tor |
cp_cfg_A_tor_jalr |
Verify that XWR is enforced for U-mode across an unlocked TOR region and not outside it. |
PMP_TOR_SUPPORTED only. One TOR region of one grain [bottom, top) from a pair of entries, six legal XWR with L=0. jalr, lw and sw at bottom-4, bottom, top-4 and top, from U-mode. |
Inside the region: access fault when the permission is clear. bottom-4 and top: the access succeeds. |
6 XWR × 4 addresses = 24 each |
pmp_a_field_tor |
MPRV |
|||||
cp_mprv_jalr |
Verify that M-mode loads and stores are checked as U-mode when mstatus.MPRV=1 and MPP=U, and that fetches are not. |
M-mode. Entry 0 over a standard region: L={0,1}, A=NAPOT, XWR={000, 111}. mstatus.MPP = U, MPRV = {0,1}. jalr, lw and sw in the region. |
XWR=111: all succeed. XWR=000: lw and sw fault when MPRV=1 (even with L=0) or when L=1, and succeed when MPRV=0 and L=0. jalr ignores MPRV: it faults only when L=1. |
2 MPRV × 2 L × 2 XWR = 8 each. MPP=M is not binned: with MPRV=1 it behaves as MPRV=0. |
pmp_exec_fault |
PMP CSR access |
|||||
cp_pmpaddr_access_u |
Verify that the pmpaddr CSRs are not accessible from U-mode. |
From U-mode, write all ones to pmpaddr0-63. |
Illegal-instruction exception on every write. |
64 CSRs |
pmp_csr_mode |
cp_pmpcfg_access_u |
Verify that the pmpcfg CSRs are not accessible from U-mode. |
From U-mode, write all ones to pmpcfg0-15. |
Illegal-instruction exception on every write. |
16 CSRs |
pmp_csr_mode |
Not yet implemented in ACT4 (no coverpoint or test yet) |
|||||
cp_none |
Verify that a U-mode access that matches no entry fails when PMP entries are implemented. |
No background entry. Program one entry that covers only the code the probes run from, then jalr, lw and sw from U-mode to an address that no entry matches. (The original plan cleared every entry, which faults on the first U-mode fetch and ends the test.) |
Instruction, load or store/AMO access fault. |
3 types of access |
pmp_no_entry_match |
B.6.4. PMP_F Float
| Coverpoint | Goal | Feature Description | Expectation | Bins | Normative Rule |
|---|---|---|---|---|---|
General Test Environment (PMP_F): |
|||||
cp_cfg_R |
Verify that R controls floating-point loads when the entry is locked. |
Six legal XWR with L=1, one entry each (as in PMP_Sm cp_cfg_R). flh, flw and fld at the start of the region. |
Load access fault when R=0. |
6 XWR × 3 loads = 18 |
pmp_load_fault |
cp_cfg_W |
Verify that W controls floating-point stores when the entry is locked. |
Same walk. fsh, fsw and fsd at the start of the region. |
Store/AMO access fault when W=0. |
6 XWR × 3 stores = 18 |
pmp_store_fault |
B.6.5. PMP_Zca Compressed
| Coverpoint | Goal | Feature Description | Expectation | Bins | Normative Rule |
|---|---|---|---|---|---|
General Test Environment (PMP_Zca): |
|||||
Compressed loads and stores |
|||||
cp_cfg_R |
Verify that R controls every compressed load when the entry is locked. |
Six legal XWR with L=1, one entry each. Every compressed load at the start of the region. |
Load access fault when R=0. |
6 XWR × compressed loads. c.lwsp and c.ldsp are ignored in the cross. |
pmp_load_fault |
cp_cfg_W |
Verify that W controls every compressed store when the entry is locked. |
Same walk. Every compressed store at the start of the region. |
Store/AMO access fault when W=0. |
6 XWR × compressed stores |
pmp_store_fault |
32-bit fetch across a region boundary (IALIGN = 16) |
|||||
cp_misaligned_napot |
Verify that a 32-bit instruction straddling two NAPOT regions must be fully matched. |
PMP_NAPOT_SUPPORTED only. Three consecutive standard NAPOT regions A, B, C in entries 0-2, all L=1, XWR = 111, 111, 000. A 32-bit ret inside A, inside B, straddling A|B and straddling B|C. c.jalr to each. |
Inside a region: executes. A|B: instruction access fault, or executes if the hart splits the fetch into parcels that each match fully. B|C: instruction access fault (C has X=0). On a fault mepc holds the instruction address and a nonzero mtval holds the address of the faulting portion. |
4 addresses |
pmp_exec_fault |
cp_misaligned_tor |
Verify that a 32-bit instruction straddling two TOR regions must be fully matched. |
PMP_TOR_SUPPORTED only. Three consecutive one-grain TOR regions in entries 1-3 (entry 0 is OFF and holds the bottom), all L=1, XWR = 111, 111, 000. Same four ret positions as cp_misaligned_napot. |
As for cp_misaligned_napot. |
4 addresses |
pmp_exec_fault |
cp_misaligned_na4 |
Verify that a 32-bit instruction straddling two NA4 regions must be fully matched. |
PMP_NA4_SUPPORTED only (G = 0). Three consecutive NA4 regions in entries 0-2, all L=1, XWR = 111, 111, 000. A 32-bit ret straddling the first and second, and the second and third regions. c.jalr to each. |
First|second: instruction access fault, or executes if split. Second|third: instruction access fault. |
2 addresses |
pmp_exec_fault |
cp_misaligned_off |
Verify that a 32-bit instruction straddling OFF entries' regions only sees the background entry. |
Three consecutive regions in entries 0-2, all L=1, A=OFF, XWR=111. Same four ret positions as cp_misaligned_napot. |
All execute: the background entry matches every byte. |
4 addresses |
pmp_a_field_off |
16-bit fetch at a region boundary |
|||||
cp_cret_napot |
Verify that 16-bit instructions at the edges of a NAPOT region execute. |
PMP_NAPOT_SUPPORTED only. One standard NAPOT region in entry 0, L=1, XWR=111. c.ret 2 bytes below the region, at its base, 2 bytes below its top, and at its top. c.jalr to each. |
All execute: each 16-bit fetch lies wholly inside the region or wholly in the background. |
4 addresses |
pmp_full_match_required |
cp_cret_tor |
Verify that 16-bit instructions at the edges of a TOR region execute. |
PMP_TOR_SUPPORTED only. One one-grain TOR region in entry 1 (bottom in pmpaddr0), L=1, XWR=111. c.ret at the same four positions as cp_cret_napot. |
All execute. |
4 addresses |
pmp_full_match_required |
cp_cret_na4 |
Verify that 16-bit instructions at the edges of an NA4 region execute. |
PMP_NA4_SUPPORTED only. One NA4 region in entry 0, L=1, XWR=111. c.ret at region-2, region, region+2 and region+4. |
All execute. |
4 addresses |
pmp_full_match_required |
B.6.6. PMP_Zicbo CBOM/CBOZ
| Coverpoint | Goal | Feature Description | Expectation | Bins | Normative Rule |
|---|---|---|---|---|---|
General Test Environment (PMP_Zicbo): |
|||||
cp_cbo_zero |
Verify that cbo.zero needs W. |
Entry 0 over the region: L=1, XWR = 000, 001, 011. cbo.zero at the start of the region. |
Store/AMO access fault (mcause = 7, mtval = rs1) when W=0. Otherwise the block is zeroed. |
3 XWR |
pmp_store_fault |
cp_cbo_clean |
Verify that a cache-block management instruction needs R or W. |
Same setup. cbo.clean, cbo.flush and cbo.inval at the start of the region. |
XWR=000: store/AMO access fault (mtval = rs1). XWR = 001 or 011: no exception. |
3 XWR each |
cbm_unperm_fault |
cp_prefetch_i |
Verify that prefetches never trap on a PMP violation. |
Six legal XWR with L=1, one entry each. prefetch.i, prefetch.r and prefetch.w at the start of the region. |
No exception for any XWR. |
6 XWR each |
cbp_unperm_noexcep |
B.6.7. PMP_Zaamo AMO
| Coverpoint | Goal | Feature Description | Expectation | Bins | Normative Rule |
|---|---|---|---|---|---|
General Test Environment (PMP_Zaamo): |
|||||
cp_cfg_RW |
Verify that an AMO needs both R and W, and otherwise raises a store/AMO access fault without side effects. |
Six legal XWR with L=1, one entry each. Every AMO with rs1 at the start of the region. |
XWR = 011 or 111: the AMO completes. Otherwise: store/AMO access fault (mcause = 7); rd and memory are unchanged. |
6 XWR × 9 AMOs = 54 (108 on RV64) |
pmp_store_fault |
B.6.8. PMP_Zalrsc LR/SC
| Coverpoint | Goal | Feature Description | Expectation | Bins | Normative Rule |
|---|---|---|---|---|---|
General Test Environment (PMP_Zalrsc): |
|||||
cp_cfg_RW |
Verify that LR needs R and SC needs W. |
Six legal XWR with L=1, one entry each. lr then sc at the start of the region. When R=0 the lr faults, so the sc runs without a reservation. |
lr: load access fault (mcause = 5) when R=0. sc: store/AMO access fault (mcause = 7) when W=0, with or without a reservation; otherwise the sc stores. |
6 XWR × 2 instructions = 12 (24 on RV64) |
pmp_load_fault |
B.6.9. PMP_Sv Virtual Memory
| Coverpoint | Goal | Feature Description | Expectation | Bins | ID | Normative Rule |
|---|---|---|---|---|---|---|
General Test Environment (PMP_Sv): |
||||||
mode |
Verify each supported translation mode is exercised with PMP |
Sampled while the PMP_Sv tests run under satp.MODE = Sv32, Sv39, Sv48 or Sv57. |
Every supported mode is observed. |
mode {sv57, sv48, sv39, sv32} |
||
pmp0_pte_noread_s |
Verify PMP applies to the implicit page-table read of a load from S-mode |
S-mode: PMP entry 0 (NAPOT) covers the page table used by the walk, at each level, with R=0; the background PMP region allows everything else. Load (lw) from the page through va_data. |
Load access fault (mcause = 5); mtval = faulting virtual address. |
PageType_d x PMP0_PTE x load_acc_fault x lw x mode {S-mode} |
pmp_check_pagetable_access pmp_with_paging pmp_sfence_required |
pmp_check_pagetable_access |
pmp0_pte_noread_u |
Verify PMP applies to the implicit page-table read of a load from U-mode |
U-mode: PMP entry 0 (NAPOT) covers the page table used by the walk, at each level, with R=0; the background PMP region allows everything else. Load (lw) from the page through va_data. |
Load access fault (mcause = 5); mtval = faulting virtual address. |
PageType_d x PMP0_PTE x load_acc_fault x lw x mode {U-mode} |
pmp_check_pagetable_access pmp_with_paging pmp_sfence_required |
pmp_check_pagetable_access |
pmp0_pte_nowrite_s |
Verify PMP applies to the implicit page-table read of a store from S-mode |
S-mode: PMP entry 0 (NAPOT) covers the page table used by the walk, at each level, with R=0; the background PMP region allows everything else. Store (sw) to the page through va_data. |
Store/AMO access fault (mcause = 7); mtval = faulting virtual address. |
PageType_d x PMP0_PTE x store_acc_fault x sw x mode {S-mode} |
pmp_check_pagetable_access pmp_with_paging pmp_sfence_required |
pmp_check_pagetable_access |
pmp0_pte_nowrite_u |
Verify PMP applies to the implicit page-table read of a store from U-mode |
U-mode: PMP entry 0 (NAPOT) covers the page table used by the walk, at each level, with R=0; the background PMP region allows everything else. Store (sw) to the page through va_data. |
Store/AMO access fault (mcause = 7); mtval = faulting virtual address. |
PageType_d x PMP0_PTE x store_acc_fault x sw x mode {U-mode} |
pmp_check_pagetable_access pmp_with_paging pmp_sfence_required |
pmp_check_pagetable_access |
pmp0_pte_noexec_s |
Verify PMP applies to the implicit page-table read of an instruction fetch from S-mode |
S-mode: PMP entry 0 (NAPOT) covers the page table used by the walk, at each level, with R=0; the background PMP region allows everything else. Jump (jalr) into the page through va_data. |
Instruction access fault (mcause = 1); mtval = faulting virtual address. |
PageType_i x PMP0_PTE x ins_acc_fault x jalr x mode {S-mode} |
pmp_check_pagetable_access pmp_with_paging pmp_sfence_required |
pmp_check_pagetable_access |
pmp0_pte_noexec_u |
Verify PMP applies to the implicit page-table read of an instruction fetch from U-mode |
U-mode: PMP entry 0 (NAPOT) covers the page table used by the walk, at each level, with R=0; the background PMP region allows everything else. Jump (jalr) into the page through va_data. |
Instruction access fault (mcause = 1); mtval = faulting virtual address. |
PageType_i x PMP0_PTE x ins_acc_fault x jalr x mode {U-mode} |
pmp_check_pagetable_access pmp_with_paging pmp_sfence_required |
pmp_check_pagetable_access |
pmp0_PA_noread_s |
Verify PMP applies to the translated physical address of a load from S-mode |
S-mode: valid leaf PTE with PTE.U=0 at every page-table level (4 KiB page and each superpage size of the Sv mode); PMP entry 0 removes R from the translated physical page. Load (lw) from the page through va_data. |
Load access fault (mcause = 5); mtval = faulting virtual address. |
PTE_d x PageType_d x PMP0_PA x load_acc_fault x read_acc x mode {S-mode} |
mtval_vaddr_not_paddr |
mtval_vaddr_not_paddr |
pmp0_PA_noread_u |
Verify PMP applies to the translated physical address of a load from U-mode |
U-mode: valid leaf PTE with PTE.U=1 at every page-table level (4 KiB page and each superpage size of the Sv mode); PMP entry 0 removes R from the translated physical page. Load (lw) from the page through va_data. |
Load access fault (mcause = 5); mtval = faulting virtual address. |
PTE_d x PageType_d x PMP0_PA x load_acc_fault x read_acc x mode {U-mode} |
mtval_vaddr_not_paddr |
mtval_vaddr_not_paddr |
pmp0_PA_nowrite_s |
Verify PMP applies to the translated physical address of a store from S-mode |
S-mode: valid leaf PTE with PTE.U=0 at every page-table level (4 KiB page and each superpage size of the Sv mode); PMP entry 0 removes W from the translated physical page. Store (sw) to the page through va_data. |
Store/AMO access fault (mcause = 7); mtval = faulting virtual address. |
PTE_d x PageType_d x PMP0_PA x store_acc_fault x write_acc x mode {S-mode} |
mtval_vaddr_not_paddr |
mtval_vaddr_not_paddr |
pmp0_PA_nowrite_u |
Verify PMP applies to the translated physical address of a store from U-mode |
U-mode: valid leaf PTE with PTE.U=1 at every page-table level (4 KiB page and each superpage size of the Sv mode); PMP entry 0 removes W from the translated physical page. Store (sw) to the page through va_data. |
Store/AMO access fault (mcause = 7); mtval = faulting virtual address. |
PTE_d x PageType_d x PMP0_PA x store_acc_fault x write_acc x mode {U-mode} |
mtval_vaddr_not_paddr |
mtval_vaddr_not_paddr |
pmp0_PA_noexec_s |
Verify PMP applies to the translated physical address of an instruction fetch from S-mode |
S-mode: valid leaf PTE with PTE.U=0 at every page-table level (4 KiB page and each superpage size of the Sv mode); PMP entry 0 removes X from the translated physical page. Jump (jalr) into the page through va_data. |
Instruction access fault (mcause = 1); mtval = faulting virtual address. |
PTE_i x PageType_i x PMP0_PA x ins_acc_fault x exec_acc x mode {S-mode} |
mtval_vaddr_not_paddr |
mtval_vaddr_not_paddr |
pmp0_PA_noexec_u |
Verify PMP applies to the translated physical address of an instruction fetch from U-mode |
U-mode: valid leaf PTE with PTE.U=1 at every page-table level (4 KiB page and each superpage size of the Sv mode); PMP entry 0 removes X from the translated physical page. Jump (jalr) into the page through va_data. |
Instruction access fault (mcause = 1); mtval = faulting virtual address. |
PTE_i x PageType_i x PMP0_PA x ins_acc_fault x exec_acc x mode {U-mode} |
mtval_vaddr_not_paddr |
mtval_vaddr_not_paddr |
B.6.10. PMP_SvZicbo Virtual Memory + CBOM/CBOZ
| Coverpoint | Goal | Feature Description | Expectation | Bins | ID | Normative Rule |
|---|---|---|---|---|---|---|
General Test Environment (PMP_SvZicbo): |
||||||
cp_PA_PMP_rw_unset_cbo_s |
Verify PMP applies to CBOs on the translated physical address from S-mode |
S-mode: valid leaf PTE with PTE.U=0 at every page-table level (4 KiB page and each superpage size of the Sv mode); PMP entry 0 removes R and W from the translated physical page. Execute Zicbom (cbo.clean/flush/inval) or Zicboz (cbo.zero) on va_data. |
Store/AMO access fault (mcause = 7). |
PTE_s x PageType_d x PMP_perm x cbo_ins x store_acc_fault x mode {S-mode} |
cbm_unperm_fault cbz_unperm_fault |
cbm_unperm_fault |
cp_PA_PMP_rw_unset_cbo_u |
Verify PMP applies to CBOs on the translated physical address from U-mode |
U-mode: valid leaf PTE with PTE.U=1 at every page-table level (4 KiB page and each superpage size of the Sv mode); PMP entry 0 removes R and W from the translated physical page. Execute Zicbom (cbo.clean/flush/inval) or Zicboz (cbo.zero) on va_data. |
Store/AMO access fault (mcause = 7). |
PTE_u x PageType_d x PMP_perm x cbo_ins x store_acc_fault x mode {U-mode} |
cbm_unperm_fault cbz_unperm_fault |
cbm_unperm_fault |
cp_PTE_PMP_rw_unset_cbo_s |
Verify PMP applies to the page-table read made by a CBO from S-mode |
S-mode: PMP entry 0 removes R from the page table used by the walk, at each level. Execute Zicbom or Zicboz on va_data. |
Store/AMO access fault (mcause = 7). |
PTE_s x PageType_d x PMP_perm x cbo_ins x store_acc_fault x mode {S-mode} |
cbp_unperm_translate pmp_check_pagetable_access |
pmp_check_pagetable_access |
cp_PTE_PMP_rw_unset_cbo_u |
Verify PMP applies to the page-table read made by a CBO from U-mode |
U-mode: PMP entry 0 removes R from the page table used by the walk, at each level. Execute Zicbom or Zicboz on va_data. |
Store/AMO access fault (mcause = 7). |
PTE_u x PageType_d x PMP_perm x cbo_ins x store_acc_fault x mode {U-mode} |
cbp_unperm_translate pmp_check_pagetable_access |
pmp_check_pagetable_access |
B.6.11. PMP_HSvZicbo Hypervisor Virtual Memory + CBOM/CBOZ
PMP_HSvZicbo boots to M-mode, which programs PMP, and delegates nothing, so every trap is taken in M-mode. It runs with Sv39x4 and VS-stage Sv39 on RV64, or Sv32x4 and VS-stage Sv32 on RV32, and needs at least two PMP entries, NAPOT support and a PMP granularity of at most 4 KiB. PMP entry 0 is a NAPOT region covering the 4 KiB test page; the last entry is the background region. The guest translation and other CBO cases are in the Sv suite’s Sv_HZicbo group.
| Coverpoint | Goal | Feature Description | Expectation | Bins | Normative Rule | Notes |
|---|---|---|---|---|---|---|
cp_pmp |
PMP checks the final supervisor physical address of a CBO from VS-mode and VU-mode |
Environment: VS-stage and G-stage translation are valid and permit the access. PMP entry 0 covers the test page with XWR = 000, then with XWR = 001 (read only). |
XWR = 000: store/AMO access fault (mcause = 7) for every CBO. |
{VS, VU} x {cbo.clean, cbo.flush, cbo.inval, cbo.zero} x {VS-stage page, G-stage page} x pmpcfg0 XWR {000, 001} |
pmp_store_fault |
XWR = 001 follows cmo.adoc cbm_access (a cache-block management instruction may access a block whenever a load or a store may), as Sail and Spike do; machine.adoc pmp_cbm_fault defers to it. |
B.6.12. PMP_Svadu Page Table Update
| Coverpoint | Goal | Feature Description | Expectation | Bins | ID | Normative Rule |
|---|---|---|---|---|---|---|
General Test Environment (PMP_Svadu): |
||||||
Abit_unset_pmpW_unset_exec_s |
Verify PMP applies to the hardware PTE.A update of an instruction fetch from S-mode |
S-mode: menvcfg.ADUE=1; page tables in a PMP region with W=0; leaf PTE with A=0 and PTE.U=0; satp points at each top-level table in turn. Jump (jalr) into the page through va_data. |
Instruction access fault (mcause = 1) from the implicit PTE write. |
PTE_Abit_unset_s_i x PageType_i x Svadu_enabled x PMP_pagetable x jalr x ins_acc_fault x mode {S-mode} |
Svadu_hw_update_a_d_bits pmp_check_pagetable_access |
pmp_check_pagetable_access |
Abit_unset_pmpW_unset_exec_u |
Verify PMP applies to the hardware PTE.A update of an instruction fetch from U-mode |
U-mode: menvcfg.ADUE=1; page tables in a PMP region with W=0; leaf PTE with A=0 and PTE.U=1; satp points at each top-level table in turn. Jump (jalr) into the page through va_data. |
Instruction access fault (mcause = 1) from the implicit PTE write. |
PTE_Abit_unset_u_i x PageType_i x Svadu_enabled x PMP_pagetable x jalr x ins_acc_fault x mode {U-mode} |
Svadu_hw_update_a_d_bits pmp_check_pagetable_access |
Svadu_hw_update_a_d_bits |
Abit_unset_pmpW_unset_read_s |
Verify PMP applies to the hardware PTE.A update of a load from S-mode |
S-mode: menvcfg.ADUE=1; page tables in a PMP region with W=0; leaf PTE with A=0 and PTE.U=0; satp points at each top-level table in turn. Load (lw) from the page through va_data. |
Load access fault (mcause = 5) from the implicit PTE write. |
PTE_Abit_unset_s_d x PageType_d x Svadu_enabled x PMP_pagetable x lw x load_acc_fault x mode {S-mode} |
Svadu_hw_update_a_d_bits pmp_check_pagetable_access |
pmp_check_pagetable_access |
Abit_unset_pmpW_unset_read_u |
Verify PMP applies to the hardware PTE.A update of a load from U-mode |
U-mode: menvcfg.ADUE=1; page tables in a PMP region with W=0; leaf PTE with A=0 and PTE.U=1; satp points at each top-level table in turn. Load (lw) from the page through va_data. |
Load access fault (mcause = 5) from the implicit PTE write. |
PTE_Abit_unset_u_d x PageType_d x Svadu_enabled x PMP_pagetable x lw x load_acc_fault x mode {U-mode} |
Svadu_hw_update_a_d_bits pmp_check_pagetable_access |
Svadu_hw_update_a_d_bits |
Abit_unset_pmpW_unset_write_s |
Verify PMP applies to the hardware PTE.A update of a store from S-mode |
S-mode: menvcfg.ADUE=1; page tables in a PMP region with W=0; leaf PTE with A=0 and PTE.U=0; satp points at each top-level table in turn. Store (sw) to the page through va_data. |
Store/AMO access fault (mcause = 7) from the implicit PTE write. |
PTE_Abit_unset_s_d x PageType_d x Svadu_enabled x PMP_pagetable x sw x store_acc_fault x mode {S-mode} |
Svadu_hw_update_a_d_bits pmp_check_pagetable_access |
Svadu_hw_update_a_d_bits |
Abit_unset_pmpW_unset_write_u |
Verify PMP applies to the hardware PTE.A update of a store from U-mode |
U-mode: menvcfg.ADUE=1; page tables in a PMP region with W=0; leaf PTE with A=0 and PTE.U=1; satp points at each top-level table in turn. Store (sw) to the page through va_data. |
Store/AMO access fault (mcause = 7) from the implicit PTE write. |
PTE_Abit_unset_u_d x PageType_d x Svadu_enabled x PMP_pagetable x sw x store_acc_fault x mode {U-mode} |
Svadu_hw_update_a_d_bits pmp_check_pagetable_access |
pmp_check_pagetable_access |
Dbit_unset_pmpW_unset_write_s |
Verify PMP applies to the hardware PTE.D update of a store from S-mode |
S-mode: menvcfg.ADUE=1; page tables in a PMP region with W=0; leaf PTE with A=1, D=0 and PTE.U=0. Store (sw) through va_data. |
Store/AMO access fault (mcause = 7) from the implicit PTE write. |
PTE_Dbit_unset_s_d x PageType_d x Svadu_enabled x PMP_pagetable x sw x store_acc_fault x mode {S-mode} |
Svadu_hw_update_a_d_bits pmp_check_pagetable_access |
pmp_check_pagetable_access |
Dbit_unset_pmpW_unset_write_u |
Verify PMP applies to the hardware PTE.D update of a store from U-mode |
U-mode: menvcfg.ADUE=1; page tables in a PMP region with W=0; leaf PTE with A=1, D=0 and PTE.U=1. Store (sw) through va_data. |
Store/AMO access fault (mcause = 7) from the implicit PTE write. |
PTE_Dbit_unset_u_d x PageType_d x Svadu_enabled x PMP_pagetable x sw x store_acc_fault x mode {U-mode} |
Svadu_hw_update_a_d_bits pmp_check_pagetable_access |
Svadu_hw_update_a_d_bits |
B.6.13. PMP Normative Rules
| Normative Rule | Rule Text | Coverpoints |
|---|---|---|
pmp_load_fault |
PMP_F_cg/cp_cfg_R, PMP_S_cg/{cp_cfg_R, cp_mprv_lw}, PMP_Sm_cg/cp_cfg_R, PMP_Zalrsc_cg/cp_cfg_RW, PMP_F_cg/cp_cfg_R, PMP_Zca_cg/cp_cfg_R, PMP_U_cg/{cp_cfg_R, cp_mprv_lw}, PMP_Zalrsc_cg/cp_cfg_RW, PMP_Zca_cg/cp_cfg_R |
|
pmp_store_fault |
PMP_F_cg/cp_cfg_W, PMP_S_cg/{cp_cfg_W, cp_mprv_sw}, PMP_Sm_cg/cp_cfg_W, PMP_Zalrsc_cg/cp_cfg_RW, PMP_Zaamo_cg/cp_cfg_RW, PMP_Zicbo_cg/cp_cbo_zero, PMP_U_cg/{cp_cfg_W, cp_mprv_sw}, PMP_Zaamo_cg/cp_cfg_RW, PMP_Zalrsc_cg/cp_cfg_RW, PMP_Zca_cg/cp_cfg_W, PMP_HSvZicbo_cg/cp_pmp, PMP_Zicbo_cg/cp_cbo_zero |
|
pmp_l_bit_m_mode_enforcement |
PMP_F_cg/{cp_cfg_R, cp_cfg_W}, PMP_S_cg/{cp_cfg_X, cp_mprv_lw, cp_mprv_sw}, PMP_Sm_cg/{cp_cfg_X0_all, cp_cfg_L_access_exec, cp_cfg_L_access_read, cp_cfg_L_access_write}, PMP_U_cg/{cp_cfg_X, cp_mprv_lw, cp_mprv_sw}, PMP_Zaamo_cg/cp_cfg_RW |
|
pmp_check_priv_modes |
PMP_S_cg/{cp_cfg_X, cp_cfg_R, cp_mprv_lw, cp_mprv_sw}, PMP_U_cg/{cp_cfg_X, cp_cfg_R, cp_mprv_lw, cp_mprv_sw} |
|
pmp_csr_mode |
PMP_S_cg/{cp_pmpaddr_access_s, cp_pmpcfg_access_s}, PMP_U_cg/{cp_pmpaddr_access_u, cp_pmpcfg_access_u} |
|
pmp_addr_registers |
The PMP address registers are CSRs named pmpaddr0-pmpaddr63. |
PMP_S_cg/cp_pmpaddr_access_s, PMP_Sm_cg/{cp_pmpaddr_upper_zero, cp_grain_check_write}, PMP_U_cg/cp_pmpaddr_access_u |
pmp_rwx_check |
PMP_S_cg/{cp_cfg_X, cp_cfg_R, cp_cfg_W}, PMP_Sm_cg/{cp_cfg_X, cp_cfg_R, cp_cfg_W, cp_cfg_L_access_read}, PMP_U_cg/{cp_cfg_X, cp_cfg_R, cp_cfg_W} |
|
pmp_cfg_permissions |
PMP_S_cg/{cp_cfg_X, cp_cfg_R, cp_cfg_W}, PMP_Sm_cg/{cp_cfg_X, cp_cfg_R, cp_cfg_W, cp_cfg_X1_all}, PMP_U_cg/{cp_cfg_X, cp_cfg_R, cp_cfg_W}, PMP_Zca_cg/{cp_cfg_R, cp_cfg_W} |
|
pmp_access_fault_exception |
Failed memory operations generate an instruction, load, or store access-fault exception. |
PMP_S_cg/{cp_cfg_X, cp_cfg_R, cp_cfg_W}, PMP_Sm_cg/{cp_cfg_X, cp_cfg_R, cp_cfg_W, cp_cfg_A_napot_all}, PMP_U_cg/{cp_cfg_X, cp_cfg_R, cp_cfg_W} |
pmp_exec_fault |
PMP_S_cg/{cp_cfg_X, cp_mprv_jalr}, PMP_Sm_cg/{cp_cfg_X, cp_cfg_X0_all, cp_cfg_A_napot_x, cp_cfg_A_tor_x}, PMP_U_cg/{cp_cfg_X, cp_mprv_jalr}, PMP_Zca_cg/{cp_misaligned_napot, cp_misaligned_tor, cp_misaligned_na4} |
|
pmp_a_field_off |
When A=0, this PMP entry is disabled and matches no addresses. |
PMP_S_cg/{cp_cfg_A_off_jalr, cp_cfg_A_off_lw, cp_cfg_A_off_sw}, PMP_Sm_cg/{cp_cfg_A_OFF_all_read, cp_cfg_A_OFF_all_write, cp_cfg_A_OFF_all_exec, cp_priority_off_lw}, PMP_U_cg/{cp_cfg_A_off_jalr, cp_cfg_A_off_lw, cp_cfg_A_off_sw}, PMP_Zca_cg/cp_misaligned_off |
pmp_a_field_tor |
PMP_S_cg/{cp_cfg_A_tor_lw, cp_cfg_A_na4_lw, cp_cfg_A_napot_lw}, PMP_Sm_cg/{cp_cfg_A_tor_r, cp_cfg_A_tor0_r, cp_cfg_A_tor_bot_L1_r, cp_cfg_A_tor_nonoverlap2_r}, PMP_U_cg/{cp_cfg_A_tor_lw, cp_cfg_A_na4_lw, cp_cfg_A_napot_lw} |
|
pmp_a_field_napot_na4 |
PMP_S_cg/{cp_cfg_A_tor_lw, cp_cfg_A_na4_lw, cp_cfg_A_napot_lw}, PMP_Sm_cg/{cp_cfg_A_napot_all, cp_cfg_A_napot_r, cp_cfg_A_NA4_all, cp_cfg_A_na4_r}, PMP_U_cg/{cp_cfg_A_tor_lw, cp_cfg_A_na4_lw, cp_cfg_A_napot_lw} |
|
pmp_l_bit_function |
PMP_Sm_cg/cp_cfg_L_modify |
|
pmp_mmode_locking |
PMP_Sm_cg/{cp_cfg_L_modify, cp_cfg_X, cp_cfg_R, cp_cfg_W} |
|
pmp_l_bit_write_protection |
PMP_Sm_cg/cp_cfg_L_modify |
|
pmp_locked_until_reset |
PMP_Sm_cg/cp_cfg_L_modify |
|
pmp_na4_select_restriction |
PMP_Sm_cg/{cp_cfg_A_all_even, cp_cfg_A_all_odd} |
|
pmp_a_field_encoding |
PMP_Sm_cg/{cp_cfg_A_all_even, cp_cfg_A_OFF_all_read, cp_cfg_A_napot_all, cp_cfg_A_tor_r} |
|
pmp_napot_encoding_low_bits |
PMP_Sm_cg/{cp_cfg_A_napot_all, cp_cfg_A_napot_x, cp_cfg_A_napot_r, cp_cfg_A_napot_w} |
|
pmp_entry_priority |
PMP_Sm_cg/{cp_priority_lw, cp_priority_sw, cp_priority_off_lw}, PMP_Zca_cg/cp_misaligned_napot, PMP_Zca_cg/{cp_misaligned_napot, cp_misaligned_tor, cp_misaligned_na4} |
|
pmp_napot_addr_read_mask |
PMP_Sm_cg/{cp_grain_OFF_to_NAPOT, cp_grain_NAPOT_to_NAPOT} |
|
pmp_tor_off_addr_read_mask |
PMP_Sm_cg/{cp_grain_OFF_to_OFF, cp_grain_OFF_to_TOR, cp_grain_NAPOT_to_OFF, cp_grain_NAPOT_to_TOR} |
|
pmp_granularity |
PMP_Sm_cg/{cp_grain_check_write, cp_grain_check_read, cp_cfg_A_NA4_all} |
|
pmp_region_granularity_g |
PMP_Sm_cg/{cp_grain_check_write, cp_grain_check_read} |
|
pmp_mmode_only_regions |
Descriptive spec text with no separately testable behavior |
|
pmp_addr_warl |
Not all physical address bits may be implemented, and so the pmpaddr registers are WARL. |
PMP_Sm_cg/{cp_pmpaddr_upper_zero, cp_grain_check_write} |
pmp_csrs_warl_access |
PMP_Sm_cg/{cp_pmpcfg_walk, cp_cfg_A_all_even, cp_grain_check_write, cp_pmpaddr_upper_zero} |
|
pmp_addr_encoding |
PMP_Sm_cg/{cp_pmpaddr_upper_zero, cp_cfg_A_tor_r, cp_cfg_A_napot_r} |
|
pmp_cfg_rv32_layout |
PMP_Sm_cg/{cp_pmpcfg_walk, cp_pmpcfg_walk_odd, cp_cfg_A_tor_all3, cp_cfg_A_tor_all4} |
|
pmp_cfg_rv64_layout |
PMP_Sm_cg/{cp_pmpcfg_walk, cp_cfg_A_tor_all7, cp_cfg_A_tor_all8, cp_pmp64_read} |
|
pmp_cfg_rv64_illegal |
For RV64, the odd-numbered configuration registers, pmpcfg1, pmpcfg3, …, pmpcfg15, are illegal. |
TODO: access the odd-numbered pmpcfg CSRs on RV64 and check for an illegal-instruction exception |
pmp_rwx_warl |
PMP_Sm_cg/cp_pmpcfg_walk |
|
pmp_full_match_required |
PMP_Zca_cg/{cp_misaligned_napot, cp_misaligned_tor, cp_misaligned_na4}, PMP_Zca_cg/{cp_cret_tor, cp_cret_napot, cp_cret_na4, cp_misaligned_tor} |
|
pmp_violation_precise_trap |
PMP violations are always trapped precisely at the processor. |
PMP_Zaamo_cg/cp_cfg_RW, PMP_Zaamo_cg/cp_cfg_RW |
pmp_entry_count |
PMP_Sm_cg/{cp_pmp64_read, cp_pmp64_write} |
|
pmp_misaligned_access_behavior |
PMP_Zca_cg/{cp_misaligned_napot, cp_misaligned_tor, cp_misaligned_na4, cp_misaligned_off}, TODO: misaligned loads and stores that straddle two PMP regions |
|
pmp_no_entry_match |
PMP_Sm_cg/{cp_none_lw, cp_none_sw, cp_none_jalr}, TODO: S-mode and U-mode accesses that match no PMP entry |
|
pmp_addr_retention_on_mode_change |
PMP_Sm_cg/{cp_grain_OFF_to_NAPOT, cp_grain_NAPOT_to_OFF, cp_grain_NAPOT_to_TOR} |
|
pmp_entry_structure |
PMP_Sm_cg/cp_pmpcfg_walk |
|
mcause_exccode_st_sc_amo |
store, store-conditional, and AMO instructions generate store/AMO exceptions. |
PMP_Zaamo_cg/cp_cfg_RW |
sc_retire_permission |
No SC.W instruction shall retire unless it passes memory permission checks, |
PMP_Zalrsc_cg/cp_cfg_RW |
mcause_exccode_ld_ldrsv |
Note that load and load-reserved instructions generate load exceptions |
PMP_Zalrsc_cg/cp_cfg_RW |
mtval_varlen_wr |
PMP_Zca_cg/{cp_misaligned_tor, cp_misaligned_napot, cp_misaligned_na4}, TODO: instruction page fault on the second half of a 32-bit instruction that straddles a page |
|
mepc_varlen_wr |
PMP_Zca_cg/{cp_misaligned_tor, cp_misaligned_napot, cp_misaligned_na4} |
|
Zca_align16 |
PMP_Zca_cg/{cp_misaligned_napot, cp_misaligned_tor} |
|
cbm_unperm_fault |
PMP_Zicbo_cg/{cp_cbo_inval, cp_cbo_flush, cp_cbo_clean}, PMP_SvZicbo_cg/{cp_PA_PMP_rw_unset_cbo_s,cp_PA_PMP_rw_unset_cbo_u} |
|
pmp_cbm_fault |
PMP_Zicbo_cg/{cp_cbo_inval, cp_cbo_flush, cp_cbo_clean}, PMP_HSvZicbo_cg/cp_pmp |
|
cbz_unperm_fault |
PMP_Zicbo_cg/cp_cbo_zero, PMP_SvZicbo_cg/{cp_PA_PMP_rw_unset_cbo_s,cp_PA_PMP_rw_unset_cbo_u} |
|
cbp_unperm_noexcep |
PMP_Zicbo_cg/{cp_prefetch_w, cp_prefetch_r, cp_prefetch_i} |
|
cbm_access |
PMP_Zicbo_cg/{cp_cbo_clean, cp_cbo_flush, cp_cbo_inval} |
|
cbz_access |
PMP_Zicbo_cg/cp_cbo_zero |
|
fault_excep_csr |
PMP_Zicbo_cg/{cp_cbo_zero, cp_cbo_clean}, PMP_SvZicbo_cg/{cp_PA_PMP_rw_unset_cbo_s,cp_PA_PMP_rw_unset_cbo_u} |
|
pmp_check_pagetable_access |
PMP_Sv_cg/pmp0_pte_{noread,nowrite,noexec}_s, PMP_SvZicbo_cg/{cp_PTE_PMP_rw_unset_cbo_s,cp_PTE_PMP_rw_unset_cbo_u}, PMP_Svadu_cg/{Abit_unset_pmpW_unset_exec_s, Abit_unset_pmpW_unset_read_s, Abit_unset_pmpW_unset_write_u, Dbit_unset_pmpW_unset_write_s} |
|
pmp_with_paging |
PMP_Sv_cg/pmp0_pte_{noread,nowrite,noexec}_s, PMP_SvZicbo_cg/{cp_PTE_PMP_rw_unset_cbo_s,cp_PTE_PMP_rw_unset_cbo_u} |
|
pmp_speculative_translations |
Not tested: when translations and PMP checks are cached is not observable |
|
pmp_sfence_required |
Not tested: the tests always execute SFENCE.VMA after writing the PMP CSRs |
|
mtval_vaddr_not_paddr |
PMP_Sv_cg/pmp0_PA_{noread,nowrite,noexec}_s |
|
Svadu_hw_update_a_d_bits |
If the Svadu extension is implemented, the menvcfg.ADUE field is writable. |
PMP_Svadu_cg/{Abit_unset_pmpW_unset_exec_s, Abit_unset_pmpW_unset_read_s, Abit_unset_pmpW_unset_write_u, Dbit_unset_pmpW_unset_write_s} |
H_pmp |
PMP_HSvZicbo_cg/cp_pmp |
UDB Parameters: None.
B.7. Sv* Virtual Memory
B.7.1. Sv Virtual Memory
The Sv suite has one covergroup and test plan per group: the base Sv group, then Sm, Zicbo and the Exceptions groups.
The UDB configuration file determines whether to run tests for Sv32, or for Sv39 and possibly Sv48 and Sv57.
Coverpoints that need M-mode state (mstatus.MPRV, mstatus.TVM, mstatus.SBE, or an M-mode CSR access)
are in the Sm groups.
The PMP_Sv, PMP_SvZicbo and PMP_Svadu groups of the PMP suite boot to M-mode because they program PMP entries.
| Coverpoint | Goal | Feature Description | Expectation | Bins | ID | Normative Rule |
|---|---|---|---|---|---|---|
General Test Environment (Sv): |
||||||
satp_asid_PPN |
Verify the satp ASID and PPN fields hold zero and non-zero values |
S-mode: read satp before translation is enabled (all fields 0). Then write satp with the current MODE, PPN = the identity-mapped root page table and ASID = 0, followed by writes with ASID bits set. Read satp back after each write. |
satp[59:0] (satp[30:0] on RV32) reads 0 before translation is enabled and the written non-zero ASID/PPN afterwards. |
satp_asid_PPN {all_zero, not_zero} |
satp_sz satp_acc satp_op satp_mode |
satp |
asid_length |
Verify every implemented ASID bit is writable (determine ASIDLEN) |
S-mode, with satp.MODE set and PPN = root page table: write ASID = all ones and read it back, then walk a single 1 through each ASID bit (16 bits on RV64, 9 on RV32), reading satp back each time. |
Implemented ASID bits (the ASIDLEN least-significant bits) read back as written; unimplemented bits read 0. |
asid_length {values} |
ASIDLEN |
asidlen |
cp_access_u |
Verify satp is not accessible from U-mode |
With mstatus.TVM=0, switch to U-mode with RVTEST_TSBI_GOTO_UMODE and execute csrrw, csrrs and csrrc on satp, then return with RVTEST_TSBI_GOTO_SMODE. |
Illegal-instruction exception (scause = 2) for each access; satp is unchanged. |
Scause x tvm_mstatus x mode {U-mode} |
satp_sz satp_acc satp_op satp_mode |
satp |
cp_access_s |
Verify satp is readable and writable from S-mode with csrrw, csrrs and csrrc |
S-mode with mstatus.TVM=0 and scause cleared: csrrw satp with 4, csrrs with 8, csrrc with 4, reading satp back after each (satp.MODE stays Bare). |
No exception; each read returns the value produced by the write. |
cp_ins x Scause x tvm_mstatus x mode {S-mode} |
satp_sz satp_acc satp_op satp_mode |
satp |
cp_VA_i_mode |
Verify instruction fetch at the lowest and highest virtual addresses of the translation mode |
S-mode: map a 4 KiB execute-only page at VA 0 and at the highest aligned VA of the current mode (all ones); jump (jalr) to each and return. |
No fault; execution runs at the extreme VA and returns. |
mode_supported x VA_i |
satp_mode_sxlen32 satp_mode_sxlen64 satp_mode_sz satp_mode_acc satp_mode_op |
satp_mode_sxlen32 |
cp_VA_d_mode |
Verify loads and stores at the lowest and highest virtual addresses of the translation mode |
S-mode: map a 4 KiB read/write page at VA 0 and at the all-ones VA of the current mode; store and load a byte at each (a word at VA 0 for Sv32 and Sv39). |
No fault; each load returns the value stored. |
mode_supported x VA_d |
satp_mode_sxlen32 satp_mode_sxlen64 satp_mode_sz satp_mode_acc satp_mode_op |
satp_mode_sxlen32 |
cp_ins |
Verify SFENCE.VMA executes in S-mode |
Every Sv test executes sfence.vma x0, x0 in S-mode after each page-table update; the global-PTE test also executes sfence.vma x0, rs2 with the current ASID. |
No exception. |
cp_ins {sfence} |
satp_op_sfence_vma sfence_vma_op sfence_vma_ordering sfence_vma_invalidation sfence_vma_all_asid_va |
satp_op_sfence_vma |
Nopagefault |
Verify stval holds 0 while no page fault has been taken |
Sampled on every instruction of the Sv tests before a page fault writes stval. |
stval = 0. |
Nopagefault {no_fault} |
||
cp_PTE_inv_exec_s_i |
Verify an invalid leaf PTE (V=0) raises an instruction page fault on an instruction fetch from S-mode |
S-mode: leaf PTE with V=0, R=W=X=1 and PTE.U=0, at every page-table level (4 KiB page and each superpage size of the Sv mode). Jump (jalr) into the page through va_data. |
Instruction page fault (scause = 12); stval = faulting virtual address. |
PTE_i_inv x PageType_i x ins_page_fault x exec_acc x mode {S-mode} |
Sv39_leaf_any_level Sv39_page_sizes Sv48_leaf_any_level Sv48_page_sizes Sv57_leaf_any_level Sv57_page_sizes stval_op_faulting_addr |
[norm:Sv39_leaf_any_level] [norm:Sv39_page_sizes] [norm:Sv48_leaf_any_level] [norm:Sv48_page_sizes] [norm:Sv57_leaf_any_level] [norm:Sv57_page_sizes] [norm:stval_op_faulting_addr] |
cp_PTE_inv_exec_u_i |
Verify an invalid leaf PTE (V=0) raises an instruction page fault on an instruction fetch from U-mode |
U-mode: leaf PTE with V=0, R=W=X=1 and PTE.U=1, at every page-table level (4 KiB page and each superpage size of the Sv mode). Jump (jalr) into the page through va_data. |
Instruction page fault (scause = 12); stval = faulting virtual address. |
PTE_i_inv x PageType_i x ins_page_fault x exec_acc x mode {U-mode} |
Sv39_leaf_any_level Sv39_page_sizes Sv48_leaf_any_level Sv48_page_sizes Sv57_leaf_any_level Sv57_page_sizes stval_op_faulting_addr |
[norm:Sv39_leaf_any_level] [norm:Sv39_page_sizes] [norm:Sv48_leaf_any_level] [norm:Sv48_page_sizes] [norm:Sv57_leaf_any_level] [norm:Sv57_page_sizes] [norm:stval_op_faulting_addr] |
cp_PTE_inv_read_s_d |
Verify an invalid leaf PTE (V=0) raises a load page fault on a load from S-mode |
S-mode: leaf PTE with V=0, R=W=X=1 and PTE.U=0, at every page-table level (4 KiB page and each superpage size of the Sv mode). Load (lw) from the page through va_data. |
Load page fault (scause = 13); stval = faulting virtual address. |
PTE_d_inv x PageType_d x load_page_fault x read_acc x mode {S-mode} |
sfence_vma_implicit_access Sv39_leaf_any_level Sv39_page_sizes Sv48_leaf_any_level Sv48_page_sizes Sv57_leaf_any_level Sv57_page_sizes stval_op_faulting_addr |
sfence_vma_implicit_access |
cp_PTE_inv_read_u_d |
Verify an invalid leaf PTE (V=0) raises a load page fault on a load from U-mode |
U-mode: leaf PTE with V=0, R=W=X=1 and PTE.U=1, at every page-table level (4 KiB page and each superpage size of the Sv mode). Load (lw) from the page through va_data. |
Load page fault (scause = 13); stval = faulting virtual address. |
PTE_d_inv x PageType_d x load_page_fault x read_acc x mode {U-mode} |
Sv39_leaf_any_level Sv39_page_sizes Sv48_leaf_any_level Sv48_page_sizes Sv57_leaf_any_level Sv57_page_sizes stval_op_faulting_addr |
[norm:Sv39_leaf_any_level] [norm:Sv39_page_sizes] [norm:Sv48_leaf_any_level] [norm:Sv48_page_sizes] [norm:Sv57_leaf_any_level] [norm:Sv57_page_sizes] [norm:stval_op_faulting_addr] |
cp_PTE_inv_write_s_d |
Verify an invalid leaf PTE (V=0) raises a store/AMO page fault on a store from S-mode |
S-mode: leaf PTE with V=0, R=W=X=1 and PTE.U=0, at every page-table level (4 KiB page and each superpage size of the Sv mode). Store (sw) to the page through va_data. |
Store/AMO page fault (scause = 15); stval = faulting virtual address. |
PTE_d_inv x PageType_d x store_page_fault x write_acc x mode {S-mode} |
Sv39_leaf_any_level Sv39_page_sizes Sv48_leaf_any_level Sv48_page_sizes Sv57_leaf_any_level Sv57_page_sizes stval_op_faulting_addr |
[norm:Sv39_leaf_any_level] [norm:Sv39_page_sizes] [norm:Sv48_leaf_any_level] [norm:Sv48_page_sizes] [norm:Sv57_leaf_any_level] [norm:Sv57_page_sizes] [norm:stval_op_faulting_addr] |
cp_PTE_inv_write_u_d |
Verify an invalid leaf PTE (V=0) raises a store/AMO page fault on a store from U-mode |
U-mode: leaf PTE with V=0, R=W=X=1 and PTE.U=1, at every page-table level (4 KiB page and each superpage size of the Sv mode). Store (sw) to the page through va_data. |
Store/AMO page fault (scause = 15); stval = faulting virtual address. |
PTE_d_inv x PageType_d x store_page_fault x write_acc x mode {U-mode} |
Sv39_leaf_any_level Sv39_page_sizes Sv48_leaf_any_level Sv48_page_sizes Sv57_leaf_any_level Sv57_page_sizes stval_op_faulting_addr |
[norm:Sv39_leaf_any_level] [norm:Sv39_page_sizes] [norm:Sv48_leaf_any_level] [norm:Sv48_page_sizes] [norm:Sv57_leaf_any_level] [norm:Sv57_page_sizes] [norm:stval_op_faulting_addr] |
cp_PTE_res_rwx_s_i_exec |
Verify the reserved encoding W=1, R=0 raises an instruction page fault on an instruction fetch from S-mode |
S-mode: leaf PTE with W=1 and R=0 (once with X=1, once with X=0) and PTE.U=0, at every page-table level (4 KiB page and each superpage size of the Sv mode). Jump (jalr) into the page through va_data. |
Instruction page fault (scause = 12); stval = faulting virtual address. |
PTE_i_res_rwx x PageType_i x ins_page_fault x exec_acc x mode {S-mode} |
Sv39_leaf_any_level Sv39_page_sizes Sv48_leaf_any_level Sv48_page_sizes Sv57_leaf_any_level Sv57_page_sizes stval_op_faulting_addr |
[norm:Sv39_leaf_any_level] [norm:Sv39_page_sizes] [norm:Sv48_leaf_any_level] [norm:Sv48_page_sizes] [norm:Sv57_leaf_any_level] [norm:Sv57_page_sizes] [norm:stval_op_faulting_addr] |
cp_PTE_res_rwx_u_i_exec |
Verify the reserved encoding W=1, R=0 raises an instruction page fault on an instruction fetch from U-mode |
U-mode: leaf PTE with W=1 and R=0 (once with X=1, once with X=0) and PTE.U=1, at every page-table level (4 KiB page and each superpage size of the Sv mode). Jump (jalr) into the page through va_data. |
Instruction page fault (scause = 12); stval = faulting virtual address. |
PTE_i_res_rwx x PageType_i x ins_page_fault x exec_acc x mode {U-mode} |
Sv39_leaf_any_level Sv39_page_sizes Sv48_leaf_any_level Sv48_page_sizes Sv57_leaf_any_level Sv57_page_sizes stval_op_faulting_addr |
[norm:Sv39_leaf_any_level] [norm:Sv39_page_sizes] [norm:Sv48_leaf_any_level] [norm:Sv48_page_sizes] [norm:Sv57_leaf_any_level] [norm:Sv57_page_sizes] [norm:stval_op_faulting_addr] |
cp_PTE_res_rwx_s_d_read |
Verify the reserved encoding W=1, R=0 raises a load page fault on a load from S-mode |
S-mode: leaf PTE with W=1 and R=0 (once with X=1, once with X=0) and PTE.U=0, at every page-table level (4 KiB page and each superpage size of the Sv mode). Load (lw) from the page through va_data. |
Load page fault (scause = 13); stval = faulting virtual address. |
PTE_d_res_rwx x PageType_d x load_page_fault x read_acc x mode {S-mode} |
Sv39_leaf_any_level Sv39_page_sizes Sv48_leaf_any_level Sv48_page_sizes Sv57_leaf_any_level Sv57_page_sizes stval_op_faulting_addr |
[norm:Sv39_leaf_any_level] [norm:Sv39_page_sizes] [norm:Sv48_leaf_any_level] [norm:Sv48_page_sizes] [norm:Sv57_leaf_any_level] [norm:Sv57_page_sizes] [norm:stval_op_faulting_addr] |
cp_PTE_res_rwx_u_d_read |
Verify the reserved encoding W=1, R=0 raises a load page fault on a load from U-mode |
U-mode: leaf PTE with W=1 and R=0 (once with X=1, once with X=0) and PTE.U=1, at every page-table level (4 KiB page and each superpage size of the Sv mode). Load (lw) from the page through va_data. |
Load page fault (scause = 13); stval = faulting virtual address. |
PTE_d_res_rwx x PageType_d x load_page_fault x read_acc x mode {U-mode} |
Sv39_leaf_any_level Sv39_page_sizes Sv48_leaf_any_level Sv48_page_sizes Sv57_leaf_any_level Sv57_page_sizes stval_op_faulting_addr |
[norm:Sv39_leaf_any_level] [norm:Sv39_page_sizes] [norm:Sv48_leaf_any_level] [norm:Sv48_page_sizes] [norm:Sv57_leaf_any_level] [norm:Sv57_page_sizes] [norm:stval_op_faulting_addr] |
cp_PTE_res_rwx_s_d_write |
Verify the reserved encoding W=1, R=0 raises a store/AMO page fault on a store from S-mode |
S-mode: leaf PTE with W=1 and R=0 (once with X=1, once with X=0) and PTE.U=0, at every page-table level (4 KiB page and each superpage size of the Sv mode). Store (sw) to the page through va_data. |
Store/AMO page fault (scause = 15); stval = faulting virtual address. |
PTE_d_res_rwx x PageType_d x store_page_fault x write_acc x mode {S-mode} |
Sv39_leaf_any_level Sv39_page_sizes Sv48_leaf_any_level Sv48_page_sizes Sv57_leaf_any_level Sv57_page_sizes stval_op_faulting_addr |
[norm:Sv39_leaf_any_level] [norm:Sv39_page_sizes] [norm:Sv48_leaf_any_level] [norm:Sv48_page_sizes] [norm:Sv57_leaf_any_level] [norm:Sv57_page_sizes] [norm:stval_op_faulting_addr] |
cp_PTE_res_rwx_u_d_write |
Verify the reserved encoding W=1, R=0 raises a store/AMO page fault on a store from U-mode |
U-mode: leaf PTE with W=1 and R=0 (once with X=1, once with X=0) and PTE.U=1, at every page-table level (4 KiB page and each superpage size of the Sv mode). Store (sw) to the page through va_data. |
Store/AMO page fault (scause = 15); stval = faulting virtual address. |
PTE_d_res_rwx x PageType_d x store_page_fault x write_acc x mode {U-mode} |
Sv39_leaf_any_level Sv39_page_sizes Sv48_leaf_any_level Sv48_page_sizes Sv57_leaf_any_level Sv57_page_sizes stval_op_faulting_addr |
[norm:Sv39_leaf_any_level] [norm:Sv39_page_sizes] [norm:Sv48_leaf_any_level] [norm:Sv48_page_sizes] [norm:Sv57_leaf_any_level] [norm:Sv57_page_sizes] [norm:stval_op_faulting_addr] |
cp_PTE_nonleaf_lvl0_s_i_exec |
Verify a level-0 pointer PTE (V=1, R=W=X=0) raises an instruction page fault on an instruction fetch from S-mode |
S-mode: level-0 PTE with V=1, R=W=X=0 and PTE.U=0, so the walk needs another level that does not exist. Jump (jalr) into the page through va_data. |
Instruction page fault (scause = 12); stval = faulting virtual address. |
PTE_nonleaf_lvl0_i x kilo_page_i x mode x ins_page_fault x exec_acc x mode {S-mode} |
stval_op_faulting_addr |
[norm:stval_op_faulting_addr] |
cp_PTE_nonleaf_lvl0_u_i_exec |
Verify a level-0 pointer PTE (V=1, R=W=X=0) raises an instruction page fault on an instruction fetch from U-mode |
U-mode: level-0 PTE with V=1, R=W=X=0 and PTE.U=1, so the walk needs another level that does not exist. Jump (jalr) into the page through va_data. |
Instruction page fault (scause = 12); stval = faulting virtual address. |
PTE_nonleaf_lvl0_i x kilo_page_i x mode x ins_page_fault x exec_acc x mode {U-mode} |
stval_op_faulting_addr |
[norm:stval_op_faulting_addr] |
cp_PTE_nonleaf_lvl0_s_d_read |
Verify a level-0 pointer PTE (V=1, R=W=X=0) raises a load page fault on a load from S-mode |
S-mode: level-0 PTE with V=1, R=W=X=0 and PTE.U=0, so the walk needs another level that does not exist. Load (lw) from the page through va_data. |
Load page fault (scause = 13); stval = faulting virtual address. |
PTE_nonleaf_lvl0_d x kilo_page_d x mode x load_page_fault x read_acc x mode {S-mode} |
sfence_vma_implicit_access stval_op_faulting_addr |
sfence_vma_implicit_access |
cp_PTE_nonleaf_lvl0_u_d_read |
Verify a level-0 pointer PTE (V=1, R=W=X=0) raises a load page fault on a load from U-mode |
U-mode: level-0 PTE with V=1, R=W=X=0 and PTE.U=1, so the walk needs another level that does not exist. Load (lw) from the page through va_data. |
Load page fault (scause = 13); stval = faulting virtual address. |
PTE_nonleaf_lvl0_d x kilo_page_d x mode x load_page_fault x read_acc x mode {U-mode} |
stval_op_faulting_addr |
[norm:stval_op_faulting_addr] |
cp_PTE_nonleaf_lvl0_s_d_write |
Verify a level-0 pointer PTE (V=1, R=W=X=0) raises a store/AMO page fault on a store from S-mode |
S-mode: level-0 PTE with V=1, R=W=X=0 and PTE.U=0, so the walk needs another level that does not exist. Store (sw) to the page through va_data. |
Store/AMO page fault (scause = 15); stval = faulting virtual address. |
PTE_nonleaf_lvl0_d x kilo_page_d x mode x store_page_fault x write_acc x mode {S-mode} |
stval_op_faulting_addr |
[norm:stval_op_faulting_addr] |
cp_PTE_nonleaf_lvl0_u_d_write |
Verify a level-0 pointer PTE (V=1, R=W=X=0) raises a store/AMO page fault on a store from U-mode |
U-mode: level-0 PTE with V=1, R=W=X=0 and PTE.U=1, so the walk needs another level that does not exist. Store (sw) to the page through va_data. |
Store/AMO page fault (scause = 15); stval = faulting virtual address. |
PTE_nonleaf_lvl0_d x kilo_page_d x mode x store_page_fault x write_acc x mode {U-mode} |
stval_op_faulting_addr |
[norm:stval_op_faulting_addr] |
cp_spage_exec_s_i |
Verify an S-mode instruction fetch from a supervisor page succeeds when X=1, independent of SUM |
S-mode: supervisor leaf PTE (U=0) at every page-table level (4 KiB page and each superpage size of the Sv mode), with X=1 (RWX, X-only, RX). Run with sstatus.SUM=0 and SUM=1. Jump (jalr) into the page through va_data. |
No fault; SUM has no effect on supervisor pages. |
PTE_x_spage_i x PageType_i x exec_acc x sum_sstatus x mode {S-mode} |
satp_op_active Sv39_sxlen Sv39_va_sz Sv39_vpn_sz satp_ppn_sv39_sz Sv39_levels Sv39_page_offset_sz Sv39_LEVELS Sv39_PTESIZE Sv39_leaf_any_level Sv39_page_sizes Sv39_pte_count Sv39_pte_sz Sv39_pt_sz Sv39_pt_align Sv48_sxlen Sv48_va_sz Sv48_vpn_sz satp_ppn_sv48_sz Sv48_levels Sv48_page_offset_sz Sv48_LEVELS Sv48_PTESIZE Sv48_leaf_any_level Sv48_page_sizes Sv57_sxlen Sv57_va_sz Sv57_vpn_sz satp_ppn_sv57_sz Sv57_levels Sv57_page_offset_sz Sv57_LEVELS Sv57_PTESIZE Sv57_leaf_any_level Sv57_page_sizes |
satp_op_active |
cp_spage_noexec_s_i |
Verify an S-mode instruction fetch from a supervisor page with X=0 raises an instruction page fault |
S-mode: supervisor leaf PTE (U=0) at every page-table level (4 KiB page and each superpage size of the Sv mode), with X=0 (RW, R-only). Run with sstatus.SUM=0 and SUM=1. Jump (jalr) into the page through va_data. |
Instruction page fault (scause = 12); stval = faulting virtual address. |
PTE_x_spage_i x PageType_i x ins_page_fault x exec_acc x sum_sstatus x mode {S-mode} |
fetch_page_fault_no_x Sv39_leaf_any_level Sv39_page_sizes Sv48_leaf_any_level Sv48_page_sizes Sv57_leaf_any_level Sv57_page_sizes stval_op_faulting_addr |
fetch_page_fault_no_x |
cp_spage_read_s_d |
Verify an S-mode load from a supervisor page succeeds when R=1, independent of SUM |
S-mode: supervisor leaf PTE (U=0) at every page-table level (4 KiB page and each superpage size of the Sv mode), with R=1 (RWX, RX, RW, R-only). Run with sstatus.SUM=0 and SUM=1. Load (lw) from the page through va_data. |
No fault; SUM has no effect on supervisor pages. |
PTE_rw_spage_d x PageType_d x read_acc x sum_sstatus x mode {S-mode} |
satp_op_active Sv39_sxlen Sv39_va_sz Sv39_vpn_sz satp_ppn_sv39_sz Sv39_levels Sv39_page_offset_sz Sv39_LEVELS Sv39_PTESIZE Sv39_leaf_any_level Sv39_page_sizes Sv39_pte_count Sv39_pte_sz Sv39_pt_sz Sv39_pt_align Sv48_sxlen Sv48_va_sz Sv48_vpn_sz satp_ppn_sv48_sz Sv48_levels Sv48_page_offset_sz Sv48_LEVELS Sv48_PTESIZE Sv48_leaf_any_level Sv48_page_sizes Sv57_sxlen Sv57_va_sz Sv57_vpn_sz satp_ppn_sv57_sz Sv57_levels Sv57_page_offset_sz Sv57_LEVELS Sv57_PTESIZE Sv57_leaf_any_level Sv57_page_sizes |
satp_op_active |
cp_spage_noread_s_d |
Verify an S-mode load from a supervisor page with R=0 raises a load page fault |
S-mode: supervisor leaf PTE (U=0) at every page-table level (4 KiB page and each superpage size of the Sv mode), with R=0 (X-only). Run with sstatus.SUM=0 and SUM=1. Load (lw) from the page through va_data. |
Load page fault (scause = 13); stval = faulting virtual address. |
PTE_rw_spage_d x PageType_d x load_page_fault x read_acc x sum_sstatus x mode {S-mode} |
load_page_fault_no_r Sv39_leaf_any_level Sv39_page_sizes Sv48_leaf_any_level Sv48_page_sizes Sv57_leaf_any_level Sv57_page_sizes stval_op_faulting_addr |
load_page_fault_no_r |
cp_spage_write_s_d |
Verify an S-mode store from a supervisor page succeeds when W=1, independent of SUM |
S-mode: supervisor leaf PTE (U=0) at every page-table level (4 KiB page and each superpage size of the Sv mode), with W=1 (RWX, RW). Run with sstatus.SUM=0 and SUM=1. Store (sw) to the page through va_data. |
No fault; SUM has no effect on supervisor pages. |
PTE_rw_spage_d x PageType_d x write_acc x sum_sstatus x mode {S-mode} |
satp_op_active Sv39_sxlen Sv39_va_sz Sv39_vpn_sz satp_ppn_sv39_sz Sv39_levels Sv39_page_offset_sz Sv39_LEVELS Sv39_PTESIZE Sv39_leaf_any_level Sv39_page_sizes Sv39_pte_count Sv39_pte_sz Sv39_pt_sz Sv39_pt_align Sv48_sxlen Sv48_va_sz Sv48_vpn_sz satp_ppn_sv48_sz Sv48_levels Sv48_page_offset_sz Sv48_LEVELS Sv48_PTESIZE Sv48_leaf_any_level Sv48_page_sizes Sv57_sxlen Sv57_va_sz Sv57_vpn_sz satp_ppn_sv57_sz Sv57_levels Sv57_page_offset_sz Sv57_LEVELS Sv57_PTESIZE Sv57_leaf_any_level Sv57_page_sizes |
satp_ppn_Sv32_sz |
cp_spage_nowrite_s_d |
Verify an S-mode store from a supervisor page with W=0 raises a store/AMO page fault |
S-mode: supervisor leaf PTE (U=0) at every page-table level (4 KiB page and each superpage size of the Sv mode), with W=0 (X-only, RX, R-only). Run with sstatus.SUM=0 and SUM=1. Store (sw) to the page through va_data. |
Store/AMO page fault (scause = 15); stval = faulting virtual address. |
PTE_rw_spage_d x PageType_d x store_page_fault x write_acc x sum_sstatus x mode {S-mode} |
store_page_fault_no_w Sv39_leaf_any_level Sv39_page_sizes Sv48_leaf_any_level Sv48_page_sizes Sv57_leaf_any_level Sv57_page_sizes stval_op_faulting_addr |
store_page_fault_no_w |
cp_spage_rwx_s_i_noexec |
Verify a U-mode instruction fetch from a supervisor page (U=0) raises an instruction page fault |
U-mode: supervisor leaf PTE (U=0) with R=W=X=1, at every page-table level (4 KiB page and each superpage size of the Sv mode). Jump (jalr) into the page through va_data. |
Instruction page fault (scause = 12); stval = faulting virtual address. |
PTE_spage_i x PageType_i x ins_page_fault x exec_acc x mode {U-mode} |
fetch_page_fault_no_x Sv39_leaf_any_level Sv39_page_sizes Sv48_leaf_any_level Sv48_page_sizes Sv57_leaf_any_level Sv57_page_sizes stval_op_faulting_addr |
fetch_page_fault_no_x |
cp_spage_rwx_s_d_noread |
Verify a U-mode load from a supervisor page (U=0) raises a load page fault |
U-mode: supervisor leaf PTE (U=0) with R=W=X=1, at every page-table level (4 KiB page and each superpage size of the Sv mode). Load (lw) from the page through va_data. |
Load page fault (scause = 13); stval = faulting virtual address. |
PTE_spage_d x PageType_d x load_page_fault x read_acc x mode {U-mode} |
load_page_fault_no_r Sv39_leaf_any_level Sv39_page_sizes Sv48_leaf_any_level Sv48_page_sizes Sv57_leaf_any_level Sv57_page_sizes stval_op_faulting_addr |
load_page_fault_no_r |
cp_spage_rwx_s_d_nowrite |
Verify a U-mode store from a supervisor page (U=0) raises a store/AMO page fault |
U-mode: supervisor leaf PTE (U=0) with R=W=X=1, at every page-table level (4 KiB page and each superpage size of the Sv mode). Store (sw) to the page through va_data. |
Store/AMO page fault (scause = 15); stval = faulting virtual address. |
PTE_spage_d x PageType_d x store_page_fault x write_acc x mode {U-mode} |
store_page_fault_no_w Sv39_leaf_any_level Sv39_page_sizes Sv48_leaf_any_level Sv48_page_sizes Sv57_leaf_any_level Sv57_page_sizes stval_op_faulting_addr |
store_page_fault_no_w |
cp_upage_smode_sumunset_noexec_s |
Verify an S-mode instruction fetch from a user page (U=1) raises an instruction page fault when sstatus.SUM=0 |
S-mode with sstatus.SUM=0: user leaf PTE (U=1) swept through RWX, X-only, RX, RW and R-only, at every page-table level (4 KiB page and each superpage size of the Sv mode). Jump (jalr) into the page through va_data. |
Instruction page fault (scause = 12); stval = faulting virtual address. |
PTE_upage_i x PageType_i x ins_page_fault x exec_acc x sum_sstatus x mode {S-mode} |
sstatus_sum_sz sstatus_sum_acc sstatus_sum_op Sv39_leaf_any_level Sv39_page_sizes Sv48_leaf_any_level Sv48_page_sizes Sv57_leaf_any_level Sv57_page_sizes stval_op_faulting_addr |
sstatus_sum |
cp_upage_smode_sumunset_noread_s |
Verify an S-mode load from a user page (U=1) raises a load page fault when sstatus.SUM=0 |
S-mode with sstatus.SUM=0: user leaf PTE (U=1) swept through RWX, X-only, RX, RW and R-only, at every page-table level (4 KiB page and each superpage size of the Sv mode). Load (lw) from the page through va_data. |
Load page fault (scause = 13); stval = faulting virtual address. |
PTE_upage_d x PageType_d x load_page_fault x read_acc x sum_sstatus x mode {S-mode} |
sstatus_sum_sz sstatus_sum_acc sstatus_sum_op Sv39_leaf_any_level Sv39_page_sizes Sv48_leaf_any_level Sv48_page_sizes Sv57_leaf_any_level Sv57_page_sizes stval_op_faulting_addr |
mstatus_sum_op |
cp_upage_smode_sumunset_nowrite_s |
Verify an S-mode store from a user page (U=1) raises a store/AMO page fault when sstatus.SUM=0 |
S-mode with sstatus.SUM=0: user leaf PTE (U=1) swept through RWX, X-only, RX, RW and R-only, at every page-table level (4 KiB page and each superpage size of the Sv mode). Store (sw) to the page through va_data. |
Store/AMO page fault (scause = 15); stval = faulting virtual address. |
PTE_upage_d x PageType_d x store_page_fault x write_acc x sum_sstatus x mode {S-mode} |
sstatus_sum_sz sstatus_sum_acc sstatus_sum_op Sv39_leaf_any_level Sv39_page_sizes Sv48_leaf_any_level Sv48_page_sizes Sv57_leaf_any_level Sv57_page_sizes stval_op_faulting_addr |
mstatus_sum_op |
cp_upage_smode_sumset_noexec_s |
Verify S-mode can never fetch from a user page, even with sstatus.SUM=1 |
S-mode with sstatus.SUM=1: user leaf PTE (U=1) with X=1 (RWX, X-only, RX), at every page-table level (4 KiB page and each superpage size of the Sv mode). Jump (jalr) into the page. |
Instruction page fault (scause = 12); stval = faulting virtual address. |
PTE_upage_i x PageType_i x ins_page_fault x exec_acc x sum_sstatus x mode {S-mode} |
sstatus_sum_sz sstatus_sum_acc sstatus_sum_op Sv39_leaf_any_level Sv39_page_sizes Sv48_leaf_any_level Sv48_page_sizes Sv57_leaf_any_level Sv57_page_sizes stval_op_faulting_addr |
sstatus_sum |
cp_upage_smode_sumset_read_s |
Verify an S-mode load from a user page succeeds when sstatus.SUM=1 |
S-mode with sstatus.SUM=1: user leaf PTE (U=1) with R=1 (RWX, RX, RW, R-only), at every page-table level (4 KiB page and each superpage size of the Sv mode). Load (lw) from the page through va_data. |
No fault. |
PTE_upage_d x PageType_d x read_acc x sum_sstatus x mode {S-mode} |
sstatus_sum_sz sstatus_sum_acc sstatus_sum_op Sv39_leaf_any_level Sv39_page_sizes Sv48_leaf_any_level Sv48_page_sizes Sv57_leaf_any_level Sv57_page_sizes |
mstatus_sum_op |
cp_upage_smode_sumset_write_s |
Verify an S-mode store from a user page succeeds when sstatus.SUM=1 |
S-mode with sstatus.SUM=1: user leaf PTE (U=1) with W=1 (RWX, RW), at every page-table level (4 KiB page and each superpage size of the Sv mode). Store (sw) to the page through va_data. |
No fault. |
PTE_upage_d x PageType_d x write_acc x sum_sstatus x mode {S-mode} |
sstatus_sum_sz sstatus_sum_acc sstatus_sum_op Sv39_leaf_any_level Sv39_page_sizes Sv48_leaf_any_level Sv48_page_sizes Sv57_leaf_any_level Sv57_page_sizes |
mstatus_sum_op |
cp_upage_umode_exec_u |
Verify a U-mode instruction fetch from a user page succeeds when X=1 |
U-mode: user leaf PTE (U=1) with X=1 (RWX, X-only, RX), at every page-table level (4 KiB page and each superpage size of the Sv mode). Jump (jalr) into the page through va_data. |
No fault. |
PTE_x_upage_i x PageType_i x exec_acc x mode {U-mode} |
satp_op_active Sv39_leaf_any_level Sv39_page_sizes Sv48_leaf_any_level Sv48_page_sizes Sv57_leaf_any_level Sv57_page_sizes |
[norm:satp_op_active] [norm:Sv39_leaf_any_level] [norm:Sv39_page_sizes] [norm:Sv48_leaf_any_level] [norm:Sv48_page_sizes] [norm:Sv57_leaf_any_level] [norm:Sv57_page_sizes] |
cp_upage_umode_noexec_u |
Verify a U-mode instruction fetch from a user page with X=0 raises an instruction page fault |
U-mode: user leaf PTE (U=1) with X=0 (RW, R-only), at every page-table level (4 KiB page and each superpage size of the Sv mode). Jump (jalr) into the page through va_data. |
Instruction page fault (scause = 12); stval = faulting virtual address. |
PTE_x_upage_i x PageType_i x ins_page_fault x exec_acc x mode {U-mode} |
fetch_page_fault_no_x Sv39_leaf_any_level Sv39_page_sizes Sv48_leaf_any_level Sv48_page_sizes Sv57_leaf_any_level Sv57_page_sizes stval_op_faulting_addr |
fetch_page_fault_no_x |
cp_upage_umode_read_u |
Verify a U-mode load from a user page succeeds when R=1 |
U-mode: user leaf PTE (U=1) with R=1 (RWX, RX, RW, R-only), at every page-table level (4 KiB page and each superpage size of the Sv mode). Load (lw) from the page through va_data. |
No fault. |
PTE_rw_upage_d x PageType_d x read_acc x mode {U-mode} |
satp_op_active Sv39_leaf_any_level Sv39_page_sizes Sv48_leaf_any_level Sv48_page_sizes Sv57_leaf_any_level Sv57_page_sizes |
satp_op_active |
cp_upage_umode_noread_u |
Verify a U-mode load from a user page with R=0 raises a load page fault |
U-mode: user leaf PTE (U=1) with R=0 (X-only), at every page-table level (4 KiB page and each superpage size of the Sv mode). Load (lw) from the page through va_data. |
Load page fault (scause = 13); stval = faulting virtual address. |
PTE_rw_upage_d x PageType_d x load_page_fault x read_acc x mode {U-mode} |
load_page_fault_no_r Sv39_leaf_any_level Sv39_page_sizes Sv48_leaf_any_level Sv48_page_sizes Sv57_leaf_any_level Sv57_page_sizes stval_op_faulting_addr |
load_page_fault_no_r |
cp_upage_umode_write_u |
Verify a U-mode store from a user page succeeds when W=1 |
U-mode: user leaf PTE (U=1) with W=1 (RWX, RW), at every page-table level (4 KiB page and each superpage size of the Sv mode). Store (sw) to the page through va_data. |
No fault. |
PTE_rw_upage_d x PageType_d x write_acc x mode {U-mode} |
satp_op_active Sv39_leaf_any_level Sv39_page_sizes Sv48_leaf_any_level Sv48_page_sizes Sv57_leaf_any_level Sv57_page_sizes |
[norm:satp_op_active] [norm:Sv39_leaf_any_level] [norm:Sv39_page_sizes] [norm:Sv48_leaf_any_level] [norm:Sv48_page_sizes] [norm:Sv57_leaf_any_level] [norm:Sv57_page_sizes] |
cp_upage_umode_nowrite_u |
Verify a U-mode store from a user page with W=0 raises a store/AMO page fault |
U-mode: user leaf PTE (U=1) with W=0 (X-only, RX, R-only), at every page-table level (4 KiB page and each superpage size of the Sv mode). Store (sw) to the page through va_data. |
Store/AMO page fault (scause = 15); stval = faulting virtual address. |
PTE_rw_upage_d x PageType_d x store_page_fault x write_acc x mode {U-mode} |
store_page_fault_no_w Sv39_leaf_any_level Sv39_page_sizes Sv48_leaf_any_level Sv48_page_sizes Sv57_leaf_any_level Sv57_page_sizes stval_op_faulting_addr |
store_page_fault_no_w |
cp_xpage_mxrunset_read_s |
Verify an S-mode load from an execute-only page faults when sstatus.MXR=0 |
S-mode: execute-only leaf PTE (R=W=0, X=1) with PTE.U=0, at every page-table level (4 KiB page and each superpage size of the Sv mode); clear sstatus.MXR. Load (lw) through va_data (a store is also attempted). |
Load page fault (scause = 13); the store raises a store/AMO page fault (scause = 15). |
PTE_XnoRW_d x PageType_d x load_page_fault x read_acc x mxr_sstatus x mode {S-mode} |
sstatus_mxr_sz sstatus_mxr_acc sstatus_mxr_op sfence_vma_sum_mxr_effect Sv39_leaf_any_level Sv39_page_sizes Sv48_leaf_any_level Sv48_page_sizes Sv57_leaf_any_level Sv57_page_sizes stval_op_faulting_addr |
mstatus_mxr_op |
cp_xpage_mxrunset_read_u |
Verify a U-mode load from an execute-only page faults when sstatus.MXR=0 |
U-mode: execute-only leaf PTE (R=W=0, X=1) with PTE.U=1, at every page-table level (4 KiB page and each superpage size of the Sv mode); clear sstatus.MXR. Load (lw) through va_data (a store is also attempted). |
Load page fault (scause = 13); the store raises a store/AMO page fault (scause = 15). |
PTE_XnoRW_d x PageType_d x load_page_fault x read_acc x mxr_sstatus x mode {U-mode} |
sstatus_mxr_sz sstatus_mxr_acc sstatus_mxr_op sfence_vma_sum_mxr_effect Sv39_leaf_any_level Sv39_page_sizes Sv48_leaf_any_level Sv48_page_sizes Sv57_leaf_any_level Sv57_page_sizes stval_op_faulting_addr |
mstatus_mxr_op |
cp_xpage_mxrset_read_s |
Verify an S-mode load from an execute-only page succeeds when sstatus.MXR=1 |
S-mode: execute-only leaf PTE (R=W=0, X=1) with PTE.U=0, at every page-table level (4 KiB page and each superpage size of the Sv mode); set sstatus.MXR. Load (lw) through va_data (a store is also attempted). |
The load succeeds; the store still raises a store/AMO page fault (scause = 15). |
PTE_XnoRW_d x PageType_d x mxr_sstatus x read_acc x mode {S-mode} |
sstatus_mxr_sz sstatus_mxr_acc sstatus_mxr_op sfence_vma_sum_mxr_effect Sv39_leaf_any_level Sv39_page_sizes Sv48_leaf_any_level Sv48_page_sizes Sv57_leaf_any_level Sv57_page_sizes |
mstatus_mxr_op |
cp_xpage_mxrset_read_u |
Verify a U-mode load from an execute-only page succeeds when sstatus.MXR=1 |
U-mode: execute-only leaf PTE (R=W=0, X=1) with PTE.U=1, at every page-table level (4 KiB page and each superpage size of the Sv mode); set sstatus.MXR. Load (lw) through va_data (a store is also attempted). |
The load succeeds; the store still raises a store/AMO page fault (scause = 15). |
PTE_XnoRW_d x PageType_d x mxr_sstatus x read_acc x mode {U-mode} |
sstatus_mxr_sz sstatus_mxr_acc sstatus_mxr_op sfence_vma_sum_mxr_effect Sv39_leaf_any_level Sv39_page_sizes Sv48_leaf_any_level Sv48_page_sizes Sv57_leaf_any_level Sv57_page_sizes |
mstatus_mxr_op |
cp_PTE_DAU_nleaf_read_s |
Verify D, A or U set in a non-leaf PTE raises a load page fault on a load from S-mode |
S-mode: valid level-0 leaf PTE (PTE.U=0); in each non-leaf PTE above it, set D, then A, then U (one at a time). Load (lw) from the page through va_data. Requires privileged spec 1.12 or later. |
Load page fault (scause = 13); stval = faulting virtual address. |
PTE_DAU_d x PageType_d x load_page_fault x mode {S-mode} |
Sv39_leaf_any_level Sv39_page_sizes Sv48_leaf_any_level Sv48_page_sizes Sv57_leaf_any_level Sv57_page_sizes stval_op_faulting_addr |
[norm:Sv39_leaf_any_level] [norm:Sv39_page_sizes] [norm:Sv48_leaf_any_level] [norm:Sv48_page_sizes] [norm:Sv57_leaf_any_level] [norm:Sv57_page_sizes] [norm:stval_op_faulting_addr] |
cp_PTE_DAU_nleaf_read_u |
Verify D, A or U set in a non-leaf PTE raises a load page fault on a load from U-mode |
U-mode: valid level-0 leaf PTE (PTE.U=1); in each non-leaf PTE above it, set D, then A, then U (one at a time). Load (lw) from the page through va_data. Requires privileged spec 1.12 or later. |
Load page fault (scause = 13); stval = faulting virtual address. |
PTE_DAU_d x PageType_d x load_page_fault x mode {U-mode} |
Sv39_leaf_any_level Sv39_page_sizes Sv48_leaf_any_level Sv48_page_sizes Sv57_leaf_any_level Sv57_page_sizes stval_op_faulting_addr |
[norm:Sv39_leaf_any_level] [norm:Sv39_page_sizes] [norm:Sv48_leaf_any_level] [norm:Sv48_page_sizes] [norm:Sv57_leaf_any_level] [norm:Sv57_page_sizes] [norm:stval_op_faulting_addr] |
cp_PTE_DAU_nleaf_write_s |
Verify D, A or U set in a non-leaf PTE raises a store/AMO page fault on a store from S-mode |
S-mode: valid level-0 leaf PTE (PTE.U=0); in each non-leaf PTE above it, set D, then A, then U (one at a time). Store (sw) to the page through va_data. Requires privileged spec 1.12 or later. |
Store/AMO page fault (scause = 15); stval = faulting virtual address. |
PTE_DAU_d x PageType_d x store_page_fault x mode {S-mode} |
Sv39_leaf_any_level Sv39_page_sizes Sv48_leaf_any_level Sv48_page_sizes Sv57_leaf_any_level Sv57_page_sizes stval_op_faulting_addr |
[norm:Sv39_leaf_any_level] [norm:Sv39_page_sizes] [norm:Sv48_leaf_any_level] [norm:Sv48_page_sizes] [norm:Sv57_leaf_any_level] [norm:Sv57_page_sizes] [norm:stval_op_faulting_addr] |
cp_PTE_DAU_nleaf_write_u |
Verify D, A or U set in a non-leaf PTE raises a store/AMO page fault on a store from U-mode |
U-mode: valid level-0 leaf PTE (PTE.U=1); in each non-leaf PTE above it, set D, then A, then U (one at a time). Store (sw) to the page through va_data. Requires privileged spec 1.12 or later. |
Store/AMO page fault (scause = 15); stval = faulting virtual address. |
PTE_DAU_d x PageType_d x store_page_fault x mode {U-mode} |
Sv39_leaf_any_level Sv39_page_sizes Sv48_leaf_any_level Sv48_page_sizes Sv57_leaf_any_level Sv57_page_sizes stval_op_faulting_addr |
[norm:Sv39_leaf_any_level] [norm:Sv39_page_sizes] [norm:Sv48_leaf_any_level] [norm:Sv48_page_sizes] [norm:Sv57_leaf_any_level] [norm:Sv57_page_sizes] [norm:stval_op_faulting_addr] |
cp_PTE_DAU_nleaf_exec_s |
Verify D, A or U set in a non-leaf PTE raises an instruction page fault on an instruction fetch from S-mode |
S-mode: valid level-0 leaf PTE (PTE.U=0); in each non-leaf PTE above it, set D, then A, then U (one at a time). Jump (jalr) into the page through va_data. Requires privileged spec 1.12 or later. |
Instruction page fault (scause = 12); stval = faulting virtual address. |
PTE_DAU_i x PageType_i x ins_page_fault x mode {S-mode} |
Sv39_leaf_any_level Sv39_page_sizes Sv48_leaf_any_level Sv48_page_sizes Sv57_leaf_any_level Sv57_page_sizes stval_op_faulting_addr |
[norm:Sv39_leaf_any_level] [norm:Sv39_page_sizes] [norm:Sv48_leaf_any_level] [norm:Sv48_page_sizes] [norm:Sv57_leaf_any_level] [norm:Sv57_page_sizes] [norm:stval_op_faulting_addr] |
cp_PTE_DAU_nleaf_exec_u |
Verify D, A or U set in a non-leaf PTE raises an instruction page fault on an instruction fetch from U-mode |
U-mode: valid level-0 leaf PTE (PTE.U=1); in each non-leaf PTE above it, set D, then A, then U (one at a time). Jump (jalr) into the page through va_data. Requires privileged spec 1.12 or later. |
Instruction page fault (scause = 12); stval = faulting virtual address. |
PTE_DAU_i x PageType_i x ins_page_fault x mode {U-mode} |
Sv39_leaf_any_level Sv39_page_sizes Sv48_leaf_any_level Sv48_page_sizes Sv57_leaf_any_level Sv57_page_sizes stval_op_faulting_addr |
[norm:Sv39_leaf_any_level] [norm:Sv39_page_sizes] [norm:Sv48_leaf_any_level] [norm:Sv48_page_sizes] [norm:Sv57_leaf_any_level] [norm:Sv57_page_sizes] [norm:stval_op_faulting_addr] |
cp_PTE_rsv_nleaf_read_s |
Verify any of bits 63:54 set in a non-leaf PTE raises a load page fault on a load from S-mode |
RV64, S-mode: valid level-0 leaf PTE; in each non-leaf PTE above it, set each of bits 63 (N), 62:61 (PBMT), and 60:54 in turn. These bits are reserved in non-leaf PTEs whether or not Svnapot and Svpbmt are implemented. Load (lw) from the page through va_data. Requires privileged spec 1.12 or later. |
Load page fault (scause = 13); stval = faulting virtual address. |
PTE_nonleaf_d x PTE_nonleaf_rsv_d x PageType_d x load_page_fault x mode {S-mode} |
Sv39_pte_future_rsv Svpbmt_nonleaf_pte_pbmt_must_be_zero stval_op_faulting_addr |
Sv39_pte_future_rsv |
cp_PTE_rsv_nleaf_write_s |
Verify any of bits 63:54 set in a non-leaf PTE raises a store/AMO page fault on a store from S-mode |
RV64, S-mode: valid level-0 leaf PTE; in each non-leaf PTE above it, set each of bits 63 (N), 62:61 (PBMT), and 60:54 in turn. These bits are reserved in non-leaf PTEs whether or not Svnapot and Svpbmt are implemented. Store (sw) to the page through va_data. Requires privileged spec 1.12 or later. |
Store/AMO page fault (scause = 15); stval = faulting virtual address. |
PTE_nonleaf_d x PTE_nonleaf_rsv_d x PageType_d x store_page_fault x mode {S-mode} |
Sv39_pte_future_rsv Svpbmt_nonleaf_pte_pbmt_must_be_zero stval_op_faulting_addr |
Sv39_pte_future_rsv |
cp_PTE_rsv_nleaf_exec_s |
Verify any of bits 63:54 set in a non-leaf PTE raises an instruction page fault on an instruction fetch from S-mode |
RV64, S-mode: valid level-0 leaf PTE; in each non-leaf PTE above it, set each of bits 63 (N), 62:61 (PBMT), and 60:54 in turn. These bits are reserved in non-leaf PTEs whether or not Svnapot and Svpbmt are implemented. Jump (jalr) into the page through va_data. Requires privileged spec 1.12 or later. |
Instruction page fault (scause = 12); stval = faulting virtual address. |
PTE_nonleaf_i x PTE_nonleaf_rsv_i x PageType_i x ins_page_fault x mode {S-mode} |
Sv39_pte_future_rsv Svpbmt_nonleaf_pte_pbmt_must_be_zero stval_op_faulting_addr |
Sv39_pte_future_rsv |
cp_misaligned_exec_s |
Verify a misaligned superpage raises an instruction page fault on an instruction fetch from S-mode |
S-mode: superpage leaf PTE (level 1 and above) with PTE.U=0 whose PPN has non-zero bits below the superpage size, at each superpage level. Jump (jalr) into the page through va_data. |
Instruction page fault (scause = 12); stval = faulting virtual address. |
PTE_RWX_i x misaligned_PPN_i x ins_page_fault x exec_acc |
Sv39_superpage_align Sv39_superpage_align_fault Sv48_superpage_align Sv48_superpage_align_fault Sv57_superpage_align Sv57_superpage_align_fault stval_op_faulting_addr |
Sv39_superpage_align |
cp_misaligned_exec_u |
Verify a misaligned superpage raises an instruction page fault on an instruction fetch from U-mode |
U-mode: superpage leaf PTE (level 1 and above) with PTE.U=1 whose PPN has non-zero bits below the superpage size, at each superpage level. Jump (jalr) into the page through va_data. |
Instruction page fault (scause = 12); stval = faulting virtual address. |
PTE_RWX_i x misaligned_PPN_i x ins_page_fault x exec_acc |
Sv39_superpage_align Sv39_superpage_align_fault Sv48_superpage_align Sv48_superpage_align_fault Sv57_superpage_align Sv57_superpage_align_fault stval_op_faulting_addr |
[norm:Sv39_superpage_align] [norm:Sv39_superpage_align_fault] [norm:Sv48_superpage_align] [norm:Sv48_superpage_align_fault] [norm:Sv57_superpage_align] [norm:Sv57_superpage_align_fault] [norm:stval_op_faulting_addr] |
cp_misaligned_read_s |
Verify a misaligned superpage raises a load page fault on a load from S-mode |
S-mode: superpage leaf PTE (level 1 and above) with PTE.U=0 whose PPN has non-zero bits below the superpage size, at each superpage level. Load (lw) from the page through va_data. |
Load page fault (scause = 13); stval = faulting virtual address. |
PTE_RWX_d x misaligned_PPN_d x load_page_fault x read_acc |
Sv39_superpage_align Sv39_superpage_align_fault Sv48_superpage_align Sv48_superpage_align_fault Sv57_superpage_align Sv57_superpage_align_fault stval_op_faulting_addr |
Sv39_superpage_align |
cp_misaligned_read_u |
Verify a misaligned superpage raises a load page fault on a load from U-mode |
U-mode: superpage leaf PTE (level 1 and above) with PTE.U=1 whose PPN has non-zero bits below the superpage size, at each superpage level. Load (lw) from the page through va_data. |
Load page fault (scause = 13); stval = faulting virtual address. |
PTE_RWX_d x misaligned_PPN_d x load_page_fault x read_acc |
Sv39_superpage_align Sv39_superpage_align_fault Sv48_superpage_align Sv48_superpage_align_fault Sv57_superpage_align Sv57_superpage_align_fault stval_op_faulting_addr |
[norm:Sv39_superpage_align] [norm:Sv39_superpage_align_fault] [norm:Sv48_superpage_align] [norm:Sv48_superpage_align_fault] [norm:Sv57_superpage_align] [norm:Sv57_superpage_align_fault] [norm:stval_op_faulting_addr] |
cp_misaligned_write_s |
Verify a misaligned superpage raises a store/AMO page fault on a store from S-mode |
S-mode: superpage leaf PTE (level 1 and above) with PTE.U=0 whose PPN has non-zero bits below the superpage size, at each superpage level. Store (sw) to the page through va_data. |
Store/AMO page fault (scause = 15); stval = faulting virtual address. |
PTE_RWX_d x misaligned_PPN_d x store_page_fault x write_acc |
Sv39_superpage_align Sv39_superpage_align_fault Sv48_superpage_align Sv48_superpage_align_fault Sv57_superpage_align Sv57_superpage_align_fault stval_op_faulting_addr |
Sv39_superpage_align |
cp_misaligned_write_u |
Verify a misaligned superpage raises a store/AMO page fault on a store from U-mode |
U-mode: superpage leaf PTE (level 1 and above) with PTE.U=1 whose PPN has non-zero bits below the superpage size, at each superpage level. Store (sw) to the page through va_data. |
Store/AMO page fault (scause = 15); stval = faulting virtual address. |
PTE_RWX_d x misaligned_PPN_d x store_page_fault x write_acc |
Sv39_superpage_align Sv39_superpage_align_fault Sv48_superpage_align Sv48_superpage_align_fault Sv57_superpage_align Sv57_superpage_align_fault stval_op_faulting_addr |
[norm:Sv39_superpage_align] [norm:Sv39_superpage_align_fault] [norm:Sv48_superpage_align] [norm:Sv48_superpage_align_fault] [norm:Sv57_superpage_align] [norm:Sv57_superpage_align_fault] [norm:stval_op_faulting_addr] |
cp_canonical_read_s |
Verify a non-canonical virtual address raises a load page fault on a load from S-mode |
RV64 (Sv39/48/57), S-mode: va_data has bit 63 set, so its upper bits are not a sign extension of the top VA bit. Valid RWX leaf PTE with PTE.U=0 for the canonical part, at every page-table level (4 KiB page and each superpage size of the Sv mode). Load (lw) from the page through va_data. |
Load page fault (scause = 13); stval = faulting virtual address. |
PTE_canonical_d x canonical_page_d x load_page_fault x read_acc |
Sv39_va_signext Sv48_va_signext Sv57_va_signext stval_op_faulting_addr |
Sv39_va_signext |
cp_canonical_read_u |
Verify a non-canonical virtual address raises a load page fault on a load from U-mode |
RV64 (Sv39/48/57), U-mode: va_data has bit 63 set, so its upper bits are not a sign extension of the top VA bit. Valid RWX leaf PTE with PTE.U=1 for the canonical part, at every page-table level (4 KiB page and each superpage size of the Sv mode). Load (lw) from the page through va_data. |
Load page fault (scause = 13); stval = faulting virtual address. |
PTE_canonical_d x canonical_page_d x load_page_fault x read_acc |
Sv39_va_signext Sv48_va_signext Sv57_va_signext stval_op_faulting_addr |
[norm:Sv39_va_signext] [norm:Sv48_va_signext] [norm:Sv57_va_signext] [norm:stval_op_faulting_addr] |
cp_canonical_write_s |
Verify a non-canonical virtual address raises a store/AMO page fault on a store from S-mode |
RV64 (Sv39/48/57), S-mode: va_data has bit 63 set, so its upper bits are not a sign extension of the top VA bit. Valid RWX leaf PTE with PTE.U=0 for the canonical part, at every page-table level (4 KiB page and each superpage size of the Sv mode). Store (sw) to the page through va_data. |
Store/AMO page fault (scause = 15); stval = faulting virtual address. |
PTE_canonical_d x canonical_page_d x store_page_fault x write_acc |
Sv39_va_signext Sv48_va_signext Sv57_va_signext stval_op_faulting_addr |
Sv39_va_signext |
cp_canonical_write_u |
Verify a non-canonical virtual address raises a store/AMO page fault on a store from U-mode |
RV64 (Sv39/48/57), U-mode: va_data has bit 63 set, so its upper bits are not a sign extension of the top VA bit. Valid RWX leaf PTE with PTE.U=1 for the canonical part, at every page-table level (4 KiB page and each superpage size of the Sv mode). Store (sw) to the page through va_data. |
Store/AMO page fault (scause = 15); stval = faulting virtual address. |
PTE_canonical_d x canonical_page_d x store_page_fault x write_acc |
Sv39_va_signext Sv48_va_signext Sv57_va_signext stval_op_faulting_addr |
[norm:Sv39_va_signext] [norm:Sv48_va_signext] [norm:Sv57_va_signext] [norm:stval_op_faulting_addr] |
cp_canonical_exec_s |
Verify a non-canonical virtual address raises an instruction page fault on an instruction fetch from S-mode |
RV64 (Sv39/48/57), S-mode: va_data has bit 63 set, so its upper bits are not a sign extension of the top VA bit. Valid RWX leaf PTE with PTE.U=0 for the canonical part, at every page-table level (4 KiB page and each superpage size of the Sv mode). Jump (jalr) into the page through va_data. |
Instruction page fault (scause = 12); stval = faulting virtual address. |
PTE_canonical_i x canonical_page_i x ins_page_fault x exec_acc |
Sv39_va_signext Sv48_va_signext Sv57_va_signext stval_op_faulting_addr |
Sv39_va_signext |
cp_canonical_exec_u |
Verify a non-canonical virtual address raises an instruction page fault on an instruction fetch from U-mode |
RV64 (Sv39/48/57), U-mode: va_data has bit 63 set, so its upper bits are not a sign extension of the top VA bit. Valid RWX leaf PTE with PTE.U=1 for the canonical part, at every page-table level (4 KiB page and each superpage size of the Sv mode). Jump (jalr) into the page through va_data. |
Instruction page fault (scause = 12); stval = faulting virtual address. |
PTE_canonical_i x canonical_page_i x ins_page_fault x exec_acc |
Sv39_va_signext Sv48_va_signext Sv57_va_signext stval_op_faulting_addr |
[norm:Sv39_va_signext] [norm:Sv48_va_signext] [norm:Sv57_va_signext] [norm:stval_op_faulting_addr] |
cp_rsw_pte |
Verify the RSW bits (PTE[9:8]) are ignored by the implementation |
S-mode and U-mode: leaf PTE with RSW = 01, 10 and 11, at every page-table level (4 KiB page and each superpage size of the Sv mode). Store, load and fetch through va_data, then read the PTE back from the page table. |
No fault; the PTE reads back with RSW unchanged. |
RSW x mode |
pte_rsw_ignored |
|
cp_global_read_s |
Verify a global mapping (G=1) survives an ASID-specific SFENCE.VMA for a load from S-mode |
S-mode: global leaf PTE (G=1) with PTE.U=0, at every page-table level (4 KiB page and each superpage size of the Sv mode). Load (lw) from the page through va_data, execute sfence.vma x0, rs2 with the current ASID, then repeat the access. |
No fault on either access. |
global_PTE_d x PageType_d x read_acc |
sfence_vma_asid_only |
pte_g_op |
cp_global_read_u |
Verify a global mapping (G=1) survives an ASID-specific SFENCE.VMA for a load from U-mode |
U-mode: global leaf PTE (G=1) with PTE.U=1, at every page-table level (4 KiB page and each superpage size of the Sv mode). Load (lw) from the page through va_data, execute sfence.vma x0, rs2 with the current ASID, then repeat the access. |
No fault on either access. |
global_PTE_d x PageType_d x read_acc |
sfence_vma_asid_only |
pte_g_op |
cp_global_write_s |
Verify a global mapping (G=1) survives an ASID-specific SFENCE.VMA for a store from S-mode |
S-mode: global leaf PTE (G=1) with PTE.U=0, at every page-table level (4 KiB page and each superpage size of the Sv mode). Store (sw) to the page through va_data, execute sfence.vma x0, rs2 with the current ASID, then repeat the access. |
No fault on either access. |
global_PTE_d x PageType_d x write_acc |
sfence_vma_asid_only |
pte_g_op |
cp_global_write_u |
Verify a global mapping (G=1) survives an ASID-specific SFENCE.VMA for a store from U-mode |
U-mode: global leaf PTE (G=1) with PTE.U=1, at every page-table level (4 KiB page and each superpage size of the Sv mode). Store (sw) to the page through va_data, execute sfence.vma x0, rs2 with the current ASID, then repeat the access. |
No fault on either access. |
global_PTE_d x PageType_d x write_acc |
sfence_vma_asid_only |
[norm:sfence_vma_asid_only] |
cp_global_exec_s |
Verify a global mapping (G=1) survives an ASID-specific SFENCE.VMA for an instruction fetch from S-mode |
S-mode: global leaf PTE (G=1) with PTE.U=0, at every page-table level (4 KiB page and each superpage size of the Sv mode). Jump (jalr) into the page through va_data, execute sfence.vma x0, rs2 with the current ASID, then repeat the access. |
No fault on either access. |
global_PTE_i x PageType_i x exec_acc |
sfence_vma_asid_only |
pte_g_op |
cp_global_exec_u |
Verify a global mapping (G=1) survives an ASID-specific SFENCE.VMA for an instruction fetch from U-mode |
U-mode: global leaf PTE (G=1) with PTE.U=1, at every page-table level (4 KiB page and each superpage size of the Sv mode). Jump (jalr) into the page through va_data, execute sfence.vma x0, rs2 with the current ASID, then repeat the access. |
No fault on either access. |
global_PTE_i x PageType_i x exec_acc |
sfence_vma_asid_only |
[norm:sfence_vma_asid_only] |
cp_svnapot_read_fault |
Verify PTE.N (bit 63) is reserved when Svnapot is not implemented, for a load |
RV64, S-mode: level-0 leaf PTE with N=1 and PPN[3:0]=1000. Load (lw) from the page through va_data. |
Without Svnapot: load page fault (scause = 13). With Svnapot the encoding is a valid 64 KiB NAPOT mapping and the access succeeds. |
svnapot_PTE_d x load_page_fault x read_acc x mode |
Sv39_pte_svnapot_rsv |
Sv39_pte_Svnapot_rsv |
cp_svnapot_write_fault |
Verify PTE.N (bit 63) is reserved when Svnapot is not implemented, for a store |
RV64, S-mode: level-0 leaf PTE with N=1 and PPN[3:0]=1000. Store (sw) to the page through va_data. |
Without Svnapot: store/AMO page fault (scause = 15). With Svnapot the encoding is a valid 64 KiB NAPOT mapping and the access succeeds. |
svnapot_PTE_d x store_page_fault x write_acc x mode |
Sv39_pte_svnapot_rsv |
Sv39_pte_Svnapot_rsv |
cp_svnapot_exec_fault |
Verify PTE.N (bit 63) is reserved when Svnapot is not implemented, for an instruction fetch |
RV64, S-mode: level-0 leaf PTE with N=1 and PPN[3:0]=1000. Jump (jalr) into the page through va_data. |
Without Svnapot: instruction page fault (scause = 12). With Svnapot the encoding is a valid 64 KiB NAPOT mapping and the access succeeds. |
svnapot_PTE_i x ins_page_fault x exec_acc x mode |
Sv39_pte_svnapot_rsv |
Sv39_pte_Svnapot_rsv |
cp_svpbmt_read_fault |
Verify PBMT (bits 62:61) is reserved when menvcfg.PBMTE=0, for a load |
RV64, S-mode: clear menvcfg.PBMTE through T-SBI. Top-level leaf PTE with PBMT = 1, 2 and 3. Load (lw) from the page through va_data. |
Load page fault (scause = 13); stval = faulting virtual address. |
svpbmt_PTE_d x load_page_fault x read_acc x mode x PBMTE_unset |
Sv39_pte_svpbmt_rsv menvcfg_pbmte_op |
Sv39_pte_Svpbmt_rsv |
cp_svpbmt_write_fault |
Verify PBMT (bits 62:61) is reserved when menvcfg.PBMTE=0, for a store |
RV64, S-mode: clear menvcfg.PBMTE through T-SBI. Top-level leaf PTE with PBMT = 1, 2 and 3. Store (sw) to the page through va_data. |
Store/AMO page fault (scause = 15); stval = faulting virtual address. |
svpbmt_PTE_d x store_page_fault x write_acc x mode x PBMTE_unset |
Sv39_pte_svpbmt_rsv menvcfg_pbmte_op |
Sv39_pte_Svpbmt_rsv |
cp_svpbmt_exec_fault |
Verify PBMT (bits 62:61) is reserved when menvcfg.PBMTE=0, for an instruction fetch |
RV64, S-mode: clear menvcfg.PBMTE through T-SBI. Top-level leaf PTE with PBMT = 1, 2 and 3. Jump (jalr) into the page through va_data. |
Instruction page fault (scause = 12); stval = faulting virtual address. |
svpbmt_PTE_i x ins_page_fault x exec_acc x mode x PBMTE_unset |
Sv39_pte_svpbmt_rsv menvcfg_pbmte_op |
Sv39_pte_Svpbmt_rsv |
cp_reserved_read_fault |
Verify reserved PTE bits 60:54 raise a load page fault on a load |
RV64, S-mode: top-level leaf PTE with each of bits 60..54 set in turn. Load (lw) from the page through va_data. |
Load page fault (scause = 13); stval = faulting virtual address. |
reserved_PTE_d x load_page_fault x read_acc x mode |
Sv39_pte_future_rsv |
Sv39_pte_future_rsv |
cp_reserved_write_fault |
Verify reserved PTE bits 60:54 raise a store/AMO page fault on a store |
RV64, S-mode: top-level leaf PTE with each of bits 60..54 set in turn. Store (sw) to the page through va_data. |
Store/AMO page fault (scause = 15); stval = faulting virtual address. |
reserved_PTE_d x store_page_fault x read_acc x mode |
Sv39_pte_future_rsv |
Sv39_pte_future_rsv |
cp_reserved_exec_fault |
Verify reserved PTE bits 60:54 raise an instruction page fault on an instruction fetch |
RV64, S-mode: top-level leaf PTE with each of bits 60..54 set in turn. Jump (jalr) into the page through va_data. |
Instruction page fault (scause = 12); stval = faulting virtual address. |
reserved_PTE_i x ins_page_fault x read_acc x mode |
Sv39_pte_future_rsv |
Sv39_pte_future_rsv |
cp_read_nofault |
Verify a PTE with bits 63:54 all zero translates normally for a load |
S-mode and U-mode: loads through valid leaf PTEs whose extension and reserved bits 63:54 are zero (every Sv test). |
No fault. |
zeros_PTE_d x read_acc x mode |
Sv57_sxlen_va_sz |
|
cp_write_nofault |
Verify a PTE with bits 63:54 all zero translates normally for a store |
S-mode and U-mode: stores through valid leaf PTEs whose extension and reserved bits 63:54 are zero (every Sv test). |
No fault. |
zeros_PTE_d x write_acc x mode |
||
cp_exec_nofault |
Verify a PTE with bits 63:54 all zero translates normally for an instruction fetch |
S-mode and U-mode: instruction fetches through valid leaf PTEs whose extension and reserved bits 63:54 are zero (every Sv test). |
No fault. |
zeros_PTE_i x exec_acc x mode |
Sv57_sxlen_va_sz |
|
cp_svadu_disabled |
Verify translation with hardware A/D updating disabled (menvcfg.ADUE=0) |
Sampled on accesses while menvcfg.ADUE (menvcfgh.ADUE on RV32) is 0, which holds in every Sv test. |
A and D bits are not updated by hardware. |
ADUE_unset x mode |
Svadu_disabled_hw_update_falls_back_to_svade |
[norm:Svadu_disabled_hw_update_falls_back_to_svade] |
UDB Parameters:
-
REPORT_VA_IN_{MTVAL/STVAL}ON_{INSTRUCTION/LOAD/STORE_AMO}PAGE_FAULT affects result in {MTVAL,STVAL} during page-fault exceptions, such as coverpoints TODO
-
TODO other coverpoints at least SATP_MODE_BARE, TRAP_ON_SFENCE_VMA_WHEN_SATP_MODE_IS_READ_ONLY
Sv_Sm Virtual Memory with M-mode State
The Sm group runs only on configurations with Sm, so it is not part of a certificate without Sm, such as RVA23.
It covers mstatus.MPRV accesses, mstatus.TVM trapping of satp and SFENCE.VMA, mstatus.SBE for implicit
page-table accesses, and M-mode access to satp. The mstatus.SBE tests are generated but not run until a
big-endian configuration is available.
| Coverpoint | Goal | Feature Description | Expectation | Bins | ID | Normative Rule |
|---|---|---|---|---|---|---|
General Test Environment (Sv_Sm): |
||||||
cp_access_m |
Verify satp is readable and writable from M-mode with csrrw, csrrs and csrrc |
Sv32 and Sv39 configurations, M-mode: csrrw satp with 1, csrrs with 2, csrrc with 1, reading satp back after each; and the same three accesses with satp = 0 while mstatus.TVM=1, which does not restrict M-mode. |
No exception; each read returns the value produced by the write. |
cp_ins x Mcause x tvm_mstatus x mode {M-mode} |
satp_sz satp_acc satp_op satp_mode |
satp |
cp_tvm_exception_s |
Verify mstatus.TVM=1 makes satp accesses and SFENCE.VMA illegal in S-mode |
M-mode: set mstatus.TVM, read mstatus back, then csrw, csrs and csrc satp with 0. Switch to S-mode with RVTEST_TSBI_GOTO_SMODE, execute csrw, csrs and csrc on satp and sfence.vma, then return with RVTEST_TSBI_GOTO_MMODE. |
Illegal-instruction exception (mcause = 2) for each instruction. |
tvm_mstatus x Mcause x cp_ins x mode {S-mode} |
mstatus_tvm_op MSTATUS_TVM_WARL |
mstatus_tvm_op |
cp_mprv_load |
Verify MPRV=1 translates M-mode loads as if in the MPP mode |
M-mode: map va_data at every page-table level (4 KiB page and each superpage size of the Sv mode) (supervisor page for MPP=S, user page for MPP=U). Set mstatus.MPRV=1 with MPP=S, then MPP=U, and load (lw) through va_data. Clear MPRV afterwards. |
No fault; the load is translated through va_data. |
mprv_mstatus x mpp_mstatus x read_acc x satp_mode x mode {M-mode} |
satp_op_active mstatus_mprv_ldst_op |
mstatus_mprv_ldst_op |
cp_mprv_store |
Verify MPRV=1 translates M-mode stores as if in the MPP mode |
M-mode: map va_data at every page-table level (4 KiB page and each superpage size of the Sv mode) (supervisor page for MPP=S, user page for MPP=U). Set mstatus.MPRV=1 with MPP=S, then MPP=U, and store (sw) through va_data. Clear MPRV afterwards. |
No fault; the store is translated through va_data. |
mprv_mstatus x mpp_mstatus x write_acc x satp_mode x mode {M-mode} |
satp_op_active mstatus_mprv_ldst_op |
mstatus_mprv_ldst_op |
cp_mprv_ins |
Verify MPRV=1 does not translate M-mode instruction fetches |
M-mode with mstatus.MPRV=1 and MPP=S, then MPP=U: jump (jalr) to the physical address of the test page. |
The fetch uses the physical address and does not fault. |
mprv_mstatus x mpp_mstatus x exec_acc x satp_mode x mode {M-mode} |
mstatus_mprv_inst_xlat_op |
mstatus_mprv_inst_xlat_op |
PTE_upage_i |
Verify a user leaf PTE is observed on the instruction side during the MPRV tests |
Sampled when an instruction fetch walks a user leaf PTE (U=1) during the MPRV/SUM tests. |
A valid user leaf PTE (U=1) is seen by the fetch. |
PTE_upage_i {leaflvl_u} |
||
cp_mprv_upage_smode_sumunset_noread |
Verify an M-mode load with MPRV=1, MPP=S to a user page faults when mstatus.SUM=0 |
M-mode with MPRV=1, MPP=S and mstatus.SUM=0: user leaf PTE (U=1) at every page-table level (4 KiB page and each superpage size of the Sv mode). Load (lw) from the page through va_data. |
Load page fault (mcause = 13); mtval = faulting virtual address. |
mprv_mstatus x mpp_mstatus x read_acc x PTE_upage_d x PageType_d x load_page_fault x sum_sstatus x mode {M-mode} |
mstatus_sum_op mstatus_sum_op_mprv_mpp mtval_vaddr_wr1 |
mstatus_sum_op_mprv_mpp |
cp_mprv_upage_smode_sumunset_nowrite |
Verify an M-mode store with MPRV=1, MPP=S to a user page faults when mstatus.SUM=0 |
M-mode with MPRV=1, MPP=S and mstatus.SUM=0: user leaf PTE (U=1) at every page-table level (4 KiB page and each superpage size of the Sv mode). Store (sw) to the page through va_data. |
Store/AMO page fault (mcause = 15); mtval = faulting virtual address. |
mprv_mstatus x mpp_mstatus x write_acc x PTE_upage_d x PageType_d x store_page_fault x sum_sstatus x mode {M-mode} |
mstatus_sum_op mstatus_sum_op_mprv_mpp mtval_vaddr_wr1 |
mstatus_sum_op_mprv_mpp |
cp_mprv_upage_smode_sumunset_noexec |
Verify MPRV=1, MPP=S with mstatus.SUM=0 does not affect M-mode instruction fetch |
M-mode with MPRV=1, MPP=S and SUM=0, user page (U=1) mapped at va_data: jump (jalr) to the physical address of the page. |
No fault: instruction fetch ignores MPRV. |
mprv_mstatus x mpp_mstatus x exec_acc x PageType_i x sum_sstatus x mode {M-mode} |
mstatus_sum_op mstatus_sum_op_mprv_mpp |
[norm:mstatus_sum_op] [norm:mstatus_sum_op_mprv_mpp] |
cp_mprv_upage_smode_sumset_exec |
Verify MPRV=1, MPP=S with mstatus.SUM=1 does not affect M-mode instruction fetch |
M-mode with MPRV=1, MPP=S and SUM=1, user page (U=1) mapped at va_data: jump (jalr) to the physical address of the page. |
No fault: instruction fetch ignores MPRV. |
mprv_mstatus x mpp_mstatus x exec_acc x PageType_i x sum_sstatus x mode {M-mode} |
mstatus_sum_op mstatus_sum_op_mprv_mpp |
mstatus_mprv_inst_xlat_op |
cp_mprv_upage_smode_sumset_read |
Verify an M-mode load with MPRV=1, MPP=S to a user page succeeds when mstatus.SUM=1 |
M-mode with MPRV=1, MPP=S and mstatus.SUM=1: user leaf PTE (U=1) at every page-table level (4 KiB page and each superpage size of the Sv mode). Load (lw) from the page through va_data. |
No fault. |
mprv_mstatus x mpp_mstatus x read_acc x PTE_upage_d x PageType_d x sum_sstatus x mode {M-mode} |
mstatus_sum_op mstatus_sum_op_mprv_mpp |
mstatus_sum_op_mprv_mpp |
cp_mprv_upage_smode_sumset_write |
Verify an M-mode store with MPRV=1, MPP=S to a user page succeeds when mstatus.SUM=1 |
M-mode with MPRV=1, MPP=S and mstatus.SUM=1: user leaf PTE (U=1) at every page-table level (4 KiB page and each superpage size of the Sv mode). Store (sw) to the page through va_data. |
No fault. |
mprv_mstatus x mpp_mstatus x write_acc x PTE_upage_d x PageType_d x sum_sstatus x mode {M-mode} |
mstatus_sum_op mstatus_sum_op_mprv_mpp |
mstatus_sum_op_mprv_mpp |
cp_mstatus_sbe_read |
Verify page-table walks use big-endian PTEs when mstatus.SBE=1 (load) |
NORUN until a big-endian configuration exists. M-mode sets mstatus.SBE (mstatush.SBE on RV32) and writes the walk, leaf and identity-map PTEs big-endian, at every page-table level (4 KiB page and each superpage size of the Sv mode). S-mode then does the load through va_data (also with SUM=1 on a user page). |
No fault; the walk interprets the big-endian PTEs. |
read_acc x PTE_sbe_d x PageType_d x sbe_mstatus |
MSTATUS_SBE_WARL MSTATUSH_SBE_WARL mstatus_sbe_implicit |
mstatus_mstatush_xbe_warl |
cp_mstatus_sbe_write |
Verify page-table walks use big-endian PTEs when mstatus.SBE=1 (store) |
NORUN until a big-endian configuration exists. M-mode sets mstatus.SBE (mstatush.SBE on RV32) and writes the walk, leaf and identity-map PTEs big-endian, at every page-table level (4 KiB page and each superpage size of the Sv mode). S-mode then does the store through va_data (also with SUM=1 on a user page). |
No fault; the walk interprets the big-endian PTEs. |
write_acc x PTE_sbe_d x PageType_d x sbe_mstatus |
MSTATUS_SBE_WARL MSTATUSH_SBE_WARL mstatus_sbe_implicit |
mstatus_mstatush_xbe_warl |
Sv_Zicbo VirtMem + CBOM/CBOZ
| Coverpoint | Goal | Feature Description | Expectation | Bins | ID | Normative Rule | Status | Notes |
|---|---|---|---|---|---|---|---|---|
General Test Environment (Sv_Zicbo): |
||||||||
cp_zicbop_no_fault_s |
Verify prefetch.i/r/w through a valid mapping execute without exception from S-mode |
S-mode: RWX leaf PTE with PTE.U=0, at every page-table level (4 KiB page and each superpage size of the Sv mode). Execute prefetch.i, prefetch.r and prefetch.w on va_data. |
No exception; prefetches never fault. |
zicbop_ins x mode (each supported translation mode) x {S-mode} |
cbp_unperm_translate |
[norm:cbp_unperm_translate] |
||
cp_zicbop_no_fault_u |
Verify prefetch.i/r/w through a valid mapping execute without exception from U-mode |
U-mode: RWX leaf PTE with PTE.U=1, at every page-table level (4 KiB page and each superpage size of the Sv mode). Execute prefetch.i, prefetch.r and prefetch.w on va_data. |
No exception; prefetches never fault. |
zicbop_ins x mode (each supported translation mode) x {U-mode} |
cbp_unperm_translate |
[norm:cbp_unperm_translate] |
||
cp_PTE_inv_cbo_s |
Verify a CBO through an invalid PTE (V=0) raises a store/AMO page fault from S-mode |
S-mode: leaf PTE with V=0 and PTE.U=0, at every page-table level (4 KiB page and each superpage size of the Sv mode). Execute cbo.clean, cbo.flush and cbo.inval (Zicbom) or cbo.zero (Zicboz) on va_data. |
Store/AMO page fault (scause = 15) for every CBO; stval = faulting virtual address. |
PTE_d_inv x PageType_d x store_page_fault x cbo_ins x mode {S-mode} |
fault_excep_csr |
fault_excep_csr |
||
cp_PTE_inv_cbo_u |
Verify a CBO through an invalid PTE (V=0) raises a store/AMO page fault from U-mode |
U-mode: leaf PTE with V=0 and PTE.U=1, at every page-table level (4 KiB page and each superpage size of the Sv mode). Execute cbo.clean, cbo.flush and cbo.inval (Zicbom) or cbo.zero (Zicboz) on va_data. |
Store/AMO page fault (scause = 15) for every CBO; stval = faulting virtual address. |
PTE_d_inv x PageType_d x store_page_fault x cbo_ins x mode {U-mode} |
fault_excep_csr |
fault_excep_csr |
||
cp_PTE_res_rwx_cbo_s |
Verify a CBO through the reserved encoding W=1, R=0 raises a store/AMO page fault from S-mode |
S-mode: leaf PTE with W=1, R=0 (with X=1 and with X=0) and PTE.U=0, at every page-table level (4 KiB page and each superpage size of the Sv mode). Execute the CBOs on va_data. |
Store/AMO page fault (scause = 15). |
PTE_d_res_rwx x PageType_d x store_page_fault x cbo_ins x mode {S-mode} |
||||
cp_PTE_res_rwx_cbo_u |
Verify a CBO through the reserved encoding W=1, R=0 raises a store/AMO page fault from U-mode |
U-mode: leaf PTE with W=1, R=0 (with X=1 and with X=0) and PTE.U=1, at every page-table level (4 KiB page and each superpage size of the Sv mode). Execute the CBOs on va_data. |
Store/AMO page fault (scause = 15). |
PTE_d_res_rwx x PageType_d x store_page_fault x cbo_ins x mode {U-mode} |
||||
cp_PTE_nonleaf_lvl0_cbo_s |
Verify a CBO through a level-0 pointer PTE raises a store/AMO page fault from S-mode |
S-mode: level-0 PTE with V=1, R=W=X=0 and PTE.U=0. Execute the CBOs on va_data. |
Store/AMO page fault (scause = 15). |
PTE_nonleaf_lvl0_d x kilo_page x mode x store_page_fault x cbo_ins x mode {S-mode} |
||||
cp_PTE_nonleaf_lvl0_cbo_u |
Verify a CBO through a level-0 pointer PTE raises a store/AMO page fault from U-mode |
U-mode: level-0 PTE with V=1, R=W=X=0 and PTE.U=1. Execute the CBOs on va_data. |
Store/AMO page fault (scause = 15). |
PTE_nonleaf_lvl0_d x kilo_page x mode x store_page_fault x cbo_ins x mode {U-mode} |
||||
cp_PTE_r_set_w_unset_zicbom_s |
Verify Zicbom CBOs succeed with R=1 and W=0 from S-mode |
S-mode: RX leaf PTE (R=1, W=0) with PTE.U=0, at every page-table level (4 KiB page and each superpage size of the Sv mode), with sstatus.SUM=0 and SUM=1. Execute cbo.clean, cbo.flush and cbo.inval on va_data. |
No exception: Zicbom needs read or write permission. |
PTE_r_set_w_unset_spage_d x PageType_d x cbo_ins x sum_sstatus x mode {S-mode} |
cbm_access |
|||
cp_PTE_r_set_w_unset_zicbom_u |
Verify Zicbom CBOs succeed with R=1 and W=0 from U-mode |
U-mode: RX leaf PTE (R=1, W=0) with PTE.U=1, at every page-table level (4 KiB page and each superpage size of the Sv mode). Execute cbo.clean, cbo.flush and cbo.inval on va_data. |
No exception: Zicbom needs read or write permission. |
PTE_r_set_w_unset_upage_d x PageType_d x cbo_ins x mode {U-mode} |
cbm_access |
|||
Zicbom CBOs on an execute-only page |
cbm_access |
Not tested |
Not tested because the outcome is UNSPECIFIED. When a page permits instruction fetch but neither loads nor stores, cmo.adoc (the paragraph after cbm_access) lets the implementation either perform cbo.clean/flush/inval or raise a store page fault, so a test has no single expected result. |
|||||
cp_PTE_w_unset_zicboz_s |
Verify cbo.zero raises a store/AMO page fault with W=0 from S-mode |
S-mode: RX leaf PTE (W=0) with PTE.U=0, at every page-table level (4 KiB page and each superpage size of the Sv mode), with sstatus.SUM=0 and SUM=1. Execute cbo.zero on va_data. |
Store/AMO page fault (scause = 15). |
PTE_w_unset_spage_d x PageType_d x store_page_fault x cbo_ins x sum_sstatus x mode {S-mode} |
cbz_unperm_fault |
cbz_unperm_fault |
||
cp_PTE_w_unset_zicboz_u |
Verify cbo.zero raises a store/AMO page fault with W=0 from U-mode |
U-mode: RX leaf PTE (W=0) with PTE.U=1, at every page-table level (4 KiB page and each superpage size of the Sv mode). Execute cbo.zero on va_data. |
Store/AMO page fault (scause = 15). |
PTE_w_unset_upage_d x PageType_d x store_page_fault x cbo_ins x mode {U-mode} |
cbz_unperm_fault |
cbz_unperm_fault |
||
cp_spage_rwx_cbo_u |
Verify a U-mode CBO to a supervisor page (U=0) raises a store/AMO page fault |
U-mode: supervisor RWX leaf PTE (U=0), at every page-table level (4 KiB page and each superpage size of the Sv mode). Execute the CBOs on va_data. |
Store/AMO page fault (scause = 15). |
PTE_spage_d x PageType_d x store_page_fault x cbo_ins x mode {U-mode} |
cbm_unperm_fault |
cbm_unperm_fault |
||
cp_upage_sumunset_cbo_s |
Verify an S-mode CBO to a user page (U=1) raises a store/AMO page fault when sstatus.SUM=0 |
S-mode with sstatus.SUM=0: user RWX leaf PTE (U=1), at every page-table level (4 KiB page and each superpage size of the Sv mode). Execute the CBOs on va_data. |
Store/AMO page fault (scause = 15). |
PTE_upage_d x PageType_d x store_page_fault x cbo_ins x sum_sstatus x mode {S-mode} |
cbm_unperm_fault |
cbm_unperm_fault |
||
cp_Abit_unset_cbo_s |
Verify a CBO through a PTE with A=0 raises a store/AMO page fault from S-mode (no hardware A update) |
S-mode: leaf PTE with A=0 and PTE.U=0, at every page-table level (4 KiB page and each superpage size of the Sv mode); menvcfg.ADUE=0. Execute the CBOs on va_data. |
Store/AMO page fault (scause = 15). |
PTE_Abit_unset_d x PageType_d x store_page_fault x cbo_ins x mode {S-mode} |
cbm_unperm_translate cbz_unperm_translate |
cbm_unperm_translate |
||
cp_Abit_unset_cbo_u |
Verify a CBO through a PTE with A=0 raises a store/AMO page fault from U-mode (no hardware A update) |
U-mode: leaf PTE with A=0 and PTE.U=1, at every page-table level (4 KiB page and each superpage size of the Sv mode); menvcfg.ADUE=0. Execute the CBOs on va_data. |
Store/AMO page fault (scause = 15). |
PTE_Abit_unset_d x PageType_d x store_page_fault x cbo_ins x mode {U-mode} |
cbm_unperm_translate |
cbm_unperm_translate |
||
cp_Dbit_unset_zicbom_s |
Verify Zicbom CBOs do not check PTE.D from S-mode |
S-mode: leaf PTE with A=1, D=0 and PTE.U=0, at every page-table level (4 KiB page and each superpage size of the Sv mode). Execute cbo.clean, cbo.flush and cbo.inval on va_data. |
No exception and D is not set. |
PTE_Dbit_unset_d x PageType_d x cbo_ins x mode {S-mode} |
||||
cp_Dbit_unset_zicbom_u |
Verify Zicbom CBOs do not check PTE.D from U-mode |
U-mode: leaf PTE with A=1, D=0 and PTE.U=1, at every page-table level (4 KiB page and each superpage size of the Sv mode). Execute cbo.clean, cbo.flush and cbo.inval on va_data. |
No exception and D is not set. |
PTE_Dbit_unset_d x PageType_d x cbo_ins x mode {U-mode} |
||||
cp_Dbit_unset_zicboz_s |
Verify cbo.zero through a PTE with D=0 raises a store/AMO page fault from S-mode (no hardware D update) |
S-mode: leaf PTE with A=1, D=0 and PTE.U=0, at every page-table level (4 KiB page and each superpage size of the Sv mode); menvcfg.ADUE=0. Execute cbo.zero on va_data. |
Store/AMO page fault (scause = 15). |
PTE_Dbit_unset_d x PageType_d x store_page_fault x cbo_ins x mode {S-mode} |
cbz_unperm_translate |
cbz_unperm_translate |
||
cp_Dbit_unset_zicboz_u |
Verify cbo.zero through a PTE with D=0 raises a store/AMO page fault from U-mode (no hardware D update) |
U-mode: leaf PTE with A=1, D=0 and PTE.U=1, at every page-table level (4 KiB page and each superpage size of the Sv mode); menvcfg.ADUE=0. Execute cbo.zero on va_data. |
Store/AMO page fault (scause = 15). |
PTE_Dbit_unset_d x PageType_d x store_page_fault x cbo_ins x mode {U-mode} |
cbz_unperm_translate |
|||
cp_misaligned_page_cbo_s |
Verify a CBO through a misaligned superpage raises a store/AMO page fault from S-mode |
S-mode: superpage leaf PTE with PTE.U=0 whose PPN has non-zero bits below the superpage size, at each superpage level. Execute the CBOs on va_data. |
Store/AMO page fault (scause = 15). |
PTE_RWX_d x misaligned_PPN_d x store_page_fault x cbo_ins x mode {S-mode} |
||||
cp_misaligned_page_cbo_u |
Verify a CBO through a misaligned superpage raises a store/AMO page fault from U-mode |
U-mode: superpage leaf PTE with PTE.U=1 whose PPN has non-zero bits below the superpage size, at each superpage level. Execute the CBOs on va_data. |
Store/AMO page fault (scause = 15). |
PTE_RWX_d x misaligned_PPN_d x store_page_fault x cbo_ins x mode {U-mode} |
||||
cp_PTE_nonleaf_DAU_cbo |
Verify a CBO with D, A or U set in a non-leaf PTE raises a store/AMO page fault |
S-mode and U-mode: set D, A or U (one at a time) in the non-leaf PTE above a valid leaf. Execute the CBOs on va_data. Requires privileged spec 1.12 or later. |
Store/AMO page fault (scause = 15). |
PTE_DAU_d x PageType_d x store_page_fault x cbo_ins x mode {S/U-mode} |
||||
cp_leaf_PTE_to_nonexistent_pa_cbo_s |
Verify a CBO to a non-existent physical address raises a store/AMO access fault from S-mode |
S-mode: valid leaf PTE with PTE.U=0 pointing at RVMODEL_ACCESS_FAULT_ADDRESS_STORE, at every page-table level (4 KiB page and each superpage size of the Sv mode). Execute the CBOs on va_data. |
Store/AMO access fault (scause = 7); stval = faulting virtual address. |
PTE_RWX_d x d_phys_address_nonexistent x PageType_d x store_acc_fault x cbo_ins x mode {S-mode} |
pma_chk_paddr |
pma_chk_paddr |
||
cp_leaf_PTE_to_nonexistent_pa_cbo_u |
Verify a CBO to a non-existent physical address raises a store/AMO access fault from U-mode |
U-mode: valid leaf PTE with PTE.U=1 pointing at RVMODEL_ACCESS_FAULT_ADDRESS_STORE, at every page-table level (4 KiB page and each superpage size of the Sv mode). Execute the CBOs on va_data. |
Store/AMO access fault (scause = 7); stval = faulting virtual address. |
PTE_RWX_d x d_phys_address_nonexistent x PageType_d x store_acc_fault x cbo_ins x mode {U-mode} |
pma_chk_paddr |
pma_chk_paddr |
||
cp_nonleaf_PTE_to_nonexistent_pa_cbo |
Verify a CBO whose page-table walk reads a non-existent physical address raises a store/AMO access fault |
S-mode and U-mode: non-leaf PTE pointing at RVMODEL_ACCESS_FAULT_ADDRESS_LOAD instead of the next page table. The page-table read is an implicit load, so the table uses the load access-fault region. Only when RVMODEL_ACCESS_FAULT_ADDRESS_STORE and RVMODEL_ACCESS_FAULT_ADDRESS_LOAD are defined. Execute the CBOs on va_data. |
Store/AMO access fault (scause = 7). |
pointer_PTE_d x d_phys_address_nonexistent x PageType_d x store_acc_fault x cbo_ins x mode {S/U-mode} |
||||
Sv_Exceptions Virtual Memory Exceptions
The following coverpoints should be exercised in supervisor mode
| Coverpoint | Goal | Feature Description | Bins | Normative Rule |
|---|---|---|---|---|
cp_instr_page_fault_s |
Instruction Page Fault |
jump to address that causes instruction page fault |
||
cp_load_page_fault_s |
Load Page Fault |
load from address that causes load page fault |
||
cp_store_page_fault_s |
Store Page Fault |
store to address that causes store page fault |
||
cp_misaligned_priority_load_s |
Priority of exceptions |
Attempt lw and sw and fetch from memory location causing {access fault and page fault}, {page fault and misaligned}, {access fault, page fault, misaligned} |
mcause_exccode_priority_misaligned |
|
cp_misaligned_load_page_fault_s |
Page fault on each part of a misaligned access |
Check behavior of a misaligned load spanning a page boundary, in which one of the two pages faults. |
2 bins |
|
cp_misaligned_store_page_fault_s |
Page fault on each part of a misaligned access |
Same as cp_misaligned_load_page_fault_u but with sw and store faults. |
2 bins |
|
cp_misaligned_instr_page_fault_s |
Page fault on each part of a misaligned instruction |
Same setup as cp_misaligned_load_page_fault_s |
2 bins |
|
The following coverpoints should be exercised in user mode |
||||
cp_instr_page_fault_u |
Instruction Page Fault |
jump to address that causes instruction page fault |
||
cp_load_page_fault_u |
Load Page Fault |
load from address that causes load page fault |
||
cp_store_page_fault_u |
Store Page Fault |
store to address that causes store page fault |
||
cp_misaligned_priority_load_u |
Priority of exceptions |
Attempt lw and sw and fetch from memory location causing {access fault and page fault}, {page fault and misaligned}, {access fault, page fault, misaligned} |
mcause_exccode_priority_misaligned |
|
Sv_ExceptionsSm Virtual Memory Exceptions with M-mode State
| Coverpoint | Goal | Feature Description | Expectation | Normative Rule |
|---|---|---|---|---|
The following coverpoints should be exercised in machine mode. |
||||
cp_instr_page_fault_m |
Instruction Page Fault |
jump to address that would cause instruction page fault in non-M-mode because mstatus.MPRV=1 and mstatus.MPP={01, 00}, but no fault occurs because MPRV should not affect instruction fetch in M-mode. |
||
cp_load_page_fault_m |
Load Page Fault |
load from address that causes load page fault because mstatus.MPRV=1 and mstatus.MPP={01, 00} |
||
cp_store_page_fault_m |
Store Page Fault |
store to address that causes store page fault because mstatus.MPRV=1 and mstatus.MPP={01, 00} |
||
cp_misaligned_priority_load_m |
Priority of exceptions |
Attempt lw and sw and fetch from memory location causing {access fault and page fault}, {page fault and misaligned}, {access fault, page fault, misaligned} |
M-mode needs MPRV to S or U mode to be able to cause access fault. No fetch fault occurs because MPRV does not affect fetch privilege. |
mcause_exccode_priority_misaligned |
cp_medeleg_m |
Machine mode exception not affected by medeleg |
Attempt instruction/load/store page faults crossed crossed with medeleg = [ {1011_0011_1111_1111}, {0}, and 13 different walking 1s] |
medeleg should not affect machine mode exceptions. No instruction page fault occurs because MPRV does not affect fetch privilege. |
|
The following coverpoints should be exercised in supervisor mode |
||||
cp_medeleg_s |
Delegation to supervisor mode |
Attempt instruction/load/store page faults crossed crossed with medeleg = [ {1011_0011_1111_1111}, {0}, and 13 different walking 1s] |
Should delegate when a 1 is in the appropriate column. |
|
The following coverpoints should be exercised in user mode |
||||
cp_medeleg_u |
Delegation to supervisor mode |
Attempt instruction/load/store page faults crossed crossed with medeleg = [ {1011_0011_1111_1111}, {0}, and 13 different walking 1s] |
Should delegate when a 1 is in the appropriate column. |
|
Sv_ExceptionsZalrsc Virtual Memory LR/SC Exceptions
This testplan is for systems supporting supervisor mode and virtual memory. Also requires Zalrsc The following coverpoints should be exercised in supervisor mode
| Coverpoint | Goal | Feature Description | Normative Rule |
|---|---|---|---|
cp_misaligned_priority_s |
Priority of exceptions |
Attempt lr.w and sc.w from memory location causing {access fault and page fault}, {page fault and misaligned}, {access fault, page fault, misaligned} |
mcause_exccode_priority_misaligned |
The following coverpoints should be exercised in user mode |
|||
cp_misaligned_priority_u |
Priority of exceptions |
Attempt lr.w and sc.w from memory location causing {access fault and page fault}, {page fault and misaligned}, {access fault, page fault, misaligned} |
mcause_exccode_priority_misaligned |
Sv_ExceptionsZalrscSm Virtual Memory LR/SC Exceptions with M-mode State
This testplan is for systems supporting supervisor mode and virtual memory. Also requires Zalrsc
| Coverpoint | Goal | Feature Description | Notes |
|---|---|---|---|
The following coverpoints should be exercised in machine mode. |
|||
cp_misaligned_priority_m |
Priority of exceptions |
Attempt lr.w and sc.w from memory location causing {access fault and page fault}, {page fault and misaligned}, {access fault, page fault, misaligned} |
M-mode needs MPRV to S or U mode to be able to cause access fault. |
cp_medeleg_m |
Machine mode exception not affected by medeleg |
Attempt lr.w and sc.w causing page faults crossed crossed with medeleg = [ {1011_0011_1111_1111}, {0}, and 13 different walking 1s] |
medeleg should not affect machine mode exceptions |
The following coverpoints should be exercised in supervisor mode |
|||
cp_medeleg_s |
Delegation to supervisor mode |
Attempt lr.w and sc.w causing page faults crossed crossed with medeleg = [ {1011_0011_1111_1111}, {0}, and 13 different walking 1s] |
Should delegate when a 1 is in the appropriate column. |
The following coverpoints should be exercised in user mode |
|||
cp_medeleg_u |
Delegation to supervisor mode |
Attempt lr.w and sc.w causing page faults crossed crossed with medeleg = [ {1011_0011_1111_1111}, {0}, and 13 different walking 1s] |
Should delegate when a 1 is in the appropriate column. |
Sv_ExceptionsZaamo Virtual Memory AMO Exceptions
This testplan is for systems supporting supervisor mode and virtual memory. Also requires Zaamo The following coverpoints should be exercised in supervisor mode
| Coverpoint | Goal | Feature Description | Normative Rule |
|---|---|---|---|
cp_misaligned_priority_s |
Priority of exceptions |
Attempt amoadd.w from memory location causing {access fault and page fault}, {page fault and misaligned}, {access fault, page fault, misaligned} |
mcause_exccode_priority_misaligned |
The following coverpoints should be exercised in user mode |
|||
cp_misaligned_priority_u |
Priority of exceptions |
Attempt amoadd.w from memory location causing {access fault and page fault}, {page fault and misaligned}, {access fault, page fault, misaligned} |
mcause_exccode_priority_misaligned |
Sv_ExceptionsZaamoSm Virtual Memory AMO Exceptions with M-mode State
This testplan is for systems supporting supervisor mode and virtual memory. Also requires Zaamo
| Coverpoint | Goal | Feature Description | Notes |
|---|---|---|---|
The following coverpoints should be exercised in machine mode. |
|||
cp_misaligned_priority_m |
Priority of exceptions |
Attempt amoadd.w from memory location causing {access fault and page fault}, {page fault and misaligned}, {access fault, page fault, misaligned} |
M-mode needs MPRV to S or U mode to be able to cause access fault. |
cp_medeleg_m |
Machine mode exception not affected by medeleg |
Attempt amoadd.w causing page faults crossed crossed with medeleg = [ {1011_0011_1111_1111}, {0}, and 13 different walking 1s] |
medeleg should not affect machine mode exceptions |
The following coverpoints should be exercised in supervisor mode |
|||
cp_medeleg_s |
Delegation to supervisor mode |
Attempt amoadd.w causing page faults crossed crossed with medeleg = [ {1011_0011_1111_1111}, {0}, and 13 different walking 1s] |
Should delegate when a 1 is in the appropriate column. |
The following coverpoints should be exercised in user mode |
|||
cp_medeleg_u |
Delegation to supervisor mode |
Attempt amoadd.w causing page faults crossed crossed with medeleg = [ {1011_0011_1111_1111}, {0}, and 13 different walking 1s] |
Should delegate when a 1 is in the appropriate column. |
Sv_H Hypervisor 2-Stage Virtual Memory
Sv_H verifies two-stage (VS-stage and G-stage) address translation for guest accesses in VS-mode and VU-mode and for HLV, HLVX and HSV in HS-mode. The group boots to HS-mode with hedeleg = 0, so guest traps are taken in HS-mode, whose trap handler records scause, stval, htval, htinst and hstatus.GVA; only the cp_hedeleg tests delegate page faults to VS-mode. Tests that need M-mode (mstatus.MPRV with MPV = 1, and guest traps taken in M-mode) are in Sv_HSm. Guest code runs at a guest virtual address that the test maps through both stages. A guest access is a store (sw) and a load (lw) of the word at offset 8 of a 4 KiB test page, and a fetch (jalr) of the ret at its start. Loads are checked in the signature after the guest returns to HS-mode, because VU-mode cannot write the signature. VS-stage tests (Sv_H_vsstage_cg) run with hgatp = Bare, G-stage tests (Sv_H_gstage_cg) with vsatp = Bare, and two-stage tests (Sv_H_twostage_cg, Sv_H_hlv_cg) with both paged. After changing a PTE, vsatp or hgatp, the test executes hfence.vvma and hfence.gvma. Leaves are kilopages with V = R = W = X = A = D = 1 unless a row says otherwise. VS-stage leaves have U = 0 for VS-mode and U = 1 for VU-mode; G-stage leaves have U = 1, because every G-stage access is a user-level access. The crosses have a bin for each supported mode: vsatp_mode (Sv32, or Sv39, Sv48 and Sv57), hgatp_mode (Sv32x4, or Sv39x4, Sv48x4 and Sv57x4) and stage_modes (the pairs Sv32/Sv32x4, Sv39/Sv39x4, Sv48/Sv48x4 and Sv57/Sv57x4). The VS-stage, G-stage and two-stage tests run in each mode the hart supports, in separate test files for Sv48/Sv48x4 and Sv57/Sv57x4; the Bare, hedeleg, MODE-field, straddle and fence tests run with Sv32/Sv32x4 or Sv39/Sv39x4. The fetch straddle test (cp_straddle) needs Zca and the load/store straddle test (cp_ldst_straddle) needs a hart that performs misaligned accesses byte by byte; they are separate test files. The GPA-width and non-canonical tests are RV64 only. Sv_H tests Svade (menvcfg.ADUE = henvcfg.ADUE = 0). Svadu_H, Svpbmt_H and Svnapot_H test hardware A/D updates, PBMT and NAPOT in the VS-stage and G-stage. The reference model trace records instructions, registers and CSRs but not PTEs or page-table walks. The coverpoints therefore record each access with its privilege mode, the translation modes, the controls that affect it (SUM, MXR, ADUE, SPVP, hedeleg) and the trap it takes (cause, htinst, htval). The PTE that a testcase uses (permissions, U, A/D, RSW and reserved bits, leaf level, superpage alignment) is set by the test, and its effect is checked by the signature: the loaded word, the trap record, and the PTE read back after an A/D case. The coverage cannot tell apart testcases that differ only in PTE bits with the same outcome, such as RSW = 01 and 11, or reserved bits 60:59 that Svrsw60t59b makes ignored; a hart that mishandles such a bit fails the signature check instead. The vsatp and hgatp PPN, ASID and VMID fields, including hgatp.PPN[1:0] reading as zero in paged modes, are walked by H cp_atpwalk0 and cp_atpwalk1, and mstatus.TVM on hgatp is checked by HSm cp_tvm_hs. Because hgatp.PPN[1:0] are zero, the 16 KiB G-stage root table is always 16 KiB aligned and no misaligned root can be configured.
| Coverpoint | Goal | Feature Description | Expectation | Bins | Normative Rule | Status | Notes |
|---|---|---|---|---|---|---|---|
VS-stage translation, hgatp = Bare (Sv_H_vsstage_cg) |
|||||||
cp_vsatp_perm |
VS-stage leaf permissions and PTE formats |
In VS-mode and VU-mode with hgatp = Bare and vsstatus.SUM = MXR = 0, store, load and fetch through VS-stage leaves with U = 0 and 1 and each legal RWX (RWX, X, RX, RW, R). |
An access succeeds when RWX permits it and U matches the mode (U = 0 in VS-mode with SUM = 0, U = 1 in VU-mode); otherwise it raises an instruction, load or store/AMO page fault (12, 13, 15) in HS-mode with stval = the guest virtual address and htval = 0. A load from an execute-only page faults. |
{VS, VU} x {sw, lw, jalr} x vsatp_mode x hgatp Bare x {no trap, page fault} |
H_vm_supported |
||
cp_vsatp_sum |
vsstatus.SUM in VS-mode and VU-mode |
In VS-mode with hgatp = Bare and vsstatus.SUM = 1, store, load and fetch through a VS-stage leaf with U = 0 and RWX, and through leaves with U = 1 and each legal RWX. In VU-mode with SUM = 1, store, load and fetch through U = 0 and U = 1 leaves with RWX. |
In VS-mode with SUM = 1, loads and stores to U = 1 pages succeed when RWX permits them, and fetches from U = 1 pages raise instruction page faults. SUM does not affect VU-mode, so U = 0 pages still fault there. |
{VS, VU} x {sw, lw, jalr} x vsatp_mode x hgatp Bare x vsstatus.SUM {0, 1} |
vsstatus_sz_acc_op |
||
cp_vsstatus_mxr |
vsstatus.MXR makes VS-stage execute-only pages readable |
In VS-mode and VU-mode with hgatp = Bare and vsstatus.MXR = 1, store, load and fetch through an execute-only VS-stage leaf with U = 0 and 1 and vsstatus.SUM = 0 and 1. The MXR = 0 bins come from cp_vsatp_perm and cp_vsatp_sum. |
With MXR = 1, the load succeeds when U and SUM permit the access; with MXR = 0 it raises a load page fault. Stores fault, and fetches follow X, U and SUM as in cp_vsatp_sum. |
{VS, VU} x lw x vsatp_mode x hgatp Bare x vsstatus.SUM {0, 1} x vsstatus.MXR {0, 1} |
vsstatus_mxr_vm |
||
cp_vsatp_svade |
Svade in the VS-stage |
In VS-mode with hgatp = Bare and menvcfg.ADUE = henvcfg.ADUE = 0, store, load and fetch through VS-stage leaves with A = D = 0 and with D = 0. The leaf is read back after the accesses. |
An access with A = 0, or a store with D = 0, raises a page fault and the PTE is unchanged. |
VS x {sw, lw, jalr} x vsatp_mode x hgatp Bare x menvcfg.ADUE = henvcfg.ADUE = 0 |
henvcfg_adue_op |
Svadu_H cp_vsatp_adue has the ADUE = 1 cases. |
|
G-stage translation, vsatp = Bare (Sv_H_gstage_cg) |
|||||||
cp_hgatp_perm |
G-stage leaf permissions and PTE formats |
In VS-mode and VU-mode with vsatp = Bare and sstatus.MXR = vsstatus.MXR = 0, store, load and fetch through G-stage leaves with U = 0 and 1 and each legal RWX. |
G-stage accesses are user-level, so a U = 0 leaf raises a guest-page fault even from VS-mode. Otherwise an access succeeds when RWX permits it. A G-stage denial raises an instruction, load or store/AMO guest-page fault (20, 21, 23) for the original access type in HS-mode, with stval = the guest virtual address, htval = the guest physical address >> 2 (or zero) and hstatus.GVA = 1. |
{VS, VU} x {sw, lw, jalr} x vsatp Bare x hgatp_mode x {no trap, guest-page fault} |
H_vm_supported |
||
cp_hgatp_mxr |
Only the HS-level MXR makes G-stage execute-only pages readable |
In VS-mode and VU-mode with vsatp = Bare, load and fetch through an execute-only G-stage leaf with sstatus.MXR = 0 and 1 and vsstatus.MXR = 0 and 1. |
The load succeeds only with sstatus.MXR = 1; otherwise it raises a load guest-page fault. vsstatus.MXR affects only the VS-stage. The fetches succeed. |
{VS, VU} x lw x vsatp Bare x hgatp_mode x mstatus.MXR {0, 1} x vsstatus.MXR {0, 1} |
vsstatus_mxr_vm |
||
cp_hgatp_svade |
Svade in the G-stage |
In VS-mode with vsatp = Bare and menvcfg.ADUE = 0, store, load and fetch through G-stage leaves with A = D = 0 and with D = 0. The leaf is read back after the accesses. |
An access with A = 0, or a store with D = 0, raises a guest-page fault for the original access type and the PTE is unchanged. |
VS x {sw, lw, jalr} x vsatp Bare x hgatp_mode x menvcfg.ADUE = 0 |
hgatp_mode_sv39x4 |
Svadu_H cp_hgatp_adue has the ADUE = 1 cases. |
|
cp_hgatp_gpa_width |
Guest physical address width of each G-stage mode |
RV64 only. In VS-mode with vsatp = Bare, for each supported hgatp mode, load from guest physical addresses with one bit set, from bit 37 to bit 63. A superpage leaf at the highest level whose page offset is at most the set bit maps each address below the mode’s width (41 for Sv39x4, 50 for Sv48x4, 59 for Sv57x4) to the test page. Below the root, the test image is identity mapped again at the leaf’s level. |
Addresses below the width translate, including the two extra root-table index bits of the x4 mode (bits 40:39 for Sv39x4), which index the 16 KiB root table. An address with a bit set at or above the width raises a load guest-page fault (GPA bits 63:41 for Sv39x4, 63:50 for Sv48x4 and 63:59 for Sv57x4 must be zero). |
VS x lw x vsatp Bare x hgatp_mode x set GPA bit {37-63} |
hgatp_mode_x4 |
||
cp_hgatp_sv32x4_gpa |
Sv32x4 translates 34-bit guest physical addresses |
RV32 only. In VS-mode, load through a VS-stage leaf whose guest physical address has bit 32, bit 33 or both set, with the G-stage leaf for that address valid and invalid. |
With the valid G-stage leaf the load reads the test page. With the invalid leaf it raises a load guest-page fault with htval = guest physical address bits 33:2 (or zero). |
VS x lw x vsatp paged x hgatp paged x htval bits 31:30 {01, 10, 11} |
hgatp_mode_x4 |
||
Two-stage translation (Sv_H_twostage_cg) |
|||||||
cp_twostage_perm |
VS-stage and G-stage permissions combined, and every pair of page sizes |
In VS-mode and VU-mode, store, load and fetch through (VS-stage, G-stage) leaves with permissions (RWX, RWX), (R, RWX), (RWX, R), (X, R), (RW, X), (invalid, RWX), (RWX, invalid) and (invalid, invalid). |
The VS-stage is checked first: a VS-stage denial raises a page fault (12, 13, 15) with htval = 0, and otherwise a G-stage denial raises a guest-page fault (20, 21, 23) for the original access type with htval = the guest physical address >> 2 (or zero). |
{VS, VU} x {sw, lw, jalr} x stage_modes x {no trap, page fault, guest-page fault} |
H_vm_supported |
||
cp_twostage_mxr |
vsstatus.MXR affects only the VS-stage; the HS-level MXR affects both stages |
In VS-mode and VU-mode, load and fetch through (VS-stage, G-stage) leaves (X, RWX), (RWX, X), (X, X) and (R, R), with vsstatus.MXR = 0 and 1 and sstatus.MXR = 0 and 1. |
vsstatus.MXR makes a VS-stage execute-only page readable; sstatus.MXR makes execute-only pages of both stages readable. A denied load raises a load page fault (VS-stage) or load guest-page fault (G-stage). Neither MXR grants execute permission, so the fetch from the (R, R) page raises an instruction page fault. |
{VS, VU} x lw x stage_modes x vsstatus.MXR {0, 1} x mstatus.MXR {0, 1} |
vsstatus_mxr_vm |
||
cp_twostage_svade |
Svade in both stages |
In VS-mode with menvcfg.ADUE = henvcfg.ADUE = 0, store, load and fetch through VS-stage leaves and G-stage leaves with A = D = 0 or D = 0. The VS-stage leaf is in a level-0 page table at a guest physical address with a G-stage leaf. |
An access with A = 0, or a store with D = 0, raises a page fault (VS-stage) or guest-page fault (G-stage). |
VS x {sw, lw, jalr} x stage_modes x menvcfg.ADUE = henvcfg.ADUE = 0 |
henvcfg_adue_op |
Svadu_H cp_twostage_adue has the ADUE = 1 cases. |
|
cp_implicit_gpf |
Guest-page faults on implicit VS-stage page-table reads |
In VS-mode with menvcfg.ADUE = 0, store, load and fetch through a VS-stage level-0 page table at a guest physical address whose G-stage leaf is invalid, execute-only, has U = 0 or has A = 0. |
Implicit VS-stage page-table reads are user-level G-stage loads, checked as implicit accesses rather than as the original access type. Each case raises a guest-page fault reported for the original access type (instruction, load or store/AMO), with htval = the guest physical address of the VS-stage PTE >> 2 and, if htval is nonzero, htinst = the read pseudoinstruction 0x3000 on RV64, 0x2000 on RV32. |
VS x {sw, lw, jalr} x stage_modes x htinst read pseudoinstruction |
H_vm_gpatrans |
Svadu_H cp_implicit_gpf has the A/D update case. |
|
cp_implicit_mxr |
MXR does not apply to implicit VS-stage page-table reads |
In VS-mode, load through a VS-stage level-0 page table at a guest physical address whose G-stage leaf is execute-only, with vsstatus.MXR = 0 and 1 and sstatus.MXR = 0 and 1. |
MXR makes execute-only pages readable only by explicit loads. Each load raises a load guest-page fault with htinst = the read pseudoinstruction. |
VS x lw x stage_modes x vsstatus.MXR {0, 1} x sstatus.MXR {0, 1} x htinst read pseudoinstruction |
H_vm_gpatrans |
||
cp_twostage_access_fault_load |
Access faults during two-stage translation report the original access type |
In VS-mode, store, load and fetch where the G-stage leaf maps the page to the access-fault address of that access type, where the G-stage maps the VS-stage level-0 page table to RVMODEL_ACCESS_FAULT_ADDRESS_LOAD, and where a G-stage level-1 PTE points at a table there. The page-table read is an implicit load, so the tables use the load access-fault region. |
Each access raises a store/AMO, load or instruction access fault. A fault on an implicit page-table read is reported for the original access type. |
VS x {sw, lw, jalr} x stage_modes x access fault |
H_vm_gpatrans |
Each access type is generated only when the DUT defines RVMODEL_ACCESS_FAULT_ADDRESS_{LOAD/STORE/FETCH}. The page-table cases also need RVMODEL_ACCESS_FAULT_ADDRESS_LOAD. |
|
cp_hedeleg_page_fault |
hedeleg delegates page faults, but not guest-page faults, to VS-mode |
In VS-mode and VU-mode with hedeleg bits 12, 13, 15, 20, 21 and 23 written with 1, store, load and fetch through an invalid VS-stage leaf, a read-only VS-stage leaf and an invalid G-stage leaf. |
hedeleg bits 20-23 are read-only zero. The page faults are taken in VS-mode (vscause = 12, 13 or 15, vstval = the guest virtual address); the guest-page faults are taken in HS-mode. The read-only leaf permits the load. |
cp_hedeleg_page_fault: {VS, VU} x {sw, lw, jalr} x vsatp paged x hgatp paged x hedeleg[15:12] = 1011 x page fault in VS-mode |
hedeleg_op |
||
cp_stage_both_bare |
No translation when both stages are Bare |
In VS-mode and VU-mode with vsatp = hgatp = Bare, store, load and fetch at the physical address of the test page. |
The guest virtual address is used as the supervisor physical address and the accesses succeed. |
{VS, VU} x {sw, lw, jalr} x vsatp Bare x hgatp Bare |
H_vm_supported |
||
cp_straddle |
A fetch that straddles a page boundary faults on the second page |
Needs Zca. In VS-mode, jump to a 4-byte instruction in the last halfword (offset 0xFFE) of a guest page whose next page is mapped, has an invalid G-stage leaf, or has an invalid VS-stage leaf. |
When the next page is mapped, the instruction executes. Otherwise the fetch raises an instruction guest-page fault (G-stage) or instruction page fault (VS-stage) with sepc = the instruction address and stval = the page-boundary address, the faulting portion; for the guest-page fault, htval holds the guest physical address of the page boundary >> 2 (or zero). |
VS x jalr x vsatp paged x hgatp paged x target offset 0xFFE x {no trap, page fault, guest-page fault} |
H_straddle |
||
cp_ldst_straddle |
A misaligned load or store that straddles a page boundary faults on the second page |
Only on harts with MISALIGNED_LDST and MISALIGNED_SPLIT_STRATEGY = sequential_bytes, which perform a misaligned access byte by byte. In VS-mode, store and load the word two bytes below the end (offset 0xFFE) of a guest page whose next page is mapped, has an invalid G-stage leaf, or has an invalid VS-stage leaf. |
When the next page is mapped, the accesses complete across the boundary. Otherwise they raise store/AMO or load guest-page faults (G-stage) or page faults (VS-stage) with stval = the page-boundary address, the faulting portion; for the guest-page faults, htval holds the guest physical address of the page boundary >> 2 (or zero). A faulting load leaves rd unchanged. |
VS x {lw, sw} x vsatp paged x hgatp paged x address offset 0xFFE x {no trap, page fault, guest-page fault} |
H_straddle |
||
cp_twostage_canonical |
Non-canonical guest virtual addresses |
RV64 only. For each supported pair Sv39/Sv39x4, Sv48/Sv48x4 and Sv57/Sv57x4, in VS-mode and VU-mode, store, load and fetch at the mapped guest virtual address with the bit just above the VS-stage VA width set, and with all bits from that bit to 63 set. The top VA bit is clear, so both addresses are non-canonical. |
Store/AMO, load or instruction page fault (not a guest-page fault). stval, and sepc for the fetch, may hold any invalid address, because an implementation may convert an invalid address to another invalid address before writing it. |
{VS, VU} x {lw, sw, jalr} x {Sv39, Sv48, Sv57 that the hart supports with the matching x4 mode} x page fault |
Sv39_va_signext |
||
cp_twostage_gpa_width |
VS-stage PTE guest physical address wider than the G-stage mode |
RV64 only, hgatp = Sv39x4 or Sv48x4. In VS-mode, store, load and fetch through a VS-stage leaf whose PPN sets guest physical address bit 41 (Sv39x4) or 50 (Sv48x4), or bit 55, and through a VS-stage level-1 PTE that points to the leaf table at such an address. |
Store/AMO, load or instruction guest-page fault. A hart that drops the high bits reaches a valid G-stage leaf instead. |
VS x {lw, sw, jalr} x vsatp paged x {Sv39x4, Sv48x4 with htval bits above the G-stage width nonzero} x guest-page fault |
hgatp_mode_x4 |
||
HLV, HLVX and HSV in HS-mode (Sv_H_hlv_cg) |
|||||||
cp_hlv_priv |
hstatus.SPVP and vsstatus.SUM set the privilege of HLV, HLVX and HSV |
In HS-mode, execute hlv.w, hlvx.wu and hsv.w through two-stage translation on a VS-stage leaf with U = 0 and 1, with hstatus.SPVP = 0 and 1, vsstatus.SUM = 0 and 1, and sstatus.SUM = 0 and 1. |
With SPVP = 0 the accesses are VU-level, so the U = 0 page raises load or store/AMO page faults. With SPVP = 1 they are VS-level, so the U = 1 page faults unless vsstatus.SUM = 1; with SUM = 1, HLVX also reads the U = 1 page. sstatus.SUM has no effect. |
HS x {hlv.w, hlvx.wu, hsv.w} x stage_modes x hstatus.SPVP {0, 1} x vsstatus.SUM {0, 1} x sstatus.SUM {0, 1} |
H_vscsrs_v0 |
||
cp_hlv_mxr |
sstatus.MXR affects both stages for HLV, vsstatus.MXR only the VS-stage |
In HS-mode with hstatus.SPVP = 1, execute hlv.w and hlvx.wu on a page that is execute-only in the VS-stage (G-stage RWX) and on one that is execute-only in the G-stage (VS-stage RWX), with vsstatus.MXR = 0 and 1 and sstatus.MXR = 0 and 1. |
hlvx.wu reads both pages. hlv.w reads the VS-stage execute-only page when either MXR is 1, and the G-stage execute-only page only when sstatus.MXR = 1; otherwise it raises a load page fault or a load guest-page fault. |
HS x {hlv.w, hlvx.wu} x stage_modes x vsstatus.MXR {0, 1} x sstatus.MXR {0, 1} |
hlsv_priv |
||
cp_hlvx_perm |
HLVX needs execute permission in both stages |
In HS-mode with hstatus.SPVP = 1, execute hlvx.wu on a VS-stage read-only page (G-stage RWX) and on a G-stage read-only page (VS-stage RWX), with each vsstatus.MXR and sstatus.MXR. |
Load page fault for the VS-stage read-only page, load guest-page fault for the G-stage read-only page. MXR makes executable pages readable but does not grant execute permission, so it never avoids the fault. |
stage_modes x 2 vsstatus.MXR x 2 sstatus.MXR x {load page fault, load guest-page fault} |
hlsv_u_op |
||
cp_hlv_implicit |
Guest-page faults on the implicit VS-stage page-table reads of HLV, HLVX and HSV |
In HS-mode with hstatus.SPVP = 1, execute hlv.w, hlvx.wu and hsv.w through a VS-stage level-0 page table at a guest physical address whose G-stage leaf is execute-only, or read-only (hlvx.wu only). |
The page-table reads are implicit loads, so they need G-stage read permission, also for HLVX. The execute-only table raises a load or store guest-page fault with htinst = the read pseudoinstruction. hlvx.wu reads through the read-only table. |
HS x {hlv.w, hlvx.wu, hsv.w} x stage_modes x htinst read pseudoinstruction |
H_vm_gpatrans |
Svadu_H cp_hlv_implicit has the A/D update case. |
|
cp_hlv_root_gpf |
A guest-page fault on the read of the VS-stage root table |
In HS-mode with hstatus.SPVP = 1, set vsatp.PPN to a guest physical page whose G-stage leaf is invalid, and execute hlv.w, hlvx.wu and hsv.w. |
Each raises a load or store guest-page fault with htval = the guest physical address of the root PTE >> 2 and htinst = the read pseudoinstruction. |
HS x {hlv.w, hlvx.wu, hsv.w} x stage_modes x htinst read pseudoinstruction x htval in the root table |
H_vm_gstagetrans |
Needs htval to report the guest physical address. |
|
vsatp, satp and hgatp MODE (Sv_H_csr_cg) |
|||||||
cp_vsatp_mode_field |
supported/unsupported MODE encodings |
RV64 with Sv39 VS-stage translation. |
A supported MODE is retained. A write with an unsupported MODE value is either ignored as it is for satp, or the fields of vsatp are treated as WARL in the normal way, so the test checks only that vsatp holds a supported MODE. |
{16 x} * 2 starting modes |
vsatp_mode_unsupported_v0 |
||
cp_satp_mode_field |
supported/unsupported MODE encodings |
RV64 with Sv39 VS-stage translation. A VS-stage identity map of the test image (gigapages for Sv39, a terapage for Sv48 and Sv57) keeps VS-mode running whatever MODE is selected. |
In VS-mode satp is vsatp. A supported MODE is retained; a write with an unsupported MODE value is ignored, so the old value is preserved. |
{16 x} * 2 starting modes |
vsatp_mode_unsupported_v1 |
||
cp_hgatp_mode_field |
supported/unsupported MODE encodings for hgatp |
RV64 with Sv39x4. |
Supported MODEs are retained. hgatp is WARL, and the legal value that an unsupported MODE produces is implementation-defined, so the test checks only that hgatp holds a supported MODE. |
{16 x} * 2 starting modes |
hgatp_mode_Sv |
||
Fences (Sv_H_fence_cg) |
|||||||
cp_hfence_vvma |
Fences remove stale VS-stage and G-stage translations (Sv_H_fence_cg) |
Sv32/Sv32x4 and Sv39/Sv39x4. Map a guest virtual address through the VS-stage to guest physical page A and through the G-stage to physical page A, and load from it in VS-mode. HS-mode then points the VS-stage leaf at guest page B, or the G-stage leaf of page A at physical page B, and runs hfence.vvma or hfence.gvma in HS-mode, or sfence.vma in VS-mode. rs1 is x0 or the address (the guest virtual address, or the guest physical address >> 2 for hfence.gvma); rs2 is x0 or the current ASID (hfence.vvma, sfence.vma) or VMID (hfence.gvma), and the address is also used with all ASIDMAX or VMIDMAX bits set in rs2. The cases run with every implemented vsatp.ASID and hgatp.VMID bit set. |
The VS-mode load after the fence reads page B. Both loads are recorded. A hart that caches no translation passes. |
cp_hfence_vvma: HS x hfence.vvma x vsatp paged x hgatp paged x rs1 {x0, register} x rs2 {x0, register} |
hfence-vvma_hfence-gvma_op |
A fence is required only to make new translations visible. That a fence leaves the translations of another ASID or VMID cached, or that SFENCE.VMA in VS-mode leaves HS-level and G-stage translations cached, is not observable. |
|
Not tested |
|||||||
hstatus.VSBE sets the endianness of VS-mode explicit accesses and VS-stage page-table accesses |
Load and store in VS-mode, and walk VS-stage page tables, with hstatus.VSBE = 0 and 1. |
hstatus_vsbe_op |
Not tested |
The reference model is little-endian only, every H configuration declares VS-mode and VU-mode little-endian, and the trap handler has no big-endian support. |
|||
VS-stage A bits are not set by speculative execution unless the effective privilege is VS or VU |
vs_stage_speculative_a_bit |
Not tested |
Not architecturally observable; a signature test cannot distinguish a speculative A-bit update from one made by an access the program performs. |
||||
Sv_HSm Hypervisor 2-Stage Virtual Memory with M-mode State
Sv_HSm covers two-stage address translation seen from M-mode through mstatus.MPRV and MPV, and guest traps taken in M-mode. The group boots to M-mode and delegates nothing (medeleg = hedeleg = 0), so the M-mode trap handler takes every trap and records mcause, mtval, mtval2, mtinst and mstatus.GVA/MPV. It runs with Sv39/Sv39x4 on RV64 and Sv32/Sv32x4 on RV32, and uses the Sv_H test page, page tables and conventions; the other two-stage cases are in Sv_H. MPRV tests set mstatus.MPRV, MPP and MPV (mstatush.MPV on RV32) just before each M-mode load or store and clear MPRV after it, because a trap from M-mode leaves MPP = M and MPV = 0. Instruction fetches in M-mode are never translated. The fetch straddle test (cp_straddle_m) needs Zca, and the load/store straddle test (cp_ldst_straddle_m) needs a hart that performs misaligned accesses byte by byte (MISALIGNED_LDST with MISALIGNED_SPLIT_STRATEGY = sequential_bytes); they are separate test files.
| Coverpoint | Goal | Feature Description | Expectation | Bins | Normative Rule |
|---|---|---|---|---|---|
M-mode accesses with MPRV (Sv_HSm_mprv_cg) |
|||||
cp_vsatp_mprv_effects |
MPRV effects on address translation |
Environment: While in M-mode, set MPRV=1, mstatus.MPP={S,U}, mstatus.MPV=1, vsatp.MODE = Sv32 or Sv39, hgatp.MODE=BARE, satp.MODE=BARE, with a VS-stage leaf that is readable and writable, then execute-only. The leaf has U = 1 for MPP = U. |
Data accesses are translated through the VS-stage with the privilege of MPP: they reach the test page through the RW leaf and raise load or store/AMO page faults (13, 15) through the execute-only leaf, taken in M-mode with mtval = the guest virtual address and mstatus.GVA = 1. Instruction fetches are not translated and don’t fault. |
M x {lw, sw} x MPRV = 1 x MPV/MPP {VS, VU} x vsatp paged x hgatp Bare x {no trap, page fault} |
hlsv_priv |
cp_hgatp_mprv_effects |
MPRV behavior when G-stage present |
Environment: While in M-mode, with vsatp = satp = Bare and a G-stage identity mapping that makes the test page execute-only (U = 1), set MPRV={0,1} and mstatus.MPP/MPV={M, M with MPV=1, HS, VS, U, VU} before each access. |
When MPRV=1 and MPV=1 (MPP = S or U), lw and sw are translated through the G-stage (vsatp is Bare) and raise load or store/AMO guest-page faults with mtval2 = the guest physical address >> 2 (or zero). When MPRV=0, or MPV=0, lw and sw access the test page untranslated; in particular M-mode with MPRV = 0 does no translation. hlv.w and hsv.w always use the G-stage, whatever MPRV is, and raise guest-page faults. MPV is ignored with MPP = M, so MPRV = 1 with MPP = M and MPV = 1 is an M-level access with no translation. |
M x {lw, sw, hlv.w, hsv.w} x MPRV {0, 1} x MPP/MPV {M, M with MPV = 1, HS, VS, U, VU} x vsatp Bare x hgatp paged |
hlsv_priv |
cp_mprv_sum |
With MPRV = 1 and MPV = 1, vsstatus.SUM applies instead of mstatus.SUM |
In M-mode with MPRV = 1, MPV = 1 and both stages paged, store and load through a VS-stage leaf with U = 1 with MPP = S, and through a leaf with U = 0 with MPP = U, with vsstatus.SUM = 0 and 1 and mstatus.SUM = 0 and 1. |
With MPP = S, the accesses to the U = 1 page succeed only with vsstatus.SUM = 1; mstatus.SUM has no effect. With MPP = U, the accesses to the U = 0 page always raise page faults. |
M x {lw, sw} x MPRV = 1 x MPV/MPP {VS, VU} x vsatp paged x hgatp paged x vsstatus.SUM {0, 1} x mstatus.SUM {0, 1} |
hlsv_priv |
cp_mprv_mxr |
With MPRV = 1 and MPV = 1, mstatus.MXR applies to both stages and vsstatus.MXR to the VS-stage |
In M-mode with MPRV = 1, MPV = 1 and MPP = S and U, load through pages that are execute-only in the VS-stage, in the G-stage, or in both, with vsstatus.MXR = 0 and 1 and mstatus.MXR = 0 and 1. VS-stage leaves have U = 1 for MPP = U. |
vsstatus.MXR makes the VS-stage execute-only page readable; mstatus.MXR makes execute-only pages of both stages readable. A denied load raises a load page fault (VS-stage) or load guest-page fault (G-stage) in M-mode. |
M x lw x MPRV = 1 x MPV/MPP {VS, VU} x vsatp paged x hgatp paged x vsstatus.MXR {0, 1} x mstatus.MXR {0, 1} |
hlsv_priv |
Guest traps taken in M-mode (Sv_HSm_trap_cg) |
|||||
cp_guest_page_fault_m |
Page faults and guest-page faults from VS-mode and VU-mode taken in M-mode write mtval2, mtinst and mstatus.GVA/MPV |
In VS-mode and VU-mode with nothing delegated, store, load and fetch through an invalid VS-stage leaf, an invalid G-stage leaf, and a VS-stage leaf table whose G-stage leaf is invalid. |
Each trap is taken in M-mode with mstatus.GVA = 1, mstatus.MPV = 1 (mstatush on RV32) and mtval = the guest virtual address. |
cp_guest_page_fault_m: {VS, VU} x {sw, lw, jalr} x vsatp paged x hgatp paged x {page fault, guest-page fault} x mstatus.GVA = MPV = 1 |
H_vm_gstagetrans |
cp_straddle_m |
mtval2 reports the faulting portion of a straddling fetch or misaligned access |
cp_straddle_m needs Zca: in VS-mode and VU-mode, jump to a 4-byte instruction in the last halfword (offset 0xFFE) of a guest page whose next page has an invalid G-stage leaf. |
An instruction, store/AMO or load guest-page fault taken in M-mode, with mtval = the page-boundary address (the faulting portion) and mtval2 = its guest physical address >> 2, or zero. A faulting load leaves rd unchanged. |
cp_straddle_m: {VS, VU} x jalr x vsatp paged x hgatp paged x target offset 0xFFE x guest-page fault x nonzero mtval2 at the page boundary |
H_straddle |
Sv_HZicbo Hypervisor VirtMem + CBOM/CBOZ
Sv_HZicbo boots to HS-mode with hedeleg clear, so every trap from VS-mode and VU-mode is taken in HS-mode and read from scause. PMP on the final address of a CBO is checked in the PMP suite’s PMP_HSvZicbo group (cp_pmp), which boots to M-mode. - The cp_vs_* and cp_g_* files need Sv39x4 and VS-stage Sv39 (RV64) or Sv32x4 and VS-stage Sv32 (RV32). Each case writes the PTEs, executes hfence.gvma and hfence.vvma, and runs the family’s CBOs (cbo.clean, cbo.flush and cbo.inval with Zicbom, cbo.zero with Zicboz) once in VS-mode and once in VU-mode. HS-mode checks what cbo.zero wrote. - VS-stage cases use a guest virtual address in a VS-stage mapping over the G-stage identity map. G-stage cases use a G-stage mapping reached through a VS-stage identity superpage. Every level of each stage holds the leaf in turn. - A CBO faults like a store: a store/AMO page fault, guest-page fault or access fault. A cache-block management instruction needs read or write permission and never checks D. cbo.zero needs write permission and checks D (cmo.adoc cbm_access, cbz_access). Boot leaves menvcfg.ADUE = 0, which makes henvcfg.ADUE read-only zero, so a clear A bit, or a clear D bit for cbo.zero, raises a fault (Svade behavior). - The henvcfg files run with vsatp and hgatp Bare and change menvcfg through T-SBI.
| Coverpoint | Goal | Feature Description | Expectation | Bins | Normative Rule | Status | Notes |
|---|---|---|---|---|---|---|---|
VS-stage PTEs |
|||||||
cp_vs_pte |
Verify the fault that each VS-stage PTE gives a CBO from VS-mode and VU-mode. |
At each VS-stage level, the leaf in turn: valid; V = 0; W without R; W and X without R; R and X without W; X only (cbo.zero only); A = 0; D = 0; a pointer (RWX = 0) at level 0; D, A or U set in the non-leaf PTE above the leaf; a misaligned superpage (levels above 0). VS-mode leaves have U = 0 and VU-mode leaves U = 1; VU-mode also uses a supervisor leaf (U = 0), and VS-mode a user leaf (U = 1) with vsstatus.SUM = 0. |
No fault for a valid leaf; for R and X without W and for D = 0 with a cache-block management instruction (a load is permitted, and D is not checked). |
{VS, VU} × CBO × {no fault, store/AMO page fault}, with vsatp and hgatp paged |
cbm_unperm_fault |
||
cp_vs_sum |
Verify that vsstatus.SUM = 1 lets VS-mode CBOs reach VS-stage user pages. |
In VS-mode with vsstatus.SUM = 1, the CBOs at a VS-stage user leaf (U = 1) at each level. |
No fault. (With SUM = 0 the same case is a store/AMO page fault in cp_vs_pte.) |
VS × CBO × SUM = 1 × no fault |
sstatus_sum |
||
cp_vs_gpa |
Verify the faults that G-stage translation gives the final address and the VS-stage page-table reads of a CBO. |
At each VS-stage level: a leaf whose guest physical address the G-stage does not map; and, below the top level, a non-leaf PTE that points at a table whose guest physical address the G-stage does not map, or maps to the page of RVMODEL_ACCESS_FAULT_ADDRESS_LOAD (with an index there that selects a PTE inside the access-fault region; only when RVMODEL_ACCESS_FAULT_ADDRESS_STORE and RVMODEL_ACCESS_FAULT_ADDRESS_LOAD are defined). The page-table read is an implicit load, so the table uses the load access-fault region. |
Unmapped final address: store/AMO guest-page fault. Unmapped table: store/AMO guest-page fault, with htinst holding the pseudoinstruction for an implicit VS-stage read (0x2000 on RV32, 0x3000 on RV64, cp_vs_gpa_implicit). Table at a faulting supervisor physical address: store/AMO access fault. |
{VS, VU} × CBO × {store/AMO guest-page fault, store/AMO access fault}; cp_vs_gpa_implicit: {VS, VU} × CBO × pseudoinstruction |
fault_excep_csr |
||
G-stage PTEs |
|||||||
cp_g_pte |
Verify the fault that each G-stage PTE gives a CBO from VS-mode and VU-mode. |
At each G-stage level, the leaf in turn, as in cp_vs_pte with U = 1: valid; V = 0; W without R; W and X without R; R and X without W; X only (cbo.zero only); A = 0; D = 0; a pointer at level 0; D, A or U set in the non-leaf PTE above the leaf; a misaligned superpage. Also a leaf with U = 0. |
As cp_vs_pte, with store/AMO guest-page faults in place of page faults. U = 0 is a store/AMO guest-page fault, because every G-stage access is a user access. |
{VS, VU} × CBO × {no fault, store/AMO guest-page fault}, with vsatp and hgatp paged |
sstatus_sum |
||
cp_g_pa |
Verify that a G-stage leaf or table at a faulting supervisor physical address gives a CBO a store/AMO access fault. |
RVMODEL_ACCESS_FAULT_ADDRESS_STORE only. At each G-stage level, a leaf that maps RVMODEL_ACCESS_FAULT_ADDRESS_STORE; below the top level, a non-leaf G-stage PTE that points at the page of RVMODEL_ACCESS_FAULT_ADDRESS_LOAD, with an index there that selects a PTE inside the access-fault region (only when RVMODEL_ACCESS_FAULT_ADDRESS_LOAD is also defined, because the page-table read is an implicit load). |
Store/AMO access fault. |
{VS, VU} × CBO × store/AMO access fault |
pma_chk_paddr |
||
Prefetches |
|||||||
cp_vs_prefetch |
Verify that prefetch.i, prefetch.r and prefetch.w raise no exception under two-stage translation, and do not set A or D. |
Zicbop only. In VS-mode and VU-mode, prefetch at a VS-stage kilopage leaf that is valid, has V = 0, has the wrong U for the mode (U = 1 in VS-mode with vsstatus.SUM = 0, U = 0 in VU-mode), or maps an unmapped guest physical address; and at a G-stage kilopage leaf that is valid, has V = 0 or has U = 0. Then, with menvcfg.ADUE = henvcfg.ADUE = 1, prefetch at a VS-stage leaf and at a G-stage leaf with A = D = 0, and read each leaf back. |
No exception (cmo.adoc cbp_unperm_noexcep). A and D stay 0 (cbp_unperm_translate). |
{VS, VU} × {prefetch.i, prefetch.r, prefetch.w} × {VS-stage, G-stage} case × no exception, with vsatp and hgatp paged |
cbp_unperm_noexcep |
||
henvcfg CBO enables |
|||||||
cp_cbie_vs |
menvcfg.CBIE and henvcfg.CBIE control cbo.inval in VS-mode |
Environment: vsatp and hgatp Bare. From HS-mode, write menvcfg.CBIE (through T-SBI) and henvcfg.CBIE with each of 00, 01 and 11. |
menvcfg.CBIE = 00: illegal-instruction exception. |
priv_mode VS x cbo.inval x menvcfg.CBIE {00, 01, 11} x henvcfg.CBIE {00, 01, 11} x vsatp Bare = 9 bins |
henvcfg_cbie |
||
cp_cbie_vu |
menvcfg.CBIE, henvcfg.CBIE and senvcfg.CBIE control cbo.inval in VU-mode |
Environment: vsatp and hgatp Bare. From HS-mode, write menvcfg.CBIE (through T-SBI), henvcfg.CBIE and senvcfg.CBIE with each of 00, 01 and 11. |
menvcfg.CBIE = 00: illegal-instruction exception. |
priv_mode VU x cbo.inval x menvcfg.CBIE {00, 01, 11} x henvcfg.CBIE {00, 01, 11} x senvcfg.CBIE {00, 01, 11} x vsatp Bare = 27 bins |
henvcfg_cbie |
||
cp_cbcfe_vs |
menvcfg.CBCFE, henvcfg.CBCFE and, in VU-mode, senvcfg.CBCFE control cbo.clean and cbo.flush |
Environment: vsatp and hgatp Bare. From HS-mode, write menvcfg.CBCFE (through T-SBI), henvcfg.CBCFE and, for VU-mode, senvcfg.CBCFE with each of 0 and 1. |
menvcfg.CBCFE = 0: illegal-instruction exception. |
VS × {cbo.clean, cbo.flush} × 2 menvcfg × 2 henvcfg = 8; VU × {cbo.clean, cbo.flush} × 2 menvcfg × 2 henvcfg × 2 senvcfg = 16 |
henvcfg_cbcfe |
||
cp_cbze_vs |
menvcfg.CBZE, henvcfg.CBZE and, in VU-mode, senvcfg.CBZE control cbo.zero |
Environment: vsatp and hgatp Bare. From HS-mode, write menvcfg.CBZE (through T-SBI), henvcfg.CBZE and, for VU-mode, senvcfg.CBZE with each of 0 and 1. |
menvcfg.CBZE = 0: illegal-instruction exception. |
VS × cbo.zero × 2 menvcfg × 2 henvcfg = 4; VU × cbo.zero × 2 menvcfg × 2 henvcfg × 2 senvcfg = 8 |
henvcfg_cbze |
||
Not tested |
|||||||
cbo.inval with every CBIE field 11 performs an invalidate |
cbo-inval_h_mode_inval_enc |
Not tested |
Whether an invalidate discards stored data depends on the cache hierarchy, so a test cannot tell it from a flush; cp_cbie_vs/vu check only that cbo.inval executes. |
||||
Cache-block management instructions on an X-only VS-stage or G-stage page |
cbm_access |
Not tested |
Not tested because the outcome is UNSPECIFIED. When a page permits instruction fetch but neither loads nor stores, cmo.adoc (the paragraph after cbm_access) lets the implementation either perform cbo.clean/flush/inval or raise a store page fault, so a test has no single expected result. cbo.zero needs write permission and must fault on an execute-only page, so it is tested (cp_vs_pte and cp_g_pte). |
||||
CBOs under Sv48x4 and Sv57x4, and VS-stage Sv48 and Sv57 |
H_vm_twostage |
Not tested |
The framework allocates only the root and two lower tables per stage (rvtest_hlvl0/1, rvtest_vlvl0/1), so the cases run with Sv39x4 and VS-stage Sv39 (RV64) and Sv32x4 and VS-stage Sv32 (RV32) only. |
||||
Sv Normative Rules
The rules apply to all Sv groups.
| Normative Rule | Rule Text | Coverpoints |
|---|---|---|
sstatus_mxr |
Sv_vm_permissions_cg/cp_xpage_{mxrunset,mxrset}_read_{s,u} |
|
sstatus_sum |
Sv_vm_permissions_cg/{cp_upage_smode_sumunset_noread_s, cp_upage_smode_sumunset_noexec_s}, Sv_vm_permissions_cg/{cp_upage_smode_sumset_read_s, cp_upage_smode_sumset_noexec_s}, Sv_HZicbo_cg/{cp_vs_sum,cp_g_pte} |
|
satp |
Sv_satp_cg/{cp_access_s,cp_access_u,satp_asid_PPN}, Sv_Sm_satp_cg/cp_access_m |
|
satp_mode |
norm:satp_mode_enc shows the encodings of the MODE field when SXLEN=32 and SXLEN=64. |
Sv_VA_cg/mode_supported, Svbare_cg/satp_bare |
satp_mode_sxlen32 |
Sv_VA_cg/{cp_VA_i_mode,cp_VA_d_mode} |
|
satp_mode_sxlen64 |
Sv_VA_cg/{cp_VA_i_mode,cp_VA_d_mode} |
|
satp_mode_op_unsupported |
TODO: write an unsupported satp.MODE and check that satp is unchanged |
|
asidlen |
Sv_satp_cg/asid_length |
|
asid_lsb_first |
Sv_satp_cg/asid_length |
|
asidmax |
The maximal value of ASIDLEN, termed ASIDMAX, is 9 for Sv32 or 16 for Sv39, Sv48, and Sv57. |
Sv_satp_cg/asid_length |
satp_mode_enc |
riscv.github.io/riscv-isa-manual/snapshot/spec/index.html#norm%3Asatp_mode_enc |
Sv_VA_cg/mode_supported, Svbare_cg/{satp_bare, cp_satp_bare_load, cp_satp_bare_store, cp_satp_bare_exec}, TODO: write reserved and custom MODE values (see satp_mode_op_unsupported) |
satp_op_active |
Sv_vm_permissions_cg/{cp_spage_read_s_d, cp_spage_exec_s_i, cp_upage_umode_read_u}, Sv_Sm_mstatus_mprv_cg/cp_mprv_load |
|
satp_op_sfence_vma |
Sv_sfence_cg/cp_ins |
|
sfence_vma_op |
Sv_sfence_cg/cp_ins |
|
sfence_vma_ordering |
Sv_sfence_cg/cp_ins |
|
sfence_vma_invalidation |
Sv_sfence_cg/cp_ins |
|
sfence_vma_local_only |
Not tested: needs more than one hart |
|
sfence_vma_all_asid_va |
Sv_sfence_cg/cp_ins |
|
sfence_vma_asid_only |
||
sfence_vma_va_all_asid |
TODO: SFENCE.VMA with rs1!=x0 is not exercised |
|
sfence_vma_va_asid |
TODO: SFENCE.VMA with rs1!=x0 is not exercised |
|
sfence_vma_invalid_va |
TODO: SFENCE.VMA with an invalid virtual address in rs1 is not exercised |
|
sfence_vma_rs2_bits |
TODO: SFENCE.VMA with reserved rs2 bits set is not exercised |
|
sfence_vma_ordering_semantics |
Not tested: which stale translation an implicit read returns is implementation-dependent |
|
sfence_vma_implicit_access |
Sv_vm_permissions_cg/{cp_PTE_inv_read_s_d,cp_PTE_nonleaf_lvl0_s_d_read} |
|
sfence_vma_sum_mxr_effect |
Sv_vm_permissions_cg/cp_xpage_{mxrunset,mxrset}_read_{s,u} |
|
sfence_vma_mode_effect |
Not tested: every test executes SFENCE.VMA after writing satp |
|
sfence_vma_asid_effect |
Not tested: every test executes SFENCE.VMA after writing satp |
|
asid_hart_private |
Not tested: needs more than one hart |
|
satp_ppn_Sv32_sz |
Sv_vm_permissions_cg/{cp_spage_read_s_d,cp_spage_write_s_d,cp_spage_exec_s_i} |
|
fetch_page_fault_no_x |
Sv_vm_permissions_cg/{cp_spage_noexec_s_i,cp_spage_rwx_s_i_noexec,cp_upage_umode_noexec_u} |
|
load_page_fault_no_r |
Sv_vm_permissions_cg/{cp_spage_noread_s_d,cp_spage_rwx_s_d_noread,cp_upage_umode_noread_u} |
|
store_page_fault_no_w |
Sv_vm_permissions_cg/{cp_spage_nowrite_s_d,cp_spage_rwx_s_d_nowrite,cp_upage_umode_nowrite_u} |
|
pte_u_op |
Sv_vm_permissions_cg/{cp_upage_umode_read_u, cp_spage_rwx_s_d_noread, cp_upage_smode_sumset_read_s, cp_upage_smode_sumunset_noread_s} |
|
pte_u_no_s_exec |
Irrespective of SUM, the supervisor may not execute code on pages with U=1. |
Sv_vm_permissions_cg/{cp_upage_smode_sumunset_noexec_s, cp_upage_smode_sumset_noexec_s} |
pte_g_op |
Sv_res_global_pte_cg/{cp_global_read_s, cp_global_write_s, cp_global_exec_s, cp_global_read_u} |
|
pte_rsw_ignored |
Sv_res_global_pte_cg/cp_rsw_pte |
|
pte_a_def |
Svadu_cg/{Abit_unset_exec_s, Abit_unset_read_u}, Svade_cg/{Abit_unset_write_s, Abit_unset_read_u} |
|
pte_d_def |
The D bit indicates the virtual page has been written since the last time the D bit was cleared. |
Svadu_cg/{Dbit_unset_write_s, Dbit_unset_write_u}, Svade_cg/{Dbit_unset_write_s, Dbit_unset_write_u} |
pte_ad_scheme_uniform |
All harts in a system must employ the same PTE-update scheme as each other. |
Not tested: needs more than one hart |
lr_sc_rsrv_set_page |
TODO: an LR to one 4 KiB page followed by an SC to a different page must fail |
|
Sv39_sxlen_va_sz |
Sv_vm_permissions_cg/{cp_spage_read_s_d,cp_spage_write_s_d,cp_spage_exec_s_i} |
|
Sv39_vpn_sz |
Sv_vm_permissions_cg/{cp_spage_read_s_d,cp_spage_write_s_d,cp_spage_exec_s_i} |
|
satp_ppn_Sv39_sz |
Sv_vm_permissions_cg/{cp_spage_read_s_d,cp_spage_write_s_d,cp_spage_exec_s_i} |
|
Sv39_levels |
Sv_vm_permissions_cg/{cp_spage_read_s_d,cp_spage_write_s_d,cp_spage_exec_s_i} |
|
Sv39_page_offset_sz |
Sv_vm_permissions_cg/{cp_spage_read_s_d,cp_spage_write_s_d,cp_spage_exec_s_i} |
|
Sv39_ptesize |
Sv_vm_permissions_cg/{cp_spage_read_s_d,cp_spage_write_s_d,cp_spage_exec_s_i} |
|
Sv39_va_signext |
must have bits 63–39 all equal to bit 38, or else a page-fault exception will occur |
Sv_vm_permissions_cg/cp_canonical_{read,write,exec}_s, Sv_H_twostage_cg/cp_twostage_canonical |
Sv39_leaf_any_level, Sv39_page_sizes |
Sv39_leaf_any_level: Any level of PTE may be a leaf PTE Sv39_page_sizes: 2 MiB megapages and 1 GiB gigapages |
Sv_vm_permissions_cg/{cp_spage_read_s_d,cp_spage_write_s_d,cp_spage_exec_s_i} |
Sv39_superpage_align, Sv39_superpage_align_fault |
Sv39_superpage_align: must be virtually and physically aligned to a boundary equal to its size Sv39_superpage_align_fault: A page-fault exception is raised if the physical address is insufficiently aligned |
Sv_vm_permissions_cg/cp_misaligned_{exec,read,write}_s |
Sv39_pte_count_sz |
Sv39 page tables contain 29 page table entries (PTEs), eight bytes each. |
Sv_vm_permissions_cg/{cp_spage_read_s_d,cp_spage_write_s_d,cp_spage_exec_s_i} |
Sv39_pt_sz |
Sv_vm_permissions_cg/{cp_spage_read_s_d,cp_spage_write_s_d,cp_spage_exec_s_i} |
|
Sv39_pt_align |
Sv_vm_permissions_cg/{cp_spage_read_s_d,cp_spage_write_s_d,cp_spage_exec_s_i} |
|
Sv39_pte_Svnapot_rsv |
Sv_add_feature_cg/cp_svnapot_{read,write,exec}_fault |
|
Sv39_pte_Svpbmt_rsv |
Sv_add_feature_cg/cp_svpbmt_{read,write,exec}_fault |
|
Sv39_pte_future_rsv |
Sv_add_feature_cg/cp_reserved_{read,write,exec}_fault, Sv_vm_permissions_cg/cp_PTE_rsv_nleaf_{read,write,exec}_s |
|
Sv48_sxlen |
riscv.github.io/riscv-isa-manual/snapshot/spec/index.html#norm%3ASv48_sxlen |
Sv_vm_permissions_cg/{cp_spage_read_s_d,cp_spage_write_s_d,cp_spage_exec_s_i} |
Sv48_va_sz |
Sv_vm_permissions_cg/{cp_spage_read_s_d,cp_spage_write_s_d,cp_spage_exec_s_i} |
|
Sv48_vpn_sz |
Sv_vm_permissions_cg/{cp_spage_read_s_d,cp_spage_write_s_d,cp_spage_exec_s_i} |
|
satp_ppn_Sv48_sz |
Sv_vm_permissions_cg/{cp_spage_read_s_d,cp_spage_write_s_d,cp_spage_exec_s_i} |
|
Sv48_levels |
Sv_vm_permissions_cg/{cp_spage_read_s_d,cp_spage_write_s_d,cp_spage_exec_s_i} |
|
Sv48_page_offset_sz |
Sv_vm_permissions_cg/{cp_spage_read_s_d,cp_spage_write_s_d,cp_spage_exec_s_i} |
|
Sv48_ptesize |
Sv_vm_permissions_cg/{cp_spage_read_s_d,cp_spage_write_s_d,cp_spage_exec_s_i} |
|
Sv48_va_signext |
must have bits 63–48 all equal to bit 47, or else a page-fault exception will occur |
Sv_vm_permissions_cg/cp_canonical_{read,write,exec}_s, Sv_H_twostage_cg/cp_twostage_canonical |
Sv48_leaf_any_level, Sv48_page_sizes |
Sv48_leaf_any_level: Any level of PTE may be a leaf PTE Sv48_page_sizes: 2 MiB megapages, 1 GiB gigapages, and 512 GiB terapages |
Sv_vm_permissions_cg/{cp_spage_read_s_d,cp_spage_write_s_d,cp_spage_exec_s_i} |
Sv48_superpage_align, Sv48_superpage_align_fault |
Sv48_superpage_align: must be virtually and physically aligned to a boundary equal to its size Sv48_superpage_align_fault: A page-fault exception is raised if the physical address is insufficiently aligned |
Sv_vm_permissions_cg/cp_misaligned_{exec,read,write}_s |
Sv48_requires_Sv39 |
Not tested: extension dependency checked by the UDB configuration |
|
Sv57_sxlen_va_sz |
Sv_VA_cg/{cp_VA_i_mode, cp_VA_d_mode}, Sv_add_feature_cg/{cp_read_nofault, cp_exec_nofault} |
|
Sv57_vpn_sz |
Sv_VA_cg/{cp_VA_i_mode, cp_VA_d_mode}, Sv_add_feature_cg/{cp_read_nofault, cp_exec_nofault} |
|
satp_ppn_Sv57_sz |
Sv_VA_cg/{cp_VA_i_mode, cp_VA_d_mode}, Sv_add_feature_cg/{cp_read_nofault, cp_exec_nofault} |
|
Sv57_levels |
Sv_VA_cg/{cp_VA_i_mode, cp_VA_d_mode}, Sv_add_feature_cg/{cp_read_nofault, cp_exec_nofault} |
|
Sv57_page_offset_sz |
Sv_VA_cg/{cp_VA_i_mode, cp_VA_d_mode}, Sv_add_feature_cg/{cp_read_nofault, cp_exec_nofault} |
|
Sv57_ptesize |
Sv_VA_cg/{cp_VA_i_mode, cp_VA_d_mode}, Sv_add_feature_cg/{cp_read_nofault, cp_exec_nofault} |
|
Sv57_va_signext |
must have bits 63–57 all equal to bit 56, or else a page-fault exception will occur |
Sv_H_twostage_cg/cp_twostage_canonical |
Sv57_leaf_any_level, Sv57_page_sizes |
Sv57_leaf_any_level: Any level of PTE may be a leaf PTE Sv57_page_sizes: 2 MiB megapages, 1 GiB gigapages, 512 GiB terapages, and 256 TiB petapages |
|
Sv57_superpage_align, Sv57_superpage_align_fault |
Sv57_superpage_align: must be virtually and physically aligned to a boundary equal to its size Sv57_superpage_align_fault: A page-fault exception is raised if the physical address is insufficiently aligned |
|
Sv57_requires_Sv48 |
Not tested: extension dependency checked by the UDB configuration |
|
stval_op_faulting_addr |
Sv_vm_permissions_cg/{cp_spage_noread_s_d, cp_spage_nowrite_s_d, cp_spage_noexec_s_i} |
|
mstatus_mxr_sum_op_acc_fault |
TODO: combine MXR/SUM with a PMA or PMP access fault |
|
mstatus_mprv_ldst_op |
Sv_Sm_mstatus_mprv_cg/cp_mprv_{load,store} |
|
mstatus_mprv_inst_xlat_op |
Instruction address-translation and protection are unaffected by the setting of |
Sv_Sm_mstatus_mprv_cg/cp_mprv_ins |
mstatus_sum_op, mstatus_sum_op_mprv_mpp |
mstatus_sum_op: When |
Sv_Sm_mstatus_mprv_cg/cp_mprv_upage_smode_sumunset_{noread,nowrite}, Sv_Sm_mstatus_mprv_cg/cp_mprv_upage_smode_sumset_{read,write} |
mstatus_tvm_op, mstatus_tvm_warl |
mstatus_tvm_op: When |
Sv_Sm_mstatus_mprv_cg/cp_tvm_exception_s, Svinval_Sm_cg/cp_svinval |
mstatus_mstatush_xbe_warl |
Sv_Sm_mstatus_mprv_cg/cp_mstatus_sbe_{read,write} |
|
mstatus_sbe_implicit |
Sv_Sm_mstatus_mprv_cg/cp_mstatus_sbe_{read,write} |
|
mtval_vaddr_wr_faulting_addr |
Sv_Sm_mstatus_mprv_cg/{load_page_fault,store_page_fault} |
|
fault_excep_csr |
Sv_Zicbo_cg/{cp_PTE_inv_cbo_s,cp_PTE_inv_cbo_u}, Sv_HZicbo_cg/{cp_vs_gpa,cp_vs_gpa_implicit,cp_g_pte} |
|
cbm_unperm_fault |
Sv_Zicbo_cg/{cp_spage_rwx_cbo_u,cp_upage_sumunset_cbo_s}, Sv_HZicbo_cg/{cp_vs_pte,cp_vs_gpa,cp_g_pte} |
|
cbm_page_fault |
Sv_Zicbo_cg/{cp_PTE_inv_cbo_s, cp_spage_rwx_cbo_u}, Sv_HZicbo_cg/{cp_vs_pte,cp_vs_gpa,cp_g_pte} |
|
cbm_unperm_translate |
Sv_Zicbo_cg/{cp_Abit_unset_cbo_s,cp_Abit_unset_cbo_u}, Sv_HZicbo_cg/{cp_vs_pte,cp_g_pte} |
|
cbz_unperm_fault |
Sv_Zicbo_cg/{cp_PTE_w_unset_zicboz_s,cp_PTE_w_unset_zicboz_u}, Sv_HZicbo_cg/{cp_vs_pte,cp_vs_gpa,cp_g_pte} |
|
cbz_unperm_translate |
Sv_Zicbo_cg/{cp_Abit_unset_cbo_s, cp_Abit_unset_cbo_u, cp_Dbit_unset_zicboz_s, cp_Dbit_unset_zicboz_u}, Sv_HZicbo_cg/{cp_vs_pte,cp_g_pte} |
|
cbp_unperm_noexcep |
Sv_HZicbo_cg/{cp_vs_prefetch,cp_g_prefetch} |
|
cbp_unperm_translate |
Sv_HZicbo_cg/{cp_vs_prefetch,cp_g_prefetch} |
|
cbm_access |
Sv_Zicbo_cg/{cp_PTE_r_set_w_unset_zicbom_s,cp_PTE_r_set_w_unset_zicbom_u}, Sv_HZicbo_cg/{cp_vs_pte,cp_vs_gpa,cp_g_pte} |
|
pma_chk_paddr |
Sv_Zicbo_cg/{cp_leaf_PTE_to_nonexistent_pa_cbo_s,cp_leaf_PTE_to_nonexistent_pa_cbo_u}, Sv_HZicbo_cg/{cp_vs_gpa,cp_g_pa} |
|
mcause_exccode_priority_misaligned |
Sv_Exceptions_cg/cp_misaligned_priority_{load, store}_{s, u}, Sv_ExceptionsSm_cg/cp_misaligned_priority_{load, store}_m, Sv_ExceptionsZaamo_cg/{cp_misaligned_priority_s, cp_misaligned_priority_u}, Sv_ExceptionsZalrsc_cg/{cp_misaligned_priority_s, cp_misaligned_priority_u} |
|
exc_priority |
Sv_Exceptions_cg/cp_misaligned_priority_{load, store, fetch}_{s, u}, Sv_ExceptionsSm_cg/cp_misaligned_priority_{load, store}_m, Sv_ExceptionsZaamo_cg/{cp_misaligned_priority_s, cp_misaligned_priority_u}, Sv_ExceptionsZalrsc_cg/{cp_misaligned_priority_s, cp_misaligned_priority_u} |
|
ia_fault_exc_on_target |
Sv_Exceptions_cg/{cp_misaligned_priority_fetch_s, cp_misaligned_priority_fetch_u} |
|
amo_alignment |
Sv_ExceptionsZaamo_cg/{cp_misaligned_priority_s, cp_misaligned_priority_u} |
|
misaligned_atomicity_granule_size |
Sv_ExceptionsZaamo_cg/{cp_misaligned_priority_s, cp_misaligned_priority_u} |
|
sc_retire_permission |
No SC.W instruction shall retire unless it passes memory permission checks, |
Sv_ExceptionsZalrsc_cg/{cp_misaligned_priority_s, cp_misaligned_priority_u} |
lr_sc_alignment |
Sv_ExceptionsZalrsc_cg/{cp_misaligned_priority_s, cp_misaligned_priority_u} |
|
H_vm_supported, H_vm_twostage, hgatp_mode_bare, hgatp_mode_bare_trans |
H_vm_supported: standard page-based address translation must be supported, either Sv32 for RV32, or a minimum of Sv39 for RV64 H_vm_twostage: Whenever the current virtualization mode V is 1, two-stage address translation and protection is in effect. For any virtual memory access, the original virtual address is converted in the first stage by VS-level address translation, as controlled by the vsatp register, into a guest physical address. The guest physical address is then converted in the second stage by guest physical address translation, as controlled by the hgatp register, into a supervisor physical address. The two stages are known also as VS-stage and G-stage translation. hgatp_mode_bare: norm:hgatp_mode_enc shows the encodings of the MODE field when HSXLEN=32 and HSXLEN=64. When MODE=Bare, guest physical addresses are equal to supervisor physical addresses, and there is no further memory protection for a guest virtual machine beyond the physical memory protection scheme described in pmp. In this case, software must write zero to the remaining fields in hgatp. hgatp_mode_bare_trans: When the address translation scheme selected by the MODE field of hgatp is Bare, guest physical addresses are equal to supervisor physical addresses without modification, and no memory protection applies in the trivial translation of guest physical addresses to supervisor physical addresses. |
Sv_H_vsstage_cg/cp_vsatp_perm, Sv_H_gstage_cg/cp_hgatp_perm, Sv_H_twostage_cg/cp_twostage_perm, Sv_H_twostage_cg/cp_stage_both_bare, Sv_HZicbo_cg/{cp_vs_pte,cp_vs_gpa,cp_g_pte} |
H_vm_gpatrans, H_vm_gpapriv, H_vm_gpa_g, Svrsw60t59b_H_g_stage_reserved_bits |
H_vm_gpatrans: The conversion of an Sv32x4, Sv39x4, Sv48x4, or Sv57x4 guest physical address is accomplished with the same algorithm used for Sv32, Sv39, Sv48, or Sv57, as presented in sv32algorithm, except that: H_vm_gpapriv: For G-stage address translation, all memory accesses (including those made to access data structures for VS-stage address translation) are considered to be user-level accesses, as though executed in U-mode. Access type permissions—readable, writable, or executable—are checked during G-stage translation the same as for VS-stage translation. For a memory access made to support VS-stage address translation (such as to read/write a VS-level page table), permissions and the need to set A and/or D bits at the G-stage level are checked as though for an implicit load or store, not for the original access type. However, any exception is always reported for the original access type (instruction, load, or store/AMO). H_vm_gpa_g: The G bit in all G-stage PTEs is currently not used. Until its use is defined by a standard extension, it should be cleared by software for forward compatibility, and must be ignored by hardware. Svrsw60t59b_H_g_stage_reserved_bits: If the Hypervisor (H) extension is also implemented, then bits 60-59 of the G-stage PTEs are reserved for use by supervisor software and are ignored by the implementation. |
Sv_H_gstage_cg/cp_hgatp_perm, Sv_H_twostage_cg/cp_twostage_perm, Sv_H_twostage_cg/cp_implicit_gpf, Sv_H_twostage_cg/cp_implicit_mxr, Sv_H_twostage_cg/cp_twostage_access_fault_{load, store, fetch}, Sv_H_hlv_cg/cp_hlv_implicit, Sv_HZicbo_cg/{cp_vs_sum,cp_g_pte} |
hgatp_mode_x4 |
Sv_H_gstage_cg/cp_hgatp_gpa_width, Sv_H_twostage_cg/cp_hgatp_sv32x4_gpa, Sv_H_twostage_cg/cp_twostage_gpa_width |
|
hgatp_mode_sv39x4, hgatp_mode_sv48x4, hgatp_mode_Sv57x4 |
hgatp_mode_sv39x4: For Sv39x4, an incoming guest physical address is partitioned as shown in sv39x4va. This partitioning is identical to that for an Sv39 virtual address as depicted in sv39va, except with 2 more bits at the high end in VPN[2]. Address bits 63:41 must all be zeros, or else a guest-page-fault exception occurs. hgatp_mode_sv48x4: For Sv48x4, an incoming guest physical address is partitioned as shown in sv48x4va. This partitioning is identical to that for an Sv48 virtual address as depicted in sv48va, except with 2 more bits at the high end in VPN[3]. Address bits 63:50 must all be zeros, or else a guest-page-fault exception occurs. hgatp_mode_Sv57x4: For Sv57x4, an incoming guest physical address is partitioned as shown in sv57x4va. This partitioning is identical to that for an Sv57 virtual address as depicted in sv57va, except with 2 more bits at the high end in VPN[4]. Address bits 63:59 must all be zeros, or else a guest-page-fault exception occurs. |
Sv_H_gstage_cg/cp_hgatp_perm, Sv_H_gstage_cg/cp_hgatp_svade, Sv_H_twostage_cg/cp_twostage_perm, Sv_H_gstage_cg/cp_hgatp_gpa_width, Sv_H_twostage_cg/cp_twostage_gpa_width |
hgatp_mode_sv32x4 |
Sv_H_twostage_cg/cp_hgatp_sv32x4_gpa |
|
vsatp_mode_unsupported_v0 |
Sv_H_csr_cg/cp_vsatp_mode_field |
|
vsatp_mode_unsupported_v1, vsatp_sz_acc_op |
vsatp_mode_unsupported_v1: However, when V=1, a write to satp with an unsupported MODE value is ignored and no write to vsatp is effected. vsatp_sz_acc_op: The vsatp register is a VSXLEN-bit read/write register that is VS-mode’s version of supervisor register satp, formatted as shown in rv32vsatpreg for VSXLEN=32 and rv64vsatpreg for VSXLEN=64. When V=1, vsatp substitutes for the usual satp, so instructions that normally read or modify satp actually access vsatp instead. vsatp controls VS-stage address translation, the first stage of two-stage translation for guest virtual addresses (see two-stage-translation). |
Sv_H_csr_cg/cp_satp_mode_field |
hgatp_mode_Sv, hgatp_mode_warl |
hgatp_mode_Sv: When HSXLEN=32, the only other valid setting for MODE is Sv32x4, which is a modification of the usual Sv32 paged virtual-memory scheme, extended to support 34-bit guest physical addresses. When HSXLEN=64, modes Sv39x4, Sv48x4, and Sv57x4 are defined as modifications of the Sv39, Sv48, and Sv57 paged virtual-memory schemes. All of these paged virtual-memory schemes are described in guest-addr-translation. hgatp_mode_warl: A write to hgatp with an unsupported MODE value is not ignored as it is for satp. Instead, the fields of hgatp are WARL in the normal way, when so indicated. |
Sv_H_csr_cg/cp_hgatp_mode_field |
H_vm_gstagetrans, H_trap_xtinst_guestpage, H_trap_xtinst_guestpage_rw |
H_vm_gstagetrans: When V=1, memory accesses that would normally bypass address translation are subject to G-stage address translation alone. This includes memory accesses made in support of VS-stage address translation, such as reads and writes of VS-level page tables. H_trap_xtinst_guestpage: For guest-page faults, the trap instruction register is written with a special pseudoinstruction value if: (a) the fault is caused by an implicit memory access for VS-stage address translation, and (b) a nonzero value (the faulting guest physical address) is written to mtval2 or htval. If both conditions are met, the value written to mtinst or htinst must be taken from norm:H_trap_xtinst_pseudoinst_tbl; zero is not allowed. H_trap_xtinst_guestpage_rw: A write pseudoinstruction (0x00002020 or 0x00003020) is used for the case that the machine is attempting automatically to update bits A and/or D in VS-level page tables. All other implicit memory accesses for VS-stage address translation will be reads. If a machine never automatically updates bits A or D in VS-level page tables (leaving this to software), the write case will never arise. The fact that such a page table update must actually be atomic, not just a simple write, is ignored for the pseudoinstruction. |
Sv_H_twostage_cg/cp_implicit_gpf, Svadu_H_cg/{cp_implicit_gpf,cp_hlv_implicit}, Sv_HSm_trap_cg/cp_guest_page_fault_m, Sv_HSm_trap_cg/cp_implicit_gpf_m, Sv_H_hlv_cg/{cp_hlv_implicit,cp_hlv_root_gpf}, Sv_HZicbo_cg/{cp_vs_gpa,cp_vs_gpa_implicit,cp_g_pte} |
htval_trapval, mtval2_htval_virtaddr, hstatus_gva_op |
htval_trapval: When a guest-page-fault trap is taken into HS-mode, |
Sv_H_gstage_cg/cp_hgatp_perm, Sv_H_twostage_cg/cp_twostage_perm, Sv_H_twostage_cg/cp_implicit_gpf, Sv_H_twostage_cg/cp_hgatp_sv32x4_gpa, Sv_HSm_trap_cg/cp_guest_page_fault_m, Sv_HSm_trap_cg/cp_implicit_gpf_m, Sv_H_hlv_cg/cp_hlv_root_gpf, Sv_HZicbo_cg/{cp_vs_gpa,cp_vs_gpa_implicit,cp_g_pte} |
H_guest_page_fault |
Sv_H_twostage_cg/cp_hedeleg_guest_page_fault, Sv_H_gstage_cg/cp_hgatp_perm, Sv_H_twostage_cg/cp_twostage_perm, Sv_H_twostage_cg/cp_implicit_gpf, Sv_HSm_trap_cg/cp_guest_page_fault_m, Sv_HSm_trap_cg/cp_implicit_gpf_m |
|
H_straddle |
Sv_H_twostage_cg/cp_straddle, Sv_H_twostage_cg/cp_ldst_straddle, Sv_HSm_trap_cg/cp_straddle_m, Sv_HSm_trap_cg/cp_ldst_straddle_m |
|
hedeleg_op, H_trap_deleg |
hedeleg_op: A synchronous trap that has been delegated to HS-mode (using medeleg) is further delegated to VS-mode if V=1 before the trap and the corresponding hedeleg bit is set. H_trap_deleg: When a trap occurs in HS-mode or U-mode, it goes to M-mode, unless delegated by medeleg or mideleg, in which case it goes to HS-mode. When a trap occurs in VS-mode or VU-mode, it goes to M-mode, unless delegated by medeleg or mideleg, in which case it goes to HS-mode, unless further delegated by hedeleg or hideleg, in which case it goes to VS-mode. |
Sv_H_twostage_cg/cp_hedeleg_page_fault, Sv_H_twostage_cg/cp_hedeleg_guest_page_fault |
vsstatus_mxr_vm, sstatus_mxr_vm |
vsstatus_mxr_vm: The vsstatus field MXR, which makes execute-only pages readable by explicit loads, only overrides VS-stage page protection. Setting MXR at VS-level does not override guest-physical page protections. sstatus_mxr_vm: Setting MXR at HS-level, however, overrides both VS-stage and G-stage execute-only permissions. |
Sv_H_vsstage_cg/cp_vsstatus_mxr, Sv_H_gstage_cg/cp_hgatp_mxr, Sv_H_twostage_cg/cp_twostage_mxr, Sv_H_twostage_cg/cp_implicit_mxr |
vsstatus_sz_acc_op |
Sv_H_vsstage_cg/cp_vsatp_sum |
|
hlsv_priv, hlsv_trans, hlsv_sstatus_mxr, hlsv_vsstatus_mxr, vsatp_v0 |
hlsv_priv: Each instruction performs an explicit memory access with an effective privilege mode of VS or VU. The effective privilege mode of the explicit memory access is VU when hstatus.SPVP=0, and VS when hstatus.SPVP=1. hlsv_trans: As usual for VS-mode and VU-mode, two-stage address translation is applied, and the HS-level sstatus.SUM is ignored. hlsv_sstatus_mxr: HS-level sstatus.MXR makes execute-only pages readable by explicit loads for both stages of address translation (VS-stage and G-stage) hlsv_vsstatus_mxr: vsstatus.MXR affects only the first translation stage (VS-stage). vsatp_v0: When V=0, vsatp does not directly affect the behavior of the machine, unless a virtual-machine load/store (HLV, HLVX, or HSV) or the MPRV feature in the mstatus register is used to execute a load or store as though V=1. |
Sv_H_hlv_cg/cp_hlv_priv, Sv_H_hlv_cg/cp_hlv_mxr, Sv_H_hlv_cg/cp_hlv_root_gpf, Sv_HSm_mprv_cg/cp_vsatp_mprv_effects, Sv_HSm_mprv_cg/cp_hgatp_mprv_effects, Sv_HSm_mprv_cg/cp_mprv_sum, Sv_HSm_mprv_cg/cp_mprv_mxr |
hlsv_u_op |
Sv_H_hlv_cg/cp_hlv_mxr, Sv_H_hlv_cg/cp_hlvx_perm, Sv_H_hlv_cg/cp_hlv_implicit |
|
henvcfg_pbmte_op, Svpbmt_vsatp_stage_override_rule |
henvcfg_pbmte_op: The PBMTE bit controls whether the Svpbmt extension is available for use in VS-stage address translation. When PBMTE=1, Svpbmt is available for VS-stage address translation. When PBMTE=0, the implementation behaves as though Svpbmt were not implemented for VS-stage address translation. If Svpbmt is not implemented, PBMTE is read-only zero. Svpbmt_vsatp_stage_override_rule: if vsatp.MODE is not equal to zero, non-zero VS-stage PTE PBMT bits override the intermediate attributes to produce the final set of attributes used by accesses to the page in question. |
Svpbmt_H_cg/cp_vsatp_pbmt |
menvcfg_pbmte_op, Svpbmt_hgatp_stage_override_rule |
menvcfg_pbmte_op: The PBMTE bit controls whether the Svpbmt extension is available for use in S-mode and G-stage address translation (i.e., for page tables pointed to by satp or hgatp). When PBMTE=1, Svpbmt is available for S-mode and G-stage address translation. When PBMTE=0, the implementation behaves as though Svpbmt were not implemented. Svpbmt_hgatp_stage_override_rule: if hgatp.MODE is not equal to zero, non-zero G-stage PTE PBMT bits override the attributes in the PMA to produce an intermediate set of attributes. |
Svpbmt_H_cg/cp_hgatp_pbmt |
henvcfg_adue_op |
Sv_H_vsstage_cg/cp_vsatp_svade, Sv_H_twostage_cg/cp_twostage_svade, Svadu_H_cg/{cp_vsatp_adue,cp_twostage_adue} |
|
menvcfg_adue_op |
Sv_H_gstage_cg/cp_hgatp_svade, Sv_H_twostage_cg/cp_twostage_svade, Svadu_H_cg/{cp_hgatp_adue,cp_twostage_adue} |
|
menvcfg_adue_henvcfg_adue_rdonly0, menvcfg_pbmte_henvcfg_pbmte_rdonly0, Svadu_hypervisor_adue_writable |
menvcfg_adue_henvcfg_adue_rdonly0: for implementations with the hypervisor extension, henvcfg.ADUE is read-only zero if menvcfg.ADUE is zero. menvcfg_pbmte_henvcfg_pbmte_rdonly0: for implementations with the hypervisor extension, henvcfg.PBMTE is read-only zero if menvcfg.PBMTE is zero. Svadu_hypervisor_adue_writable: If the hypervisor extension is additionally implemented, the henvcfg.ADUE field is also writable. |
Svadu_H_cg/{cp_henvcfg_menvcfg,cp_vsatp_adue}, Svpbmt_H_cg/cp_henvcfg_menvcfg |
Svnapot_hyp_gstage |
Svnapot_H_cg/{cp_hgatp_napot,cp_twostage_napot} |
|
vs_stage_speculative_a_bit |
Not tested: speculative execution is not architecturally observable |
|
hstatus_spvp_virtls_op |
Sv_H_hlv_cg/cp_hlv_priv |
|
hgatp_root_pt_sz_align |
Sv_H_gstage_cg/cp_hgatp_gpa_width, Sv_H_twostage_cg/cp_hgatp_sv32x4_gpa |
|
hgatp_op_hfence_gvma |
Not tested: no behavior is required; tests execute hfence.gvma after writing hgatp |
|
sfence_vma_v0 |
Sv_sfence_cg/cp_ins (Sv tests on an H hart run with V=0) |
|
sfence_vma_v1 |
Sv_H_fence_cg/{cp_sfence_vma_vs, cp_sfence_vma_vs_asid} |
|
mstatus_mprv_hypervisor |
Sv_HSm_mprv_cg/cp_vsatp_mprv_effects, Sv_HSm_mprv_cg/cp_hgatp_mprv_effects, Sv_HSm_mprv_cg/cp_mprv_sum, Sv_HSm_mprv_cg/cp_mprv_mxr |
|
mstatus_mprv_hlsv |
Sv_HSm_mprv_cg/cp_hgatp_mprv_effects |
|
mtval2_trapval, mtval2_trapval_vstrans, mstatus_gva_op, mstatus_mpv_op |
mtval2_trapval: When a guest-page-fault trap is taken into M-mode, |
Sv_HSm_trap_cg/cp_guest_page_fault_m, Sv_HSm_trap_cg/cp_implicit_gpf_m |
mtval2_trapval_other |
Sv_HSm_trap_cg/cp_straddle_m, Sv_HSm_trap_cg/cp_ldst_straddle_m |
|
henvcfg_cbie |
Sv_HZicbo_cg/{cp_cbie_vs,cp_cbie_vu}, H_hscsr_cg/cp_hcsrwalk_masked, HSm_mcsr_cg/cp_hcsrwalk_masked |
|
cbo-inval_h_mode_veq1_op |
Sv_HZicbo_cg/{cp_cbie_vs,cp_cbie_vu} |
|
cbo-inval |
Sv_HZicbo_cg/{cp_cbie_vs,cp_cbie_vu} |
|
henvcfg_cbcfe |
Sv_HZicbo_cg/{cp_cbcfe_vs,cp_cbcfe_vu}, H_hscsr_cg/cp_hcsrwalk_masked, HSm_mcsr_cg/cp_hcsrwalk_masked |
|
cbo-clean_cbo-flush |
Sv_HZicbo_cg/{cp_cbcfe_vs,cp_cbcfe_vu} |
|
henvcfg_cbze |
Sv_HZicbo_cg/{cp_cbze_vs,cp_cbze_vu}, H_hscsr_cg/cp_hcsrwalk_masked, HSm_mcsr_cg/cp_hcsrwalk_masked |
|
cbo-zero_basedon_xenvcfg_cbze |
Sv_HZicbo_cg/{cp_cbze_vs,cp_cbze_vu} |
|
cbz_access |
Sv_HZicbo_cg/{cp_vs_pte,cp_vs_gpa,cp_g_pte} |
|
Svadu_disabled_hw_update_falls_back_to_Svade |
Sv_HZicbo_cg/{cp_vs_pte,cp_g_pte} |
|
cbo-inval_h_mode_enabled_op, cbo-inval_h_mode_flush_enc |
cbo-inval_h_mode_enabled_op: If CBO.INVAL is enabled in HS-mode to perform a flush operation, then when the instruction is enabled in VS- or VU-mode it performs a flush operation, even if CBIE is set to 0b11. Otherwise, when the instruction is enabled for execution, its behavior depends on the CBIE encoding, as follows: cbo-inval_h_mode_flush_enc: 0b01 — The instruction is executed and performs a flush operation, even if configured by VS-mode to perform an invalidate operation. |
Sv_HZicbo_cg/{cp_cbie_vs,cp_cbie_vu} |
cbo-inval_h_mode_inval_enc |
Not tested: whether an invalidate discards stored data depends on the cache hierarchy, so a test cannot tell it from a flush |
UDB Parameters: None.
B.7.2. Svbare Virtual Memory Off
The Svbare suite has two covergroups: Svbare_cg (S-mode and U-mode) and Svbare_Sm_cg (M-mode with MPRV). The Svbare_Sm tests require Sm, so they are not part of a certificate without Sm, such as RVA23.
| Coverpoint | Goal | Feature Description | Expectation | Bins | ID | Normative Rule |
|---|---|---|---|---|---|---|
General Test Environment (Svbare): |
||||||
cp_satp_bare_load |
Verify a load with satp.MODE=Bare uses the physical address in S-mode and U-mode |
S-mode: write satp = 0 and read it back. Load (lw) from the page at the physical address of rvtest_data_1 in S-mode, then in U-mode (RVTEST_TSBI_GOTO_UMODE). |
No fault; the access reaches physical memory untranslated. |
satp_bare x read_acc x mode {S/U-mode} |
satp_mode svbare_satp_mode_bare |
satp_mode_enc |
cp_satp_bare_store |
Verify a store with satp.MODE=Bare uses the physical address in S-mode and U-mode |
S-mode: write satp = 0 and read it back. Store (sw) to the page at the physical address of rvtest_data_1 in S-mode, then in U-mode (RVTEST_TSBI_GOTO_UMODE). |
No fault; the access reaches physical memory untranslated. |
satp_bare x write_acc x mode {S/U-mode} |
satp_mode svbare_satp_mode_bare |
satp_mode_enc |
cp_satp_bare_exec |
Verify an instruction fetch with satp.MODE=Bare uses the physical address in S-mode and U-mode |
S-mode: write satp = 0 and read it back. Jump (jalr) into the page at the physical address of rvtest_data_1 in S-mode, then in U-mode (RVTEST_TSBI_GOTO_UMODE). |
No fault; the access reaches physical memory untranslated. |
satp_bare x exec_acc x mode {S/U-mode} |
satp_mode svbare_satp_mode_bare |
satp_mode_enc |
Svbare_Sm Virtual Memory Off with MPRV
| Coverpoint | Goal | Feature Description | Expectation | Bins | ID | Normative Rule |
|---|---|---|---|---|---|---|
General Test Environment (SvbareSm): |
||||||
cp_satp_bare_mprv_load |
Verify an M-mode load with MPRV=1 and satp.MODE=Bare uses the physical address |
M-mode with satp = 0: set mstatus.MPRV=1 with MPP=S, then MPP=U, reading mstatus back each time. Load (lw) from the page at the physical address of rvtest_data_1. |
No fault; the access is untranslated for either MPP. |
satp_bare x mprv_mstatus x mpp_mstatus x read_acc x mode {M-mode} |
mstatus_mprv_ldst_op |
mstatus_mprv_ldst_op |
cp_satp_bare_mprv_store |
Verify an M-mode store with MPRV=1 and satp.MODE=Bare uses the physical address |
M-mode with satp = 0: set mstatus.MPRV=1 with MPP=S, then MPP=U, reading mstatus back each time. Store (sw) to the page at the physical address of rvtest_data_1. |
No fault; the access is untranslated for either MPP. |
satp_bare x mprv_mstatus x mpp_mstatus x write_acc x mode {M-mode} |
mstatus_mprv_ldst_op |
mstatus_mprv_ldst_op |
cp_satp_bare_mprv_exec |
Verify an M-mode instruction fetch with MPRV=1 and satp.MODE=Bare uses the physical address |
M-mode with satp = 0: set mstatus.MPRV=1 with MPP=S, then MPP=U, reading mstatus back each time. Jump (jalr) into the page at the physical address of rvtest_data_1. |
No fault; the access is untranslated for either MPP. |
satp_bare x mprv_mstatus x mpp_mstatus x exec_acc x mode {M-mode} |
mstatus_mprv_inst_xlat_op |
mstatus_mprv_inst_xlat_op |
Svbare Normative Rules
| Normative Rule | Rule Text | Coverpoints |
|---|---|---|
satp_mode |
norm:satp_mode_enc shows the encodings of the MODE field when SXLEN=32 and SXLEN=64. |
Svbare_cg/{satp_bare,cp_satp_bare_load,cp_satp_bare_store,cp_satp_bare_exec} |
satp_mode_bare_op |
Svbare_cg/{cp_satp_bare_load, cp_satp_bare_store, cp_satp_bare_exec} |
|
satp_mode_bare_zero_fields |
Not tested: requirement on software; the tests write satp=0 to select Bare |
|
satp_mode_bare_nonzero_unspec |
Not tested: behavior is UNSPECIFIED |
|
satp_bare_rsv_custom |
Not tested: reserved and custom encodings |
|
svbare_satp_mode_bare |
Svbare_cg/satp_bare |
|
satp_mode_roz_sfence_illegal |
Not tested: needs satp.MODE read-only zero (UDB TRAP_ON_SFENCE_VMA_WHEN_SATP_MODE_IS_READ_ONLY) |
|
mstatus_mprv_ldst_op |
Svbare_Sm_cg/cp_satp_bare_mprv_{load,store} |
|
mstatus_mprv_inst_xlat_op |
Instruction address-translation and protection are unaffected by the setting of |
Sv_Sm_mstatus_mprv_cg/cp_mprv_ins |
UDB Parameters: None.
B.7.3. Svinval Memory Management Unit Table Invalidation
The Svinval extension defines instructions to update memory management tables for virtual memory and optionally for PMP. These tests check that the instructions run, and, with Sv39 or Sv32, that the SFENCE.W.INVAL, SINVAL.VMA, SFENCE.INVAL.IR sequence removes a changed leaf. A hart that caches no translations passes the invalidation test.
| Coverpoint | Goal | Feature Description | Expectation | Bins | ID | Normative Rule |
|---|---|---|---|---|---|---|
General Test Environment (Svinval): |
||||||
cp_svinval |
Verify the Svinval instructions in S-mode and U-mode with mstatus.TVM=0 |
S-mode: execute sfence.w.inval, sinval.vma x0, x0, sfence.inval.ir and sfence.vma x0, x0. Switch to U-mode with RVTEST_TSBI_GOTO_UMODE and execute the same four instructions. |
S-mode: all four execute without exception. U-mode: illegal-instruction exception (scause = 2) for each. |
cp_instr x cp_priv x cp_tvm |
Svinval_illegal_instruction_u_mode Svinval_sfence_w_inval_inval_u_mode Svinval_sfence_w_inval_inval_s_vs_mode |
mstatus_tvm_op |
cp_sinval_vma |
The Svinval sequence removes a stale S-mode translation |
Sv39 on RV64, Sv32 on RV32, with every implemented satp.ASID bit set. In S-mode, map a virtual address to page A and load from it. Point the leaf at page B and run sfence.w.inval, sinval.vma rs1, rs2 and sfence.inval.ir, with rs1 = x0 or the address and rs2 = x0 or the current ASID, and the address with all ASIDMAX bits set in rs2. Load again. |
The load after the sequence reads page B. Both loads are recorded. A hart that caches no translation passes. |
S x sinval.vma x satp paged x rs1 {x0, register} x rs2 {x0, register} = 4 bins |
Svinval_sinval_vma_invalidates_same_as_sfence_vma |
|
| Normative Rule | Rule Text | Coverpoints |
|---|---|---|
Svinval_sinval_vma_invalidates_same_as_sfence_vma |
Svinval_cg/cp_sinval_vma, Svinval_H_cg/cp_sinval_vma_vs |
|
Svinval_sfence_w_inval_orders_before_sinval_vma |
Svinval_cg/cp_sinval_vma, Svinval_H_cg/cp_sinval_vma_vs |
|
Svinval_sequence_rs1_rs2 |
the values of rs1 and rs2 for the SFENCE.VMA are the same as those used in the SINVAL.VMA, |
Svinval_cg/cp_sinval_vma, Svinval_H_cg/cp_sinval_vma_vs |
Svinval_sequence_reads_writes_before, Svinval_sequence_reads_writes_after |
Svinval_sequence_reads_writes_before: reads and writes prior to the SFENCE.W.INVAL are considered to be those prior to the SFENCE.VMA, Svinval_sequence_reads_writes_after: reads and writes following the SFENCE.INVAL.IR are considered to be those subsequent to the SFENCE.VMA. |
Not tested: ordering is not observable in single-hart signature tests |
Svinval_illegal_instruction_u_mode |
Svinval_cg/cp_svinval, Svinval_H_cg/cp_svinval, Svinval_SmH_cg/cp_svinval_tvm |
|
Svinval_sfence_w_inval_inval_u_mode |
Svinval_cg/cp_svinval, Svinval_H_cg/cp_svinval |
|
Svinval_sfence_w_inval_inval_s_vs_mode |
Svinval_cg/cp_svinval, Svinval_Sm_cg/cp_svinval, Svinval_H_cg/cp_svinval, Svinval_SmH_cg/cp_svinval_tvm |
|
Svinval_hinval_vvma_gvma |
Svinval_H_cg/{cp_svinval, cp_hinval_vvma, cp_hinval_gvma}, Svinval_SmH_cg/cp_svinval_{m, tvm} |
|
Svinval_virtual_instruction_vu_vs, Svinval_virtual_instruction_vtvms, Svinval_sfence_w_inval_inval_vu_mode |
Svinval_virtual_instruction_vu_vs: An attempt to execute HINVAL.VVMA or HINVAL.GVMA in VS-mode or VU-mode, or to execute SINVAL.VMA in VU-mode, raises a virtual-instruction exception. Svinval_virtual_instruction_vtvms: When hstatus.VTVM=1, an attempt to execute SINVAL.VMA in VS-mode also raises a virtual-instruction exception. Svinval_sfence_w_inval_inval_vu_mode: Doing so in VU-mode raises a virtual-instruction exception. |
Svinval_H_cg/cp_svinval, Svinval_SmH_cg/cp_svinval_{m, tvm} |
H_virtinst_vs_sfence_sinval_satp_vtvm1 |
Svinval_H_cg/cp_svinval |
|
Svinval_hinval_gvma_uses_vmid |
Svinval_H_cg/cp_hinval_gvma |
|
Svinval_illegal_instruction_tvm |
Svinval_Sm_cg/cp_svinval, Svinval_SmH_cg/cp_svinval_tvm |
|
mstatus_tvm_op, mstatus_tvm_warl |
mstatus_tvm_op: When |
Svinval_Sm_cg/cp_svinval |
UDB Parameters: None.
Svinval_Sm Table Invalidation with mstatus.TVM
Runs the Svinval instructions in M, S and U mode with mstatus.TVM=0 and mstatus.TVM=1.
| Coverpoint | Goal | Feature Description | Expectation | Bins | ID | Normative Rule |
|---|---|---|---|---|---|---|
General Test Environment (SvinvalSm): |
||||||
cp_svinval |
Verify the Svinval instructions in M-mode, S-mode and U-mode with mstatus.TVM clear and set |
Execute sfence.w.inval, sinval.vma x0, x0, sfence.inval.ir and sfence.vma x0, x0 in M-mode, then in S-mode (RVTEST_TSBI_GOTO_SMODE) and U-mode (RVTEST_TSBI_GOTO_UMODE); repeat the whole sequence after setting mstatus.TVM in M-mode and reading mstatus back. |
M-mode: all execute for either TVM. S-mode with TVM=0: all execute; with TVM=1 sinval.vma and sfence.vma raise illegal instruction (mcause = 2) while sfence.w.inval and sfence.inval.ir execute. U-mode: illegal instruction for each, for either TVM. |
cp_instr x cp_priv x cp_tvm |
mstatus_tvm_op MSTATUS_TVM_WARL Svinval_sfence_w_inval_inval_s_vs_mode Svinval_illegal_instruction_tvm |
mstatus_tvm_op |
Svinval_H Hypervisor Table Invalidation
Runs the Svinval instructions in HS, VS, U and VU modes with hstatus.VTVM=0 and hstatus.VTVM=1, and checks that
the Svinval sequences remove changed VS-stage and G-stage leaves.
| Coverpoint | Goal | Feature Description | Expectation | Bins | Normative Rule | Notes |
|---|---|---|---|---|---|---|
cp_svinval |
Svinval instructions trap appropriately. |
Execute each Svinval instruction {sfence.w.inval, sinval.vma x0, x0, sfence.inval.ir, hinval.vvma x0, x0, hinval.gvma x0, x0} in each privilege mode {HS/VS/U/VU} with TVM = 0 and VTVM = {0/1}. Doesn’t try to check that anything is actually invalidated. |
HS: all execute. |
5 instructions x 4 privilege modes x TVM = 0 x 2 VTVM |
Svinval_illegal_instruction_u_mode |
M-mode and TVM = 1 are in Svinval_SmH, because the HS-mode handler reads satp, which traps with TVM = 1 |
cp_hinval_vvma |
Svinval sequences remove stale VS-stage and G-stage translations |
Sv32/Sv32x4 and Sv39/Sv39x4. Map a guest virtual address through the VS-stage to guest physical page A and through the G-stage to physical page A, and load from it in VS-mode. HS-mode then points the VS-stage leaf at guest page B, or the G-stage leaf of page A at physical page B, and runs sfence.w.inval, hinval.vvma or hinval.gvma, and sfence.inval.ir in HS-mode, or sfence.w.inval, sinval.vma and sfence.inval.ir in VS-mode. rs1 is x0 or the address (the guest virtual address, or the guest physical address >> 2 for hinval.gvma); rs2 is x0 or the current ASID (hinval.vvma, sinval.vma) or VMID (hinval.gvma), and the address is also used with all ASIDMAX or VMIDMAX bits set in rs2. The cases run with every implemented vsatp.ASID and hgatp.VMID bit set. |
The VS-mode load after the sequence reads page B. Both loads are recorded. A hart that caches no translation passes. |
cp_hinval_vvma: HS x hinval.vvma x vsatp paged x hgatp paged x rs1 {x0, register} x rs2 {x0, register} |
Svinval_hinval_vvma_gvma |
Svinval_SmH Hypervisor Table Invalidation with mstatus.TVM
Runs the Svinval instructions in M-mode, and in HS, VS, U and VU modes with mstatus.TVM=1, whose traps are taken in
M-mode.
Svinval_SmH boots to M-mode and delegates nothing, so the M-mode handler takes every trap. The lower modes with mstatus.TVM = 0 are in Svinval_H.
| Coverpoint | Goal | Feature Description | Expectation | Bins | Normative Rule |
|---|---|---|---|---|---|
cp_svinval_m |
Svinval instructions execute in M-mode |
Execute each Svinval instruction {sfence.w.inval, sinval.vma x0, x0, sfence.inval.ir, hinval.vvma x0, x0, hinval.gvma x0, x0} in M-mode with TVM = {0/1} and VTVM = {0/1} |
All execute; TVM and VTVM do not affect M-mode |
5 instructions x M x 2 TVM x 2 VTVM |
Svinval_hinval_vvma_gvma |
cp_svinval_tvm |
Svinval instructions trap appropriately with TVM = 1 |
Execute each Svinval instruction in each privilege mode {HS/VS/U/VU} with TVM = 1 and VTVM = {0/1} |
HS: sinval.vma and hinval.gvma raise illegal instruction; sfence.w.inval, sfence.inval.ir and hinval.vvma execute. |
5 instructions x 4 privilege modes x TVM = 1 x 2 VTVM |
Svinval_illegal_instruction_u_mode |
B.7.4. Svade A/D Bit Page Fault Exception
| Coverpoint | Goal | Feature Description | Expectation | Bins | ID | Normative Rule |
|---|---|---|---|---|---|---|
General Test Environment (Svade): |
||||||
Abit_unset_exec_s |
Verify an instruction fetch through a PTE with A=0 raises an instruction page fault from S-mode (Svade) |
S-mode: menvcfg.ADUE=0 (cleared through T-SBI). Leaf PTE with A=0 (with D=0 and D=1) and PTE.U=0, at every page-table level (4 KiB page and each superpage size of the Sv mode). Jump (jalr) into the page through va_data. |
Instruction page fault (scause = 12); stval = faulting virtual address. |
PTE_Abit_unset_s_i x PageType_i x Svade_enabled x ins_page_fault x exec_acc x mode {S-mode} |
Svade_access_ad_bit_clear Svadu_disabled_hw_update_falls_back_to_Svade menvcfg_adue_op |
Svade_access_ad_bit_clear |
Abit_unset_exec_u |
Verify an instruction fetch through a PTE with A=0 raises an instruction page fault from U-mode (Svade) |
U-mode: menvcfg.ADUE=0 (cleared through T-SBI). Leaf PTE with A=0 (with D=0 and D=1) and PTE.U=1, at every page-table level (4 KiB page and each superpage size of the Sv mode). Jump (jalr) into the page through va_data. |
Instruction page fault (scause = 12); stval = faulting virtual address. |
PTE_Abit_unset_u_i x PageType_i x Svade_enabled x ins_page_fault x exec_acc x mode {U-mode} |
Svade_access_ad_bit_clear Svadu_disabled_hw_update_falls_back_to_Svade menvcfg_adue_op |
Svade_access_ad_bit_clear |
Abit_unset_read_s |
Verify a load through a PTE with A=0 raises a load page fault from S-mode (Svade) |
S-mode: menvcfg.ADUE=0 (cleared through T-SBI). Leaf PTE with A=0 (with D=0 and D=1) and PTE.U=0, at every page-table level (4 KiB page and each superpage size of the Sv mode). Load (lw) from the page through va_data. |
Load page fault (scause = 13); stval = faulting virtual address. |
PTE_Abit_unset_s_d x PageType_d x Svade_enabled x load_page_fault x read_acc x mode {S-mode} |
Svade_access_ad_bit_clear Svadu_disabled_hw_update_falls_back_to_Svade menvcfg_adue_op |
Svade_access_ad_bit_clear |
Abit_unset_read_u |
Verify a load through a PTE with A=0 raises a load page fault from U-mode (Svade) |
U-mode: menvcfg.ADUE=0 (cleared through T-SBI). Leaf PTE with A=0 (with D=0 and D=1) and PTE.U=1, at every page-table level (4 KiB page and each superpage size of the Sv mode). Load (lw) from the page through va_data. |
Load page fault (scause = 13); stval = faulting virtual address. |
PTE_Abit_unset_u_d x PageType_d x Svade_enabled x load_page_fault x read_acc x mode {U-mode} |
Svade_access_ad_bit_clear Svadu_disabled_hw_update_falls_back_to_Svade menvcfg_adue_op |
pte_a_def |
Abit_unset_write_s |
Verify a store through a PTE with A=0 raises a store/AMO page fault from S-mode (Svade) |
S-mode: menvcfg.ADUE=0 (cleared through T-SBI). Leaf PTE with A=0 (with D=0 and D=1) and PTE.U=0, at every page-table level (4 KiB page and each superpage size of the Sv mode). Store (sw) to the page through va_data. |
Store/AMO page fault (scause = 15); stval = faulting virtual address. |
PTE_Abit_unset_s_d x PageType_d x Svade_enabled x store_page_fault x write_acc x mode {S-mode} |
Svade_access_ad_bit_clear Svadu_disabled_hw_update_falls_back_to_Svade menvcfg_adue_op |
pte_a_def |
Abit_unset_write_u |
Verify a store through a PTE with A=0 raises a store/AMO page fault from U-mode (Svade) |
U-mode: menvcfg.ADUE=0 (cleared through T-SBI). Leaf PTE with A=0 (with D=0 and D=1) and PTE.U=1, at every page-table level (4 KiB page and each superpage size of the Sv mode). Store (sw) to the page through va_data. |
Store/AMO page fault (scause = 15); stval = faulting virtual address. |
PTE_Abit_unset_u_d x PageType_d x Svade_enabled x store_page_fault x write_acc x mode {U-mode} |
Svade_access_ad_bit_clear Svadu_disabled_hw_update_falls_back_to_Svade menvcfg_adue_op |
Svade_access_ad_bit_clear |
Dbit_unset_write_s |
Verify a store through a PTE with D=0 raises a store/AMO page fault from S-mode (Svade) |
S-mode: menvcfg.ADUE=0. Leaf PTE with A=1, D=0 and PTE.U=0, at every page-table level (4 KiB page and each superpage size of the Sv mode). Store (sw) to the page; loads and fetches of the same page are also done. |
Store/AMO page fault (scause = 15); the load and fetch succeed. |
PTE_Dbit_unset_s_d x PageType_d x Svade_enabled x store_page_fault x write_acc x mode {S-mode} |
Svade_access_ad_bit_clear Svadu_disabled_hw_update_falls_back_to_Svade menvcfg_adue_op |
pte_d_def |
Dbit_unset_write_u |
Verify a store through a PTE with D=0 raises a store/AMO page fault from U-mode (Svade) |
U-mode: menvcfg.ADUE=0. Leaf PTE with A=1, D=0 and PTE.U=1, at every page-table level (4 KiB page and each superpage size of the Sv mode). Store (sw) to the page; loads and fetches of the same page are also done. |
Store/AMO page fault (scause = 15); the load and fetch succeed. |
PTE_Dbit_unset_u_d x PageType_d x Svade_enabled x store_page_fault x write_acc x mode {U-mode} |
Svade_access_ad_bit_clear Svadu_disabled_hw_update_falls_back_to_Svade menvcfg_adue_op |
pte_d_def |
| Normative Rule | Rule Text | Coverpoints |
|---|---|---|
Svade_access_ad_bit_clear |
Svade_cg/{Abit_unset_exec_s, Abit_unset_read_s, Abit_unset_write_s, Dbit_unset_write_s} |
|
Svadu_disabled_hw_update_falls_back_to_Svade |
Svade_cg/{Abit_unset_read_s, Dbit_unset_write_s} |
|
menvcfg_adue_op |
Svade_cg/{Abit_unset_read_s, Dbit_unset_write_s} |
UDB Parameters: None.
B.7.5. Svadu A/D Bit Hardware Update
| Coverpoint | Goal | Feature Description | Expectation | Bins | ID | Normative Rule |
|---|---|---|---|---|---|---|
General Test Environment (Svadu): |
||||||
Abit_unset_exec_s |
Verify hardware sets PTE.A on an instruction fetch from S-mode (Svadu) |
S-mode: menvcfg.ADUE=1 (set through T-SBI). Leaf PTE with A=0 and PTE.U=0, at every page-table level (4 KiB page and each superpage size of the Sv mode) (separate PTEs for store, load and fetch). Jump (jalr) into the page, then read the PTE back. |
No fault; the PTE reads back with A=1 (and D=1 after a store). |
PTE_Abit_unset_s_i x PageType_i x Svadu_enabled x exec_acc x mode {S-mode} |
Svadu_hw_update_a_d_bits menvcfg_adue_op menvcfg_adue_fence |
pte_a_def |
Abit_unset_exec_u |
Verify hardware sets PTE.A on an instruction fetch from U-mode (Svadu) |
U-mode: menvcfg.ADUE=1 (set through T-SBI). Leaf PTE with A=0 and PTE.U=1, at every page-table level (4 KiB page and each superpage size of the Sv mode) (separate PTEs for store, load and fetch). Jump (jalr) into the page, then read the PTE back. |
No fault; the PTE reads back with A=1 (and D=1 after a store). |
PTE_Abit_unset_u_i x PageType_i x Svadu_enabled x exec_acc x mode {U-mode} |
Svadu_hw_update_a_d_bits menvcfg_adue_op menvcfg_adue_fence |
[norm:Svadu_hw_update_a_d_bits] [norm:menvcfg_adue_op] [norm:menvcfg_adue_fence] |
Abit_unset_read_s |
Verify hardware sets PTE.A on a load from S-mode (Svadu) |
S-mode: menvcfg.ADUE=1 (set through T-SBI). Leaf PTE with A=0 and PTE.U=0, at every page-table level (4 KiB page and each superpage size of the Sv mode) (separate PTEs for store, load and fetch). Load (lw) from the page, then read the PTE back. |
No fault; the PTE reads back with A=1 (and D=1 after a store). |
PTE_Abit_unset_s_d x PageType_d x Svadu_enabled x read_acc x mode {S-mode} |
Svadu_hw_update_a_d_bits menvcfg_adue_op menvcfg_adue_fence |
Svadu_hw_update_a_d_bits |
Abit_unset_read_u |
Verify hardware sets PTE.A on a load from U-mode (Svadu) |
U-mode: menvcfg.ADUE=1 (set through T-SBI). Leaf PTE with A=0 and PTE.U=1, at every page-table level (4 KiB page and each superpage size of the Sv mode) (separate PTEs for store, load and fetch). Load (lw) from the page, then read the PTE back. |
No fault; the PTE reads back with A=1 (and D=1 after a store). |
PTE_Abit_unset_u_d x PageType_d x Svadu_enabled x read_acc x mode {U-mode} |
Svadu_hw_update_a_d_bits menvcfg_adue_op menvcfg_adue_fence |
pte_a_def |
Abit_unset_write_s |
Verify hardware sets PTE.A on a store from S-mode (Svadu) |
S-mode: menvcfg.ADUE=1 (set through T-SBI). Leaf PTE with A=0 and PTE.U=0, at every page-table level (4 KiB page and each superpage size of the Sv mode) (separate PTEs for store, load and fetch). Store (sw) to the page, then read the PTE back. |
No fault; the PTE reads back with A=1 (and D=1 after a store). |
PTE_Abit_unset_s_d x PageType_d x Svadu_enabled x write_acc x mode {S-mode} |
Svadu_hw_update_a_d_bits menvcfg_adue_op menvcfg_adue_fence |
[norm:Svadu_hw_update_a_d_bits] [norm:menvcfg_adue_op] [norm:menvcfg_adue_fence] |
Abit_unset_write_u |
Verify hardware sets PTE.A on a store from U-mode (Svadu) |
U-mode: menvcfg.ADUE=1 (set through T-SBI). Leaf PTE with A=0 and PTE.U=1, at every page-table level (4 KiB page and each superpage size of the Sv mode) (separate PTEs for store, load and fetch). Store (sw) to the page, then read the PTE back. |
No fault; the PTE reads back with A=1 (and D=1 after a store). |
PTE_Abit_unset_u_d x PageType_d x Svadu_enabled x write_acc x mode {U-mode} |
Svadu_hw_update_a_d_bits menvcfg_adue_op menvcfg_adue_fence |
[norm:Svadu_hw_update_a_d_bits] [norm:menvcfg_adue_op] [norm:menvcfg_adue_fence] |
Dbit_unset_write_s |
Verify hardware sets PTE.D on a store from S-mode (Svadu) |
S-mode: menvcfg.ADUE=1. Leaf PTE with A=1, D=0 and PTE.U=0, at every page-table level (4 KiB page and each superpage size of the Sv mode). Store (sw) to the page, then read the PTE back. |
No fault; the PTE reads back with D=1. |
PTE_Dbit_unset_s_d x PageType_d x Svadu_enabled x write_acc x mode {S-mode} |
Svadu_hw_update_a_d_bits menvcfg_adue_op menvcfg_adue_fence |
pte_d_def |
Dbit_unset_write_u |
Verify hardware sets PTE.D on a store from U-mode (Svadu) |
U-mode: menvcfg.ADUE=1. Leaf PTE with A=1, D=0 and PTE.U=1, at every page-table level (4 KiB page and each superpage size of the Sv mode). Store (sw) to the page, then read the PTE back. |
No fault; the PTE reads back with D=1. |
PTE_Dbit_unset_u_d x PageType_d x Svadu_enabled x write_acc x mode {U-mode} |
Svadu_hw_update_a_d_bits menvcfg_adue_op menvcfg_adue_fence |
pte_d_def |
fault_no_update_exec_s |
No A/D update on a faulting access |
With menvcfg.ADUE = 1, in supervisor mode, access leaf PTEs with A=0 and D=0 that must page fault, then read the PTE back. |
Load/store/instruction page fault; the PTE still has A=0 and D=0. |
PTE_fault_reason x Svadu_enabled x access x page fault x mode {S-mode} |
menvcfg_adue_op |
|
Svadu_H Hypervisor A/D Bit Hardware Update
Checks henvcfg.ADUE and menvcfg.ADUE in the VS-stage, the G-stage and both stages, and the A/D updates of implicit VS-stage page-table accesses.
Svadu_H uses the Sv_H test environment (see Sv_H). menvcfg.ADUE selects Svade or Svadu for the G-stage, and henvcfg.ADUE for the VS-stage. The ADUE = 0 cases are also in Sv_H; they are repeated here so that each cross has every ADUE value.
| Coverpoint | Goal | Feature Description | Expectation | Bins | Normative Rule | Notes |
|---|---|---|---|---|---|---|
cp_vsatp_adue |
henvcfg.ADUE selects Svade or Svadu for the VS-stage |
In VS-mode with hgatp = Bare, store, load and fetch through VS-stage leaves with A = D = 0 and with D = 0, with (menvcfg.ADUE, henvcfg.ADUE) = (0, 1 written) and (1, 0); and with (1, 1), load and fetch through an A = D = 0 leaf and store through a D = 0 leaf. The leaf is read back after the accesses. |
henvcfg.ADUE is read-only zero while menvcfg.ADUE = 0. With henvcfg.ADUE = 0 (Svade), an access with A = 0, or a store with D = 0, raises a page fault and the PTE is unchanged. With henvcfg.ADUE = 1 (Svadu), the hart sets A, and D for a store, and the access succeeds. |
VS x {sw, lw, jalr} x vsatp_mode x hgatp Bare x (menvcfg.ADUE, henvcfg.ADUE) {00, 10, 11} |
henvcfg_adue_op |
|
cp_hgatp_adue |
menvcfg.ADUE selects Svade or Svadu for the G-stage |
In VS-mode with vsatp = Bare, store, load and fetch through G-stage leaves with A = D = 0 and with D = 0 with menvcfg.ADUE = 0; and with menvcfg.ADUE = 1, load and fetch through an A = D = 0 leaf and store through a D = 0 leaf. The leaf is read back after the accesses. |
With menvcfg.ADUE = 0 (Svade), an access with A = 0, or a store with D = 0, raises a guest-page fault for the original access type and the PTE is unchanged. With menvcfg.ADUE = 1 (Svadu), the hart sets A, and D for a store, and the access succeeds. |
VS x {sw, lw, jalr} x vsatp Bare x hgatp_mode x menvcfg.ADUE {0, 1} |
menvcfg_adue_op |
|
cp_twostage_adue |
A/D bits in both stages, including the G-stage leaf of a VS-stage page table |
In VS-mode, store, load and fetch through VS-stage leaves with A = D = 0 or D = 0 with menvcfg.ADUE = 1 and henvcfg.ADUE = 0 and 1, and through G-stage leaves with A = D = 0 or D = 0 with menvcfg.ADUE = 0 and 1. The VS-stage leaf is in a level-0 page table at a guest physical address whose G-stage leaf has A = D = 0 or D = 0 in the hardware-update cases. Updated PTEs, including the G-stage leaf of the VS-stage leaf table, are read back. |
With ADUE = 0 for a stage (Svade), an access with A = 0, or a store with D = 0, raises a page fault (VS-stage) or guest-page fault (G-stage). With ADUE = 1 (Svadu), the hart sets the bits. |
VS x {sw, lw, jalr} x stage_modes x (menvcfg.ADUE, henvcfg.ADUE) {00, 10, 11} |
henvcfg_adue_op |
|
cp_implicit_gpf |
Guest-page faults on implicit VS-stage A/D updates |
In VS-mode with menvcfg.ADUE = henvcfg.ADUE = 1, store, load and fetch through a VS-stage leaf with A = D = 0 in a level-0 page table at a guest physical address whose G-stage leaf is read-only. |
The VS-stage A/D update is an implicit store, so it needs G-stage write permission. Each access raises a guest-page fault reported for the original access type (instruction, load or store/AMO), with htval = the guest physical address of the VS-stage PTE >> 2 and, if htval is nonzero, htinst = the write pseudoinstruction 0x3020 on RV64, 0x2020 on RV32. |
VS x {sw, lw, jalr} x stage_modes x htinst write pseudoinstruction |
H_vm_gstagetrans |
Sv_H cp_implicit_gpf has the read pseudoinstruction cases. |
cp_hlv_implicit |
Guest-page faults on the implicit VS-stage A/D updates of HLV, HLVX and HSV |
In HS-mode with hstatus.SPVP = 1 and menvcfg.ADUE = henvcfg.ADUE = 1, execute hlv.w, hlvx.wu and hsv.w through a VS-stage leaf with A = D = 0 in a level-0 page table at a guest physical address whose G-stage leaf is read-only. |
The A/D update raises a load or store guest-page fault with htinst = the write pseudoinstruction. |
HS x {hlv.w, hlvx.wu, hsv.w} x stage_modes x htinst write pseudoinstruction |
H_vm_gstagetrans |
Sv_H cp_hlv_implicit has the read pseudoinstruction cases. |
cp_henvcfg_menvcfg |
henvcfg.ADUE is read-only zero while menvcfg.ADUE = 0 |
In HS-mode with menvcfg.ADUE = 0, then 1, set henvcfg.ADUE (henvcfgh on RV32) and read it back. |
henvcfg.ADUE reads as zero while menvcfg.ADUE = 0, and reads back as written while menvcfg.ADUE = 1. |
HS x csrrs henvcfg (henvcfgh on RV32) x menvcfg.ADUE {0, 1} |
menvcfg_adue_henvcfg_adue_rdonly0 |
| Normative Rule | Rule Text | Coverpoints |
|---|---|---|
Svadu_hw_update_a_d_bits |
If the Svadu extension is implemented, the menvcfg.ADUE field is writable. |
Sm_mcsr_cg/cp_mcsrwalk_masked/menvcfg, Svadu_cg/{Abit_unset_read_s, Dbit_unset_write_s} |
Svadu_hypervisor_adue_writable |
If the hypervisor extension is additionally implemented, the henvcfg.ADUE field is also writable. |
Svadu_H_cg/cp_henvcfg_menvcfg |
Svadu_disabled_hw_update_falls_back_to_Svade |
Svade_cg/{Abit_unset_read_s, Dbit_unset_write_s} |
|
menvcfg_adue_op |
Svadu_cg/{Abit_unset_read_s, Dbit_unset_write_s}, Svadu_cg/fault_no_update_{exec,read,write}_s |
|
menvcfg_adue_fence |
Svadu_cg/Svadu_enabled |
|
menvcfg_adue_rdonly0 |
Sm_mcsr_cg/cp_mcsrwalk_masked/menvcfg |
|
menvcfg_adue_henvcfg_adue_rdonly0 |
Svadu_H_cg/cp_henvcfg_menvcfg |
UDB Parameters: None.
B.7.6. Svpbmt Page-Based Memory Types
| Coverpoint | Goal | Feature Description | Expectation | Bins | ID | Normative Rule |
|---|---|---|---|---|---|---|
General Test Environment (Svpbmt): |
||||||
nonleaf_PTE_pbmt_exec_s |
Verify PBMT set in a non-leaf PTE raises an instruction page fault on an instruction fetch from S-mode |
S-mode: menvcfg.PBMTE=1 (set through T-SBI). Non-leaf PTE with PBMT = 1, 2 and 3 above a valid leaf with PTE.U=0. Jump (jalr) into the page through va_data. |
Instruction page fault (scause = 12); stval = faulting virtual address. |
nonleaf_PTE_pbmt_i x PBMTE_set x PageType_i x jalr x ins_page_fault x mode {S-mode} |
Svpbmt_nonleaf_pte_pbmt_must_be_zero menvcfg_pbmte_op menvcfg_pbmte_fence |
Svpbmt_nonleaf_pte_pbmt_must_be_zero |
nonleaf_PTE_pbmt_exec_u |
Verify PBMT set in a non-leaf PTE raises an instruction page fault on an instruction fetch from U-mode |
U-mode: menvcfg.PBMTE=1 (set through T-SBI). Non-leaf PTE with PBMT = 1, 2 and 3 above a valid leaf with PTE.U=1. Jump (jalr) into the page through va_data. |
Instruction page fault (scause = 12); stval = faulting virtual address. |
nonleaf_PTE_pbmt_i x PBMTE_set x PageType_i x jalr x ins_page_fault x mode {U-mode} |
Svpbmt_nonleaf_pte_pbmt_must_be_zero menvcfg_pbmte_op menvcfg_pbmte_fence |
Svpbmt_nonleaf_pte_pbmt_must_be_zero |
nonleaf_PTE_pbmt_read_s |
Verify PBMT set in a non-leaf PTE raises a load page fault on a load from S-mode |
S-mode: menvcfg.PBMTE=1 (set through T-SBI). Non-leaf PTE with PBMT = 1, 2 and 3 above a valid leaf with PTE.U=0. Load (lw) from the page through va_data. |
Load page fault (scause = 13); stval = faulting virtual address. |
nonleaf_PTE_pbmt_d x PBMTE_set x PageType_d x lw x load_page_fault x mode {S-mode} |
Svpbmt_nonleaf_pte_pbmt_must_be_zero menvcfg_pbmte_op menvcfg_pbmte_fence |
Svpbmt_nonleaf_pte_pbmt_must_be_zero |
nonleaf_PTE_pbmt_read_u |
Verify PBMT set in a non-leaf PTE raises a load page fault on a load from U-mode |
U-mode: menvcfg.PBMTE=1 (set through T-SBI). Non-leaf PTE with PBMT = 1, 2 and 3 above a valid leaf with PTE.U=1. Load (lw) from the page through va_data. |
Load page fault (scause = 13); stval = faulting virtual address. |
nonleaf_PTE_pbmt_d x PBMTE_set x PageType_d x lw x load_page_fault x mode {U-mode} |
Svpbmt_nonleaf_pte_pbmt_must_be_zero menvcfg_pbmte_op menvcfg_pbmte_fence |
Svpbmt_nonleaf_pte_pbmt_must_be_zero |
nonleaf_PTE_pbmt_write_s |
Verify PBMT set in a non-leaf PTE raises a store/AMO page fault on a store from S-mode |
S-mode: menvcfg.PBMTE=1 (set through T-SBI). Non-leaf PTE with PBMT = 1, 2 and 3 above a valid leaf with PTE.U=0. Store (sw) to the page through va_data. |
Store/AMO page fault (scause = 15); stval = faulting virtual address. |
nonleaf_PTE_pbmt_d x PBMTE_set x PageType_d x sw x store_page_fault x mode {S-mode} |
Svpbmt_nonleaf_pte_pbmt_must_be_zero menvcfg_pbmte_op menvcfg_pbmte_fence |
Svpbmt_nonleaf_pte_pbmt_must_be_zero |
nonleaf_PTE_pbmt_write_u |
Verify PBMT set in a non-leaf PTE raises a store/AMO page fault on a store from U-mode |
U-mode: menvcfg.PBMTE=1 (set through T-SBI). Non-leaf PTE with PBMT = 1, 2 and 3 above a valid leaf with PTE.U=1. Store (sw) to the page through va_data. |
Store/AMO page fault (scause = 15); stval = faulting virtual address. |
nonleaf_PTE_pbmt_d x PBMTE_set x PageType_d x sw x store_page_fault x mode {U-mode} |
Svpbmt_nonleaf_pte_pbmt_must_be_zero menvcfg_pbmte_op menvcfg_pbmte_fence |
Svpbmt_nonleaf_pte_pbmt_must_be_zero |
leaf_PTE_pbmt_exec_s |
Verify an instruction fetch through a leaf PTE with PBMT = NC or IO succeeds from S-mode |
S-mode: menvcfg.PBMTE=1. Leaf PTE with PBMT = 1 (NC) and 2 (IO) and PTE.U=0, at every page-table level (4 KiB page and each superpage size of the Sv mode). Jump (jalr) into the page through va_data. |
No fault. |
leaf_PTE_pbmt_s_i x PBMTE_set x PageType_i x jalr x mode {S-mode} |
Svpbmt_depends_Sv39 menvcfg_pbmte_op menvcfg_pbmte_fence |
Svpbmt_pte_bits |
leaf_PTE_pbmt_exec_u |
Verify an instruction fetch through a leaf PTE with PBMT = NC or IO succeeds from U-mode |
U-mode: menvcfg.PBMTE=1. Leaf PTE with PBMT = 1 (NC) and 2 (IO) and PTE.U=1, at every page-table level (4 KiB page and each superpage size of the Sv mode). Jump (jalr) into the page through va_data. |
No fault. |
leaf_PTE_pbmt_u_i x PBMTE_set x PageType_i x jalr x mode {U-mode} |
Svpbmt_depends_Sv39 menvcfg_pbmte_op menvcfg_pbmte_fence |
Svpbmt_depends_Sv39 |
leaf_PTE_pbmt_read_s |
Verify a load through a leaf PTE with PBMT = NC or IO succeeds from S-mode |
S-mode: menvcfg.PBMTE=1. Leaf PTE with PBMT = 1 (NC) and 2 (IO) and PTE.U=0, at every page-table level (4 KiB page and each superpage size of the Sv mode). Load (lw) from the page through va_data. |
No fault. |
leaf_PTE_pbmt_s_d x PBMTE_set x PageType_d x lw x mode {S-mode} |
Svpbmt_depends_Sv39 menvcfg_pbmte_op menvcfg_pbmte_fence |
Svpbmt_pte_bits |
leaf_PTE_pbmt_read_u |
Verify a load through a leaf PTE with PBMT = NC or IO succeeds from U-mode |
U-mode: menvcfg.PBMTE=1. Leaf PTE with PBMT = 1 (NC) and 2 (IO) and PTE.U=1, at every page-table level (4 KiB page and each superpage size of the Sv mode). Load (lw) from the page through va_data. |
No fault. |
leaf_PTE_pbmt_u_d x PBMTE_set x PageType_d x lw x mode {U-mode} |
Svpbmt_depends_Sv39 menvcfg_pbmte_op menvcfg_pbmte_fence |
Svpbmt_pte_bits |
leaf_PTE_pbmt_write_s |
Verify a store through a leaf PTE with PBMT = NC or IO succeeds from S-mode |
S-mode: menvcfg.PBMTE=1. Leaf PTE with PBMT = 1 (NC) and 2 (IO) and PTE.U=0, at every page-table level (4 KiB page and each superpage size of the Sv mode). Store (sw) to the page through va_data. |
No fault. |
leaf_PTE_pbmt_s_d x PBMTE_set x PageType_d x sw x mode {S-mode} |
Svpbmt_depends_Sv39 menvcfg_pbmte_op menvcfg_pbmte_fence |
Svpbmt_pte_bits |
leaf_PTE_pbmt_write_u |
Verify a store through a leaf PTE with PBMT = NC or IO succeeds from U-mode |
U-mode: menvcfg.PBMTE=1. Leaf PTE with PBMT = 1 (NC) and 2 (IO) and PTE.U=1, at every page-table level (4 KiB page and each superpage size of the Sv mode). Store (sw) to the page through va_data. |
No fault. |
leaf_PTE_pbmt_u_d x PBMTE_set x PageType_d x sw x mode {U-mode} |
Svpbmt_depends_Sv39 menvcfg_pbmte_op menvcfg_pbmte_fence |
Svpbmt_enc_tbl |
leaf_PTE_pbmt_reserved_enc_exec_s |
Verify PBMT = 3 in a leaf PTE raises an instruction page fault on an instruction fetch from S-mode |
S-mode: menvcfg.PBMTE=1. Leaf PTE with PBMT = 3 and PTE.U=0, at every page-table level (4 KiB page and each superpage size of the Sv mode). Jump (jalr) into the page through va_data. |
Instruction page fault (scause = 12); stval = faulting virtual address. |
leaf_PTE_pbmt_res_s_i x PBMTE_set x PageType_i x jalr x ins_page_fault x mode {S-mode} |
Svpbmt_leaf_pte_pbmt_reserved_3_fault menvcfg_pbmte_op menvcfg_pbmte_fence |
Svpbmt_leaf_pte_pbmt_reserved_3_fault |
leaf_PTE_pbmt_reserved_enc_exec_u |
Verify PBMT = 3 in a leaf PTE raises an instruction page fault on an instruction fetch from U-mode |
U-mode: menvcfg.PBMTE=1. Leaf PTE with PBMT = 3 and PTE.U=1, at every page-table level (4 KiB page and each superpage size of the Sv mode). Jump (jalr) into the page through va_data. |
Instruction page fault (scause = 12); stval = faulting virtual address. |
leaf_PTE_pbmt_res_u_i x PBMTE_set x PageType_i x jalr x ins_page_fault x mode {U-mode} |
Svpbmt_leaf_pte_pbmt_reserved_3_fault menvcfg_pbmte_op menvcfg_pbmte_fence |
Svpbmt_enc_tbl |
leaf_PTE_pbmt_reserved_enc_read_s |
Verify PBMT = 3 in a leaf PTE raises a load page fault on a load from S-mode |
S-mode: menvcfg.PBMTE=1. Leaf PTE with PBMT = 3 and PTE.U=0, at every page-table level (4 KiB page and each superpage size of the Sv mode). Load (lw) from the page through va_data. |
Load page fault (scause = 13); stval = faulting virtual address. |
leaf_PTE_pbmt_res_s_d x PBMTE_set x PageType_d x lw x load_page_fault x mode {S-mode} |
Svpbmt_leaf_pte_pbmt_reserved_3_fault menvcfg_pbmte_op menvcfg_pbmte_fence |
Svpbmt_enc_tbl |
leaf_PTE_pbmt_reserved_enc_read_u |
Verify PBMT = 3 in a leaf PTE raises a load page fault on a load from U-mode |
U-mode: menvcfg.PBMTE=1. Leaf PTE with PBMT = 3 and PTE.U=1, at every page-table level (4 KiB page and each superpage size of the Sv mode). Load (lw) from the page through va_data. |
Load page fault (scause = 13); stval = faulting virtual address. |
leaf_PTE_pbmt_res_u_d x PBMTE_set x PageType_d x lw x load_page_fault x mode {U-mode} |
Svpbmt_leaf_pte_pbmt_reserved_3_fault menvcfg_pbmte_op menvcfg_pbmte_fence |
Svpbmt_leaf_pte_pbmt_reserved_3_fault |
leaf_PTE_pbmt_reserved_enc_write_s |
Verify PBMT = 3 in a leaf PTE raises a store/AMO page fault on a store from S-mode |
S-mode: menvcfg.PBMTE=1. Leaf PTE with PBMT = 3 and PTE.U=0, at every page-table level (4 KiB page and each superpage size of the Sv mode). Store (sw) to the page through va_data. |
Store/AMO page fault (scause = 15); stval = faulting virtual address. |
leaf_PTE_pbmt_res_s_d x PBMTE_set x PageType_d x sw x store_page_fault x mode {S-mode} |
Svpbmt_leaf_pte_pbmt_reserved_3_fault menvcfg_pbmte_op menvcfg_pbmte_fence |
Svpbmt_leaf_pte_pbmt_reserved_3_fault |
leaf_PTE_pbmt_reserved_enc_write_u |
Verify PBMT = 3 in a leaf PTE raises a store/AMO page fault on a store from U-mode |
U-mode: menvcfg.PBMTE=1. Leaf PTE with PBMT = 3 and PTE.U=1, at every page-table level (4 KiB page and each superpage size of the Sv mode). Store (sw) to the page through va_data. |
Store/AMO page fault (scause = 15); stval = faulting virtual address. |
leaf_PTE_pbmt_res_u_d x PBMTE_set x PageType_d x sw x store_page_fault x mode {U-mode} |
Svpbmt_leaf_pte_pbmt_reserved_3_fault menvcfg_pbmte_op menvcfg_pbmte_fence |
Svpbmt_leaf_pte_pbmt_reserved_3_fault |
Svpbmt_H Hypervisor Page-Based Memory Types
Checks henvcfg.PBMTE in the VS-stage and menvcfg.PBMTE in the G-stage.
Svpbmt_H uses the Sv_H test environment (see Sv_H). Svpbmt exists only on RV64. henvcfg.PBMTE enables PBMT in the VS-stage and menvcfg.PBMTE in the G-stage. The test page is flushed (fence, and cbo.flush with Zicbom) between accesses with different attributes.
| Coverpoint | Goal | Feature Description | Expectation | Bins | Normative Rule |
|---|---|---|---|---|---|
cp_vsatp_pbmt |
henvcfg.PBMTE gates Svpbmt in the VS-stage |
In VS-mode with hgatp = Bare and menvcfg.PBMTE = 1, store, load and fetch through a VS-stage leaf with PBMT = 1 (NC), 2 (IO) and 3 (reserved), with henvcfg.PBMTE = 0 and 1. |
With henvcfg.PBMTE = 0, the PBMT bits are reserved and every access raises a page fault. With henvcfg.PBMTE = 1, the PBMT = 1 and 2 accesses complete (the attributes themselves are not observable) and PBMT = 3 raises a page fault. |
VS x {sw, lw, jalr} x vsatp_mode x hgatp Bare x {henvcfg.PBMTE 0 with page fault, henvcfg.PBMTE 1 with {no trap, page fault}} |
henvcfg_pbmte_op |
cp_hgatp_pbmt |
menvcfg.PBMTE gates Svpbmt in the G-stage |
In VS-mode with vsatp = Bare, store, load and fetch through a G-stage leaf with PBMT = 1, 2 and 3, with menvcfg.PBMTE = 0 and 1. |
With menvcfg.PBMTE = 0, the PBMT bits are reserved and every access raises a guest-page fault. With menvcfg.PBMTE = 1, the PBMT = 1 and 2 accesses complete and PBMT = 3 raises a guest-page fault. |
VS x {sw, lw, jalr} x vsatp Bare x hgatp_mode x {menvcfg.PBMTE 0 with guest-page fault, menvcfg.PBMTE 1 with {no trap, guest-page fault}} |
menvcfg_pbmte_op |
cp_henvcfg_menvcfg |
henvcfg.PBMTE is read-only zero while menvcfg.PBMTE = 0 |
In HS-mode with menvcfg.PBMTE = 0, then 1, set henvcfg.PBMTE and read it back. |
henvcfg.PBMTE reads as zero while menvcfg.PBMTE = 0, and reads back as written while menvcfg.PBMTE = 1. |
HS x csrrs henvcfg x menvcfg.PBMTE {0, 1} |
menvcfg_adue_henvcfg_adue_rdonly0 |
| Normative Rule | Rule Text | Coverpoints |
|---|---|---|
Svpbmt_pte_bits |
Svpbmt_cg/{leaf_PTE_pbmt_exec_s, leaf_PTE_pbmt_read_s, leaf_PTE_pbmt_write_s, leaf_PTE_pbmt_read_u} |
|
Svpbmt_depends_Sv39 |
Not tested: extension dependency checked by the UDB configuration |
|
Svpbmt_enc_tbl |
Svpbmt_cg/{leaf_PTE_pbmt_read_s, leaf_PTE_pbmt_write_u, leaf_PTE_pbmt_reserved_enc_read_s, leaf_PTE_pbmt_reserved_enc_exec_u} |
|
Svpbmt_nonleaf_pte_pbmt_must_be_zero |
Svpbmt_cg/{nonleaf_PTE_pbmt_exec_s, nonleaf_PTE_pbmt_read_s, nonleaf_PTE_pbmt_write_s, nonleaf_PTE_pbmt_read_u} |
|
Svpbmt_leaf_pte_pbmt_reserved_3_fault |
Svpbmt_cg/{leaf_PTE_pbmt_reserved_enc_exec_s, leaf_PTE_pbmt_reserved_enc_read_s, leaf_PTE_pbmt_reserved_enc_write_s, leaf_PTE_pbmt_reserved_enc_read_u} |
|
menvcfg_pbmte_op |
Svpbmt_cg/PBMTE_set, Sv_add_feature_cg/cp_svpbmt_{read,write,exec}_fault |
|
menvcfg_pbmte_fence |
Svpbmt_cg/PBMTE_set |
|
menvcfg_pbmte_rdonly0 |
Sm_mcsr_cg/cp_mcsrwalk_masked/menvcfg |
|
Svpbmt_impl_may_override_pmas |
Implementations may override additional PMAs not explicitly listed in norm:Svpbmt_enc_tbl. |
Not tested: implementation-defined PMA overrides |
Svpbmt_obeys_mem_ordering, Svpbmt_io_pma_nc_pbmt_obey_rvwmo, Svpbmt_io_pma_nc_pbmt_treated_as_io_and_memory, Svpbmt_memory_pma_io_pbmt_strong_io_ordering, Svpbmt_memory_pma_io_pbmt_treated_as_io_and_memory, Svpbmt_aliasing_attribute, Svpbmt_noncacheable_aliasing_no_coherence_loss, Svpbmt_noncacheable_aliasing_may_weaken_ordering, Svpbmt_noncacheable_aliasing_fence_prevents_ordering_loss, Svpbmt_cacheable_aliasing_may_cause_coherence_loss, Svpbmt_cacheable_aliasing_fence_flush_fence_required |
Svpbmt_obeys_mem_ordering: memory accesses to such pages obey the memory ordering rules of the final effective attribute, Svpbmt_io_pma_nc_pbmt_obey_rvwmo: If the underlying physical memory attribute for a page is I/O, and the page has PBMT=NC, then accesses to that page obey RVWMO. Svpbmt_io_pma_nc_pbmt_treated_as_io_and_memory: accesses to such pages are considered to be both I/O and main memory accesses for the purposes of FENCE, .aq, and .rl. Svpbmt_memory_pma_io_pbmt_strong_io_ordering: accesses to that page obey strong channel 0 I/O ordering rules. Svpbmt_memory_pma_io_pbmt_treated_as_io_and_memory: accesses to such pages are considered to be both I/O and main memory accesses for the purposes of FENCE, .aq, and .rl. Svpbmt_aliasing_attribute: When Svpbmt is used with non-zero PBMT encodings, it is possible for multiple virtual aliases of the same physical page to exist simultaneously with different memory attributes. It is also possible for a U-mode or S-mode mapping through a PTE with Svpbmt enabled to observe different memory attributes for a given region of physical memory than a concurrent access to the same page performed by M-mode or when MODE=Bare. In such cases, the behaviors dictated by the attributes (including coherence, which is otherwise unaffected) may be violated. Svpbmt_noncacheable_aliasing_no_coherence_loss: Accessing the same location using different attributes that are both non-cacheable (e.g., NC and IO) does not cause loss of coherence, Svpbmt_noncacheable_aliasing_may_weaken_ordering: might result in weaker memory ordering than the stricter attribute ordinarily guarantees. Svpbmt_noncacheable_aliasing_fence_prevents_ordering_loss: fence iorw, iorw instruction between such accesses suffices to prevent loss of memory ordering. Svpbmt_cacheable_aliasing_may_cause_coherence_loss: may cause loss of coherence. Svpbmt_cacheable_aliasing_fence_flush_fence_required: prevents both loss of coherence and loss of memory ordering: |
Not tested: memory ordering, cacheability and coherence are not observable in single-hart signature tests |
Svpbmt_hgatp_stage_override_rule, Svpbmt_vsatp_stage_override_rule |
Svpbmt_hgatp_stage_override_rule: if hgatp.MODE is not equal to zero, non-zero G-stage PTE PBMT bits override the attributes in the PMA to produce an intermediate set of attributes. Svpbmt_vsatp_stage_override_rule: if vsatp.MODE is not equal to zero, non-zero VS-stage PTE PBMT bits override the intermediate attributes to produce the final set of attributes used by accesses to the page in question. |
Svpbmt_H_cg/{cp_vsatp_pbmt,cp_hgatp_pbmt} |
menvcfg_pbmte_henvcfg_pbmte_rdonly0 |
Svpbmt_H_cg/cp_henvcfg_menvcfg |
UDB Parameters: None.
B.7.7. Svnapot Naturally-Aligned Power-of-Two Page Sizes
| Coverpoint | Goal | Feature Description | Expectation | Bins | ID | Normative Rule | Pass/Fail Criteria | Notes |
|---|---|---|---|---|---|---|---|---|
General Test Environment (Svnapot): |
||||||||
Svnapot_legal_enc_exec_s |
Verify an instruction fetch through a 64 KiB NAPOT mapping succeeds from S-mode |
S-mode: sixteen level-0 PTEs with N=1, PPN[3:0]=1000 and PTE.U=0 map a naturally aligned 64 KiB region. Jump (jalr) into the page at offsets 0, 0x2000 and 0xF000 of va_data. |
No fault; each access reaches the matching 4 KiB page of the 64 KiB region. |
PTE_RWX_s_i x PTE_Svnapot_i x PTE_N_i x kilopage_i x mode x exec_acc x mode {S-mode} |
Svnapot_depends_Sv39 Svnapot_pte_n Svnapot_range_napot Svnapot_valid_encoding_ppn_subst |
Svnapot_pte_n |
||
Svnapot_legal_enc_exec_u |
Verify an instruction fetch through a 64 KiB NAPOT mapping succeeds from U-mode |
U-mode: sixteen level-0 PTEs with N=1, PPN[3:0]=1000 and PTE.U=1 map a naturally aligned 64 KiB region. Jump (jalr) into the page at offsets 0, 0x2000 and 0xF000 of va_data. |
No fault; each access reaches the matching 4 KiB page of the 64 KiB region. |
PTE_RWX_u_i x PTE_Svnapot_i x PTE_N_i x kilopage_i x mode x exec_acc x mode {U-mode} |
Svnapot_depends_Sv39 Svnapot_pte_n Svnapot_range_napot Svnapot_valid_encoding_ppn_subst |
Svnapot_pte_n |
||
Svnapot_legal_enc_read_s |
Verify a load through a 64 KiB NAPOT mapping succeeds from S-mode |
S-mode: sixteen level-0 PTEs with N=1, PPN[3:0]=1000 and PTE.U=0 map a naturally aligned 64 KiB region. Load (lw) from the page at offsets 0, 0x2000 and 0xF000 of va_data. |
No fault; each access reaches the matching 4 KiB page of the 64 KiB region. |
PTE_RWX_s_d x PTE_Svnapot_d x PTE_N_d x kilopage_d x mode x read_acc x mode {S-mode} |
||||
Svnapot_legal_enc_read_u |
Verify a load through a 64 KiB NAPOT mapping succeeds from U-mode |
U-mode: sixteen level-0 PTEs with N=1, PPN[3:0]=1000 and PTE.U=1 map a naturally aligned 64 KiB region. Load (lw) from the page at offsets 0, 0x2000 and 0xF000 of va_data. |
No fault; each access reaches the matching 4 KiB page of the 64 KiB region. |
PTE_RWX_u_d x PTE_Svnapot_d x PTE_N_d x kilopage_d x mode x read_acc x mode {U-mode} |
Svnapot_enc_tbl |
|||
Svnapot_legal_enc_write_s |
Verify a store through a 64 KiB NAPOT mapping succeeds from S-mode |
S-mode: sixteen level-0 PTEs with N=1, PPN[3:0]=1000 and PTE.U=0 map a naturally aligned 64 KiB region. Store (sw) to the page at offsets 0, 0x2000 and 0xF000 of va_data. |
No fault; each access reaches the matching 4 KiB page of the 64 KiB region. |
PTE_RWX_s_d x PTE_Svnapot_d x PTE_N_d x kilopage_d x mode x write_acc x mode {S-mode} |
||||
Svnapot_legal_enc_write_u |
Verify a store through a 64 KiB NAPOT mapping succeeds from U-mode |
U-mode: sixteen level-0 PTEs with N=1, PPN[3:0]=1000 and PTE.U=1 map a naturally aligned 64 KiB region. Store (sw) to the page at offsets 0, 0x2000 and 0xF000 of va_data. |
No fault; each access reaches the matching 4 KiB page of the 64 KiB region. |
PTE_RWX_u_d x PTE_Svnapot_d x PTE_N_d x kilopage_d x mode x write_acc x mode {U-mode} |
||||
Svnapot_reserved_enc_exec_s |
Verify a reserved NAPOT PPN encoding raises an instruction page fault on an instruction fetch from S-mode |
S-mode: level-0 PTE with N=1, PTE.U=0 and PPN[3:0] = 0001, 0010, 0100 or 0000. Jump (jalr) into the page through va_data. |
Instruction page fault (scause = 12); stval = faulting virtual address. |
PTE_RWX_s_i x PTE_Svnapot_reserved_enc_i x PTE_N_i x kilopage_i x mode x exec_acc x ins_page_fault x mode {S-mode} |
Svnapot_reserved_encoding_fault |
Svnapot_reserved_encoding_fault |
||
Svnapot_reserved_enc_exec_u |
Verify a reserved NAPOT PPN encoding raises an instruction page fault on an instruction fetch from U-mode |
U-mode: level-0 PTE with N=1, PTE.U=1 and PPN[3:0] = 0001, 0010, 0100 or 0000. Jump (jalr) into the page through va_data. |
Instruction page fault (scause = 12); stval = faulting virtual address. |
PTE_RWX_u_i x PTE_Svnapot_reserved_enc_i x PTE_N_i x kilopage_i x mode x exec_acc x ins_page_fault x mode {U-mode} |
Svnapot_reserved_encoding_fault |
Svnapot_reserved_encoding_fault |
||
Svnapot_reserved_enc_read_s |
Verify a reserved NAPOT PPN encoding raises a load page fault on a load from S-mode |
S-mode: level-0 PTE with N=1, PTE.U=0 and PPN[3:0] = 0001, 0010, 0100 or 0000. Load (lw) from the page through va_data. |
Load page fault (scause = 13); stval = faulting virtual address. |
PTE_RWX_s_d x PTE_Svnapot_reserved_enc_d x PTE_N_d x kilopage_d x mode x read_acc x load_page_fault x mode {S-mode} |
||||
Svnapot_reserved_enc_read_u |
Verify a reserved NAPOT PPN encoding raises a load page fault on a load from U-mode |
U-mode: level-0 PTE with N=1, PTE.U=1 and PPN[3:0] = 0001, 0010, 0100 or 0000. Load (lw) from the page through va_data. |
Load page fault (scause = 13); stval = faulting virtual address. |
PTE_RWX_u_d x PTE_Svnapot_reserved_enc_d x PTE_N_d x kilopage_d x mode x read_acc x load_page_fault x mode {U-mode} |
||||
Svnapot_reserved_enc_write_s |
Verify a reserved NAPOT PPN encoding raises a store/AMO page fault on a store from S-mode |
S-mode: level-0 PTE with N=1, PTE.U=0 and PPN[3:0] = 0001, 0010, 0100 or 0000. Store (sw) to the page through va_data. |
Store/AMO page fault (scause = 15); stval = faulting virtual address. |
PTE_RWX_s_d x PTE_Svnapot_reserved_enc_d x PTE_N_d x kilopage_d x mode x write_acc x store_page_fault x mode {S-mode} |
Svnapot_enc_tbl |
|||
Svnapot_reserved_enc_write_u |
Verify a reserved NAPOT PPN encoding raises a store/AMO page fault on a store from U-mode |
U-mode: level-0 PTE with N=1, PTE.U=1 and PPN[3:0] = 0001, 0010, 0100 or 0000. Store (sw) to the page through va_data. |
Store/AMO page fault (scause = 15); stval = faulting virtual address. |
PTE_RWX_u_d x PTE_Svnapot_reserved_enc_d x PTE_N_d x kilopage_d x mode x write_acc x store_page_fault x mode {U-mode} |
||||
Svnapot_reserved_ppni_exec_s |
Verify PTE.N on a superpage raises an instruction page fault on an instruction fetch from S-mode |
S-mode: superpage leaf PTE (level 1 and above) with N=1 and PTE.U=0. Jump (jalr) into the page through va_data. |
Instruction page fault (scause = 12); stval = faulting virtual address. |
PTE_RWX_s_i x PTE_N_i x PageType_i x exec_acc x ins_page_fault x mode {S-mode} |
||||
Svnapot_reserved_ppni_exec_u |
Verify PTE.N on a superpage raises an instruction page fault on an instruction fetch from U-mode |
U-mode: superpage leaf PTE (level 1 and above) with N=1 and PTE.U=1. Jump (jalr) into the page through va_data. |
Instruction page fault (scause = 12); stval = faulting virtual address. |
PTE_RWX_u_i x PTE_N_i x PageType_i x exec_acc x ins_page_fault x mode {U-mode} |
||||
Svnapot_reserved_ppni_read_s |
Verify PTE.N on a superpage raises a load page fault on a load from S-mode |
S-mode: superpage leaf PTE (level 1 and above) with N=1 and PTE.U=0. Load (lw) from the page through va_data. |
Load page fault (scause = 13); stval = faulting virtual address. |
PTE_RWX_s_d x PTE_N_d x PageType_d x read_acc x load_page_fault x mode {S-mode} |
Svnapot_enc_tbl |
|||
Svnapot_reserved_ppni_read_u |
Verify PTE.N on a superpage raises a load page fault on a load from U-mode |
U-mode: superpage leaf PTE (level 1 and above) with N=1 and PTE.U=1. Load (lw) from the page through va_data. |
Load page fault (scause = 13); stval = faulting virtual address. |
PTE_RWX_u_d x PTE_N_d x PageType_d x read_acc x load_page_fault x mode {U-mode} |
||||
Svnapot_reserved_ppni_write_s |
Verify PTE.N on a superpage raises a store/AMO page fault on a store from S-mode |
S-mode: superpage leaf PTE (level 1 and above) with N=1 and PTE.U=0. Store (sw) to the page through va_data. |
Store/AMO page fault (scause = 15); stval = faulting virtual address. |
PTE_RWX_s_d x PTE_N_d x PageType_d x write_acc x store_page_fault x mode {S-mode} |
||||
Svnapot_reserved_ppni_write_u |
Verify PTE.N on a superpage raises a store/AMO page fault on a store from U-mode |
U-mode: superpage leaf PTE (level 1 and above) with N=1 and PTE.U=1. Store (sw) to the page through va_data. |
Store/AMO page fault (scause = 15); stval = faulting virtual address. |
PTE_RWX_u_d x PTE_N_d x PageType_d x write_acc x store_page_fault x mode {U-mode} |
||||
Svnapot_reserved_ppni_napot_enc_exec_s |
Set up a superpage leaf PTE (level i >= 1) with N=1 and the 64 KiB encoding pte.ppn[0][3:0] = 1000, at each superpage level. |
Svnapot_reserved_encoding_fault |
Store/AMO, load, and instruction page faults |
feature: Reserved Encoding |
||||
Svnapot_H Hypervisor NAPOT Pages
Checks 64 KiB NAPOT mappings in the VS-stage, the G-stage and both stages.
Svnapot_H uses the Sv_H test environment (see Sv_H). The tests run on RV64 with Sv39 and Sv39x4.
| Coverpoint | Goal | Feature Description | Expectation | Bins | Normative Rule |
|---|---|---|---|---|---|
cp_vsatp_napot |
Svnapot in the VS-stage |
In VS-mode and VU-mode with hgatp = Bare, store, load and fetch in pages 0, 2 and 15 of a 64 KiB NAPOT mapping (16 kilopage leaves with N = 1 and PPN[3:0] = 1000) to a 64 KiB region whose pages hold distinct words. |
Each NAPOT access reaches the page of the region with the same page number. The reserved encodings raise page faults. |
{VS, VU} x {sw, lw, jalr} x vsatp paged x hgatp Bare x NAPOT page {0, 2, 15} |
|
cp_hgatp_napot |
Svnapot in the G-stage |
As cp_vsatp_napot, with the NAPOT leaves (and, in VS-mode, the reserved N encodings) in the G-stage and vsatp = Bare. |
Each NAPOT access reaches the page of the region with the same page number. The reserved encodings raise guest-page faults. |
{VS, VU} x {sw, lw, jalr} x vsatp Bare x hgatp paged x NAPOT page {0, 2, 15} |
Svnapot_hyp_gstage |
cp_twostage_napot |
Svnapot in both stages |
As cp_vsatp_napot, with a 64 KiB NAPOT mapping in the VS-stage to a guest physical NAPOT region that a G-stage NAPOT mapping maps to the physical region. |
Each access reaches the page of the region with the same page number. |
{VS, VU} x {sw, lw, jalr} x vsatp paged x hgatp paged x NAPOT page {0, 2, 15} |
Svnapot_hyp_gstage |
| Normative Rule | Rule Text | Coverpoints |
|---|---|---|
Svnapot_depends_Sv39 |
Not tested: extension dependency checked by the UDB configuration |
|
Svnapot_pte_n |
Svnapot_cg/Svnapot_legal_enc_exec_{s, u} |
|
Svnapot_range_napot |
Svnapot_cg/Svnapot_legal_enc_exec_{s, u} |
|
Svnapot_enc_tbl |
Svnapot_cg/{Svnapot_legal_enc_exec_s, Svnapot_legal_enc_read_u, Svnapot_reserved_enc_write_s, Svnapot_reserved_ppni_read_s} |
|
Svnapot_valid_encoding_ppn_subst |
Svnapot_cg/Svnapot_legal_enc_exec_{s, u} |
|
Svnapot_reserved_encoding_fault |
reserved according to norm:Svnapot_enc_tbl, then a page-fault exception must be raised |
Svnapot_cg/Svnapot_reserved_enc_exec_{s, u}, Svnapot_cg/Svnapot_reserved_ppni_napot_enc_exec_{s, u} |
Svnapot_cache_entries |
Not tested: address-translation cache contents are not observable in signature tests |
|
Svnapot_hyp_gstage |
Svnapot_H_cg/{cp_hgatp_napot,cp_twostage_napot} |
UDB Parameters: None.
B.7.8. Svvptc Obviating Memory-Management Instructions after Marking PTEs Valid
Svvptc requires a store that changes a PTE from invalid to valid to reach later implicit accesses within a bounded time, without SFENCE.VMA.
The bound is implementation-defined, so each test provokes a page fault on the invalid PTE, stores the valid PTE, waits a fixed number of instructions, and checks that the retried access succeeds.
| Coverpoint | Goal | Feature Description | Expectation | Bins | Normative Rule |
|---|---|---|---|---|---|
General Test Environment (Svvptc): |
|||||
cp_load |
Verify a load reaches a page after a plain store sets V in a PTE, without SFENCE.VMA (Svvptc) |
S-mode and U-mode (PTE.U=1 on the leaf for U-mode): set the leaf or non-leaf PTE under test to V=0 and run SFENCE.VMA. Load (lw) from va_data, which takes a load page fault. Store the PTE with V=1, wait, and load from va_data again. |
First load: load page fault (scause = 13). Retried load: no fault; returns the word in the page. |
load_page_fault x satp_mode x priv_mode_s_u |
Svvptc_explicit_stores_update_valid_bit |
cp_store |
Verify a store reaches a page after a plain store sets V in a PTE, without SFENCE.VMA (Svvptc) |
S-mode and U-mode (PTE.U=1 on the leaf for U-mode): set the leaf or non-leaf PTE under test to V=0 and run SFENCE.VMA. Store (sw) to va_data, which takes a store/AMO page fault. Store the PTE with V=1, wait, store to va_data again and load the word back. |
First store: store/AMO page fault (scause = 15). Retried store: no fault; the load returns the stored value. |
store_page_fault x satp_mode x priv_mode_s_u |
Svvptc_explicit_stores_update_valid_bit |
cp_fetch |
Verify an instruction fetch reaches a page after a plain store sets V in a PTE, without SFENCE.VMA (Svvptc) |
S-mode and U-mode (PTE.U=1 on the leaf for U-mode): set the leaf or non-leaf PTE under test to V=0 and run SFENCE.VMA. Jump (jalr) to va_data, which takes an instruction page fault; the handler returns to ra. Store the PTE with V=1, wait, and jump to va_data again. The code there writes a4 and returns. |
First jump: instruction page fault (scause = 12). Retried jump: no fault; the code in the page runs and writes the result register. |
fetch_page_fault x satp_mode x priv_mode_s_u |
Svvptc_explicit_stores_update_valid_bit |
| Normative Rule | Rule Text | Coverpoints |
|---|---|---|
Svvptc_explicit_stores_update_valid_bit |
Svvptc_cg/cp_{load, store, fetch} |
UDB Parameters: None.
B.7.9. Svukte User Kernel Translation Enable
| Coverpoint | Goal | Feature Description | Expectation | Bins |
|---|---|---|---|---|
General Test Environment (Svukte): |
||||
cp_svukte_qualified_exec_fault |
Test qualified accesses from U-mode (instruction fetch) |
While in U-mode, with senvcfg.UKTE=1 and any non-bare address translation mode (satp={SV39, SV48, SV57}) an access with vaddr >= (XLEN-1)^2 is Svukte-qualified. |
Accesses should all cause the corresponding fault based on their access type |
3 non-bare SATP modes (each) |
cp_svukte_qualified_read_fault |
Test qualified accesses from U-mode (load) |
While in U-mode, with senvcfg.UKTE=1 and any non-bare address translation mode (satp={SV39, SV48, SV57}) an access with vaddr >= (XLEN-1)^2 is Svukte-qualified. |
Accesses should all cause the corresponding fault based on their access type |
3 non-bare SATP modes (each) |
cp_svukte_qualified_write_fault |
Test qualified accesses from U-mode (store) |
While in U-mode, with senvcfg.UKTE=1 and any non-bare address translation mode (satp={SV39, SV48, SV57}) an access with vaddr >= (XLEN-1)^2 is Svukte-qualified. |
Accesses should all cause the corresponding fault based on their access type |
3 non-bare SATP modes (each) |
cp_svukte_qualified_mprv_read_fault |
Test accesses with effective U-mode from M-mode (load) |
If MPRV=1 and MPP=U, accesses will have effective U-mode. |
3 non-bare SATP modes (each) |
|
cp_svukte_qualified_mprv_write_fault |
Test accesses with effective U-mode from M-mode (store) |
If MPRV=1 and MPP=U, accesses will have effective U-mode. |
3 non-bare SATP modes (each) |
|
cp_svukte_qualified_vu_exec_fault |
Test accesses from VU-mode (instruction fetch) |
While in VU-mode, with senvcfg.UKTE=1 and any non-bare address translation mode (satp={SV39, SV48, SV57}) an access with vaddr >= (XLEN-1)^2 is Svukte-qualified. |
3 non-bare VSATP modes (each) |
|
cp_svukte_qualified_vu_read_fault |
Test accesses from VU-mode (load) |
While in VU-mode, with senvcfg.UKTE=1 and any non-bare address translation mode (satp={SV39, SV48, SV57}) an access with vaddr >= (XLEN-1)^2 is Svukte-qualified. |
3 non-bare VSATP modes (each) |
|
cp_svukte_qualified_vu_write_fault |
Test accesses from VU-mode (store) |
While in VU-mode, with senvcfg.UKTE=1 and any non-bare address translation mode (satp={SV39, SV48, SV57}) an access with vaddr >= (XLEN-1)^2 is Svukte-qualified. |
3 non-bare VSATP modes (each) |
|
cp_svukte_qualified_hs_read_fault |
Test accesses with effective VU-mode from HS-mode (load) |
While in effective VU-mode, with senvcfg.UKTE=1 and any non-bare address translation mode (satp={SV39, SV48, SV57}) an access with vaddr >= (XLEN-1)^2 is Svukte-qualified. |
3 non-bare VSATP modes (each) |
|
cp_svukte_qualified_hs_write_fault |
Test accesses with effective VU-mode from HS-mode (store) |
While in effective VU-mode, with senvcfg.UKTE=1 and any non-bare address translation mode (satp={SV39, SV48, SV57}) an access with vaddr >= (XLEN-1)^2 is Svukte-qualified. |
3 non-bare VSATP modes (each) |
|
cp_svukte_qualified_hukte_read_fault |
Test accesses virtual accesses from U-mode (load) |
When an hlv, hlvx or hsv instruction is executed in U-mode (which is allowed if hstatus.HU=1), the access should be Svukte-qualified as if senvcfg.UKTE was set to the value of hstatus.HUKTE. |
If hstatus.HUKTE=1, accesses should fail |
3 non-bare VSATP modes (each) * 2 HUKTE values |
cp_svukte_qualified_hukte_write_fault |
Test accesses virtual accesses from U-mode (store) |
When an hlv, hlvx or hsv instruction is executed in U-mode (which is allowed if hstatus.HU=1), the access should be Svukte-qualified as if senvcfg.UKTE was set to the value of hstatus.HUKTE. |
If hstatus.HUKTE=1, accesses should fail |
3 non-bare VSATP modes (each) * 2 HUKTE values |
cp_svukte_unqualified_access |
Test non-Svukte-qualified accesses |
Accesses that do not have effective U-mode, are using Bare address translation, or the other qualifying criteria are not Svukte-qualified |
Non-qualified accesses should succeed |
|
B.8. H Hypervisor
The Hypervisor Extension adds an H coverage file containing new Hypervisor instructions, and additional coverage files related to exceptions, interrupts, endian, and virtual memory.
B.8.1. H Hypervisor CSRs and Instructions
H boots to HS-mode and tests the hypervisor CSRs and instructions in HS, VS, U and VU modes: CSR access and walks, the VS CSR replicas, the hypervisor load/store, fence and trap instructions, and the virtual-instruction exceptions. The M-mode tests, and the mstatus.TVM tests whose traps are taken in M-mode, are the Sm suite’s Sm_H group.
The H suite also contains the H_F, H_V, and H_VF tests. They repeat the S_F, S_V, and S_VF tests from VS-mode and VU-mode, and cross vsstatus.FS and vsstatus.VS with the HS-level sstatus.FS and sstatus.VS. They run when F, Zve32x, or Zve32f is also supported.
Definitions: Machine H-Extension CSRs: mtval2, mtinst HS H-Extension CSRs: hstatus, hedeleg, hideleg, hie, hcounteren, hgeie, henvcfg, htval, hip, hvip, htinst, hgatp, hgeip (+ htimedelta for Zicntr) (+ hedelegh, htimedeltah, henvcfgh for RV32) VS H-Extension CSRs: vsstatus, vsie, vstval, vsip, vstvec, vsscratch, vsepc, vscause, vsatp (+ vstimecmp for SSTC, vstimecmph with RV32) High-half H-extension CSRs (RV32 only; illegal on RV64): hedelegh, htimedeltah, henvcfgh, vstimecmph S CSRs with VS replicas: sstatus, sie, stvec, sscratch, sepc, scause, stval, sip, satp S CSRs without VS replicas: scounteren, senvcfg, scountinhibit The suite boots to HS-mode, and the HS-mode handler takes traps from U, VS and VU (hedeleg = 0). Tests that run in M-mode or need mstatus.TVM = 1 are in the Sm suite’s Sm_H group. Each trap record holds xstatus[17:0] with hstatus.GVA/SPV/SPVP (mstatus.GVA/MPV in M-mode), and, for an M-mode or HS-mode exception, mtval2/htval and mtinst/htinst.
| Coverpoint | Goal | Feature Description | Expectation | Bins | Normative Rule | Status | Notes |
|---|---|---|---|---|---|---|---|
Tests executed in HS-mode (H_hscsr_cg) |
|||||||
cp_hcsr_access |
All H-extension CSRs are able to read, write, set, and clear |
Write all 1s and all 0s, then set all bits, then clear all bits, then read each {HS/VS} H-Extension CSR. |
All registers are accessible, and checked fields read back as written. Writes to hgeip raise illegal instruction. |
5 * (14-17 + 9-11) |
hedeleg_sz_acc |
||
cp_hcsrwalk |
Exercise each bit of H-extension CSRs |
Set and clear each bit of each {HS/VS} H-Extension CSR that holds more than zero. hstatus is walked over GVA, SPV, SPVP, HU, VTVM, VTW and VTSR, and henvcfg over FIOM, LPE, SSE, CBIE, CBCFE, CBZE, PMM, ADUE, PBMTE and STCE (cp_hcsrwalk_masked); hstatus.VGEIN is in cp_hstatus_vgein, and VSXL and UXL are out of scope. vsstatus is walked with the sstatus fields that S checks. The CSRs of cp_hcsr_access_zero are not walked, and hgatp and vsatp are walked by cp_atpwalk1/0. vsepc and vstval are not walked, because an invalid address may legally be converted; cp_vsepc_vaddr_* and cp_vstval_vaddr_* write them with valid addresses. |
All registers are accessible. Some fields are WARL and will not change. |
64 * 2 * (13-16 + 8-10) |
hedeleg_sz_acc |
||
cp_atpwalk1 |
hgatp and vsatp hold each PPN, VMID and ASID bit |
With MODE = Sv39x4/Sv39 (RV64) or Sv32x4/Sv32 (RV32), write hgatp and vsatp with a walking 1 and a walking 0 through every non-MODE bit. MODE = Bare with nonzero fields is UNSPECIFIED and unsupported MODEs are legalized in an implementation-defined way, so MODE is held at a paged mode. |
Each bit reads back as written, except PPN bits at and above the physical address width, which are not checked, VMID and ASID bits above VMIDLEN and ASIDLEN, and hgatp.PPN[1:0], which may be read-only zero. |
2 CSRs * (60 (RV64) or 31 (RV32)) each |
hgatp_sz_acc_op |
||
cp_vsepc_vaddr_walk1 |
vsepc and vstval hold every valid address |
In HS-mode, csrrw vsepc and vstval with each canonical virtual address with a walking 1 (0s in the msbs) and a walking 0 (1s in the msbs) through bits 0 to VALEN-2 of the largest supported Sv mode, and with two physical addresses, the current pc and the scratch area. Only valid addresses are written, because an invalid address may legally be converted. |
Each value reads back as written (vsepc bit 0 reads 0, and bit 1 reads 0 unless 2-byte instruction alignment is allowed). |
walk1, walk0: 2 CSRs * (32 (Sv32), 38 (Sv39), 47 (Sv48) or 56 (Sv57)) each |
vsepc_sz_acc_op |
||
cp_vstval_zero |
vstval holds 0 and every ILEN-bit value |
In HS-mode, csrrw vstval with 0 and, when the illegal instruction encoding is reported in vstval (REPORT_ENCODING_IN_VSTVAL_ON_ILLEGAL_INSTRUCTION), with a walking 1 through bits 0 to 31 and with all 32 bits set, as cp_stval_zero, cp_stval_ilen_walk1 and cp_stval_ilen_ones in S. |
Each value reads back as written |
1 + 32 + 1 |
vstval_warl |
||
cp_replica |
In HS, writing to S/VS-mode CSRs doesn’t affect replica |
In HS-mode, write different random values into S-mode CSRs and their VS-mode replicas (satp and vsatp only when vsatp supports Sv39 (RV64) or Sv32 (RV32); satp always does), read both, write new random values, and read both back. |
Each CSR should have value written. |
9 |
vsstatus_sz_acc_op |
||
cp_hstatus_vgein |
VGEIN can hold values between 0 and GEILEN |
Write {0, 1, GEILEN-1, GEILEN} to hstatus.VGEIN; only 0 when GEILEN = 0. Larger values are WLRL, so they are not written. |
Each value reads back as written |
4 (1 with GEILEN = 0) |
hstatus_vgein_wlrl |
||
Tests executed in HS-mode (H_vscause_cg) |
|||||||
cp_vscause_write_exception |
vscause WLRL fields writable |
Write each exception code 0-31 with interrupt = 0 and each interrupt code 0-31 with interrupt = 1, and read back. |
Each value reads back as written |
32 exceptions + 32 interrupts (13 + 6 before Priv 1.12) |
vscause_sz_acc_op |
||
Tests executed in VS-mode (H_vscsr_cg) |
|||||||
cp_csr_insufficient_priv |
M-mode CSRs are inaccessible from VS-mode |
In VS-mode, attempt to read each CSR number in the M-mode ranges (0x300-0x3FF, 0x700-0x7FF except 0x7AA mscontext, 0xB00-0xBFF, 0xF00-0xFFF) with a nonzero rd, as S_scsr_cg/cp_csr_insufficient_priv in S-mode |
Illegal instruction fault, and rd is unchanged |
1023 CSRs |
hedelegh_sz_acc_op |
||
cp_csr_ro |
Read-only CSRs cannot be written from VS-mode |
In VS-mode, attempt to write all 1s to each CSR number from 0xC00 to 0xEFF, as S_scsr_cg/cp_csr_ro in S-mode |
Illegal instruction fault, and rd is unchanged |
768 CSRs |
|||
cp_hcsr_virtualinstructionfault |
HS and VS registers cause virtual instruction fault from VS-mode |
csrrw, csrrc, csrrs, csrr each {HS/VS} H-Extension CSR |
Virtual instruction fault, or illegal instruction for an access that HS-mode could not perform (a write to hgeip) |
5 * (14-17 + 9-11) |
H_vscsrs_acc_m_hs |
||
cp_illegalupper |
In RV64, h half of CSRs are illegal. |
RV64 ONLY: csrrw, csrrs, csrrc, csrr each h H-extension CSR |
Illegal instruction fault |
5 * 4 |
hedelegh_sz_acc_op |
"When XLEN>32, an attempt to access a high-half CSR always raises an illegal-instruction exception." |
|
cp_replica |
In VS, writing to S-mode CSRs affects replica instead |
In HS-mode, write different random values into S-mode CSRs and their VS-mode replicas. Switch to VS-mode and write and readback S CSRs. Switch back to HS-mode and read back both the S-mode CSRs and VS replicas. The return to HS-mode is a trap, which needs stvec and sscratch and rewrites sepc, scause and stval, so those S CSRs are left alone and only their replicas are checked. satp and vsatp stay Bare, because the test code is not mapped. |
VS replica should have changed but S CSR does not change. |
9 |
vsstatus_sz_acc_op |
||
cp_nonreplica |
In VS, accessing nonreplicated S-mode CSRs behaves normally |
csrrw, csrrc, csrrs, csrr each S CSR without VS replica (scounteren, senvcfg). scountinhibit is in cp_scountinhibit_vs. |
Normal access |
5 * 2 |
H_scsrs_nomatch |
||
cp_scountinhibit_vs |
In VS, scountinhibit access depends on menvcfg.CDE |
If Ssccfg is supported: csrrw, csrrc, csrrs, csrr scountinhibit in VS-mode with menvcfg.CDE = {0/1}. The test currently runs only CDE = 0 (the boot value), because Sail does not implement menvcfg.CDE. |
Illegal instruction fault if CDE = 0, virtual instruction fault if CDE = 1 |
5 * 2 CDE |
|||
Tests executed in VS-mode (H_vsstatus_cg) |
|||||||
cp_vsstatus_sd_write |
vsstatus.SD affected by vsstatus.FS/XS/VS |
In VS-mode, write sstatus (which accesses vsstatus) with the cross-product of SD, FS, XS and VS. |
vsstatus.SD = 1 if FS, XS or VS is nonzero |
2 * 4 * 4 * 4 |
vsstatus_sd_xs_op |
||
Tests executed in VU-mode (H_vucsr_cg) |
|||||||
cp_csr_insufficient_priv |
CSRs other than user CSRs are inaccessible from VU-mode |
In VU-mode, attempt to read each CSR number that is not a user CSR (0x100-0x3FF, 0x500-0x7FF except 0x7AA mscontext, which may be accessible from S-mode, 0x900-0xBFF, 0xD00-0xFFF) with a nonzero rd, as U_ucsr_cg/cp_csr_insufficient_priv in U-mode. U-mode accesses are covered by the U suite. |
Virtual instruction fault for an implemented supervisor, hypervisor or VS CSR whose access HS-mode could perform; otherwise illegal instruction fault. rd is unchanged |
3071 CSRs |
hedelegh_sz_acc_op |
||
cp_csr_ro |
User read-only CSRs cannot be written from VU-mode |
In VU-mode, attempt to write all 1s to each CSR number from 0xC00 to 0xCFF, as U_ucsr_cg/cp_csr_ro in U-mode |
Illegal instruction fault, and rd is unchanged |
256 CSRs |
|||
Instructions (H_inst_cg) |
|||||||
cp_hlv |
Basic load |
Set up non-identity G and VS-stage page tables (Sv39x4 and Sv39, or Sv32x4 and Sv32). With hstatus.HU = 1, in {HS, U}: Write a value with the sign bit of every access size set to scratch. hlv.b, hlv.bu, hlv.h, hlv.hu, hlv.w from scratch. For rv64, also test hlv.wu, hlv.d. Random source and destination registers. |
Read and sign/zero extend |
2 modes * 5 instr (7 on RV64) |
hlsv_mode |
||
cp_hlvx |
Basic load |
Set up non-identity G and VS-stage page tables. With hstatus.HU = 1, in {HS, U}: Write a value to scratch. hlvx.hu, hlvx.wu from scratch. Random source and destination registers. |
Read and sign/zero extend |
2 modes * 2 instr |
hlsv_mode |
||
cp_hsv |
Basic store |
Set up non-identity G and VS-stage page tables. With hstatus.HU = 1, in {HS, U}: hsv.b, hsv.h, hsv.w to scratch, and read scratch through its physical address. For rv64, also test hsv.d. Random source and destination registers. |
Stores the low bytes of the source register |
2 modes * 3 instr (4 on RV64) |
hlsv_mode |
||
cp_guest_page_fault |
hlv and hsv guest-page faults record htval and htinst |
In HS-mode with an empty G-stage root table, hlv.w and hsv.w with vsatp = Bare (a fault on the final translation) and with the VS-stage root table at an unmapped guest physical address (a fault on an implicit VS-stage access). |
Load or store guest-page fault into HS-mode. htval holds zero or the guest physical address >> 2. htinst holds zero or the transformed instruction on the final translation, and the pseudoinstruction on the implicit access when htval is nonzero. |
2 instr * 2 vsatp |
htval_sz_acc_op |
||
cp_mret_illegal |
mret unavailable below M mode |
Execute mret in {HS, VS, VU} modes. |
Illegal instruction |
3 modes |
xret_in_lower_mode |
||
cp_sret_illegal |
sret unavailable in VU mode |
Execute sret in VU mode. |
Virtual instruction |
1 mode |
H_virtinst_vu_sret_sfence |
||
cp_hfence |
Hypervisor fences execute only in HS-mode (and M-mode) |
With mstatus.TVM = 0 and hstatus.VTVM = 0, execute hfence.vvma and hfence.gvma (rs1 = rs2 = x0) in {HS, VS, VU, U} modes, as S_sprivinst_cg executes sfence.vma. Sm_H_tvm_cg/cp_hfence crosses them with M-mode, mstatus.TVM and hstatus.VTVM, and Sv_H_fence_cg checks that they remove stale VS-stage and G-stage translations. |
Executes in HS-mode; virtual instruction in VS-mode and VU-mode; illegal instruction in U-mode |
4 modes * 2 instr |
hfence-vvma_hfence-gvma_op |
||
cp_vtvm_sfence |
hstatus.VTVM traps VS-mode sfence.vma and satp accesses, but not hfence.vvma |
With hstatus.VTVM = {0, 1}, execute hfence.vvma in HS-mode, and sfence.vma, csrr satp and csrw satp (writing zero, so vsatp stays Bare) in VS-mode. sinval.vma is in Svinval, and mstatus.TVM, which needs M-mode, in Sm_H. |
With VTVM = 1, the VS-mode instructions raise virtual instruction; otherwise they execute. hfence.vvma executes with either VTVM. |
cp_vtvm_sfence: 2 VTVM |
hstatus_vtvm_op |
||
cp_sret_hs |
sret from HS mode |
Execute sret in HS-mode with cross-product of sstatus.SPP / SPIE / hstatus.SPV. After the sret, a read of mscratch traps to HS-mode, and the trap record shows the mode reached. Then check sstatus.SPP, SIE, SPIE and hstatus.SPV in HS-mode; the trap and the return to HS-mode rewrite them from the mode and SIE that the sret produced. |
Goes to appropriate mode |
2 SPP * 2 SPIE * 2 SPV |
sret_v0 |
||
cp_sret_vs |
sret from VS mode |
Execute sret in VS-mode with cross-product of sstatus.SPP / SPIE / hstatus.VTSR. After the sret, a read of mscratch traps and the trap record shows the mode reached. Then check sstatus.SPP, SIE, SPIE in VS-mode. |
Goes to appropriate mode, or virtual-instruction exception if VTSR=1. |
2 SPP * 2 SPIE * 2 VTSR |
sret_v1 |
||
H_F tests (H_F-NN.S): the floating-point CSRs and vsstatus.FS from VS-mode and VU-mode, run when F is also supported. |
|||||||
cp_fcsr_access |
Writing to the CSR field |
Write 0s and 1s to fcsr, frm, fflags cross with vsstatus.FS init/clean/dirty |
Zicsr_higher_priv |
||||
cp_vsstatus_FS_transition |
Writing to the CSR field |
Each different type of floating-point instruction crossed with four values of FS. Includes integer-result instructions that raise a flag after fflags is cleared (feq.s with a signaling NaN, fcvt.w.s of an inexact value, fcvt.wu.s of an out-of-range value, fcvtmod.w.d of a NaN). |
mstatus_fs_op |
||||
cp_vsstatus_FS_transition_nondeterministic |
Writing to the CSR field |
Floating-point instructions that need not modify floating-point state (fsw, fmv.x.w, fclass.s, csrr of the FP CSRs, fmvh.x.d) crossed with vsstatus.FS = Off and Dirty |
Illegal-instruction trap when FS = Off; FS stays Dirty when Dirty. Initial and Clean are omitted because these instructions may dirty FS imprecisely. |
mstatus_fs_imprecise |
|||
H_V tests (H_V_vcsr-NN.S, H_V_vset-NN.S, H_V_vl_walk-NN.S): the vector CSRs, vset{i}vl{i}, vstart and vsstatus.VS from VS-mode and VU-mode, run when Zve32x is also supported. |
|||||||
cp_vcsrrswc |
Confirm that all vector CSR properties are properly set with regards to read write, clear, and set privileges with the csr instructions |
With each of the vector CSRs conduct a read, write, clear, and set operation on the CSR |
Will abide by spec’s read and write permissions for each csr |
3 csr instructions * 7 CSRs |
Zicsr_higher_priv |
test written: yes |
|
cp_vcsrs_walking1s |
Confirm that that all writable vector CSRs have the correct bits writeable |
With each of the vector CSRs that are writable, write all XLEN 1-hot values to the csr |
csrs will be updated based on which bits they support to be writable |
4 CSRs * XLEN 1-hot values |
mstatus_vs_op |
test written: yes |
|
cp_vsstatus_vs_set_dirty_arithmetic |
Confirm that after running an arithmetic vector instruction that vsstatus.VS is set to dirty when set to "clean" or "initial" |
Run a .vv vector arithmetic instruction with vsstatus.VS = {clean, initial} |
vsstatus.VS is set to dirty |
2 vsstatus.VS bins |
mstatus_vs_sstatus_vs_op |
test written: yes |
|
cp_vsstatus_vs_set_dirty_csr |
Confirm that after running a vsetvli instruction that vsstatus.VS is set to dirty when set to "clean" or "initial" |
Run a vsetvli instruction with vsstatus.VS = {clean, initial} |
vsstatus.VS is set to dirty |
2 vsstatus.VS bins |
mstatus_vs_op |
test written: yes |
|
Analogous to the way in which the floating-point unit is handled, the vsstatus.VS field may exist even if misa.V is clear. |
feature (coverpoint written): Untestable |
||||||
cp_vsstatus_vs_off_arithmetic |
Confirm that when misa.V is 1 and vsstatus.VS is off, an arithmetic vector instruction raises an illegal instruction exception |
With misa.V = 1 (its reset value), set vsstatus.VS = {00} and run a .vv vector instruction |
illegal instruction exception |
1 |
mstatus_vs_sstatus_vs_op |
test written: yes, confirm sig |
|
cp_vsstatus_vs_off_csr |
Confirm that when misa.V is 1 and vsstatus.VS is off, an csr vector instruction raises an illegal instruction exception |
With misa.V = 1 (its reset value), set vsstatus.VS = {00} and run a vsetvli |
illegal instruction exception |
1 |
mstatus_fs_vs_xs_off_op |
test written: yes, confirm sig |
|
For implementations with a writable misa.V field, the vsstatus.VS field may exist even if misa.V is clear. |
feature (coverpoint written): Untestable |
||||||
Vset{i}vl{i} |
|||||||
cp_sew_lmul_vset_i_vli |
Confirm that all combinations of lmul crossed with sew correctly set the vtype register in accordance with the vill field |
Use all vset{i}vli instructions to cross eSEW={8/16/32/64} with mLMUL = {f8/f4/f2/1/2/4/8} rd and uimm can be any nonzero value |
vtype.vill becomes 1 and other bits become 0 on illegal combinations, such as sew = 1xx. |
2 instructions * 7 lmul bins * 4 sew bins |
vtype_sz_acc_op |
test written: yes |
|
cp_sew_lmul_vsetvl |
Confirm that all combinations of lmul crossed with sew correctly set the type register in accordance with the vill field |
Use vsetvl to cross rs2.sew= [3’b000:3’b011] with rs2.lmul = [000, 001, 010, 011, 101, 110, 111]. rd and uimm can be any nonzero value. Make sure rs2_val[`XLEN-1:8] = 0 |
vtype.vill becomes 1 and other bits become 0 on illegal combinations, such as sew = 1xx. |
7 lmul bins * 4 sew bins |
vtype_sz_acc_op |
test written: yes |
|
cp_sew_lmul_vset_i_vli / cp_sew_lmul_vsetvl |
Confirm on the supported values of lmul are recognized as legal |
Use vsetivli rd, 1, sew={supported}, vlmul={supported(mf8/mf4/mf2/)m1/m2/m4/m8}, tu, mu to attempt to set all values of lmul |
Expect vill is set for all values of lmul that aren’t legal, otherwise the correct lmul is set |
0 |
feature (coverpoint written): Covered by coverpoint above |
||
cp_sew_lmul_vset_i_vli / cp_sew_lmul_vsetvl |
Check all values of sew to Confirm only correctly supported values are recognized as legal |
Use vsetivli rd, 1, sew={e8/e16/e32/e64}, vlmul={m1}, tu, mu to attempt to set all values of lmul |
Expect vill will be set when an attempted unsupported sew values are attempted to be written, otherwise vtype will contain supported sew |
0 |
feature (coverpoint written): Covered by coverpoint above |
||
cp_vill_vset_i_vli |
Check that vset{i}vli instructions properly clear the vill bit when writing a valid vtype configuration |
Run vsetvli and vsetivli with eSEW = {8/16/32/64} with mLMUL = {8} and vtype.vill = {1} |
expect vill bit is cleared and vtype written when sew is legal |
2 instructions * 4 sew bins |
test written: yes |
||
cp_vill_vsetvl |
Check that vsetvl instruction properly clears the vill bit when writing a valid vtype configuration |
Run vsetvl with rs2.sew = {8/16/32/64} with rs2.lmul = {8} and vtype.vill = {1} making sure rs2_val[`XLEN-1:8] = 0 |
expect vill bit is cleared and vtype written when sew is legal |
4 sew bins |
vtype_vill_val |
test written: yes |
|
cp_vill_vsetvl_rs2_vill |
Check that when attempting to set a valid configuration but with the rs2.vill bit set, and the vtype.vill bit set, that the register remains all zeros besides the vill bit |
Run vsetvl with rs2.sew = {8/16/32/64} with vtype.lmul = {8} and vtype.vill = {1} making sure rs2_val[`XLEN-2:8] = 0 and rs2[XLEN-1] = 1 |
vtype register remains unchanged |
4 sew bins |
test written: yes |
||
cp_vsetvl_rs2_vill |
Confirm that with vsetvl if rs2 has the vill bit set that it is treated as an unsupported configuration |
run a vsetvl with rs2[XLEN-1] = 1, rs2[XLEN-2:8]=0 and rs2.sew = {supported} and rs2.lmul = 1 and vtype.vill = {0} |
vill bit should be set |
spec: A vtype value with vill set is treated as an unsupported configuration. |
|||
cp_vset_vill |
Confirm that writing 1 to vill clears other bits of vtype |
Set rs1 nonzero, rs1 = 1 in XLEN-1, 11 in 7:6 (vma/vta). vsetvl rd, rs1, rs2 and vtype.vill = {0} |
vtype.vill becomes 1 and other bits become 0 |
1 |
feature (coverpoint written): covered by coverpoint above |
||
cp_vtype_vill_set_vl_0 |
Confirm that if an unsupported configuration is set, that vl is set to zero |
Run vsetvl with rs1 non-zero and rs2 vill bit set and vl =! 0 |
vl should be set to zero |
1 |
vtype_lmul_fval_rsv |
test written: yes |
|
cp_vsetvl_i_rd_nx0_rs1_x0 |
Confirm that when running a vsetvl or vsetvli instruction with rd != x0 and rs1 = x0 that vl is set to vlmax |
with vl != vlmax, conduct vsetvl and vsetvli with rd != x0 and rs1 = x0. Cross with sew = {8/16/32/64} and respective supported lmul {supported(f8,f4,f2,)1,2,4,8} |
vl csr is set to vlmax |
2 instructions * 4 sew bins * 7 lmul bins |
vl_acc |
test written: yes |
|
cp_vsetvl_i_rd_x0_rs1_x0 |
Confirm that when running a vsetvl or vsetvli instruction with rd = x0 and rs1 = x0 that vl is unchanged |
with vl != 0, conduct vsetvl and vsetvli with rd = x0 and rs1 = x0. sew and lmul must be such that vlmax does not change |
vl is unchanged |
2 |
vsetvl_op |
test written: yes |
|
AVL |
|||||||
cp_vsetvl_i_avl_eq_zero |
Confirm that vsetvl{i} instructions follow vl requirements when avl is zero |
Run vsetvli and vsetvl with rs1 = 0 |
vl = 0 |
1 |
vsetvl_op |
test written: yes |
|
cp_vsetvl_i_avl_eq_vlmax |
Confirm that vsetvl{i} instructions follow avl requirements when equal to vlmax |
Run vsetvli and vsetvl with rs1 = vlmax |
vl = avl |
1 |
vset_op |
test written: yes |
|
cp_vsetvl_i_avl_lt_2x_vlmax |
Confirm that vsetvl{i} instructions follow avl requirements when greater than vlmax and less than equal to 2*vlmax (if avl is less than 2* vlmax) |
Run vsetvli and vsetvl with vlmax < rs1 < 2 *vlmax |
ceil(AVL / 2) ≤ vl ≤ VLMAX |
1 |
vsetvl_op |
test written: yes, is a chance that sig don’t match |
|
cp_vsetvl_i_avl_eq_2x_vlmax |
Confirm that vsetvl{i} instructions follow avl requirements when greater than 2 * vlmax (when avl is greater than equal to 2 * vlmax) |
Run vsetvli and vsetvl with rs1 ≥ 2 *vlmax |
vl = VLMAX |
1 |
vsetvl_op |
test written: yes |
|
cp_vsetvl_i_avl_gt_2x_vlmax |
Confirm that vsetvl{i} instructions follow avl requirements when greater than 2 * vlmax (when avl is greater than equal to 2 * vlmax) |
Run vsetvli and vsetvl with rs1 ≥ 2 *vlmax |
vl = VLMAX |
1 |
vsetvl_op |
test written: yes |
|
cp_vsetivli_avl_edges |
Confirm that vsetivli abides by the avl corners |
Run vsetivli with all values of imm = {[0:31]} with sew = {all_supported} and lmul = 1 |
Abides by avl rules depending on |
4 sew bins * 32 imm bins |
vset_op |
test written: yes |
|
vstart |
|||||||
cp_vstart_out_of_bounds |
Confirm that the vstart CSR only has enough writeable bits to hold the largest element index (2^16-1) |
conduct a csr write with rs1 = 2^16 on the vstart register |
Not defined in spec, either vstart takes the bottom bits or sets to vlmax-1 |
1 |
vstart_acc_sz |
test written: yes |
|
cp_sew_illegal |
Cannot set SEW < 8, all set SEW must be powers of 2 (can accomplish this by looping and setting sew of 2x until vill bit is set and then confirm that vill bit is set whenever setting a non power of 2 sew in that range) |
feature (coverpoint written): can’t be tested |
|||||
cp_vl_walking1s_sew_lmul |
Confirm that all vl CSR bit fields are correctly set for all combinations of sew and lmul (thus all VLMAX) |
Running the vsetvli instruction, cross all sew = {8/16/32/64} lmul = {f8, f4,f2, 1, 2, 4, 8} with rs1 ={XLEN 1-hot values} |
vl register will be set in accordance with vlmax |
4sew * 7 lmul * XLEN 1-hot values |
|||
cp_vlen_illegal |
Cannot set VLEN greater than 2^16, can check vl with eew = 8 |
vsetvli rs1={0, 1, 2, 3, 4, 7, 8, 9, 16, 32, 64… 2^16} |
feature (coverpoint written): covered by csr writing tests |
||||
The vector extension must have a consistent state at reset. In particular, vtype and vl must have values that can be read and then restored with a single vsetvl instruction. (make sure reset is called) |
feature (coverpoint written): untestable |
||||||
H_VF tests (H_VF-NN.S): vector floating-point instructions and vsstatus.FS from VS-mode and VU-mode, run when Zve32f is also supported. |
|||||||
It should be understood that for most coverpoints that are based on arithmetic instructions, the coverpoints will check to make sure they’re non-trivial, meaning that vl != 0, vstart=0, vill=0, and they do not trap. It may be useful to know that when using vsetvl{i} instructions if rd != x0 and rs1 = x0, vl = vlmax |
|||||||
cp_vectorfp_vsstatus_fs_state_affecting_register |
Confirm vector floating point instructions set vsstatus.FS to dirty when modifying floating point register state |
Set vsstatus.FS = {initial/clean} and run a fd writing instruction |
vsstatus.FS is set to dirty |
1 |
mstatus_fs_dirty_V_fp |
spec: Any vector floating-point instruction that modifies any floating-point extension state (i.e., floating-point CSRs or f registers) must set mstatus.FS to Dirty. |
|
cp_vectorfp_vsstatus_fs_state_affecting_csr |
Confirm vector floating point instructions set vsstatus.FS to dirty when modifying floating point csr state |
Set vsstatus.FS = {initial/clean} and run an instruction that would raise a fp flag after clearing the fp flags (vfdiv.vv divide by zero, vfadd.vv inf + -inf, and vmflt.vv with a NaN operand, which writes only a mask register) |
vsstatus.FS is set to dirty |
1 |
spec: Any vector floating-point instruction that modifies any floating-point extension state (i.e., floating-point CSRs or f registers) must set mstatus.FS to Dirty. |
||
cp_vectorfp_vsstatus_fs_state_nonaffecting |
Confirm vector floating point instructions properly set vsstatus.FS when not modifying floating point state |
Set vsstatus.FS = {initial/clean} and run a vector fp instruction that does not affect floating point state (chosen situation for coverpoint is a .vv ins where vs1 = vs2 = 0) |
vsstatus.FS may be set to dirty or not depending on implementation |
1 |
spec: Any vector floating-point instruction that modifies any floating-point extension state (i.e., floating-point CSRs or f registers) must set mstatus.FS to Dirty. |
||
cp_vectorfp_vsstatus_fs_off |
Confirm that vector floating point instructions (even if they dont modify fp state) raise an illegal instruction exception if vsstatus.FS is set to off |
Set vsstatus.FS = {off} and run a vector fp instruction that does not affect floating point state (chosen situation for coverpoint is a .vv ins where vs1 = vs2 = 0) |
illegal instruction exception |
1 |
spec: If the floating-point unit status field mstatus.FS is Off then any attempt to execute a vector floating-point instruction will raise an illegal instruction exception. |
||
Not tested |
|||||||
hstatus.VSBE sets the endianness of VS-mode accesses |
hstatus_vsbe_warl |
Not tested |
Sail is little-endian only, every H config declares little-endian VS-mode and VU-mode, and the trap handler would need big-endian support. |
||||
henvcfg.FIOM orders main memory with device I/O for V = 1 |
henvcfg_fiom_op |
Not tested |
Ordering is not observable in single-hart signature tests. cp_hcsrwalk_masked checks that FIOM is writable. |
||||
Implementation choices that a test cannot distinguish |
hgatp_ppn_acc |
Not tested |
hgatp.PPN[1:0] may be read-only zero or writable, and no UDB parameter records the choice. With GEILEN = 0 the only legal VGEIN value is 0, so a read-only-zero VGEIN cannot be distinguished from a writable one. |
||||
henvcfg.SSE and henvcfg.DTE control Zicfiss and Ssdbltrp in VS-mode |
henvcfg_sse_op |
Not tested |
These belong to ZicfissH and SsdbltrpH, which have no tests yet. |
||||
| Normative Rule | Rule Text | Coverpoints |
|---|---|---|
hstatus_sz_acc_op |
H_hscsr_cg/{cp_hcsr_access_masked, cp_hcsrwalk_masked}/hstatus |
|
hedeleg_sz_acc |
Register hedeleg is a 64-bit read/write register, formatted as shown in norm:hedeleg_img. |
H_hscsr_cg/{cp_hcsr_access, cp_hcsrwalk}/hedeleg, H_hscsr_cg/{cp_hcsr_access, cp_hcsrwalk}/hedelegh |
hedeleg_acc |
Each bit of hedeleg shall be either writable or read-only zero. |
H_hscsr_cg/{cp_hcsr_access, cp_hcsrwalk}/hedeleg |
hedeleg_bits_required, hedeleg_bit0_ialign32 |
hedeleg_bits_required: Many bits of hedeleg are required specifically to be writable or zero, as enumerated in norm:hedeleg_bits_acc_tbl. hedeleg_bit0_ialign32: Bit 0, corresponding to instruction address-misaligned exceptions, must be writable if IALIGN=32. |
H_hscsr_cg/cp_hcsr_access/hedeleg, Sm_H_mcsr_cg/cp_hcsr_access/hedeleg |
hedeleg_img |
H_hscsr_cg/{cp_hcsr_access, cp_hcsrwalk}/hedeleg |
|
hideleg_sz_acc |
Register hideleg is an HSXLEN-bit read/write register, formatted as shown in norm:hideleg_img. |
H_hscsr_cg/{cp_hcsr_access, cp_hcsrwalk}/hideleg |
hideleg_acc |
H_hscsr_cg/{cp_hcsr_access, cp_hcsrwalk}/hideleg |
|
hideleg_img |
H_hscsr_cg/{cp_hcsr_access, cp_hcsrwalk}/hideleg |
|
hvip_sz_op |
H_hscsr_cg/{cp_hcsr_access, cp_hcsrwalk}/hvip |
|
hvip_acc |
H_hscsr_cg/{cp_hcsr_access, cp_hcsrwalk}/hvip |
|
hvip_img |
H_hscsr_cg/{cp_hcsr_access, cp_hcsrwalk}/hvip |
|
hip_hie_sz_acc |
H_hscsr_cg/{cp_hcsr_access, cp_hcsrwalk}/hip, H_hscsr_cg/{cp_hcsr_access, cp_hcsrwalk}/hie |
|
hip_img |
H_hscsr_cg/{cp_hcsr_access, cp_hcsrwalk}/hip |
|
hie_img |
H_hscsr_cg/{cp_hcsr_access, cp_hcsrwalk}/hie |
|
hip_acc |
H_hscsr_cg/{cp_hcsr_access, cp_hcsrwalk}/hip |
|
hie_acc |
H_hscsr_cg/{cp_hcsr_access, cp_hcsrwalk}/hie |
|
hgeip_sz_acc_op |
H_hscsr_cg/cp_hcsr_access_ro |
|
hgeie_sz_acc_op |
H_hscsr_cg/{cp_hcsr_access, cp_hcsrwalk}/hgeie |
|
hgeie_img |
H_hscsr_cg/{cp_hcsr_access, cp_hcsrwalk}/hgeie |
|
geilen |
H_hscsr_cg/{cp_hcsr_access, cp_hcsrwalk}/hgeie, H_hscsr_cg/cp_hcsr_access_ro |
|
henvcfg_sz_acc_op |
H_hscsr_cg/{cp_hcsr_access_masked, cp_hcsrwalk_masked}/henvcfg, H_hscsr_cg/{cp_hcsr_access_masked, cp_hcsrwalk_masked}/henvcfgh |
|
hcounteren_sz |
H_hscsr_cg/{cp_hcsr_access, cp_hcsrwalk}/hcounteren |
|
hcounteren_warl |
H_hscsr_cg/{cp_hcsr_access, cp_hcsrwalk}/hcounteren |
|
htimedelta_sz_acc_op |
H_hscsr_cg/{cp_hcsr_access, cp_hcsrwalk}/htimedelta, H_Zicntr_cg/{cp_delta_hs, cp_delta_vs, cp_delta_u, cp_delta_vu} |
|
htval_sz_acc_op |
H_hscsr_cg/cp_hcsr_access_zero/htval, H_inst_cg/cp_guest_page_fault |
|
htval_val |
H_hscsr_cg/cp_hcsr_access_zero/htval |
|
htinst_sz_acc_op |
H_hscsr_cg/cp_hcsr_access_zero/htinst, H_inst_cg/cp_guest_page_fault |
|
htinst_val |
H_hscsr_cg/cp_hcsr_access_zero/htinst |
|
hgatp_sz_acc_op |
H_hscsr_cg/cp_hcsr_access_zero/hgatp, H_hscsr_cg/{cp_atpwalk1, cp_atpwalk0}/hgatp |
|
hgatp_mode_Sv |
H_hscsr_cg/{cp_atpwalk1, cp_atpwalk0}/hgatp |
|
hgatp_ppn_op |
In these modes, the lowest two bits of the physical page number (PPN) in hgatp always read as zeros. |
H_hscsr_cg/{cp_atpwalk1, cp_atpwalk0}/hgatp |
hgatp_vmid |
H_hscsr_cg/{cp_atpwalk1, cp_atpwalk0}/hgatp |
|
hedelegh_sz_acc_op |
H_hscsr_cg/{cp_hcsr_access, cp_hcsrwalk}/hedelegh, H_vscsr_cg/cp_illegalupper/hedelegh, H_vucsr_cg/cp_csr_insufficient_priv |
|
henvcfgh_sz_acc_op |
H_hscsr_cg/{cp_hcsr_access_masked, cp_hcsrwalk_masked}/henvcfgh, H_vscsr_cg/cp_illegalupper/henvcfgh, H_vucsr_cg/cp_csr_insufficient_priv |
|
htimedeltah_sz_acc_op |
H_hscsr_cg/{cp_hcsr_access, cp_hcsrwalk}/htimedeltah, H_vscsr_cg/cp_illegalupper/htimedeltah, H_vucsr_cg/cp_csr_insufficient_priv, H_Zicntr_cg/{cp_delta_hs, cp_delta_vs, cp_delta_u, cp_delta_vu} |
|
H_vscsrs_acc_m_hs |
The VS CSRs can be accessed as themselves only from M-mode or HS-mode. |
H_hscsr_cg/cp_hcsr_access, H_hscsr_cg/cp_hcsr_access_zero/vsatp, H_vscsr_cg/cp_hcsr_virtualinstructionfault, H_vucsr_cg/cp_csr_insufficient_priv, U_ucsr_cg/cp_csr_insufficient_priv |
vsstatus_sz_acc_op |
H_hscsr_cg/{cp_hcsr_access, cp_hcsrwalk}/vsstatus, H_vscsr_cg/cp_replica/sstatus |
|
vsip_vsie_sz_acc_op |
H_hscsr_cg/{cp_hcsr_access, cp_hcsrwalk}/vsip, H_hscsr_cg/{cp_hcsr_access, cp_hcsrwalk}/vsie, H_vscsr_cg/cp_replica/sip, H_vscsr_cg/cp_replica/sie |
|
vsip_img |
H_hscsr_cg/{cp_hcsr_access, cp_hcsrwalk}/vsip |
|
vsie_img |
H_hscsr_cg/{cp_hcsr_access, cp_hcsrwalk}/vsie |
|
vstvec_sz_acc_op |
H_hscsr_cg/{cp_hcsr_access, cp_hcsrwalk}/vstvec, H_vscsr_cg/cp_replica/stvec |
|
vsscratch_sz_acc_op |
H_hscsr_cg/{cp_hcsr_access, cp_hcsrwalk}/vsscratch, H_vscsr_cg/cp_replica/sscratch |
|
vsepc_sz_acc_op |
H_hscsr_cg/cp_hcsr_access/vsepc, H_hscsr_cg/{cp_vsepc_vaddr_walk1, cp_vsepc_vaddr_walk0, cp_vsepc_vaddr_pc, cp_vsepc_vaddr_scratch}, H_vscsr_cg/cp_replica/sepc, Sm_H_mcsr_cg/{cp_vsepc_ialign32_read, cp_vsepc_ialign32_vs_read, cp_vsepc_ialign32_sret} |
|
vsepc_warl |
H_hscsr_cg/{cp_vsepc_vaddr_walk1, cp_vsepc_vaddr_walk0, cp_vsepc_vaddr_pc, cp_vsepc_vaddr_scratch} |
|
vstval_sz_acc_op |
H_hscsr_cg/cp_hcsr_access/vstval, H_hscsr_cg/{cp_vstval_vaddr_walk1, cp_vstval_vaddr_walk0, cp_vstval_vaddr_pc, cp_vstval_vaddr_scratch}, H_vscsr_cg/cp_replica/stval |
|
vstval_warl |
H_hscsr_cg/{cp_vstval_vaddr_walk1, cp_vstval_vaddr_walk0, cp_vstval_vaddr_pc, cp_vstval_vaddr_scratch}, H_hscsr_cg/{cp_vstval_zero, cp_vstval_ilen_walk1, cp_vstval_ilen_ones} |
|
vsatp_sz_acc_op |
H_hscsr_cg/cp_hcsr_access_zero/vsatp, H_hscsr_cg/{cp_atpwalk1, cp_atpwalk0}/vsatp, H_vscsr_cg/cp_replica/satp |
|
vsatp_asidlen |
H_hscsr_cg/{cp_atpwalk1, cp_atpwalk0}/vsatp |
|
vstimecmp_sz |
The |
H_hscsr_cg/{cp_hcsr_access, cp_hcsrwalk}/vstimecmp, H_hscsr_cg/{cp_hcsr_access, cp_hcsrwalk}/vstimecmph |
vstimecmp_acc |
H_hscsr_cg/{cp_hcsr_access, cp_hcsrwalk}/vstimecmp, H_hscsr_cg/{cp_hcsr_access, cp_hcsrwalk}/vstimecmph |
|
mtval2_sz_acc_op, mtinst_sz_acc_op |
mtval2_sz_acc_op: The mtval2 register is an MXLEN-bit read/write register formatted as shown in mtval2reg. When a trap is taken into M-mode, mtval2 is written with additional exception-specific information, alongside mtval, to assist software in handling the trap. mtinst_sz_acc_op: The mtinst register is an MXLEN-bit read/write register formatted as shown in mtinstreg. When a trap is taken into M-mode, mtinst is written with a value that, if nonzero, provides information about the instruction that trapped, to assist software in handling the trap. The values that may be written to mtinst on a trap are documented in tinst-vals. |
S_scsr_cg/cp_csr_insufficient_priv, H_vscsr_cg/cp_csr_insufficient_priv, H_vucsr_cg/cp_csr_insufficient_priv, U_ucsr_cg/cp_csr_insufficient_priv |
hstatus_vgein_wlrl |
H_hscsr_cg/cp_hstatus_vgein |
|
vscause_sz_acc_op |
H_vscause_cg/cp_vscause_write_exception, H_vscause_cg/cp_vscause_write_interrupt, H_vscsr_cg/cp_replica |
|
vscause_wlrl |
H_vscause_cg/cp_vscause_write_exception, H_vscause_cg/cp_vscause_write_interrupt |
|
H_vscsrs_v0, vsstatus_v0 |
H_vscsrs_v0: when V=0, the VS CSRs do not ordinarily affect the behavior of the machine other than being readable and writable by CSR instructions. vsstatus_v0: When V=0, vsstatus does not directly affect the behavior of the machine, unless a virtual-machine load/store (HLV, HLVX, or HSV) or the MPRV feature in the mstatus register is used to execute a load or store as though V=1. |
H_hscsr_cg/cp_replica, Sv_H_hlv_cg/cp_hlv_priv |
H_vscsrs_sub |
H_vscsr_cg/cp_replica |
|
H_vscsrs_v1 |
H_vscsr_cg/cp_replica |
|
H_scsrs_nomatch |
H_vscsr_cg/cp_nonreplica |
|
H_csrs_hs_not_vs, H_vscsrs_acc_vs, H_cause_virtual_instruction |
H_csrs_hs_not_vs: Additional CSRs are provided to HS-mode, but not to VS-mode, to manage two-stage address translation and to control the behavior of a VS-mode guest: hstatus, hedeleg, hideleg, hvip, hip, hie, hgeip, hgeie, henvcfg, henvcfgh, hcounteren, htimedelta, htimedeltah, htval, htinst, and hgatp. H_vscsrs_acc_vs: When V=1, an attempt to read or write a VS CSR directly by its own separate CSR address causes a virtual-instruction exception. H_cause_virtual_instruction: When V=1, a virtual-instruction exception (code 22) is normally raised instead of an illegal-instruction exception if the attempted instruction is HS-qualified but is prevented from executing when V=1 either due to insufficient privilege or because the instruction is expressly disabled by a supervisor or hypervisor CSR such as scounteren or hcounteren. An instruction is HS-qualified if it would be valid to execute in HS-mode (for some values of the instruction’s register operands), assuming fields TSR and TVM of CSR mstatus are both zero. |
H_vscsr_cg/cp_hcsr_virtualinstructionfault |
Zicsr_high_half_rv64_rsv |
H_vscsr_cg/cp_illegalupper, H_vucsr_cg/cp_csr_insufficient_priv |
|
H_vscsrs_acc_u |
Attempts from U-mode cause an illegal-instruction exception as usual. |
U_ucsr_cg/cp_csr_insufficient_priv |
H_virtinst_vu_vs_nonhigh_allowedhs_tvm0 |
H_vscsr_cg/cp_hcsr_virtualinstructionfault, H_vucsr_cg/cp_csr_insufficient_priv |
|
H_virtinst_vu_nonhigh_supervisor_allowedhs_tvm0 |
H_vucsr_cg/cp_csr_insufficient_priv |
|
vsstatus_sd_xs_op |
H_vsstatus_cg/cp_vsstatus_sd_write |
|
hlsv_mode, hlsv_op, hstatus_hu_op, hlvx-wu_valid32 |
hlsv_mode: The hypervisor virtual-machine load and store instructions are valid only in M-mode or HS-mode, or in U-mode when hstatus.HU=1. hlsv_op: For every RV32I or RV64I load instruction, LB, LBU, LH, LHU, LW, LWU, and LD, there is a corresponding virtual-machine load instruction: HLV.B, HLV.BU, HLV.H, HLV.HU, HLV.W, HLV.WU, and HLV.D. For every RV32I or RV64I store instruction, SB, SH, SW, and SD, there is a corresponding virtual-machine store instruction: HSV.B, HSV.H, HSV.W, and HSV.D. Instructions HLV.WU, HLV.D, and HSV.D are not valid for RV32, of course. hstatus_hu_op: Field HU (Hypervisor in U-mode) controls whether the virtual-machine load/store instructions, HLV, HLVX, and HSV, can be used also in U-mode. When HU=1, these instructions can be executed in U-mode the same as in HS-mode. When HU=0, all hypervisor instructions cause an illegal-instruction exception in U-mode. hlvx-wu_valid32: HLVX.WU is valid for RV32, even though LWU and HLV.WU are not. |
H_inst_cg/cp_hlv, H_inst_cg/cp_hlvx, H_inst_cg/cp_hsv, Ssnpm_H_cg/{cp_hlv_u_spvp1_pmm, cp_hlv_u_spvp0_pmm, cp_hlvx_u_pmm, cp_hlvx_hs_pmm}, Exceptions_H_cg/cp_loadstore_priv |
hfence-vvma_hfence-gvma_op, hfence-vvma_mode, hfence-gvma_op, hfence-vvma_hfence-gvma_exceptions |
hfence-vvma_hfence-gvma_op: The hypervisor memory-management fence instructions, HFENCE.VVMA and HFENCE.GVMA, perform a function similar to SFENCE.VMA (sfence.vma), except applying to the VS-level memory-management data structures controlled by CSR vsatp (HFENCE.VVMA) or the guest-physical memory-management data structures controlled by CSR hgatp (HFENCE.GVMA). Instruction SFENCE.VMA applies only to the memory-management data structures controlled by the current satp (either the HS-level satp when V=0 or vsatp when V=1). hfence-vvma_mode: HFENCE.VVMA is valid only in M-mode or HS-mode. Its effect is much the same as temporarily entering VS-mode and executing SFENCE.VMA. Executing an HFENCE.VVMA guarantees that any previous stores already visible to the current hart are ordered before all implicit reads by that hart done for VS-stage address translation for instructions that hfence-gvma_op: HFENCE.GVMA is valid only in HS-mode when |
H_inst_cg/cp_hfence |
hstatus_vtvm_op, H_virtinst_vs_sfence_sinval_satp_vtvm1 |
hstatus_vtvm_op: When VTVM=1, an attempt in VS-mode to execute SFENCE.VMA or SINVAL.VMA or to access CSR satp raises a virtual-instruction exception. H_virtinst_vs_sfence_sinval_satp_vtvm1: in VS-mode, attempts to execute an SFENCE.VMA or SINVAL.VMA instruction or to access satp, when hstatus.VTVM=1. |
H_inst_cg/{cp_vtvm_sfence, cp_vtvm_satp} |
hfence-vvma_tvm |
Neither mstatus.TVM nor hstatus.VTVM causes HFENCE.VVMA to trap. |
H_inst_cg/cp_vtvm_hfence_vvma |
xret_in_lower_mode |
H_inst_cg/cp_mret_illegal |
|
H_virtinst_vu_sret_sfence |
H_inst_cg/cp_sret_illegal, Exceptions_H_cg/cp_virtual_instr_vu_sfence_vma |
|
sret_v0, hstatus_spv_sret |
sret_v0: When executed in M-mode or HS-mode (i.e., V=0), SRET first determines what the new privilege mode will be according to the values in hstatus.SPV and sstatus.SPP, as encoded in norm:H_trap_hs_spv_spp_tbl. SRET then sets hstatus.SPV=0, and in sstatus sets SPP=0, SIE=SPIE, and SPIE=1. Lastly, SRET sets the privilege mode as previously determined, and sets pc=sepc. hstatus_spv_sret: When an SRET instruction is executed when V=0, V is set to SPV. |
H_inst_cg/cp_sret_hs |
sret_v1, hstatus_vtsr_op, H_virtinst_vs_sret_vtsr1 |
sret_v1: When executed in VS-mode (i.e., V=1), SRET sets the privilege mode according to norm:H_trap_vs_spp_tbl, in vsstatus sets SPP=0, SIE=SPIE, and SPIE=1, and lastly sets pc=vsepc. hstatus_vtsr_op: When VTSR=1, an attempt in VS-mode to execute SRET raises a virtual-instruction exception. H_virtinst_vs_sret_vtsr1: in VS-mode, attempts to execute SRET when hstatus.VTSR=1 |
H_inst_cg/cp_sret_vs |
H_guest_page_fault |
H_inst_cg/cp_guest_page_fault |
|
H_trap_xtinst |
H_inst_cg/cp_guest_page_fault |
|
H_trap_xtinst_exception_lead_in |
H_inst_cg/cp_guest_page_fault |
|
H_trap_xtinst_exception_list |
H_inst_cg/cp_guest_page_fault |
|
H_trap_xtinst_val |
H_inst_cg/cp_guest_page_fault |
|
H_trap_xtinst_guestpage |
H_inst_cg/cp_guest_page_fault |
|
H_cause_virtual_instruction_high |
H_vscsr_cg/cp_hcsr_virtualinstructionfault, H_vucsr_cg/cp_csr_insufficient_priv, H_Zicntr_cg/cp_hcounteren_access_vs, H_Zicntr_cg/cp_hcounteren_access_vu |
|
hgatp_vmid_lsbs |
H_hscsr_cg/cp_atpwalk1/hgatp, H_hscsr_cg/cp_atpwalk0/hgatp, Sm_H_mcsr_cg/cp_atpwalk1/hgatp, Sm_H_mcsr_cg/cp_atpwalk0/hgatp |
|
hgatp_ppn_acc |
Not tested: PPN[1:0] may be read-only zero or writable, and no UDB parameter records the choice |
|
hstatus_vgein_acc |
GEILEN may be zero, in which case VGEIN may be read-only zero. |
Not tested: with GEILEN = 0 the only legal VGEIN value is 0, so a read-only-zero VGEIN cannot be distinguished from a writable one |
hsxlen |
we use the term HSXLEN to refer to the effective XLEN when executing in HS-mode |
Out of scope: tests run with VSXLEN = VUXLEN = HSXLEN = MXLEN |
vsxlen |
VSXLEN to refer to the effective XLEN when executing in VS-mode. |
Out of scope: tests run with VSXLEN = VUXLEN = HSXLEN = MXLEN |
hstatus_vsxl_op |
Out of scope: tests run with VSXLEN = VUXLEN = HSXLEN = MXLEN |
|
hstatus_vsxl_32 |
When HSXLEN=32, the VSXL field does not exist, and VSXLEN=32. |
Out of scope: tests run with VSXLEN = VUXLEN = HSXLEN = MXLEN |
hstatus_vsxl_64 |
Out of scope: tests run with VSXLEN = VUXLEN = HSXLEN = MXLEN |
|
vsxl_ro |
Out of scope: tests run with VSXLEN = VUXLEN = HSXLEN = MXLEN |
|
hstatus_vsxl_change |
Out of scope: tests run with VSXLEN = VUXLEN = HSXLEN = MXLEN |
|
vsstatus_uxl_op |
Out of scope: tests run with VSXLEN = VUXLEN = HSXLEN = MXLEN |
|
vsstatus_uxl_change |
Out of scope: tests run with VSXLEN = VUXLEN = HSXLEN = MXLEN |
|
hstatus_vsbe_warl, hstatus_vsbe_op, hstatus_vsbe_implicit, hstatus_vsbe_acc, vsstatus_ube |
hstatus_vsbe_warl: The VSBE bit is a WARL field that controls the endianness of explicit memory accesses made from VS-mode. hstatus_vsbe_op: If VSBE=0, explicit load and store memory accesses made from VS-mode are little-endian, and if VSBE=1, they are big-endian. hstatus_vsbe_implicit: VSBE also controls the endianness of all implicit accesses to VS-level memory management data structures, such as page tables. hstatus_vsbe_acc: An implementation may make VSBE a read-only field that always specifies the same endianness as HS-mode. vsstatus_ube: An implementation may make field UBE be a read-only copy of hstatus.VSBE. |
Not tested: big-endian VS-mode and VU-mode accesses; the reference model has no big-endian support |
H_requires_i |
Not tested: configuration requirement; the I suite tests registers x16 through x31 |
|
Sha_dep |
H Ssstateen Shcounterenw Shvstvala Shtvala Shvstvecd Shvsatpa Shgatpa |
Definition, checked through UDB |
henvcfg_fiom_op, henvcfg_fiom_order |
henvcfg_fiom_op: If bit FIOM (Fence of I/O implies Memory) is set to one in henvcfg, FENCE instructions executed when V=1 are modified so the requirement to order accesses to device I/O implies also the requirement to order main memory accesses. norm:henvcfg_fiom_fence_presuc_op details the modified interpretation of FENCE instruction bits PI, PO, SI, and SO when FIOM=1 and V=1. henvcfg_fiom_order: Similarly, when FIOM=1 and V=1, if an atomic instruction that accesses a region ordered as device I/O has its aq and/or rl bit set, then that instruction is ordered as though it accesses both device I/O and memory. |
Not tested: ordering of I/O and memory accesses is not observable in single-hart signature tests |
henvcfg_sse_op |
Not tested: shadow-stack instructions in VS-mode and VU-mode with henvcfg.SSE = 0 and 1 belong to ZicfissH, which has no tests yet |
|
henvcfg_pmm_op |
Ssnpm_H_cg/{cp_vs_pmm,cp_hlv_hs_spvp1_pmm,cp_hlv_u_spvp1_pmm} |
|
henvcfg_dte_op |
Not tested: writing vsstatus.SDT and trapping into VS-mode with henvcfg.DTE = 0 and 1 belong to SsdbltrpH, which has no tests yet |
|
vsstatus_sdt_op |
Not tested: traps into VS-mode with vsstatus.SDT = 0 and 1 belong to SsdbltrpH, which has no tests yet |
|
sret_dt |
Not tested: vsstatus.SDT after sret belongs to SsdbltrpH, which has no tests yet |
|
hcounteren_op, hcounteren_set_op, H_virtinst_vs_nonhighctr_h0_m1, H_virtinst_vs32_highctr_h0_m1 |
hcounteren_op: When the CY, TM, IR, or HPMn bit in the hcounteren register is clear, attempts to read the cycle, time, instret, or hpmcounter n register while V=1 will cause a virtual-instruction exception if the same bit in mcounteren is 1. hcounteren_set_op: When one of these bits is set, access to the corresponding register is permitted when V=1, unless prevented for some other reason. H_virtinst_vs_nonhighctr_h0_m1: in VS-mode, attempts to access a non-high-half counter CSR when the corresponding bit in hcounteren is 0 and the same bit in mcounteren is 1; H_virtinst_vs32_highctr_h0_m1: in VS-mode, if XLEN=32, attempts to access a high-half counter CSR when the corresponding bit in hcounteren is 0 and the same bit in mcounteren is 1; |
H_Zicntr_cg/cp_hcounteren_access_vs, H_Zicntr_cg/cp_hcounteren_access_vu, H_Zicntr_cg/cp_mcounteren_access_vs_h0, H_Zicntr_cg/cp_mcounteren_access_vu_hs0 |
hcounteren_scounteren_vu_op, H_virtinst_vu_nonhighctr_h0_s0_m1, H_virtinst_vu32_highctr_h0_s0_m1 |
hcounteren_scounteren_vu_op: In VU-mode, a counter is not readable unless the applicable bits are set in both hcounteren and scounteren. H_virtinst_vu_nonhighctr_h0_s0_m1: in VU-mode, attempts to access a non-high-half counter CSR when the corresponding bit in either hcounteren or scounteren is 0 and the same bit in mcounteren is 1; H_virtinst_vu32_highctr_h0_s0_m1: in VU-mode, if XLEN=32, attempts to access a high-half counter CSR when the corresponding bit in either hcounteren or scounteren is 0 and the same bit in mcounteren is 1; |
H_Zicntr_cg/cp_hcounteren_access_vu, H_Zicntr_cg/cp_scounteren_access_vu, H_Zicntr_cg/cp_mcounteren_access_vu, H_Zicntr_cg/cp_mcounteren_access_vu_hs0 |
mcounteren_clr_ill_inst_exc |
H_Zicntr_cg/cp_mcounteren_access_vs, H_Zicntr_cg/cp_mcounteren_access_vs_h0, H_Zicntr_cg/cp_mcounteren_access_vu, H_Zicntr_cg/cp_mcounteren_access_vu_hs0 |
|
mcounteren_set_nxt_priv |
H_Zicntr_cg/cp_scounteren_access_hs |
|
scounteren_op |
H_Zicntr_cg/cp_scounteren_access_u, H_Zicntr_cg/cp_scounteren_access_hs (HS-mode reads ignore scounteren) |
|
time_htimedelta_req |
If the time CSR is implemented, htimedelta (and htimedeltah for XLEN=32) must be implemented. |
H_Zicntr_cg/cp_delta_hs, H_Zicntr_cg/cp_delta_vs, H_Zicntr_cg/cp_delta_u, H_Zicntr_cg/cp_delta_vu |
UDB Parameters: None.
B.8.2. Hypervisor Exceptions
The hypervisor exception tests are the Exceptions_H and Exceptions_HSm groups of the Exceptions suite.
B.8.3. InterruptsH Hypervisor Interrupts
Record all trap information including xstatus add to CTP an assumption that all interrupts are implemented
| Coverpoint | Goal | Feature Description | Expectation | Bins | Normative Rule |
|---|---|---|---|---|---|
Following tests are done in M-mode |
|||||
cp_mideleg |
hypervisor bits of mideleg are read-only 1 |
Write 0 to mideleg and read it back. |
Bits 10, 6, 2 are 1s. If GEILEN > 0, bit 12 is also 1. |
1 |
|
cp_mie |
mie.VS*IE bits are alias of hie |
With hie = 0x444, read mie. |
0x444 |
1 |
|
cp_mip |
mip.VS*IP bits are alias of hip |
With hvip = 0x444, read mip and hip. Note that hip depends on hvip. |
0x444 |
1 |
|
cp_nohint_m |
VS*I never causes machine-mode interrupt |
mstatus.MIE=1, hideleg = 0, mie = 0x444, mip = 0x444 |
No interrupt occurs because these are always delegated to HS or VS |
1 |
|
Following tests are done in M-mode if GILEN > 0 |
|||||
cp_mie_gilen |
mie.SGEIE is alias of hie |
With hie = 0x1444, read mie. |
0x1444 |
1 |
|
cp_mip_gilen |
mip.SGEIP is alias of hip |
Set hgeip nonzero and read mip |
0x1000 |
1 |
|
Following tests are done in M-mode if GILEN = 0 |
|||||
cp_mie_gilen |
mie.SGEIE is read-only zero if GILEN = 0 |
Write hie = 0x1000, read mie |
0x0000 |
1 |
hie_acc |
Following tests are done in HS-mode |
|||||
cp_trigger_vsei |
trigger HS-mode VSEI |
With sstatus.SIE={0/1}, hideleg.VSEI = {0/1}, hie.VSEIE = {0/1}, write hvip.VSEIP |
hip.VSEIP rises. if SIE=1 & hideleg = 0 & hie = 1, interrupt to HS-mode with cause 10 |
2 * 2 * 2 |
|
cp_trigger_vsti |
trigger HS-mode VSTI |
With sstatus.SIE={0/1}, hideleg.VSTI = {0/1}, hie.VSTIE = {0/1}, write hvip.VSTIP |
hip.VSTIP rises. if SIE=1 & hideleg = 0 & hie = 1, interrupt to HS-mode with cause 6 |
2 * 2 * 2 |
|
cp_trigger_vssi |
trigger HS-mode VSSI |
With sstatus.SIE={0/1}, hideleg.VSSI = {0/1}, hie.VSSIE = {0/1}, write hvip.VSSIP |
hip.VSSIP rises. if SIE=1 & hideleg = 0 & hie = 1, interrupt to HS-mode with cause 2 |
2 * 2 * 2 |
|
cp_hip_write |
only hip.vssip is writable, and aliases to hvip |
Write hip=0xFFFF and hip = 0x0000. Read back hvip and hip. |
0x0004 and 0x0000 in both hip and hvip. |
1 |
|
cp_priority_en_vsi |
trigger highest priority enabled VSI |
With sstatus.SIE=1, hideleg = 0, 2^3 combinations of hie.VS*IE, write 2^3 combinations of hvip.VS*IP |
Highest priority enabled interrupt to HS-mode |
8 * 8 |
|
cp_priority_deleg_vsi |
trigger highest priority undelegated VSI |
With sstatus.SIE = 1, hie=0x444, 2^3 combinations of hideleg, write 2^3 combinations of hvip.VS*IP |
Highest priority undelegated interrupt to HS-mode |
8 * 8 |
|
cp_priority_s |
VS*I has lower priority than any S*I |
With sstatus.SIE = 1, hvip = 0x444, hideleg = 0, hie = 0x444, sie = 1s, sip = {SEIP, STIP, SSIP, none} |
Take highest priority interrupt (supervisor, if any asserted, else VSEI) |
4 |
|
cp_hie |
hie.VS*IE bits are alias of mie |
With mie = 0x444, 2^3 combinations of hideleg, read hie and vsie |
hie = 0x444; vsie = 1s in delegated bits |
8 |
|
cp_hip |
hip.VS*IP bits are alias of mip |
With mip = 0x444, 2^3 combinations of hideleg, read hip and visp |
hip = 0x444; visp = 1s in delegated bits |
8 |
|
cp_hideleg |
hideleg bits 10, 6, 2 are writable |
Write 0xFFFF to hideleg, read back |
0x444 |
1 |
|
cp_vsie |
vsie is alias of hie when delegated |
With 2^3 combinations of hideleg and 2^3 combinations of hie, read vsie |
vsie bits = 1 if hideleg and hie bits = 1 (shifted) |
8 * 8 |
|
cp_vsip |
vsip is alias of hip when delegated |
With 2^3 combinations of hideleg and 2^3 combinations of hip, read vsip |
vsip bits = 1 if hideleg and hip bits = 1 (shifted) |
8 * 8 |
|
cp_vsie_from_hie |
hie is alias of vsie when delegated |
With 2^3 combinations of hideleg, write 0xFFFF to vsie, read hie |
delegated bits show up as 1 in hie (shifted) |
8 |
|
Following tests are done in HS-mode if GILEN > 0 |
|||||
cp_hie_gilen |
hie.SGEIE is alias of mie |
With mie = 0x1444, read hie |
0x1444 |
1 |
|
cp_priority_sgei |
SGEI has higher priority than VS*I |
With sstatus.SIE=1, hvip = 0x444, sgeip & sgeie != 0, hideleg = 0, hei = 0x1444 |
interrupt to HS-mode with cause 12 |
1 |
|
cp_priority_sgei_s |
SGEI has lower priroity than any S*I |
With sstatus.SIE = 1, hvip = 0x444, hideleg = 0, hie = 0x1444, sie = 1s, sip = {SEIP, STIP, SSIP, none} |
Take highest priority interrupt (supervisor, if any are asserted) |
4 |
|
cp_trigger_sgei |
trigger HS-mode SGEI |
With sstatus.SIE={0/1}, sgeip & sgeie != 0, hie.SGEIE = {0/1} |
hip.SGEIP =1. if SIE=1 & hie = 1, interrupt to HS-mode with cause 12 |
2 * 2 |
|
cp_hgeie |
hgeie enables SGEI |
With sstatus.SIE = 0, for i in 1…GILEN, with hgeip = {0, 1 in i, 1s in all writable bits}, hgeie = 1 in bit i |
hip.SEGIP = 1 if hgeip & hgeie != 0 |
GLEN * 3 |
|
cp_trigger_vsei_hgeip |
trigger HS-mode VSEI with HGEIP |
With sstatus.SIE = 0, hvip = 0, hideleg = 0, hie = 0, for i in 1…GLEN: hgeip = {0, 1 in i, 1 in all writable bits except i}, hgeie[i] = {0/1}, hstatus.VGEIN = i |
hip.VSEIP = hgeip[i] independent of hgeie |
GLEN * 2 |
|
cp_hgeip0 |
no VSEI selected when VGEIN=0 |
With statatus.SIE=0, hvip = 0, hideleg=0, hie = 0, hgeip = hgeie = 1s in all writable bits, hstatus.VGEIN = 0 |
hip.SEGIP = 0, hip.VSEIP = 0 |
1 |
|
Following tests are done in VS-mode |
|||||
cp_hideleg_hip_vs |
Set up 2^3 combinations of hideleg, 2^3 combinations of hip, hie = 0x444. Change to VS-mode with vsstatus.SIE = 1 |
Take highest priority interrupt to HS or VS. VS shifts to SEI/STI/SSI. |
8 * 8 |
||
cp_hideleg_hie_vs |
Set up 2^3 combinations of hideleg, 2^3 combinations of hie, hip = 0x444. Change to VS-mode with vsstatus.SIE = 1 |
Take highest priority interrupt to HS or VS. VS shifts to SEI/STI/SSI. |
8 * 8 |
||
cp_hip_hie_vs |
Set up 2^3 combinations of hip, 2^3 combinations of hie, hideleg = 0x444. Change to VS-mode with vsstatus.SIE = 1 |
Take highest priority interrupt to HS or VS. VS shifts to SEI/STI/SSI. |
8 * 8 |
||
cp_sie_vs |
hideleg = hip = hie = 0x444. Change to VS-mode with vsstatus.SIE = {0/1} |
Take SEI if SIE=1 |
2 |
||
cp_mideleg_mip_vs |
With mstatus.MIE=0, mideleg = {0/1s}, mip = {MEIP/MTIP/MSIP/SEI/STI/SSI}, mie = 1s, change to VS-mode with vsstatus.SIE=1 |
Take interrupt to M or HS |
2 * 6 |
||
cp_mtinst |
mtinst = 0 on interrupt |
with mtinst randomized, mideleg = 0, exercise each interrupt. |
mtinst = 0 |
10 interrupts |
|
cp_htinst |
htinst = 0 on interrupt |
with htinst randomized, mideleg = 1, hideleg = 0 exercise each interrupt. |
htinst = 0 |
10 interrupts |
|
Following tests are done in VU-mode |
|||||
cp_hideleg_hip_vu |
Set up 2^3 combinations of hideleg, 2^3 combinations of hip, hie = 0x444. Change to VU-mode. |
Take highest priority interrupt to HS or VS. VS shifts to SEI/STI/SSI. |
8 * 8 |
||
cp_hideleg_hie_vu |
Set up 2^3 combinations of hideleg, 2^3 combinations of hie, hip = 0x444. Change to VU-mode. |
Take highest priority interrupt to HS or VS. VS shifts to SEI/STI/SSI. |
8 * 8 |
||
cp_hip_hie_vu |
Set up 2^3 combinations of hip, 2^3 combinations of hie, hideleg = 0x444. Change to VU-mode. |
Take highest priority interrupt to HS or VS. VS shifts to SEI/STI/SSI. |
8 * 8 |
||
cp_mideleg_mip_vu |
With mstatus.MIE=0, mideleg = {0/1s}, mip = {MEIP/MTIP/MSIP/SEI/STI/SSI}, mie = 1s, change to VU-mode |
Take interrupt to M or HS |
2 * 6 |
||
Following tests are done in U-mode |
|||||
cp_vsint_disabled_u |
VS-mode interrupts are globally disabled in U-mode |
hideleg = hip = hie = 0x444. Change to U-mode. |
Nothing |
1 |
|
Four hie/hip bits aliased to mie/mip |
|||||
Generating hip.VSEIP with hvip |
|||||
Generating hip.VSEIP with hgeip |
|||||
Generating hip.VSTIP with hivip.vstip |
|||||
Generating hip.VSTIP with vstimecmp and htimedelta (Sstc supported) |
See SstcH |
||||
generating hip.VSSIP with hvip.VSSIP |
|||||
generating hip.VSSIP by writing it directly |
|||||
priority of interrupts |
|||||
Generating hip.SGEIP with one or more of hgeip & hgeie |
|||||
When hideleg is set, hip and hie bit is aliased to vsip and vsie * mideleg required too? |
|||||
Delegated interrupts replace supervisor interrupts (test both) |
|||||
Priority of interrupts |
|||||
Interrupts not taken in higher mode? |
|||||
Delegated interrupts are read-only zero in sie/sip. Undelegated read-only zero in hip/hie |
|||||
delegated interrupts are masked at the delegator privilege level |
|||||
interrupts to S mode take priority over interrupts to lower priv mode |
|||||
However, interrupts directed to HS-level continue to be indicated in |
|||||
the HS-level sip register, not in vsip, when V=1. |
|||||
B.8.4. EndianH Hypervisor Endianness
| Coverpoint | Goal | Feature Description | Expectation | Bins | ID | Notes |
|---|---|---|---|---|---|---|
cp_hstatus_vbe_endianness |
endianvs |
VSBE |
Read from memory in an endian fashion in supervisor mode. |
Run test in VS mode. For each endianness given by hstatus.VSBE, sd 0x0102030405060708 to scratch, and also write all subwords with sw, sh, sb. For each endianness (independent), ld, lw, lwu, lh, lhu, lb, lbu it back. In RV32, don’t need the doubles. |
restore endianness to normal afterward |
Check against RM |
cp_mstatus_mprv_vsbe_endianness |
endianvs |
MPRV, MBE, VSBE |
Read from memory in an endian fashion based on MBE and VSBE depending on MPRV. |
Run test in machine mode. Each endianness is a cross-product of MPRV = 0/1, MPP = 01/11, MPV=0/1, MBE = 0/1, VSBE = 0/1 (32 bins). For each endianness, sd 0x0102030405060708 to scratch, and also write all subwords with sw, sh, sb. For each endianness (independent), ld, lw, lwu, lh, lhu, lb, lbu it back. In RV32, don’t need the doubles. |
restore endianness to normal afterward |
Check against RM |
cp_vsstatus_ube_endianness |
endianvs |
UBE |
Read from memory in an endian fashion |
Run test in VU mode. For each endianness given in vsstatus.UBE, sd 0x0102030405060708 to scratch, and also write all subwords with sw, sh, sb. For each endianness (independent), ld, lw, lwu, lh, lhu, lb, lbu it back. In RV32, don’t need the doubles. |
restore endianness to normal afterward |
Check against RM |
Note: some implementations may make UBE a read-only copy of hstatus.VSBE, or VSBE a read-only copy of sstatus.SBE, or SBE and MBE might not be writable. |
||||||
B.8.5. H_Zicntr and Sm_Zicntr_H Hypervisor Counters
These are the Zicntr groups of the H and Sm suites, and run only when Zicntr and H are supported. Sm_Zicntr_H reads every counter from M-mode while walking mcounteren, hcounteren and scounteren together, and reads time with each htimedelta. H_Zicntr checks counter access from HS, VS, U and VU modes against mcounteren, hcounteren and scounteren, and time with htimedelta in each mode. H_Zicntr exercises hcounteren for all 32 counters, so no separate ZihpmH suite is needed.
Sm_Zicntr_H boots to M-mode and delegates nothing. The lower-mode counter accesses are in H_Zicntr. The counters are cycle, time, instret and each hpmcounter that HPM_COUNTER_EN implements. A counter has bins only when its MCOUNTENABLE_EN, HCOUNTENABLE_EN and SCOUNTENABLE_EN bits are set (writable).
| Coverpoint | Goal | Feature Description | Expectation | Bins | Normative Rule | Notes |
|---|---|---|---|---|---|---|
in M mode |
||||||
cp_mhscounteren_access_m |
vscounters |
Write walking 1s and 0s to all of mcounteren, hcounteren, scounteren (the same value in each). Read from corresponding counter and counterh in M-mode and attempt to write it |
Reads always succeed, because M-mode ignores the counter-enable registers; writes raise illegal instruction, because the counters are read-only |
{csrr, csrw} x counters x counter-enable bit {0, 1} |
mcounteren_op |
|
cp_delta_m |
htimedelta does not affect time in M mode |
With htimedelta = {0, 2^30, 2^32-1, 2^60, -1, -2^30, -2^60}, read time. In RV32, this also involves htimedeltah and timeh; 2^32-1 exercises the carry into the high half and -1 the 64-bit wrap. Note: do not check time directly against reference model, which might tick differently. Only look at the range of values: compare against a baseline time read just before with htimedelta = 0. |
0 ⇐ time - baseline < 2^30 in all circumstances |
7 htimedelta values * time (and timeh on RV32) |
htimedelta_sz_acc_op |
On RV32 each read of time reads timeh, time and timeh again, and repeats if timeh changed, so a carry between the reads cannot fail the check |
H_Zicntr boots to HS-mode and delegates nothing (hedeleg = 0), so the HS-mode handler takes the illegal- and virtual-instruction traps from U, VS and VU. The M-mode reads are in Sm_Zicntr_H. Each counter-enable walk writes a walking 1 and then a walking 0 to one counter-enable register, with the others preset to all 1s or all 0s. After each write it reads the counter whose bit is set or clear (and its high half on RV32) and attempts to write it. The counters are cycle, time, instret and each hpmcounter that HPM_COUNTER_EN implements. A write to a counter raises illegal instruction in every mode, because the counters are read-only CSRs, so the write is not HS-qualified. xcounteren fields are WARL and may be read-only zero. The coverpoints sample the accessed counter’s own bit in each counter-enable register, and a counter has bins only when its MCOUNTENABLE_EN, HCOUNTENABLE_EN and SCOUNTENABLE_EN bits are set (writable).
| Coverpoint | Goal | Feature Description | Expectation | Bins | Normative Rule | Notes |
|---|---|---|---|---|---|---|
in HS mode |
||||||
cp_scounteren_access_hs |
vscounters |
Write walking 1s and 0s to scounteren with mcounteren = all 1s, hcounteren = all 0s. Read from corresponding counter and counterh in HS-mode and attempt to write it |
Reads always succeed, because HS-mode ignores scounteren and hcounteren; writes raise illegal instruction |
{csrr, csrw} x counters x scounteren bit {0, 1} |
mcounteren_set_nxt_priv |
|
cp_delta_hs |
htimedelta does not affect time in HS mode |
With htimedelta = {0, 2^30, 2^32-1, 2^60, -1, -2^30, -2^60}, read time. In RV32, this also involves htimedeltah and timeh; 2^32-1 exercises the carry into the high half and -1 the 64-bit wrap. Note: do not check time directly against reference model, which might tick differently. Only look at the range of values: compare against a baseline time read just before with htimedelta = 0. |
0 ⇐ time - baseline < 2^30 in all circumstances |
7 htimedelta values * time (and timeh on RV32) |
htimedelta_sz_acc_op |
On RV32 each read of time reads timeh, time and timeh again, and repeats if timeh changed, so a carry between the reads cannot fail the check. The same applies to every cp_delta row. |
in VS mode |
||||||
cp_mcounteren_access_vs |
vscounters |
Write walking 1s and 0s to mcounteren with hcounteren = all 1s and scounteren = all 0s. Read from corresponding counter and counterh in VS-mode and attempt to write it |
Reads raise illegal instruction when the mcounteren bit is 0 and succeed when it is 1, because VS-mode ignores scounteren; writes raise illegal instruction |
{csrr, csrw} x counters x mcounteren bit {0, 1} |
mcounteren_clr_ill_inst_exc |
|
cp_mcounteren_access_vs_h0 |
vscounters |
Write walking 1s and 0s to mcounteren with hcounteren = all 0s and scounteren = all 0s. Read from corresponding counter and counterh in VS-mode and attempt to write it |
Reads raise illegal instruction when the mcounteren bit is 0 and virtual instruction when it is 1, because the hcounteren bit is 0; writes raise illegal instruction |
{csrr, csrw} x counters x mcounteren bit {0, 1} |
hcounteren_op |
|
cp_hcounteren_access_vs |
vscounters |
Write walking 1s and 0s to hcounteren with mcounteren = all 1s and scounteren = all 0s. Read from corresponding counter and counterh in VS-mode and attempt to write it |
Reads raise virtual instruction when the hcounteren bit is 0 and succeed when it is 1; writes raise illegal instruction |
{csrr, csrw} x counters x hcounteren bit {0, 1} |
H_cause_virtual_instruction_high |
|
cp_delta_vs |
htimedelta affects time in VS mode |
With htimedelta = {0, 2^30, 2^32-1, 2^60, -1, -2^30, -2^60}, read time. In RV32, this also involves htimedeltah and timeh; 2^32-1 exercises the carry into the high half and -1 the 64-bit wrap. Note: do not check time directly against reference model, which might tick differently. Only look at the range of values: compare against a baseline time read just before with htimedelta = 0. |
(time - baseline - htimedelta) mod 2^64 < 2^30 for each htimedelta, so time + htimedelta wraps modulo 2^64 |
7 htimedelta values * time (and timeh on RV32) |
htimedelta_sz_acc_op |
|
in U mode |
||||||
cp_scounteren_access_u |
vscounters |
Write walking 1s and 0s to scounteren with mcounteren = all 1s, hcounteren = all 0s. Read from corresponding counter and counterh in U-mode and attempt to write it |
Reads raise illegal instruction when the scounteren bit is 0 and succeed when it is 1, because U-mode ignores hcounteren; writes raise illegal instruction |
{csrr, csrw} x counters x scounteren bit {0, 1} |
scounteren_op |
|
cp_delta_u |
htimedelta does not affect time in U mode |
With htimedelta = {0, 2^30, 2^32-1, 2^60, -1, -2^30, -2^60}, read time. In RV32, this also involves htimedeltah and timeh; 2^32-1 exercises the carry into the high half and -1 the 64-bit wrap. Note: do not check time directly against reference model, which might tick differently. Only look at the range of values: compare against a baseline time read just before with htimedelta = 0. |
0 ⇐ time - baseline < 2^30 in all circumstances |
7 htimedelta values * time (and timeh on RV32) |
htimedelta_sz_acc_op |
|
in VU mode |
||||||
cp_mcounteren_access_vu |
vscounters |
Write walking 1s and 0s to mcounteren with hcounteren = scounteren = all 1s. Read from corresponding counter and counterh in VU-mode and attempt to write it |
Reads raise illegal instruction when the mcounteren bit is 0 and succeed when it is 1; writes raise illegal instruction |
{csrr, csrw} x counters x mcounteren bit {0, 1} |
hcounteren_scounteren_vu_op |
|
cp_mcounteren_access_vu_hs0 |
vscounters |
Write walking 1s and 0s to mcounteren with hcounteren = scounteren = all 0s. Read from corresponding counter and counterh in VU-mode and attempt to write it |
Reads raise illegal instruction when the mcounteren bit is 0 and virtual instruction when it is 1, because the hcounteren and scounteren bits are 0; writes raise illegal instruction |
{csrr, csrw} x counters x mcounteren bit {0, 1} |
hcounteren_op |
|
cp_hcounteren_access_vu |
vscounters |
Write walking 1s and 0s to hcounteren with mcounteren = scounteren = all 1s. Read from corresponding counter and counterh in VU-mode and attempt to write it |
Reads raise virtual instruction when the hcounteren bit is 0 and succeed when it is 1; writes raise illegal instruction |
{csrr, csrw} x counters x hcounteren bit {0, 1} |
H_cause_virtual_instruction_high |
|
cp_scounteren_access_vu |
vscounters |
Write walking 1s and 0s to scounteren with mcounteren = hcounteren = all 1s. Read from corresponding counter and counterh in VU-mode and attempt to write it |
Reads raise virtual instruction when the scounteren bit is 0 and succeed when it is 1; writes raise illegal instruction |
{csrr, csrw} x counters x scounteren bit {0, 1} |
hcounteren_scounteren_vu_op |
|
cp_delta_vu |
htimedelta affects time in VU mode |
With htimedelta = {0, 2^30, 2^32-1, 2^60, -1, -2^30, -2^60}, read time. In RV32, this also involves htimedeltah and timeh; 2^32-1 exercises the carry into the high half and -1 the 64-bit wrap. Note: do not check time directly against reference model, which might tick differently. Only look at the range of values: compare against a baseline time read just before with htimedelta = 0. |
(time - baseline - htimedelta) mod 2^64 < 2^30 for each htimedelta, so time + htimedelta wraps modulo 2^64 |
7 htimedelta values * time (and timeh on RV32) |
htimedelta_sz_acc_op |
|
B.8.6. PMPH Hypervisor Physical Memory Protection
| Coverpoint | Goal | Feature Description | Expectation | Bins | ID | Normative Rule |
|---|---|---|---|---|---|---|
This test plan verifies correct enforcement of PMP in systems implementing the RISC-V Hypervisor extension. It ensures that PMP permissions are applied consistently across all relevant privilege modes (M, HS, VS, and VU), including accesses performed through hypervisor-specific load and store instructions and under one-stage and two-stage address translation. |
||||||
cp_pmp_hs_mode_access |
Verify PMP applies in HS-mode |
HS-mode executes {lw, sw, jalr} to PMP-protected region |
Access allowed iff PMP permits on final PA |
{R,W,X} × {allow/deny} |
pmp_hs_access_v0 |
norm:pmp_check_priv_modes |
cp_pmp_vs_mode_access |
Verify PMP applies in VS-mode |
Access allowed iff PMP permits on final PA |
{R,W,X} × {allow/deny} |
pmp_vs_access_v0 |
norm:pmp_check_priv_modes, norm:pmp_with_paging |
|
cp_pmp_vu_mode_access |
Verify PMP applies in VU-mode |
VS-mode access via VS-stage or 2-stage translation |
Access allowed iff PMP permits on final PA |
{R,W,X} × {allow/deny} |
pmp_vu_access_v0 |
norm:pmp_check_priv_modes |
cp_pmp_hlv_read |
Verify HLV obeys PMP.R |
HS-mode executes HLV* into PMP.R=0 region |
Load access fault |
{HLVB,HLVH,HLVW,HLVD} |
pmp_hlv_r_v0 |
norm:pmp_load_fault, norm:pmp_rwx_check |
cp_pmp_hsv_write |
Verify HSV obeys PMP.W |
HS-mode executes HSV into PMP.W=0 region |
Store access fault |
{HSV} |
pmp_hsv_w_v0 |
norm:pmp_store_fault |
cp_pmp_hlvx_x_only |
Ensure HLVX does not bypass X-only PMP |
PMP region X=1, R=W=0; HS executes HLVX |
Load access fault |
{X-only} |
pmp_hlvx_xonly_v0 |
norm:pmp_load_fault, norm:pmp_rwx_check |
cp_pmp_hlvx_r_allowed |
Verify HLVX works when PMP.R=1 |
PMP region R=1; HS executes HLVX |
Load succeeds |
{R=1} |
pmp_hlvx_r_v0 |
norm:pmp_rwx_check |
cp_pmp_after_gstage |
Verify PMP checked after G-stage |
G-stage translation succeeds, PMP denies |
Access fault (not page fault) |
{allow/deny} |
pmp_gstage_order_v0 |
norm:pmp_with_paging |
cp_pmp_after_vsstage |
Verify PMP checked after VS-stage |
VS-stage translation succeeds, PMP denies |
Access fault |
{deny} |
pmp_vsstage_order_v0 |
norm:pmp_with_paging |
cp_pmp_pf_priority |
Verify page fault precedes PMP |
VS or G-stage translation fault |
Page fault raised |
{VS,G} |
pmp_pf_prio_v0 |
norm:pmp_with_paging |
cp_pmp_exec_fault_h |
PMP exec violation in virtualized mode |
VS/HS instruction fetch denied by PMP |
Instruction access fault |
{HS,VS} |
pmp_exec_fault_h_v0 |
norm:pmp_exec_fault |
cp_pmp_precise_trap_h |
PMP faults are precise |
Faulting instruction does not retire |
PC points to faulting insn |
{all types} |
pmp_precise_v0 |
norm:pmp_violation_precise_trap |
cp_pmp_hfence_translation |
HFENCE required only for G-stage |
Change hgatp/PT + PMP |
Translation changes visible only after HFENCE |
{before/after} |
pmp_hfence_v0 |
norm:pmp_with_paging |
cp_pmp_block |
Check PMP and PMPH enforcement |
Execute {hlv*, hsv*, hlvx*} targeting addresses disallowed by PMP/PMPH config |
Should raise Load/Store Access Fault |
instr × priv_mode × pmp_cfg_case |
||
pmp_twostage_interaction |
Verify PMP interaction with two-stage translation |
Test Setup: Configure G-stage page tables with various GPA to SPA mappings. Set up PMP regions covering different SPA ranges with varying permissions (R/W/X combinations). Execute memory operations from VS/VU modes that trigger two-stage translation. |
PMP should apply to final supervisor physical addresses regardless of virtualization mode |
PMP configurations (R/W/X/A/L) × translation results (success/fail) × privilege modes (HS/VS/VU) |
||
pmp_gstage_pagetable_access |
Verify PMP protection of G-stage page tables |
Test Setup: Configure PMP regions to selectively protect/allow access to G-stage page table memory locations. Map G-stage page tables at known physical addresses and configure PMP regions to cover these addresses with varying permissions. |
PMP should protect G-stage page table accesses and cause appropriate faults |
PMP settings (deny/allow) × page table access patterns (read/write) × page table levels (L0/L1/L2/L3) |
||
pmp_hypervisor_priority |
Verify PMP vs hypervisor exception priority |
Test Setup: Create scenarios where both PMP violations and guest page faults can occur simultaneously. Configure G-stage page tables with invalid entries and PMP regions that would also deny access. |
PMP exceptions should have higher priority than virtualization exceptions |
Exception combinations (PMP fault + guest page fault) × access types (read/write/execute) × privilege levels |
||
pmp_gpa_spa_mapping |
Verify PMP application to guest physical addresses |
Test Setup: Configure G-stage page tables with various GPA to SPA mappings including identity, offset, and scattered mappings. Set up PMP regions covering specific SPA ranges. |
PMP should check supervisor physical addresses, not guest physical addresses |
GPA ranges × SPA mappings × PMP rule coverage × translation validity |
||
pmp_atomic_operations |
Verify PMP with atomic operations in virtualized environment |
Test Setup: Configure atomic memory regions accessible through two-stage translation with various PMP protections. Set up alignment-sensitive test addresses. |
Atomic Operation will give guest page fault if PTE permissions are violated, else access fault if PMP permissions fail |
Atomic operation types (AMO/LR/SC) × PMP permissions × virtualization modes × address alignment |
||
pmp_instruction_fetch |
Verify PMP execute permissions with virtualized instruction fetch |
Test Setup: Place executable code at various SPA locations with different PMP execute permissions. Configure G-stage translation to map VS-mode code regions to these SPAs. |
Execute permissions should be enforced on final physical addresses |
Instruction fetch scenarios × execute permissions (granted/denied) × translation stages × privilege transitions |
||
pmp_interrupt_handling |
Verify PMP during interrupt/exception handling in virtualized modes |
Test Setup: Configure interrupt delegation (mideleg/sideleg) for VS-mode interrupt handling. Set up interrupt handlers at various SPA locations with different PMP protections. |
Interrupt handlers should respect PMP boundaries after address translation |
Interrupt types (external/timer/software) × handler locations × PMP rule coverage × virtualization modes |
||
pmp_nested_virtualization |
Verify PMP with nested virtualization scenarios |
Test Setup: Configure nested hypervisor environment (if supported by implementation). Set up multiple levels of address translation with PMP enforcement at appropriate levels. |
PMP should apply consistently across all virtualization levels |
Nesting levels × PMP configurations × address translation chains × privilege mode combinations |
||
pmp_memory_ordering |
Verify memory ordering constraints with PMP in virtualized environment |
Test Setup: Configure memory regions with different PMP permissions accessible via two-stage translation. Create memory operation sequences that can test ordering semantics across PMP faults. |
Memory ordering should be preserved even when PMP violations occur |
Memory operation sequences × PMP fault locations × ordering constraints × virtualization modes |
||
pmp_fault_delegation |
Verify fault delegation with PMP in virtualized environment |
Test Setup: Configure trap delegation registers (medeleg/sedeleg, hideleg/hedeleg) for various fault types. Set up scenarios where PMP faults can occur in different privilege modes. |
PMP faults should be delegated according to virtualization and delegation settings |
Fault types × delegation configurations × virtualization modes × trap handling |
||
pmp_edge_cases |
Verify PMP edge cases in virtualized environment |
Test Setup: Configure PMP regions at critical address boundaries (address space limits, wraparound conditions). Set up two-stage translation with edge case address mappings. |
System should handle edge cases gracefully without undefined behavior |
Edge conditions (address boundaries/wrap-around/alignment) × PMP configurations × virtualization states |
||
Test Configuration Notes |
||||||
hypervisor loads and stores depend on PMP |
||||||
hlvx does not override PMP execute-only |
||||||
PMP intgeraction with fences G and VS-stage |
||||||
General Setup for All Tests: |
||||||
Use PMP_writable_regs = 16 for test runtime optimization |
||||||
Configure bottom region (region 15 or PMP_writable_regs-1) as background: pmpcfg_n.A=NAPOT, RWX permissions, pmpcfg_n.L=1, pmpaddr_n=All_ones |
||||||
Execute in M-mode unless specified otherwise |
||||||
Standard regions use NAPOT of max(g,8) bytes, placed beyond code without overlapping other standard regions |
||||||
Default TOR regions aligned to grain size g, starting beyond program end, size g |
||||||
After PMP CSR writes, issue sfence.vma or hfence.gvma for synchronization |
||||||
Handle sfence.vma illegal instruction traps on systems with satp.MODE read-only zero |
||||||
Legal pmpcfg.XWR combinations: {000, 001, 011, 100, 101, 110} (W=1,R=0 is reserved) |
||||||
Grain size g = 2^(G+2) where G is the PMP grain size parameter |
||||||
For RV32 systems, exclude lwu, ld, sd instructions from testing |
||||||
Address Translation Setup: |
||||||
Configure valid G-stage page tables for two-stage translation testing |
||||||
Use appropriate VMID and ASID values for TLB management tests |
||||||
Set up hgatp register for G-stage translation control |
||||||
Configure proper privilege mode transitions between HS, VS, and VU modes |
||||||
Synchronization Requirements: |
||||||
Issue HFENCE.GVMA with rs1=x0, rs2=x0 after PMP changes affecting translation structures |
||||||
Use appropriate memory barriers for cache coherency testing |
||||||
Ensure proper ordering of configuration changes relative to memory operations |
||||||
B.8.7. Hypervisor 2-Stage Virtual Memory
The hypervisor virtual memory tests are the Sv_H, Sv_HSm and Sv_HZicbo groups of the Sv suite. PMP on their cache-block operations is in the PMP_HSvZicbo group of the PMP suite.
B.8.8. Shcounterenw Writable Counter Enables
| Coverpoint | Goal | Feature Description | Expectation | Bins | Normative Rule |
|---|---|---|---|---|---|
Following tests are done in HS-mode |
|||||
cp_shcounterenw |
which hcounteren bits are writable |
Set and clear each bit of hcounteren, then write all 1s and all 0s, as Sscounterenw does for scounteren. |
0 writes 32 bits of 0 |
2 |
Shcounterenw_hpmcounter_hcounteren |
| Normative Rule | Rule Text | Coverpoints |
|---|---|---|
Shcounterenw_hpmcounter_hcounteren |
Shcounterenw_cg/cp_shcounterenw |
|
hcounteren_warl |
Shcounterenw_cg/cp_shcounterenw |
UDB Parameters: None.
B.8.9. Shvsatpa Virtual Memory Modes Supported
| Coverpoint | Goal | Feature Description | Expectation | Bins | Normative Rule |
|---|---|---|---|---|---|
Following tests are done in HS-mode |
|||||
cp_shvsatpa |
Check all values writable to vsatp.mode |
Write vsatp with MODE = Bare and with Sv32 (MODE 1, RV32) or each of Sv39, Sv48 and Sv57 (MODE 8, 9 and 10, RV64) whose satp mode is supported, with the other fields zero, because Bare with nonzero fields is UNSPECIFIED; read vsatp back. |
Each value reads back as written |
Bare + 1 per supported satp mode (2 on RV32, up to 4 on RV64) |
Shvsatpa_satp_vsatp_modes |
| Normative Rule | Rule Text | Coverpoints |
|---|---|---|
Shvsatpa_satp_vsatp_modes |
Shvsatpa_cg/cp_shvsatpa |
UDB Parameters: None.
B.8.10. Shgatpa Virtual Memory x4 Modes Supported
| Coverpoint | Goal | Feature Description | Expectation | Bins | Normative Rule |
|---|---|---|---|---|---|
Following tests are done in HS-mode |
|||||
cp_shgatpa |
Check all values writable to hgatp.mode |
Write hgatp with MODE = Bare and with Sv32x4 (MODE 1, RV32) or each of Sv39x4, Sv48x4 and Sv57x4 (MODE 8, 9 and 10, RV64) whose satp mode is supported, with the other fields zero, because Bare with nonzero fields is UNSPECIFIED; read hgatp back. |
Each value reads back as written |
Bare + 1 per supported satp mode (2 on RV32, up to 4 on RV64) |
Shgatpa_satp_hgatp_mode_support |
| Normative Rule | Rule Text | Coverpoints |
|---|---|---|
Shgatpa_satp_hgatp_mode_support |
Shgatpa_cg/cp_shgatpa |
|
Shgatpa_hgatp_bare_mode |
Shgatpa_cg/cp_shgatpa |
UDB Parameters: None.
B.8.11. Shvstvecd VS-Mode Direct Vectors
| Coverpoint | Goal | Feature Description | Expectation | Bins | Normative Rule |
|---|---|---|---|---|---|
Following tests are done in HS-mode |
|||||
cp_vstvec_vaddr_pc |
Check vstvec.MODE can be 0 and when it is, vstvec.base can hold valid 4-byte aligned addresses |
Write vstvec = two physical addresses with MODE = Direct, the current pc and the scratch area, and read it back. They are valid even when address translation is off. |
vstvec gets value written |
2 |
Shvstvecd_vstvec_mode_direct |
cp_vstvec_vaddr_walk1 |
vstvec.BASE holds every valid 4-byte-aligned virtual address when vstvec.MODE = Direct |
Write a walking 1 (0s in the msbs) and a walking 0 (1s in the msbs) through bits 2 to VALEN-2 of vstvec (bit 31 on RV32) with MODE = Direct, and read it back. Canonical addresses have bits XLEN-1:VALEN-1 equal, so only bits up to VALEN-2 are walked. VALEN is set by the largest of Sv39, Sv48 and Sv57 that satp supports; the walk needs Sv32 or Sv39. |
vstvec gets value written |
2 x walked bits (30 on RV32, 36/45/54 for Sv39/Sv48/Sv57) |
Shvstvecd_vstvec_mode_direct |
| Normative Rule | Rule Text | Coverpoints |
|---|---|---|
Shvstvecd_vstvec_mode_direct |
Shvstvecd_cg/{cp_vstvec_vaddr_pc, cp_vstvec_vaddr_scratch, cp_vstvec_vaddr_walk1, cp_vstvec_vaddr_walk0} |
|
Shvstvecd_vstvec_base_aligned_address |
Shvstvecd_cg/cp_vstvec_vaddr_walk1, Shvstvecd_cg/cp_vstvec_vaddr_walk0, Shvstvecd_cg/cp_vstvec_vaddr_pc, Shvstvecd_cg/cp_vstvec_vaddr_scratch |
|
vstvec_img |
Shvstvecd_cg/cp_vstvec_vaddr_walk1, Shvstvecd_cg/cp_vstvec_vaddr_walk0 |
UDB Parameters: None.
B.8.12. Shvstvala VS-Mode Trap Address
Shvstvala boots to HS-mode, which delegates the exceptions to VS-mode with hedeleg. Each exception is raised in VS-mode and in VU-mode after vstval is set to a random value, so a hart that does not write vstval fails, and the VS-mode trap handler records vstval. The access-fault and misaligned tests reuse the Exceptions test sequences with vsatp = hgatp = Bare; the page-fault tests run under two-stage translation. Virtual-instruction exceptions are never taken in VS-mode (hedeleg[22] is read-only zero), so the Sstvala case for them does not apply. Each access-fault test needs RVMODEL_ACCESS_FAULT_ADDRESS_{FETCH/LOAD/STORE} for its access type. The misaligned load and store tests are compiled only without MISALIGNED_LDST, and the misaligned fetch test only without Zca; no current H configuration assembles them, so they were checked only with scratch Sail configurations.
| Coverpoint | Goal | Feature Description | Expectation | Bins | Normative Rule | Status | Notes |
|---|---|---|---|---|---|---|---|
cp_load_page_fault |
Fault writes VA to vstval |
In VS-mode and VU-mode under two-stage translation, load from a VS-stage page without R |
vstval written with VA |
{VS, VU} x lw x load page fault x vstval = address |
Shvstvala_vstval_written |
||
cp_store_page_fault |
Fault writes VA to vstval |
In VS-mode and VU-mode under two-stage translation, store to a VS-stage page without W |
vstval written with VA |
{VS, VU} x sw x store/AMO page fault x vstval = address |
|||
cp_instr_page_fault |
Fault writes VA to vstval |
In VS-mode and VU-mode under two-stage translation, fetch from a VS-stage page without X |
vstval written with VA |
{VS, VU} x jalr x instruction page fault x vstval = target |
Shvstvala_vstval_written |
||
cp_load_access_fault |
Fault writes VA to vstval |
In VS-mode and VU-mode, each load (lb, lbu, lh, lhu, lw, and lwu, ld on RV64) from RVMODEL_ACCESS_FAULT_ADDRESS_LOAD |
vstval written with VA |
{VS, VU} x each load x load access fault x vstval = address |
Shvstvala_vstval_written |
||
cp_store_access_fault |
Fault writes VA to vstval |
In VS-mode and VU-mode, each store (sb, sh, sw, and sd on RV64) to RVMODEL_ACCESS_FAULT_ADDRESS_STORE |
vstval written with VA |
{VS, VU} x each store x store/AMO access fault x vstval = address |
|||
cp_instr_access_fault |
Fault writes VA to vstval |
In VS-mode and VU-mode, jalr to RVMODEL_ACCESS_FAULT_ADDRESS_FETCH |
vstval written with VA |
{VS, VU} x jalr x instruction access fault x vstval = target |
|||
cp_load_address_misaligned |
Fault writes VA to vstval |
Only without MISALIGNED_LDST. In VS-mode and VU-mode, each load wider than a byte at offsets 0-7 of a scratch doubleword |
vstval written with VA for each misaligned load |
{VS, VU} x each load wider than a byte x load address misaligned x vstval = address |
|||
cp_store_address_misaligned |
Fault writes VA to vstval |
Only without MISALIGNED_LDST. In VS-mode and VU-mode, each store wider than a byte at offsets 0-7 of a scratch doubleword |
vstval written with VA for each misaligned store |
{VS, VU} x each store wider than a byte x store/AMO address misaligned x vstval = address |
Shvstvala_vstval_written |
||
cp_load_misaligned_word |
Fault writes VA to vstval for each misalignment |
Only without MISALIGNED_LDST. The misaligned word and (on RV64) doubleword accesses of cp_load_address_misaligned and cp_store_address_misaligned, binned by the address offset within the access’s natural alignment. A halfword can only be misaligned by 1. |
vstval written with VA for each misalignment |
{VS, VU} x {lw, lwu} or sw x offsets 1-3 x address misaligned x vstval = address; {VS, VU} x ld or sd x offsets 1-7 x address misaligned x vstval = address |
|||
cp_instr_adr_misaligned_jalr |
Fault writes VA to vstval |
Only without Zca. In VS-mode and VU-mode, jalr with each combination of rs1[1:0] and offset[1:0] |
vstval written with the target address for each target with bit 1 set |
{VS, VU} x jalr x instruction address misaligned x vstval = target |
|||
cp_illegal_instruction |
Fault writes instr to vstval |
In VS-mode and VU-mode, execute the instructions 0x00000000 and 0xFFFFFFFF |
vstval written with instr |
{VS, VU} x {0x00000000, 0xFFFFFFFF} x illegal instruction x vstval = instruction |
Shvstvala_vstval_written |
||
Not tested |
|||||||
Breakpoint exceptions that write an address write it to vstval |
Shvstvala_vstval_written |
Not tested |
In VS-mode and VU-mode these come only from Sdtrig triggers. The SdtrigH suite, which is not yet in act4, delegates them to VS-mode (hedeleg[3] = 1), where the trap handler records vstval. |
||||
| Normative Rule | Rule Text | Coverpoints |
|---|---|---|
Shvstvala_vstval_written, hedeleg_op |
Shvstvala_vstval_written: If the Shvstvala extension is implemented, vstval must be written in all cases described in sstvala for stval. hedeleg_op: A synchronous trap that has been delegated to HS-mode (using medeleg) is further delegated to VS-mode if V=1 before the trap and the corresponding hedeleg bit is set. |
Shvstvala_cg/cp_load_access_fault, Shvstvala_cg/cp_store_address_misaligned, Shvstvala_cg/cp_illegal_instruction, Shvstvala_cg/cp_instr_page_fault |
UDB Parameters: None.
B.8.13. Shtvala HS-Mode Trap Address
Shtvala boots to HS-mode. The tests take guest-page faults from VS-mode and VU-mode, and from HLV and HSV in HS-mode and U-mode, into HS-mode, which records htval and htinst. htval is set to a random value before each trap, so a hart that does not write it fails. Each fault is taken twice: through a VS-stage superpage leaf whose guest physical address the G-stage leaves unmapped, where the final access faults and htval holds its guest physical address >> 2 (whose page offset matches the virtual address), and through a VS-stage pointer to a page table at such an address, where the implicit VS-stage PTE read faults, htval holds the PTE’s guest physical address >> 2 and htinst holds a pseudoinstruction. The coverpoints tell the two apart by htinst and by comparing the page offset of htval << 2 with that of the virtual address, so they need no fixed address.
| Coverpoint | Goal | Feature Description | Expectation | Bins | Normative Rule |
|---|---|---|---|---|---|
cp_load_guest_page_fault |
Fault writes GPA >> 2 to htval |
In VS-mode and VU-mode, cause load guest-page faults on the final access and on the implicit VS-stage PTE read |
htval written with the faulting guest physical address >> 2 |
{VS, VU} x lw x load guest-page fault x {final access, implicit PTE read} |
Shtvala_htval_faulting_gpa |
cp_store_guest_page_fault |
Fault writes GPA >> 2 to htval |
In VS-mode and VU-mode, cause store guest-page faults on the final access and on the implicit VS-stage PTE read |
htval written with the faulting guest physical address >> 2 |
{VS, VU} x sw x store/AMO guest-page fault x {final access, implicit PTE read} |
Shtvala_htval_faulting_gpa |
cp_instr_guest_page_fault |
Fault writes GPA >> 2 to htval |
In VS-mode and VU-mode, cause fetch guest-page faults on the final access and on the implicit VS-stage PTE read |
htval written with the faulting guest physical address >> 2 |
{VS, VU} x jalr x instruction guest-page fault x {final access, implicit PTE read} |
Shtvala_htval_faulting_gpa |
cp_amo_guest_page_fault |
AMO and LR guest-page faults write GPA >> 2 to htval |
Only with Zaamo (amoswap.w) or Zalrsc (lr.w). In VS-mode and VU-mode, cause guest-page faults on the final access and on the implicit VS-stage PTE read. |
Store/AMO guest-page fault for amoswap.w and load guest-page fault for lr.w, with htval written with the faulting guest physical address >> 2. rd is unchanged. |
{VS, VU} x {amoswap.w, lr.w} x guest-page fault x {final access, implicit PTE read} |
Shtvala_htval_faulting_gpa |
cp_hlv_guest_page_fault |
HLV, HLVX and HSV guest-page faults write GPA >> 2 to htval |
In HS-mode and in U-mode with hstatus.HU = 1, both with hstatus.SPVP = 0, execute hlv.w, hlvx.wu and hsv.w where the final access or the implicit VS-stage PTE read has an unmapped guest physical address. The VS-stage and G-stage leaves allow execution, so hlvx.wu passes its permission check. |
Load guest-page fault for hlv.w and hlvx.wu and store/AMO guest-page fault for hsv.w, taken in HS-mode, with htval written with the faulting guest physical address >> 2. A faulting load leaves rd unchanged. |
{HS, U} x {hlv.w, hlvx.wu, hsv.w} x guest-page fault x {final access, implicit PTE read} |
Shtvala_htval_faulting_gpa |
cp_instr_straddle_guest_page_fault |
A fetch that straddles into an unmapped guest page writes the page-boundary GPA >> 2 to htval |
Only with Zca. In VS-mode and VU-mode, jalr to a 32-bit instruction two bytes below the end of a mapped guest page whose successor has an unmapped guest physical address. |
Instruction guest-page fault on the second half of the instruction. sepc holds the start of the instruction, stval the page-boundary address and htval its guest physical address >> 2. |
{VS, VU} x jalr x instruction guest-page fault x target at page end - 2 x htval at page boundary |
H_straddle |
cp_load_straddle_guest_page_fault |
A misaligned access that straddles into an unmapped guest page writes the page-boundary GPA >> 2 to htval |
In VS-mode and VU-mode, lw and sw two bytes below the end of a mapped guest page whose successor has an unmapped guest physical address. The coverpoints need MISALIGNED_LDST; harts that do not perform misaligned accesses run the test and raise an address-misaligned exception instead. |
Load or store/AMO guest-page fault on the part of the access in the next page, however the hart splits it. stval holds the page-boundary address and htval its guest physical address >> 2. |
{VS, VU} x {lw, sw} x guest-page fault x address at page end - 2 x htval at page boundary |
H_straddle |
cp_hlv_straddle_guest_page_fault |
HLV and HSV that straddle into an unmapped guest page write htval and the htinst Addr. Offset |
In HS-mode with hstatus.SPVP = 0 and in U-mode with hstatus.HU = 1, hlv.w and hsv.w two bytes below the end of a mapped guest page whose successor has an unmapped guest physical address. The coverpoints need MISALIGNED_LDST, as above. |
Load or store/AMO guest-page fault. htval holds the page-boundary guest physical address >> 2. A faulting hlv.w leaves rd unchanged. htinst is zero or holds an Addr. Offset of 2, the difference between the faulting virtual address in stval and the original virtual address; HS-mode checks it, and the trap record holds it for U-mode. |
{HS, U} x {hlv.w, hsv.w} x guest-page fault x address at page end - 2 x htval at page boundary |
H_straddle |
UDB Parameters: None.
B.8.14. Shlcofideleg Hypervisor Counter Overflow Delegation
Develop this after baseline overflow delegation tests
B.8.15. Zkr Hypervisor Entropy Register
The hypervisor entropy tests are the H group of the Zkr suite: see Table 176.
B.8.16. Sstc Hypervisor Timer Compare
B.8.17. SscrindH Hypervisor Indirect CSR Access
Hypervisor indirect CSR access.
Develop this after baseline indirect CSR tests
B.8.18. SscfgH Hypervisor Counter Delegation
Develop this after baseline Sscfg tests
B.8.19. SmctrH Hypervisor Control Transfer Records
Develop this after baseline control transfer record tests
B.8.20. Svinval Hypervisor Memory Management Table Invalidation
B.8.21. Svadu, Svpbmt and Svnapot Hypervisor Virtual Memory
B.8.22. Hypervisor Landing Pads
The hypervisor landing pad tests are the Zicfilp_H and Zicfilp_SmH groups of the Zicfilp suite.
B.8.23. SsdbltrpH Hypervisor Double Trap
-
develop after Ssdbltrp
B.8.24. Hypervisor Pointer Masking
The hypervisor pointer masking tests are the Ssnpm_H group of the Ssnpm suite.
B.8.25. SmnpmH Hypervisor Pointer Masking
Develop this after baseline pointer masking tests
B.9. Vector Privileged Test Suites
All of the vector privileged suites are collected in this section. The machine-, supervisor-, and user-mode vector CSR tests, Sm_V, Sm_VF, S_V, S_VF, U_V, and U_VF, are part of the Sm, S, and U suites and their test plans.
B.9.1. MisalignV Vector Misalignment
MisalignV tests misaligned vector loads and stores. Unlike scalar misaligned suites, they are privileged tests that run whether or not misaligned accesses are supported, so they may trap or not depending on TODO UDBParameter.
| Instruction | vl1re16.v | vl1re32.v | vl1re64.v | vl1re8.v | vl2re16.v | vl2re32.v | vl2re64.v | vl2re8.v | vl4re16.v | vl4re32.v | vl4re64.v | vl4re8.v |
|---|---|---|---|---|---|---|---|---|---|---|---|---|
RV32 |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
RV64 |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
cp_misalignv_ls_wholereg_misaligned |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
| Instruction | vl8re16.v | vl8re32.v | vl8re64.v | vl8re8.v | vle16.v | vle16ff.v | vle32.v | vle32ff.v | vle64.v | vle64ff.v | vle8.v | vle8ff.v |
|---|---|---|---|---|---|---|---|---|---|---|---|---|
RV32 |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
RV64 |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
cp_misalignv_ls_element_misaligned |
x |
x |
x |
x |
x |
x |
x |
x |
||||
cp_misalignv_ls_wholereg_misaligned |
x |
x |
x |
x |
| Instruction | vlm.v | vloxei16.v | vloxei32.v | vloxei64.v | vloxei8.v | vloxseg2ei16.v | vloxseg2ei32.v | vloxseg2ei64.v | vloxseg2ei8.v | vloxseg3ei16.v | vloxseg3ei32.v | vloxseg3ei64.v |
|---|---|---|---|---|---|---|---|---|---|---|---|---|
RV32 |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
RV64 |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
cp_misalignv_ls_element_misaligned |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
| Instruction | vloxseg3ei8.v | vloxseg4ei16.v | vloxseg4ei32.v | vloxseg4ei64.v | vloxseg4ei8.v | vloxseg5ei16.v | vloxseg5ei32.v | vloxseg5ei64.v | vloxseg5ei8.v | vloxseg6ei16.v | vloxseg6ei32.v | vloxseg6ei64.v |
|---|---|---|---|---|---|---|---|---|---|---|---|---|
RV32 |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
RV64 |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
cp_misalignv_ls_element_misaligned |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
| Instruction | vloxseg6ei8.v | vloxseg7ei16.v | vloxseg7ei32.v | vloxseg7ei64.v | vloxseg7ei8.v | vloxseg8ei16.v | vloxseg8ei32.v | vloxseg8ei64.v | vloxseg8ei8.v | vlse16.v | vlse32.v | vlse64.v |
|---|---|---|---|---|---|---|---|---|---|---|---|---|
RV32 |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
RV64 |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
cp_misalignv_ls_element_misaligned |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
| Instruction | vlse8.v | vlseg2e16.v | vlseg2e16ff.v | vlseg2e32.v | vlseg2e32ff.v | vlseg2e64.v | vlseg2e64ff.v | vlseg2e8.v | vlseg2e8ff.v | vlseg3e16.v | vlseg3e16ff.v | vlseg3e32.v |
|---|---|---|---|---|---|---|---|---|---|---|---|---|
RV32 |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
RV64 |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
cp_misalignv_ls_element_misaligned |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
| Instruction | vlseg3e32ff.v | vlseg3e64.v | vlseg3e64ff.v | vlseg3e8.v | vlseg3e8ff.v | vlseg4e16.v | vlseg4e16ff.v | vlseg4e32.v | vlseg4e32ff.v | vlseg4e64.v | vlseg4e64ff.v | vlseg4e8.v |
|---|---|---|---|---|---|---|---|---|---|---|---|---|
RV32 |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
RV64 |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
cp_misalignv_ls_element_misaligned |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
| Instruction | vlseg4e8ff.v | vlseg5e16.v | vlseg5e16ff.v | vlseg5e32.v | vlseg5e32ff.v | vlseg5e64.v | vlseg5e64ff.v | vlseg5e8.v | vlseg5e8ff.v | vlseg6e16.v | vlseg6e16ff.v | vlseg6e32.v |
|---|---|---|---|---|---|---|---|---|---|---|---|---|
RV32 |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
RV64 |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
cp_misalignv_ls_element_misaligned |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
| Instruction | vlseg6e32ff.v | vlseg6e64.v | vlseg6e64ff.v | vlseg6e8.v | vlseg6e8ff.v | vlseg7e16.v | vlseg7e16ff.v | vlseg7e32.v | vlseg7e32ff.v | vlseg7e64.v | vlseg7e64ff.v | vlseg7e8.v |
|---|---|---|---|---|---|---|---|---|---|---|---|---|
RV32 |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
RV64 |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
cp_misalignv_ls_element_misaligned |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
| Instruction | vlseg7e8ff.v | vlseg8e16.v | vlseg8e16ff.v | vlseg8e32.v | vlseg8e32ff.v | vlseg8e64.v | vlseg8e64ff.v | vlseg8e8.v | vlseg8e8ff.v | vlsseg2e16.v | vlsseg2e32.v | vlsseg2e64.v |
|---|---|---|---|---|---|---|---|---|---|---|---|---|
RV32 |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
RV64 |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
cp_misalignv_ls_element_misaligned |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
| Instruction | vlsseg2e8.v | vlsseg3e16.v | vlsseg3e32.v | vlsseg3e64.v | vlsseg3e8.v | vlsseg4e16.v | vlsseg4e32.v | vlsseg4e64.v | vlsseg4e8.v | vlsseg5e16.v | vlsseg5e32.v | vlsseg5e64.v |
|---|---|---|---|---|---|---|---|---|---|---|---|---|
RV32 |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
RV64 |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
cp_misalignv_ls_element_misaligned |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
| Instruction | vlsseg5e8.v | vlsseg6e16.v | vlsseg6e32.v | vlsseg6e64.v | vlsseg6e8.v | vlsseg7e16.v | vlsseg7e32.v | vlsseg7e64.v | vlsseg7e8.v | vlsseg8e16.v | vlsseg8e32.v | vlsseg8e64.v |
|---|---|---|---|---|---|---|---|---|---|---|---|---|
RV32 |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
RV64 |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
cp_misalignv_ls_element_misaligned |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
| Instruction | vlsseg8e8.v | vluxei16.v | vluxei32.v | vluxei64.v | vluxei8.v | vluxseg2ei16.v | vluxseg2ei32.v | vluxseg2ei64.v | vluxseg2ei8.v | vluxseg3ei16.v | vluxseg3ei32.v | vluxseg3ei64.v |
|---|---|---|---|---|---|---|---|---|---|---|---|---|
RV32 |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
RV64 |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
cp_misalignv_ls_element_misaligned |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
| Instruction | vluxseg3ei8.v | vluxseg4ei16.v | vluxseg4ei32.v | vluxseg4ei64.v | vluxseg4ei8.v | vluxseg5ei16.v | vluxseg5ei32.v | vluxseg5ei64.v | vluxseg5ei8.v | vluxseg6ei16.v | vluxseg6ei32.v | vluxseg6ei64.v |
|---|---|---|---|---|---|---|---|---|---|---|---|---|
RV32 |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
RV64 |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
cp_misalignv_ls_element_misaligned |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
| Instruction | vluxseg6ei8.v | vluxseg7ei16.v | vluxseg7ei32.v | vluxseg7ei64.v | vluxseg7ei8.v | vluxseg8ei16.v | vluxseg8ei32.v | vluxseg8ei64.v | vluxseg8ei8.v | vs1r.v | vs2r.v | vs4r.v |
|---|---|---|---|---|---|---|---|---|---|---|---|---|
RV32 |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
RV64 |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
cp_misalignv_ls_element_misaligned |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
cp_misalignv_ls_wholereg_misaligned |
x |
x |
x |
| Instruction | vs8r.v | vse16.v | vse32.v | vse64.v | vse8.v | vsm.v | vsoxei16.v | vsoxei32.v | vsoxei64.v | vsoxei8.v | vsoxseg2ei16.v | vsoxseg2ei32.v |
|---|---|---|---|---|---|---|---|---|---|---|---|---|
RV32 |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
RV64 |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
cp_misalignv_ls_element_misaligned |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
cp_misalignv_ls_wholereg_misaligned |
x |
| Instruction | vsoxseg2ei64.v | vsoxseg2ei8.v | vsoxseg3ei16.v | vsoxseg3ei32.v | vsoxseg3ei64.v | vsoxseg3ei8.v | vsoxseg4ei16.v | vsoxseg4ei32.v | vsoxseg4ei64.v | vsoxseg4ei8.v | vsoxseg5ei16.v | vsoxseg5ei32.v |
|---|---|---|---|---|---|---|---|---|---|---|---|---|
RV32 |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
RV64 |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
cp_misalignv_ls_element_misaligned |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
| Instruction | vsoxseg5ei64.v | vsoxseg5ei8.v | vsoxseg6ei16.v | vsoxseg6ei32.v | vsoxseg6ei64.v | vsoxseg6ei8.v | vsoxseg7ei16.v | vsoxseg7ei32.v | vsoxseg7ei64.v | vsoxseg7ei8.v | vsoxseg8ei16.v | vsoxseg8ei32.v |
|---|---|---|---|---|---|---|---|---|---|---|---|---|
RV32 |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
RV64 |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
cp_misalignv_ls_element_misaligned |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
| Instruction | vsoxseg8ei64.v | vsoxseg8ei8.v | vsse16.v | vsse32.v | vsse64.v | vsse8.v | vsseg2e16.v | vsseg2e32.v | vsseg2e64.v | vsseg2e8.v | vsseg3e16.v | vsseg3e32.v |
|---|---|---|---|---|---|---|---|---|---|---|---|---|
RV32 |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
RV64 |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
cp_misalignv_ls_element_misaligned |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
| Instruction | vsseg3e64.v | vsseg3e8.v | vsseg4e16.v | vsseg4e32.v | vsseg4e64.v | vsseg4e8.v | vsseg5e16.v | vsseg5e32.v | vsseg5e64.v | vsseg5e8.v | vsseg6e16.v | vsseg6e32.v |
|---|---|---|---|---|---|---|---|---|---|---|---|---|
RV32 |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
RV64 |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
cp_misalignv_ls_element_misaligned |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
| Instruction | vsseg6e64.v | vsseg6e8.v | vsseg7e16.v | vsseg7e32.v | vsseg7e64.v | vsseg7e8.v | vsseg8e16.v | vsseg8e32.v | vsseg8e64.v | vsseg8e8.v | vssseg2e16.v | vssseg2e32.v |
|---|---|---|---|---|---|---|---|---|---|---|---|---|
RV32 |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
RV64 |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
cp_misalignv_ls_element_misaligned |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
| Instruction | vssseg2e64.v | vssseg2e8.v | vssseg3e16.v | vssseg3e32.v | vssseg3e64.v | vssseg3e8.v | vssseg4e16.v | vssseg4e32.v | vssseg4e64.v | vssseg4e8.v | vssseg5e16.v | vssseg5e32.v |
|---|---|---|---|---|---|---|---|---|---|---|---|---|
RV32 |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
RV64 |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
cp_misalignv_ls_element_misaligned |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
| Instruction | vssseg5e64.v | vssseg5e8.v | vssseg6e16.v | vssseg6e32.v | vssseg6e64.v | vssseg6e8.v | vssseg7e16.v | vssseg7e32.v | vssseg7e64.v | vssseg7e8.v | vssseg8e16.v | vssseg8e32.v |
|---|---|---|---|---|---|---|---|---|---|---|---|---|
RV32 |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
RV64 |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
cp_misalignv_ls_element_misaligned |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
| Instruction | vssseg8e64.v | vssseg8e8.v | vsuxei16.v | vsuxei32.v | vsuxei64.v | vsuxei8.v | vsuxseg2ei16.v | vsuxseg2ei32.v | vsuxseg2ei64.v | vsuxseg2ei8.v | vsuxseg3ei16.v | vsuxseg3ei32.v |
|---|---|---|---|---|---|---|---|---|---|---|---|---|
RV32 |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
RV64 |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
cp_misalignv_ls_element_misaligned |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
| Instruction | vsuxseg3ei64.v | vsuxseg3ei8.v | vsuxseg4ei16.v | vsuxseg4ei32.v | vsuxseg4ei64.v | vsuxseg4ei8.v | vsuxseg5ei16.v | vsuxseg5ei32.v | vsuxseg5ei64.v | vsuxseg5ei8.v | vsuxseg6ei16.v | vsuxseg6ei32.v |
|---|---|---|---|---|---|---|---|---|---|---|---|---|
RV32 |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
RV64 |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
cp_misalignv_ls_element_misaligned |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
| Instruction | vsuxseg6ei64.v | vsuxseg6ei8.v | vsuxseg7ei16.v | vsuxseg7ei32.v | vsuxseg7ei64.v | vsuxseg7ei8.v | vsuxseg8ei16.v | vsuxseg8ei32.v | vsuxseg8ei64.v | vsuxseg8ei8.v |
|---|---|---|---|---|---|---|---|---|---|---|
RV32 |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
RV64 |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
cp_misalignv_ls_element_misaligned |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
| Normative Rule | Rule Text | Coverpoints |
|---|---|---|
vector_ls_misaligned_exception |
{MisalignV_vle16_v_cg,MisalignV_vle32_v_cg,MisalignV_vle64_v_cg,MisalignV_vle8_v_cg}/{cp_misalignv_ls_element_misaligned}, {MisalignV_vse16_v_cg,MisalignV_vse32_v_cg,MisalignV_vse64_v_cg,MisalignV_vse8_v_cg}/{cp_misalignv_ls_element_misaligned}, {MisalignV_vlm_v_cg}/{cp_misalignv_ls_element_misaligned}, {MisalignV_vlse16_v_cg,MisalignV_vlse32_v_cg,MisalignV_vlse64_v_cg,MisalignV_vlse8_v_cg}/{cp_misalignv_ls_element_misaligned}, {MisalignV_vsm_v_cg}/{cp_misalignv_ls_element_misaligned}, {MisalignV_vsse16_v_cg,MisalignV_vsse32_v_cg,MisalignV_vsse64_v_cg,MisalignV_vsse8_v_cg}/{cp_misalignv_ls_element_misaligned}, {MisalignV_vle16ff_v_cg,MisalignV_vle32ff_v_cg,MisalignV_vle64ff_v_cg,MisalignV_vle8ff_v_cg}/{cp_misalignv_ls_element_misaligned}, {MisalignV_*_v_cg}/{cp_misalignv_ls_element_misaligned} |
|
vector_ls_wholereg_misaligned_exception |
{MisalignV_vl1re16_v_cg,MisalignV_vl1re32_v_cg,MisalignV_vl1re64_v_cg,MisalignV_vl1re8_v_cg,MisalignV_vl2re16_v_cg,MisalignV_vl2re32_v_cg,MisalignV_vl2re64_v_cg,MisalignV_vl2re8_v_cg,MisalignV_vl4re16_v_cg,MisalignV_vl4re32_v_cg,MisalignV_vl4re64_v_cg,MisalignV_vl4re8_v_cg,MisalignV_vl8re16_v_cg,MisalignV_vl8re32_v_cg,MisalignV_vl8re64_v_cg,MisalignV_vl8re8_v_cg,MisalignV_vs1r_v_cg,MisalignV_vs2r_v_cg,MisalignV_vs4r_v_cg,MisalignV_vs8r_v_cg}/{cp_misalignv_ls_wholereg_misaligned} |
|
vector_ls_scalar_misaligned_independence |
See VECTOR_LS_MISALIGNED_EXCEPTION |
|
vector_ls_scalar_misaligned_dependence |
TODO |
|
Zicclsm_misaligned_support |
See VECTOR_LS_MISALIGNED_EXCEPTION |
UDB Parameters: None.
B.9.2. SsstrictV Vector Strict Decoding
SsstrictV tests that reserved vector encodings trap when Ssstrict is implemented. It includes a comprehensive set of reserved overlapping register constraints. It also tests miscellaneous reserved conditions such as widening to unsupported SEWs, register groups not aligned to a multiple of LMUL, reserved mask overlaps, and constraints on vsetvl* operands.
| Coverpoint | Goal | Feature Description | Expectation | Bins | Normative Rule | Pass/Fail Criteria | Notes |
|---|---|---|---|---|---|---|---|
cp_ssstrictv_widening_source_overlap |
Confirm for every instruction with the .w* suffix (and widening reduction operations), that if vs1 and vs2 are the same register, the encoding is reserved |
Run a widening instruction with sew = {supported}, lmul = {1/2/4}, vs2 = vs1 = v8 |
trap |
4 lmul bins |
vreg_overlap_rsv |
spec: An encoding that would result in the same vector register being read with two or more different EEWs, including when the vector register appears at different positions within two or more vector register groups, is reserved. |
|
cp_ssstrictv_all_widening_source_overlap |
Confirm for a single instruction with the .w* suffix (and widening reduction operations), every combination of vs1 and vs2 across lmul = {1/2/4/8} is reserved |
With a widdening instruction cross vs1 = {0-31} with vs2 = {0-31} and lmul = {1/2/4} with sew = {supported} |
trap |
32 vs1 x 32 vs2 x 4 lmul |
does not depend on csr state: ? Don’t know if we need a cross across lmul |
||
All vzext and vsext instructions ending in f2 |
|||||||
cp_ssstrictv_vext2_overlapping_vd_vs2 |
Confirm that with zero and sign extending instructions ending in "f2," when the vs2 overlaps the bottom half of the vd register group the operation is illegal |
Conduct a widening operation with lmul=2, vd group aligned and vs2 overlapping the bottom half of the vd register group (if lmul is 2 and vd = v0 then vs2 would be v0 for vzext.vf2). |
trap |
1 |
does not depend on csr state: Only if vd == vs2 |
||
All vzext and vsext instructions ending in f4 |
|||||||
cp_ssstrictv_vext4_overlapping_vd_vs2 |
Confirm that with zero and sign extending instructions ending in "f4," when the vs2 overlaps the bottom 3/4 of the vd register group the operation is illegal |
Conduct a widening operation with lmul=4, vd group aligned and vs2 overlapping the bottom 3/4 of the vd register group (if lmul is 4 and vd = v0 then vs2 could be v0, v1, or v2 for vzext.vf4). |
trap |
1 |
does not depend on csr state: Only if vd == vs2 |
||
All vzext and vsext instructions ending in f8 |
|||||||
cp_ssstrictv_vext8_overlapping_vd_vs2 |
Confirm that with zero and sign extending instructions ending in "f8," when the vs2 overlaps the bottom 7/8 of the vd register group the operation is illegal |
Conduct a widening operation with lmul=8, vd group aligned and vs2 overlapping the bottom 7/8 of the vd register group (if lmul is 8 and vd = v0 then vs2 could be v{0-6} for vzext.vf8). |
trap |
1 |
does not depend on csr state: Only if vd == vs2 |
||
All widening instructions except reduction |
|||||||
cp_ssstrictv_vwiden_overlapping_vd_vs1_lmul1 |
Confirm that with widening instructions (must end in .v*) vs1 = vd is illegal |
Conduct a widening operation with lmul=1, vs1 = vd and vd group aligned. vs2 should not overlap vd |
trap |
1 |
spec: A destination vector register group can overlap a source vector register group only if one of the following holds: |
||
cp_ssstrictv_vwiden_overlapping_vd_vs2_lmul1 |
Confirm that with widening instructions (must end in .v*) vs2 = vd is illegal |
Conduct a widening operation with lmul=1, vs2 = vd and vd group aligned. vs1 should not overlap vd |
trap |
1 |
spec: A destination vector register group can overlap a source vector register group only if one of the following holds: |
||
cp_ssstrictv_vwidenw_overlapping_vd_vs1_lmul1 |
Confirm that with widening instructions (must end in .w*) vs1 = vd is illegal |
Conduct a widening operation with lmul=1, vs1 = vd and vd group aligned. vs2 should not overlap vd |
trap |
1 |
spec: A destination vector register group can overlap a source vector register group only if one of the following holds: |
||
All narrowing instructions |
|||||||
cp_ssstrictv_vnarrow_overlapping_vd_vs2 |
Confirm that with narrowing instructions, vs2 = vd is illegal |
Conduct a narrowing operation with lmul=1, vs1 = vd and vs2 group aligned. vs2 should not overlap vs1 |
trap |
1 |
vfncvt_vreg_constr |
spec: The destination EEW is smaller than the source EEW and the overlap is in the lowest-numbered part of the source register group (e.g., when LMUL=1, vnsrl.wi v0, v0, 3 is legal, but a destination of v1 is not). |
|
cp_ssstrictv_widening_vd_emul_16 |
Confirm that with all widening instructions (ending in .v* and .w* excluding the widening reduction instructions) that EMUL>=16 traps |
Set sew = {supported} and lmul = {8} and confirm that the instruction traps |
trap |
1 |
spec: The largest vector register group used by an instruction can not be greater than 8 vector registers (i.e., EMUL≤8), and if a vector instruction would require greater than 8 vector registers in a group, the instruction encoding is reserved. For example, a widening operation that produces a widened vector register group result when LMUL=8 is reserved as this would imply a result EMUL=16. |
||
cp_ssstrictv_narrowing_vs2_emul_16 |
Confirm that with all narrowing instructions that EMUL>=16 traps |
Set sew = {supported} and lmul = {8} and confirm that the instruction traps |
trap |
1 |
spec: The largest vector register group used by an instruction can not be greater than 8 vector registers (i.e., EMUL≤8), and if a vector instruction would require greater than 8 vector registers in a group, the instruction encoding is reserved. For example, a widening operation that produces a widened vector register group result when LMUL=8 is reserved as this would imply a result EMUL=16. |
||
cp_ssstrictv_widening_vd_sew_eq_elen |
Confirm for all widening instructions (.v*, .w* and reduction) that if SEW=ELEN the instruction traps |
Set sew = {8,16,32,64} and lmul = {1}, vd = 8, vs2 = 10, vs1 = 12 |
trap |
4 sew bins |
spec: EEW; ELEN; EMUL_SEW_LMUL_dep; RESERVED_VILL_SET; V_supported_eew; vnarrowing_EEW; vnarrowing_EMUL; vreduction_trap; vwop_vd_eew_emul |
||
cp_ssstrictv_narrowing_vs2_sew_eq_elen |
Confirm for all narrowing instructions that if SEW=ELEN the instruction traps |
Set sew = {8,16,32,64} and lmul = {1}, vd = 8, vs2 = 10, vs1 = 12 |
trap |
4 sew bins |
spec: ELEN; V_supported_eew; Zve_eew; vnarrowing_EEW; vnarrowing_EMUL; vnclip_op; vnclipu_op; vnop_vs2_eew_emul; vnsra_op; vnsrl_op; vtype-sew_val |
||
cp_ssstrictv_vrgather_vd_vs1_eq |
Confirm for vrgather instructions that if vs1 and vd overlap that the encoding is reserved |
Set vs1 = vd = {v0-28} and lmul = 4 with vs2 not overlapping |
trap |
8 register bins |
spec: For any vrgather instruction, the destination vector register group cannot overlap with the source vector register groups, otherwise the instruction encoding is reserved. |
||
cp_ssstrictv_vrgather_vd_vs2_eq |
Confirm for vrgather.v* instructions that if vs2 and vd overlap that the encoding is reserved |
Set vs2 = vd = {v0-28} and lmul = 4 with vs1 not overlapping |
trap |
8 register bins |
spec: For any vrgather instruction, the destination vector register group cannot overlap with the source vector register groups, otherwise the instruction encoding is reserved. |
||
cp_ssstrictv_vrgatherei16_emul_16 |
Confirm if vrgatherei16 implies an emul of 16 the encoding is reserved |
run lmul = 8 and sew = 8 and vd != vs1 and vd != vs2 (all group aligned) |
trap |
1 |
spec: The vrgather.vv form uses SEW/LMUL for both the data and indices. The vrgatherei16.vv form uses SEW/LMUL for the data in vs2 but EEW=16 and EMUL = (16/SEW)*LMUL for the indices in vs1 |
||
cp_ssstrictv_vrgatherei16_emul_f16 |
Confirm if vrgatherei16 implies an emul of 1/16 the encoding is reserved |
run {lmul, sew} = {(1/8, 32), (1/4, 64)} and vd != vs1 and vd != vs2 (all group aligned) |
trap |
2 lmul&sew combined bins |
spec: The vrgather.vv form uses SEW/LMUL for both the data and indices. The vrgatherei16.vv form uses SEW/LMUL for the data in vs2 but EEW=16 and EMUL = (16/SEW)*LMUL for the indices in vs1 |
||
cp_ssstrictv_masking_vd_eq_v0 |
Confirm for a "masked vector instruction" that vd = v0 is reserved |
Run a masked vector instruction (mask enabled) with lmul = 1 and vd = v0, vd != vs1, vd != vs2, vs2 != vs1 |
trap |
1 |
vadc_vsbc_vd_v0_rsv |
does not depend on csr state: (I think, github issue says its wrong, but vm is part of the instruction) |
|
cp_ssstrict_ls_nf_eew |
Confirm any NFIELDS * EEW violation is checked, run on all instructions with nf and eew |
Run segment load/store instructions with NFIELDS and EEW combinations where NFIELDS * EEW exceeds the implementation limit, across all segment load/store instruction variants |
trap |
spec: The EMUL setting must be such that EMUL * NFIELDS ≤ 8, otherwise the instruction encoding is reserved. |
|||
cp_ssstrictv_masking_vd_eq_v0_lmulgt1 |
Confirm for a masked vector instruction that vd = v0 with LMUL > 1 is reserved |
Run a masked vector instruction (mask enabled) with lmul = {2, 4, 8} and vd = v0, vd != vs1, vd != vs2, vs2 != vs1 |
trap |
3 lmul bins |
does not depend on csr state: ? Isn’t this masking_vd_eq_v0 |
||
cp_ssstrictv_ls_seg_vd_overflow |
Confirm segment load/store traps when register numbers increment past 31 |
Run a segment load/store with LMUL=1 and NFIELDS/vd combinations where vd + NFIELDS > 32 (e.g., NFIELDS=2 vd=31, NFIELDS=4 vd=29, NFIELDS=8 vd=25) |
trap |
7 nf/vd overflow bins |
emul_nfields_rsv |
||
cp_ssstrictv_ls_seg_idx_vd_vs2_overlap |
Confirm indexed segment load traps when destination groups overlap vs2 index register |
Run an indexed segment load with LMUL=1 and vd=8, with vs2 set to each destination register in the segment range (vs2=vd through vs2=vd+NFIELDS-1) across NFIELDS=2..8 |
trap |
8 nf/vd/vs2 overlap bins |
vector_ls_seg_indexed_vreg_rsv |
spec: vector_ls_seg_indexed_vreg_rsv; vreg_overlap_rsv |
|
cp_ssstrictv_ls_wr_nf_reserved |
Confirm whole register load/store traps for non-power-of-2 nf and unaligned vd |
Run a whole register load/store with nf encoding non-power-of-2 register counts (NREG=3,5,6,7). Also run with valid NREG (2,4,8) but vd not aligned to NREG |
trap |
4 non-pow2 nf bins + 16 vd off-group (NREG=2) + 24 vd off-group (NREG=4) + 28 vd off-group (NREG=8) |
spec: vector_ls_seg_wholereg_nf_rsv; vector_wholels_nf_op; vmv-nr-r_nreg_rsv; vmv-nr-r_unaligned_rsv |
||
cp_ssstrictv_vfp_frm_reserved |
Confirm vector FP instructions trap when frm contains reserved rounding mode |
Run a vector floating-point instruction with frm set to each invalid rounding mode (5, 6, 7). Also run with vl=0 and with vstart >= vl to confirm the reservation applies regardless of element activity |
trap |
3 frm bins x 3 conditions (normal / vl=0 / vstart>=vl) |
spec: V_fp_frm; V_inv_frm_rsv |
||
cp_ssstrictv_vfp_eew_unsupported |
Confirm vector FP instructions trap when operand EEW is not a supported FP type width |
Run a vector FP instruction with SEW=8 (never a valid FP width). Also run with SEW=64 when FLEN=32 (no D extension). Test under normal conditions, with vl=0, and with vstart >= vl |
trap |
1-2 sew bins x 3 conditions (normal / vl=0 / vstart>=vl) |
spec: V_fp_EEW_IEEE_nsupported_rsv; V_fp_eew_rsv; vstart_vl_dep; vtype-vill_op; vtype-vill_set |
||
cp_ssstrictv_vzext_src_reserved |
Confirm vzext instructions trap when source EEW is unsupported or source EMUL is below minimum |
Run vzext.vf2/vf4/vf8 with SEW/LMUL combinations where source EEW (SEW/N) < 8 or source EMUL (LMUL/N) < 1/8. For vf2: SEW=8 or LMUL=mf8. For vf4: SEW⇐16 or LMUL⇐mf4. For vf8: SEW⇐32 or LMUL⇐mf2 |
trap |
3 src_eew crosses (1+2+3 sew bins) + 3 src_emul crosses (1+2+3 lmul bins) |
spec: RESERVED_VILL_SET; V_supported_eew; vzext_ill_eew_emul_rsv; vzext_vs_eew_emul |
||
cp_ssstrictv_vadc_vsbc_vm1_reserved |
Confirm vadc/vsbc trap when encoded with vm=1 (unmasked) |
Run a vadc or vsbc instruction with vm=1 (the reserved unmasked encoding) |
trap |
2 funct6 bins (vadc and vsbc) x vm=1 |
vadc_vsbc_unmasked_rsv |
spec: vadc_unmasked_rsv; vsbc_unmasked_rsv |
|
cp_ssstrictv_vadc_vsbc_vd_v0_reserved |
Confirm vadc/vsbc trap when vd is v0 |
Run a vadc or vsbc instruction with the destination register set to v0 |
trap |
2 funct6 bins (vadc and vsbc) x vd=v0 |
does not depend on csr state: ? Isn’t this covered by the general masking case? |
||
cp_ssstrictv_vmv_vs2_not_v0_reserved |
Confirm vmv.v.v traps when vs2 is not v0 |
Run a vmv.v.v instruction with vs2 set to any register other than v0 |
trap |
31 vs2 bins (v1-v31) |
vmv_vs2_nv0_rsv |
spec: vmv_vs2_nv0_rsv |
|
cp_ssstrictv_vfp_widen_eew_unsupported |
Confirm widening/narrowing FP instructions trap when wider operand EEW is not a supported FP type |
Run a widening or narrowing vector FP instruction with SEW=32 when FLEN=32 (no D extension), so the wider operand EEW=64 is unsupported. Test under normal conditions, with vl=0, and with vstart >= vl |
trap |
1 sew bin x 3 conditions (normal / vl=0 / vstart>=vl) |
spec: V_dependent_F_D; V_fp_EEW_IEEE_nsupported_rsv; V_fp_eew_rsv; Vf_requrires_Vx; Zve32f_dependent_F; vstart_vl_dep; vwop_vd_eew_emul |
||
cp_ssstrictv_vfmv_vs2_not_v0_reserved |
Confirm vfmv.v.f traps when vs2 is not v0 |
Run a vfmv.v.f instruction with vs2 set to any register other than v0 |
trap |
31 vs2 bins (v1-v31) |
vfmv_vs2_nv0_rsv |
spec: epc_op_V_trap; vfmv_vs2_nv0_rsv; vstart_op_V_trap |
|
cp_ssstrictv_mask_logical_vm0_reserved |
Confirm mask logical instructions trap when vm=0 |
Run a vector mask logical instruction (vmand/vmnand/vmandn/vmxor/vmor/vmnor/vmorn/vmxnor) with vm=0 (masked encoding) |
trap |
8 funct6 bins x vm=0 |
vmasklogical_masked_rsv |
spec: vmasklogical_masked_rsv; vmasklogical_unmasked |
|
cp_ssstrictv_vid_vs2_not_v0_reserved |
Confirm vid.v traps when vs2 is not v0 |
Run a vid.v instruction with vs2 set to any register other than v0 |
trap |
31 vs2 bins (v1-v31) |
vid_vs2_nv0_rsv |
spec: vid_vs2_nv0_rsv |
|
cp_ssstrictv_vmv_xs_sx_vm0_reserved |
Confirm vmv.x.s and vmv.s.x trap when vm=0 |
Run a vmv.x.s or vmv.s.x instruction with vm=0 (masked encoding) |
trap |
2 funct3 bins x vm=0 |
vmv-s-x_vmv-x-s_masked_rsv |
spec: vmv-s-x_masked_rsv; vmv-x-s_masked_rsv |
|
cp_ssstrictv_vfmv_fs_sf_vm0_reserved |
Confirm vfmv.f.s and vfmv.s.f trap when vm=0 |
Run a vfmv.f.s or vfmv.s.f instruction with vm=0 (masked encoding) |
trap |
2 funct3 bins x vm=0 |
vfmv-s-f_masked_rsv |
spec: vfmv-s-f_masked_rsv |
|
cp_ssstrictv_vslideup_vd_vs2_overlap |
Confirm vslideup traps when destination register group overlaps source register group |
Run a vslideup instruction where the vd register group overlaps the vs2 register group, at each LMUL={1,2,4,8} |
trap |
4 LMUL bins (1 overlap per LMUL) |
vslideup_vreg_constr |
does not depend on csr state: Only vd = vs1, nothing to do with lmul overlaps |
|
cp_ssstrictv_vrgather_vd_vs2_overlap |
Confirm vrgather traps when destination register group overlaps vs2 register group |
Run a vrgather instruction where the vd register group overlaps the vs2 register group, at each LMUL={1,2,4,8} |
trap |
4 LMUL bins (1 overlap per LMUL) |
vrgather_vrgatherei16_vreg_constr |
does not depend on csr state: Only vd = vs1, nothing to do with lmul overlaps |
|
cp_ssstrictv_vrgather_vd_vs1_overlap |
Confirm vrgather.vv traps when destination register group overlaps vs1 register group |
Run a vrgather.vv instruction where the vd register group overlaps the vs1 register group, at each LMUL={1,2,4,8} |
trap |
4 LMUL bins (1 overlap per LMUL) |
does not depend on csr state: Only vd = vs1, nothing to do with lmul overlaps |
||
cp_ssstrictv_vcompress_vd_vs2_overlap |
Confirm vcompress traps when destination register group overlaps source register group |
Run a vcompress instruction where the vd register group overlaps the vs2 register group, at each LMUL={1,2,4,8} |
trap |
4 LMUL bins (1 overlap per LMUL) |
vcompress_vreg_constr |
does not depend on csr state: Only vd = vs1, nothing to do with lmul overlaps |
|
cp_ssstrictv_vcompress_vd_v0_overlap |
Confirm vcompress traps when destination register group overlaps source mask register (v0) |
Run a vcompress instruction where the vd register group overlaps v0 (the source mask register), at each LMUL={1,2,4,8} |
trap |
4 LMUL bins (vd=v0 at each LMUL) |
does not depend on csr state: Only vd = v0, nothing to do with lmul overlaps |
||
cp_ssstrictv_vmvnr_simm_reserved |
Confirm whole register move traps when simm[4:0] is a reserved value |
Run a vmv<nr>r.v instruction with simm[4:0] set to a value other than 0/1/3/7 (the reserved encodings) |
trap |
28 reserved simm bins (all simm values except 0/1/3/7) |
vmv-nr-r_nreg_rsv |
spec: epc_op_V_trap; vmv-nr-r_nreg_rsv; vstart_op_V_trap |
|
cp_ssstrictv_vmvnr_reg_align |
Confirm whole register move traps when both vd and vs2 are misaligned for the register group size |
Run vmv2r.v/vmv4r.v/vmv8r.v with both vd and vs2 unaligned for the NREG group size (not divisible by NREG) |
trap |
3 NREG variants x all unaligned vd x all unaligned vs2 |
spec: vmv-nr-r_unaligned_rsv; vmv-nr-r_vreg_constr; vreg_offgroup_LMUL2_rsv; vreg_offgroup_LMUL4_rsv; vreg_offgroup_LMUL8_rsv |
||
cp_ssstrictv_vcsr_reserved_bits |
Confirm vcsr top XLEN-3 bits are reserved and read as zero |
Write vcsr via CSRRx with non-zero values in bits [XLEN-1:3], confirm they read back as zero |
no trap |
1 bin (upper bits zero after write with non-zero source) |
does not depend on csr state: ? is this Ssstrict, should we be testing WARL? |
||
cp_ssstrictv_masking_vd_v0_overlap |
Confirm masked vector instruction traps when vd=v0 at any LMUL |
Run a masked vector instruction with vd=v0 at each LMUL={1,2,4,8} where vd != vs1 and vd != vs2 |
trap |
4 LMUL bins (vd=v0 masked at each LMUL) |
does not depend on csr state: Again? |
||
cp_ssstrictv_lmulgt1_off_group |
Confirm vector instructions trap when register specifier is not aligned to LMUL group size |
Run a vector instruction with LMUL={2,4,8} where vd, vs1, or vs2 is not aligned to the register group size (e.g., odd register for LMUL=2) |
trap |
9 crosses: 3 LMUL values x 3 register operands (vd, vs1, vs2), each with all unaligned registers |
spec: EMUL_offgroup_rsv; vreg_offgroup_LMUL2_rsv; vreg_offgroup_LMUL4_rsv; vreg_offgroup_LMUL8_rsv |
||
cp_ssstrictv_ls_eew_2x_elen |
Confirm that all load/store trap when violating EEW = 2 * ELEN |
Run vector load/store instructions with EEW encoded in the width field set to 2 * ELEN (e.g., if ELEN=64, attempt EEW=128 encoding) |
trap |
spec: Vector loads and stores have an EEW encoded directly in the instruction. If the EEW is not a supported width, the instruction encoding is reserved. |
|||
cp_ssstrictv_ls_emul_16 |
Confirm that all load/store trap when EMUL = 16 |
Run vector load/store instructions with SEW/LMUL/EEW combinations producing (EEW/SEW)*LMUL = 16 (e.g., EEW=64, SEW=8, LMUL=2) |
trap |
spec: If the EMUL would be out of range (EMUL>8 or EMUL<1/8), the instruction encoding is reserved |
|||
cp_ssstrictv_ls_emul_f16 |
Confirm that all load/store trap when EMUL = 1/16 |
Run vle8/vse8 with {SEW=16/LMUL=1/8, SEW=32/LMUL=1/4, SEW=64/LMUL=1/2} to produce EMUL=1/16 (out of range, must trap) |
trap |
3 SEW/LMUL bins |
spec: If the EMUL would be out of range (EMUL>8 or EMUL<1/8), the instruction encoding is reserved |
||
cp_ssstrictv_ls_emul_nfields_16 |
Confirm that using 16 registers with strided instructions is reserved |
Run segment load/store instructions with EMUL and NFIELDS combinations where EMUL * NFIELDS > 8 (e.g., EMUL=2, NFIELDS=5) |
trap |
spec: The EMUL setting must be such that EMUL * NFIELDS ≤ 8, otherwise the instruction encoding is reserved. |
|||
cp_ssstrictv_vslide1up_vd_vs2_overlap |
Confirm vslide1up traps when destination register group overlaps source register group |
Run vslide1up.vx with LMUL={1,2,4,8} where vd register group overlaps vs2 register group |
trap |
4 crosses: LMUL=1 (vd==vs2), LMUL=2 (group overlap), LMUL=4 (group overlap), LMUL=8 (group overlap) |
vslide1up-vx_vreg_constr |
spec: The vslide1up instruction requires that the destination vector register group does not overlap the source vector register group. Otherwise the instruction encoding is reserved. |
|
cp_ssstrictv_vcompress_vstart_nonzero |
Confirm that vcompress with non-zero vstart raises an illegal instruction exception |
Run a vcompress instruction with vstart != 0 |
trap |
1 cross: vstart nonzero × trap × vcompress encoding |
spec: Executing a vcompress instruction with a non-zero vstart raises an illegal instruction exception. |
||
cp_ssstrictv_vcompress_vstart_report_zero |
Confirm that a trap on vcompress is always reported with vstart of 0 |
Run a vcompress instruction that traps and verify vstart is 0 after the trap |
trap |
1 cross: vcompress encoding × trap × vstart=0 after |
does not depend on csr state: Put this in ExcpetionsVx |
||
cp_ssstrictv_vmvnr_off_group |
Confirm that vmv<nr>r.v instructions trap with off-group base registers |
Run vmv2r.v, vmv4r.v, vmv8r.v with vd or vs2 not aligned to NREG. |
trap |
16 vd off-group + 24 vs2 off-group |
spec: Whole register move: The source and destination vector register numbers must be aligned appropriately for the vector register group size, and encodings with other vector register numbers are reserved. |
||
cp_ssstrictv_ls_seg_idx_vd_vs2_grp_overlap |
Confirm that indexed segment loads with EMUL>1 trap when any destination register group overlaps the vs2 index register group |
Set LMUL=2 and execute an indexed segment load where vs2 falls within one of the destination register groups (each spanning EMUL=2 registers) |
trap |
8 overlap scenarios across nf=2/3/4 |
spec: For vector indexed segment loads, the destination vector register groups cannot overlap the source vector register group (specified by vs2), else the instruction encoding is reserved. |
||
cp_ssstrictv_reserved_vcsrs |
Confirm CSR addresses 0x00B-0x00E raise illegal instruction exceptions |
Attempt to read/write CSR addresses 0x00B, 0x00C, 0x00D, 0x00E (reserved for future vector CSRs) and confirm each raises an illegal instruction trap |
trap |
4 CSR address bins |
|||
cp_ssstrictv_vsetvli_reserved_vsew |
Confirm vsetvli/vsetivli with vsew[2:0] = 1xx sets vill |
Run vsetvli or vsetivli with vsew field set to 3’b100, 3’b101, 3’b110, 3’b111 (reserved encodings) and verify vill is set to 1 |
vill set |
4 vsew bins |
does not depend on csr state: This is not part of Ssstrict |
||
cp_ssstrictv_vsetvli_lmul_sew_ratio |
Confirm vsetvli with unsupported LMUL/SEW ratio sets vill |
Run vsetvli with LMUL and SEW combinations where LMUL < minSEW/ELEN (the ratio is unsupported), and verify vill is set |
vill set |
Cross of all LMUL x SEW combinations |
does not depend on csr state: This is not part of Ssstrict |
||
cp_ssstrictv_ls_eew_lt_sewmin |
Confirm vector load/store instructions trap when EEW < SEWMIN |
Execute a vector load/store instruction with EEW (encoded in width field) smaller than the minimum supported SEW (SEWMIN). For example, vle8.v when SEWMIN > 8 |
trap |
Should trap as reserved encoding |
vector_ls_ins_rsv |
does not depend on csr state: Specifically, we can test things like vle8, where the width is part of the instruction |
|
cp_ssstrictv_ls_mew_reserved |
Confirm vector load/store instructions trap when mew bit is set |
Run a vector load or store instruction with mew=1 (bit 28 of instruction) and confirm the encoding is reserved |
trap |
1 bin |
vector_ls_mew_rsv |
spec: vector_ls_mew_rsv |
|
cp_ssstrictv_vzext_vf2_reserved |
Confirm vzext.vf2 traps when source EEW < 8 or source EMUL < 1/8 |
Run vzext.vf2 with SEW=8 (source EEW=4, unsupported). Also run with LMUL=mf8 (source EMUL=1/16, below minimum) |
trap |
1 sew bin + 1 lmul bin |
spec: RESERVED_VILL_SET; V_supported_eew; vtype-lmul_fval; vzext_ill_eew_emul_rsv; vzext_vs_eew_emul |
||
cp_ssstrictv_vzext_vf4_reserved |
Confirm vzext.vf4 traps when source EEW < 8 or source EMUL < 1/8 |
Run vzext.vf4 with SEW=8 (EEW=2) or SEW=16 (EEW=4). Also run with LMUL=mf8 (EMUL=1/32) or LMUL=mf4 (EMUL=1/16) |
trap |
2 sew bins + 2 lmul bins |
spec: EMUL_rsv; RESERVED_VILL_SET; Zve_eew; vzext_ill_eew_emul_rsv; vzext_vs_eew_emul |
||
cp_ssstrictv_vzext_vf8_reserved |
Confirm vzext.vf8 traps when source EEW < 8 or source EMUL < 1/8 |
Run vzext.vf8 with SEW=8 (EEW=1) or SEW=16 (EEW=2) or SEW=32 (EEW=4). Also run with LMUL=mf8 (EMUL=1/64) or LMUL=mf4 (EMUL=1/32) or LMUL=mf2 (EMUL=1/16) |
trap |
3 sew bins + 3 lmul bins |
spec: EMUL_rsv; RESERVED_VILL_SET; epc_op_V_trap; vtype-vill_op; vzext_ill_eew_emul_rsv; vzext_vs_eew_emul |
||
cp_ssstrictv_vcompress_vm0_reserved |
Confirm vcompress traps when vm=0 |
Run a vcompress instruction with vm=0 (masked encoding) |
trap |
1 funct6 x funct3 x vm=0 |
vcompress_masked_rsv |
spec: vcompress_enc; vcompress_masked_rsv |
|
cp_ssstrictv_vsext_src_reserved |
Confirm vsext.vfN instructions trap when source EEW or source EMUL is out of range |
Run vsext.vf2/vf4/vf8 with SEW values where source EEW = SEW/N < 8, or with fractional LMUL values where source EMUL = LMUL/N < 1/8 |
trap |
6 crosses: 3 variants x 2 conditions (bad EEW, bad EMUL) |
spec: The source EEW is smaller than SEW and the source EMUL is correspondingly smaller than LMUL. If the source EEW is not a supported SEW or the source EMUL would be below the minimum legal LMUL the instruction encoding is reserved. |
||
cp_ssstrictv_ext_emul_lt1_overlap |
Confirm vzext/vsext instructions trap when source EMUL < 1 and vs2 overlaps vd group |
Run vzext/vsext.vf2 with LMUL=1, vf4 with LMUL={1,2}, vf8 with LMUL={1,2,4} where source EMUL < 1 and vs2 overlaps the destination register group |
trap |
6 crosses: vf2 at LMUL=1, vf4 at LMUL={1,2}, vf8 at LMUL={1,2,4} each with overlap |
spec: EMUL; EMUL_SEW_LMUL_dep; vreg_overlap_rsv; vsext_ill_eew_emul_rsv; vsext_op; vsext_vs_eew_emul; vzext_ill_eew_emul_rsv; vzext_op; vzext_vs_eew_emul |
||
cp_ssstrictv_widen_max_sew |
Confirm all widening instructions trap when SEW equals ELEN so destination EEW = 2*SEW exceeds ELEN |
Run a widening instruction with SEW = {all supported} and LMUL = {1, 2, 4}; the instruction should trap only when SEW = MAX_SEW (destination EEW = 2*SEW > ELEN), including widening reductions |
trap |
all supported SEW x 3 LMUL bins |
spec: The destination EEW must be a supported element width. For widening operations destination EEW = 2*SEW; when SEW = ELEN this exceeds the maximum supported element width and the instruction encoding is reserved. |
||
cp_ssstrictv_vsetvli_x0_x0_reserved |
Confirm vsetvl{i} with rs1=x0 rd=x0 traps when VLMAX would change or vill was set |
Run vsetvli with rs1=x0 and rd=x0 when (1) vill=1 beforehand, or (2) new SEW/LMUL would change VLMAX |
trap |
3 crosses: vill=1 case, new SEW differs case, new LMUL differs case |
When rs1=x0 and rd=x0, the instruction operates as if the current vector length in vl is used as the AVL, and the resulting value is written to vl, but not to a destination register. This form can only be used when VLMAX and hence vl is not actually changed by the new SEW/LMUL ratio. Use of the instruction with a new SEW/LMUL ratio that would result in a change of VLMAX is reserved. Use of the instruction is also reserved if vill was 1 beforehand. Implementations may set vill in either case. |
||
cp_ssstrictv_vsetvl_x0_x0_reserved |
Confirm vsetvl with rs1=x0 rd=x0 traps when VLMAX would change or vill was set |
Run vsetvl with rs1=x0 and rd=x0 when (1) vill=1 beforehand, or (2) new SEW/LMUL in rs2 would change VLMAX |
trap |
3 crosses: vill=1 case, new SEW differs case, new LMUL differs case |
When rs1=x0 and rd=x0, the instruction operates as if the current vector length in vl is used as the AVL, and the resulting value is written to vl, but not to a destination register. This form can only be used when VLMAX and hence vl is not actually changed by the new SEW/LMUL ratio. Use of the instruction with a new SEW/LMUL ratio that would result in a change of VLMAX is reserved. Use of the instruction is also reserved if vill was 1 beforehand. |
||
cp_ssstrictv_ls_seg_vd_overflow_emulgt1 |
Confirm segment load/store traps when register groups increment past v31 with LMUL > 1 |
Run a segment load/store with LMUL={2,4} and NFIELDS/vd combinations where vd + NFIELDS * LMUL > 32 (e.g., LMUL=2 NFIELDS=2 vd=30, LMUL=4 NFIELDS=2 vd=28) |
trap |
7 (lmul, nf, vd) overflow bins |
spec: If the vector register numbers accessed by the segment load or store would increment past 31, then the instruction encoding is reserved. |
||
cp_ssstrictv_vlmul_100_reserved |
Confirm vsetvli/vsetivli with reserved vlmul=100 encoding sets vill |
Run vsetvli or vsetivli requesting vlmul=3’b100 (reserved encoding) and verify vill is set to 1 afterward |
vlmul = {100}: The use of vtype encodings with LMUL < SEWMIN/ELEN is reserved, but implementations can set vill if they do not support these configurations. |
1 cross: vlmul_100_requested × vill_set_after |
does not depend on csr state: Is this Ssstrict? |
||
cp_ssstrictv_ls_idx_emul_gt8 |
Confirm indexed load/store traps when index EMUL > 8 |
Run an indexed load/store with SEW/LMUL/index-EEW combinations where (index_EEW / SEW) * LMUL > 8 |
trap |
10 (vlmul, vsew, width) reserved tuples |
spec: If the EMUL would be out of range (EMUL>8 or EMUL<1/8), the instruction encoding is reserved. |
||
cp_ssstrictv_ls_idx_emul_lt_f8 |
Confirm indexed load/store traps when index EMUL < 1/8 |
Run an indexed load/store with SEW/LMUL/index-EEW combinations where (index_EEW / SEW) * LMUL < 1/8 |
trap |
12 (vlmul, vsew, width) reserved tuples (ifdef-guarded for fractional LMUL and SEW support) |
spec: If the EMUL would be out of range (EMUL>8 or EMUL<1/8), the instruction encoding is reserved. |
||
cp_vtype_walking1s |
Confirm all XLEN bits of rs2 are checked when running vsetvl instruction |
Set rs1 nonzero, rs2 = (one hot [all XLEN versions]) and run vsetvl rd, rs1, rs2 |
vtype.vill becomes 1 when there is a 1 in XLEN:8, otherwise it depends on which configurations are supported |
XLEN 1 hot bins |
feature: yes |
||
vmsof.m, vmsif.m, vmsbf.m, viota |
|||||||
cp_exceptionsv_vd_vs2_overlap |
Confirm that vd vs2 overlap is reserved |
Run instruction with vd = {v8} = vs2 |
reserved |
1 |
viota_vreg_constr |
spec: vmsof.m, vmsif.m, vmsbf.m: The destination register cannot overlap the source register and, if masked, cannot overlap the mask register ('v0'). |
|
cp_exceptionsv_vd_vs1_overlap |
Confirm that vd vs1 overlap is reserved |
Run instruction with vd = {v8} = vs1 |
reserved |
1 |
spec: vmsof.m, vmsif.m, vmsbf.m: The destination register cannot overlap the source register and, if masked, cannot overlap the mask register ('v0'). |
||
cp_exceptionsv_vd_v0_overlap_mask_active |
Confirm that vd v0 overlap is reserved when the mask is active |
Run instruction with vd = {v0} and mask active vm={0} |
reserved |
1 |
does not depend on csr state: Again? |
||
cp_ssstrictv_vstart_ge_vlmax |
Confirm vstart >= VLMAX traps on any vector instruction with valid vtype |
Set vtype to a valid configuration (vill=0) and set vstart >= VLMAX, then execute a vector instruction |
trap |
1 cross bin (vstart >= VLMAX & vill=0 & trap) |
does not depend on csr state: Exceptions Suite |
||
| Normative Rule | Rule Text | Coverpoints |
|---|---|---|
emul_nfields_rsv |
SsstrictV_vlseg2e8_v_cg/cp_ssstrictv_ls_seg_vd_overflow |
|
emul_offgroup_rsv |
Out-of-Scope: this behavior is unspecified even under Ssstrict, which does not cover CSR-state-dependent reserved conditions |
|
emul_rsv |
Out-of-Scope: reserved behavior that is not covered by Ssstrict |
|
V_fp_eew_ieee_nsupported_rsv |
ExceptionsVf16_vfmv_f_s_cg/cp_vill |
|
V_fp_eew_rsv |
ExceptionsVf16_vfadd_vv_cg/cp_vill |
|
V_inv_frm_rsv |
Out-of-Scope: Ssstrict does not apply to CSR values |
|
egs_ge_vlmax_rsv |
Out-of-Scope: no Ssstrict-equivalent suite exists for the vector-crypto (Zvk*) extensions, and this reserved condition depends on CSR state, matching Ssstrict’s own encoding-only scope boundary |
|
egs_vl_rsv |
Out-of-Scope: no Ssstrict-equivalent suite exists for the vector-crypto (Zvk*) extensions, and this reserved condition depends on CSR state, matching Ssstrict’s own encoding-only scope boundary |
|
vadc_vsbc_unmasked_rsv |
Encodings corresponding to the unmasked versions (vm=1) are reserved. |
{SsstrictV_vadc_vvm_cg,SsstrictV_vsbc_vvm_cg}/cp_ssstrictv_vadc_vsbc_vm1_reserved |
vadc_vsbc_vd_v0_rsv |
For VADC and VSBC, the instruction encoding is reserved if the destination vector register is v0. |
SsstrictV_vadc_vim_cg/cp_ssstrictv_masking_vd_eq_v0 |
vcompress_masked_rsv |
SsstrictV_vcompress_vm_cg/cp_ssstrictv_vcompress_vm0_reserved |
|
vector_ls_eew_rsv |
If the implementation does not support the EEW of the offset elements, the instruction is reserved. |
ExceptionsVls_vloxei16_v_cg/cp_exceptionsv_index_eew16 |
vector_ls_emul_offgroup_rsv |
SsstrictV_vl8re8_v_cg/cp_ssstrictv_ls_wr_nreg8_vd_unaligned |
|
vector_ls_emul_rsv |
If the EMUL would be out of range (EMUL>8 or EMUL<1/8), the instruction encoding is reserved. |
ExceptionsVls_vloxei16_v_cg/cp_exceptionsv_index_eew16 |
vector_ls_ins_rsv |
Vector load/store encodings for unsupported EEW widths are reserved. |
SsstrictV_vle8_v_cg/cp_ssstrictv_ls_eew_lt_sewmin |
vector_ls_mew_rsv |
SsstrictV_vle8_v_cg/cp_ssstrictv_ls_mew_reserved |
|
vector_ls_seg_indexed_vreg_rsv |
SsstrictV_vloxseg2ei8_v_cg/cp_ssstrictv_ls_seg_idx_vd_vs2_overlap |
|
vector_ls_seg_rsv |
SsstrictV_vlseg2e8_v_cg/cp_ssstrictv_ls_seg_vd_overflow |
|
vector_ls_seg_wholereg_nf_rsv |
Only NFIELDS values of 1, 2, 4, 8 are supported, with other values reserved. |
SsstrictV_vl1re8_v_cg/cp_ssstrictv_ls_wr_nf_not_pow2, SsstrictV_vs1r_v_cg/cp_ssstrictv_ls_wr_nf_not_pow2 |
vfmv-s-f_masked_rsv |
The encodings corresponding to the masked versions (vm=0) of VFMV.F.S and VFMV.S.F are reserved. |
SsstrictV_vfmv_s_f_cg/cp_ssstrictv_vfmv_fs_sf_vm0_reserved |
vfmv_vs2_nv0_rsv |
The instruction must have the vs2 field set to v0, with all other values for vs2 reserved. |
SsstrictV_vfmv_v_f_cg/cp_ssstrictv_vfmv_vs2_not_v0_reserved |
vid_vs2_nv0_rsv |
The vs2 field of the instruction must be set to v0, otherwise the encoding is reserved. |
SsstrictV_vid_v_cg/cp_ssstrictv_vid_vs2_not_v0_reserved |
vmasklogical_masked_rsv |
so there are no inactive elements, and the encodings with vm=0 are reserved. |
SsstrictV_vmand_mm_cg/cp_ssstrictv_mask_logical_vm0_reserved, SsstrictV_vmnand_mm_cg/cp_ssstrictv_mask_logical_vm0_reserved, SsstrictV_vmor_mm_cg/cp_ssstrictv_mask_logical_vm0_reserved, SsstrictV_vmxor_mm_cg/cp_ssstrictv_mask_logical_vm0_reserved |
vmv-nr-r_nreg_rsv |
SsstrictV_vmv1r_v_cg/cp_ssstrictv_vmvnr_simm_reserved |
|
vmv-nr-r_unaligned_rsv |
SsstrictV_vmv4r_v_cg/cp_ssstrictv_vmv4r_both_unaligned |
|
vmv-s-x_vmv-x-s_masked_rsv |
The encodings corresponding to the masked versions (vm=0) of VMV.X.S and VMV.S.X are reserved. |
SsstrictV_vmv_s_x_cg/cp_ssstrictv_vmv_xs_sx_vm0_reserved |
vmv_vs2_nv0_rsv |
SsstrictV_vmv_v_v_cg/cp_ssstrictv_vmv_vs2_not_v0_reserved, SsstrictV_vmv_v_x_cg/cp_ssstrictv_vmv_vs2_not_v0_reserved, SsstrictV_vmv_v_i_cg/cp_ssstrictv_vmv_vs2_not_v0_reserved |
|
vreg_offgroup_lmul2_rsv |
Out-of-Scope: reserved behavior that depends on prior CSR state is unspecified and outside Ssstrict’s encoding-only methodology |
|
vreg_offgroup_lmul4_rsv |
Out-of-Scope: reserved behavior that depends on prior CSR state is unspecified and outside Ssstrict’s encoding-only methodology |
|
vreg_offgroup_lmul8_rsv |
Out-of-Scope: reserved behavior that depends on prior CSR state is unspecified and outside Ssstrict’s encoding-only methodology |
|
vreg_overlap_rsv |
Any instruction encoding that violates the overlap constraints is reserved. |
SsstrictV_vwadd_wv_cg/cp_ssstrictv_widening_source_overlap |
vreg_source_eew_rsv |
SsstrictV_vwadd_wv_cg/cp_ssstrictv_widening_source_overlap |
|
vreg_vmask_rsv |
SsstrictV_vadd_vv_cg/cp_ssstrictv_masking_vd_eq_v0 |
|
vsext_vzext_ill_eew_emul_rsv |
ExceptionsVx_vsext_vf2_cg/cp_vill |
|
vstart_val_rsv |
ExceptionsVx_vsaddu_vv_cg/cp_vstart_gt_vl |
|
vtype_lmul_fval_rsv |
Sm_V_cg/cp_vtype_vill_set_vl_0, U_V_cg/cp_vtype_vill_set_vl_0, S_V_cg/cp_vtype_vill_set_vl_0, H_V_cg/cp_vtype_vill_set_vl_0 |
|
vtype_vset_rsv |
Out-of-Scope: we cannot test reserved behavior that depends on prior vill state; outside Ssstrict’s encoding-only methodology |
|
vclmul_sewn64_rsv |
Out-of-Scope: reserved because of CSR state (vtype.sew); no Ssstrict-equivalent suite exists for Zvbc to exercise this reserved SEW encoding |
|
vclmulh_sewn64_rsv |
Out-of-Scope: reserved because of CSR state (vtype.sew); no Ssstrict-equivalent suite exists for Zvbc to exercise this reserved SEW encoding |
|
veccrypto_sew_rsv |
Out-of-Scope: reserved because of CSR state (vtype.sew); no Ssstrict-equivalent suite exists to exercise these reserved SEW encodings; see the per-instruction _sewn32_rsv/_sewn64_rsv rules in each extension’s own file |
|
veccrypto_vl_vstart_rsv |
Instructions that violate the |
TODO: no Ssstrict-equivalent suite exists for the vector-crypto extensions to exercise vl/vstart values that violate the EGS constraint |
vghsh-vv_sewn32_rsv |
Out-of-Scope: reserved because of CSR state (vtype.sew); Zvkg only generates SEW=32 tests and there is no Ssstrict-equivalent suite for vector-crypto |
|
vgmul-vv_sewn32_rsv |
Out-of-Scope: reserved because of CSR state (vtype.sew); Zvkg only generates SEW=32 tests and there is no Ssstrict-equivalent suite for vector-crypto |
|
vsha2chl-vv_Zvknha_sewn32_rsv |
Out-of-Scope: reserved because of CSR state (vtype.sew); no suite drives it to a reserved value under Zvknha and there is no Ssstrict-equivalent suite for vector-crypto |
|
vsha2chl-vv_Zvknhb_sewn32or64_rsv |
Out-of-Scope: reserved because of CSR state (vtype.sew); no suite drives it to a reserved value under Zvknhb and there is no Ssstrict-equivalent suite for vector-crypto |
|
vsha2chl-vv_vdoverlapvs1vs2_rsv |
TODO: this is an SsstrictV-style reserved-encoding test; no cmp_vd_vs1/cmp_vd_vs2-style register-aliasing coverpoint exists for this suite and no SsstrictV-equivalent suite exists for vector crypto |
|
vsha2ms-vv_Zvknha_sewn32_rsv |
Out-of-Scope: reserved because of CSR state (vtype.sew); no suite drives it to a reserved value under Zvknha and there is no Ssstrict-equivalent suite for vector-crypto |
|
vsha2ms-vv_Zvknhb_sewn32or64_rsv |
Out-of-Scope: reserved because of CSR state (vtype.sew); no suite drives it to a reserved value under Zvknhb and there is no Ssstrict-equivalent suite for vector-crypto |
|
vsha2ms-vv_vdoverlapvs1vs2_rsv |
TODO: this is an SsstrictV-style reserved-encoding test; no cmp_vd_vs1/cmp_vd_vs2-style register-aliasing coverpoint exists for this suite and no SsstrictV-equivalent suite exists for vector crypto |
|
vsm3c-vi_sewn32_rsv |
Out-of-Scope: reserved because of CSR state (vtype.sew); Zvksh only generates SEW=32 tests and there is no Ssstrict-equivalent suite for vector-crypto |
|
vsm3c-vi_vdoverlapvs2_rsv |
TODO: this is an SsstrictV-style reserved-encoding test; Zvksh_vsm3c_vi_cg has no vd/vs2 register-aliasing coverpoint and there is no Ssstrict-equivalent suite for vector-crypto |
|
vsm3me-vv_sewn32_rsv |
Out-of-Scope: reserved because of CSR state (vtype.sew); Zvksh only generates SEW=32 tests and there is no Ssstrict-equivalent suite for vector-crypto |
|
vsm3me-vv_vdoverlapvs2_rsv |
TODO: this is an SsstrictV-style reserved-encoding test; Zvksh_vsm3me_vv_cg has no vd/vs2 register-aliasing coverpoint (only vd/vs1 and vs1/vs2) and there is no Ssstrict-equivalent suite for vector-crypto |
|
vsm4k-vi_sewn32_rsv |
Out-of-Scope: reserved because of CSR state (vtype.sew); Zvksed only generates SEW=32 tests and there is no Ssstrict-equivalent suite for vector-crypto |
|
vsm4r-vs_vdoverlapvs2_rsv |
Only for the *.VS form: the vd register group overlaps the vs2 register |
TODO: this is an SsstrictV-style reserved-encoding test; Zvksed_vsm4r_vs_cg has no vd/vs2 register-aliasing coverpoint and there is no Ssstrict-equivalent suite for vector-crypto |
vsm4r_sewn32_rsv |
Out-of-Scope: reserved because of CSR state (vtype.sew); Zvksed only generates SEW=32 tests and there is no Ssstrict-equivalent suite for vector-crypto |
|
veccrypto_vsins_vdvs2overlap |
TODO |
UDB Parameters: None.
B.9.3. ExceptionsVx Vector Integer Exceptions
The vector exception tests exercise everything else that might cause exceptions aside from misalignment and reserved instructions.
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. Some tests always trap, such as access faults. Other tests may either succeed or trap depending on a parameter. For example, an implementation may trap on nonzero vstart values, or may execute them in hardware.
| Instruction | vadd.vv | vadd.vx | vadd.vi | vwadd.vv | vwadd.vx | vwaddu.vv | vwaddu.vx | vwadd.wv | vwadd.wx | vwaddu.wv | vwaddu.wx | vsub.vv |
|---|---|---|---|---|---|---|---|---|---|---|---|---|
RV32 |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
RV64 |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
EFFEW8 |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
EFFEW16 |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
EFFEW32 |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
EFFEW64 |
x |
x |
x |
x |
||||||||
cp_vill |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
cp_vstart |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
cp_vstart_gt_vl |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
| Instruction | vsub.vx | vwsub.vv | vwsub.vx | vwsubu.vv | vwsubu.vx | vwsub.wv | vwsub.wx | vwsubu.wv | vwsubu.wx | vrsub.vx | vrsub.vi | vzext.vf2 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|
RV32 |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
RV64 |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
EFFEW8 |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
|
EFFEW16 |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
EFFEW32 |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
EFFEW64 |
x |
x |
x |
x |
||||||||
cp_vill |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
cp_vstart |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
cp_vstart_gt_vl |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
| Instruction | vzext.vf4 | vzext.vf8 | vsext.vf2 | vsext.vf4 | vsext.vf8 | vadc.vvm | vadc.vxm | vadc.vim | vsbc.vvm | vsbc.vxm | vmadc.vvm | vmadc.vxm |
|---|---|---|---|---|---|---|---|---|---|---|---|---|
RV32 |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
RV64 |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
EFFEW8 |
x |
x |
x |
x |
x |
x |
x |
|||||
EFFEW16 |
x |
x |
x |
x |
x |
x |
x |
x |
||||
EFFEW32 |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
||
EFFEW64 |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
cp_vill |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
cp_vstart |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
cp_vstart_gt_vl |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
| Instruction | vmadc.vim | vmadc.vv | vmadc.vx | vmadc.vi | vmsbc.vvm | vmsbc.vxm | vmsbc.vv | vmsbc.vx | vand.vv | vand.vx | vand.vi | vor.vv |
|---|---|---|---|---|---|---|---|---|---|---|---|---|
RV32 |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
RV64 |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
EFFEW8 |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
EFFEW16 |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
EFFEW32 |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
EFFEW64 |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
cp_vill |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
cp_vstart |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
cp_vstart_gt_vl |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
| Instruction | vor.vx | vor.vi | vxor.vv | vxor.vx | vxor.vi | vsll.vv | vsll.vx | vsll.vi | vsrl.vv | vsrl.vx | vsrl.vi | vnsrl.wv |
|---|---|---|---|---|---|---|---|---|---|---|---|---|
RV32 |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
RV64 |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
EFFEW8 |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
EFFEW16 |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
EFFEW32 |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
EFFEW64 |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
|
cp_vill |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
cp_vstart |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
cp_vstart_gt_vl |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
| Instruction | vnsrl.wx | vnsrl.wi | vsra.vv | vsra.vx | vsra.vi | vnsra.wv | vnsra.wx | vnsra.wi | vmseq.vv | vmseq.vx | vmseq.vi | vmsne.vv |
|---|---|---|---|---|---|---|---|---|---|---|---|---|
RV32 |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
RV64 |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
EFFEW8 |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
EFFEW16 |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
EFFEW32 |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
EFFEW64 |
x |
x |
x |
x |
x |
x |
x |
|||||
cp_vill |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
cp_vstart |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
cp_vstart_gt_vl |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
| Instruction | vmsne.vx | vmsne.vi | vmslt.vv | vmslt.vx | vmsltu.vv | vmsltu.vx | vmsle.vv | vmsle.vx | vmsle.vi | vmsleu.vv | vmsleu.vx | vmsleu.vi |
|---|---|---|---|---|---|---|---|---|---|---|---|---|
RV32 |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
RV64 |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
EFFEW8 |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
EFFEW16 |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
EFFEW32 |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
EFFEW64 |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
cp_vill |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
cp_vstart |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
cp_vstart_gt_vl |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
| Instruction | vmsgt.vx | vmsgt.vi | vmsgtu.vx | vmsgtu.vi | vmin.vv | vmin.vx | vminu.vv | vminu.vx | vmax.vv | vmax.vx | vmaxu.vv | vmaxu.vx |
|---|---|---|---|---|---|---|---|---|---|---|---|---|
RV32 |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
RV64 |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
EFFEW8 |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
EFFEW16 |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
EFFEW32 |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
EFFEW64 |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
cp_vill |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
cp_vstart |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
cp_vstart_gt_vl |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
| Instruction | vmul.vv | vmul.vx | vmulh.vv | vmulh.vx | vmulhu.vv | vmulhu.vx | vmulhsu.vv | vmulhsu.vx | vwmul.vv | vwmul.vx | vwmulu.vv | vwmulu.vx |
|---|---|---|---|---|---|---|---|---|---|---|---|---|
RV32 |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
RV64 |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
EFFEW8 |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
EFFEW16 |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
EFFEW32 |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
EFFEW64 |
x |
x |
x |
x |
x |
x |
x |
x |
||||
cp_vill |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
cp_vstart |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
cp_vstart_gt_vl |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
| Instruction | vwmulsu.vv | vwmulsu.vx | vdiv.vv | vdiv.vx | vdivu.vv | vdivu.vx | vrem.vv | vrem.vx | vremu.vv | vremu.vx | vmacc.vv | vmacc.vx |
|---|---|---|---|---|---|---|---|---|---|---|---|---|
RV32 |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
RV64 |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
EFFEW8 |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
EFFEW16 |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
EFFEW32 |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
EFFEW64 |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
||
cp_vill |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
cp_vstart |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
cp_vstart_gt_vl |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
| Instruction | vnmsac.vv | vnmsac.vx | vmadd.vv | vmadd.vx | vnmsub.vv | vnmsub.vx | vwmacc.vv | vwmacc.vx | vwmaccu.vv | vwmaccu.vx | vwmaccsu.vv | vwmaccsu.vx |
|---|---|---|---|---|---|---|---|---|---|---|---|---|
RV32 |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
RV64 |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
EFFEW8 |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
EFFEW16 |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
EFFEW32 |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
EFFEW64 |
x |
x |
x |
x |
x |
x |
||||||
cp_vill |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
cp_vstart |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
cp_vstart_gt_vl |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
| Instruction | vwmaccus.vx | vmerge.vvm | vmerge.vxm | vmerge.vim | vmv.v.v | vmv.v.x | vmv.v.i | vsadd.vv | vsadd.vx | vsadd.vi | vsaddu.vv | vsaddu.vx |
|---|---|---|---|---|---|---|---|---|---|---|---|---|
RV32 |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
RV64 |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
EFFEW8 |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
EFFEW16 |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
EFFEW32 |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
EFFEW64 |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
|
cp_vill |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
cp_vstart |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
cp_vstart_gt_vl |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
| Instruction | vsaddu.vi | vssub.vv | vssub.vx | vssubu.vv | vssubu.vx | vaadd.vv | vaadd.vx | vaaddu.vv | vaaddu.vx | vasub.vv | vasub.vx | vasubu.vv |
|---|---|---|---|---|---|---|---|---|---|---|---|---|
RV32 |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
RV64 |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
EFFEW8 |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
EFFEW16 |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
EFFEW32 |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
EFFEW64 |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
cp_vill |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
cp_vstart |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
cp_vstart_gt_vl |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
| Instruction | vasubu.vx | vsmul.vv | vsmul.vx | vssrl.vv | vssrl.vx | vssrl.vi | vssra.vv | vssra.vx | vssra.vi | vnclip.wv | vnclip.wx | vnclip.wi |
|---|---|---|---|---|---|---|---|---|---|---|---|---|
RV32 |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
RV64 |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
EFFEW8 |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
EFFEW16 |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
EFFEW32 |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
EFFEW64 |
x |
x |
x |
x |
x |
x |
x |
x |
x |
|||
cp_vill |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
cp_vstart |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
cp_vstart_gt_vl |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
| Instruction | vnclipu.wv | vnclipu.wx | vnclipu.wi | vredsum.vs | vwredsum.vs | vwredsumu.vs | vredmax.vs | vredmaxu.vs | vredmin.vs | vredminu.vs | vredand.vs | vredor.vs |
|---|---|---|---|---|---|---|---|---|---|---|---|---|
RV32 |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
RV64 |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
EFFEW8 |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
EFFEW16 |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
EFFEW32 |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
EFFEW64 |
x |
x |
x |
x |
x |
x |
x |
|||||
cp_vill |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
cp_vstart |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
cp_vstart_gt_vl |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
| Instruction | vredxor.vs | vmand.mm | vmnand.mm | vmandn.mm | vmxor.mm | vmor.mm | vmnor.mm | vmorn.mm | vmxnor.mm | vcpop.m | vfirst.m | vmsbf.m |
|---|---|---|---|---|---|---|---|---|---|---|---|---|
RV32 |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
RV64 |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
EFFEW8 |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
EFFEW16 |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
EFFEW32 |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
EFFEW64 |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
cp_vill |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
cp_vstart |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
cp_vstart_gt_vl |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
| Instruction | vmsif.m | vmsof.m | viota.m | vid.v | vmv.x.s | vmv.s.x | vslideup.vx | vslideup.vi | vslidedown.vx | vslidedown.vi | vslide1up.vx | vslide1down.vx |
|---|---|---|---|---|---|---|---|---|---|---|---|---|
RV32 |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
RV64 |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
EFFEW8 |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
EFFEW16 |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
EFFEW32 |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
EFFEW64 |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
cp_vill |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
cp_vstart |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
cp_vstart_gt_vl |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
| Instruction | vrgather.vv | vrgather.vx | vrgather.vi | vrgatherei16.vv | vcompress.vm | vmv1r.v | vmv2r.v | vmv4r.v | vmv8r.v |
|---|---|---|---|---|---|---|---|---|---|
RV32 |
x |
x |
x |
x |
x |
x |
x |
x |
x |
RV64 |
x |
x |
x |
x |
x |
x |
x |
x |
x |
EFFEW8 |
x |
x |
x |
x |
x |
x |
x |
x |
|
EFFEW16 |
x |
x |
x |
x |
x |
x |
x |
x |
x |
EFFEW32 |
x |
x |
x |
x |
x |
x |
x |
x |
x |
EFFEW64 |
x |
x |
x |
x |
x |
x |
x |
x |
x |
cp_vill |
x |
x |
x |
x |
x |
x |
x |
x |
x |
cp_vstart |
x |
x |
x |
x |
x |
x |
x |
x |
x |
cp_vstart_gt_vl |
x |
x |
x |
x |
x |
| Normative Rule | Rule Text | Coverpoints |
|---|---|---|
vstart_unmodified |
|
TODO: no coverpoint checks that vstart is unmodified after an illegal-instruction exception; cp_vstart only checks that the exception is raised |
vstart_val_rsv |
ExceptionsVx_vsaddu_vv_cg/cp_vstart_gt_vl |
|
vstart_vtype_dep |
Untestable: implementations are permitted, not required, to raise this exception, so no behavior can be asserted |
UDB Parameters: None.
B.9.4. ExceptionsVf Vector Floating-Point Exceptions
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. They test operations that may either succeed or trap depending on a parameter.
| Instruction | vfadd.vv | vfadd.vf | vfwadd.vv | vfwadd.vf | vfwadd.wv | vfwadd.wf | vfsub.vv | vfsub.vf | vfwsub.vv | vfwsub.vf | vfwsub.wv | vfwsub.wf |
|---|---|---|---|---|---|---|---|---|---|---|---|---|
RV32 |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
RV64 |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
EFFEW16 |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
EFFEW32 |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
EFFEW64 |
x |
x |
x |
x |
||||||||
cp_vill |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
cp_vstart |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
cp_vstart_gt_vl |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
cp_mstatus_vs_off |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
cp_mstatus_fs_off |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
cp_vectorfp_mstatus_fs_state |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
cp_vectorfp_mstatus_fs_state_nonaffecting |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
cp_vectorfp_mstatus_fs_state_affecting_register |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
cp_vectorfp_mstatus_fs_state_affecting_csr |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
| Instruction | vfrsub.vf | vfmul.vv | vfmul.vf | vfwmul.vv | vfwmul.vf | vfdiv.vv | vfdiv.vf | vfrdiv.vf | vfmacc.vv | vfmacc.vf | vfnmacc.vv | vfnmacc.vf |
|---|---|---|---|---|---|---|---|---|---|---|---|---|
RV32 |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
RV64 |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
EFFEW16 |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
EFFEW32 |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
EFFEW64 |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
||
cp_vill |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
cp_vstart |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
cp_vstart_gt_vl |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
cp_mstatus_vs_off |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
cp_mstatus_fs_off |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
cp_vectorfp_mstatus_fs_state |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
cp_vectorfp_mstatus_fs_state_nonaffecting |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
cp_vectorfp_mstatus_fs_state_affecting_register |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
cp_vectorfp_mstatus_fs_state_affecting_csr |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
| Instruction | vfmsac.vv | vfmsac.vf | vfnmsac.vv | vfnmsac.vf | vfmadd.vv | vfmadd.vf | vfnmadd.vv | vfnmadd.vf | vfmsub.vv | vfmsub.vf | vfnmsub.vv | vfnmsub.vf |
|---|---|---|---|---|---|---|---|---|---|---|---|---|
RV32 |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
RV64 |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
EFFEW16 |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
EFFEW32 |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
EFFEW64 |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
cp_vill |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
cp_vstart |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
cp_vstart_gt_vl |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
cp_mstatus_vs_off |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
cp_mstatus_fs_off |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
cp_vectorfp_mstatus_fs_state |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
cp_vectorfp_mstatus_fs_state_nonaffecting |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
cp_vectorfp_mstatus_fs_state_affecting_register |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
cp_vectorfp_mstatus_fs_state_affecting_csr |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
| Instruction | vfwmacc.vv | vfwmacc.vf | vfwnmacc.vv | vfwnmacc.vf | vfwmsac.vv | vfwmsac.vf | vfwnmsac.vv | vfwnmsac.vf | vfsqrt.v | vfrsqrt7.v | vfrec7.v | vfmin.vv |
|---|---|---|---|---|---|---|---|---|---|---|---|---|
RV32 |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
RV64 |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
EFFEW16 |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
EFFEW32 |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
EFFEW64 |
x |
x |
x |
x |
||||||||
cp_vill |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
cp_vstart |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
cp_vstart_gt_vl |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
cp_mstatus_vs_off |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
cp_mstatus_fs_off |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
cp_vectorfp_mstatus_fs_state |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
cp_vectorfp_mstatus_fs_state_nonaffecting |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
cp_vectorfp_mstatus_fs_state_affecting_register |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
cp_vectorfp_mstatus_fs_state_affecting_csr |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
| Instruction | vfmin.vf | vfmax.vv | vfmax.vf | vfsgnj.vv | vfsgnj.vf | vfsgnjn.vv | vfsgnjn.vf | vfsgnjx.vv | vfsgnjx.vf | vfredosum.vs | vfwredosum.vs | vfredusum.vs |
|---|---|---|---|---|---|---|---|---|---|---|---|---|
RV32 |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
RV64 |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
EFFEW16 |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
EFFEW32 |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
EFFEW64 |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
|
cp_vill |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
cp_vstart |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
cp_vstart_gt_vl |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
cp_mstatus_vs_off |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
cp_mstatus_fs_off |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
cp_vectorfp_mstatus_fs_state |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
cp_vectorfp_mstatus_fs_state_nonaffecting |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
cp_vectorfp_mstatus_fs_state_affecting_register |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
cp_vectorfp_mstatus_fs_state_affecting_csr |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
| Instruction | vfwredusum.vs | vfredmax.vs | vfredmin.vs | vmfeq.vv | vmfeq.vf | vmfne.vv | vmfne.vf | vmflt.vv | vmflt.vf | vmfle.vv | vmfle.vf | vmfgt.vf |
|---|---|---|---|---|---|---|---|---|---|---|---|---|
RV32 |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
RV64 |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
EFFEW16 |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
EFFEW32 |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
EFFEW64 |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
|
cp_vill |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
cp_vstart |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
cp_vstart_gt_vl |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
cp_mstatus_vs_off |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
cp_mstatus_fs_off |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
cp_vectorfp_mstatus_fs_state |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
cp_vectorfp_mstatus_fs_state_nonaffecting |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
cp_vectorfp_mstatus_fs_state_affecting_register |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
cp_vectorfp_mstatus_fs_state_affecting_csr |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
| Instruction | vmfge.vf | vfmerge.vfm | vfmv.v.f | vfmv.f.s | vfmv.s.f | vfslide1up.vf | vfslide1down.vf | vfcvt.xu.f.v | vfwcvt.xu.f.v | vfncvt.xu.f.w | vfcvt.x.f.v | vfwcvt.x.f.v |
|---|---|---|---|---|---|---|---|---|---|---|---|---|
RV32 |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
RV64 |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
EFFEW16 |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
EFFEW32 |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
EFFEW64 |
x |
x |
x |
x |
x |
x |
x |
x |
x |
|||
cp_vill |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
cp_vstart |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
cp_vstart_gt_vl |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
cp_mstatus_vs_off |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
cp_mstatus_fs_off |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
cp_vectorfp_mstatus_fs_state |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
cp_vectorfp_mstatus_fs_state_nonaffecting |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
cp_vectorfp_mstatus_fs_state_affecting_register |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
cp_vectorfp_mstatus_fs_state_affecting_csr |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
| Instruction | vfncvt.x.f.w | vfcvt.rtz.xu.f.v | vfwcvt.rtz.xu.f.v | vfncvt.rtz.xu.f.w | vfcvt.rtz.x.f.v | vfwcvt.rtz.x.f.v | vfncvt.rtz.x.f.w | vfcvt.f.xu.v | vfwcvt.f.xu.v | vfncvt.f.xu.w | vfcvt.f.x.v | vfwcvt.f.x.v |
|---|---|---|---|---|---|---|---|---|---|---|---|---|
RV32 |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
RV64 |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
EFFEW16 |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
EFFEW32 |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
EFFEW64 |
x |
x |
x |
x |
||||||||
cp_vill |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
cp_vstart |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
cp_vstart_gt_vl |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
cp_mstatus_vs_off |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
cp_mstatus_fs_off |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
cp_vectorfp_mstatus_fs_state |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
cp_vectorfp_mstatus_fs_state_nonaffecting |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
cp_vectorfp_mstatus_fs_state_affecting_register |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
cp_vectorfp_mstatus_fs_state_affecting_csr |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
| Instruction | vfncvt.f.x.w | vfwcvt.f.f.v | vfncvt.f.f.w | vfncvt.rod.f.f.w | vfclass.v |
|---|---|---|---|---|---|
RV32 |
x |
x |
x |
x |
x |
RV64 |
x |
x |
x |
x |
x |
EFFEW16 |
x |
x |
x |
x |
|
EFFEW32 |
x |
x |
x |
x |
|
EFFEW64 |
x |
||||
cp_vill |
x |
x |
x |
x |
x |
cp_vstart |
x |
x |
x |
x |
x |
cp_vstart_gt_vl |
x |
x |
x |
x |
x |
cp_mstatus_vs_off |
x |
x |
x |
x |
x |
cp_mstatus_fs_off |
x |
x |
x |
x |
x |
cp_vectorfp_mstatus_fs_state |
x |
x |
x |
x |
x |
cp_vectorfp_mstatus_fs_state_nonaffecting |
x |
x |
x |
x |
x |
cp_vectorfp_mstatus_fs_state_affecting_register |
x |
x |
x |
x |
x |
cp_vectorfp_mstatus_fs_state_affecting_csr |
x |
x |
x |
x |
x |
| Normative Rule | Rule Text | Coverpoints |
|---|---|---|
V_fp_eew_ieee_nsupported_rsv |
ExceptionsVf16_vfmv_f_s_cg/cp_vill |
UDB Parameters: None.
B.9.5. ExceptionsVls Vector Load/Store Exceptions
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. They test operations that may either succeed or trap depending on a parameter.
| Instruction | vle8.v | vle16.v | vle32.v | vle64.v | vlseg2e8.v | vlseg2e16.v | vlseg2e32.v | vlseg2e64.v | vlseg3e8.v | vlseg3e16.v | vlseg3e32.v | vlseg3e64.v |
|---|---|---|---|---|---|---|---|---|---|---|---|---|
RV32 |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
RV64 |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
EFFEW8 |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
EFFEW16 |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
EFFEW32 |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
EFFEW64 |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
cp_exceptionsv_LS |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
cp_exceptionsv_address_fault |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
cp_vill |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
cp_vstart |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
cp_vstart_gt_vl |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
| Instruction | vlseg4e8.v | vlseg4e16.v | vlseg4e32.v | vlseg4e64.v | vlseg5e8.v | vlseg5e16.v | vlseg5e32.v | vlseg5e64.v | vlseg6e8.v | vlseg6e16.v | vlseg6e32.v | vlseg6e64.v |
|---|---|---|---|---|---|---|---|---|---|---|---|---|
RV32 |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
RV64 |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
EFFEW8 |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
EFFEW16 |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
EFFEW32 |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
EFFEW64 |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
cp_exceptionsv_LS |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
cp_exceptionsv_address_fault |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
cp_vill |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
cp_vstart |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
cp_vstart_gt_vl |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
| Instruction | vlseg7e8.v | vlseg7e16.v | vlseg7e32.v | vlseg7e64.v | vlseg8e8.v | vlseg8e16.v | vlseg8e32.v | vlseg8e64.v | vle8ff.v | vle16ff.v | vle32ff.v | vle64ff.v |
|---|---|---|---|---|---|---|---|---|---|---|---|---|
RV32 |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
RV64 |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
EFFEW8 |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
EFFEW16 |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
EFFEW32 |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
EFFEW64 |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
cp_exceptionsv_LS |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
cp_exceptionsv_ffLS |
x |
x |
x |
x |
||||||||
cp_exceptionsv_address_fault |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
cp_vill |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
cp_vstart |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
cp_vstart_gt_vl |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
| Instruction | vlseg2e8ff.v | vlseg2e16ff.v | vlseg2e32ff.v | vlseg2e64ff.v | vlseg3e8ff.v | vlseg3e16ff.v | vlseg3e32ff.v | vlseg3e64ff.v | vlseg4e8ff.v | vlseg4e16ff.v | vlseg4e32ff.v | vlseg4e64ff.v |
|---|---|---|---|---|---|---|---|---|---|---|---|---|
RV32 |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
RV64 |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
EFFEW8 |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
EFFEW16 |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
EFFEW32 |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
EFFEW64 |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
cp_exceptionsv_LS |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
cp_exceptionsv_ffLS |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
cp_exceptionsv_address_fault |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
cp_vill |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
cp_vstart |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
cp_vstart_gt_vl |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
| Instruction | vlseg5e8ff.v | vlseg5e16ff.v | vlseg5e32ff.v | vlseg5e64ff.v | vlseg6e8ff.v | vlseg6e16ff.v | vlseg6e32ff.v | vlseg6e64ff.v | vlseg7e8ff.v | vlseg7e16ff.v | vlseg7e32ff.v | vlseg7e64ff.v |
|---|---|---|---|---|---|---|---|---|---|---|---|---|
RV32 |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
RV64 |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
EFFEW8 |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
EFFEW16 |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
EFFEW32 |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
EFFEW64 |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
cp_exceptionsv_LS |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
cp_exceptionsv_ffLS |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
cp_exceptionsv_address_fault |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
cp_vill |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
cp_vstart |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
cp_vstart_gt_vl |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
| Instruction | vlseg8e8ff.v | vlseg8e16ff.v | vlseg8e32ff.v | vlseg8e64ff.v | vlse8.v | vlse16.v | vlse32.v | vlse64.v | vlsseg2e8.v | vlsseg2e16.v | vlsseg2e32.v | vlsseg2e64.v |
|---|---|---|---|---|---|---|---|---|---|---|---|---|
RV32 |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
RV64 |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
EFFEW8 |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
EFFEW16 |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
EFFEW32 |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
EFFEW64 |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
cp_exceptionsv_LS |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
cp_exceptionsv_ffLS |
x |
x |
x |
x |
||||||||
cp_exceptionsv_address_fault |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
cp_vill |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
cp_vstart |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
cp_vstart_gt_vl |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
| Instruction | vlsseg3e8.v | vlsseg3e16.v | vlsseg3e32.v | vlsseg3e64.v | vlsseg4e8.v | vlsseg4e16.v | vlsseg4e32.v | vlsseg4e64.v | vlsseg5e8.v | vlsseg5e16.v | vlsseg5e32.v | vlsseg5e64.v |
|---|---|---|---|---|---|---|---|---|---|---|---|---|
RV32 |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
RV64 |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
EFFEW8 |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
EFFEW16 |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
EFFEW32 |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
EFFEW64 |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
cp_exceptionsv_LS |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
cp_exceptionsv_address_fault |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
cp_vill |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
cp_vstart |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
cp_vstart_gt_vl |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
| Instruction | vlsseg6e8.v | vlsseg6e16.v | vlsseg6e32.v | vlsseg6e64.v | vlsseg7e8.v | vlsseg7e16.v | vlsseg7e32.v | vlsseg7e64.v | vlsseg8e8.v | vlsseg8e16.v | vlsseg8e32.v | vlsseg8e64.v |
|---|---|---|---|---|---|---|---|---|---|---|---|---|
RV32 |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
RV64 |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
EFFEW8 |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
EFFEW16 |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
EFFEW32 |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
EFFEW64 |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
cp_exceptionsv_LS |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
cp_exceptionsv_address_fault |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
cp_vill |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
cp_vstart |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
cp_vstart_gt_vl |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
| Instruction | vluxei8.v | vluxei16.v | vluxei32.v | vluxei64.v | vluxseg2ei8.v | vluxseg2ei16.v | vluxseg2ei32.v | vluxseg2ei64.v | vluxseg3ei8.v | vluxseg3ei16.v | vluxseg3ei32.v | vluxseg3ei64.v |
|---|---|---|---|---|---|---|---|---|---|---|---|---|
RV32 |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
RV64 |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
EFFEW8 |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
EFFEW16 |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
EFFEW32 |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
EFFEW64 |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
cp_exceptionsv_LS |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
cp_exceptionsv_address_fault |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
cp_exceptionsv_index_eew16 |
x |
x |
x |
|||||||||
cp_exceptionsv_index_eew32 |
x |
x |
x |
|||||||||
cp_exceptionsv_index_eew64 |
x |
x |
x |
|||||||||
cp_exceptionsv_indexed |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
cp_vill |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
cp_vstart |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
cp_vstart_gt_vl |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
| Instruction | vluxseg4ei8.v | vluxseg4ei16.v | vluxseg4ei32.v | vluxseg4ei64.v | vluxseg5ei8.v | vluxseg5ei16.v | vluxseg5ei32.v | vluxseg5ei64.v | vluxseg6ei8.v | vluxseg6ei16.v | vluxseg6ei32.v | vluxseg6ei64.v |
|---|---|---|---|---|---|---|---|---|---|---|---|---|
RV32 |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
RV64 |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
EFFEW8 |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
EFFEW16 |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
EFFEW32 |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
EFFEW64 |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
cp_exceptionsv_LS |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
cp_exceptionsv_address_fault |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
cp_exceptionsv_index_eew16 |
x |
x |
x |
|||||||||
cp_exceptionsv_index_eew32 |
x |
x |
x |
|||||||||
cp_exceptionsv_index_eew64 |
x |
x |
x |
|||||||||
cp_exceptionsv_indexed |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
cp_vill |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
cp_vstart |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
cp_vstart_gt_vl |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
| Instruction | vluxseg7ei8.v | vluxseg7ei16.v | vluxseg7ei32.v | vluxseg7ei64.v | vluxseg8ei8.v | vluxseg8ei16.v | vluxseg8ei32.v | vluxseg8ei64.v | vloxei8.v | vloxei16.v | vloxei32.v | vloxei64.v |
|---|---|---|---|---|---|---|---|---|---|---|---|---|
RV32 |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
RV64 |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
EFFEW8 |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
EFFEW16 |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
EFFEW32 |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
EFFEW64 |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
cp_exceptionsv_LS |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
cp_exceptionsv_address_fault |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
cp_exceptionsv_index_eew16 |
x |
x |
x |
|||||||||
cp_exceptionsv_index_eew32 |
x |
x |
x |
|||||||||
cp_exceptionsv_index_eew64 |
x |
x |
x |
|||||||||
cp_exceptionsv_indexed |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
cp_vill |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
cp_vstart |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
cp_vstart_gt_vl |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
| Instruction | vloxseg2ei8.v | vloxseg2ei16.v | vloxseg2ei32.v | vloxseg2ei64.v | vloxseg3ei8.v | vloxseg3ei16.v | vloxseg3ei32.v | vloxseg3ei64.v | vloxseg4ei8.v | vloxseg4ei16.v | vloxseg4ei32.v | vloxseg4ei64.v |
|---|---|---|---|---|---|---|---|---|---|---|---|---|
RV32 |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
RV64 |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
EFFEW8 |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
EFFEW16 |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
EFFEW32 |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
EFFEW64 |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
cp_exceptionsv_LS |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
cp_exceptionsv_address_fault |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
cp_exceptionsv_index_eew16 |
x |
x |
x |
|||||||||
cp_exceptionsv_index_eew32 |
x |
x |
x |
|||||||||
cp_exceptionsv_index_eew64 |
x |
x |
x |
|||||||||
cp_exceptionsv_indexed |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
cp_vill |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
cp_vstart |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
cp_vstart_gt_vl |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
| Instruction | vloxseg5ei8.v | vloxseg5ei16.v | vloxseg5ei32.v | vloxseg5ei64.v | vloxseg6ei8.v | vloxseg6ei16.v | vloxseg6ei32.v | vloxseg6ei64.v | vloxseg7ei8.v | vloxseg7ei16.v | vloxseg7ei32.v | vloxseg7ei64.v |
|---|---|---|---|---|---|---|---|---|---|---|---|---|
RV32 |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
RV64 |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
EFFEW8 |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
EFFEW16 |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
EFFEW32 |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
EFFEW64 |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
cp_exceptionsv_LS |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
cp_exceptionsv_address_fault |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
cp_exceptionsv_index_eew16 |
x |
x |
x |
|||||||||
cp_exceptionsv_index_eew32 |
x |
x |
x |
|||||||||
cp_exceptionsv_index_eew64 |
x |
x |
x |
|||||||||
cp_exceptionsv_indexed |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
cp_vill |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
cp_vstart |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
cp_vstart_gt_vl |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
| Instruction | vloxseg8ei8.v | vloxseg8ei16.v | vloxseg8ei32.v | vloxseg8ei64.v | vse8.v | vse16.v | vse32.v | vse64.v | vsseg2e8.v | vsseg2e16.v | vsseg2e32.v | vsseg2e64.v |
|---|---|---|---|---|---|---|---|---|---|---|---|---|
RV32 |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
RV64 |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
EFFEW8 |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
EFFEW16 |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
EFFEW32 |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
EFFEW64 |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
cp_exceptionsv_LS |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
cp_exceptionsv_address_fault |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
cp_exceptionsv_index_eew16 |
x |
|||||||||||
cp_exceptionsv_index_eew32 |
x |
|||||||||||
cp_exceptionsv_index_eew64 |
x |
|||||||||||
cp_exceptionsv_indexed |
x |
x |
x |
x |
||||||||
cp_vill |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
cp_vstart |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
cp_vstart_gt_vl |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
| Instruction | vsseg3e8.v | vsseg3e16.v | vsseg3e32.v | vsseg3e64.v | vsseg4e8.v | vsseg4e16.v | vsseg4e32.v | vsseg4e64.v | vsseg5e8.v | vsseg5e16.v | vsseg5e32.v | vsseg5e64.v |
|---|---|---|---|---|---|---|---|---|---|---|---|---|
RV32 |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
RV64 |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
EFFEW8 |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
EFFEW16 |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
EFFEW32 |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
EFFEW64 |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
cp_exceptionsv_LS |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
cp_exceptionsv_address_fault |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
cp_vill |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
cp_vstart |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
cp_vstart_gt_vl |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
| Instruction | vsseg6e8.v | vsseg6e16.v | vsseg6e32.v | vsseg6e64.v | vsseg7e8.v | vsseg7e16.v | vsseg7e32.v | vsseg7e64.v | vsseg8e8.v | vsseg8e16.v | vsseg8e32.v | vsseg8e64.v |
|---|---|---|---|---|---|---|---|---|---|---|---|---|
RV32 |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
RV64 |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
EFFEW8 |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
EFFEW16 |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
EFFEW32 |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
EFFEW64 |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
cp_exceptionsv_LS |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
cp_exceptionsv_address_fault |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
cp_vill |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
cp_vstart |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
cp_vstart_gt_vl |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
| Instruction | vsse8.v | vsse16.v | vsse32.v | vsse64.v | vssseg2e8.v | vssseg2e16.v | vssseg2e32.v | vssseg2e64.v | vssseg3e8.v | vssseg3e16.v | vssseg3e32.v | vssseg3e64.v |
|---|---|---|---|---|---|---|---|---|---|---|---|---|
RV32 |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
RV64 |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
EFFEW8 |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
EFFEW16 |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
EFFEW32 |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
EFFEW64 |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
cp_exceptionsv_LS |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
cp_exceptionsv_address_fault |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
cp_vill |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
cp_vstart |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
cp_vstart_gt_vl |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
| Instruction | vssseg4e8.v | vssseg4e16.v | vssseg4e32.v | vssseg4e64.v | vssseg5e8.v | vssseg5e16.v | vssseg5e32.v | vssseg5e64.v | vssseg6e8.v | vssseg6e16.v | vssseg6e32.v | vssseg6e64.v |
|---|---|---|---|---|---|---|---|---|---|---|---|---|
RV32 |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
RV64 |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
EFFEW8 |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
EFFEW16 |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
EFFEW32 |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
EFFEW64 |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
cp_exceptionsv_LS |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
cp_exceptionsv_address_fault |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
cp_vill |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
cp_vstart |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
cp_vstart_gt_vl |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
| Instruction | vssseg7e8.v | vssseg7e16.v | vssseg7e32.v | vssseg7e64.v | vssseg8e8.v | vssseg8e16.v | vssseg8e32.v | vssseg8e64.v | vsuxei8.v | vsuxei16.v | vsuxei32.v | vsuxei64.v |
|---|---|---|---|---|---|---|---|---|---|---|---|---|
RV32 |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
RV64 |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
EFFEW8 |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
EFFEW16 |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
EFFEW32 |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
EFFEW64 |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
cp_exceptionsv_LS |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
cp_exceptionsv_address_fault |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
cp_exceptionsv_index_eew16 |
x |
|||||||||||
cp_exceptionsv_index_eew32 |
x |
|||||||||||
cp_exceptionsv_index_eew64 |
x |
|||||||||||
cp_exceptionsv_indexed |
x |
x |
x |
x |
||||||||
cp_vill |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
cp_vstart |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
cp_vstart_gt_vl |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
| Instruction | vsuxseg2ei8.v | vsuxseg2ei16.v | vsuxseg2ei32.v | vsuxseg2ei64.v | vsuxseg3ei8.v | vsuxseg3ei16.v | vsuxseg3ei32.v | vsuxseg3ei64.v | vsuxseg4ei8.v | vsuxseg4ei16.v | vsuxseg4ei32.v | vsuxseg4ei64.v |
|---|---|---|---|---|---|---|---|---|---|---|---|---|
RV32 |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
RV64 |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
EFFEW8 |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
EFFEW16 |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
EFFEW32 |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
EFFEW64 |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
cp_exceptionsv_LS |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
cp_exceptionsv_address_fault |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
cp_exceptionsv_index_eew16 |
x |
x |
x |
|||||||||
cp_exceptionsv_index_eew32 |
x |
x |
x |
|||||||||
cp_exceptionsv_index_eew64 |
x |
x |
x |
|||||||||
cp_exceptionsv_indexed |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
cp_vill |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
cp_vstart |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
cp_vstart_gt_vl |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
| Instruction | vsuxseg5ei8.v | vsuxseg5ei16.v | vsuxseg5ei32.v | vsuxseg5ei64.v | vsuxseg6ei8.v | vsuxseg6ei16.v | vsuxseg6ei32.v | vsuxseg6ei64.v | vsuxseg7ei8.v | vsuxseg7ei16.v | vsuxseg7ei32.v | vsuxseg7ei64.v |
|---|---|---|---|---|---|---|---|---|---|---|---|---|
RV32 |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
RV64 |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
EFFEW8 |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
EFFEW16 |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
EFFEW32 |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
EFFEW64 |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
cp_exceptionsv_LS |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
cp_exceptionsv_address_fault |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
cp_exceptionsv_index_eew16 |
x |
x |
x |
|||||||||
cp_exceptionsv_index_eew32 |
x |
x |
x |
|||||||||
cp_exceptionsv_index_eew64 |
x |
x |
x |
|||||||||
cp_exceptionsv_indexed |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
cp_vill |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
cp_vstart |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
cp_vstart_gt_vl |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
| Instruction | vsuxseg8ei8.v | vsuxseg8ei16.v | vsuxseg8ei32.v | vsuxseg8ei64.v | vsoxei8.v | vsoxei16.v | vsoxei32.v | vsoxei64.v | vsoxseg2ei8.v | vsoxseg2ei16.v | vsoxseg2ei32.v | vsoxseg2ei64.v |
|---|---|---|---|---|---|---|---|---|---|---|---|---|
RV32 |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
RV64 |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
EFFEW8 |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
EFFEW16 |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
EFFEW32 |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
EFFEW64 |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
cp_exceptionsv_LS |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
cp_exceptionsv_address_fault |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
cp_exceptionsv_index_eew16 |
x |
x |
x |
|||||||||
cp_exceptionsv_index_eew32 |
x |
x |
x |
|||||||||
cp_exceptionsv_index_eew64 |
x |
x |
x |
|||||||||
cp_exceptionsv_indexed |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
cp_vill |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
cp_vstart |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
cp_vstart_gt_vl |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
| Instruction | vsoxseg3ei8.v | vsoxseg3ei16.v | vsoxseg3ei32.v | vsoxseg3ei64.v | vsoxseg4ei8.v | vsoxseg4ei16.v | vsoxseg4ei32.v | vsoxseg4ei64.v | vsoxseg5ei8.v | vsoxseg5ei16.v | vsoxseg5ei32.v | vsoxseg5ei64.v |
|---|---|---|---|---|---|---|---|---|---|---|---|---|
RV32 |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
RV64 |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
EFFEW8 |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
EFFEW16 |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
EFFEW32 |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
EFFEW64 |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
cp_exceptionsv_LS |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
cp_exceptionsv_address_fault |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
cp_exceptionsv_index_eew16 |
x |
x |
x |
|||||||||
cp_exceptionsv_index_eew32 |
x |
x |
x |
|||||||||
cp_exceptionsv_index_eew64 |
x |
x |
x |
|||||||||
cp_exceptionsv_indexed |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
cp_vill |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
cp_vstart |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
cp_vstart_gt_vl |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
| Instruction | vsoxseg6ei8.v | vsoxseg6ei16.v | vsoxseg6ei32.v | vsoxseg6ei64.v | vsoxseg7ei8.v | vsoxseg7ei16.v | vsoxseg7ei32.v | vsoxseg7ei64.v | vsoxseg8ei8.v | vsoxseg8ei16.v | vsoxseg8ei32.v | vsoxseg8ei64.v |
|---|---|---|---|---|---|---|---|---|---|---|---|---|
RV32 |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
RV64 |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
EFFEW8 |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
EFFEW16 |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
EFFEW32 |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
EFFEW64 |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
cp_exceptionsv_LS |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
cp_exceptionsv_address_fault |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
cp_exceptionsv_index_eew16 |
x |
x |
x |
|||||||||
cp_exceptionsv_index_eew32 |
x |
x |
x |
|||||||||
cp_exceptionsv_index_eew64 |
x |
x |
x |
|||||||||
cp_exceptionsv_indexed |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
cp_vill |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
cp_vstart |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
cp_vstart_gt_vl |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
| Instruction | vl1re8.v | vl2re8.v | vl4re8.v | vl8re8.v | vl1re16.v | vl2re16.v | vl4re16.v | vl8re16.v | vl1re32.v | vl2re32.v | vl4re32.v | vl8re32.v |
|---|---|---|---|---|---|---|---|---|---|---|---|---|
RV32 |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
RV64 |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
EFFEW8 |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
EFFEW16 |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
EFFEW32 |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
EFFEW64 |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
cp_exceptionsv_LS |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
cp_exceptionsv_address_fault |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
cp_vill |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
cp_vstart |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
cp_vstart_gt_vl |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
| Instruction | vl1re64.v | vl2re64.v | vl4re64.v | vl8re64.v | vs1r.v | vs2r.v | vs4r.v | vs8r.v | vsm.v | vlm.v |
|---|---|---|---|---|---|---|---|---|---|---|
RV32 |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
RV64 |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
EFFEW8 |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
EFFEW16 |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
EFFEW32 |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
EFFEW64 |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
cp_exceptionsv_LS |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
cp_exceptionsv_address_fault |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
cp_vill |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
cp_vstart |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
cp_vstart_gt_vl |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
| Normative Rule | Rule Text | Coverpoints |
|---|---|---|
vector_ls_vstart |
All vector loads and stores may generate and accept a non-zero |
ExceptionsVls_vle8_v_cg/cp_vstart |
vector_ls_stride_unordered_precise |
ExceptionsVls_vsoxei16_v_cg/cp_exceptionsv_address_fault |
|
vector_ls_overwrite_past_trap |
ExceptionsVls_vle8_v_cg/cp_exceptionsv_address_fault |
|
vector_ls_seg_vstart_dep |
ExceptionsVls_vlseg2e8_v_cg/cp_vstart |
|
vector_ff_past_trap |
ExceptionsVls_vle8ff_v_cg/cp_exceptionsv_ffLS_first_elm_trap |
|
vector_ls_seg_partial_access |
ExceptionsVls_vlseg2e8_v_cg/cp_exceptionsv_address_fault |
|
vector_ls_seg_ff_unit_stride_op, vector_ff_seg_partial_access |
vector_ls_seg_ff_unit_stride_op: For fault-only-first segment loads, if an exception is detected partway through accessing the zeroth segment, the trap is taken. If an exception is detected partway through accessing a subsequent segment, |
ExceptionsVls_vlseg2e8ff_v_cg/cp_exceptionsv_ffLS_first_elm_trap |
vector_ls_seg_ff_overload |
ExceptionsVls_vlseg2e8ff_v_cg/cp_exceptionsv_ffLS_first_elm_trap |
|
vec_store_nonidempotent_no_update |
ExceptionsVls_vse8_v_cg/cp_exceptionsv_address_fault |
UDB Parameters: None.
B.10. Miscellaneous RV23 Privileged Extensions
B.10.1. Sscofpmf Counter filtering
The Sscofpmf suite has one covergroup per privilege mode the tests run in: Sscofpmf_Sm_cg (M-mode), Sscofpmf_S_cg (S-mode) and Sscofpmf_U_cg (U-mode). The setup table applies to all three. The Sscofpmf_Sm tests require Sm, so they are not part of a certificate without Sm, such as RVA23.
| Coverpoint | Goal |
|---|---|
To test Sscofpmf, define the following RVMODEL macros in rvmodel_macros.h. check_defines.h reports an error if Sscofpmf is supported and any of them is undefined. |
|
RVMODEL_HPM_COUNTER |
Index, 3 to 31, of the HPM counter to test. The tests derive mhpmevent<n> and mhpmcounter<n>, and on RV32 their high halves, from it; the tables below call them mhpmevent and mhpmcounter. |
RVMODEL_MHPMEVENT_VAL |
Event selector written to mhpmevent[55:0] so that RVMODEL_MHPMEVENT_CODE increments mhpmcounter. 0 if the DUT cannot count any event, in which case the overflow checks are vacuous. |
RVMODEL_MHPMEVENT_CODE |
Code that increments mhpmcounter at least once in the current privilege mode, whatever that mode is. It must not trap. |
The Sail reference model runs a fence in place of RVMODEL_MHPMEVENT_CODE, so map EV_FENCE to RVMODEL_MHPMEVENT_VAL in event_selectors of the DUT’s sail.json. The tests check only whether mhpmcounter moved and whether it overflowed, never by how much, so the DUT and Sail may count different events. |
|
Only one of the HPM counters is tested because the spec does not require multiple counters supported even when Zihpm is active. |
|
The tests run in M-mode (Sscofpmf_Sm), S-mode (Sscofpmf_S) and U-mode (Sscofpmf_U). Each group has its own covergroup and table below. |
|
Below M-mode, T-SBI calls access the machine-mode CSRs, and counting is inhibited in the modes above the one under test so that the T-SBI trap handler is not counted. |
|
Sscofpmf_Sm
| Coverpoint | Goal | Feature Description | Expectation | Bins | Normative Rule |
|---|---|---|---|---|---|
cp_minh_inhibits_mmode |
MINH inhibits counting in M-mode |
In M-mode: |
mhpmcounter is nonzero iff MINH = 0 |
32 xINH combinations |
mhpmevent_inh_op |
cp_of_set_on_overflow |
OF is set when mhpmcounter overflows |
In M-mode, for mhpmevent[62:58] = {00000, 11100, 10000, 01000, 00100}: |
If MINH = 0: mhpmcounter wraps, OF becomes 1 and mip.LCOFIP becomes 1 |
3 patterns with MINH = 0 |
mhpmevent_of_op |
cp_of_already_set |
An overflow with OF already 1 does not request a count overflow interrupt |
In M-mode: |
mhpmcounter wraps, OF stays 1, and mip.LCOFIP stays 0 |
1 |
count_overflow_interrupt |
cp_overflow_hw_only |
Software writes to mhpmcounter never cause an overflow |
In M-mode: |
OF stays 0 |
2 mhpmcounter values |
count_overflow_trigger |
cp_lcofip_hw_only |
Setting OF by software does not raise LCOFIP |
In M-mode: |
mip.LCOFIP stays 0 |
2 OF values |
count_overflow_trigger |
cp_scountovf_shadow |
scountovf shadows the OF bits of mhpmevent3..31 |
In M-mode: |
scountovf[31:3] matches the OF bits, and scountovf[2:0] = 0 |
31 OF patterns |
scountovf_op |
cp_scountovf_mcounteren |
In M-mode, scountovf is not masked by mcounteren |
In M-mode, for mhpmevent3..31.OF = all 1s, even checkerboard, odd checkerboard: |
scountovf[31:3] matches the OF bits whatever mcounteren holds, and scountovf[2:0] = 0 |
3 OF patterns * 31 mcounteren values |
scountovf_mmode_read_access |
cp_sscofpmf_access |
Access scountovf and, on RV32, mhpmevent3h..31h |
In M-mode, read, write 0s, write 1s, set 1s and clear 1s: |
Reading scountovf succeeds; writing it raises an illegal-instruction exception because scountovf is read-only |
5 accesses * (1 CSR, or 30 CSRs on RV32) |
mcycleh_minstreth_mhpmh_op |
cp_lcofi_m |
LCOFI is taken in M-mode iff it is pending, enabled and not delegated |
In M-mode: |
Trap to M-mode iff LCOFIP = 1, LCOFIE = 1 and mideleg.LCOFI = 0 |
2 pending * 2 enabled * 2 delegated |
mip_lcofip_mie_lcofie_op |
cp_lcofip_priority_m |
LCOFI has the lowest priority of the M-mode interrupts |
In M-mode, xINH = 00000, mstatus.MIE = 1, mie = 0 |
With mie = all 0s nothing is taken. With mie = all 1s the competing interrupt is taken first and LCOFI last. |
2 mie values * 4 competing interrupts |
intr_m_mode_pri |
Sscofpmf_S
| Coverpoint | Goal | Feature Description | Expectation | Bins | Normative Rule |
|---|---|---|---|---|---|
cp_sinh_inhibits_smode |
SINH inhibits counting in S-mode |
In S-mode, with M-level CSRs accessed through T-SBI: |
mhpmcounter is nonzero iff SINH = 0 |
32 xINH combinations |
mhpmevent_inh_op |
cp_of_set_on_overflow |
OF is set when mhpmcounter overflows |
In S-mode, for mhpmevent[62:58] = {10000, 10100, 11000, 11100}: |
If SINH = 0: mhpmcounter wraps, OF becomes 1 and sip.LCOFIP becomes 1 |
2 patterns with SINH = 0 |
mhpmevent_of_op |
cp_of_already_set |
An overflow with OF already 1 does not request a count overflow interrupt |
In S-mode: |
mhpmcounter wraps, OF stays 1, and sip.LCOFIP stays 0 |
1 |
count_overflow_interrupt |
cp_overflow_hw_only |
Software writes to mhpmcounter never cause an overflow |
In S-mode: |
OF stays 0 |
2 mhpmcounter values |
count_overflow_trigger |
cp_lcofip_hw_only |
Setting OF by software does not raise LCOFIP |
In S-mode: |
sip.LCOFIP stays 0 |
2 OF values |
count_overflow_trigger |
cp_scountovf_shadow |
scountovf shadows the OF bits of mhpmevent3..31 |
In S-mode: |
scountovf[31:3] matches the OF bits, and scountovf[2:0] = 0 |
31 OF patterns |
scountovf_op |
cp_scountovf_mcounteren |
In S-mode, scountovf is masked by mcounteren |
In S-mode, for mhpmevent3..31.OF = all 1s, even checkerboard, odd checkerboard: |
scountovf[31:3] = OF bits & mcounteren[31:3], and scountovf[2:0] = 0 |
3 OF patterns * 31 mcounteren values |
scountovf_smode_read_access |
cp_sscofpmf_access |
Access scountovf |
In S-mode, read, write 0s, write 1s, set 1s and clear 1s scountovf |
Reading scountovf succeeds; writing it raises an illegal-instruction exception because scountovf is read-only |
5 accesses |
scountovf_smode_read_access |
cp_lcofi_sip_s |
LCOFI is taken in S-mode iff it is pending and enabled |
In S-mode, mideleg.LCOFI = 1, sstatus.SIE = 1 |
Trap to S-mode iff LCOFIP = 1 and LCOFIE = 1 |
2 pending * 2 enabled |
sip_sie_Sscofpmf |
cp_lcofip_priority_s |
LCOFI has the lowest priority of the S-mode interrupts |
In S-mode, xINH = 10000, sstatus.SIE = 1, sie = 0, S-level interrupts delegated to S-mode |
With sie = all 0s nothing is taken. With sie = all 1s the competing interrupt is taken first and LCOFI last. |
2 sie values * 4 competing interrupts |
sip_sie_priority_bit_order |
Sscofpmf_U
| Coverpoint | Goal | Feature Description | Expectation | Bins | Normative Rule |
|---|---|---|---|---|---|
The U-mode tests reach the M-level CSRs, and sip and sie, through T-SBI. Where S-mode is not implemented, mip and mie take the place of sip and sie. |
|||||
cp_uinh_inhibits_umode |
UINH inhibits counting in U-mode |
In U-mode: |
mhpmcounter is nonzero iff UINH = 0 |
32 xINH combinations |
mhpmevent_inh_op |
cp_of_set_on_overflow |
OF is set when mhpmcounter overflows |
In U-mode, for mhpmevent[62:58] = {11000, 11100}: |
If UINH = 0: mhpmcounter wraps, OF becomes 1 and sip.LCOFIP becomes 1 |
1 pattern with UINH = 0 |
mhpmevent_of_op |
cp_of_already_set |
An overflow with OF already 1 does not request a count overflow interrupt |
In U-mode: |
mhpmcounter wraps, OF stays 1, and sip.LCOFIP stays 0 |
1 |
count_overflow_interrupt |
cp_overflow_hw_only |
Software writes to mhpmcounter never cause an overflow |
In U-mode: |
OF stays 0 |
2 mhpmcounter values |
count_overflow_trigger |
cp_lcofip_hw_only |
Setting OF by software does not raise LCOFIP |
In U-mode: |
sip.LCOFIP stays 0 |
2 OF values |
count_overflow_trigger |
cp_lcofi_sip_u |
LCOFI is taken from U-mode iff it is pending and enabled |
In U-mode, mideleg.LCOFI = 1, sstatus.SIE = 0 |
Trap to S-mode iff LCOFIP = 1 and LCOFIE = 1, because S-level interrupts are always enabled in U-mode |
2 pending * 2 enabled |
sip_sie_Sscofpmf |
Sscofpmf Normative Rules
| Normative Rule | Rule Text | Coverpoints |
|---|---|---|
mhpmevent_inh_op |
Sscofpmf_Sm_cg/cp_minh_inhibits_mmode, Sscofpmf_S_cg/cp_sinh_inhibits_smode, Sscofpmf_U_cg/cp_uinh_inhibits_umode |
|
mhpmevent_of_op |
{Sscofpmf_Sm_cg,Sscofpmf_S_cg,Sscofpmf_U_cg}/{cp_of_set_on_overflow} |
|
mhpmevent_of_bit_set |
Generation of a count-overflow-interrupt request by an hpmcounter sets the associated OF bit. |
{Sscofpmf_Sm_cg,Sscofpmf_S_cg,Sscofpmf_U_cg}/{cp_of_set_on_overflow} |
hpmcounter_overflow |
{Sscofpmf_Sm_cg,Sscofpmf_S_cg,Sscofpmf_U_cg}/{cp_of_set_on_overflow} |
|
count_overflow_interrupt |
{Sscofpmf_Sm_cg,Sscofpmf_S_cg,Sscofpmf_U_cg}/{cp_of_set_on_overflow,cp_of_already_set} |
|
count_overflow_trigger |
{Sscofpmf_Sm_cg,Sscofpmf_S_cg,Sscofpmf_U_cg}/{cp_overflow_hw_only, cp_lcofip_hw_only} |
|
scountovf_op |
{Sscofpmf_Sm_cg,Sscofpmf_S_cg}/{cp_scountovf_shadow} |
|
scountovf_mmode_read_access |
Sscofpmf_Sm_cg/cp_scountovf_mcounteren, Sscofpmf_Sm_cg/cp_sscofpmf_access |
|
scountovf_smode_read_access |
In S/HS-mode, scountovf bit X is readable when mcounteren bit X is set, and otherwise reads as zero. |
Sscofpmf_S_cg/cp_scountovf_mcounteren, Sscofpmf_S_cg/cp_sscofpmf_access |
scountovf_smode_read_access_control |
Sscofpmf_S_cg/cp_scountovf_mcounteren |
|
mhpmeventh_presence |
The mhpmeventnh CSRs are provided only if the |
Sscofpmf_Sm_cg/cp_sscofpmf_access |
mip_lcofip_mie_lcofie_op |
Sscofpmf_Sm_cg/cp_lcofi_m |
|
mip_lcofip_reflects_overflow |
Sscofpmf_Sm_cg/cp_of_set_on_overflow |
|
lcofip_op |
{Sscofpmf_Sm_cg,Sscofpmf_S_cg,Sscofpmf_U_cg}/{cp_of_set_on_overflow} |
|
mip_lcofip_acc |
Sscofpmf_Sm_cg/cp_lcofi_m |
|
sip_sie_Sscofpmf |
Sscofpmf_S_cg/cp_lcofi_sip_s, Sscofpmf_S_cg/cp_of_set_on_overflow, Sscofpmf_U_cg/cp_lcofi_sip_u |
|
intr_m_mode_pri |
Sscofpmf_Sm_cg/cp_lcofip_priority_m |
|
sip_sie_priority_bit_order |
Sscofpmf_S_cg/cp_lcofip_priority_s |
|
scountovf_vsmode_read_access |
UDB Parameters: None.
B.10.2. Ssstateen Supervisor State Enable
| Coverpoint | Goal | Feature Description | Expectation | Bins | Normative Rule |
|---|---|---|---|---|---|
cp_walking_ones |
Bits are accessible |
Write msstateen0-3[31:0] (first) and then sstateen0-3 with walking ones & walking zero, and read each back. |
If msstateen = 0, read back 0. If mssstateen = 1, read back value written. Note that writing msstateen = 1s won’t actually set most of the bits to 1. |
2 msstateen * 4 CSRs * 64 walking ones/zero |
mstateen_rv64_csrs |
cp_csr_illegal_accesses |
Test that each stateen CSR allows read/write access from its own and higher privilege modes and denies read/write access from lower privilege modes |
In Mmode , write sstateen0-3 with all ones and read back. |
All accesses will be successful in Mmode. |
2mode * 4CSRs * 1value * 2 R/W |
stateen_op |
cp_fcsr |
hstateen0.FCSR and sstateen0.FCSR control access to fcsr when misa.F = 0 |
If Zfinx is supported: |
Success from S-mode. From U-mode, illegal instruction if sstateen0.FCSR = 0, else successful. |
4 states * 4 modes * 3 CSRs * 3 accesses |
stateen0_fcsr_op |
cp_fcsr_fp_instrs |
hstateen0.FCSR and sstateen0.FCSR control floating-point instructions when misa.F = 0 |
If Zfinx is supported: |
Same as cp_fcsr. |
4 states * 4 modes * 4 instructions |
stateen0_fcsr0_misa_f0_illegal_fpu_instr |
cp_jvt |
hstateen0.JVT and sstateen0.JVT control access to jvt |
If Zcmt is supported: |
Same as cp_fcsr. |
4 states * 4 modes * 3 accesses |
stateen0_jvt_op |
cp_hstateen_walking_ones |
hstateen bits are accessible |
If H is supported, write hstateen0-3 with walking ones & walking zero from HS-mode, and read each back. |
Access successful. Bits that are zero in mstateen are read-only zero. |
4-8 CSRs * 128-64 walking ones/zero |
hstateen_rv64_csrs |
cp_hstateen_illegal_accesses |
hstateen CSRs are accessible only from HS-mode and M-mode |
If H is supported, write hstateen0-3 with all ones, and read it back, from U, VS and VU-mode. |
Illegal instruction from U-mode. Virtual instruction from VS and VU-mode. |
4-8 CSRs * 3 modes |
hstateen_encoding |
cp_hstateen_se_controls_sstateen |
Bit 63 of hstateen0-3 controls access to sstateen0-3 from VS-mode |
If H is supported, for N = 0-3 and hstateenN bit 63 = {0,1}, read and write sstateenN from S-mode and VS-mode, and check the value read. |
Virtual instruction from VS-mode if 0, success if 1. Success from S-mode. |
4 CSRs * 2 states * 2 modes * 3 ops |
sstateen_vsmode_access_roz |
cp_hstateen_envcfg |
hstateen0.ENVCFG controls access to senvcfg |
If H is supported, with hstateen0.ENVCFG = {0,1}, read and write senvcfg from S, U, VS and VU-mode. |
Virtual instruction if 0, else successful |
2 states * 2 modes * 2 accesses |
hstateen0_envcfg_op |
cp_hstateen_context |
hstateen0.CONTEXT controls access to scontext |
If Sdtrig is supported, with hstateen0.CONTEXT = {0,1}, read and write scontext from S, U, VS and VU-mode. |
Virtual instruction if 0, else successful |
2 states * 2 modes * 2 accesses |
hstateen0_context_op |
cp_hstateen_imsic |
hstateen0.IMSIC controls access to stopei and vstopei |
If Ssaia is supported, with hstateen0.IMSIC = {0,1}, read and write stopei from S, U, VS and VU-mode. |
Virtual instruction if 0, else successful |
hstateen0_imsic_op |
|
cp_hstateen_aia |
hstateen0.AIA controls access to Ssaia state |
If Ssaia is supported, with hstateen0.AIA = {0,1}, access stopi (and sieh, siph on RV32) from S, U, VS and VU-mode. |
Virtual instruction if 0, else successful |
hstateen0_aia_op |
|
cp_hstateen_csrind |
hstateen0.CSRIND controls access to siselect and sireg from VS and VU-mode |
If Sscsrind is supported, with hstateen0.CSRIND = {0,1}, access siselect, sireg, and sireg2-6 from S, U, VS and VU-mode. |
Virtual instruction if 0 in VS and VU-mode, else successful. No effect in S-mode. |
hstateen0_csrind_op |
|
cp_hstateen_ctr |
hstateen0.CTR controls access to sctrdepth and sctrstatus |
If Ssctr is supported, with hstateen0.CTR = {0,1}, access sctrdepth and sctrstatus from S, U, VS and VU-mode. |
Virtual instruction if 0, else successful |
||
Note: All of these tests are performed in S-mode unless otherwise noted. |
|||||
Note: mstateen0.SE0 must be 1 (else sstateen0 is inaccessible). |
|||||
Note: mstateen0-3 are set to all ones for all tests in this suite. The coverpoints sample the mstateen bits, so only the cases with the mstateen bit set count. Tests that vary mstateen are in Smstateen. |
|||||
Note: The cp_hstateen_* tests are performed in HS-mode unless otherwise noted. Feature tests run every combination of the hstateen0 and sstateen0 bit and access from S, U, VS and VU-mode, to check that each bit only affects the modes it controls. |
|||||
| Normative Rule | Rule Text | Coverpoints |
|---|---|---|
sstateen_rv64_csrs |
Ssstateen_cg/cp_csr_illegal_accesses, Ssstateen_cg/cp_walking_ones |
|
sstateen_user_access_control |
Ssstateen_cg/{cp_jvt, cp_fcsr} |
|
sstateen_ro1_bits |
Ssstateen_cg/cp_walking_ones |
|
sstateen0_enc_img |
Ssstateen_cg/cp_walking_ones |
UDB Parameters: None.
The normative rules that apply to every level of stateen CSR are listed with Smstateen (see Table 352).
B.10.3. Ssu64xl 64-bit User Mode
RV64 only
| Coverpoint | Goal | Feature Description | Expectation | Bins | Normative Rule |
|---|---|---|---|---|---|
cp_ssu64xl |
UXLEN = 64 supported |
With sstatus.UXL = 2, in U-mode, set bit 63 of a GPR and read back |
bit 63 is set |
1 |
sstatus_uxl |
| Normative Rule | Rule Text | Coverpoints |
|---|---|---|
Ssu64xl_uxl_sstatus |
Ssu64xl_cg/cp_ssu64xl |
UDB Parameters: None.
B.10.4. Sscounterenw Writable Counter Enables
| Coverpoint | Goal | Feature Description | Expectation | Bins | Normative Rule |
|---|---|---|---|---|---|
cp_scounteren_writable |
Check scounteren bits are writable |
In S-mode, write walking 1s and walking 0s to scounteren. |
Match reference model |
2*XLEN |
Sscounterenw_hpmcounter_scounteren |
Note that this overlaps tests in S_Zicntr |
|||||
| Normative Rule | Rule Text | Coverpoints |
|---|---|---|
Sscounterenw_hpmcounter_scounteren |
Sscounterenw_cg/cp_scounteren_writable |
UDB Parameters: None.
B.10.5. Sstvecd Direct Trap Vector
| Coverpoint | Goal | Feature Description | Expectation | Bins | Normative Rule |
|---|---|---|---|---|---|
Following tests are done in S-mode |
|||||
cp_stvec_vaddr_pc |
Check stvec.MODE can be 0 and when it is, stvec.BASE can hold valid 4-byte aligned addresses |
Write stvec = two physical addresses with MODE = Direct, the current pc and the scratch area, and read it back. They are valid even when address translation is off. |
stvec gets value written |
2 |
Sstvecd_stvec_mode_direct |
cp_stvec_vaddr_walk1 |
stvec.BASE holds every valid 4-byte-aligned virtual address when stvec.MODE = Direct |
Write a walking 1 (0s in the msbs) and a walking 0 (1s in the msbs) through bits 2 to VALEN-2 of stvec (bit 31 on RV32) with MODE = Direct, and read it back. Canonical addresses have bits XLEN-1:VALEN-1 equal, so only bits up to VALEN-2 are walked; an invalid address may legally be converted. VALEN is set by the largest of Sv39, Sv48 and Sv57 that satp supports; the walk needs Sv32 or Sv39. |
stvec gets value written |
2 x walked bits (30 on RV32, 36/45/54 for Sv39/Sv48/Sv57) |
Sstvecd_stvec_mode_direct |
| Normative Rule | Rule Text | Coverpoints |
|---|---|---|
Sstvecd_stvec_mode_direct |
Sstvecd_cg/{cp_stvec_vaddr_pc, cp_stvec_vaddr_scratch, cp_stvec_vaddr_walk1, cp_stvec_vaddr_walk0}, S_scsr_cg/cp_stvec_vaddr_walk1, S_scsr_cg/cp_stvec_vaddr_walk0 |
|
Sstvecd_stvec_base_aligned_address |
Sstvecd_cg/{cp_stvec_vaddr_pc, cp_stvec_vaddr_scratch, cp_stvec_vaddr_walk1, cp_stvec_vaddr_walk0}, S_scsr_cg/cp_stvec_vaddr_walk1, S_scsr_cg/cp_stvec_vaddr_walk0, S_scsr_cg/cp_stvec_vaddr_pc, S_scsr_cg/cp_stvec_vaddr_scratch |
UDB Parameters: None.
B.10.6. Sstvala Trap Address
Sstvala boots to S-mode, and the boot code delegates the exceptions to S-mode. Each exception is raised in S-mode and in U-mode after stval is set to a random value through T-SBI, so a hart that does not write stval fails, and the S-mode trap handler records stval. The page-fault tests run in S-mode under Sv39 (RV64) or Sv32 (RV32). Shvstvala tests vstval the same way in VS-mode and VU-mode. Each access-fault test needs RVMODEL_ACCESS_FAULT_ADDRESS_{FETCH/LOAD/STORE} for its access type. The misaligned load and store tests are compiled only without MISALIGNED_LDST, and the misaligned fetch test only without Zca.
| Coverpoint | Goal | Feature Description | Expectation | Bins | Normative Rule |
|---|---|---|---|---|---|
cp_load_page_fault |
Fault writes VA to stval |
In S-mode under Sv39 or Sv32, lw (and ld on RV64) from a page whose leaf has W but not R |
stval written with VA |
S x {lw, ld} x load page fault x stval = address |
Sstvala_stval_faulting_vaddr |
cp_store_page_fault |
Fault writes VA to stval |
In S-mode under Sv39 or Sv32, sw (and sd on RV64) to a page whose leaf has R and X but not W |
stval written with VA |
S x {sw, sd} x store/AMO page fault x stval = address |
|
cp_instr_page_fault |
Fault writes VA to stval |
In S-mode under Sv39 or Sv32, jalr to a page whose leaf has R and W but not X |
stval written with VA |
S x jalr x instruction page fault x stval = target |
Sstvala_stval_faulting_vaddr |
cp_load_access_fault |
Fault writes VA to stval |
In S-mode and U-mode, each load (lb, lbu, lh, lhu, lw, and lwu, ld on RV64) from RVMODEL_ACCESS_FAULT_ADDRESS_LOAD |
stval written with VA |
{S, U} x each load x load access fault x stval = address |
Sstvala_stval_faulting_vaddr |
cp_store_access_fault |
Fault writes VA to stval |
In S-mode and U-mode, each store (sb, sh, sw, and sd on RV64) to RVMODEL_ACCESS_FAULT_ADDRESS_STORE |
stval written with VA |
{S, U} x each store x store/AMO access fault x stval = address |
Sstvala_stval_faulting_vaddr |
cp_instr_access_fault |
Fault writes VA to stval |
In S-mode and U-mode, jalr to RVMODEL_ACCESS_FAULT_ADDRESS_FETCH |
stval written with VA |
{S, U} x jalr x instruction access fault x stval = target |
Sstvala_stval_faulting_vaddr |
cp_load_address_misaligned |
Fault writes VA to stval |
Only without MISALIGNED_LDST. In S-mode and U-mode, each load wider than a byte at offsets 0-7 of a scratch doubleword |
stval written with VA for each misaligned load |
{S, U} x each load wider than a byte x load address misaligned x stval = address |
Sstvala_stval_faulting_vaddr |
cp_store_address_misaligned |
Fault writes VA to stval |
Only without MISALIGNED_LDST. In S-mode and U-mode, each store wider than a byte at offsets 0-7 of a scratch doubleword |
stval written with VA for each misaligned store |
{S, U} x each store wider than a byte x store/AMO address misaligned x stval = address |
Sstvala_stval_faulting_vaddr |
cp_load_misaligned_word |
Fault writes VA to stval for each misalignment |
Only without MISALIGNED_LDST. The misaligned word and (on RV64) doubleword accesses of cp_load_address_misaligned and cp_store_address_misaligned, binned by the address offset within the access’s natural alignment. A halfword can only be misaligned by 1. |
stval written with VA for each misalignment |
{S, U} x {lw, lwu} or sw x offsets 1-3 x address misaligned x stval = address; {S, U} x ld or sd x offsets 1-7 x address misaligned x stval = address |
|
cp_instr_adr_misaligned_jalr |
Fault writes VA to stval |
Only without Zca. In S-mode and U-mode, jalr with each combination of rs1[1:0] and offset[1:0] |
stval written with the target address for each target with bit 1 set |
{S, U} x jalr x instruction address misaligned x stval = target |
Sstvala_stval_faulting_vaddr |
cp_illegal_instruction |
Fault writes instr to stval |
In S-mode and U-mode, execute the instructions 0x00000000 and 0xFFFFFFFF |
stval written with instr |
{S, U} x {0x00000000, 0xFFFFFFFF} x illegal instruction x stval = instruction |
Sstvala_stval_faulting_instruction |
Note: breakpoints tested in SstvalaSdtrig because they are generated with debug triggers |
|||||
| Normative Rule | Rule Text | Coverpoints |
|---|---|---|
Sstvala_stval_faulting_vaddr |
Sstvala_cg/{cp_load_access_fault, cp_load_address_misaligned}, Sstvala_cg/{cp_load_page_fault, cp_instr_page_fault} |
|
Sstvala_stval_faulting_instruction |
Sstvala_cg/cp_illegal_instruction |
UDB Parameters: None.
B.10.7. Ssccptr Page Table Reads
| Coverpoint | Goal | Feature Description | Expectation | Bins | Normative Rule |
|---|---|---|---|---|---|
cp_ssccptr |
Main memory supports HPTW read |
With Sv active, access virtual memory with page table stored in main memory |
Success |
1 |
Ssccptr_memory_pte_reads |
Note: this is already covered in Sv |
|||||
| Normative Rule | Rule Text | Coverpoints |
|---|---|---|
Ssccptr_memory_pte_reads |
Ssccptr_cg/cp_ssccptr |
UDB Parameters: None.
B.10.8. Ss1p13 Supervisor Mode 1.13
| Coverpoint | Goal | Feature Description | Expectation | Bins | Normative Rule | Notes |
|---|---|---|---|---|---|---|
cp_sxlen_ge_uxlen |
sxlen > uxlen |
From S-mode, attempt to set sstatus.UXL = (1, 2) |
Can’t write 2 unless SXL is also 2 (64 b) |
2 |
mstatus_uxl_legal_vals_smode |
|
cp_scause |
scause accepts sofware-check and hardware error |
Write scause = 18, 19, read back |
Match ref model |
2 |
NOTE : Already covered in cp_scause_write_exception |
|
NOTE : Tests and coverage files are under the S.py and S_coverage.svh respectvely with the guard of `ifdef SS1P13_SUPPORTED |
||||||
| Normative Rule | Rule Text | Coverpoints |
|---|---|---|
mstatus_uxl_legal_vals_smode |
Not tested: with SXLEN=64 the only excluded value is the reserved UXL=3, whose WARL result is implementation-defined |
UDB Parameters: None.
B.10.9. Ssnpm Pointer Masking
Ssnpm
| Coverpoint | Goal | Feature Description | Expectation | Bins | Normative Rule | Notes |
|---|---|---|---|---|---|---|
A supervisor-level extension that provides pointer masking for the next lower privilege |
todo: ADD UDB parameters of PMLEN7_SUPPORTED and PMLEN16_SUPPORTED |
|||||
For all test entries in this sheet, the following address patterns are used to exercise pointer masking behavior: |
||||||
Why do we need a different page than scratch to map the VA with leading 1s? |
||||||
cp_pmlen_masking |
Verify that upper PMLEN bits are ignored for every memory-accessing instruction when pointer masking is enabled |
If pointer masking is enabled, addresses differing only in upper PMLEN bits access the same physical location. |
When PMM=10/11: all 8 A patterns whose upper bits fall within PMLEN resolve to scratch , reads return known value_old, write readbacks return known value_new. When PMM=00: masking disabled : only A=0x0000 resolves to scratch; all other patterns either access a different location (returning old/unrelated value) or cause a trap. |
3 PMM × 8 address variants × 1 mode (U) × satp supported modes (Bare, Sv39, Sv48, Sv57) × [Base: 4r×4w] + [RV64A if implemented: 9 AMO variants × 2 widths] + [Zacas if implemented: 3] + [Zabha if implemented: 9 AMO variants × 2 widths] + [FP if implemented: per F/D/Q] + [Zca if implemented: 4r×4w regular + 4r×4w SP-relative] + [Zcd if implemented: 1r×1w SP-relative] + [RVV if implemented: vector load/store variants] + [Zicbom if implemented: CBO.CLEAN, CBO.FLUSH, CBO.INVAL] + [Zicboz if implemented: CBO.ZERO] + [Zicbop if implemented: PREFETCH.R, PREFETCH.W, PREFETCH.I] |
senvcfg_pmm_ssnpm |
pm_all_priv_modes ("Such tools can be applied in all privilege modes (U, S, and M).") is no longer a tagged rule in the ISA manual. |
cp_pmlen_zicfiss_amo |
Verify that upper PMLEN bits are ignored for the Zicfiss shadow stack AMO instructions when pointer masking is enabled |
If pointer masking is enabled, SSAMOSWAP.W/D addresses differing only in upper PMLEN bits access the same shadow stack location. |
When PMM=10/11: all A patterns whose upper bits fall within PMLEN resolve to ss_page , rd returns known value_old, readback returns known value_new. When PMM=00: masking disabled : only A=0x0000 resolves to ss_page; all other patterns cause a store/AMO page fault, rd is unchanged and readback returns value_old. |
3 PMM × 8 address variants × 1 mode (U) × satp supported modes (Sv39, Sv48, Sv57) × [Zicfiss if implemented: SSAMOSWAP.W, SSAMOSWAP.D] |
pm_ignore_upper_bits |
|
cp_pmlen_zicfiss_ssp |
Verify that upper PMLEN bits are ignored for the Zicfiss shadow stack push and pop instructions when pointer masking is enabled |
SSPUSH and SSPOPCHK address memory through the ssp CSR instead of rs1. If pointer masking is enabled, ssp values differing only in upper PMLEN bits access the same shadow stack location. |
When PMM=10/11: all A patterns whose upper bits fall within PMLEN resolve to ss_page , a push writes value_new and leaves ssp = A, a pop matches value_old and leaves ssp = A + 8. When PMM=00: masking disabled : only A=0x0000 resolves to ss_page; all other patterns cause a store/AMO page fault, ssp is unchanged and readback returns value_old. |
3 PMM × 8 ssp variants × 1 mode (U) × satp supported modes (Sv39, Sv48, Sv57) × [Zicfiss if implemented: SSPUSH x1, SSPUSH x5, SSPOPCHK x1, SSPOPCHK x5] + [Zcmop if implemented: C.SSPUSH x1, C.SSPOPCHK x5] |
pm_ignore_upper_bits |
|
cp_pmm_mxr |
Verify pointer masking behavior across all combinations of PMM, MXR, address pairs, and VM modes using representative explicit load/store and implicit fetch accesses. |
When MXR is in effect at the effective privilege mode where explicit memory |
1- PMM=00: masking disabled; only A_upper_bits=0x0000 resolves to scratch; all other patterns access different location or cause trap. |
3 PMM × 2 MXR × 8 A patterns 3 instructions (lw, sw, jalr) × 4 VM modes (Bare, Sv39, Sv48, Sv57) × 1 mode (U) |
pm_mxr_exception |
|
cp_pmlen_misaligned_word |
Verify correct pointer masking behavior for misaligned memory accesses. |
Test Environment: |
No trap. Masking applied to the misaligned address before access, A and A' resolve to the same physical location. Read returns known value_old. Write readback from A' returns known value_new. Misalignment does not interfere with pointer masking. |
1 PMM × 2 address variants (upper 7 bits = 0/1) × 1 misaligned write (sw) × 1 misaligned read (lw) × 1 mode (U) × |
pm_misaligned_equivalence |
|
cp_hardware_csr_writes_fault_load |
Verify pointer masking is applied to hardware-written CSR address values. |
When a fault occurs on an explicit memory access under pointer masking, the hardware-written stval reflects the masked effective address, not the raw tagged address. |
Fault is taken; stval written by hardware contains the masked effective address (upper PMLEN bits correctly zeroed in bare mode or sign-extended in VA modes), not the original unmasked address used by the program. |
2 PMM × 8 address patterns × 1 lw × 1 mode (U) × satp supported modes (Bare, Sv39, Sv48, Sv57) |
pm_csr_hw_apply |
|
cp_hardware_csr_writes_fault_store |
Verify pointer masking is applied to hardware-written CSR address values. |
When a fault occurs on an explicit memory access under pointer masking, the hardware-written stval reflects the masked effective address, not the raw tagged address. |
Fault is taken; stval written by hardware contains the masked effective address (upper PMLEN bits correctly zeroed in bare mode or sign-extended in VA modes), not the original unmasked address used by the program. |
2 PMM × 8 address patterns × 1 sw × 1 mode (U) × satp supported modes (Bare, Sv39, Sv48, Sv57) |
pm_csr_hw_apply |
|
cp_pmm_uxl_clear |
Verify that setting sstatus.UXL=01 (RV32) clears senvcfg.PMM bits |
When sstatus.UXL is set to 01 (indicating U-mode is RV32), the pointer masking configuration bits in senvcfg.PMM must be cleared automatically by hardware. |
When sstatus.UXL is set to 01: senvcfg.PMM is cleared to 00 regardless of its previously written value. |
2 PMM values (10, 11) × 1 UXL × 1 mode (U) |
pm_uxl_clear |
|
Ssnpm_Sm
Ssnpm provides pointer masking for U-mode via senvcfg.PMM. In this sheet , test plan is for the M-mode part of Ssnpm: M-mode accesses memory as U-mode via MPRV. - tests run in M-mode with mstatus.MPRV=1 and mstatus.MPP=U - The suite requires Ssnpm because senvcfg.PMM governs the access. mseccfg.PMM is swept only if Smmpm is supported, to show that it does not apply.
| Coverpoint | Goal | Feature Description | Expectation | Bins | Normative Rule |
|---|---|---|---|---|---|
cp_pm_mprv_mpp_u |
Verify that senvcfg.PMM governs pointer masking when M-mode accesses memory as U-mode via MPRV. |
MPRV affect pointer masking as well, causing the pointer masking settings of the effective privilege mode to be applied. |
When senvcfg.PMM=10/11 and MXR=0: A patterns whose upper bits fall within PMLEN resolve to scratch, reads return known value_old, write readbacks return known value_new, regardless of mseccfg.PMM. When senvcfg.PMM=00 or MXR=1: masking disabled : only A=0x0000 resolves to scratch; all other patterns cause a trap. |
2 MXR * 3 mseccfg.PMM * 3 senvcfg.PMM * 1 MPRV * 1 MPP (U) * 2 satp.MODE * 3 addresses * 2 instructions (lw, sw) |
pm_mprv_spvp |
Ssnpm_H
Ssnpm with the H extension provides pointer masking for VS-mode (henvcfg.PMM), VU-mode (senvcfg.PMM), and for the explicit accesses of HLV.* and HSV.* (henvcfg.PMM as VS; senvcfg.PMM from HS-mode or hstatus.HUPMM from U-mode as VU). HLVX.* and accesses with MXR in effect are never masked. Whether the ignore transformation zero-extends or sign-extends is chosen by vsatp.MODE (not satp, not hgatp): vsatp = Bare means the address is a guest physical address (GPA) and is zero-extended. When vsatp is not Bare, the address in rs1 is a guest virtual address (GVA), and the sequence is: * Mask: the top PMLEN bits are replaced with copies of bit XLEN-PMLEN-1 (bit 56 for PMLEN 7, bit 47 for PMLEN 16), the same sign extension as in Ssnpm with Sv39/48/57. * VS stage: the masked GVA is translated to a GPA using vsatp. * G stage: that GPA is translated to a host physical address using hgatp.
Groups. Ssnpm_H boots to HS-mode (BOOT_TO_SMODE) and enters VS/VU with RVTEST_TSBI_GOTO_VSMODE/VUMODE. Every coverpoint is RV64 only (pm_rv64_only). PMM = 10 bins exist only with UDB_SUPPORTED_PMLEN_SSNPM_7 and PMM = 11 bins only with UDB_SUPPORTED_PMLEN_SSNPM_16. PMM fields. The fields are henvcfg.PMM, senvcfg.PMM, hstatus.HUPMM, menvcfg.PMM (Smnpm) and mseccfg.PMM (Smmpm). menvcfg.PMM and mseccfg.PMM are set only when the extension is implemented, and only to PMLENs that Smnpm (UDB_SUPPORTED_PMLEN_SMNPM_*) and Smmpm (UDB_SUPPORTED_PMLEN_SMMPM_*) support, not Ssnpm’s. The fields not under test are set to a different value, so reading the wrong field changes the result: the largest supported value (11, else 10) when the field under test is 00, and 00 otherwise. The HLVX and MXR coverpoints enable every field; the HFENCE coverpoints leave the others at 00. PMM values are the outermost loop because menvcfg and mseccfg need a T-SBI call. Translation modes. (vsatp.MODE, hgatp.MODE) is swept over seven pairs, each bin guarded by its own support macro. With vsatp = Bare the tag bits are GPA bits, so hgatp decides what an unmasked tag does: Bare, Sv39x4, Sv48x4 and Sv57x4 are swept. With vsatp paged, an unmasked tag is stopped by the VS stage before the G stage, so hgatp cannot change the masking result and only the matching width is used: (Sv39, Sv39x4), (Sv48, Sv48x4), (Sv57, Sv57x4). Only cp_vs_pmm and cp_vu_pmm sweep all seven pairs. The other coverpoints use two pairs, each the widest the DUT supports, so they always run once: * BARE_PAIR: the first supported of (Bare, Sv57x4), (Bare, Sv48x4), (Bare, Sv39x4), (Bare, Bare). * PAGED_PAIR: the first supported of (Sv57, Sv57x4), (Sv48, Sv48x4), (Sv39, Sv39x4). Absent when the DUT has no paged vsatp mode. The support guards are mutually exclusive, so a narrower pair adds no bin when a wider one is supported. A tag bit beyond the chosen width faults instead of reaching the alias page, and the expectations already allow both. Tag patterns (A_upper_bits) (bits 63:48 replaced in the base address). Five patterns: * 0x0000 - no tag (the untagged control) * 0x0002 - bit 49: masked by PMLEN 16 only; extra GPA bit of Sv48x4, inside Sv57x4 * 0x0400 - bit 58: masked by PMLEN 7 and 16; extra GPA bit of Sv57x4 * 0xFF00 - bits 63:56: all masked by PMLEN 16, only 63:57 by PMLEN 7 * 0xFFFF - bits 63:48: all masked by PMLEN 16, only 63:57 by PMLEN 7 The partially masked patterns (0xFFFF and 0xFF00 with PMLEN 7) keep some tag bits after masking. Those bits can lie inside the Sv57 address width. The test leaves those addresses unmapped, so the access faults, or maps them to the alias page. The faulting address is invalid, and stval for an invalid address may legally be a different invalid address, so the stval/htval coverpoints (pm_csr_hw_apply) use only 0x0000 and fully masked tags. Expected traps. Counted per tagged access. A tagged access whose tag is fully masked never traps. An access whose tag is not cleared by masking traps at most once, and does not trap when it reaches pm_gpa_alias_page. The readback from A' is untagged and never traps. * cp_*pmm, cp*pmlen_masking, cp*pmlen_zicfiss*, cp_hlv_*pmm: PMM 00 traps only for the unmasked tags (all but 0x0000); PMM 10 traps for 0x0002, 0xFF00 and 0xFFFF; PMM 11 never traps. * cp*mxr_pmm, cp_hlvx*pmm, cp*pmm_jalr: no masking, so every tag except 0x0000 is unmasked. Tag 0x0000 never traps. * cp*pmlen_misaligned_word: tag 0x0000 and fully masked tags only, so no trap is expected. * cp*_hardware_csr_writes_fault_load and _store: every access traps, once per lw (_load) or sw (_store). The tags are 0x0000 and fully masked tags only. * cp_henvcfg_pmm_change_no_hfence: with PMM 00 the Ti access traps, except tag 0x0002 in case 5, which reaches alias_i; with PMM 10 or 11 it never traps. * cp_vs_gstage_no_pmm, cp_henvcfg_pmm_change_hfence, cp_henvcfg_pmm_change_hfence_sv48x4, cp_hupmm_change_hfence, cp_hupmm_change_hfence_sv48x4: no traps. Why do we need a different page than the test data page? A' = pm_lo_page, the test data page (tag bits = 0x0000), pre-loaded with value_old. A tagged address whose tag is NOT cleared by masking must never reach A'. It is either left unmapped (so the access faults), or mapped to a separate page, pm_gpa_alias_page, pre-loaded with value_diff. If both the tagged and the untagged address reached A', a read would return value_old whether or not the hardware masked the tag, so the test could not tell the difference. With a separate page holding a distinct value, the outcome is unambiguous: value_old proves the tag was stripped and A' was reached through masking; value_diff or a fault proves the tag was used as-is. This matters most when the tag bits are inside the GPA width (bits 49:48 with Sv48x4, bits 58:48 with Sv57x4). There the unmasked tagged GPA is a valid address, so the G-stage page tables decide where it goes, and they must not send it to A'. With vsatp paged, the VS stage does the same job: a tagged VA must not translate to A'. With (vsatp, hgatp) = (Bare, Bare) there is no table to leave unmapped. A tagged address is a host physical address, so an unmasked tag bit must lie outside the PA width or in a PMA hole. The access then raises an access fault and cannot alias DRAM. A tag is therefore used with (Bare, Bare) only if every bit it leaves unmasked is at or above the PA width: 0x0002 (bit 49) needs PA width ⇐ 49, and 0xFFFF with PMLEN 7 (bits 56:48) needs PA width ⇐ 48. Otherwise the tag is dropped for (Bare, Bare). 0x0400 (bit 58) and 0xFF00 with PMLEN 7 (bit 56) are used with every PA width up to 56.
| Coverpoint | Goal | Feature Description | Expectation | Bins | Normative Rule | Notes |
|---|---|---|---|---|---|---|
cp_vs_pmm |
henvcfg.PMM masks loads and stores in VS-mode, for guest physical (vsatp = Bare) and guest virtual (vsatp paged) addresses |
Test Environment: |
When henvcfg.PMM = 10/11 and every tag bit is within PMLEN: the access reaches A' (ld returns value_old, the readback |
priv_mode VS x {ld, sd} x henvcfg.PMM {00, 10, 11} x tag {5 patterns} x (vsatp, hgatp) {(Bare, Bare), (Bare, Sv39x4), (Bare, Sv48x4), (Bare, Sv57x4), (Sv39, Sv39x4), (Sv48, Sv48x4), (Sv57, Sv57x4)} |
henvcfg_pmm_op |
|
cp_vu_pmm |
senvcfg.PMM masks loads and stores in VU-mode, for guest physical (vsatp = Bare) and guest virtual (vsatp paged) addresses |
Same test environment and loop as cp_vs_pmm, except: |
As cp_vs_pmm, with the PMLEN of senvcfg.PMM. With writer VS-mode, the csrw does not trap, senvcfg.PMM reads back |
priv_mode VU x writer HS-mode x {ld, sd} x senvcfg.PMM {00, 10, 11} x tag {5 patterns} x (vsatp, hgatp) {(Bare, Bare), (Bare, Sv39x4), (Bare, Sv48x4), (Bare, Sv57x4), (Sv39, Sv39x4), (Sv48, Sv48x4), (Sv57, Sv57x4)} |
senvcfg_pmm_ssnpm |
|
cp_vs_gstage_no_pmm |
henvcfg.PMM masks the address of a VS-mode access, never the guest physical address that the VS stage produces |
Pointer masking applies to the address an instruction computes. The GPA that the VS stage produces and the G stage |
No trap. ld returns value_diff, sd writes the alias page, and A' still holds value_old. A hart that masks the GPA |
Not sampled: the guest physical address that the VS stage produces cannot be sampled, and the VS-mode ld and sd of cp_vs_pmm already fill any bin made from the paged pair and PMM. The signature checks it. |
pm_not_apply_implicit |
With PMLEN 7, bit 49 is not masked, so Sv48x4 is tested with PMM = 11 only. |
cp_hlv_hs_spvp1_pmm |
HLV and HSV in HS-mode with hstatus.SPVP = 1 (access as VS) take henvcfg.PMM |
With hstatus.SPVP = 1, for each henvcfg.PMM value, hlv.d and hsv.d in HS-mode at the test data with each tag set. |
As cp_vs_pmm, with the PMLEN of henvcfg.PMM: when every tag bit is within PMLEN, hlv.d returns value_old |
priv_mode HS x {hlv.d, hsv.d} x hstatus.SPVP = 1 x henvcfg.PMM {00, 10, 11} x tag {5 patterns} x (vsatp, hgatp) {BARE_PAIR, PAGED_PAIR} |
henvcfg_pmm_op |
|
cp_hlv_hs_spvp1_mxr_pmm |
vsstatus.MXR = 1 or sstatus.MXR = 1 turns henvcfg.PMM pointer masking off for HLV and HSV in HS-mode with hstatus.SPVP = 1 (access as VS) |
Same test environment and loop as cp_hlv_hs_spvp1_pmm, except: |
No masking for every MXR combination. Tag 0x0000 reaches the test data (the control). Every other tag is used |
priv_mode HS x {hlv.d, hsv.d} x hstatus.SPVP = 1 x (vsstatus.MXR, sstatus.MXR) {(0,1), (1,0), (1,1)} x henvcfg.PMM {10, 11} x tag (PMM 10 {0x0000, 0x0400}, PMM 11 {0x0000, 0xFFFF}) x (vsatp, hgatp) {BARE_PAIR, PAGED_PAIR} |
pm_mprv_spvp |
vsstatus.MXR = 0 and sstatus.MXR = 0 is cp_hlv_hs_spvp1_pmm. |
cp_hlv_hs_spvp0_pmm |
HLV and HSV in HS-mode with hstatus.SPVP = 0 (access as VU) take senvcfg.PMM |
Same test environment and loop as cp_hlv_hs_spvp1_pmm, except: |
As cp_hlv_hs_spvp1_pmm, with the PMLEN of senvcfg.PMM. |
priv_mode HS x {hlv.d, hsv.d} x hstatus.SPVP = 0 x senvcfg.PMM {00, 10, 11} x tag {5 patterns} x (vsatp, hgatp) {BARE_PAIR, PAGED_PAIR} |
senvcfg_pmm_ssnpm |
|
cp_hlv_hs_spvp0_mxr_pmm |
vsstatus.MXR = 1 or sstatus.MXR = 1 turns senvcfg.PMM pointer masking off for HLV and HSV in HS-mode with hstatus.SPVP = 0 (access as VU) |
Same test environment and loop as cp_hlv_hs_spvp0_pmm, except: |
No masking for every MXR combination. Tag 0x0000 reaches the test data (the control). Every other tag is used |
priv_mode HS x {hlv.d, hsv.d} x hstatus.SPVP = 0 x (vsstatus.MXR, sstatus.MXR) {(0,1), (1,0), (1,1)} x senvcfg.PMM {10, 11} x tag (PMM 10 {0x0000, 0x0400}, PMM 11 {0x0000, 0xFFFF}) x (vsatp, hgatp) {BARE_PAIR, PAGED_PAIR} |
pm_mprv_spvp |
vsstatus.MXR = 0 and sstatus.MXR = 0 is cp_hlv_hs_spvp0_pmm. |
cp_hlv_u_spvp1_pmm |
HLV and HSV in U-mode with hstatus.SPVP = 1 (access as VS) take henvcfg.PMM |
Same test environment and loop as cp_hlv_hs_spvp1_pmm, except: |
As cp_hlv_hs_spvp1_pmm, with the PMLEN of henvcfg.PMM. |
priv_mode U x hstatus.HU = 1 x {hlv.d, hsv.d} x hstatus.SPVP = 1 x henvcfg.PMM {00, 10, 11} x tag {5 patterns} x (vsatp, hgatp) {BARE_PAIR, PAGED_PAIR} |
hlsv_mode |
|
cp_hlv_u_spvp0_pmm |
HLV and HSV in U-mode with hstatus.SPVP = 0 (access as VU) take hstatus.HUPMM |
Same test environment and loop as cp_hlv_hs_spvp1_pmm, except: |
As cp_hlv_hs_spvp1_pmm, with the PMLEN of hstatus.HUPMM. |
priv_mode U x hstatus.HU = 1 x {hlv.d, hsv.d} x hstatus.SPVP = 0 x hstatus.HUPMM {00, 10, 11} x tag {5 patterns} x (vsatp, hgatp) {BARE_PAIR, PAGED_PAIR} |
hlsv_mode |
This is the one VU access that does not use senvcfg.PMM: in U-mode senvcfg.PMM holds the host’s own U-mode |
cp_hlvx_hs_pmm |
HLVX in HS-mode is never masked |
With every PMM field enabled (henvcfg.PMM = senvcfg.PMM = hstatus.HUPMM), hlvx.wu in HS-mode for |
Tag 0x0000 returns the data (the control: without it a hart where HLVX always faults would pass). |
priv_mode HS x hlvx.wu x hstatus.SPVP {0, 1} x henvcfg.PMM = senvcfg.PMM = hstatus.HUPMM {10, 11} x tag {5 patterns} x (vsatp, hgatp) {BARE_PAIR, PAGED_PAIR} |
hlsv_mode |
The HLVX sentence in hypervisor.adoc ("not subject to pointer masking") has no normative tag. |
cp_hlvx_u_pmm |
HLVX in U-mode is never masked |
Same test environment and loop as cp_hlvx_hs_pmm, except hstatus.HU = 1 and the accesses run in U-mode |
As cp_hlvx_hs_pmm. |
priv_mode U x hstatus.HU = 1 x hlvx.wu x hstatus.SPVP {0, 1} x henvcfg.PMM = senvcfg.PMM = hstatus.HUPMM {10, 11} x tag {5 patterns} x (vsatp, hgatp) {BARE_PAIR, PAGED_PAIR} |
hlsv_mode |
|
cp_vs_mxr_pmm |
vsstatus.MXR = 1 or sstatus.MXR = 1 turns henvcfg.PMM pointer masking off in VS-mode |
With vsstatus.MXR = 1 or sstatus.MXR = 1 (or both) and henvcfg.PMM enabled, ld and sd in VS-mode at the test data |
No masking for every MXR combination. Tag 0x0000 reaches the test data (the control). Every other tag is used |
priv_mode VS x {ld, sd} x (vsstatus.MXR, sstatus.MXR) {(0,1), (1,0), (1,1)} x henvcfg.PMM {10, 11} x tag (PMM 10 {0x0000, 0x0400}, PMM 11 {0x0000, 0xFFFF}) x (vsatp, hgatp) {BARE_PAIR, PAGED_PAIR} |
pm_mxr_exception |
vsstatus.MXR = 0 and sstatus.MXR = 0 is cp_vs_pmm. |
cp_vu_mxr_pmm |
vsstatus.MXR = 1 or sstatus.MXR = 1 turns senvcfg.PMM pointer masking off in VU-mode |
Same test environment and loop as cp_vs_mxr_pmm, except: |
As cp_vs_mxr_pmm. |
priv_mode VU x {ld, sd} x (vsstatus.MXR, sstatus.MXR) {(0,1), (1,0), (1,1)} x senvcfg.PMM {10, 11} x tag (PMM 10 {0x0000, 0x0400}, PMM 11 {0x0000, 0xFFFF}) x (vsatp, hgatp) {BARE_PAIR, PAGED_PAIR} |
pm_mxr_exception |
vsstatus.MXR = 0 and sstatus.MXR = 0 is cp_vu_pmm. |
cp_vs_pmlen_masking |
henvcfg.PMM ignores the upper PMLEN bits of the address for every kind of memory-accessing instruction in VS-mode |
If pointer masking is enabled, addresses differing only in upper PMLEN bits access the same location. This is |
As cp_vs_pmm, with the PMLEN of henvcfg.PMM, for every instruction in the loop. |
priv_mode VS x {{amoadd.d (RV64A), amocas.d (Zacas), amoadd.h (Zabha)} + {fld, fsd (D)} + {c.ld, c.sd, c.ldsp, c.sdsp (Zca), c.fldsp, c.fsdsp (Zcd)} + {cbo.zero (Zicboz), cbo.clean (Zicbom), prefetch.w (coverage only)} + {vle64.v, vlse64.v, vluxei64.v, vloxei64.v, vlseg2e64.v, vl1re64.v, vle64ff.v, vse64.v, vsse64.v, vsuxei64.v, vsoxei64.v, vsseg2e64.v, vs1r.v (RVV)}} x henvcfg.PMM {00, 10, 11} x tag {0x0000, 0x0400, 0xFFFF} x (vsatp, hgatp) {BARE_PAIR, PAGED_PAIR} |
henvcfg_pmm_op |
|
cp_vu_pmlen_masking |
senvcfg.PMM ignores the upper PMLEN bits of the address for every kind of memory-accessing instruction in VU-mode |
Same test environment and loop as cp_vs_pmlen_masking, except: |
As cp_vs_pmlen_masking, with the PMLEN of senvcfg.PMM. |
priv_mode VU x {{amoadd.d (RV64A), amocas.d (Zacas), amoadd.h (Zabha)} + {fld, fsd (D)} + {c.ld, c.sd, c.ldsp, c.sdsp (Zca), c.fldsp, c.fsdsp (Zcd)} + {cbo.zero (Zicboz), cbo.clean (Zicbom), prefetch.w (coverage only)} + {vle64.v, vlse64.v, vluxei64.v, vloxei64.v, vlseg2e64.v, vl1re64.v, vle64ff.v, vse64.v, vsse64.v, vsuxei64.v, vsoxei64.v, vsseg2e64.v, vs1r.v (RVV)}} x senvcfg.PMM {00, 10, 11} x tag {0x0000, 0x0400, 0xFFFF} x (vsatp, hgatp) {BARE_PAIR, PAGED_PAIR} |
senvcfg_pmm_ssnpm |
|
cp_vs_pmlen_zicfiss_amo |
henvcfg.PMM ignores the upper PMLEN bits of the SSAMOSWAP address in VS-mode |
If pointer masking is enabled, SSAMOSWAP.W/D addresses differing only in upper PMLEN bits access the same shadow |
When henvcfg.PMM = 10/11 and every tag bit is within PMLEN: rd returns value_old, the readback returns value_new, no |
priv_mode VS x {ssamoswap.w, ssamoswap.d} (Zicfiss) x henvcfg.PMM {00, 10, 11} x tag {0x0000, 0x0400, 0xFFFF} x (vsatp, hgatp) {PAGED_PAIR} |
henvcfg_pmm_op |
|
cp_vu_pmlen_zicfiss_amo |
senvcfg.PMM ignores the upper PMLEN bits of the SSAMOSWAP address in VU-mode |
Same test environment and loop as cp_vs_pmlen_zicfiss_amo, except: |
As cp_vs_pmlen_zicfiss_amo, with the PMLEN of senvcfg.PMM. |
priv_mode VU x {ssamoswap.w, ssamoswap.d} (Zicfiss) x senvcfg.PMM {00, 10, 11} x tag {0x0000, 0x0400, 0xFFFF} x (vsatp, hgatp) {PAGED_PAIR} |
pm_ignore_upper_bits |
|
cp_vs_pmlen_zicfiss_ssp |
henvcfg.PMM ignores the upper PMLEN bits of the ssp address of shadow stack pushes and pops in VS-mode |
SSPUSH and SSPOPCHK address memory through the ssp CSR instead of rs1. If pointer masking is enabled, ssp values |
When henvcfg.PMM = 10/11 and every tag bit is within PMLEN: a push writes value_new and leaves ssp = A, a pop |
priv_mode VS x {sspush x1, sspush x5, sspopchk x1, sspopchk x5} (Zicfiss) + {c.sspush x1, c.sspopchk x5} (Zcmop) x henvcfg.PMM {00, 10, 11} x tag {0x0000, 0x0400, 0xFFFF} x (vsatp, hgatp) {PAGED_PAIR} |
henvcfg_pmm_op |
|
cp_vu_pmlen_zicfiss_ssp |
senvcfg.PMM ignores the upper PMLEN bits of the ssp address of shadow stack pushes and pops in VU-mode |
Same test environment and loop as cp_vs_pmlen_zicfiss_ssp, except: |
As cp_vs_pmlen_zicfiss_ssp, with the PMLEN of senvcfg.PMM. |
priv_mode VU x {sspush x1, sspush x5, sspopchk x1, sspopchk x5} (Zicfiss) + {c.sspush x1, c.sspopchk x5} (Zcmop) x senvcfg.PMM {00, 10, 11} x tag {0x0000, 0x0400, 0xFFFF} x (vsatp, hgatp) {PAGED_PAIR} |
pm_ignore_upper_bits |
|
cp_vs_pmm_jalr |
Pointer masking never applies to instruction fetch, so a JALR through a tagged pointer in VS-mode is not masked |
For implicit memory accesses such as instruction fetches, pointer masking does not apply. |
No masking for any henvcfg.PMM. Tag 0x0000 reaches the code at A' (the control). Every other tag is fetched |
priv_mode VS x jalr x henvcfg.PMM {00, 10, 11} x tag {5 patterns} x (vsatp, hgatp) {BARE_PAIR, PAGED_PAIR} |
pm_not_apply_implicit |
|
cp_vu_pmm_jalr |
Pointer masking never applies to instruction fetch, so a JALR through a tagged pointer in VU-mode is not masked |
Same test environment and loop as cp_vs_pmm_jalr, except: |
As cp_vs_pmm_jalr. |
priv_mode VU x jalr x senvcfg.PMM {00, 10, 11} x tag {5 patterns} x (vsatp, hgatp) {BARE_PAIR, PAGED_PAIR} |
pm_not_apply_implicit |
|
cp_vs_pmlen_misaligned_word |
Pointer masking is applied to the address of a misaligned access in VS-mode |
Only the enabled PMM values, tag 0x0000 and fully masked tags are used. Whether a |
No trap: masking is applied to the misaligned address before the access, so A and A' resolve to the same location, |
priv_mode VS x {lw, sw} x misaligned (address + 1) x henvcfg.PMM {10, 11} x tag (PMM 10 {0x0000, 0x0400}, PMM 11 {0x0000, 0xFFFF}) x (vsatp, hgatp) {BARE_PAIR, PAGED_PAIR} |
pm_misaligned_equivalence |
|
cp_vu_pmlen_misaligned_word |
Pointer masking is applied to the address of a misaligned access in VU-mode |
Same test environment and loop as cp_vs_pmlen_misaligned_word, except: |
As cp_vs_pmlen_misaligned_word, with the PMLEN of senvcfg.PMM. |
priv_mode VU x {lw, sw} x misaligned (address + 1) x senvcfg.PMM {10, 11} x tag (PMM 10 {0x0000, 0x0400}, PMM 11 {0x0000, 0xFFFF}) x (vsatp, hgatp) {BARE_PAIR, PAGED_PAIR} |
pm_misaligned_equivalence |
|
cp_vs_hardware_csr_writes_fault_load |
Pointer masking is applied to the addresses that hardware writes to stval and htval on a faulting access in VS-mode |
When a fault occurs on an explicit memory access under pointer masking, the stval written by hardware holds the |
A fault is taken in HS-mode. stval holds the masked effective address (upper PMLEN bits zero-extended with |
priv_mode VS x lw x base {fault, guest-page-fault (hgatp paged only)} x henvcfg.PMM {10, 11} x tag (PMM 10 {0x0000, 0x0400}, PMM 11 {0x0000, 0xFFFF}) x (vsatp, hgatp) {BARE_PAIR, PAGED_PAIR} |
pm_csr_hw_apply |
|
cp_vs_hardware_csr_writes_fault_store |
Pointer masking is applied to the addresses that hardware writes to stval and htval on a faulting store in VS-mode |
Same test environment and loop as cp_vs_hardware_csr_writes_fault_load, except sw to the constructed address in |
As cp_vs_hardware_csr_writes_fault_load. |
priv_mode VS x sw x base {fault, guest-page-fault (hgatp paged only)} x henvcfg.PMM {10, 11} x tag (PMM 10 {0x0000, 0x0400}, PMM 11 {0x0000, 0xFFFF}) x (vsatp, hgatp) {BARE_PAIR, PAGED_PAIR} |
pm_csr_hw_apply |
|
cp_vu_hardware_csr_writes_fault_load |
Pointer masking is applied to the addresses that hardware writes to stval and htval on a faulting load in VU-mode |
Same test environment and loop as cp_vs_hardware_csr_writes_fault_load, except: |
As cp_vs_hardware_csr_writes_fault_load, with the PMLEN of senvcfg.PMM. |
priv_mode VU x lw x base {fault, guest-page-fault (hgatp paged only)} x senvcfg.PMM {10, 11} x tag (PMM 10 {0x0000, 0x0400}, PMM 11 {0x0000, 0xFFFF}) x (vsatp, hgatp) {BARE_PAIR, PAGED_PAIR} |
pm_csr_hw_apply |
|
cp_vu_hardware_csr_writes_fault_store |
Pointer masking is applied to the addresses that hardware writes to stval and htval on a faulting store in VU-mode |
Same test environment and loop as cp_vu_hardware_csr_writes_fault_load, except sw to the constructed address in |
As cp_vu_hardware_csr_writes_fault_load. |
priv_mode VU x sw x base {fault, guest-page-fault (hgatp paged only)} x senvcfg.PMM {10, 11} x tag (PMM 10 {0x0000, 0x0400}, PMM 11 {0x0000, 0xFFFF}) x (vsatp, hgatp) {BARE_PAIR, PAGED_PAIR} |
pm_csr_hw_apply |
|
cp_henvcfg_pmm_change_hfence |
After henvcfg.PMM changes to or from a PMLEN where (XLEN - PMLEN) < GPA width, HFENCE.GVMA x0 makes VS-mode accesses follow the new PMLEN |
In these cases some GPA bits are also masked bits, so the hart may keep TLB entries that are wrong after the |
No traps. PMM = 00: Ti reaches alias_i (value_alias_i). PMM = 10/11: Ti reaches A' (value_old). |
cp_henvcfg_pmm_change_hfence: priv_mode HS x HFENCE.GVMA with rs1 = x0, in the instruction right after a write to henvcfg, x hgatp.MODE = Sv57x4 x henvcfg.PMM before and after the write {00 → 10, 10 → 00, 00 → 11, 11 → 00, 10 → 11, 11 → 10} |
henvcfg_pmm_op |
The HFENCE.GVMA paragraph (hypervisor.adoc, Interaction with Pointer Masking) has no normative tag. |
cp_hupmm_change_hfence |
After hstatus.HUPMM changes to or from a PMLEN where (XLEN - PMLEN) < GPA width, HFENCE.GVMA x0 makes HLV/HSV in U-mode follow the new PMLEN |
Same test environment, cases, addresses and steps as cp_henvcfg_pmm_change_hfence, except: |
Same as cp_henvcfg_pmm_change_hfence, with hstatus.HUPMM in place of henvcfg.PMM. |
cp_hupmm_change_hfence: priv_mode HS x HFENCE.GVMA with rs1 = x0, in the instruction right after a write to hstatus, x hgatp.MODE = Sv57x4 x hstatus.HUPMM before and after the write {00 → 10, 10 → 00, 00 → 11, 11 → 00, 10 → 11, 11 → 10} |
pm_mprv_spvp |
The HUPMM paragraph and the HFENCE.GVMA paragraph have no normative tags. |
cp_henvcfg_pmm_change_no_hfence |
After henvcfg.PMM changes in a case the HFENCE.GVMA rule does not list, VS-mode accesses follow the new PMLEN without any HFENCE |
The spec requires HFENCE.GVMA only when (XLEN - PMLEN) < GPA width, where a masked bit can also be a GPA bit. |
PMM = 00: Ti is used unmasked (a fault, or alias_i for tag 0x0002 in case 5). PMM = 10/11 with the tag within |
priv_mode HS x the instruction right after a write to henvcfg is not HFENCE.GVMA x (vsatp, hgatp) x henvcfg.PMM before and after the write: (Bare, Sv39x4) {00 <→ 10, 00 <→ 11}, (Bare, Sv48x4) {00 <→ 10}, (Sv57, Sv57x4) {00 <→ 10, 00 <→ 11} |
henvcfg_pmm_op |
The HFENCE.GVMA paragraph (hypervisor.adoc, Interaction with Pointer Masking) lists only the cases of cp_henvcfg_pmm_change_hfence. |
cp_pmm_vsxl_clear |
Setting hstatus.VSXL = 01 (RV32 VS-mode) clears henvcfg.PMM |
Test Environment: |
Step 1 reads back the value written. Step 2 reads henvcfg.PMM = 00. Step 3 reads henvcfg.PMM = 00, because |
priv_mode HS x csrw hstatus x henvcfg.PMM before the write {10, 11} x hstatus.VSXL after the write = 01 |
pm_uxl_clear |
|
cp_pmm_vsuxl_clear |
Setting vsstatus.UXL = 01 (RV32 VU-mode) clears senvcfg.PMM |
vsstatus.UXL gives the XLEN of VU-mode, and senvcfg.PMM is the field |
Step 1 reads back the value written. Step 2 reads senvcfg.PMM = 00. Step 3 reads senvcfg.PMM = 00. The write |
writer {csrw vsstatus in HS-mode, csrw sstatus in VS-mode} x senvcfg.PMM before the write {10, 11} x vsstatus.UXL after the write = 01 |
pm_uxl_clear |
| Normative Rule | Rule Text | Coverpoints |
|---|---|---|
senvcfg_pmm_ssnpm |
Ssnpm_cg/cp_pmlen_masking, S_scsr_cg/cp_scsrwalk/senvcfg, Ssnpm_H_cg/{cp_vu_pmm, cp_vu_pmlen_masking, cp_hlv_hs_spvp0_pmm} |
|
senvcfg_pmm_immediate |
TODO: change senvcfg.PMM, then access memory from U-mode with no intervening SFENCE.VMA |
|
senvcfg_pmm_enc |
Ssnpm_cg/cp_pmlen_masking, Ssnpm_H_cg/cp_vu_pmlen_masking, S_scsr_cg/cp_scsrwalk/senvcfg (the walk writes the reserved PMM=0b01) |
|
henvcfg_pmm_op |
Ssnpm_H_cg/{cp_vs_pmm, cp_vs_pmlen_masking, cp_hlv_hs_spvp1_pmm, cp_hlv_u_spvp1_pmm}, Ssnpm_H_cg/{cp_vs_pmlen_zicfiss_amo, cp_vs_pmlen_zicfiss_ssp}, Ssnpm_H_cg/{cp_henvcfg_pmm_change_hfence, cp_henvcfg_pmm_change_hfence_sv48x4}, Ssnpm_H_cg/cp_henvcfg_pmm_change_no_hfence, Tested by the signature: henvcfg.PMM does not mask the guest physical address from the VS stage (Ssnpm_H plan, cp_vs_gstage_no_pmm) |
UDB Parameters: None.
| Normative Rule | Rule Text | Coverpoints |
|---|---|---|
pm_ignore_upper_bits |
{Smmpm_cg, Smnpm_S_cg, Smnpm_U_cg, Ssnpm_cg}/cp_pmlen_masking, Ssnpm_H_cg/{cp_vs_pmlen_masking, cp_vu_pmlen_masking}, Ssnpm_H_cg/{cp_vs_pmlen_zicfiss_amo, cp_vu_pmlen_zicfiss_amo, cp_vs_pmlen_zicfiss_ssp, cp_vu_pmlen_zicfiss_ssp}, Ssnpm_H_cg/cp_vs_pmm |
|
pm_ignore_va |
{Smmpm_cg, Smnpm_S_cg, Smnpm_U_cg, Ssnpm_cg}/cp_pmlen_masking, Ssnpm_H_cg/{cp_vs_pmlen_masking, cp_vu_pmlen_masking}, Ssnpm_H_cg/{cp_vs_pmlen_zicfiss_amo, cp_vu_pmlen_zicfiss_amo, cp_vs_pmlen_zicfiss_ssp, cp_vu_pmlen_zicfiss_ssp}, Ssnpm_H_cg/{cp_vs_pmm, cp_vu_pmm}, Ssnpm_H_cg/{cp_hlv_hs_spvp1_pmm, cp_hlv_hs_spvp0_pmm} |
|
pm_ignore_pa |
{Smmpm_cg, Smnpm_S_cg, Smnpm_U_cg, Ssnpm_cg}/cp_pmlen_masking, Ssnpm_H_cg/{cp_vs_pmm, cp_vu_pmm}, Ssnpm_H_cg/{cp_hlv_hs_spvp1_pmm, cp_hlv_hs_spvp0_pmm}, Ssnpm_H_cg/{cp_vs_pmlen_masking, cp_vu_pmlen_masking} |
|
pm_apply_explicit |
{Smmpm_cg, Smnpm_S_cg, Smnpm_U_cg, Ssnpm_cg}/cp_pmlen_masking, Ssnpm_H_cg/{cp_vs_pmlen_masking, cp_vu_pmlen_masking}, Ssnpm_H_cg/{cp_vs_pmlen_zicfiss_amo, cp_vu_pmlen_zicfiss_amo, cp_vs_pmlen_zicfiss_ssp, cp_vu_pmlen_zicfiss_ssp}, Ssnpm_H_cg/{cp_vs_pmm, cp_vu_pmm, cp_hlv_hs_spvp1_pmm, cp_hlv_hs_spvp0_pmm} |
|
pm_not_apply_implicit |
{Smmpm_cg, Smnpm_S_cg, Smnpm_U_cg, Ssnpm_cg}/cp_pmm_jalr, Ssnpm_H_cg/{cp_vs_pmm_jalr, cp_vu_pmm_jalr}, Tested by the signature: the guest physical address from the VS stage is not masked (Ssnpm_H plan, cp_vs_gstage_no_pmm) |
|
pm_deterministic_effect |
{Smmpm_cg, Smnpm_S_cg, Smnpm_U_cg, Ssnpm_cg}/cp_pmlen_masking, Ssnpm_H_cg/{cp_vs_pmlen_masking, cp_vu_pmlen_masking} |
|
pmlen_supported_values |
{Smmpm_cg, Smnpm_S_cg, Smnpm_U_cg, Ssnpm_cg}/cp_pmlen_masking, Ssnpm_H_cg/{cp_vs_pmlen_masking, cp_vu_pmlen_masking}, Ssnpm_H_cg/cp_vs_pmm |
|
pmlen_future_reserved |
A setting has been reserved to potentially support other values of PMLEN in future standards. |
S_scsr_cg/cp_scsrwalk/senvcfg, Sm_mcsr_cg/cp_mcsrwalk_masked/{menvcfg, mseccfg} |
pm_per_mode_control |
Pointer masking is controlled separately for different privilege modes. |
{Smmpm_cg, Smnpm_S_cg, Smnpm_U_cg, Ssnpm_cg}/cp_pmlen_masking, Ssnpm_H_cg/{cp_vs_pmlen_masking, cp_vu_pmlen_masking}, Ssnpm_H_cg/{cp_vs_pmm, cp_vu_pmm} |
pm_auto_apply_active_mode |
{Smmpm_cg, Smnpm_S_cg, Smnpm_U_cg, Ssnpm_cg}/cp_pmlen_masking |
|
pm_config_next_higher |
{Smmpm_cg, Smnpm_S_cg, Smnpm_U_cg, Ssnpm_cg}/cp_pmlen_masking, Ssnpm_H_cg/{cp_vs_pmlen_masking, cp_vu_pmlen_masking}, Ssnpm_H_cg/{cp_vs_pmm, cp_vu_pmm} |
|
pm_mode_only_dependency |
{Smmpm_cg, Smnpm_S_cg, Smnpm_U_cg, Ssnpm_cg}/cp_pmlen_masking, Ssnpm_H_cg/{cp_vs_pmlen_masking, cp_vu_pmlen_masking}, Ssnpm_H_cg/cp_vs_pmm |
|
pm_explicit_accesses |
Unless otherwise specified, pointer masking applies to all explicit memory accesses. |
{Smmpm_cg, Smnpm_S_cg, Smnpm_U_cg, Ssnpm_cg}/cp_pmlen_masking |
pm_mprv_spvp |
Smmpm_cg/cp_pm_mprv_mpp_m, Ssnpm_Sm_cg/cp_pm_mprv_mpp_u, Smnpm_SSm_cg/cp_pm_mprv_mpp_s, Smnpm_USm_cg/cp_pm_mprv_mpp_u, Ssnpm_H_cg/{cp_hlv_hs_spvp0_pmm, cp_hlv_hs_spvp1_pmm, cp_hlv_u_spvp0_pmm, cp_hlv_u_spvp1_pmm, cp_hlv_hs_spvp0_mxr_pmm, cp_hlv_hs_spvp1_mxr_pmm}, Ssnpm_H_cg/{cp_hupmm_change_hfence, cp_hupmm_change_hfence_sv48x4, cp_hlv_u_spvp0_sv48x4_pmm} |
|
pm_mxr_exception |
{Smmpm_cg, Smnpm_S_cg, Ssnpm_cg}/cp_pmm_mxr, Ssnpm_H_cg/{cp_vs_mxr_pmm, cp_vu_mxr_pmm, cp_hlv_hs_spvp1_mxr_pmm, cp_hlv_hs_spvp0_mxr_pmm} |
|
pm_cpu_only |
{Smmpm_cg, Smnpm_S_cg, Smnpm_U_cg, Ssnpm_cg}/cp_pmlen_masking |
|
pm_misaligned_equivalence |
{Smmpm_cg, Smnpm_S_cg, Smnpm_U_cg, Ssnpm_cg}/cp_pmlen_misaligned_word, Ssnpm_H_cg/{cp_vs_pmlen_misaligned_word, cp_vu_pmlen_misaligned_word} |
|
pm_no_csr_sw |
{Smmpm_cg, Smnpm_S_cg}/cp_pm_csr_software_access |
|
pm_warl_unaffected |
The implemented WARL width of CSRs is unaffected by pointer masking |
{Smmpm_cg, Smnpm_S_cg}/cp_pm_csr_software_access |
pm_csr_hw_apply |
{Smmpm_cg, Smnpm_S_cg, Smnpm_U_cg, Ssnpm_cg}/cp_hardware_csr_writes_fault_load, {Smmpm_cg, Smnpm_S_cg, Smnpm_U_cg, Ssnpm_cg}/cp_hardware_csr_writes_fault_store, Ssnpm_H_cg/{cp_vs_hardware_csr_writes_fault_load, cp_vs_hardware_csr_writes_fault_store, cp_vu_hardware_csr_writes_fault_load, cp_vu_hardware_csr_writes_fault_store} |
|
pm_debug_trigger |
||
pm_no_trap_vector_mask |
||
ssnpm_definition |
Ssnpm_cg/cp_pmlen_masking, Ssnpm_H_cg/{cp_vs_pmm, cp_vu_pmm, cp_vs_pmlen_masking, cp_vu_pmlen_masking} |
|
smnpm_definition |
{Smnpm_S_cg, Smnpm_U_cg}/cp_pmlen_masking |
|
smmpm_definition |
A machine-level extension that provides pointer masking for M-mode. |
Smmpm_cg/cp_pmlen_masking |
pm_rv64_only |
{Smmpm_cg, Smnpm_S_cg, Smnpm_U_cg, Ssnpm_cg}/cp_pmlen_masking, Ssnpm_H_cg/{cp_vs_pmlen_masking, cp_vu_pmlen_masking} |
|
pm_rv32_illegal |
Sm_mcsr_cg/cp_mcsrwalk_masked/{menvcfgh, mseccfgh} |
|
pm_uxl_clear |
Setting UXL/SXL to 1 will clear the corresponding pointer masking configuration bits. |
Ssnpm_cg/cp_pmm_uxl_clear, Ssnpm_H_cg/{cp_pmm_vsxl_clear, cp_pmm_vsuxl_clear} |
pmlen_mode_depend |
{Smmpm_cg, Smnpm_S_cg, Smnpm_U_cg, Ssnpm_cg}/cp_pmlen_masking, Ssnpm_H_cg/{cp_vs_pmlen_masking, cp_vu_pmlen_masking}, Ssnpm_H_cg/{cp_vs_pmm, cp_vu_pmm} |
|
pmlen_illegal_warl |
Sm_mcsr_cg/cp_mcsrwalk_masked/{menvcfg, mseccfg, menvcfgh, mseccfgh}, S_scsr_cg/cp_scsrwalk/senvcfg, Ssnpm_H_cg/{cp_pmm_vsxl_clear, cp_pmm_vsuxl_clear} |
UDB Parameters: None.
B.10.10. Smnpm Pointer Masking
Smnpm_S
Smnpm is a machine level extension which enables pointer maksing for lower privilege level S mode (if implemented ) or otherwise U-mode via menvcfg. In this sheet , test plan is for S-mode implementation (SmnpmS) Similar to Ssnpm except: Run the same coverpoints as Ssnpm in S-mode except - MXR bit is sampled from mstatus csr - remove cp_pmm_uxl_clear - cp_pmlen_zicfiss_amo and cp_pmlen_zicfiss_ssp are exactly the same as Ssnpm except only menvcfg.SSE=1 is set (senvcfg.SSE controls U-mode and is not needed in S-mode), and the shadow stack page is a supervisor page.
| Coverpoint | Goal | Feature Description | Expectation | Bins | Normative Rule |
|---|---|---|---|---|---|
- add the following cp_pm_csr_software_access_* coverpoints |
|||||
cp_pm_csr_software_access |
Ensure pointer masking is not applied to software CSR reads and writes |
Pointer masking is not applied to software CSR reads and writes. |
No masking applied; read-back value matches written value (subject to WARL constraints). |
2 PMM * 4 CSR ops * 1 mode (S) * 3 CSR * satp supported modes (Bare, Sv39, Sv48, Sv57) |
pm_no_csr_sw |
Smnpm_SSm
Smnpm provides pointer masking for S-mode (if implemented) via menvcfg.PMM. In this sheet , test plan is for the M-mode part of SmnpmS: M-mode accesses memory as S-mode via MPRV. - tests run in M-mode with mstatus.MPRV=1 and mstatus.MPP=S - The suite requires Smnpm and S-mode because menvcfg.PMM governs the access. mseccfg.PMM is swept only if Smmpm is supported, to show that it does not apply.
| Coverpoint | Goal | Feature Description | Expectation | Bins | Normative Rule |
|---|---|---|---|---|---|
cp_pm_mprv_mpp_s |
Verify that menvcfg.PMM governs pointer masking when M-mode accesses memory as S-mode via MPRV. |
MPRV affect pointer masking as well, causing the pointer masking settings of the effective privilege mode to be applied. |
When menvcfg.PMM=10/11 and MXR=0: A patterns whose upper bits fall within PMLEN resolve to scratch, reads return known value_old, write readbacks return known value_new, regardless of mseccfg.PMM. When menvcfg.PMM=00 or MXR=1: masking disabled : only A=0x0000 resolves to scratch; all other patterns cause a trap. |
2 MXR * 3 mseccfg.PMM * 3 menvcfg.PMM * 1 MPRV * 1 MPP (S) * 2 satp.MODE * 3 addresses * 2 instructions (lw, sw) |
pm_mprv_spvp |
Smnpm_U
Smnpm is a machine level extension which enables pointer maksing for lower privilege level S mode (if implemented ) or otherwise U-mode via menvcfg. In this sheet , test plan is for U-mode implementation (SmnpmU), i.e if S mode is not supported. Similar to Ssnpm except: If S-mode not supported, run the same coverpoints as Ssnpm in U-mode except the JALR cross is kept separate from MXR as it is read-only zero if S-mode is not supported , since implicit fetch must be verified as never masked regardless of whether S-mode (and hence MXR) is implemented. - all addresses are physical, Tests executed only in Bare mode . - For cp_hardware_csr_write_faults , traps are being handled in M mode and mtval will be checked. - drop cp_pmm_mxr because MXR is read-only 0 if S-mode is not supported - drop cp_pmlen_zicfiss_amo and cp_pmlen_zicfiss_ssp because Zicfiss cannot be activated if S-mode is not supported: SSAMOSWAP is illegal in U-mode, and SSPUSH and SSPOPCHK revert to their Zimop/Zcmop behavior and do not access memory.
Smnpm_USm
Smnpm provides pointer masking for U-mode via menvcfg.PMM if S-mode is not supported. In this sheet , test plan is for the M-mode part of SmnpmU: M-mode accesses memory as U-mode via MPRV. Similar to SmnpmSSm except: - tests run in M-mode with mstatus.MPRV=1 and mstatus.MPP=U - all addresses are physical, Tests executed only in Bare mode . - MXR is not swept because it is read-only 0 if S-mode is not supported
| Coverpoint | Goal | Feature Description | Expectation | Bins | Normative Rule |
|---|---|---|---|---|---|
cp_pm_mprv_mpp_u |
Verify that menvcfg.PMM governs pointer masking when M-mode accesses memory as U-mode via MPRV on a hart without S-mode. |
MPRV affect pointer masking as well, causing the pointer masking settings of the effective privilege mode to be applied. |
When menvcfg.PMM=10/11: A patterns whose upper bits fall within PMLEN resolve to scratch, reads return known value_old, write readbacks return known value_new, regardless of mseccfg.PMM. When menvcfg.PMM=00: masking disabled : only A=0x0000 resolves to scratch; all other patterns cause a trap. |
3 mseccfg.PMM * 3 menvcfg.PMM * 1 MPRV * 1 MPP (U) * 3 addresses * 2 instructions (lw, sw) |
pm_mprv_spvp |
See Table 318 for normative rules.
B.10.11. Smmpm Pointer Masking
Smmpm is a machine-level extension that provides pointer masking for M-mode. Exactly same coverpoints as Ssnpm except delete cp_pmm_uxl_clear, add the following, and run in M-mode: - all addresses are physical, all tests run in Bare/ M-mode . - drop cp_pmlen_zicfiss_amo and cp_pmlen_zicfiss_ssp because Zicfiss cannot be activated in M-mode: SSAMOSWAP always raises a store/AMO access fault, and SSPUSH and SSPOPCHK revert to their Zimop/Zcmop behavior and do not access memory. - MPRV is tested here only with MPP=M, where mseccfg.PMM governs. MPP=U and MPP=S are governed by senvcfg.PMM and menvcfg.PMM, so they are in the SsnpmSm, SmnpmSSm and SmnpmUSm suites. the JALR cross is kept separate from MXR and not guarded by S_SUPPORTED , since implicit fetch must be verified as never masked regardless of whether S-mode (and hence MXR) is implemented.
| Coverpoint | Goal | Feature Description | Expectation | Bins | Normative Rule |
|---|---|---|---|---|---|
- For cp_hardware_csr_* , traps are being handled in M mode and mtval will be checked. |
|||||
cp_pm_mprv_mpp_m |
Verify that mseccfg.PMM governs pointer masking when M-mode accesses memory with MPRV=1 and MPP=M. |
MPRV affect pointer masking as well, causing the pointer masking settings of the effective privilege mode to be applied. |
When mseccfg.PMM=10/11: A patterns whose upper bits fall within PMLEN resolve to scratch, reads return known value_old, write readbacks return known value_new. When mseccfg.PMM=00: masking disabled : only A=0x0000 resolves to scratch; all other patterns cause a trap. |
3 mseccfg.PMM * 1 MPRV * 1 MPP (M) * 3 addresses * 2 instructions (lw, sw) |
pm_mprv_spvp |
cp_pm_csr_software_access |
Ensure pointer masking is not applied to software CSR reads and writes |
Pointer masking is not applied to software CSR reads and writes. |
No masking applied; read-back value matches written value (subject to WARL constraints). |
2 PMM * 4 (csrrw / csrrc / 4csrrs /csrrwi) * 1 mode (M ) * 3 csr |
pm_no_csr_sw |
See Table 318 for normative rules.
B.10.12. Zicfilp Landing Pads
In Privileged section because it has both unpriv and privileged behaviors. The common coverpoints are defined once and re-executed by the Zicfilp_U, Zicfilp_Sm and Zicfilp_S groups in their privilege mode, and by the Zicfilp_H group in VS-mode and VU-mode; each group adds the coverpoints for its modes' xPELP handling. The Zicfilp_SmH group covers traps from VS-mode and VU-mode into M-mode and mret to VS-mode and VU-mode.
| Coverpoint | Goal | Feature Description | Expectation | Bins | ID | Normative Rule | Notes |
|---|---|---|---|---|---|---|---|
In this sheet: |
|||||||
cp_zicfilp_indirect_elp_state_update |
Verify correct update of ELP state on execution of indirect control-transfer instructions based on rs1 category, privilege mode, and xLPE enable state. |
Test Case: Execute Indirect_CT instructions in each supported privilege mode under the following configurations: |
software check exception if applicable |
31 rs1 registers × |
Zicfilp_lpad_expected |
Zicfilp_lpad_expected |
|
cp_zicfilp_direct_ct_no_elp |
Verify that direct jumps and taken branches do not set ELP. |
Test Environment: |
No software-check exception. Only JALR, C.JR and C.JALR are Indirect_CTs, so ELP stays NO_LP_EXPECTED at the target. |
JAL, taken branch, plus C.J with Zca and C.JAL on RV32 with Zca |
Zicfilp_lpad_expected |
Zicfilp_lpad_expected |
|
cp_zicfilp_lpad_zero_label_bypass |
Verify that LPAD with LPL=0 bypasses label comparison during landing pad validation. |
Test Environment: |
Indirect branch shall succeed without software-check exception. LPAD label comparison shall be bypassed when LPL=0. |
N Indirect_CT types × N privilege modes × target_LPL_zero |
Zicfilp_lpad_imm_enc |
Zicfilp_lpad_imm_enc |
|
cp_zicfilp_lpad_valid_execution |
Verify that a valid LPAD instruction satisfies landing pad validation when ELP=LP_EXPECTED. |
Test Environment: |
No software-check exception shall be raised. After LPAD retirement, ELP shall be set to NO_LP_EXPECTED. |
2 (LPL={0,match}) × N Indirect_CT types × N privilege modes |
Zicfilp_elp_lpad_expected |
Zicfilp_elp_lpad_expected |
|
cp_zicfilp_lpad_missing_instruction_exception |
Verify that execution of a non-LPAD instruction when ELP=LP_EXPECTED raises a software-check exception. |
Test Environment: |
A software-check exception (cause=18) shall be raised. xtval shall indicate landing pad fault (code=2). ELP shall remain LP_EXPECTED. |
N Indirect_CT types × N privilege modes |
Zicfilp_elp_lpad_expected |
Zicfilp_elp_lpad_expected |
|
cp_zicfilp_lpad_label_mismatch |
Verify software-check exception for LPAD label mismatch |
xLPE=1, |
Software-check exception (cause=18) shall be raised. xtval shall indicate "landing pad fault (code=2)". |
Instruction type × rs1 category × ELP × N privilege modes |
Zicfilp_elp_lpad_expected |
||
cp_zicfilp_lpad_label_match_mismatch |
Verify LPAD label matching and mismatching behavior |
Test Environment: |
If expected landing pad label in x7 matches LPAD immediate label, no exception. Otherwise, software-check exception occurs. |
4 scenarios x 3 Indirect_CT types (C.JR and C.JALR only with Zca) = 12 |
Zicfilp_lpad_label |
Zicfilp_lpad_label |
|
cp_zicfilp_lpad_label_exception_delivery |
Verify software-check exception delivery and correct privilege-mode handling on LPAD label mismatch |
Test Environment: |
Software-check exception (cause=18) delivered to the mode that takes the suite’s traps: M-mode for ZicfilpSm, S-mode for ZicfilpS, and S-mode for ZicfilpU (M-mode when S-mode is not implemented). xtval = landing pad fault (code=2). xPELP = LP_EXPECTED. |
3 Indirect_CT types (C.JR and C.JALR only with Zca) |
Zicfilp_lpad_enabled_exception |
Zicfilp_lpad_enabled_exception |
|
cp_disabled_zicfilp |
Verify behavior when Zicfilp is disabled |
Test Environment: |
No exception is raised; LPAD acts as a nop. |
1 × N privilege modes |
Zicfilp_lpad_enabled_instr_allowed |
Zicfilp_lpad_enabled_instr_allowed |
|
cp_lpad_no_sw_exception_elp_clear_zicfilp |
Verify that ELP updates to NO_LP_EXPECTED after executing a valid LPAD |
Test Environment: |
No software-check exception is raised. ELP is updated to NO_LP_EXPECTED after LPAD execution |
3 Indirect_CT types (C.JR and C.JALR only with Zca) |
Zicfilp_lpad_sw_exception |
Zicfilp_lpad_no_sw_exception |
|
cp_exception_priority_zicfilp |
Verify the priority of exceptions |
Test Environment: |
Instruction access fault (cause=1) is taken in preference to the software-check exception, and the software-check exception is taken in preference to an illegal-instruction exception (cause=2). |
N privilege modes x {instruction access fault at the target, illegal instruction at the target} |
Zicfilp_forward_trap_async_exception |
Zicfilp_forward_trap_async_exception |
|
cp_lpad_alignment_exception_zicfilp |
Verify that an LPAD that is not 4-byte aligned raises a software-check exception when ELP=LP_EXPECTED |
Only when Zca is implemented. |
Software-check exception (cause=18) with xtval = landing pad fault (code=2), even though LPL=0. |
3 Indirect_CT types (Zca only) |
Zicfilp_elp_lpad_expected Zicfilp_lpad_alignment_exception |
Zicfilp_elp_lpad_expected |
|
cp_lpad_nop_no_lp_expected_zicfilp |
Verify that LPAD is a no-op when ELP=NO_LP_EXPECTED, even with xLPE=1 |
Test Environment: |
No exception. Both LPADs execute as no-ops and ELP stays NO_LP_EXPECTED. |
2 (LPL mismatch; pc[1:0]=2 only with Zca) |
Zicfilp_lpad_label_exception Zicfilp_lpad_alignment_exception |
Zicfilp_lpad_label_exception |
|
The gray test are duplicates of other test and are excluded. |
|||||||
The yellow coverpoints are excluded because they apply to debug |
|||||||
cp_lpad_misaligned_address_exception_zicfilp |
Verify exception for misaligned PC |
Test Case |
Software-check exception raised (cause=18), xtval="landing pad fault (code=2)", ELP unchanged |
Instruction type × rs1 category (non-link register) × ELP)xpriv mode |
Zicfilp_elp_lpad_expected |
Zicfilp_elp_lpad_expected |
Duplicate of cp_lpad_alignment_exception_zicfilp. |
cp_elp_state_preservation_debug_zicfilp |
Verify Debug Mode saves and |
Test Case |
Debug mode entered, dcsr.pelp stores previous ELP value, |
Origin mode U × |
dcsr_pelp_op |
dcsr_pelp_op |
Should be added in Debug testplan when we will start writing Debug testplans |
cp_pelp_debug_mode_zicfilp |
Verify ELP on Debug Mode entry |
Test Case |
dcsr.pelp = LP_EXPECTED and ELP set to NO_LP_EXPECTED |
Debug entry × Initial ELP state |
norm:Zicfilp_pelp_debug_mode |
Zicfilp_pelp_debug_mode |
Should be added in Debug testplan when we will start writing Debug testplans |
cp_pelp_debug_mode_r_zicfilp |
Verify ELP on resuming from Debug Mode |
Test Case |
ELP restored from dcsr.pelp for 1 |
Resume privilege × LPE disabled/enabled |
norm:Zicfilp_pelp_debug_mode |
Zicfilp_pelp_debug_mode |
Should be added in Debug testplan when we will start writing Debug testplans |
Zicfilp_U User-Mode Landing Pads
In this sheet, all Zicfilp tests from the Zicfilp_Common sheet are re-executed in User Mode (U-mode). Environment: - Zicfilp extension enabled, Zicsr enabled. - Landing Pad Enabled (LPE) controlled by: senvcfg.LPE when S-mode is implemented menvcfg.LPE when S-mode is not implemented - Tests execute in U-mode. Execution Notes: - All indirect branch instructions (JALR, C.JALR, C.JR) are exercised as in the Common sheet. - LPAD behavior, label matching, immediate encoding, and software-check exceptions are tested as per normative rules defined in the spec. - ELP state is observed via sstatus.SPELP when S-mode is implemented, because U-mode software-check exceptions are delegated to S-mode (medeleg[18]=1 in the ACT4 boot code). When S-mode is not implemented the trap is taken in M-mode and ELP is observed via mstatus.MPELP (RV64) or mstatush.MPELP (RV32). - Trap entry and return coverpoints from the M-mode sheet are not repeated here as they are M-mode specific by spec. - All other assumptions, instruction types, and execution conditions are identical to the Zicfilp_Common sheet.
| Coverpoint | Goal | Feature Description | Normative Rule |
|---|---|---|---|
cp_zicfilp_indirect_elp_state_update |
Re-run the common Zicfilp coverpoints in U-mode |
The coverpoints described in the Zicfilp Common Coverpoints table, executed in U-mode. |
cfi_call_term |
Zicfilp_Sm Machine-Mode Landing Pads
In this sheet, all Zicfilp tests from the Zicfilp_Common sheet are executed in Machine Mode (M-mode). Environment: - Zicfilp extension enabled, Zicsr enabled. - Landing Pad Enabled (LPE) controlled by mseccfg.MLPE. - Tests execute in M-mode. Execution Notes: - All indirect branch instructions (JALR, C.JALR, C.JR) are exercised as in the Common sheet. - LPAD behavior, label matching, immediate encoding, and software-check exceptions are tested as per normative rules defined in the spec. - ELP state is observed via mstatus.MPELP (RV64) or mstatush.MPELP (RV32). - This sheet additionally covers M-mode specific trap entry and return coverpoints not present in other sheets: cp_elp_state_preservation_zicfilp cp_pelp_trap_entry_zicfilp cp_pelp_trap_entry_guarded_zicfilp cp_pelp_trap_return_zicfilp cp_elp_async_interrupt_zicfilp - All other assumptions, instruction types, and execution conditions are identical to the Zicfilp_Common sheet. Excluded (Debug testplan — separate file): - cp_elp_state_preservation_debug_zicfilp - cp_pelp_debug_mode_zicfilp - cp_pelp_debug_mode_r_zicfilp Excluded (Redundant — duplicate of cp_lpad_alignment_exception_zicfilp): - cp_lpad_misaligned_address_exception_zicfilp
| Coverpoint | Goal | Feature Description | Expectation | Bins | ID | Normative Rule |
|---|---|---|---|---|---|---|
cp_elp_state_preservation_zicfilp |
Verify M-mode trap saves and restores previous ELP using MPELP |
Test Environment: |
Trap is delivered to M-mode. Previous ELP value (LP_EXPECTED) is saved in mstatus.MPELP. After executing MRET, ELP is restored to LP_EXPECTED in the returning privilege mode |
Origin mode (U/S) × Trap target (M-mode) × ELP states |
cfi_mstatus_mpelp_op |
lpad_sw_exception |
cp_pelp_trap_entry_zicfilp |
Verify xPELP and ELP on trap entry to M-mode |
Test Environment: |
On trap entry: mstatus.MPELP (mstatush.MPELP on RV32) = NO_LP_EXPECTED and ELP = NO_LP_EXPECTED. MRET therefore leaves ELP clear, so the non-LPAD instruction after the ECALL does not trap. |
1 (ECALL in M-mode with ELP=NO_LP_EXPECTED) |
Zicfilp_pelp_trap |
Zicfilp_pelp_trap |
cp_pelp_trap_entry_guarded_zicfilp |
Verify xPELP and ELP on trap entry from software-guarded branch |
Test Environment: |
On trap entry: mstatus.MPELP = NO_LP_EXPECTED and ELP remains NO_LP_EXPECTED. |
3 rs1 registers {x1,x5,x7} x 3 Indirect_CT types (JALR, plus C.JR and C.JALR when Zca is implemented) = 3 + 6 |
Zicfilp_pelp_trap |
Zicfilp_indirect_branch_lpad |
cp_pelp_trap_return_zicfilp |
Verify behavior of return from trap via MRET |
Test Environment: |
On MRET, ELP is set to MPELP if the xLPE of the mode being returned to is 1, otherwise NO_LP_EXPECTED. MPELP is set to NO_LP_EXPECTED. A software-check exception occurs only when MPELP=1 and the new mode’s xLPE=1. MPELP read back after an MRET to M-mode is 0. |
3 target modes (M/S/U) x 8 (mseccfg.MLPE x menvcfg.LPE x senvcfg.LPE) x 2 MPELP = 48. Without S-mode: 2 target modes (M/U) x 4 (mseccfg.MLPE x menvcfg.LPE) x 2 = 16. M-mode only: 1 x 2 x 2 = 4. |
Zicfilp_pelp_trap_return |
Zicfilp_pelp_trap_return |
cp_elp_async_interrupt_zicfilp |
Verify that an interrupt taken before the target of an MRET that set ELP saves MPELP |
Test Environment: |
The interrupt saves MPELP=LP_EXPECTED. The handler clears SSIP and returns with MRET, which restores ELP=LP_EXPECTED, so the non-LPAD target then raises a software-check exception (two traps in total). |
1 (MRET to S-mode with MPELP=1 and an undelegated SSI pending) |
Zicfilp_forward_trap_async_interrupt |
Zicfilp_forward_traps |
cp_zicfilp_indirect_elp_state_update |
Re-run the common Zicfilp coverpoints in M-mode |
The coverpoints described in the Zicfilp Common Coverpoints table, executed in M-mode. |
cfi_call_term |
Zicfilp_S Supervisor-Mode Landing Pads
| Coverpoint | Goal | Feature Description | Expectation | Bins | ID | Normative Rule |
|---|---|---|---|---|---|---|
In this sheet, all Zicfilp tests from the Zicfilp_common_reference sheet are re-executed in Supervisor Mode (S-mode). |
||||||
cp_pelp_trap_entry_zicfilp |
Verify xPELP and ELP on trap entry to S-mode |
Test Environment: |
On trap entry: sstatus.SPELP = NO_LP_EXPECTED and ELP = NO_LP_EXPECTED. SRET therefore leaves ELP clear, so the non-LPAD instruction after the EBREAK does not trap. |
1 (EBREAK in S-mode with ELP=NO_LP_EXPECTED) |
Zicfilp_pelp_trap |
cfi_mstatus_spelp_op |
cp_pelp_trap_entry_guarded_zicfilp |
Verify xPELP and ELP on trap entry to S-mode from a software-guarded branch |
Test Environment: menvcfg.LPE=1. Execute Indirect_CT through x1, x5 and x7 to an EBREAK. No landing pad is required at the target, so the breakpoint is taken instead of a software-check exception. |
On trap entry: sstatus.SPELP = NO_LP_EXPECTED and ELP remains NO_LP_EXPECTED. |
3 rs1 registers {x1,x5,x7} x 3 Indirect_CT types (JALR, plus C.JR and C.JALR when Zca is implemented) = 3 + 6 |
Zicfilp_pelp_trap Zicfilp_indirect_branch_lpad |
Zicfilp_pelp_trap |
cp_elp_state_preservation_zicfilp |
Verify S-mode trap saves and restores previous ELP using SPELP |
Test Environment: senvcfg.LPE=1. Execute an indirect branch in U-mode (rs1 != {x1,x5,x7}) to a non-LPAD instruction; the software-check exception is delegated to S-mode. After SRET the next non-LPAD instruction raises a second software-check exception, which shows ELP was restored. Then ECALL from U-mode with ELP=NO_LP_EXPECTED. |
Trap delivered to S-mode. Previous ELP saved in sstatus.SPELP. After SRET, ELP is restored to LP_EXPECTED in U-mode. |
Origin mode (U) x trap target (S-mode) x 2 ELP states |
Zicfilp_pelp_trap cfi_sstatus_spelp_op |
lpad_sw_exception |
cp_pelp_trap_return_zicfilp |
Verify behavior of return from trap via SRET |
Test Environment: In S-mode set sstatus.SPP to S or U, set sstatus.SPELP to 0 or 1, set sepc to a non-LPAD instruction, and execute SRET. Sweep all four combinations of menvcfg.LPE and senvcfg.LPE for each target mode. After an SRET to S-mode, read SPELP back. |
ELP is set to SPELP if the new mode xLPE is 1, otherwise NO_LP_EXPECTED. SPELP is set to NO_LP_EXPECTED. A software-check exception occurs only when SPELP=1 and xLPE=1. SPELP read back after an SRET to S-mode is 0. |
2 target modes (S/U) x 4 (menvcfg.LPE x senvcfg.LPE) x 2 SPELP = 16 |
Zicfilp_pelp_trap_return |
cfi_mstatus_spelp_op |
cp_zicfilp_indirect_elp_state_update |
Re-run the common Zicfilp coverpoints in S-mode |
The coverpoints described in the Zicfilp Common Coverpoints table, executed in S-mode. |
cfi_call_term |
|||
Zicfilp_H Hypervisor Landing Pads
The H group boots to HS-mode and sets the landing pad enables from there: menvcfg.LPE through T-SBI, henvcfg.LPE and senvcfg.LPE directly. henvcfg.LPE enables landing pads in VS-mode and senvcfg.LPE in VU-mode. hedeleg = 0, so software-check exceptions are taken in HS-mode unless a test delegates them to VS-mode. The trap record does not hold SPELP, so the tests observe it through the instruction after the handler returns, which raises a software-check exception exactly when ELP was restored to LP_EXPECTED. The number of traps is recorded after each case. The Zicfilp_S tests also run in VS-mode and in VU-mode, where henvcfg.LPE and senvcfg.LPE are the landing pad enables. Their traps are taken in HS-mode, which saves ELP in sstatus.SPELP.
| Coverpoint | Goal | Feature Description | Expectation | Bins | Normative Rule |
|---|---|---|---|---|---|
cp_zicfilp_indirect_elp_state_update |
Re-run the common Zicfilp coverpoints and the S-mode trap entry coverpoints in VS-mode and VU-mode |
The coverpoints described in the Zicfilp Common Coverpoints table, and the trap entry coverpoints of the Zicfilp_S sheet, executed in VS-mode and in VU-mode. |
As in the Common table and the Zicfilp_S sheet, with the trap taken in HS-mode. |
priv_mode {VS, VU} x (the bins of each re-run coverpoint) |
cfi_call_term |
cp_vs_lpe |
henvcfg.LPE, not menvcfg.LPE, enables landing pads in VS-mode |
For each value of henvcfg.LPE and menvcfg.LPE, in VS-mode, with x7[31:12] holding the expected label: |
Software-check exception (cause 18), taken in HS-mode, exactly when henvcfg.LPE = 1, whatever menvcfg.LPE holds. With henvcfg.LPE = 0, ELP stays NO_LP_EXPECTED and the LPAD executes as a no-op. |
priv_mode VS x henvcfg.LPE {0, 1} x menvcfg.LPE {0, 1} x {jalr, c.jr, c.jalr} x target {not_lpad, lpad_mismatch} |
henvcfg_lpe_op |
cp_vu_lpe |
senvcfg.LPE, not henvcfg.LPE, enables landing pads in VU-mode |
For each value of senvcfg.LPE and henvcfg.LPE, in VU-mode, with x7[31:12] holding the expected label: |
Software-check exception (cause 18), taken in HS-mode, exactly when senvcfg.LPE = 1, whatever henvcfg.LPE holds. With senvcfg.LPE = 0, ELP stays NO_LP_EXPECTED and the LPAD executes as a no-op. |
priv_mode VU x senvcfg.LPE {0, 1} x henvcfg.LPE {0, 1} x {jalr, c.jr, c.jalr} x target {not_lpad, lpad_mismatch} |
senvcfg_lpe_Zicfilp |
cp_trap_entry_spelp |
A trap from VS-mode or VU-mode saves ELP in vsstatus.SPELP when taken in VS-mode and in sstatus.SPELP when taken in HS-mode |
henvcfg.LPE = senvcfg.LPE = 1. Trap into VS-mode (hedeleg[3] = hedeleg[18] = 1) or into HS-mode (hedeleg = 0), from VS-mode and from VU-mode: |
The trap saves ELP in the SPELP of the handler’s mode and the handler’s SRET restores it. After an LP_EXPECTED trap the next non-LPAD instruction traps again before the LPAD that resumes the test; after a NO_LP_EXPECTED trap the instruction after the ebreak does not trap. |
priv_mode {VS, VU} x LPE of the mode enabled x ELP {lp_expected, no_lp_expected} x handler {HS, VS} |
Zicfilp_forward_traps |
cp_vs_sret_spelp |
SRET executed in VS-mode restores ELP from vsstatus.SPELP and clears it |
For each value of henvcfg.LPE, senvcfg.LPE and SPELP, and a return to VS-mode or VU-mode: HS-mode sets sstatus.SPELP to the opposite of SPELP. In VS-mode, write vsstatus.SPP and vsstatus.SPELP through sstatus, set sepc to a non-LPAD instruction and execute sret. |
Software-check exception exactly when vsstatus.SPELP = 1 and the LPE of the new mode (henvcfg.LPE for VS-mode, senvcfg.LPE for VU-mode) is 1. After the SRET, vsstatus.SPELP reads 0, read as sstatus in VS-mode and through T-SBI in VU-mode. |
priv_mode VS x sret x new mode {VU, VS} x henvcfg.LPE {0, 1} x senvcfg.LPE {0, 1} x vsstatus.SPELP {0, 1} |
vsstatus_spelp_exists |
cp_hs_sret_spelp |
SRET executed in HS-mode into VS-mode or VU-mode restores ELP from sstatus.SPELP, not vsstatus.SPELP |
For each value of henvcfg.LPE, senvcfg.LPE and sstatus.SPELP, and a return to VS-mode or VU-mode: in HS-mode set hstatus.SPV = 1, sstatus.SPP for the new mode, sstatus.SPELP, and vsstatus.SPELP to the opposite value, set sepc to a non-LPAD instruction and execute sret. |
Software-check exception exactly when sstatus.SPELP = 1 and the LPE of the new mode (henvcfg.LPE for VS-mode, senvcfg.LPE for VU-mode) is 1. Back in HS-mode, vsstatus.SPELP is unchanged. |
priv_mode HS x sret x new mode {VU, VS} x henvcfg.LPE {0, 1} x senvcfg.LPE {0, 1} x sstatus.SPELP {0, 1} x vsstatus.SPELP differs |
Zicfilp_pelp_trap_return |
cp_vs_sstatus_spelp |
sstatus.SPELP accessed in VS-mode is vsstatus.SPELP |
In VS-mode, set and then clear sstatus.SPELP with csrrs and csrrc, and read sstatus back. After each write, HS-mode reads vsstatus.SPELP. |
sstatus.SPELP read in VS-mode and vsstatus.SPELP read in HS-mode both hold the value VS-mode wrote. |
priv_mode VS x {csrrs, csrrc} sstatus x rs1 bit 23 (SPELP) set |
sstatus_spelp |
cp_hs_sret_to_hs_spelp |
SRET from HS-mode to HS-mode restores ELP from sstatus.SPELP and clears it, leaving vsstatus.SPELP alone |
For each value of menvcfg.LPE and sstatus.SPELP: in HS-mode set hstatus.SPV = 0, sstatus.SPP = 1, sstatus.SPELP, and vsstatus.SPELP to the opposite value, set sepc to a non-LPAD instruction and execute sret. |
Software-check exception exactly when sstatus.SPELP = 1 and menvcfg.LPE = 1. After the SRET, sstatus.SPELP reads 0 and vsstatus.SPELP is unchanged. |
priv_mode HS x sret x new mode HS x menvcfg.LPE {0, 1} x sstatus.SPELP {0, 1} x vsstatus.SPELP differs |
Zicfilp_pelp_trap_return |
cp_elp_async_interrupt |
An interrupt taken after an SRET that set ELP = LP_EXPECTED, before the target is decoded, saves SPELP = LP_EXPECTED |
henvcfg.LPE = senvcfg.LPE = 1, sstatus.SIE = 0. In HS-mode raise a VS-level software interrupt (hvip.VSSIP = 1, hie.VSSIE = 1), with hideleg.VSSI = 0 so it is taken in HS-mode, or hideleg.VSSI = 1 and vsstatus.SIE = 1 so it is taken in VS-mode. SRET with sstatus.SPELP = 1 to a non-LPAD instruction in VS-mode or VU-mode. |
The interrupt is taken right after the SRET and saves SPELP = LP_EXPECTED in sstatus or vsstatus. The handler’s SRET restores ELP, so the non-LPAD target then raises a software-check exception, taken in HS-mode. Two traps in all. |
priv_mode HS x sret x new mode {VU, VS} x sstatus.SPELP = 1 x LPE of the new mode = 1 x interrupt taken in {HS, VS} |
Zicfilp_forward_traps |
cp_vs_trap_delivery |
A software-check exception delegated to VS-mode reports its cause in vscause and vstval and saves ELP in vsstatus.SPELP |
hedeleg[18] = 1, with henvcfg.LPE = 1 in VS-mode or senvcfg.LPE = 1 in VU-mode, and x7[31:12] holding the expected label. From VS-mode and VU-mode, jalr, c.jr and c.jalr (Zca) through a register other than x1, x5 and x7 to a non-LPAD instruction, and to an LPAD whose nonzero label does not match x7[31:12]. Record the trap count after each case. |
Software-check exception taken in VS-mode with vscause = 18, vstval = 2 when the hart reports the landing pad fault code in stval and 0 otherwise, and vsstatus.SPELP = LP_EXPECTED. The VS-mode handler’s SRET restores ELP, so the next non-LPAD instruction traps again before the LPAD. |
priv_mode {VS, VU} x LPE of the mode enabled x {jalr, c.jr, c.jalr} x target {not_lpad, lpad_mismatch} x vscause software check x vstval x vsstatus.SPELP = 1 |
lpad_sw_exception |
Zicfilp_SmH Machine-Mode Hypervisor Landing Pads
Zicfilp_SmH boots to M-mode with medeleg[3] = medeleg[18] = 0, so breakpoints and software-check exceptions from VS-mode and VU-mode are taken in M-mode. The number of traps is recorded after each case. Traps taken in HS-mode are in Zicfilp_H.
| Coverpoint | Goal | Feature Description | Expectation | Bins | Normative Rule |
|---|---|---|---|---|---|
cp_trap_mpelp_virt |
A trap from VS-mode or VU-mode into M-mode saves ELP in MPELP |
medeleg[3] = medeleg[18] = 0. With henvcfg.LPE = 1 in VS-mode or senvcfg.LPE = 1 in VU-mode: |
The trap saves ELP in MPELP and sets MPV. The handler’s mret restores ELP, so after the LP_EXPECTED trap the next non-LPAD instruction traps again before the LPAD; after the ebreak the next instruction does not trap. |
priv_mode {VS, VU} x LPE of the mode enabled x ELP {lp_expected, no_lp_expected} |
Zicfilp_pelp_trap |
cp_mret_mpelp_virt |
mret to VS-mode or VU-mode restores ELP from MPELP using the landing pad enable of the new mode |
For each value of henvcfg.LPE, senvcfg.LPE and MPELP: execute mret with MPV = 1 and MPP = S (VS-mode) or U (VU-mode) to a non-LPAD instruction. menvcfg.LPE holds the opposite of the new mode’s enable. Record the trap count afterwards. |
Software-check exception, taken in M-mode, exactly when MPELP = 1 and the new mode’s enable (henvcfg.LPE for VS-mode, senvcfg.LPE for VU-mode) is 1. |
priv_mode M x mret x new mode {VU, VS} x henvcfg.LPE {0, 1} x senvcfg.LPE {0, 1} x MPELP {0, 1} |
Zicfilp_pelp_trap_return |
cp_vs_sstatus_spelp_mstatus |
A VS-mode write to sstatus.SPELP writes vsstatus.SPELP and leaves mstatus.SPELP unchanged |
medeleg[10] = 0. For each value of mstatus.SPELP, set vsstatus.SPELP to the opposite of the write. In VS-mode, csrrs or csrrc sstatus with the SPELP bit, then read sstatus. In M-mode, read mstatus.SPELP and vsstatus.SPELP. |
sstatus in VS-mode and vsstatus hold the written value. mstatus.SPELP is unchanged. |
priv_mode VS x {csrrs, csrrc} x mstatus.SPELP {0, 1} |
sstatus_spelp |
| Normative Rule | Rule Text | Coverpoints |
|---|---|---|
cfi_call_term |
{Zicfilp_Sm_cg,Zicfilp_S_cg,Zicfilp_U_cg,Zicfilp_H_cg}/{cp_zicfilp_indirect_elp_state_update,cp_zicfilp_indirect_elp_state_update_c} (jalr with rd=x1, c.jalr), {Zicfilp_Sm_cg,Zicfilp_S_cg,Zicfilp_U_cg,Zicfilp_H_cg}/cp_zicfilp_direct_ct_no_elp (jal with rd=x1, c.jal: direct calls) |
|
cfi_return_term |
{Zicfilp_Sm_cg,Zicfilp_S_cg,Zicfilp_U_cg,Zicfilp_H_cg}/{cp_zicfilp_indirect_elp_state_update,cp_zicfilp_indirect_elp_state_update_c} (jalr with rd=x0, c.jr) |
|
cfi_indirect_jump_term |
{Zicfilp_Sm_cg,Zicfilp_S_cg,Zicfilp_U_cg,Zicfilp_H_cg}/{cp_zicfilp_indirect_elp_state_update,cp_zicfilp_indirect_elp_state_update_c} (jalr with rd=x0, c.jr) |
|
Zicfilp_lpad_enc |
The LPAD instruction (See LP_INST) is encoded using the AUIPC major opcode with rd=x0. |
{Zicfilp_Sm_cg,Zicfilp_S_cg,Zicfilp_U_cg,Zicfilp_H_cg}/cp_zicfilp_lpad_valid_execution |
Zicfilp_lpad_imm_enc |
{Zicfilp_Sm_cg,Zicfilp_S_cg,Zicfilp_U_cg,Zicfilp_H_cg}/{cp_zicfilp_lpad_zero_label_bypass,cp_zicfilp_lpad_valid_execution} |
|
Zicfilp_lpad_expected |
{Zicfilp_Sm_cg,Zicfilp_S_cg,Zicfilp_U_cg,Zicfilp_H_cg}/{cp_zicfilp_indirect_elp_state_update,cp_zicfilp_indirect_elp_state_update_c}, {Zicfilp_Sm_cg,Zicfilp_S_cg,Zicfilp_U_cg,Zicfilp_H_cg}/cp_zicfilp_direct_ct_no_elp (direct jumps and taken branches do not set ELP) |
|
Zicfilp_indirect_branch_lpad |
{Zicfilp_Sm_cg,Zicfilp_S_cg,Zicfilp_U_cg,Zicfilp_H_cg}/{cp_zicfilp_indirect_elp_state_update,cp_zicfilp_indirect_elp_state_update_c} (rs1 = x1, x5, x7 bins), Zicfilp_Sm_cg/{cp_pelp_trap_entry_guarded_zicfilp,cp_pelp_trap_entry_guarded_zicfilp_c} |
|
Zicfilp_lpad_label |
{Zicfilp_Sm_cg,Zicfilp_S_cg,Zicfilp_U_cg,Zicfilp_H_cg}/{cp_zicfilp_lpad_label_match_mismatch,cp_zicfilp_lpad_valid_execution} |
|
Zicfilp_elp_lpad_expected |
{Zicfilp_Sm_cg,Zicfilp_S_cg,Zicfilp_U_cg,Zicfilp_H_cg}/{cp_zicfilp_lpad_valid_execution,cp_zicfilp_lpad_missing_instruction_exception,cp_zicfilp_lpad_label_mismatch,cp_lpad_no_sw_exception_elp_clear_zicfilp,cp_lpad_nop_no_lp_expected_zicfilp}, {Zicfilp_Sm_cg,Zicfilp_S_cg,Zicfilp_U_cg,Zicfilp_H_cg}/cp_lpad_alignment_exception_zicfilp (Zca only: without Zca a target that is not 4-byte aligned raises an instruction-address-misaligned exception first) |
|
Zicfilp_lpad_enabled_instr_allowed |
{Zicfilp_Sm_cg,Zicfilp_S_cg,Zicfilp_U_cg,Zicfilp_H_cg}/{cp_zicfilp_lpad_missing_instruction_exception,cp_disabled_zicfilp} |
|
Zicfilp_lpad_enabled_exception |
{Zicfilp_Sm_cg,Zicfilp_S_cg,Zicfilp_U_cg,Zicfilp_H_cg}/cp_zicfilp_lpad_label_exception_delivery, {Zicfilp_Sm_cg,Zicfilp_S_cg,Zicfilp_U_cg,Zicfilp_H_cg}/cp_lpad_alignment_exception_zicfilp (Zca only) |
|
Zicfilp_lpad_alignment_exception |
{Zicfilp_Sm_cg,Zicfilp_S_cg,Zicfilp_U_cg,Zicfilp_H_cg}/cp_lpad_alignment_exception_zicfilp (Zca only) |
|
Zicfilp_lpad_label_exception |
{Zicfilp_Sm_cg,Zicfilp_S_cg,Zicfilp_U_cg,Zicfilp_H_cg}/{cp_zicfilp_lpad_label_mismatch,cp_zicfilp_lpad_label_exception_delivery} |
|
Zicfilp_lpad_no_sw_exception |
If a software-check exception is not caused then the |
{Zicfilp_Sm_cg,Zicfilp_S_cg,Zicfilp_U_cg,Zicfilp_H_cg}/{cp_lpad_no_sw_exception_elp_clear_zicfilp,cp_lpad_nop_no_lp_expected_zicfilp} |
Zicfilp_forward_traps |
{Zicfilp_Sm_cg,Zicfilp_S_cg,Zicfilp_U_cg,Zicfilp_H_cg}/cp_exception_priority_zicfilp (instruction access fault), Zicfilp_Sm_cg/cp_elp_async_interrupt_zicfilp, Zicfilp_H_cg/{cp_elp_async_interrupt,cp_trap_entry_spelp} (to HS-mode and VS-mode) |
|
Zicfilp_forward_trap_async_interrupt |
Zicfilp_Sm_cg/cp_elp_async_interrupt_zicfilp (S-mode software interrupt taken right after an MRET that set ELP), Zicfilp_H_cg/cp_elp_async_interrupt (VS-level software interrupt taken in HS-mode or VS-mode right after an SRET that set ELP) |
|
Zicfilp_forward_trap_async_exception |
{Zicfilp_Sm_cg,Zicfilp_S_cg,Zicfilp_U_cg,Zicfilp_H_cg}/cp_exception_priority_zicfilp (instruction access fault) |
|
Zicfilp_exception_priority |
{Zicfilp_Sm_cg,Zicfilp_S_cg,Zicfilp_U_cg,Zicfilp_H_cg}/cp_exception_priority_zicfilp (instruction access fault and illegal instruction bins) |
|
lpad_sw_exception |
{Zicfilp_Sm_cg,Zicfilp_S_cg,Zicfilp_U_cg,Zicfilp_H_cg}/{cp_zicfilp_lpad_missing_instruction_exception,cp_zicfilp_lpad_label_exception_delivery}, Zicfilp_Sm_cg/cp_elp_state_preservation_zicfilp (from S/U-mode to M-mode), Zicfilp_S_cg/cp_elp_state_preservation_zicfilp (from U-mode to S-mode), Zicfilp_H_cg/{cp_trap_entry_spelp,cp_vs_trap_delivery} (from VS-mode and VU-mode to HS-mode and VS-mode) |
|
cfi_mstatus_spelp_op |
Zicfilp_S_cg/{cp_pelp_trap_entry_zicfilp,cp_elp_state_preservation_zicfilp,cp_pelp_trap_return_zicfilp}, {Zicfilp_S_cg,Zicfilp_U_cg,Zicfilp_H_cg}/{cp_zicfilp_lpad_label_exception_delivery,cp_exception_priority_zicfilp} |
|
cfi_sstatus_spelp_op |
The |
{Zicfilp_S_cg,Zicfilp_U_cg,Zicfilp_H_cg}/cp_zicfilp_lpad_label_exception_delivery, Zicfilp_S_cg/{cp_pelp_trap_entry_zicfilp,cp_elp_state_preservation_zicfilp,cp_pelp_trap_return_zicfilp} |
vsstatus_spelp_exists |
Zicfilp_H_cg/{cp_trap_entry_spelp, cp_vs_sret_spelp, cp_vs_trap_delivery} |
|
dcsr_pelp_op |
Debug Mode: belongs to the Sdext testplan |
|
Zicfilp_pelp_debug_mode |
Debug Mode: belongs to the Sdext testplan |
|
Zicfilp_pelp_trap |
Zicfilp_Sm_cg/{cp_pelp_trap_entry_zicfilp,cp_pelp_trap_entry_guarded_zicfilp,cp_pelp_trap_entry_guarded_zicfilp_c,cp_elp_state_preservation_zicfilp}, Zicfilp_S_cg/{cp_pelp_trap_entry_zicfilp,cp_pelp_trap_entry_guarded_zicfilp,cp_pelp_trap_entry_guarded_zicfilp_c,cp_elp_state_preservation_zicfilp}, {Zicfilp_Sm_cg,Zicfilp_S_cg,Zicfilp_U_cg,Zicfilp_H_cg}/{cp_zicfilp_lpad_label_exception_delivery,cp_exception_priority_zicfilp}, Zicfilp_H_cg/cp_trap_entry_spelp (traps into VS-mode and HS-mode from VS-mode and VU-mode), Zicfilp_SmH_cg/cp_trap_mpelp_virt (traps into M-mode from VS-mode and VU-mode), Zicfilp_H_cg/{cp_pelp_trap_entry_zicfilp,cp_pelp_trap_entry_guarded_zicfilp,cp_pelp_trap_entry_guarded_zicfilp_c,cp_elp_async_interrupt,cp_vs_trap_delivery} |
|
Zicfilp_pelp_trap_return |
Zicfilp_Sm_cg/cp_pelp_trap_return_zicfilp (MRET), Zicfilp_S_cg/cp_pelp_trap_return_zicfilp (SRET), xPELP=NO_LP_EXPECTED after an xRET to the same mode is checked in the signature, Zicfilp_H_cg/{cp_vs_sret_spelp, cp_hs_sret_spelp} (SRET into VS-mode and VU-mode), Zicfilp_H_cg/cp_hs_sret_to_hs_spelp (SRET from HS-mode to HS-mode leaves vsstatus.SPELP alone), Zicfilp_SmH_cg/cp_mret_mpelp_virt (MRET into VS-mode and VU-mode) |
|
mstatus_spelp_mpelp_op |
{Zicfilp_S_cg,Zicfilp_U_cg,Zicfilp_H_cg}/{cp_zicfilp_lpad_label_exception_delivery,cp_exception_priority_zicfilp}, Zicfilp_S_cg/{cp_pelp_trap_entry_zicfilp,cp_elp_state_preservation_zicfilp,cp_pelp_trap_return_zicfilp}, Zicfilp_Sm_cg/{cp_zicfilp_lpad_label_exception_delivery,cp_pelp_trap_entry_zicfilp,cp_elp_state_preservation_zicfilp,cp_pelp_trap_return_zicfilp} |
|
cfi_mstatus_mpelp_op |
Zicfilp_Sm_cg/{cp_zicfilp_lpad_label_exception_delivery,cp_pelp_trap_entry_zicfilp,cp_elp_state_preservation_zicfilp,cp_pelp_trap_return_zicfilp}, Zicfilp_SmH_cg/{cp_trap_mpelp_virt,cp_mret_mpelp_virt} (MPELP with MPV = 1) |
|
mstatus_spelp_mpelp_enc_lead_in |
Zicfilp_Sm_cg/{cp_pelp_trap_entry_zicfilp,cp_elp_state_preservation_zicfilp}, Zicfilp_S_cg/{cp_pelp_trap_entry_zicfilp,cp_pelp_trap_return_zicfilp}, {Zicfilp_S_cg,Zicfilp_U_cg}/cp_zicfilp_lpad_label_exception_delivery |
|
mstatus_spelp_mpelp_enc_list |
Zicfilp_Sm_cg/{cp_pelp_trap_entry_zicfilp,cp_elp_state_preservation_zicfilp}, Zicfilp_S_cg/{cp_pelp_trap_entry_zicfilp,cp_pelp_trap_return_zicfilp}, {Zicfilp_S_cg,Zicfilp_U_cg}/cp_zicfilp_lpad_label_exception_delivery |
|
menvcfg_lpe_op_lead_in |
Zicfilp_S_cg/{cp_zicfilp_indirect_elp_state_update,cp_zicfilp_indirect_elp_state_update_c,cp_disabled_zicfilp}, Zicfilp_U_cg/{cp_zicfilp_indirect_elp_state_update,cp_zicfilp_indirect_elp_state_update_c,cp_disabled_zicfilp} (S-mode not implemented) |
|
menvcfg_lpe_op_list |
Zicfilp_S_cg/{cp_zicfilp_indirect_elp_state_update,cp_zicfilp_indirect_elp_state_update_c,cp_disabled_zicfilp}, Zicfilp_U_cg/{cp_zicfilp_indirect_elp_state_update,cp_zicfilp_indirect_elp_state_update_c,cp_disabled_zicfilp} (S-mode not implemented) |
|
mseccfg_mlpe_presence |
Zicfilp_Sm_cg/cp_zicfilp_indirect_elp_state_update |
|
mseccfg_mlpe_set_op |
When MLPE field is 1, Zicfilp extension is enabled in M-mode. |
Zicfilp_Sm_cg/{cp_zicfilp_indirect_elp_state_update,cp_zicfilp_indirect_elp_state_update_c} |
mseccfg_mlpe_clr_op_lead_in |
Zicfilp_Sm_cg/{cp_zicfilp_indirect_elp_state_update,cp_zicfilp_indirect_elp_state_update_c,cp_disabled_zicfilp} |
|
mseccfg_mlpe_clr_op_list |
Zicfilp_Sm_cg/{cp_zicfilp_indirect_elp_state_update,cp_zicfilp_indirect_elp_state_update_c,cp_disabled_zicfilp} |
|
mseccfg_mlpe_rst |
If the Zicfilp extension is implemented, the mseccfg.MLPE field is reset to 0. |
Reset values are not tested |
sstatus_spelp |
{Zicfilp_S_cg,Zicfilp_U_cg}/cp_zicfilp_lpad_label_exception_delivery (V=0), Zicfilp_S_cg/cp_pelp_trap_return_zicfilp (SPELP written through sstatus), Zicfilp_H_cg/{cp_vs_sstatus_spelp, cp_vs_sret_spelp} (V=1), Zicfilp_SmH_cg/cp_vs_sstatus_spelp_mstatus (V=1 leaves mstatus.SPELP unchanged) |
|
senvcfg_lpe_Zicfilp |
Zicfilp_U_cg/{cp_zicfilp_indirect_elp_state_update,cp_zicfilp_indirect_elp_state_update_c,cp_disabled_zicfilp}, Zicfilp_H_cg/cp_vu_lpe (VU-mode), Zicfilp_H_cg/{cp_zicfilp_indirect_elp_state_update,cp_zicfilp_indirect_elp_state_update_c,cp_disabled_zicfilp} (VU-mode) |
|
henvcfg_lpe_op |
Zicfilp_H_cg/{cp_vs_lpe, cp_vu_lpe}, Zicfilp_H_cg/{cp_zicfilp_indirect_elp_state_update,cp_zicfilp_indirect_elp_state_update_c,cp_disabled_zicfilp} (VS-mode) |
|
vsstatus_spelp_op |
Zicfilp_H_cg/{cp_trap_entry_spelp, cp_vs_sret_spelp, cp_hs_sret_spelp, cp_hs_sret_to_hs_spelp, cp_vs_sstatus_spelp}, Zicfilp_H_cg/{cp_elp_async_interrupt,cp_vs_trap_delivery} |
|
mtval_swchk_lead_in |
Zicfilp_Sm_cg/{cp_zicfilp_lpad_missing_instruction_exception,cp_zicfilp_lpad_label_mismatch,cp_zicfilp_lpad_label_exception_delivery} |
|
mtval_swchk_list |
Zicfilp_Sm_cg/{cp_zicfilp_lpad_missing_instruction_exception,cp_zicfilp_lpad_label_mismatch,cp_zicfilp_lpad_label_exception_delivery} |
|
stval_exception_info |
{Zicfilp_S_cg,Zicfilp_U_cg,Zicfilp_H_cg}/{cp_zicfilp_lpad_missing_instruction_exception,cp_zicfilp_lpad_label_mismatch,cp_zicfilp_lpad_label_exception_delivery}, Zicfilp_H_cg/cp_vs_trap_delivery (vstval) |
|
mnstatus_mnpelp_op |
Deferred: Smrnmi (RNMI) is not yet tested |
|
mnstatus_mnpelp_update |
When an RNMI trap is taken, MNPELP is set to ELP and ELP is set to 0. |
Deferred: Smrnmi (RNMI) is not yet tested |
mnret_Zicfilp |
Deferred: Smrnmi (RNMI) is not yet tested |
UDB Parameters: None.
B.10.13. Zicfiss Shadow Stack
In Privileged section because it has both unpriv and privileged behaviors. The Zicfiss suite has one group per privilege mode: Zicfiss_U, Zicfiss_S, Zicfiss_Sm and Zicfiss_H. Zicfiss_U holds the instruction-behavior coverpoints, which Zicfiss_S and Zicfiss_H re-run in their own modes; Zicfiss_S and Zicfiss_Sm add the supervisor and machine gating coverpoints. Zicfiss_H covers VS/VU-mode. Zicfiss_U also covers vector accesses to a shadow stack page when Zve32x is implemented. The Zicfiss_Sm tests require Sm, so they are not part of a certificate without Sm, such as RVA23.
No zicfiss setup have been defined yet.
Zicfiss_U User-Mode Shadow Stack
General Test Environment (applies to every coverpoint on this sheet — do not repeat per row): - Zicfiss, Zicsr, Zimop, Zaamo implemented. - Zcmop implemented unless stated (required for C.SSPUSH / C.SSPOPCHK); gate compressed variants with ZCA_SUPPORTED. - S-mode implemented (Zicfiss in U-mode requires it). - Enable chain: menvcfg.SSE=1 and senvcfg.SSE=1 unless the coverpoint states otherwise. - Virtual memory ON (satp.MODE != Bare); shadow stack lives on a page with pte.xwr=010 (R=0,W=1,X=0). - All tests on this sheet execute in U-mode (BOOT_TO_UMODE). - ssp is XLEN-aligned unless the coverpoint states otherwise. No higher-priority exception injected unless stated. - SSPUSH/SSPOPCHK are architecturally defined only for x1 and x5 (C.SSPUSH x1, C.SSPOPCHK x5). - XLEN is NOT iterated inside a coverpoint: RV32 and RV64 are separate build configs.
| Coverpoint | Goal | Feature Description | Expectation | Bins | Normative Rule |
|---|---|---|---|---|---|
cp_ssp_access |
Verify ssp CSR address, width, access type, and read-only-zero low bits |
Standard CSR access idiom on ssp (0x011): read original; write all-ones; write all-zeros; set all bits; clear all bits; write walking-ones; write walking-zeros; restore original. After each write, read back and check. |
CSR address 0x011 decodes to ssp and is URW-accessible from U-mode. |
csr_op {csrrw, csrrs, csrrc, csrrwi, csrrsi, csrrci} x write_pattern {all1, all0, walking1, walking0} x ssp[2:0] readback (vs reference model) |
Zicfiss_ssp_csr |
cp_sspush |
Verify shadow stack push: store to (ssp - XLEN/8), then decrement, for all three push encodings |
For each of SSPUSH x1 (mop.rr.7), SSPUSH x5 (mop.rr.7), C.SSPUSH x1 (c.mop.1, requires Zcmop/ZCA_SUPPORTED): |
No exception on valid execution. |
instr {SSPUSH x1, SSPUSH x5, C.SSPUSH x1} x pushed_value {all0, all1, pattern} x ssp_delta {-XLEN/8} |
ss_page_enc |
cp_sspopchk_match |
Verify successful shadow stack pop: XLEN load from ssp, value matches link register, ssp increments |
For each of SSPOPCHK x1 (mop.r.28), SSPOPCHK x5 (mop.r.28), C.SSPOPCHK x5 (c.mop.5): |
Value is loaded from the address in ssp with implicit base=ssp and implicit width=XLEN. |
instr {SSPOPCHK x1, SSPOPCHK x5, C.SSPOPCHK x5} x popped_value {all0, all1, pattern} x ssp_delta {+XLEN/8} |
ss_page_enc |
cp_sspopchk_mismatch |
Verify software-check exception when the popped value does not match the link register |
For each of SSPOPCHK x1, SSPOPCHK x5, C.SSPOPCHK x5: place value A on the shadow stack (directly, or via SSPUSH then corrupt the register, or via SSAMOSWAP to corrupt the memory copy), set the link register to B != A, execute the pop. |
Software-check exception raised: cause=18, xtval = shadow stack fault (code=3). |
instr {SSPOPCHK x1, SSPOPCHK x5, C.SSPOPCHK x5} x mismatch_source {reg_corrupted, mem_corrupted_via_ssamoswap} x mismatch_width {whole_word, bit0_only, bitXLEN-1_only} x {cause==18, xtval==3, ssp unchanged} |
Zicfiss_sspopchk_enc |
cp_sspopchk_fault_priority |
Verify a load/store/AMO access-fault on the pop takes priority over the software-check exception |
Point ssp at memory whose access will fault, and simultaneously set the link register so a value mismatch would also be detected. Execute SSPOPCHK. |
The memory fault is reported, not the software-check exception. |
fault_source {unmapped → cause 15, RVMODEL_ACCESS_FAULT_ADDRESS_STORE → cause 7} x mismatch_also_present {yes} x reported_cause {not 18} |
ss_fault_exception_code |
Call/return sequence (samples cp_sspush, cp_sspopchk_match and cp_sspopchk_mismatch) |
Verify the architectural non-leaf function prologue/epilogue round trip across nested call depth |
Build a nested call chain of non-leaf functions. In each prologue: store the link register to the regular stack and SSPUSH it to the shadow stack. In each epilogue: load the link register from the regular stack, SSPOPCHK it against the shadow stack, then return. Exercise x1 and x5 as the link register and depth > 1 so ssp walks several slots. |
Matched push/pop pairs at every depth: no exception, control returns correctly through the whole chain. |
link_reg {x1, x5} x return_addr {intact, subverted}. Call depth is exercised (1..3) but is not architecturally observable, so it is not a coverage axis. |
|
cp_ssrdp |
Verify SSRDP moves ssp into rd, and reads 0 when Zicfiss is inactive |
TC group 1: set ssp to a known value V, execute SSRDP rd, check rd == V. |
TC1/TC2: rd holds the current ssp; no exception. |
ssp_value {known V, after push, after pop} x xSSE {1, 0} x rd result {ssp, 0} |
Zicfiss_enc |
cp_ssamoswap |
Verify SSAMOSWAP.W / SSAMOSWAP.D atomic swap semantics including RV64 sign-extension and narrow store |
RV32: SSAMOSWAP.W rd, rs2, (rs1) on a 4-byte-aligned SS address. |
rd receives the value previously in memory; memory receives rs2. The pair is atomic. |
instr {SSAMOSWAP.W, SSAMOSWAP.D} x xlen_config {RV32, RV64} x loaded_msb {0, 1} x rs2_upper {zero, nonzero} x {aq,rl} {00, 01, 10, 11} x reg_edge {rd=x0, rs2=x0, rd==rs1, all distinct non-x0} |
rv32_ssamoswap-w_op |
cp_ss_address_alignment_ssp |
Verify alignment requirements for SSAMOSWAP (natural alignment) and for ssp (XLEN alignment) |
Leg A — SSAMOSWAP: sweep the low 3 bits of the rs1 address across all 8 values for SSAMOSWAP.W (RV32/RV64) and SSAMOSWAP.D (RV64). Compare behaviour against the reference model. |
Leg A: naturally aligned (W: addr[1:0]==00; D: addr[2:0]==000) completes normally. Otherwise the same exception options as A-extension AMOs apply — reported cause must match the reference model. |
leg {ssamoswap, ssp} x instr {SSAMOSWAP.W, SSAMOSWAP.D, SSPUSH x1, C.SSPUSH x1, SSPOPCHK x1, C.SSPOPCHK x5} x addr[2:0] {000..111} |
ssp_xlen_aligned |
cp_ss_instr_target_page |
Verify the fault type an SS instruction takes for every class of target page / translation state |
Cross every SS memory instruction against every class of target: SS page (xwr=010), read-only page (xwr=001), read-write page (xwr=011), execute page (xwr=100), unmapped page, and satp.MODE=Bare. Execute and capture the reported cause. |
SS page: succeeds. |
instr {SSPUSH x1, SSPUSH x5, C.SSPUSH x1, SSPOPCHK x1, SSPOPCHK x5, C.SSPOPCHK x5, SSAMOSWAP.W, SSAMOSWAP.D} x pte.xwr {000..111} x MXR {0,1} x pte.U {0,1} x translation {Sv, satp.MODE=Bare} x cause {none, 7, 15} |
ss_fault_exception_code |
cp_ss_page_access_store |
Verify which accessor types may touch an SS page and which fault |
With a page mapped as an SS page (xwr=010), attempt access from every accessor class: |
(a) succeeds — these are the only instructions permitted to write an SS page. |
accessor {ss_store, ordinary_store, ordinary_amo, lr_sc, amocas, cbo, ordinary_load, vector_load, vector_store} x MXR {0,1} x result {ok, af} |
ssmp_ss_page_access_fault |
cp_ss_page_fetch |
Verify an instruction fetch from an SS page raises an instruction access fault |
From U-mode with Zicfiss active, jump (jalr) to the shadow stack page (xwr=010, U=1). |
Implicit accesses, including instruction fetches, to an SS page are not permitted and raise the access fault for the access type [norm:ssmp_ss_implicit_access_fault]: an instruction access fault (scause=1), with stval = the target address. |
priv_mode {U} x jalr x target {SS page} x scause {1} |
ssmp_ss_implicit_access_fault |
cp_ssp_csr_gating_u |
Verify ssp CSR accessibility from U-mode across the menvcfg.SSE / senvcfg.SSE enable chain |
From U-mode, attempt both a read and a write of ssp for each reachable (menvcfg.SSE, senvcfg.SSE) combination: (1,1), (1,0) and (0,0). (0,1) is the same state as (0,0), because menvcfg.SSE=0 makes senvcfg.SSE read-only zero. |
(menvcfg.SSE=1, senvcfg.SSE=1): access allowed, correct value read/written. |
menvcfg.SSE {0,1} x senvcfg.SSE {0,1} (m0s1 illegal/unreachable) x csr_op {read, write} x result {ok, illegal_instruction} |
senvcfg_sse_Zicfiss |
cp_ss_instr_inactive_u |
Verify MOP-encoded SS instructions revert to Zimop/Zcmop no-op behaviour when Zicfiss is not active |
SCOPE: the MOP-encoded instructions only — SSPUSH x1, SSPUSH x5, C.SSPUSH x1, SSPOPCHK x1, SSPOPCHK x5, C.SSPOPCHK x5, SSRDP. SSAMOSWAP is NOT in this set: it is AMO-encoded and traps instead (see cp_ssamoswap_sse_gating). |
NO exception is raised — these revert to their Zimop/Zcmop-defined behaviour, which writes 0 to rd and has no other architectural effect. |
instr {SSPUSH x1, SSPUSH x5, C.SSPUSH x1, SSPOPCHK x1, SSPOPCHK x5, C.SSPOPCHK x5, SSRDP} x gate {menvcfg.SSE, senvcfg.SSE} = {00, 10, 11} x ssp_state {valid, misaligned, unmapped, value_mismatch} x {no trap, no memory access, ssp unchanged, rd==0 for SSRDP} |
senvcfg_sse_Zicfiss |
cp_ss_unused_mop_rr7_rs2 |
Verify the mop.rr.7, mop.r.28 and c.mop.n encodings that Zicfiss does not use stay Zimop/Zcmop while Zicfiss is active |
With Zicfiss active (menvcfg.SSE=1, and senvcfg.SSE=1 for U-mode), ssp at the top of an SS page, execute the encodings Zicfiss does not use. |
NO exception. rd is written with 0 (unchanged when rd=x0 or for c.mop). ssp is unchanged. Nothing is pushed or checked. |
field {rd, rs1, rs2} x register {x0..x31, minus the Zicfiss instructions}; c.mop {3, 7} x {no trap, no memory access, ssp unchanged, rd==0 when rd!=x0} |
|
cp_ss_page_access_store_misaligned |
Verify an ordinary store to an SS page raises a store/AMO access-fault at every address alignment |
With a page mapped as an SS page (xwr=010), execute SB, SH, SW and SD (RV64) at effective address bits [2:0] = 0..7. Most of these are misaligned. |
Every store raises a store/AMO access-fault (cause=7), including the misaligned ones: the SS page rule takes priority over address-misaligned. |
store {SB, SH, SW, SD} x addr[2:0] {0..7} x pte.xwr {010} |
ssmp_ss_page_access_fault |
cp_ssamoswap_sse_gating |
Verify SSAMOSWAP.W/D raises an illegal-instruction exception when the SSE enable chain is off (V=0) |
SSAMOSWAP is encoded in the AMO major opcode, NOT in the Zimop/Zcmop MOP space, so it does not silently no-op when Zicfiss is deactivated — it traps. Execute SSAMOSWAP.W and SSAMOSWAP.D against a valid aligned SS address for: |
(a), (b) illegal-instruction exception. |
instr {SSAMOSWAP.W, SSAMOSWAP.D} x gate {menvcfg.SSE=0, (menvcfg.SSE=1 & senvcfg.SSE=0)} x mode {U} x result {illegal_instruction} |
senvcfg_sse_Zicfiss |
cp_ss_page_crossing |
Verify shadow stack accesses that straddle a page boundary fault on the invalid side |
SSPUSH decrements ssp BEFORE storing, so a push with ssp at the very bottom of a page writes into the PRECEDING page. SSPOPCHK reads at ssp and then increments, so it reads from the page ssp is already on. |
The fault is determined by the page actually accessed, not by the page ssp names. |
case {A: ssp at page base, B: ssp on invalid page} x instr {SSPUSH x1, C.SSPUSH x1, SSPOPCHK x1, C.SSPOPCHK x5} x adjacent_page {unmapped, read_only, read_write} x cause {none, 7, 15} x ssp {unchanged, decremented} |
ss_push |
cp_ss_page_ad_bits |
Verify PTE Accessed/Dirty bit handling on a shadow stack page, including the write/read asymmetry |
Sweep all four {A, D} combinations on the shadow stack page’s leaf PTE and execute each SS instruction against it. |
A=0: every SS access faults, read or write, because the page has not been marked accessed. |
instr {SSPUSH x1, C.SSPUSH x1, SSAMOSWAP.W, SSAMOSWAP.D, SSPOPCHK x1, C.SSPOPCHK x5} x {A,D} {00, 01, 10, 11} x svadu {absent, ADUE=0, ADUE=1} x cause {none, 7, 15} |
|
cp_ss_non_idempotent |
Verify SS instructions fault when the shadow stack page is non-idempotent (Svpbmt) |
Requires Svpbmt. Map the shadow stack page with pte.PBMT = IO, which makes the memory non-idempotent, and execute each SS instruction that accesses memory against it. |
Every SS instruction that accesses non-idempotent memory raises a store/AMO access-fault (cause=7). |
instr {SSPUSH x1, C.SSPUSH x1, SSPOPCHK x1, C.SSPOPCHK x5, SSAMOSWAP.W, SSAMOSWAP.D} x pte.PBMT {PMA, NC, IO} x cause {none, 7} |
ssmp_ss_idempotent_memory |
Folded into cp_ss_instr_inactive_u (gate sweep) and cp_ssamoswap_sse_gating (the trapping half). Other privilege modes are the corresponding rows on the Zicfiss_S / Zicfiss_Sm / Zicfiss_H sheets. |
Test all Zifiss instructions with each combination of {menvcfg.SSE/senvcfg.SSE} = 0, 1 in every priv mode. Check all state is unaffected if xSSE=0. Some throw illegal or virtual instructions |
||||
PROMOTED to its own coverpoint: cp_ss_page_crossing. |
Test ssp pointing to the bottom of a page such that ssp-XLEN/8 is not on a valid shadow stack page, and also such that ssp is not on a valid shadow stack pages but ssp-XLEN/8 is valid. |
||||
Folded into cp_ss_instr_target_page: pte.xwr now sweeps all 8 encodings and is crossed with MXR = 0/1. |
For cp_ss_instr_target_page, test all 8 XWR with MXR=0/1. |
||||
Folded into cp_ssamoswap: {aq,rl} = 00/01/10/11 added as a bin axis. |
Exercise all 4 values of aq and rl in SSAMOSWP. |
||||
Folded into cp_ss_page_access as accessor leg (h), including strided/indexed accesses beginning on an adjacent page. |
If V supported, try V accesses to SS page, including scattered loads and stores starting on a different page. |
||||
Folded into cp_ss_page_access as accessor legs (f) and (g). Needs Zalrsc and Zacas in the suite’s required_extensions. |
LRSC and AMOCAS to SS page. |
||||
Folded into cp_ss_instr_target_page as a pte.U = 0/1 axis. |
Test U bit of shadow stack page = 0/1 |
||||
Folded into cp_ss_instr_inactive_u, and cp_ss_instr_inactive_m/_s on Zicfiss_Sm, as the STRONG FORM: the same instructions repeated with a misaligned, unmapped, or mismatching ssp. |
When xSSE, SSPUSH/SSPOPCHK must do no memory access and raise nothing even if ssp is misaligned, unmapped, or values mismatch. |
||||
PROMOTED to its own coverpoint: cp_ss_page_ad_bits, including the Svadu/ADUE variant. |
Test all combinations of A and D bits on the SS page, that fault occurs if D=0 for SSPUSH/SSAMOSWAP but not SSPOPCHK, if A=0 for all accesses. If Svadu supported, check no faults. |
||||
PROMOTED to its own coverpoint: cp_ss_non_idempotent. This also restores [norm:ssmp_ss_idempotent_memory], which had been written off as untestable. |
If Svpbmt is supported, test a page mapped to I/O that makes it non-idempotent and thus fault on SS instructions. |
||||
Folded into cp_ss_page_access: the ordinary-load leg (e) is now crossed with MXR = 0/1 and must succeed for both. |
Test ordinary load from SS page succeeds even though R=0, for both MXR=0/1. |
||||
Folded into cp_ssamoswap as a register-edge axis: rd=x0, rs2=x0, rd==rs1, and all-distinct. |
Consider testing SSAMOSWAP with rd, rs2 = x0/non x0 and rd==rs1 edges. |
Zicfiss_S Supervisor-Mode Shadow Stack
General Test Environment (S/HS-mode execution): - Same base environment as Zicfiss_U, but tests execute in S/HS-mode. menvcfg.SSE alone gates S/HS; senvcfg.SSE does NOT gate S/HS. - S-mode counterparts of the Zicfiss_U instruction-behaviour coverpoints (listed in the bookkeeping row below) run from S-mode; they are not duplicated as rows here. Only S-specific control behaviour is listed below.
| Coverpoint | Goal | Feature Description | Expectation | Bins | Normative Rule |
|---|---|---|---|---|---|
cp_ssp_csr_gating_s |
Verify ssp CSR accessibility from S/HS-mode depends only on menvcfg.SSE, not senvcfg.SSE |
From S/HS-mode attempt ssp read and write for each combination of (menvcfg.SSE, senvcfg.SSE). |
menvcfg.SSE=1: access allowed from S/HS for BOTH values of senvcfg.SSE — senvcfg.SSE gates U-mode only. |
menvcfg.SSE {0,1} x senvcfg.SSE {0,1} x csr_op {read, write} x result {ok, illegal_instruction} |
menvcfg_sse_op_lead_in |
cp_ssamoswap_sse_gating_s |
Verify SSAMOSWAP from S/HS-mode is illegal only when menvcfg.SSE=0, whatever senvcfg.SSE is |
From S/HS-mode, execute SSAMOSWAP.W and SSAMOSWAP.D (RV64) against the shadow stack page for each combination of (menvcfg.SSE, senvcfg.SSE). |
menvcfg.SSE=0: illegal-instruction exception; rd and memory are unchanged. |
priv_mode {S} x instr {SSAMOSWAP.W, SSAMOSWAP.D} x (menvcfg.SSE, senvcfg.SSE) {(0,0), (1,0), (1,1)} |
menvcfg_sse_op_list |
cp_ss_page_enc |
Verify the pte.xwr=010 encoding is recognised as an SS page, and is reserved when SSE is off |
With menvcfg.SSE=1 build a PTE with R=0, W=1, X=0 and use it as a shadow stack from S-mode (SSPUSH, plus ordinary loads and stores). |
menvcfg.SSE=1: the page is a valid SS page. SS stores succeed, ordinary loads succeed, no exception. |
menvcfg.SSE {0,1} x mode {S} x access {ss_store, ordinary_load, ordinary_store} x result {ok, access_fault, page_fault} |
ss_page_enc |
cp_ss_page_perm_priority |
Verify U, SUM and MXR permission checks on a shadow stack page, and that they outrank the SS access-fault rule |
The shadow stack page is R=0 and may be U=0 or U=1, so the ordinary permission machinery and the Zicfiss-specific rules can both apply to the same access. This coverpoint establishes which wins. |
The U/SUM/MXR permission check is part of address translation and therefore resolves BEFORE any Zicfiss-specific rule. Where the two disagree, the translation fault is reported: |
pte.U {0,1} x sstatus.SUM {0,1} x sstatus.MXR {0,1} x accessor {SS instr, ordinary load, ordinary store} x cause {none, page-fault from U/SUM, 7, 15} x priority {translation check wins} |
|
cp_ss_unused_mop_rr7_rs2_s |
Verify the mop.rr.7, mop.r.28 and c.mop.n encodings that Zicfiss does not use stay Zimop/Zcmop while Zicfiss is active |
With Zicfiss active (menvcfg.SSE=1), ssp at the top of an SS page, execute the encodings Zicfiss does not use. |
NO exception. rd is written with 0 (unchanged when rd=x0 or for c.mop). ssp is unchanged. Nothing is pushed or checked. |
field {rd, rs1, rs2} x register {x0..x31, minus the Zicfiss instructions}; c.mop {3, 7} x {no trap, no memory access, ssp unchanged, rd==0 when rd!=x0} |
|
cp_ss_page_access_store_misaligned_s |
Verify an ordinary store to an SS page raises a store/AMO access-fault at every address alignment |
With a page mapped as an SS page (xwr=010), execute SB, SH, SW and SD (RV64) at effective address bits [2:0] = 0..7. Most of these are misaligned. |
Every store raises a store/AMO access-fault (cause=7), including the misaligned ones: the SS page rule takes priority over address-misaligned. |
store {SB, SH, SW, SD} x addr[2:0] {0..7} x pte.xwr {010} |
ssmp_ss_page_access_fault |
cp_senvcfg_sse_rdonly0_s |
Verify senvcfg.SSE reads back 0 from S-mode whenever menvcfg.SSE is 0 |
Direct observation of the read-only-zero rule from the mode that owns senvcfg, rather than inferring it from an ssp access. |
menvcfg.SSE=0: senvcfg.SSE reads back 0 after every write attempt. No exception is raised — SSE is a WARL field, so the write is discarded rather than rejected. |
menvcfg.SSE {0,1} x csr_op {csrw, csrs, csrrw} x written {0,1} x senvcfg.SSE readback {0 when menvcfg.SSE=0, written when menvcfg.SSE=1} |
menvcfg_sse_rdonly0 |
cp_ss_non_idempotent_s |
Verify S-mode SS instructions fault when the shadow stack page is non-idempotent (Svpbmt), across menvcfg.PBMTE |
The S-mode counterpart of cp_ss_non_idempotent, with menvcfg.PBMTE added as an axis. Requires Svpbmt (RV64 only). |
PBMTE=1, PBMT=IO: the memory is non-idempotent, so every SS instruction raises a store/AMO access-fault (cause=7) with stval = the faulting VA (ssp-XLEN/8 for a push, ssp for a pop, rs1 for SSAMOSWAP). ssp, rd and memory are unchanged. |
priv_mode {S} x instr {SSPUSH x1, SSPUSH x5, C.SSPUSH x1, SSPOPCHK x1, SSPOPCHK x5, C.SSPOPCHK x5, SSAMOSWAP.W, SSAMOSWAP.D} x pte.PBMT {PMA, NC, IO} x menvcfg.PBMTE {0, 1} |
ssmp_ss_idempotent_memory |
cp_sspush_s |
Re-run the Zicfiss_U coverpoints with the hart booted in S-mode instead of U-mode |
BOOKKEEPING ROW, not a new coverpoint. These 8 Zicfiss_U coverpoints are re-run from S-mode, sampled into Zicfiss_S_cg under the S-mode name in parentheses: |
Identical architectural results to the U-mode runs — SS instruction behaviour does not depend on S vs U, only the enable chain does. |
priv_mode {s} x (all bins of each reused coverpoint) |
Zicfiss_sspush_enc |
PROMOTED to its own coverpoint: cp_ss_page_perm_priority, including the explicit priority claim that the translation-level U/SUM/MXR check resolves before any Zicfiss-specific rule. |
Test U, SUM, MXR bits of shadow stack page, including that these have priority over the SS access fault rule. |
||||
PROMOTED to its own coverpoint: cp_senvcfg_sse_rdonly0_s — writes senvcfg.SSE from S-mode and reads back 0 while menvcfg.SSE=0. The M-mode counterpart is cp_envcfg_sse_rdonly0_senvcfg on Zicfiss_Sm. |
Write m0s1 to xenvcfg.SSE and read back and make sure s shows up 0. |
Zicfiss_Sm Machine-Mode Shadow Stack
| Coverpoint | Goal | Feature Description | Expectation | Bins | Normative Rule |
|---|---|---|---|---|---|
General Test Environment (M-mode control plane): |
|||||
cp_ssamoswap_mmode_fault |
Verify SSAMOSWAP.W/.D always raises a store/AMO access-fault when the effective privilege mode is M |
Execute SSAMOSWAP.W and SSAMOSWAP.D from M-mode against a valid, aligned, writable SS page. Repeat with menvcfg.SSE=1 and menvcfg.SSE=0, and with satp.MODE both Bare and non-Bare, to confirm the fault is unconditional. |
Store/AMO access-fault raised whenever the EFFECTIVE privilege mode is M, independent of menvcfg.SSE, satp.MODE and MPRV with MPP=M. |
instr {SSAMOSWAP.W, SSAMOSWAP.D} x menvcfg.SSE {0,1} x satp.MODE {Bare, Sv} x {MPRV=0, MPRV=1 with MPP=M} |
ssmp_ssamoswap |
cp_ssamoswap_mprv_s |
Verify SSAMOSWAP from M-mode with MPRV=1, MPP=S follows the S-mode rules, with and without translation |
With menvcfg.SSE=1, set mstatus.MPRV=1 and MPP=S in M-mode and execute SSAMOSWAP.W and SSAMOSWAP.D (RV64): |
The effective privilege mode is S, so [norm:ssmp_ssamoswap] does not apply and SSAMOSWAP is not gated by xSSE (the hart is in M-mode). |
priv_mode {M} x instr {SSAMOSWAP.W, SSAMOSWAP.D} x {mstatus.MPRV=1, MPP=S} x satp.MODE {Bare, Sv} |
satp_mode_bare |
cp_ssamoswap_mprv_non_idempotent |
Verify SSAMOSWAP from M-mode with MPRV=1, MPP=S follows the S-mode non-idempotent memory rule (Svpbmt) |
SSAMOSWAP is not gated by xSSE in M-mode, and with mstatus.MPRV=1 and MPP=S its access is translated as an S-mode access, so Svpbmt applies to it although the hart runs in M-mode. Requires Svpbmt (RV64 only). |
The effective privilege mode is S, so [norm:ssmp_ssamoswap] does not apply and the S-mode shadow stack rules do. |
priv_mode {M} x instr {SSAMOSWAP.W, SSAMOSWAP.D} x {mstatus.MPRV=1, MPP=S} x pte.xwr {010} x pte.PBMT {PMA, IO} |
ssmp_ss_idempotent_memory |
cp_menvcfg_sse_gating |
Verify menvcfg.SSE is the top of the enable chain for both ssp CSR access and the SS page encoding |
From M-mode set menvcfg.SSE=0, then: |
menvcfg.SSE=0: ssp CSR access from any mode < M raises an illegal-instruction exception, regardless of senvcfg/henvcfg. |
mode {M, S/HS} x menvcfg.SSE {0,1} x csr_op {csrrw, csrrs, csrrc, csrrwi, csrrsi, csrrci} x target {ssp read, ssp write} x result {ok at M always, ok at S iff menvcfg.SSE=1, illegal_instruction}; mode {S, U} x (menvcfg.SSE, senvcfg.SSE) {(0,0), (1,0), (1,1)} x access {ordinary load, ordinary store} on xwr=010 x result {ok, access_fault, page_fault} |
menvcfg_sse_op_lead_in |
cp_envcfg_sse_rdonly0_senvcfg |
Verify the SSE enable chain forces the lower-level SSE fields to read-only zero |
Leg A: from M-mode set menvcfg.SSE=0, then attempt to write 1 to senvcfg.SSE (from S-mode) and to henvcfg.SSE (from HS-mode). Read both back. |
Leg A: with menvcfg.SSE=0, both henvcfg.SSE and senvcfg.SSE are read-only zero — the write is discarded and the field reads 0. No exception: these are WARL fields, not an illegal access. |
parent {menvcfg.SSE, henvcfg.SSE} x child {senvcfg.SSE, henvcfg.SSE} x parent_val {0,1} x written {0,1} x readback {0, written} |
menvcfg_sse_rdonly0 |
cp_ss_pmp_permissions |
Verify PMP permission requirements for shadow stack instructions, and that a PMP fault outranks the software-check exception |
Reprogram PMP entry 0 to cover the shadow stack page and entry 1 to grant RWX over all memory (the lowest matching entry wins), then drop to S-mode and execute each SS instruction against the page. |
Leg A: shadow stack instructions require PMP READ-WRITE permission on the accessed memory. Anything less raises a store/AMO access-fault (cause=7). |
instr {SSPUSH x1, C.SSPUSH x1, SSPOPCHK x1, C.SSPOPCHK x5, SSAMOSWAP.W, SSAMOSWAP.D} x pmp0cfg {--, R-, -W, RW} x mismatch_also_present {no, yes} x reported_cause {none, 7, not 18} |
ss_fault_exception_code |
cp_ss_satp_bare |
Verify that SS instructions below M-mode raise a store/AMO access fault when satp.MODE=Bare |
From M-mode set satp=0 (Bare), menvcfg.SSE=1 and senvcfg.SSE=1, and point ssp at the SS page. Drop to S-mode, then to U-mode, and in each execute every SS memory instruction: SSPUSH x1, SSPUSH x5, C.SSPUSH x1, SSPOPCHK x1, SSPOPCHK x5, C.SSPOPCHK x5, SSAMOSWAP.W, SSAMOSWAP.D. |
Store/AMO access fault (cause=7) for every instruction, including SSPOPCHK, which only reads. ssp unchanged. |
2 modes (S, U) x 8 instructions (SSAMOSWAP.D only on RV64) = 16 (14 on RV32) |
satp_mode_bare |
cp_ss_swcheck_mtval |
Verify a shadow stack software-check exception taken in M-mode reports the shadow stack fault code in mtval |
With menvcfg.SSE=1 and translation on, push a value from S-mode, change the link register and execute SSPOPCHK x1/x5 and C.SSPOPCHK x5. The suite boots to M-mode, so medeleg is zero and the exception is taken in M-mode. |
Software-check exception (mcause=18) with mtval = 3 (shadow stack fault), or 0 if the implementation reports no information. ssp unchanged. |
priv_mode {S} x instr {SSPOPCHK x1, SSPOPCHK x5, C.SSPOPCHK x5} x mcause {18} x mtval {3 or 0, by UDB parameter} |
mtval_swchk_lead_in |
cp_ss_instr_inactive_m |
Verify SS instructions act as MOPs, touching no memory and raising nothing, whenever Zicfiss is inactive |
The M- and S-mode counterparts of cp_ss_instr_inactive_u on Zicfiss_U: setting up every inactive state requires M-mode writes to menvcfg/senvcfg, and at M-mode the behaviour is unconditional. |
No exception of ANY kind, and no memory access at all. ssp unchanged, shadow stack memory unchanged, rd unchanged except SSRDP which writes 0. |
leg {M-mode unconditional, lower-mode gated} x instr {SSPUSH x1, SSPUSH x5, C.SSPUSH x1, SSPOPCHK x1, SSPOPCHK x5, C.SSPOPCHK x5, SSRDP} x gate {menvcfg.SSE, senvcfg.SSE} = {00, 10, 11} x ssp_state {valid, misaligned, unmapped, value_mismatch} x {no trap, no memory access, ssp unchanged, rd==0 for SSRDP} |
menvcfg_sse_op_lead_in |
Folded into cp_menvcfg_sse_gating: the M-mode leg is now explicit — ssp is accessible from M for BOTH menvcfg.SSE values, since [norm:Zicfiss_m_menvcfg_sse] is scoped to privilege < M. |
Verify access to ssp from M-mode with menvcfg.SSE=0/1 |
||||
The M- and S-mode legs of the inactive-instruction row live here as cp_ss_instr_inactive_m and cp_ss_instr_inactive_s (Zicfiss_U keeps cp_ss_instr_inactive_u), with an M-mode unconditional leg added and the hostile-ssp strong form applied to both legs. |
SSPUSH/SSPOPCHK/SSRDP act as MOP (SSRDP → 0) and do not touch memory or raise exceptions even if ssp is misaligned or unmapped or the values mismatch |
||||
No separate suite needed — PMP can only be programmed from M-mode, so this sheet is already the right home. The existing PMP row is widened into cp_ss_pmp_permissions, sweeping pmp0cfg R/W and covering the SSPOPCHK-needs-W asymmetry as well as the fault-priority case. |
Should we add a PMPZicfiss suite exercising PMP access to a shadow stack page, including that RW permission is needed for shadow stack instructions SSPOPCHK and SSPUSH. |
||||
Zicfiss_H Hypervisor Shadow Stack
| Coverpoint | Goal | Feature Description | Expectation | Bins | ID | Normative Rule |
|---|---|---|---|---|---|---|
General Test Environment (VS/VU-mode, H-extension): |
||||||
cp_ssp_csr_gating_virt_zicfiss |
Verify ssp CSR accessibility from VS-mode and VU-mode across the henvcfg.SSE / senvcfg.SSE enable chain |
With menvcfg.SSE=1, attempt ssp read and write: |
Exception flavour depends on WHICH field gates, not merely on V: |
mode {VS, VU} x henvcfg.SSE {0,1} x senvcfg.SSE {0,1} x csr_op {read, write} x result {ok, virtual_instruction} |
Zicfiss_vs_henvcfg_sse Zicfiss_vu_senvcfg_sse Zicfiss_ssp_csr Zicfiss_sse_access |
[norm:Zicfiss_vs_henvcfg_sse] [norm:Zicfiss_vu_senvcfg_sse] [norm:Zicfiss_ssp_csr] [norm:Zicfiss_sse_access] |
cp_ss_page_enc_virt_zicfiss |
Verify the pte.xwr=010 encoding is reserved at VS/VU level when henvcfg.SSE=0 |
With menvcfg.SSE=1 and henvcfg.SSE=0, and V=1, build a VS-stage PTE with R=0, W=1, X=0 and access it from VS-mode and VU-mode. Repeat with henvcfg.SSE=1 as the positive control. |
henvcfg.SSE=0: the encoding remains reserved at VS and VU levels — access raises a page-fault. |
henvcfg.SSE {0,1} x mode {VS, VU} x access {ss_store, ordinary_load} x result {ok, page_fault} |
ssmp_henvcfg_sse |
[norm:ssmp_henvcfg_sse] |
cp_ss_g_stage_zicfiss |
Verify G-stage translation requirements and the guest-page-fault code for SS instructions |
With V=1 and G-stage page tables active: |
(a),(b): store/AMO GUEST-page-fault, cause=23 — remapped to the store/AMO flavour regardless of the instruction’s original access type, exactly as cause 7 and 15 are for the non-virtualised cases. |
instr {SSPUSH x1, SSPUSH x5, C.SSPUSH x1, SSPOPCHK x1, SSPOPCHK x5, C.SSPOPCHK x5, SSAMOSWAP.W, SSAMOSWAP.D} x mode {VS, VU} x g_stage {no_rw, unmapped, ok} x vsatp.MODE {Bare, Sv} x cause {none, 7, 23} |
active_g_stage_pte ss_fault_exception_code satp_mode_bare |
[norm:active_g_stage_pte] [norm:ss_fault_exception_code] [norm:satp_mode_bare] |
cp_ssamoswap_sse_gating_virt_zicfiss |
Verify SSAMOSWAP.W/D raises a VIRTUAL-instruction exception when the SSE chain is off and V=1 |
The virtualised counterpart of cp_ssamoswap_sse_gating_zicfiss. With menvcfg.SSE=1, execute SSAMOSWAP.W and SSAMOSWAP.D against a valid aligned SS address for: |
(a) virtual-instruction exception when V=1 and henvcfg.SSE=0. |
instr {SSAMOSWAP.W, SSAMOSWAP.D} x mode {VS, VU} x gate {henvcfg.SSE=0, (henvcfg.SSE=1 & senvcfg.SSE=0)} x result {virtual_instruction} |
henvcfg_sse_op senvcfg_sse_Zicfiss menvcfg_sse_op_list |
[norm:henvcfg_sse_op] [norm:senvcfg_sse_Zicfiss] [norm:menvcfg_sse_op_list] |
cp_envcfg_sse_rdonly0_virt_zicfiss |
Verify the SSE read-only-zero chain through henvcfg and, at V=1, through senvcfg |
Two links of the chain, observed by direct read-back rather than inferred from an ssp access. |
Link 1: with menvcfg.SSE=0, henvcfg.SSE reads back 0 after every write attempt. No exception — SSE is WARL, so the write is discarded rather than rejected. |
link {menvcfg→henvcfg, henvcfg→senvcfg@V=1} x parent {0,1} x csr_op {csrw, csrs, csrrw} x written {0,1} x readback {0 when parent=0, written when parent=1} |
menvcfg_sse_rdonly0 henvcfg_sse_op |
[norm:menvcfg_sse_rdonly0] [norm:henvcfg_sse_op] |
cp_ss_enable_chain_cross_zicfiss |
Cross all eight menvcfg/senvcfg/henvcfg SSE combinations against every SS instruction in every mode |
The three enable bits do not all apply in every mode, and the negatives are as important as the positives: |
Which field is consulted depends on the mode: |
{menvcfg.SSE, senvcfg.SSE, henvcfg.SSE} {000..111} x mode {HS, VS, VU} x instr {SSPUSH x1, SSPUSH x5, C.SSPUSH x1, SSPOPCHK x1, SSPOPCHK x5, C.SSPOPCHK x5, SSRDP, SSAMOSWAP.W, SSAMOSWAP.D} x result {executes, no-op, illegal_instruction, virtual_instruction} |
Zicfiss_ssp_csr Zicfiss_m_menvcfg_sse Zicfiss_vs_henvcfg_sse Zicfiss_vu_senvcfg_sse Zicfiss_sse_access henvcfg_sse_op menvcfg_sse_op_list senvcfg_sse_Zicfiss |
[norm:Zicfiss_ssp_csr] [norm:Zicfiss_m_menvcfg_sse] [norm:Zicfiss_vs_henvcfg_sse] [norm:Zicfiss_vu_senvcfg_sse] [norm:Zicfiss_sse_access] [norm:henvcfg_sse_op] [norm:menvcfg_sse_op_list] [norm:senvcfg_sse_Zicfiss] |
cp_ss_g_stage_page_enc_zicfiss |
Verify pte.xwr=010 remains a reserved encoding in G-stage page tables |
The shadow stack encoding is defined for VS-stage and S-stage page tables only. G-stage has no notion of a shadow stack page, so xwr=010 there stays reserved regardless of menvcfg.SSE or henvcfg.SSE. |
Every access type raises a store/AMO GUEST-page-fault (cause=23) — the reserved G-stage encoding makes the second-stage translation invalid, so the access never reaches the shadow stack rules. |
g_stage_pte.xwr {010} x access {SS instr, ordinary load, ordinary store, ifetch} x mode {VS, VU} x {menvcfg.SSE, henvcfg.SSE} {00, 11} x cause {23} |
active_g_stage_pte ss_fault_exception_code H_vm_gstagetrans H_guest_page_fault |
[norm:active_g_stage_pte] [norm:ss_fault_exception_code] [norm:H_vm_gstagetrans] [norm:H_guest_page_fault] |
cp_ss_hlv_hsv_zicfiss |
Verify hypervisor load/store access to a VS-stage shadow stack page: HLV succeeds, HSV faults |
From HS-mode, with a VS-stage page correctly mapped as a shadow stack page (xwr=010), use the hypervisor virtual-machine load and store instructions to reach it: |
HLV succeeds. The shadow stack is readable by any instruction that only loads ([norm:ssmp_ss_load]), and HLV is such an instruction — being a hypervisor instruction does not change that. |
instr {HLV.B, HLV.H, HLV.W, HLV.D, HLVU variants, HSV.B, HSV.H, HSV.W, HSV.D} x hstatus.HU {0,1} x mode {HS, U} x result {ok for HLV, store/AMO access-fault for HSV, virtual_instruction when HU=0 from U} |
hlsv_op hlsv_u_op ssmp_ss_load ssmp_ss_page_access_fault ss_fault_exception_code |
[norm:hlsv_op] [norm:hlsv_u_op] [norm:ssmp_ss_load] [norm:ssmp_ss_page_access_fault] [norm:ss_fault_exception_code] |
cp_ss_swcheck_delegation_zicfiss |
Verify the shadow stack software-check exception is delegated correctly through medeleg and hedeleg |
The software-check exception (cause=18) raised by a mismatching SSPOPCHK must follow the normal delegation chain. Sweep both delegation registers: |
medeleg[18]=0: trap taken in M-mode; mcause=18 and mtval=3. |
medeleg[18] {0,1} x hedeleg[18] {0,1} x origin_mode {HS, VS, VU} x trap_lands {M, HS, VS} x {xcause==18, xtval==3} |
sspop_exception mtval_swchk_lead_in mtval_swchk_list hedeleg_op medeleg_mideleg_delegate_op |
[norm:sspop_exception] [norm:mtval_swchk_lead_in] [norm:mtval_swchk_list] [norm:hedeleg_op] [norm:medeleg_mideleg_delegate_op] |
cp_ss_non_idempotent_virt_zicfiss |
Verify VS/VU-mode SS instructions fault on non-idempotent memory under two-stage Svpbmt (VS-stage and G-stage PBMT) |
The two-stage counterpart of cp_ss_non_idempotent_zicfiss. Requires Svpbmt (RV64 only). |
menvcfg.PBMTE=1 and henvcfg.PBMTE=1: the final memory type is the VS-stage PBMT if it is nonzero, else the G-stage PBMT if it is nonzero, else the PMA. |
mode {VS, VU} x instr {SSPUSH x1, SSPUSH x5, C.SSPUSH x1, SSPOPCHK x1, SSPOPCHK x5, C.SSPOPCHK x5, SSAMOSWAP.W, SSAMOSWAP.D} x vs_pte.PBMT {PMA, NC, IO} x g_pte.PBMT {PMA, NC, IO} x {menvcfg.PBMTE, henvcfg.PBMTE} {11, 10, 00} |
ssmp_ss_idempotent_memory Svpbmt_hgatp_stage_override_rule Svpbmt_vsatp_stage_override_rule |
[norm:ssmp_ss_idempotent_memory] [norm:Svpbmt_hgatp_stage_override_rule] [norm:Svpbmt_vsatp_stage_override_rule] |
(reused) Zicfiss_U instruction coverpoints, re-run from VS-mode and VU-mode |
Re-run the Zicfiss_U coverpoints with the hart in VS/VU instead of U |
BOOKKEEPING ROW, not a new coverpoint. These 13 Zicfiss_U coverpoints are re-run with V=1, sampled into the H covergroup via priv_mode_vs / priv_mode_vu: |
Identical architectural results to the U-mode runs except where two-stage translation or the enable-chain flavour changes the reported cause, as described above. |
priv_mode {vs, vu} x (all bins of each reused coverpoint) |
(inherits the ID list of each reused coverpoint) |
(inherits the normative rules of each reused coverpoint) |
Folded into cp_envcfg_sse_rdonly0_virt_zicfiss. |
Write henvcfg.SSE=1 when menvcfg.SSE=0, read back and ensure henvcfg = 0 |
|||||
Folded into cp_envcfg_sse_rdonly0_virt_zicfiss. |
in vs check h0s1 reads back as h0s0 |
|||||
PROMOTED to its own coverpoint: cp_ss_enable_chain_cross_zicfiss, including the two irrelevance claims (henvcfg at HS, senvcfg at VS). |
Test SS instructions from HS with henvcfg.SSE=0 and confirm that doesn’t matter. Also test from VS with senvcfg.SSE=0, confirm it doesn’t matter. Generally cross all 8 m/s/h enables with each instruction. |
|||||
PROMOTED to its own coverpoint: cp_ss_g_stage_page_enc_zicfiss. |
Test G-stage PTE of xwr=010 remains reserved, guest page fault for every access type. |
|||||
PROMOTED to its own coverpoint: cp_ss_hlv_hsv_zicfiss. |
Test HLV/HSV from HS-mode to VS-stage SS page. HSV faults, HLV ok. |
|||||
PROMOTED to its own coverpoint: cp_ss_swcheck_delegation_zicfiss, sweeping medeleg[18] and hedeleg[18] across HS/VS/VU. |
Be sure software check extension is delegated appropriately with hedeleg as well as medeleg. |
|||||
| Normative Rule | Rule Text | Coverpoints |
|---|---|---|
senvcfg_sse_Zicfiss |
{Zicfiss_U_cg}/{cp_ssp_csr_gating_u,cp_ssamoswap_sse_gating,cp_ss_instr_inactive_u} |
|
menvcfg_sse_op_lead_in |
{Zicfiss_Sm_cg}/{cp_menvcfg_sse_gating,cp_ss_instr_inactive_s}, {Zicfiss_S_cg}/{cp_ssp_csr_gating_s}, {Zicfiss_U_cg}/{cp_ss_instr_inactive_u} |
|
menvcfg_sse_op_list |
{Zicfiss_Sm_cg}/{cp_ss_instr_inactive_s}, {Zicfiss_S_cg}/{cp_ss_page_enc_load,cp_ssamoswap_sse_gating_s}, {Zicfiss_U_cg}/{cp_ss_instr_inactive_u,cp_ssamoswap_sse_gating} |
|
menvcfg_sse_rdonly0 |
When menvcfg.SSE is 0, the henvcfg.SSE and senvcfg.SSE fields are read-only zero. |
{Zicfiss_Sm_cg}/{cp_envcfg_sse_rdonly0_senvcfg,cp_envcfg_sse_rdonly0_henvcfg}, {Zicfiss_S_cg}/{cp_senvcfg_sse_rdonly0_s} |
henvcfg_sse_op |
{Zicfiss_H_cg}/{cp_ssp_csr_gating_vs,cp_ssamoswap_sse_gating_vs,cp_ss_instr_inactive_virt,cp_envcfg_sse_rdonly0_virt} |
|
Zicfiss_m_menvcfg_sse |
{Zicfiss_Sm_cg}/{cp_menvcfg_sse_gating}, {Zicfiss_S_cg}/{cp_ssp_csr_gating_s}, {Zicfiss_U_cg}/{cp_ssp_csr_gating_u} |
|
Zicfiss_ssp_csr |
{Zicfiss_Sm_cg}/{cp_menvcfg_sse_gating}, {Zicfiss_S_cg}/{cp_ssp_csr_gating_s}, {Zicfiss_U_cg}/{cp_ssp_csr_gating_u,cp_ssp_access} |
|
Zicfiss_u_senvcfg_sse |
Otherwise, if in U-mode and |
{Zicfiss_U_cg}/{cp_ssp_csr_gating_u} |
Zicfiss_vs_henvcfg_sse |
Otherwise, if in VS-mode and |
{Zicfiss_H_cg}/{cp_ssp_csr_gating_vs} |
Zicfiss_vu_senvcfg_sse |
Otherwise, if in VU-mode and |
{Zicfiss_H_cg}/{cp_ssp_csr_gating_vu} |
Zicfiss_sse_access |
{Zicfiss_S_cg}/{cp_ssp_csr_gating_s}, {Zicfiss_U_cg}/{cp_ssp_access} |
|
Zicfiss_smode_xsse |
||
ss_page_enc |
The encoding R=0, W=1, and X=0, is defined to represent an SS page. |
{Zicfiss_S_cg}/{cp_ss_page_enc}, {Zicfiss_U_cg}/{cp_sspush,cp_sspopchk_match} |
ssmp_menvcfg_sse |
{Zicfiss_S_cg}/{cp_ss_page_enc,cp_ss_page_enc_load,cp_ss_page_enc_store}, {Zicfiss_Sm_cg}/{cp_menvcfg_sse_ss_page} |
|
ssmp_henvcfg_sse |
Similarly, when V=1 and |
{Zicfiss_H_cg}/{cp_ss_page_enc_virt} |
satp_mode_bare |
{Zicfiss_Sm_cg}/{cp_ss_satp_bare,cp_ssamoswap_mprv_s} |
|
ssmp_ssamoswap |
{Zicfiss_Sm_cg}/{cp_ssamoswap_mmode_fault,cp_ssamoswap_mprv_s} |
|
ssmp_ss_page_access_fault |
{Zicfiss_U_cg}/{cp_ss_page_access_store,cp_ss_page_access_store_misaligned,cp_ss_page_access_amo,cp_ss_vector_store}, {Zicfiss_S_cg}/{cp_ss_page_enc_store,cp_ss_page_access_store_misaligned_s} |
|
ssmp_ss_cache_block_access_fault |
{Zicfiss_U_cg}/{cp_ss_page_access_cbo,cp_ss_page_access_cboz} |
|
ssmp_ss_implicit_access_fault |
{Zicfiss_U_cg}/{cp_ss_page_fetch} |
|
ssmp_ss_load |
However, the shadow stack is readable by all instructions that only load from memory. |
{Zicfiss_U_cg}/{cp_ss_page_access_load,cp_ss_page_access_lrsc,cp_ss_vector_load}, {Zicfiss_S_cg}/{cp_ss_page_enc_load} |
ss_fault_exception_code |
{Zicfiss_U_cg}/{cp_ss_instr_target_page,cp_sspopchk_fault_priority}, {Zicfiss_Sm_cg}/{cp_ss_pmp_permissions,cp_ss_satp_bare} |
|
ssmp_ss_page_illegal_access |
{Zicfiss_U_cg}/{cp_ss_instr_target_page}, {Zicfiss_S_cg}/{cp_ss_instr_target_page_s} |
|
ssmp_ss_read_only_page |
{Zicfiss_U_cg}/{cp_ss_instr_target_page}, {Zicfiss_S_cg}/{cp_ss_instr_target_page_s} |
|
ssp_xlen_aligned |
{Zicfiss_U_cg}/{cp_ss_address_alignment_ssp,cp_ss_address_alignment_pop}, {Zicfiss_S_cg}/{cp_ss_address_alignment_ssp_s,cp_ss_address_alignment_pop_s} |
|
ssmp_ss_idempotent_memory |
{Zicfiss_Sm_cg}/{cp_ssamoswap_mprv_non_idempotent}, {Zicfiss_S_cg}/{cp_ss_non_idempotent_s}, {Zicfiss_U_cg}/{cp_ss_non_idempotent} |
|
active_g_stage_pte |
{Zicfiss_H_cg}/{cp_ss_g_stage} |
|
Zicfiss_enc |
{Zicfiss_U_cg}/{cp_sspush,cp_sspopchk_match,cp_ssrdp,cp_ss_instr_inactive_u} |
|
Zicfiss_sspush_enc |
{Zicfiss_U_cg}/{cp_sspush}, {Zicfiss_S_cg}/{cp_sspush_s} |
|
Zicfiss_c-sspush_enc |
{Zicfiss_U_cg}/{cp_sspush}, {Zicfiss_S_cg}/{cp_sspush_s} |
|
Zicfiss_sspopchk_enc |
{Zicfiss_U_cg}/{cp_sspopchk_match,cp_sspopchk_mismatch}, {Zicfiss_S_cg}/{cp_sspopchk_match_s,cp_sspopchk_mismatch_s} |
|
Zicfiss_c-sspopchk_enc |
{Zicfiss_U_cg}/{cp_sspopchk_match,cp_sspopchk_mismatch}, {Zicfiss_S_cg}/{cp_sspopchk_match_s,cp_sspopchk_mismatch_s} |
|
Zicfiss_ssrdp_enc |
{Zicfiss_U_cg}/{cp_ssrdp}, {Zicfiss_S_cg}/{cp_ssrdp_s} |
|
ssp_op |
{Zicfiss_U_cg}/{cp_ssp_access,cp_ssp_low_bits_ro_zero} |
|
ssp_addr |
{Zicfiss_U_cg}/{cp_ssp_access,cp_ssp_low_bits_ro_zero} |
|
ssp_sz |
There is no high CSR defined as the |
{Zicfiss_U_cg}/{cp_ssp_access,cp_ssp_low_bits_ro_zero} |
ssp_field_1_0 |
{Zicfiss_U_cg}/{cp_ssp_access,cp_ssp_low_bits_ro_zero} |
|
ss_push |
{Zicfiss_U_cg}/{cp_sspush,cp_ss_page_crossing}, {Zicfiss_S_cg}/{cp_sspush_s} |
|
sspush_c-sspush_instr |
{Zicfiss_U_cg}/{cp_sspush,cp_ss_page_crossing}, {Zicfiss_S_cg}/{cp_sspush_s} |
|
sspush_c-sspush_decrement |
{Zicfiss_U_cg}/{cp_sspush,cp_ss_page_crossing}, {Zicfiss_S_cg}/{cp_sspush_s} |
|
ss_pop |
{Zicfiss_U_cg}/{cp_sspopchk_match,cp_sspopchk_mismatch,cp_ss_page_crossing}, {Zicfiss_S_cg}/{cp_sspopchk_match_s} |
|
sspopchk_shadow_return_pop |
{Zicfiss_U_cg}/{cp_sspopchk_match,cp_sspopchk_mismatch}, {Zicfiss_S_cg}/{cp_sspopchk_match_s,cp_sspopchk_mismatch_s} |
|
sspopchk_load_op |
{Zicfiss_U_cg}/{cp_sspopchk_match,cp_sspopchk_fault_priority,cp_ss_page_crossing}, {Zicfiss_S_cg}/{cp_sspopchk_match_s} |
|
sspop_exception |
{Zicfiss_U_cg}/{cp_sspopchk_mismatch,cp_sspopchk_fault_priority}, {Zicfiss_S_cg}/{cp_sspopchk_mismatch_s}, {Zicfiss_Sm_cg}/{cp_ss_pmp_permissions} |
|
sspop_increment |
{Zicfiss_U_cg}/{cp_sspopchk_match,cp_sspopchk_mismatch,cp_sspopchk_fault_priority}, {Zicfiss_S_cg}/{cp_sspopchk_match_s} |
|
ssrdp_read |
The SSRDP instruction is provided to move the contents of |
{Zicfiss_U_cg}/{cp_ssrdp}, {Zicfiss_S_cg}/{cp_ssrdp_s} |
rv32_ssamoswap-w_op |
{Zicfiss_U_cg}/{cp_ssamoswap,cp_ssamoswap_aqrl,cp_ssamoswap_reg_edges}, {Zicfiss_S_cg}/{cp_ssamoswap_s} |
|
ssamoswap_address |
{Zicfiss_U_cg}/{cp_ss_address_alignment_swap}, {Zicfiss_S_cg}/{cp_ss_address_alignment_swap_s} |
|
rv64_ssamoswap-w_op |
{Zicfiss_U_cg}/{cp_ssamoswap,cp_ssamoswap_aqrl,cp_ssamoswap_reg_edges}, {Zicfiss_S_cg}/{cp_ssamoswap_s} |
|
stval_exception_info |
{Zicfiss_U_cg}/{cp_sspopchk_mismatch}, {Zicfiss_S_cg}/{cp_sspopchk_mismatch_s} |
|
mtval_swchk_lead_in |
{Zicfiss_Sm_cg}/{cp_ss_swcheck_mtval} |
|
mtval_swchk_list |
{Zicfiss_Sm_cg}/{cp_ss_swcheck_mtval} |
| Parameter | Description | Coverpoint | Effect |
|---|---|---|---|
REPORT_CAUSE_IN_MTVAL_ON_SHADOW_STACK_SOFTWARE_CHECK |
When true, When false, |
cp_ss_swcheck_mtval |
When true, a shadow stack software-check exception taken to M-mode reports the shadow stack fault code (3) in |
REPORT_CAUSE_IN_STVAL_ON_SHADOW_STACK_SOFTWARE_CHECK |
When true, When false, |
cp_sspopchk_mismatch, cp_sspopchk_mismatch_s |
Same as the mtval parameter, for a software-check exception delegated to S-mode. |
REPORT_CAUSE_IN_VSTVAL_ON_SHADOW_STACK_SOFTWARE_CHECK |
When true, When false, |
Untested |
Same as the mtval parameter, for a software-check exception taken in VS-mode. No current coverpoint drives this: the VS/VU coverpoints exercise ssp CSR gating, which raises virtual-instruction, not software-check. Listed for when the Zicfiss_H generator lands. |
MISALIGNED_AMO |
Whether or not the implementation supports misaligned atomics in main memory |
cp_ss_address_alignment_swap, cp_ss_address_alignment_swap_s |
SSAMOSWAP takes the same exception options as A-extension AMOs for a non-naturally-aligned address, so the expected result of the addr[2:0] sweep is implementation-defined and must be compared against the reference model rather than asserted outright. |
MISALIGNED_LDST_EXCEPTION_PRIORITY |
The relative priority of a load/store/AMO exception vs. load/store/AMO page-fault or access-fault exceptions. May be one of: [separator="!"] !=== ! low ! Misaligned load/store/AMO exceptions are always lower priority than load/store/AMO page-fault and access-fault exceptions. ! high ! Misaligned load/store/AMO exceptions are always higher priority than load/store/AMO page-fault and access-fault exceptions. !=== MISALIGNED_LDST_EXCEPTION_PRIORITY cannot be "high" when MISALIGNED_MAX_ATOMICITY_GRANULE_SIZE is non-zero, since the atomicity of an access cannot be determined in that case until after address translation. |
cp_ss_page_access_store_misaligned, cp_ss_page_access_store_misaligned_s |
When low, a misaligned ordinary store to an SS page raises a store/AMO access-fault. When high, the address-misaligned exception can take priority. The misaligned bins therefore compare the result against the reference model. |
NUM_USABLE_PMP_ENTRIES |
Number of implemented PMP entries that are actually usable. An implementation may implement PMP entries (NUM_PMP_ENTRIES) but hardwire
some of them to zero (read-only zero). Such entries exist — their
NUM_USABLE_PMP_ENTRIES gives the number of low-numbered entries that are
writable/usable. Entries Must be between 0 and NUM_PMP_ENTRIES, inclusive. |
cp_ss_pmp_permissions |
The PMP test uses entry 0 for the shadow stack page and entry 1 for the rest of memory. With fewer than two usable entries the test and the coverpoint are left out. |
PMP_NAPOT_SUPPORTED |
Whether or not the Naturally Aligned Power-Of-Two (NAPOT) PMP address matching mode is supported. |
cp_ss_pmp_permissions |
The PMP test maps the shadow stack page with a NAPOT region. Without NAPOT the test and the coverpoint are left out. |
PMP_GRANULARITY |
log2 of the smallest supported PMP region. Generally, for systems with an MMU, should not be smaller than 12, as that would preclude caching PMP results in the TLB along with virtual memory translations Note that PMP_GRANULARITY is equal to G+2 (not G) as described in the privileged architecture. |
cp_ss_pmp_permissions |
The PMP region is the 4 KiB shadow stack page. With a granularity above 4 KiB the test and the coverpoint are left out. |
B.10.14. Zawrs Wait on Reservation Set
The Zawrs suite has one covergroup per privilege mode the tests run in: Zawrs_Sm_cg (M-mode), Zawrs_S_cg (S-mode) and Zawrs_U_cg (U-mode). Waits until timer interrupt or timeout on a single hart that cannot modify the reservation set. Tests behave differently in different privilege modes, so a group is defined for each. The Zawrs_Sm tests require Sm, so they are not part of a certificate without Sm, such as RVA23.
No zawrs setup have been defined yet.
Zawrs_Sm
covergroup Zawrs_Sm
| Coverpoint | Goal | Feature Description | Expectation | Bins | Normative Rule | Notes |
|---|---|---|---|---|---|---|
tests for single core |
||||||
cp_wrs_sto_timeout |
WRS.STO waits till timeout |
cross lr instruction to set up reservation. |
no exception, next instruction executes normally after WRS.STO finish execution |
2 bins |
Zawrs_wrs-sto_stall_duration |
|
cp_wrs_no_res |
WRS behaves as nop when no reservation is established |
mstatus.TW ={0/1} |
WRS behaves as nop |
2 x 2 bins |
Zawrs_all_priv_modes |
|
cp_wrs_resume |
WRS follows the rules of WFI for resuming on interrupts |
cross lr instruction to set up reservation. |
WRS resumes when interrupt is pending, MIE should not affect result |
2 x 2 x 2 bins |
mtime_mtimecmp_rv64_wr |
LA(t0, zawrs_resume_trap_handler) |
cp_wrs_no_mie |
WRS does not stop when mie = 0 for pending interrupt |
cross lr instruction to set up reservation |
WRS does not stop when interrupt pending |
1 bin |
||
Can not be tested with single core: Zawrs_wrs-nto_stall_exec |
||||||
Zawrs_S
covergroup Zawrs_S
| Coverpoint | Goal | Feature Description | Expectation | Bins | Normative Rule | Status | Notes |
|---|---|---|---|---|---|---|---|
tests for single core |
|||||||
cp_wrs_sto_timeout |
WRS.STO waits till timeout |
cross lr instruction to set up reservation. |
no exception, next instruction executes normally after WRS.STO finish execution |
2 bins |
Zawrs_wrs-sto_stall_duration |
||
cp_wrs_no_res |
WRS behaves as nop when no reservation is established |
mstatus.TW =0 |
WRS behaves as nop |
2 bins |
Zawrs_all_priv_modes |
TW = 1 can not be tested because the DUT may trigger illegal instruction immediately, where SAIL allows the instruction to retire successfully |
|
cp_wrs_resume |
WRS follows the rules of WFI for resuming on interrupts |
cross lr instruction to set up reservation. |
WRS resumes when interrupt is pending, MIE should not affect result, trap in all cases other than in S mode with SIE = 0 (still resumes) |
2 x 2 x 2 bins |
Zawrs_wrs-nto_stall_exec |
Not generated without a timer interrupt (needs Sstc or MTI_INTR_IMPL). |
|
cp_wrs_nto_timeout |
WRS.NTO timeout when TW = 1 |
cross lr instruction to set up reservation. |
WRS causes illegal instruction exception when timed out if TW = 1 |
1 |
Zawrs_stall_terminate |
||
cp_wrs_nto_timeout_h |
WRS.NTO timeout causing virtual instruction exception in H mode |
#ifdef H_SUPPORTED |
WRS causes virtual instruction exception when timed out if mstatus.tw = 0 |
2 x 2 bins |
Zawrs_virtual_instr_excp |
||
cp_wrs_no_mie |
cross lr instruction to set up reservation |
WRS does not stop when interrupt pending, WRS.NTO causes illegal instruction |
2 bins |
same as above |
|||
Can not be tested with single core: |
Untested things: |
||||||
norm |
Since the timeout limit can be different across platforms, cannot test WRS.STO with a timer interrupt soon |
Zawrs_wrs-nto_stall_exec |
|||||
Zawrs_U
covergroup Zawrs_U
| Coverpoint | Goal | Feature Description | Expectation | Bins | Normative Rule | Notes |
|---|---|---|---|---|---|---|
tests for single core |
||||||
cp_wrs_sto_timeout |
WRS.STO waits till timeout |
cross lr instruction to set up reservation. |
no exception, next instruction executes normally after WRS.STO finish execution |
2 bins |
Zawrs_wrs-sto_stall_duration |
|
cp_wrs_no_res |
WRS behaves as nop when no reservation is established |
mstatus.TW =0 |
WRS behaves as nop |
2 bins |
Zawrs_all_priv_modes |
TW = 1 can not be tested because the DUT may trigger illegal instruction immediately, where SAIL allows the instruction to retire successfully |
cp_wrs_resume |
WRS follows the rules of WFI for resuming on interrupts |
cross lr instruction to set up reservation. |
WRS resumes when interrupt is pending, MIE should not affect result, trap in all cases other than in S mode with SIE = 0 (still resumes) |
2 x 2 x 2 bins |
Zawrs_wrs-nto_stall_exec |
Not generated without a timer interrupt (needs Sstc or MTI_INTR_IMPL). |
cp_wrs_nto_timeout |
WRS.NTO timeout when TW = 1 |
cross lr instruction to set up reservation. |
WRS causes illegal instruction exception when timed out if TW = 1 |
1 |
Zawrs_stall_terminate |
|
cp_wrs_no_mie |
cross lr instruction to set up reservation |
WRS does not stop when interrupt pending, WRS.NTO causes illegal instruction |
2 bins |
|||
Zawrs Normative Rules
| Normative Rule | Rule Text | Coverpoints |
|---|---|---|
Zawrs_wrs-nto_stall_exec |
{Zawrs_Sm_cg,Zawrs_S_cg,Zawrs_U_cg}/cp_wrs_resume, Not tested: a store from another hart needs a multi-hart configuration |
|
Zawrs_wrs-sto_stall_duration |
For WRS.STO the stall duration is bounded by an implementation defined short timeout. |
{Zawrs_Sm_cg,Zawrs_S_cg,Zawrs_U_cg}/cp_wrs_sto_timeout |
Zawrs_all_priv_modes |
{Zawrs_Sm_cg,Zawrs_S_cg,Zawrs_U_cg}/cp_wrs_no_res |
|
Zawrs_stall_terminate |
Zawrs_Sm_cg/cp_wrs_resume, {Zawrs_S_cg,Zawrs_U_cg}/cp_wrs_{resume, nto_timeout} |
|
Zawrs_exec_resume_rules |
{Zawrs_Sm_cg,Zawrs_S_cg,Zawrs_U_cg}/cp_wrs_resume |
|
Zawrs_priv_illegal_instr_excp |
{Zawrs_S_cg,Zawrs_U_cg}/cp_wrs_nto_timeout |
|
Zawrs_virtual_instr_excp |
Zawrs_S_cg/cp_wrs_nto_timeout_h |
UDB Parameters: None.
These tests require support for MTI and/or STI interrupts. Note that these tests can have race conditions of timeouts, timer interrupts, and spontaneous resumption, and thus may be fussy on different implementations.
B.10.15. Zama16b Misaligned Atomics
Misaligned atomics are supported by the Misaligned Atomicity Granularity. They are also exercised via Exceptions_Zaamo.
| Coverpoint | Goal | Feature Description | Expectation | Bins | Normative Rule |
|---|---|---|---|---|---|
cp_zama16b_load |
Misaligned accesses are atomic |
For each op in {lw, lh, lhu, lb, lbu} + {ld, lwu for RV64} + {flw for F, fld for D on RV64, flh for Zfh}: |
No misaligned load fault |
Up to 11 ops * 16 offsets |
Misaligned loads, stores, and AMOs to main memory regions that do not cross a naturally aligned 16-byte boundary are atomic. |
cp_zama16b_store |
Misaligned accesses are atomic |
For each op in {sw, sh, sb} + {sd for RV64} + {fsw for F, fsd for D on RV64, fsh for Zfh}: |
No misaligned store fault |
Up to 9 ops * 16 offsets |
Misaligned loads, stores, and AMOs to main memory regions that do not cross a naturally aligned 16-byte boundary are atomic. |
cp_zama16b_amo |
Misaligned accesses are atomic |
For each op in {amoswap.w, amoadd.w, amoand.w, amoor.w, amoxor.w, amomax.w, amomaxu.w, amomin.w amominu.w} + {.d flavors for RV64} + {b and h flavors for Zabha} + {amocas.w, d, q if supported}: |
No misaligned store/AMO fault |
Up to 39 ops * 12 offsets |
Misaligned loads, stores, and AMOs to main memory regions that do not cross a naturally aligned 16-byte boundary are atomic. |
Note: |
|||||
This test only checks for no misaligned fault. Multimaster testing will be required to verify atomicity. |
|||||
The misaligned atomicity granule applies only to F/D/Q loads and stores of at most XLEN bits, so flq/fsq (and fld/fsd on RV32) are not tested. |
|||||
| Normative Rule | Rule Text | Coverpoints |
|---|---|---|
misaligned_atomicity_granule_size |
Zama16b_cg/{cp_zama16b_2byte, cp_zama16b_4byte, cp_zama16b_8byte}, atomicity OUT-OF-SCOPE for single hart |
|
Zama16b_pma_mag_req |
The Zama16b extension requires MAG16 support to main memory regions. |
Zama16b_cg/{cp_zama16b_2byte, cp_zama16b_4byte, cp_zama16b_8byte}, atomicity OUT-OF-SCOPE for single hart |
Zama16b_mag |
Zama16b_cg/{cp_zama16b_2byte, cp_zama16b_4byte, cp_zama16b_8byte}, atomicity OUT-OF-SCOPE for single hart |
|
pma_mag_def |
Descriptive spec text with no separately testable behavior |
|
pma_mag_insts |
Zama16b_cg/{cp_zama16b_1byte, cp_zama16b_2byte, cp_zama16b_4byte, cp_zama16b_8byte}, TODO: compressed loads and stores within a 16-byte granule |
|
pma_mag_op_within |
Zama16b_cg/{cp_zama16b_2byte, cp_zama16b_4byte, cp_zama16b_8byte}, atomicity OUT-OF-SCOPE for single hart |
|
pma_mag_op_ldst |
||
Zama16b_atomic_ops |
Zama16b_cg/{cp_zama16b_2byte, cp_zama16b_4byte, cp_zama16b_8byte}, atomicity OUT-OF-SCOPE for single hart |
UDB Parameters: None.
B.10.16. Sdtrig Debug Triggers
Located here because it is part of RVA23 and can function without the rest of the Debug Specification. See Section C.1 for non-RVA23 debug extensions. The suite is divided into SdtrigSm, SdtrigS, and SdtrigU suites that are essentially identical, but are run on different privilege levels and thus produce different results for coverpoints such as reading debug registers or triggering in certain modes. SdtrigSm is listed in full; the SdtrigS and SdtrigU plans below list only how they differ, and they cover the same normative rules.
Assumptions: tests run in M-mode unless otherwise specified, udb configuration file describes supported triggers and features Only support ratified version 1.0 of the spec Implies tinfo must be implemented, Mscontext not tested Triggers are not assumed to be precise, so priority and timing not tested Hit is optional and not tested Only test action=0 of breakpoint exception because external debug and trace are not required Do not test trigger types 1 (SiFive legacy), 2 (Deprecated mcontrol), 7 (tmexttrig), 8-11 (reserved), 12-14 (custom) Reset Values not tested Unless otherwise specified, test mcontrol6 with tdata1.select=match=size=chain=0 tdata1.m/s/u/vs/vu = 1/0/0/0/0 tdata1.XSL = 1/1/1 tdata3 = 0 tcontrol.mte = 1 (if TCONTROL supported) mideleg = 0 medeleg = 0 mstatus.MIE = 1 if Smstateen/Ssstateen_SUPPORTED: mstateen0.context = 1, hstateen0.context = 1 optional context registers hold 0 if they exist
| Coverpoint | Goal | Feature Description | Expectation | Bins | Normative Rule | Status | Notes |
|---|---|---|---|---|---|---|---|
Access |
|||||||
cp_csr_access_common |
Access all Sdtrig CSRs common to all triggers |
For each of UDB_SDTRIG_NUM_TRIGGERS in tselect: |
WARL |
UDB_SDTRIG_NUM_TRIGGERS * supported types (up to 5) * implemented regs (2-8) * 5 accesses |
Sdtrig_num_trigs_ge1 |
comments on test results: No exceptions. Tcontrol and mscontext not implemented on spike |
|
Note: Use CSRW/CSRR to access registers in all modes |
|||||||
Native Triggers: breakpoint delegation from S/U-mode is tested in SdtrigS and SdtrigU (cp_breakpoint_delegate_s/u) |
|||||||
A Extension |
Repeat for each of UDB_SDTRIG_NUM_TRIGGERS if UDB_SDTRIG_MCONTROL6_SUPPORTED_TRIGGERS[i]: |
||||||
cp_lrsc_addr |
lr instructions are loads |
if ZALRSC_SUPPORTED |
Breakpoint exception when mem access address matches tdata2 and |
if RV32: |
Sdtrig_Aext_lr_op |
||
cp_lrsc_data |
lr instructions are loads |
if ZALRSC_SUPPORTED |
Breakpoint exception when mem access data matches tdata2 and |
2 tdata2 * 3 XSL * 2 ops (lr/sc of XLEN width; size=0 data matches are defined only for XLEN-wide accesses) |
Sdtrig_Aext_lr_op |
||
cp_amo |
Amo is a load for the read portion and a store for the write portion |
if ZAAMO_SUPPORTED |
Breakpoint exception if load or store are set and the access address matches tdata2 |
2 address * 3 XSL * 9 (RV64 18) AMOs |
Sdtrig_AMO_read |
||
Notes: |
|||||||
Combined Accesses |
Repeat for each of UDB_SDTRIG_NUM_TRIGGERS if UDB_SDTRIG_MCONTROL6_SUPPORTED_TRIGGERS[i]: |
UDB_VECTOR_SEW |
|||||
cp_vector_load_store |
Accesses match as if it performed a load/store of size SEW |
if ZVL32B_SUPPORTED |
Breakpoint exception if the tdata2 matches a address in the vector store and tdata1.size = SEW or 0 |
2 address * legal sizes (up to 7) * 4 SEW * 2 ops |
Sdtrig_mult_mem_access |
||
cp_vector_accesses |
Accesses match as if happened individually |
if ZVL32B_SUPPORTED |
Breakpoint exception if the tdata2 = scratch |
3 address * 2 Vector Lengths * 4 SEW * 2 ops |
Sdtrig_mult_mem_access |
||
cp_vector_mask |
Masked vector operations do not match |
if ZVL32B_SUPPORTED |
Breakpoint exception when the element at tdata2 is active |
2 mask states * 4 SEW * 2 ops |
Sdtrig_mult_mem_access |
||
cp_cm_pop_push (not generated) |
Accesses match as if happened individually |
if ZCMP_SUPPORTED |
Breakpoint exception if the tdata2 matches mem address, store/load = 1, tdata1.size = XLEN or 0 |
3 address * 3 XSL * 7 sizes * 2 ops |
Sdtrig_mult_mem_access |
Not generated until the Sail reference model supports Zcmp: Sail 0.16 has no Zcmp extension (model/core/extensions.sail has no Ext_Zcmp; riscv/sail-riscv#730 adds it and is open), and no CI configuration claims both Zcmp and Sdtrig. With #730, cm.push and cm.pop make one vmem_write or vmem_read per register, which Sail’s per-access trigger matching (model/sys/vmem_utils.sail) checks individually |
|
Cache Operations |
Repeat for each of UDB_SDTRIG_NUM_TRIGGERS if UDB_SDTRIG_MCONTROL6_SUPPORTED_TRIGGERS[i]: |
Sdtrig_caches_stores_1 |
|||||
cp_cache_zicbom |
cbo.clean, cbo.flush, and cbo.inval match as if they are stores |
if ZICBOM_SUPPORTED |
Breakpoint exception when tdata2 = scratch and store = 1 and size = 0 and select = 0 |
4 addrs * 2 selects * legal sizes (up to 7) * 3 XSL * 3 ops |
Sdtrig_caches_stores_1 |
||
cp_cache_zicboz |
cbo.zero matches as if it is a store |
if ZICBOZ_SUPPORTED |
Breakpoint exception when tdata2 = scratch and store = 1 and size = 0 and select = 0 |
4 addrs * 2 selects * legal sizes (up to 7) * 3 XSL |
Sdtrig_caches_stores_1 |
||
cp_cache_zicbop |
The prefetch instructions don’t match at all. |
if ZICBOP_SUPPORTED |
No exceptions |
2 values * 2 selects * 3 ops |
Sdtrig_cache_hints |
||
Address Matches |
|||||||
cp_tdata2_translate |
tdata2 can hold valid addresses in all supported translation modes |
For each of UDB_SDTRIG_NUM_TRIGGERS in tselect if UDB_SDTRIG_MCONTROL6_SUPPORTED_TRIGGERS[i]: |
Read value matches written |
NTRIG * (1 + 2 * supported VA modes) |
Sdtrig_tdata2_addr_sz1 |
||
cp_tdata2_translate_exec |
An execute trigger matches the virtual address of a translated fetch, not its physical address |
if S_SUPPORTED, for each mode in {Sv39, Sv48, Sv57 on RV64, Sv32 on RV32} if supported: |
Breakpoint into M with mepc = the alias VA iff tdata2 = VA |
NTRIG * supported VA modes * 2 |
Sdtrig_vmem |
||
Trigger Module Registers |
|||||||
cp_tdata_write |
Writes to one tdata register must not modify the contents of other tdata registers. Note: type 15 allow any supported value to be written to tdata2/3 |
For each of UDB_SDTRIG_NUM_TRIGGERS in tselect |
No exceptions |
3 |
Sdtrig_tdata_write |
coverpoint drafted: 9/10 |
|
cp_csr_access_global |
The Trigger Module registers, except scontext, and hcontext, are only accessible in machine and Debug Mode |
For x register in {tselect, and tcontrol, mcontext, scontext, hcontext if UDB_x_IMPLEMENTED}: |
No exceptions |
1 + implemented global registers, * 2 values |
Sdtrig_trigger_modes |
coverpoint drafted: 9/10 |
|
cp_csr_access_local |
The Trigger Module registers are only accessible in machine and Debug Mode |
each of UDB_SDTRIG_NUM_TRIGGERS in tselect: |
No exceptions |
NUM_TRIGGERS * 4 regs * 2 values |
Sdtrig_tdata_warl |
||
cp_tselect_trigs |
The set of triggers must start at 0 and be contiguous |
For tselect = 0 to UDB_SDTRIG_NUM_TRIGGERS -1 |
No exceptions |
NUM_TRIGGERS |
Sdtrig_num_trigs_ge1 |
coverpoint drafted: 9/10 |
|
cp_tselect_nonexistent |
A nonexistent trigger reads tinfo.info = 1 and tdata1 = 0 |
CSRW tselect = UDB_SDTRIG_NUM_TRIGGERS (the first unimplemented index), CSRR tselect |
tselect is WARL and may hold another index (Sail 0.16 reads UDB_SDTRIG_NUM_TRIGGERS - 1, Spike, Whisper, |
1 |
Sdtrig_tdata1_dmode_type_0 |
||
cp_tdata1_mode_hardwired |
Non supported mode bits are hardwired zero |
For each of UDB_SDTRIG_NUM_TRIGGERS in tselect: |
Writable mode bits read back 1 and the bits of modes the hart lacks read back 0 after writing all-ones |
NTRIGGERS |
Sdtrig_mcontrol6_vs |
coverpoint drafted: 9/10 |
|
cp_tdata1_dmode |
dmode is writable only from Debug Mode |
For each of UDB_SDTRIG_NUM_TRIGGERS in tselect, for each supported type in {icount, mcontrol6}: |
dmode reads back 0 after an M-mode write of 1 |
NTRIGGERS * 2 types |
Sdtrig_tdata1_dmode_writable |
||
cp_tinfo_read_only |
Writing tinfo has no effect |
For each of UDB_SDTRIG_NUM_TRIGGERS in tselect: |
Writing tinfo has no effect |
NTRIGGERS |
Sdtrig_tinfo_support |
coverpoint drafted: 9/10 |
|
cp_csr_unimplemented |
Accessing a trigger CSR that the hart does not implement raises an illegal instruction exception |
For x in {tdata2, tdata3, tcontrol, mcontext, scontext, hcontext} if not UDB_x_IMPLEMENTED: |
Illegal instruction exception on every access |
unimplemented optional CSRs * 2 accesses (none on a hart with all of them) |
Sdtrig_unimp_csr_illegal |
||
Trigger Control |
|||||||
cp_tcontrol_enable |
tcontrol.mte enables debug triggers in M-mode |
if UDB_TCONTROL_IMPLEMENTED and SDTRIG_BREAKPOINT_REENTRANCY = Use_tcontrol |
Breakpoint exception when mte = 1; none when mte = 0 |
NTRIG * 2 mte |
Sdtrig_tcontrol_mte_disabled |
||
cp_tcontrol_mtrap |
tcontrol.mte/mpte on trap into M-mode |
if UDB_TCONTROL_IMPLEMENTED |
When M-mode trap taken, mpte is set to mte, mte is set = 0 |
2 mpte * 2 mte |
Sdtrig_tcontrol_mpte |
||
cp_tcontrol_mret |
tcontrol.mte on mret |
if UDB_TCONTROL_IMPLEMENTED |
When mret is executed, mte is set to the value of mpte; mpte is unchanged. |
2 mpte * 2 mte |
Sdtrig_tcontrol_mte_mret |
||
Mcontrol (type 2): deprecated and not tested |
|||||||
Mcontrol6 tests: test fire and don’t fire for each scenario |
Repeat for each of UDB_SDTRIG_NUM_TRIGGERS if UDB_SDTRIG_MCONTROL6_SUPPORTED_TRIGGERS[i]: |
||||||
cp_mcontrol6_priv_mode |
tdata2 = {scratch} |
Breakpoint exception on instruction if tdata1.m = 1; none when only s/u are set |
2 m (the s/u-only case falls in the m = 0 bin) |
Sdtrig_action0 |
comments on test results: Exceptions when m.1 |
||
cp_mcontrol6_execute_adr |
tdata2 = {PC address of add x0, x1, x2/0} |
Breakpoint exception on PC of add x0, x1, x2 if tdata2 points to it and tdata1.execute = 1 |
2 values * 8 XSL |
Sdtrig_mcontrol6_breakpoint |
comments on test results: Exceptions on triggers when execute = 1 |
||
cp_mcontrol6_load_store_adr |
tdata2 = {scratch/scratch+8/0} |
Breakpoint exception on LW if access address matches tdata2 and tdata1.load = 1 |
3 addresses * 8 XSL * 2 ops * 2 offsets |
Sdtrig_mcontrol6_breakpoint |
comments on test results: Exceptions when XSL = 2 or 1 when tdata2 = scratch |
||
cp_mcontrol6_execute_data |
tdata2 = {addi x0, x1, 0 opcode (0x00008013)/0x2} |
Breakpoint exception on fetched instruction if tdata2 matches opcode and tdata1.execute = 1 |
2 values * 8 XSL |
Sdtrig_mcontrol6_select_data |
comments on test results: Exceptions when tdata2 = 0x00008013, and execute = 1 |
||
cp_mcontrol6_load_store_data |
tdata2 = {random XLEN-wide value / the same value with bit 0 (RV32) or bit 32 (RV64) flipped} |
Breakpoint exception on the load if access data matches tdata2 and tdata1.load = 1 |
8 XSL * 2 ops (tdata2 values not binned because the data a load reads is not visible to coverage) |
Sdtrig_mcontrol6_select_data |
comments on test results: Exceptions when td2 = the stored value, and XSL = 1/2/3 |
||
cp_mcontrol6_execute_size |
tdata2 = {addi x0, x1, 0 opcode/c.nop opcode} |
Breakpoint exception if the size of the instruction matches the trigger size in mcontrol6 and tdata1.execute = 1 |
2 values * legal sizes (up to 7) * 2 ops |
Sdtrig_mcontrol6_size_any |
comments on test results: Exceptions when td2 = op, size = 0. Note: warls size to zero |
||
cp_mcontrol6_execute_adr_size |
A select = 0 execute trigger with size = N matches only the execution of an N-bit instruction |
tdata2 = {PC of addi x0, x1, 0 / PC of c.nop} |
Breakpoint exception for size 2 on c.nop and size 3 on addi; none for sizes 1, 4 and 5 |
NTRIG * legal (size, instruction) pairs (up to 8) |
Sdtrig_mcontrol6_size_8bit |
||
cp_mcontrol6_load_store_size |
tdata2 = {scratch/0} |
Breakpoint exception if the size of the memory access matches the trigger size in mcontrol6 |
2 values * legal sizes (up to 5) * up to 36 instructions |
Sdtrig_mcontrol6_size_any |
Sizes 4 (48-bit) and 6 (128-bit) are not tested; size 6 is never written (Sail 0.16 disables sizes above XLEN) |
||
cp_mcontrol6_match |
Test boundaries for match conditions |
tdata1.select = 1 (data) |
Breakpoint exception if the store data meets the condition set by tdata1.match |
legal matches (up to 4) * 5 ops |
Sdtrig_mcontrol6_match_equal |
||
cp_mcontrol6_match_napot |
tdata1.select = 1 (data) |
Breakpoint exception if the store data meets the condition set by tdata1.match |
legal matches (up to 2) * min(UDB_SDTRIG_MCONTROL6_MASKMAX6, XLEN-1) values * 3 ops |
Sdtrig_mcontrol6_napot_range |
|||
cp_mcontrol6_napot_allones |
An all-ones write to bits maskmax6-1:0 of tdata2 clears bit maskmax6-1 |
if UDB_TDATA2_IMPLEMENTED and UDB_SDTRIG_MCONTROL6_MASKMAX6 < XLEN |
Bit maskmax6-1 of tdata2 reads 0; only that bit is signed (bits maskmax6-2:0 are UNSPECIFIED) |
NTRIG * legal matches (up to 2) |
Sdtrig_mcontrol6_match_napot_mask |
||
cp_mcontrol6_match_mask |
tdata1.select = 1 (data) |
Breakpoint exception if the store data meets the condition set by tdata1.match |
legal matches (up to 4) * 11 values |
Sdtrig_mcontrol6_match_mask_low |
|||
MControl6 Chain |
Repeat for each of UDB_SDTRIG_NUM_TRIGGERS if UDB_SDTRIG_MCONTROL6_SUPPORTED_TRIGGERS[i] and UDB_SDTRIG_MCONTROL6_SUPPORTED_TRIGGERS[i+1]: |
||||||
cp_mcontrol6_chain_adr |
Trigger i (Tselect = i): |
Breakpoint exception from final trigger in chain if all triggers match simultaneously |
2 store values * 2 addresses |
Sdtrig_mcontrol6_chain |
comments on test results: Be careful of order when setting up chain, enable chain last |
||
cp_mcontrol6_chain_long |
A chain longer than 2 fires only when every trigger in it matches |
For each length L in 3 to UDB_SDTRIG_MAX_CHAIN_LENGTH if triggers 0 to L-1 support mcontrol6: |
Breakpoint exception only when every trigger in the chain matches |
chain lengths * {fired, not fired} |
Sdtrig_mcontrol6_chain |
||
cp_mcontrol6_size_data |
With select = 1 and size = N, a store trigger compares only the N bits the store writes |
For each of UDB_SDTRIG_NUM_TRIGGERS if UDB_SDTRIG_MCONTROL6_SUPPORTED_TRIGGERS[i] and SELECT_WRITABLE: |
Breakpoint exception only for the store of size N whose low N bits equal tdata2 (not for the wider or narrower |
NTRIG * legal sizes (up to 4) * 3 cases (the wider and narrower stores fall in the other-width bin) |
Sdtrig_mcontrol6_select_data |
||
cp_mcontrol6_match_size_store |
Every legal match crossed with every legal size on a select = 1 store trigger |
For each of UDB_SDTRIG_NUM_TRIGGERS if UDB_SDTRIG_MCONTROL6_SUPPORTED_TRIGGERS[i], SELECT_WRITABLE and STORE_WRITABLE: |
Breakpoint exception exactly for the stores of size N whose low N bits satisfy the match against the low N |
NTRIG * legal matches * legal sizes * {fired, not fired, other width} |
Sdtrig_mcontrol6_select_data |
||
cp_mcontrol6_match_size_load |
Every legal match crossed with every legal size on a select = 1 load trigger |
As cp_mcontrol6_match_size_store, with tdata1.XSL = 001 (LOAD_WRITABLE) and sign-extending {lb/lh/lw/ld}: |
As cp_mcontrol6_match_size_store; a hart that compared the sign-extended register would miss the cases that |
NTRIG * legal matches * legal sizes * {fired, not fired, other width} |
Sdtrig_mcontrol6_select_data |
||
cp_mcontrol6_match_size_execute |
Every legal match crossed with sizes 2 and 3 on a select = 1 execute trigger |
M-mode only. For each of UDB_SDTRIG_NUM_TRIGGERS if UDB_SDTRIG_MCONTROL6_SUPPORTED_TRIGGERS[i], SELECT_WRITABLE |
Breakpoint exception exactly for the targets of size N that satisfy the match; the near misses and the other |
NTRIG * legal matches * sizes 2/3 * {fired, not fired} |
Sdtrig_mcontrol6_select_data |
||
cp_mcontrol6_match_size_execute_other |
A size = 2 execute trigger never fires on a 32-bit instruction it would otherwise match |
The cases of cp_mcontrol6_match_size_execute that execute a 32-bit target on a size = 2 trigger whose tdata2 |
No breakpoint exception. |
NTRIG * legal matches (RV64 without 5 and 13) |
Sdtrig_mcontrol6_select_data |
||
Notes: |
|||||||
uncertain and uncertainen not tested because optional and unpredictable |
|||||||
vs, vu deferred to SdtrigH |
|||||||
hit not tested because optional and implementation-dependent |
|||||||
action other than 0 not tested until those features are supported (e.g. SdtrigSdext/SdtrigTrace) |
|||||||
Icount tests: test fire and don’t fire for each scenario |
Repeat for each of UDB_SDTRIG_NUM_TRIGGERS if UDB_SDTRIG_ICOUNT_SUPPORTED_TRIGGERS[i]: |
||||||
cp_icount_hardwired |
if UDB_SDTRIG_ICOUNT_COUNT_HARDWIRED_1 (imperas-rv64-max; cp_icount_instr, cp_icount_eq0 and cp_icount_self_write |
breakpoint exception occurs, |
1 |
Sdtrig_icount_match_eq1 |
|||
cp_icount_instr |
tdata.pending = 0 |
Count decreases when the instruction retires after having been fetched in M-mode and tdata1.m = 1. Tval=0 after firing, pending=0 after firing. |
2 priv bits (tdata1 readback: m clear and count unchanged, m set and counted to 0) |
Sdtrig_icount_access |
|||
cp_icount_instr_fire |
icount fires after count instructions |
cp_icount_instr with tdata1.m = 1: the breakpoint taken while the icount trigger armed with count = 9 is selected |
Breakpoint exception into M with tval = 0, before the instruction after the 9th |
1 |
Sdtrig_icount_match1 |
||
cp_icount_trap |
tdata1.count = 1 |
Count decreases when a trap is taken from a privilege mode where the trigger is enabled |
2 priv bits (tdata1 readback: m clear and count unchanged, m set and counted to 0) |
Sdtrig_icount_match2 |
|||
cp_icount_trap_fire |
A trap taken in a mode where the trigger is enabled is counted, and pending fires after the handler returns |
cp_icount_trap with tdata1.m = 1: the breakpoint taken on the mret that returns from the illegal-instruction trap |
Breakpoint exception into M on return from the trap handler |
1 |
Sdtrig_tcontrol_mte |
||
cp_icount_eq0 |
tdata1.pending = {0/1} |
Count stays at 0 until explicitly written |
2 pending (tdata1 readback: count stays 0, pending cleared) |
Sdtrig_icount_count_zero |
|||
cp_icount_eq0_fire |
A pending icount trigger fires before the next instruction |
cp_icount_eq0 with tdata1.pending = 1: the breakpoint taken right after the CSRW that writes count = 0, pending = 1 |
Breakpoint exception into M before the next instruction; pending is cleared |
1 |
Sdtrig_icount_pending |
||
cp_icount_self_write |
An icount trigger with count = 1 that matches a write to its own tdata1 may or may not become pending |
if not UDB_SDTRIG_ICOUNT_COUNT_HARDWIRED_1 |
count holds the newly written value afterwards (less the instructions since), so the trigger does not fire later |
NTRIG |
Sdtrig_tdata1_write0 |
||
Itrigger tests: test fire and don’t fire for each scenario |
Repeat for each of UDB_SDTRIG_NUM_TRIGGERS if UDB_SDTRIG_ITRIGGER_SUPPORTED_TRIGGERS[i]: |
||||||
cp_itrigger_m |
An itrigger never fires on an interrupt handled in M |
tdata2[x] = 1 for x in {1,3,5,7,9,11,13} if INTERRUPTx_SUPPORTED (1,5,9,13 need S) |
No breakpoint (both reentrancy options prevent it in M) |
NTRIG * 7 interrupts * 2 m bits |
Sdtrig_itrigger_m |
||
cp_itrigger_m_other |
An itrigger does not fire on an interrupt tdata2 does not select |
as cp_itrigger_m, taking the machine timer interrupt instead of x |
No breakpoint |
NTRIG * 2 m bits |
Sdtrig_itrigger_m |
||
cp_itrigger_s |
An itrigger fires on a selected interrupt taken from S and handled in S |
tdata2[x] = 1 for x in {1,5,9,13} if INTERRUPTx_SUPPORTED |
Breakpoint into M just before the first instruction of the S-mode handler, tval = 0, iff tdata1.s = 1 |
NTRIG * 4 interrupts * {s clear and no breakpoint, s set and breakpoint} |
Sdtrig_itrigger_fire |
||
cp_itrigger_s_other |
An itrigger does not fire on an interrupt tdata2 does not select |
as cp_itrigger_s, taking another delegated S-level interrupt (5, or 1 when x = 5) instead of x |
No breakpoint |
NTRIG * 2 s bits |
Sdtrig_itrigger_enable_num |
||
cp_itrigger_u |
An itrigger fires on a selected interrupt taken from U and handled in S |
as cp_itrigger_s, with tdata1.u = {0/1}, taking interrupt x while executing in U-mode |
Breakpoint into M just before the first instruction of the S-mode handler, tval = 0, iff tdata1.u = 1 |
NTRIG * 4 interrupts * {u clear and no breakpoint, u set and breakpoint} |
Sdtrig_itrigger_fire |
||
cp_itrigger_u_other |
An itrigger does not fire on an interrupt tdata2 does not select |
as cp_itrigger_u, taking another delegated S-level interrupt instead of x |
No breakpoint |
NTRIG * 2 u bits |
Sdtrig_itrigger_enable_num |
||
Etrigger tests: test fire and don’t fire for each scenario |
Repeat for each of UDB_SDTRIG_NUM_TRIGGERS if UDB_SDTRIG_ETRIGGER_SUPPORTED_TRIGGERS[i]: |
||||||
cp_etrigger_m |
An etrigger never fires on an exception raised and handled in M |
tdata2[x] = 1 for x in {1,2,5,7,11, and 13,15 with Sv (MPRV=1, MPP=U)} |
No breakpoint (both reentrancy options prevent it in M) |
NTRIG * 7 exceptions * 2 m bits |
Sdtrig_etrigger_m |
||
cp_etrigger_m_other |
An etrigger does not fire on an exception tdata2 does not select |
tdata2[x] = 1 for each x above and x in {0,3,4,6,8,9}, tdata1.m = {0/1} |
No breakpoint |
NTRIG * 2 m bits |
Sdtrig_etrigger_m |
||
cp_etrigger_s |
An etrigger never fires on an exception raised in S and handled in M |
tdata2[x] = 1 for x in {1,2,5,7,9, and 12,13,15 with Sv} |
No breakpoint |
NTRIG * 8 exceptions * 2 s bits |
Sdtrig_etrigger_s |
||
cp_etrigger_s_deleg |
An etrigger fires on a selected exception raised in S and handled in S |
tdata2[x] = 1 for x in {1,5,7, and 12,13,15 with Sv} |
Breakpoint into M just before the first instruction of the S-mode handler, tval = 0, iff tdata1.s = 1 |
NTRIG * 6 exceptions * {s clear and no breakpoint, s set and breakpoint} |
Sdtrig_etrigger_config |
||
cp_etrigger_s_other |
An etrigger does not fire on an exception tdata2 does not select |
tdata2[x] = 1 for each x tested from S, tdata1.s = {0/1}, medeleg[2] = 0 |
No breakpoint |
NTRIG * 2 s bits |
Sdtrig_etrigger_config |
||
cp_etrigger_u |
An etrigger never fires on an exception raised in U and handled in M |
tdata2[x] = 1 for x in {1,2,5,7,8, and 12,13,15 with Sv} |
No breakpoint |
NTRIG * 8 exceptions * 2 u bits |
Sdtrig_etrigger_u |
||
cp_etrigger_u_deleg |
An etrigger fires on a selected exception raised in U and handled in S |
tdata2[x] = 1 for x in {1,5,7,8, and 12,13,15 with Sv} |
Breakpoint into M just before the first instruction of the S-mode handler, tval = 0, iff tdata1.u = 1 |
NTRIG * 7 exceptions * {u clear and no breakpoint, u set and breakpoint} |
Sdtrig_etrigger_config |
||
cp_etrigger_u_other |
An etrigger does not fire on an exception tdata2 does not select |
tdata2[x] = 1 for each x tested from U, tdata1.u = {0/1}, medeleg[2] = 0 |
No breakpoint |
NTRIG * 2 u bits |
Sdtrig_etrigger_config |
||
Textra tests: test fire and don’t fire for each scenario |
Repeat for each of UDB_SDTRIG_NUM_TRIGGERS if UDB_TDATA3_IMPLEMENTED: |
||||||
cp_textra_mcontext |
only run tests if SDTRIG_TEXTRA_MHSELECT_MCONTEXT_MATCH and SDTRIG_TEXTRA_MHVALUE_LEN > 0: |
Breakpoint exception if mhvalue equals mcontext |
3 mhvalues * 2 trigger types (icount, mcontrol6) |
Sdtrig_mcontext_hcontext_data |
|||
cp_textra_scontext |
only run tests if SDTRIG_TEXTRA_SSELECT_SCONTEXT_MATCH and SDTRIG_TEXTRA_SVALUE_LEN > 0: |
Breakpoint exception when svalue equals scontext and mask ignores A’s |
if RV32: |
Sdtrig_scontext_data |
|||
cp_textra_scontext_all |
With every scontext byte masked, the scontext compare always matches |
only run tests if SDTRIG_TEXTRA_SSELECT_SCONTEXT_MATCH and SDTRIG_TEXTRA_SVALUE_LEN > 0: |
Breakpoint exception for every svalue |
2 trigger types |
Sdtrig_textra32_sbytemask |
||
cp_textra_double_context |
only run tests if the conditions of both cp_textra_mcontext and cp_textra_scontext hold: |
Breakpoint exception when all enabled context numbers match |
2 mhselect * 2 sselect * 2 mhvalue * 2 svalue |
Sdtrig_mcontrol6_textra |
|||
cp_textra_asid |
only run tests if S is supported, SDTRIG_TEXTRA_SSELECT_ASID_MATCH, ASID_WIDTH >= 2, |
Breakpoint exception if ASID in satp equals the lower ASIDMAX bits of svalue. |
2 types * 2 asid_match |
Sdtrig_mcontrol6_textra |
|||
cp_textra_asid_sbytemask |
sbytemask applies only with sselect = 1 |
as cp_textra_asid, with tdata3.sbytemask = all ones (RV32 11, RV64 1111) and tdata3.svalue = {X / X^1} |
Breakpoint exception if ASID in satp equals the lower ASIDMAX bits of svalue. |
2 types * 2 asid_match |
Sdtrig_textra32_byte_mask_applies |
||
cp_textra_mhselect_no_h |
Without H, mhselect holds only 0 or 4 |
only run tests if H is not supported and TDATA3_IMPLEMENTED; the tdata3 accesses run in M-mode (through T-SBI in SdtrigS). |
mhselect reads back 0 or 4 (which of the two is implementation-defined, so only that is recorded) |
2 types * 6 mhselect values |
Sdtrig_textra32_mhselect_no_h |
||
cp_textra_itrigger_mcontext |
An itrigger only fires when its textra condition is satisfied |
only run tests if S is supported, as cp_itrigger_s with x = 1 (supervisor software interrupt): |
Breakpoint into M just before the first instruction of the S-mode handler iff the context matches |
NTRIG * 2 per available context |
Sdtrig_itrigger_textra |
||
cp_textra_etrigger_mcontext |
An etrigger only fires when its textra condition is satisfied |
only run tests if S is supported, as cp_etrigger_s_deleg with x = 5 (load access fault): |
Breakpoint into M just before the first instruction of the S-mode handler iff the context matches |
NTRIG * 2 per available context |
Sdtrig_etrigger_textra |
||
cp_smode_fields_hardwired (not generated) |
NOT GENERATED: svalue/sselect "should" (not must) be tied to 0 without S-mode, so a hart that implements them is legal. |
svalue tied 0 if S-mode not supported |
1 |
Sdtrig_textra32_svalue_no_s |
Not generated: the textra tests do not check svalue/sselect on harts without S |
||
Actions: only action 0 (breakpoint) is tested here (sufficient for RVA23). Eventually add SdtrigSdext with action 1, SdtrigEtrace for Trace 2-4, SdtrigExternal for 8-9 |
|||||||
| Normative Rule | Rule Text | Coverpoints |
|---|---|---|
Sdtrig_num_trigs_ge1 |
SdtrigSm_access_cg/cp_csr_access_common, SdtrigSm_trig_module_reg_cg/cp_tselect_trigs |
|
Sdtrig_unimp_csr_illegal |
SdtrigSm_trig_module_reg_cg/cp_csr_unimplemented |
|
Sdtrig_csr_mode |
SdtrigSm_access_cg/cp_csr_access_common |
|
Sdtrig_no_debug_fires |
Requires Sdext external debug support; not implemented |
|
Sdtrig_actions |
Only action 0 (breakpoint) supported in this suite |
|
Sdtrig_action0 |
SdtrigSm_mcontrol6_cg/cp_mcontrol6_priv_mode, xepc is not checked: with SDTRIG_IMPRECISE_XEPC the trap handler does not record xEPC for breakpoints, because DUTs that do not follow the suggested trigger timing take them at another instruction; only the breakpoint exception is checked |
|
Sdtrig_action1 |
Requires Sdext external debug support; not implemented |
|
Sdtrig_action2 |
Trace action defined by the separate trace specification |
|
Sdtrig_action3 |
Trace action defined by the separate trace specification |
|
Sdtrig_action4 |
Trace action defined by the separate trace specification |
|
Sdtrig_action5_rsv |
Trace action defined by the separate trace specification |
|
Sdtrig_action8_9 |
Actions 8 and 9 drive TM external trigger outputs, which a test cannot observe |
|
Sdtrig_action_rsv |
Reserved encoding for future use; nothing to test |
|
Sdtrig_priority |
Trigger priority not tested; triggers assumed imprecise |
|
Sdtrig_non_precise_priority |
Trigger priority not tested; triggers assumed imprecise |
|
Sdtrig_chain_priority |
Trigger priority not tested; triggers assumed imprecise |
|
Sdtrig_multiple_fires |
Trigger priority not tested; triggers assumed imprecise |
|
Sdtrig_tval |
Which of several firing action=0 triggers sets tval is UNSPECIFIED; not tested |
|
Sdtrig_debug_breakpoint |
Needs action=1 (enter Debug Mode), which requires Sdext; not tested |
|
Sdtrig_simul_debug_breakpoint_fallback |
Needs action=1 (enter Debug Mode), which requires Sdext; not tested |
|
Sdtrig_hit_set_on_action0 |
Needs action=1 (enter Debug Mode), which requires Sdext; not tested |
|
Sdtrig_independent_trigs |
Concerns triggers with action 2 or more (trace or external outputs), which a test cannot observe |
|
Sdtrig_breakpoint_delegated |
SdtrigS_cg/cp_breakpoint_delegate_s, SdtrigU_cg/cp_breakpoint_delegate_u |
|
Sdtrig_Aext_lr_op |
SdtrigSm_a_cg/cp_lrsc_addr, SdtrigSm_a_cg/cp_lrsc_data |
|
Sdtrig_Aext_sc_op |
SdtrigSm_a_cg/cp_lrsc_addr, SdtrigSm_a_cg/cp_lrsc_data |
|
Sdtrig_Aext_sc_fail |
Behavior is UNSPECIFIED by the specification; not tested |
|
Sdtrig_AMO_read |
SdtrigSm_a_cg/cp_amo |
|
Sdtrig_AMO_read_addr |
SdtrigSm_a_cg/cp_amo |
|
Sdtrig_AMO_store |
SdtrigSm_a_cg/cp_amo |
|
Sdtrig_AMO_store_addr |
SdtrigSm_a_cg/cp_amo |
|
Sdtrig_AMO_store_match |
Behavior is UNSPECIFIED by the specification; not tested |
|
Sdtrig_load_zero_rd |
Behavior is UNSPECIFIED by the specification; not tested |
|
Sdtrig_mult_mem_access |
SdtrigSm_combined_accesses_cg/cp_vector_load_store, SdtrigSm_combined_accesses_cg/cp_vector_accesses, SdtrigSm_combined_accesses_cg/cp_vector_mask, cm.push/cm.pop not tested until Sail supports Zcmp (riscv/sail-riscv#730) |
|
Sdtrig_caches_stores_1 |
SdtrigSm_cache_operations_cg/cp_cache_zicbom, SdtrigSm_cache_operations_cg/cp_cache_zicboz |
|
Sdtrig_caches_stores_2 |
SdtrigSm_cache_operations_cg/cp_cache_zicbom, SdtrigSm_cache_operations_cg/cp_cache_zicboz |
|
Sdtrig_caches_stores_3 |
SdtrigSm_cache_operations_cg/cp_cache_zicbom, SdtrigSm_cache_operations_cg/cp_cache_zicboz |
|
Sdtrig_cache_compare |
SdtrigSm_cache_operations_cg/cp_cache_zicbom, SdtrigSm_cache_operations_cg/cp_cache_zicboz |
|
Sdtrig_cache_compare_opts |
SdtrigSm_cache_operations_cg/cp_cache_zicbom, SdtrigSm_cache_operations_cg/cp_cache_zicboz |
|
Sdtrig_cache_hints |
SdtrigSm_cache_operations_cg/cp_cache_zicbop |
|
Sdtrig_cache_clears |
SdtrigSm_cache_operations_cg/cp_cache_zicbom |
|
Sdtrig_cbo_zero |
SdtrigSm_cache_operations_cg/cp_cache_zicboz |
|
Sdtrig_prefetch |
SdtrigSm_cache_operations_cg/cp_cache_zicbop |
|
Sdtrig_tdata2_addr_sz1 |
SdtrigSm_address_matches_cg/cp_tdata2_translate, SdtrigS_address_matches_cg/cp_tdata2_translate |
|
Sdtrig_pmem |
SdtrigSm_address_matches_cg/cp_tdata2_translate |
|
Sdtrig_vmem |
SdtrigSm_address_matches_cg/cp_tdata2_translate, SdtrigSm_address_matches_cg/cp_tdata2_translate_exec, SdtrigS_address_matches_cg/cp_tdata2_translate, SdtrigS_address_matches_cg/cp_tdata2_translate_exec |
|
Sdtrig_csr_tdata2_sz2 |
SdtrigSm_address_matches_cg/cp_tdata2_translate, SdtrigSm_address_matches_cg/cp_tdata2_translate_exec, SdtrigS_address_matches_cg/cp_tdata2_translate, SdtrigS_address_matches_cg/cp_tdata2_translate_exec |
|
Sdtrig_csr_tdata2_invalid |
Recommendation (should), not a requirement; not tested |
|
Sdtrig_multistate_change |
Descriptive spec text with no separately testable behavior |
|
Sdtrig_tdata_warl |
SdtrigSm_access_cg/cp_csr_access_common, SdtrigSm_trig_module_reg_cg/cp_csr_access_local |
|
Sdtrig_tdata_write |
SdtrigSm_trig_module_reg_cg/cp_tdata_write |
|
Sdtrig_disable_trig |
SdtrigSm_trig_module_reg_cg/cp_tdata_write, SdtrigSm_trig_module_reg_cg/cp_csr_access_local, SdtrigSm_access_cg/cp_csr_access_common |
|
Sdtrig_unimplemented_register |
SdtrigSm_trig_module_reg_cg/cp_csr_unimplemented |
|
Sdtrig_trigger_modes |
SdtrigSm_trig_module_reg_cg/cp_csr_access_global, SdtrigSm_trig_module_reg_cg/cp_csr_access_local, SdtrigS_access_cg/cp_csr_access_trap_s, SdtrigU_access_cg/cp_csr_access_trap_u, From S and U, cp_csr_insufficient_priv of the S and U suites also reads every M-mode CSR (0x7A0-0x7A9 included) and expects an illegal instruction |
|
Sdtrig_xlen_handling |
XLEN-dependent behavior not tested; single XLEN assumed |
|
Sdtrig_fields |
XLEN-dependent behavior not tested; single XLEN assumed |
|
Sdtrig_fields_high |
XLEN-dependent behavior not tested; single XLEN assumed |
|
Sdtrig_xlen_modification |
XLEN-dependent behavior not tested; single XLEN assumed |
|
Sdtrig_tselect |
SdtrigSm_trig_module_reg_cg/cp_tselect_trigs |
|
Sdtrig_tselect_access |
SdtrigSm_trig_module_reg_cg/cp_tselect_trigs |
|
Sdtrig_tselect_warl |
WARL write-any-read-legal behavior not separately tested |
|
Sdtrig_tdata1 |
SdtrigSm_access_cg/cp_csr_access_common |
|
Sdtrig_tdata1_reset |
Reset values not tested in this suite |
|
Sdtrig_tdata1_write0 |
SdtrigSm_trig_module_reg_cg/cp_tdata_write, SdtrigSm_icount_cg/cp_icount_self_write |
|
Sdtrig_tdata1_multiple_types |
Recommendation (should), not a requirement; not tested |
|
Sdtrig_tdata1_type_disabled |
SdtrigSm_trig_module_reg_cg/cp_tdata_write |
|
Sdtrig_tdata1_type_rsv |
Reserved encoding for future use; nothing to test |
|
Sdtrig_tdata1_dmode_type_0 |
SdtrigSm_trig_module_reg_cg/cp_tselect_nonexistent, tselect is WARL and no DUT here keeps a nonexistent index (Sail 0.16 legalizes it to the last trigger), so the rule is checked only on a hart that keeps it |
|
Sdtrig_tdata1_dmode_0 |
SdtrigSm_access_cg/cp_csr_access_common |
|
Sdtrig_tdata1_dmode_1 |
Requires Sdext external debug support; not implemented |
|
Sdtrig_tdata1_dmode_writable |
SdtrigSm_trig_module_reg_cg/cp_tdata1_dmode |
|
Sdtrig_tdata1_data |
SdtrigSm_trig_module_reg_cg/cp_tselect_nonexistent, tselect is WARL and no DUT here keeps a nonexistent index (Sail 0.16 legalizes it to the last trigger), so the rule is checked only on a hart that keeps it |
|
Sdtrig_tdata2 |
SdtrigSm_access_cg/cp_csr_access_common |
|
Sdtrig_tdata2_reset |
Descriptive spec text with no separately testable behavior |
|
Sdtrig_tdata2_disabled |
SdtrigSm_trig_module_reg_cg/cp_tdata_write, SdtrigSm_trig_module_reg_cg/cp_csr_access_local |
|
Sdtrig_tdata2_sign_extend |
XLEN-dependent behavior not tested; single XLEN assumed |
|
Sdtrig_tdata3 |
SdtrigSm_access_cg/cp_csr_access_common |
|
Sdtrig_tdata3_reset |
Descriptive spec text with no separately testable behavior |
|
Sdtrig_tdata3_disabled |
SdtrigSm_trig_module_reg_cg/cp_tdata_write |
|
Sdtrig_tdata3_sign_extend |
XLEN-dependent behavior not tested; single XLEN assumed |
|
Sdtrig_tinfo |
SdtrigSm_access_cg/cp_csr_access_common |
|
Sdtrig_tinfo_reset |
Reset values not tested in this suite |
|
Sdtrig_tinfo_optional |
Only ratified version 1.0 supported; version assumed |
|
Sdtrig_tinfo_version |
SdtrigSm_trig_module_reg_cg/cp_tselect_trigs |
|
Sdtrig_tinfo_version_0 |
Only ratified version 1.0 supported; version assumed |
|
Sdtrig_tinfo_version_1 |
Only ratified version 1.0 supported; version assumed |
|
Sdtrig_tinfo_support |
SdtrigSm_trig_module_reg_cg/cp_tselect_trigs, SdtrigSm_trig_module_reg_cg/cp_tinfo_read_only |
|
Sdtrig_tinfo_no_trigger |
SdtrigSm_trig_module_reg_cg/cp_tselect_nonexistent, tselect is WARL and no DUT here keeps a nonexistent index (Sail 0.16 legalizes it to the last trigger), so the rule is checked only on a hart that keeps it |
|
Sdtrig_trigger_modes_1 |
SdtrigSm_access_cg/cp_csr_access_common, SdtrigSm_trig_module_reg_cg/cp_csr_access_global, SdtrigS_access_cg/cp_csr_access_trap_s, SdtrigU_access_cg/cp_csr_access_trap_u, The tcontrol accesses and bins need TCONTROL_IMPLEMENTED; from S and U, cp_csr_insufficient_priv of the S and U suites also reads tcontrol (0x7A5) and expects an illegal instruction |
|
Sdtrig_tcontrol_mpte |
SdtrigSm_tcontrol_cg/cp_tcontrol_mtrap |
|
Sdtrig_tcontrol_mte_disabled |
SdtrigSm_tcontrol_cg/cp_tcontrol_enable |
|
Sdtrig_tcontrol_mte_enabled |
SdtrigSm_tcontrol_cg/cp_tcontrol_enable |
|
Sdtrig_tcontrol_mte |
SdtrigSm_tcontrol_cg/cp_tcontrol_mtrap, SdtrigSm_icount_cg/cp_icount_trap_fire, mte = 0 while the M-mode handler runs is observed only on harts with Use_tcontrol, where the pending breakpoint of cp_icount_trap_fire must wait for the handler’s mret; cp_tcontrol_mtrap signs tcontrol after that mret, so it checks only that the trap copies mte to mpte |
|
Sdtrig_tcontrol_mte_mret |
SdtrigSm_tcontrol_cg/cp_tcontrol_mret |
|
Sdtrig_hcontext_implemented |
SdtrigSm_trig_module_reg_cg/cp_csr_unimplemented, Without H, hcontext is not implemented and raises an illegal instruction; behavior with H is deferred to the SdtrigH suite on the hypervisor branch |
|
Sdtrig_hcontext_access |
Needs H; deferred to the SdtrigH suite on the hypervisor branch |
|
Sdtrig_hcontext_smstateen |
Needs H; deferred to the SdtrigH suite on the hypervisor branch |
|
Sdtrig_hcontext |
Needs H; deferred to the SdtrigH suite on the hypervisor branch |
|
Sdtrig_scontext_access |
SdtrigSm_trig_module_reg_cg/cp_csr_access_global, Smstateen_cg/cp_context, From U, cp_csr_insufficient_priv of the U suite reads scontext (0x5A8) and expects an illegal instruction; VS-mode access is deferred to the SdtrigH suite on the hypervisor branch |
|
Sdtrig_scontext_accessibility |
Smstateen_cg/cp_context, hstateen0 (VS-mode access) is deferred to the SdtrigH suite on the hypervisor branch |
|
Sdtrig_scontext_data |
SdtrigSm_access_cg/cp_csr_access_common, SdtrigSm_textra_cg/cp_textra_scontext |
|
Sdtrig_mcontext_implementation |
Needs H; deferred to the SdtrigH suite on the hypervisor branch |
|
Sdtrig_mcontext_access |
SdtrigSm_trig_module_reg_cg/cp_csr_access_global, SdtrigS_access_cg/cp_csr_access_trap_s, SdtrigU_access_cg/cp_csr_access_trap_u, From S and U, cp_csr_insufficient_priv of the S and U suites also reads mcontext (0x7A8) and expects an illegal instruction |
|
Sdtrig_mcontext_hcontext_data |
SdtrigSm_access_cg/cp_csr_access_common, SdtrigSm_textra_cg/cp_textra_mcontext |
|
Sdtrig_mscontext |
Optional register, not required by Sdtrig 1.0; not tested |
|
Sdtrig_mscontext_access |
Optional register, not required by Sdtrig 1.0; not tested |
|
Sdtrig_mcontrol |
Deprecated mcontrol type 2 trigger; not implemented |
|
Sdtrig_mcontrol_reset |
Deprecated mcontrol type 2 trigger; not implemented |
|
Sdtrig_mcontrol_access |
Deprecated mcontrol type 2 trigger; not implemented |
|
Sdtrig_mcontrol_maskmax |
Deprecated mcontrol type 2 trigger; not implemented |
|
Sdtrig_mcontrol_sizehi |
Deprecated mcontrol type 2 trigger; not implemented |
|
Sdtrig_mcontrol_hit |
Deprecated mcontrol type 2 trigger; not implemented |
|
Sdtrig_mcontrol_select_address |
Deprecated mcontrol type 2 trigger; not implemented |
|
Sdtrig_mcontrol_select_data |
Deprecated mcontrol type 2 trigger; not implemented |
|
Sdtrig_mcontrol_timing_before |
Deprecated mcontrol type 2 trigger; not implemented |
|
Sdtrig_mcontrol_timing_multi |
Deprecated mcontrol type 2 trigger; not implemented |
|
Sdtrig_mcontrol_timing_after |
Deprecated mcontrol type 2 trigger; not implemented |
|
Sdtrig_mcontrol_timing_overlap |
Deprecated mcontrol type 2 trigger; not implemented |
|
Sdtrig_mcontrol_size_any |
Deprecated mcontrol type 2 trigger; not implemented |
|
Sdtrig_mcontrol_size_8bit |
Deprecated mcontrol type 2 trigger; not implemented |
|
Sdtrig_mcontrol_size_16bit |
Deprecated mcontrol type 2 trigger; not implemented |
|
Sdtrig_mcontrol_size_32bit |
Deprecated mcontrol type 2 trigger; not implemented |
|
Sdtrig_mcontrol_size_48bit |
Deprecated mcontrol type 2 trigger; not implemented |
|
Sdtrig_mcontrol_size_64bit |
Deprecated mcontrol type 2 trigger; not implemented |
|
Sdtrig_mcontrol_size_80bit |
Deprecated mcontrol type 2 trigger; not implemented |
|
Sdtrig_mcontrol_size_96bit |
Deprecated mcontrol type 2 trigger; not implemented |
|
Sdtrig_mcontrol_size_112bit |
Deprecated mcontrol type 2 trigger; not implemented |
|
Sdtrig_mcontrol_size_128bit |
Deprecated mcontrol type 2 trigger; not implemented |
|
Sdtrig_mcontrol_size_support |
Deprecated mcontrol type 2 trigger; not implemented |
|
Sdtrig_mcontrol_chain_disabled |
Deprecated mcontrol type 2 trigger; not implemented |
|
Sdtrig_mcontrol_chain_enabled |
Deprecated mcontrol type 2 trigger; not implemented |
|
Sdtrig_mcontrol_chain_start |
Deprecated mcontrol type 2 trigger; not implemented |
|
Sdtrig_mcontrol_chain_next |
Deprecated mcontrol type 2 trigger; not implemented |
|
Sdtrig_mcontrol_chain_ignore |
Deprecated mcontrol type 2 trigger; not implemented |
|
Sdtrig_mcontrol_match_equal |
Deprecated mcontrol type 2 trigger; not implemented |
|
Sdtrig_mcontrol_match_napot |
Deprecated mcontrol type 2 trigger; not implemented |
|
Sdtrig_mcontrol_match_ge |
Deprecated mcontrol type 2 trigger; not implemented |
|
Sdtrig_mcontrol_match_lt |
Deprecated mcontrol type 2 trigger; not implemented |
|
Sdtrig_mcontrol_match_mask_low |
Deprecated mcontrol type 2 trigger; not implemented |
|
Sdtrig_mcontrol_match_mask_high |
Deprecated mcontrol type 2 trigger; not implemented |
|
Sdtrig_mcontrol_match_not_equal |
Deprecated mcontrol type 2 trigger; not implemented |
|
Sdtrig_mcontrol_match_not_napot |
Deprecated mcontrol type 2 trigger; not implemented |
|
Sdtrig_mcontrol_match_not_mask_low |
Deprecated mcontrol type 2 trigger; not implemented |
|
Sdtrig_mcontrol_match_not_mask_high |
Deprecated mcontrol type 2 trigger; not implemented |
|
Sdtrig_mcontrol_match_rsv |
Deprecated mcontrol type 2 trigger; not implemented |
|
Sdtrig_mcontrol_comparisons |
Deprecated mcontrol type 2 trigger; not implemented |
|
Sdtrig_mcontrol_m |
Deprecated mcontrol type 2 trigger; not implemented |
|
Sdtrig_mcontrol_s |
Deprecated mcontrol type 2 trigger; not implemented |
|
Sdtrig_mcontrol_u |
Deprecated mcontrol type 2 trigger; not implemented |
|
Sdtrig_mcontrol_execute |
Deprecated mcontrol type 2 trigger; not implemented |
|
Sdtrig_mcontrol_store |
Deprecated mcontrol type 2 trigger; not implemented |
|
Sdtrig_mcontrol_load |
Deprecated mcontrol type 2 trigger; not implemented |
|
Sdtrig_mcontrol6 |
SdtrigSm_access_cg/cp_csr_access_common |
|
Sdtrig_mcontrol6_reset |
Descriptive spec text with no separately testable behavior |
|
Sdtrig_mcontrol6_access |
SdtrigSm_mcontrol6_cg/cp_mcontrol6_priv_mode |
|
Sdtrig_mcontrol6_dependence |
SdtrigSm_trig_module_reg_cg/cp_tselect_trigs |
|
Sdtrig_mcontrol6_chain |
SdtrigSm_mcontrol6_cg/cp_mcontrol6_chain_adr, SdtrigSm_mcontrol6_cg/cp_mcontrol6_chain_long |
|
Sdtrig_mcontrol6_breakpoint |
SdtrigSm_mcontrol6_cg/cp_mcontrol6_load_store_adr, SdtrigSm_mcontrol6_cg/cp_mcontrol6_execute_adr, The trap handler signs xtval on every breakpoint and checks it against the reference model, which is configured per DUT (xtval_nonzero.hardware_breakpoint) |
|
Sdtrig_mcontrol6_faulting_address |
SdtrigSm_mcontrol6_cg/cp_mcontrol6_load_store_adr, SdtrigSm_mcontrol6_cg/cp_mcontrol6_execute_adr, The trap handler signs xtval on every breakpoint and checks it against the reference model |
|
Sdtrig_mcontrol6_chained_faulting |
SdtrigSm_mcontrol6_cg/cp_mcontrol6_chain_adr, The trap handler signs xtval on every breakpoint and checks it against the reference model |
|
Sdtrig_mcontrol6_napot_range |
SdtrigSm_mcontrol6_cg/cp_mcontrol6_match_napot |
|
Sdtrig_mcontrol6_textra |
SdtrigSm_textra_cg/cp_textra_mcontext, SdtrigSm_textra_cg/cp_textra_scontext, SdtrigSm_textra_cg/cp_textra_double_context, SdtrigSm_textra_cg/cp_textra_asid |
|
Sdtrig_mcontrol6_uncertain |
Optional WARL field (hit/uncertain bits); not tested |
|
Sdtrig_mcontrol6_uncertain_0 |
Optional WARL field (hit/uncertain bits); not tested |
|
Sdtrig_mcontrol6_uncertain_1 |
Optional WARL field (hit/uncertain bits); not tested |
|
Sdtrig_mcontrol6_vs |
SdtrigSm_trig_module_reg_cg/cp_tdata1_mode_hardwired, Firing in VS-mode is deferred to the SdtrigH suite on the hypervisor branch |
|
Sdtrig_mcontrol6_vu |
SdtrigSm_trig_module_reg_cg/cp_tdata1_mode_hardwired, Firing in VU-mode is deferred to the SdtrigH suite on the hypervisor branch |
|
Sdtrig_mcontrol6_hit0 |
Optional WARL field (hit/uncertain bits); not tested |
|
Sdtrig_mcontrol6_hit0_unimplemented |
Optional WARL field (hit/uncertain bits); not tested |
|
Sdtrig_mcontrol6_hit0_1 |
xEPC timing rule: the tests do not check xEPC on trigger breakpoints (SDTRIG_IMPRECISE_XEPC); not tested |
|
Sdtrig_mcontrol6_hit0_2 |
xEPC timing rule: the tests do not check xEPC on trigger breakpoints (SDTRIG_IMPRECISE_XEPC); not tested |
|
Sdtrig_mcontrol6_hit0_3 |
xEPC timing rule: the tests do not check xEPC on trigger breakpoints (SDTRIG_IMPRECISE_XEPC); not tested |
|
Sdtrig_mcontrol6_hit0_multiple_accesses |
Trigger timing (the instruction’s accesses complete before the trap) is not observable from a test; not tested |
|
Sdtrig_mcontrol6_select_address |
SdtrigSm_mcontrol6_cg/cp_mcontrol6_execute_adr, SdtrigSm_mcontrol6_cg/cp_mcontrol6_load_store_adr |
|
Sdtrig_mcontrol6_select_data |
SdtrigSm_mcontrol6_cg/cp_mcontrol6_execute_data, SdtrigSm_mcontrol6_cg/cp_mcontrol6_load_store_data, SdtrigSm_mcontrol6_cg/cp_mcontrol6_size_data, SdtrigSm_mcontrol6_cg/cp_mcontrol6_match_size_store, SdtrigSm_mcontrol6_cg/cp_mcontrol6_match_size_load, SdtrigSm_mcontrol6_cg/cp_mcontrol6_match_size_execute, SdtrigSm_mcontrol6_cg/cp_mcontrol6_match_size_execute_other |
|
Sdtrig_mcontrol6_size_any |
SdtrigSm_mcontrol6_cg/cp_mcontrol6_execute_size, SdtrigSm_mcontrol6_cg/cp_mcontrol6_load_store_size |
|
Sdtrig_mcontrol6_size_8bit |
SdtrigSm_mcontrol6_cg/cp_mcontrol6_load_store_size, SdtrigSm_mcontrol6_cg/cp_mcontrol6_execute_size, SdtrigSm_mcontrol6_cg/cp_mcontrol6_execute_adr_size, SdtrigSm_mcontrol6_cg/cp_mcontrol6_size_data, SdtrigSm_mcontrol6_cg/cp_mcontrol6_match_size_store, SdtrigSm_mcontrol6_cg/cp_mcontrol6_match_size_load |
|
Sdtrig_mcontrol6_size_16bit |
SdtrigSm_mcontrol6_cg/cp_mcontrol6_execute_size, SdtrigSm_mcontrol6_cg/cp_mcontrol6_load_store_size, SdtrigSm_mcontrol6_cg/cp_mcontrol6_execute_adr_size, SdtrigSm_mcontrol6_cg/cp_mcontrol6_size_data, SdtrigSm_mcontrol6_cg/cp_mcontrol6_match_size_store, SdtrigSm_mcontrol6_cg/cp_mcontrol6_match_size_load, SdtrigSm_mcontrol6_cg/cp_mcontrol6_match_size_execute, SdtrigSm_mcontrol6_cg/cp_mcontrol6_match_size_execute_other, A select = 0 execute trigger with size = 2 on a 32-bit instruction is not tested: Sail 0.16 fires it (sail-riscv#2033, ACT #2921) |
|
Sdtrig_mcontrol6_size_32bit |
SdtrigSm_mcontrol6_cg/cp_mcontrol6_execute_size, SdtrigSm_mcontrol6_cg/cp_mcontrol6_load_store_size, SdtrigSm_mcontrol6_cg/cp_mcontrol6_execute_adr_size, SdtrigSm_mcontrol6_cg/cp_mcontrol6_size_data, SdtrigSm_mcontrol6_cg/cp_mcontrol6_match_size_store, SdtrigSm_mcontrol6_cg/cp_mcontrol6_match_size_load, SdtrigSm_mcontrol6_cg/cp_mcontrol6_match_size_execute, A select = 0 execute trigger with size = 3 on a 16-bit instruction is not tested: Sail 0.16 fires it (sail-riscv#2033, ACT #2921) |
|
Sdtrig_mcontrol6_size_48bit |
SdtrigSm_mcontrol6_cg/cp_mcontrol6_execute_size, SdtrigSm_mcontrol6_cg/cp_mcontrol6_execute_adr_size, Only that no 16- or 32-bit instruction matches is tested, on RV64: the tests have no 48-bit instruction, and on RV32 size = 4 is never written because Sail 0.16 disables a trigger whose size exceeds XLEN |
|
Sdtrig_mcontrol6_size_64bit |
SdtrigSm_mcontrol6_cg/cp_mcontrol6_execute_size, SdtrigSm_mcontrol6_cg/cp_mcontrol6_load_store_size, SdtrigSm_mcontrol6_cg/cp_mcontrol6_execute_adr_size, SdtrigSm_mcontrol6_cg/cp_mcontrol6_size_data, SdtrigSm_mcontrol6_cg/cp_mcontrol6_match_size_store, SdtrigSm_mcontrol6_cg/cp_mcontrol6_match_size_load, On RV32 size = 5 is never written, so 64-bit fld/fsd and vector accesses are not tested there: Sail 0.16 disables a trigger whose size exceeds XLEN (sail-riscv#2034, ACT #2921) |
|
Sdtrig_mcontrol6_size_128bit |
Not tested: size = 6 is never written, so flq/fsq and 128-bit vector accesses are not tested with it, because Sail 0.16 disables a trigger whose size exceeds XLEN (as in sail-riscv#2034) |
|
Sdtrig_mcontrol6_size_support |
SdtrigSm_mcontrol6_cg/cp_mcontrol6_load_store_size |
|
Sdtrig_mcontrol6_chain_disabled |
SdtrigSm_mcontrol6_cg/cp_mcontrol6_chain_adr |
|
Sdtrig_mcontrol6_chain_enabled |
SdtrigSm_mcontrol6_cg/cp_mcontrol6_chain_adr, SdtrigSm_mcontrol6_cg/cp_mcontrol6_chain_long |
|
Sdtrig_mcontrol6_chain_start |
SdtrigSm_mcontrol6_cg/cp_mcontrol6_chain_adr, SdtrigSm_mcontrol6_cg/cp_mcontrol6_chain_long |
|
Sdtrig_mcontrol6_chain_next |
Requires Debug Mode writes; needs Sdext support |
|
Sdtrig_mcontrol6_chain_ignore |
Requires Debug Mode writes; needs Sdext support |
|
Sdtrig_mcontrol6_match_equal |
SdtrigSm_mcontrol6_cg/cp_mcontrol6_match, SdtrigSm_mcontrol6_cg/cp_mcontrol6_match_size_store, SdtrigSm_mcontrol6_cg/cp_mcontrol6_match_size_load, SdtrigSm_mcontrol6_cg/cp_mcontrol6_match_size_execute |
|
Sdtrig_mcontrol6_match_napot |
SdtrigSm_mcontrol6_cg/cp_mcontrol6_match_napot, SdtrigSm_mcontrol6_cg/cp_mcontrol6_match_size_store, SdtrigSm_mcontrol6_cg/cp_mcontrol6_match_size_load, SdtrigSm_mcontrol6_cg/cp_mcontrol6_match_size_execute |
|
Sdtrig_mcontrol6_match_napot_mask |
SdtrigSm_mcontrol6_cg/cp_mcontrol6_napot_allones |
|
Sdtrig_mcontrol6_match_napot_legal |
SdtrigSm_mcontrol6_cg/cp_mcontrol6_match_napot |
|
Sdtrig_mcontrol6_match_ge |
SdtrigSm_mcontrol6_cg/cp_mcontrol6_match, SdtrigSm_mcontrol6_cg/cp_mcontrol6_match_size_store, SdtrigSm_mcontrol6_cg/cp_mcontrol6_match_size_load, SdtrigSm_mcontrol6_cg/cp_mcontrol6_match_size_execute |
|
Sdtrig_mcontrol6_match_lt |
SdtrigSm_mcontrol6_cg/cp_mcontrol6_match, SdtrigSm_mcontrol6_cg/cp_mcontrol6_match_size_store, SdtrigSm_mcontrol6_cg/cp_mcontrol6_match_size_load, SdtrigSm_mcontrol6_cg/cp_mcontrol6_match_size_execute |
|
Sdtrig_mcontrol6_match_mask_low |
SdtrigSm_mcontrol6_cg/cp_mcontrol6_match_mask, SdtrigSm_mcontrol6_cg/cp_mcontrol6_match_size_store, SdtrigSm_mcontrol6_cg/cp_mcontrol6_match_size_load, SdtrigSm_mcontrol6_cg/cp_mcontrol6_match_size_execute |
|
Sdtrig_mcontrol6_match_mask_high |
SdtrigSm_mcontrol6_cg/cp_mcontrol6_match_mask, SdtrigSm_mcontrol6_cg/cp_mcontrol6_match_size_store, SdtrigSm_mcontrol6_cg/cp_mcontrol6_match_size_load, SdtrigSm_mcontrol6_cg/cp_mcontrol6_match_size_execute |
|
Sdtrig_mcontrol6_match_not_equal |
SdtrigSm_mcontrol6_cg/cp_mcontrol6_match, SdtrigSm_mcontrol6_cg/cp_mcontrol6_match_size_store, SdtrigSm_mcontrol6_cg/cp_mcontrol6_match_size_load, SdtrigSm_mcontrol6_cg/cp_mcontrol6_match_size_execute |
|
Sdtrig_mcontrol6_match_not_napot |
SdtrigSm_mcontrol6_cg/cp_mcontrol6_match_napot, SdtrigSm_mcontrol6_cg/cp_mcontrol6_match_size_store, SdtrigSm_mcontrol6_cg/cp_mcontrol6_match_size_load, SdtrigSm_mcontrol6_cg/cp_mcontrol6_match_size_execute |
|
Sdtrig_mcontrol6_match_not_mask_low |
SdtrigSm_mcontrol6_cg/cp_mcontrol6_match_mask, SdtrigSm_mcontrol6_cg/cp_mcontrol6_match_size_store, SdtrigSm_mcontrol6_cg/cp_mcontrol6_match_size_load, SdtrigSm_mcontrol6_cg/cp_mcontrol6_match_size_execute |
|
Sdtrig_mcontrol6_match_not_mask_high |
SdtrigSm_mcontrol6_cg/cp_mcontrol6_match_mask, SdtrigSm_mcontrol6_cg/cp_mcontrol6_match_size_store, SdtrigSm_mcontrol6_cg/cp_mcontrol6_match_size_load, SdtrigSm_mcontrol6_cg/cp_mcontrol6_match_size_execute |
|
Sdtrig_mcontrol6_match_rsv |
Reserved encoding for future use; nothing to test |
|
Sdtrig_mcontrol6_comparisons |
SdtrigSm_mcontrol6_cg/cp_mcontrol6_size_data, SdtrigSm_mcontrol6_cg/cp_mcontrol6_match_size_store, SdtrigSm_mcontrol6_cg/cp_mcontrol6_match_size_load, SdtrigSm_mcontrol6_cg/cp_mcontrol6_match_size_execute, Compares at a narrower current-mode XLEN need a writable UXL/SXL; not tested |
|
Sdtrig_mcontrol6_m |
SdtrigSm_mcontrol6_cg/cp_mcontrol6_priv_mode |
|
Sdtrig_mcontrol6_uncertainen_disabled |
Optional WARL field (hit/uncertain bits); not tested |
|
Sdtrig_mcontrol6_uncertainen_enabled |
Optional WARL field (hit/uncertain bits); not tested |
|
Sdtrig_mcontrol6_s |
SdtrigS_mcontrol6_cg/cp_mcontrol6_priv_bits_s, SdtrigS_cg/cp_breakpoint_s, SdtrigSm_trig_module_reg_cg/cp_tdata1_mode_hardwired, SdtrigS_mcontrol6_cg/cp_mcontrol6_execute_adr, SdtrigS_mcontrol6_cg/cp_mcontrol6_load_store_adr |
|
Sdtrig_mcontrol6_u |
SdtrigU_mcontrol6_cg/cp_mcontrol6_priv_bits_u, SdtrigU_cg/cp_breakpoint_u, SdtrigSm_trig_module_reg_cg/cp_tdata1_mode_hardwired, SdtrigU_mcontrol6_cg/cp_mcontrol6_execute_adr, SdtrigU_mcontrol6_cg/cp_mcontrol6_load_store_adr |
|
Sdtrig_mcontrol6_execute |
SdtrigSm_mcontrol6_cg/cp_mcontrol6_execute_adr, SdtrigSm_mcontrol6_cg/cp_mcontrol6_execute_data, SdtrigSm_mcontrol6_cg/cp_mcontrol6_load_store_adr, SdtrigSm_mcontrol6_cg/cp_mcontrol6_load_store_data |
|
Sdtrig_mcontrol6_store |
SdtrigSm_mcontrol6_cg/cp_mcontrol6_load_store_adr, SdtrigSm_mcontrol6_cg/cp_mcontrol6_load_store_data, SdtrigSm_mcontrol6_cg/cp_mcontrol6_execute_adr, SdtrigSm_mcontrol6_cg/cp_mcontrol6_execute_data |
|
Sdtrig_mcontrol6_load |
SdtrigSm_mcontrol6_cg/cp_mcontrol6_load_store_adr, SdtrigSm_mcontrol6_cg/cp_mcontrol6_load_store_data, SdtrigSm_mcontrol6_cg/cp_mcontrol6_execute_adr, SdtrigSm_mcontrol6_cg/cp_mcontrol6_execute_data |
|
Sdtrig_icount |
SdtrigSm_access_cg/cp_csr_access_common |
|
Sdtrig_icount_reset |
Descriptive spec text with no separately testable behavior |
|
Sdtrig_icount_access |
SdtrigSm_icount_cg/cp_icount_instr |
|
Sdtrig_icount_match1 |
SdtrigSm_icount_cg/cp_icount_instr, SdtrigSm_icount_cg/cp_icount_instr_fire |
|
Sdtrig_icount_match2 |
SdtrigSm_icount_cg/cp_icount_trap, SdtrigSm_icount_cg/cp_icount_trap_fire |
|
Sdtrig_icount_multiple_match |
Not tested: the trap cases use count = 1, where a second match in the same instruction is not visible, and with count > 1 whether the M-mode handler’s instructions are counted depends on the reentrancy option |
|
Sdtrig_icount_match_non_reexecuted |
SdtrigSm_icount_cg/cp_icount_trap, SdtrigSm_icount_cg/cp_icount_trap_fire |
|
Sdtrig_icount_all_traps_match |
SdtrigSm_icount_cg/cp_icount_trap, SdtrigSm_icount_cg/cp_icount_trap_fire |
|
Sdtrig_icount_match_gt1 |
SdtrigSm_icount_cg/cp_icount_instr, SdtrigSm_icount_cg/cp_icount_instr_fire |
|
Sdtrig_icount_match_eq1 |
SdtrigSm_icount_cg/cp_icount_trap, SdtrigSm_icount_cg/cp_icount_trap_fire, SdtrigSm_icount_cg/cp_icount_hardwired |
|
Sdtrig_icount_exception |
SdtrigSm_icount_cg/cp_icount_self_write |
|
Sdtrig_icount_count_zero |
SdtrigSm_icount_cg/cp_icount_eq0 |
|
Sdtrig_icount_pending |
SdtrigSm_icount_cg/cp_icount_instr, SdtrigSm_icount_cg/cp_icount_eq0, SdtrigSm_icount_cg/cp_icount_eq0_fire, SdtrigSm_icount_cg/cp_icount_trap_fire, SdtrigSm_icount_cg/cp_icount_hardwired |
|
Sdtrig_icount_action0 |
SdtrigSm_icount_cg/cp_icount_instr, SdtrigSm_icount_cg/cp_icount_instr_fire, SdtrigSm_icount_cg/cp_icount_trap_fire, SdtrigSm_icount_cg/cp_icount_eq0_fire |
|
Sdtrig_icount_case |
Descriptive spec text with no separately testable behavior |
|
Sdtrig_icount_textra |
SdtrigSm_textra_cg/cp_textra_mcontext, SdtrigSm_textra_cg/cp_textra_scontext, SdtrigSm_textra_cg/cp_textra_double_context, SdtrigSm_textra_cg/cp_textra_asid |
|
Sdtrig_icount_vs |
Needs H; deferred to the SdtrigH suite on the hypervisor branch |
|
Sdtrig_icount_vu |
Needs H; deferred to the SdtrigH suite on the hypervisor branch |
|
Sdtrig_icount_hit |
hit is optional and not checked (masked out of the tdata1 readback); fire/no-fire is checked through rvtest_trap_count |
|
Sdtrig_icount_m |
SdtrigSm_icount_cg/cp_icount_instr |
|
Sdtrig_icount_pending_set |
SdtrigSm_icount_cg/cp_icount_trap, SdtrigSm_icount_cg/cp_icount_trap_fire |
|
Sdtrig_icount_s |
SdtrigS_cg/cp_breakpoint_s, SdtrigS_icount_cg/cp_icount_instr, SdtrigS_icount_cg/cp_icount_instr_fire, No case with only the other modes' bits set yet |
|
Sdtrig_icount_u |
SdtrigU_cg/cp_breakpoint_u, SdtrigU_icount_cg/cp_icount_instr, SdtrigU_icount_cg/cp_icount_instr_fire, No case with only the other modes' bits set yet |
|
Sdtrig_itrigger |
SdtrigSm_access_cg/cp_csr_access_common |
|
Sdtrig_itrigger_reset |
Descriptive spec text with no separately testable behavior |
|
Sdtrig_itrigger_access |
SdtrigSm_access_cg/cp_csr_access_common |
|
Sdtrig_itrigger_fire |
SdtrigSm_itrigger_cg/cp_itrigger_s, SdtrigSm_itrigger_cg/cp_itrigger_u |
|
Sdtrig_itrigger_enable_num |
SdtrigSm_itrigger_cg/cp_itrigger_s, SdtrigSm_itrigger_cg/cp_itrigger_s_other, SdtrigSm_itrigger_cg/cp_itrigger_u, SdtrigSm_itrigger_cg/cp_itrigger_u_other |
|
Sdtrig_itrigger_enable_nmi |
A test cannot raise a non-maskable interrupt (NMIs come from outside the hart); not tested |
|
Sdtrig_itrigger_xlen32 |
XLEN-dependent behavior not tested; single XLEN assumed |
|
Sdtrig_itrigger_timing |
SdtrigSm_itrigger_cg/cp_itrigger_s, SdtrigSm_itrigger_cg/cp_itrigger_u |
|
Sdtrig_itrigger_action0 |
SdtrigSm_itrigger_cg/cp_itrigger_s, SdtrigSm_itrigger_cg/cp_itrigger_u |
|
Sdtrig_itrigger_textra |
SdtrigSm_textra_cg/cp_textra_itrigger_mcontext, SdtrigSm_textra_cg/cp_textra_itrigger_scontext |
|
Sdtrig_itrigger_hit |
Optional WARL field (hit/uncertain bits); not tested |
|
Sdtrig_itrigger_vs |
Needs H; deferred to the SdtrigH suite on the hypervisor branch |
|
Sdtrig_itrigger_vu |
Needs H; deferred to the SdtrigH suite on the hypervisor branch |
|
Sdtrig_itrigger_nmi |
A test cannot raise a non-maskable interrupt (NMIs come from outside the hart); not tested |
|
Sdtrig_itrigger_m |
SdtrigSm_itrigger_cg/cp_itrigger_m, SdtrigSm_itrigger_cg/cp_itrigger_m_other, Only that the trigger does not fire is checked: with action = 0 a trap handled in M never fires it (mstatus.MIE or tcontrol.mte is 0 in the handler under both reentrancy options) |
|
Sdtrig_itrigger_s |
SdtrigSm_itrigger_cg/cp_itrigger_s, SdtrigSm_itrigger_cg/cp_itrigger_s_other, SdtrigS_itrigger_cg/cp_itrigger_s, SdtrigS_itrigger_cg/cp_itrigger_s_other |
|
Sdtrig_itrigger_u |
SdtrigSm_itrigger_cg/cp_itrigger_u, SdtrigSm_itrigger_cg/cp_itrigger_u_other, SdtrigU_itrigger_cg/cp_itrigger_u, SdtrigU_itrigger_cg/cp_itrigger_u_other |
|
Sdtrig_etrigger |
SdtrigSm_access_cg/cp_csr_access_common |
|
Sdtrig_etrigger_reset |
Descriptive spec text with no separately testable behavior |
|
Sdtrig_etrigger_access |
SdtrigSm_access_cg/cp_csr_access_common |
|
Sdtrig_etrigger_fire |
Descriptive spec text with no separately testable behavior |
|
Sdtrig_etrigger_config |
SdtrigSm_etrigger_cg/cp_etrigger_s_deleg, SdtrigSm_etrigger_cg/cp_etrigger_s_other, SdtrigSm_etrigger_cg/cp_etrigger_u_deleg, SdtrigSm_etrigger_cg/cp_etrigger_u_other |
|
Sdtrig_etrigger_xlen32 |
XLEN-dependent behavior not tested; single XLEN assumed |
|
Sdtrig_etrigger_timing |
SdtrigSm_etrigger_cg/cp_etrigger_s_deleg, SdtrigSm_etrigger_cg/cp_etrigger_u_deleg |
|
Sdtrig_etrigger_action0 |
SdtrigSm_etrigger_cg/cp_etrigger_s_deleg, SdtrigSm_etrigger_cg/cp_etrigger_u_deleg |
|
Sdtrig_etrigger_textra |
SdtrigSm_textra_cg/cp_textra_etrigger_mcontext, SdtrigSm_textra_cg/cp_textra_etrigger_scontext |
|
Sdtrig_etrigger_hit |
Optional WARL field (hit/uncertain bits); not tested |
|
Sdtrig_etrigger_vs |
Needs H; deferred to the SdtrigH suite on the hypervisor branch |
|
Sdtrig_etrigger_vu |
Needs H; deferred to the SdtrigH suite on the hypervisor branch |
|
Sdtrig_etrigger_m |
SdtrigSm_etrigger_cg/cp_etrigger_m, SdtrigSm_etrigger_cg/cp_etrigger_m_other, Only that the trigger does not fire is checked: with action = 0 a trap handled in M never fires it (mstatus.MIE or tcontrol.mte is 0 in the handler under both reentrancy options) |
|
Sdtrig_etrigger_s |
SdtrigSm_etrigger_cg/cp_etrigger_s, SdtrigSm_etrigger_cg/cp_etrigger_s_deleg, SdtrigSm_etrigger_cg/cp_etrigger_s_other, SdtrigS_etrigger_cg/cp_etrigger_s, SdtrigS_etrigger_cg/cp_etrigger_s_other |
|
Sdtrig_etrigger_u |
SdtrigSm_etrigger_cg/cp_etrigger_u, SdtrigSm_etrigger_cg/cp_etrigger_u_deleg, SdtrigSm_etrigger_cg/cp_etrigger_u_other, SdtrigU_etrigger_cg/cp_etrigger_u, SdtrigU_etrigger_cg/cp_etrigger_u_other |
|
Sdtrig_tmexttrigger |
External trigger inputs are implementation-specific and unspecified |
|
Sdtrig_tmexttrigger_reset |
External trigger inputs are implementation-specific and unspecified |
|
Sdtrig_tmexttrigger_access |
External trigger inputs are implementation-specific and unspecified |
|
Sdtrig_tmexttrigger_fire |
External trigger inputs are implementation-specific and unspecified |
|
Sdtrig_tmexttrigger_inputs |
External trigger inputs are implementation-specific and unspecified |
|
Sdtrig_tmexttrigger_subset |
External trigger inputs are implementation-specific and unspecified |
|
Sdtrig_tmexttrigger_unsupported |
External trigger inputs are implementation-specific and unspecified |
|
Sdtrig_tmexttrigger_action0 |
External trigger inputs are implementation-specific and unspecified |
|
Sdtrig_tmexttrigger_async |
External trigger inputs are implementation-specific and unspecified |
|
Sdtrig_tmexttrigger_prevented |
External trigger inputs are implementation-specific and unspecified |
|
Sdtrig_tmexttrigger_pending |
External trigger inputs are implementation-specific and unspecified |
|
Sdtrig_tmexttrigger_hit |
External trigger inputs are implementation-specific and unspecified |
|
Sdtrig_tmexttrigger_intctl |
External trigger inputs are implementation-specific and unspecified |
|
Sdtrig_tmexttrigger_select |
External trigger inputs are implementation-specific and unspecified |
|
Sdtrig_textra32 |
SdtrigSm_access_cg/cp_csr_access_common |
|
Sdtrig_textra32_reset |
Descriptive spec text with no separately testable behavior |
|
Sdtrig_textra32_access |
SdtrigSm_textra_cg/cp_textra_mcontext, SdtrigSm_textra_cg/cp_textra_scontext, SdtrigSm_textra_cg/cp_textra_double_context |
|
Sdtrig_textra32_dxlen64 |
Needs a narrower XLEN view of textra64 (mixed XLEN), which the tests do not switch to; not tested |
|
Sdtrig_textra32_byte_granular |
SdtrigSm_textra_cg/cp_textra_scontext |
|
Sdtrig_textra32_byte_mask_applies |
SdtrigSm_textra_cg/cp_textra_scontext, SdtrigSm_textra_cg/cp_textra_asid_sbytemask, SdtrigS_textra_cg/cp_textra_asid_sbytemask |
|
Sdtrig_textra32_filter_modes |
SdtrigSm_textra_cg/cp_textra_mcontext, SdtrigSm_textra_cg/cp_textra_scontext, SdtrigS_textra_cg/cp_textra_mcontext, SdtrigS_textra_cg/cp_textra_scontext, SdtrigU_textra_cg/cp_textra_mcontext, SdtrigU_textra_cg/cp_textra_scontext |
|
Sdtrig_textra32_mhselect_ignore |
SdtrigSm_textra_cg/cp_textra_double_context |
|
Sdtrig_textra32_mhselect_mcontext |
SdtrigSm_textra_cg/cp_textra_mcontext, SdtrigSm_textra_cg/cp_textra_double_context |
|
Sdtrig_textra32_mhselect_mctx_sel |
Needs H; deferred to the SdtrigH suite on the hypervisor branch |
|
Sdtrig_textra32_mhselect_vmid_sel |
Needs H; deferred to the SdtrigH suite on the hypervisor branch |
|
Sdtrig_textra32_mhselect_rsv |
Reserved encoding for future use; nothing to test |
|
Sdtrig_textra32_mhselect_no_h |
SdtrigSm_textra_cg/cp_textra_mhselect_no_h |
|
Sdtrig_textra32_sbytemask |
SdtrigSm_textra_cg/cp_textra_scontext, SdtrigSm_textra_cg/cp_textra_scontext_all |
|
Sdtrig_textra32_svalue_no_s |
Recommendation (should), not a requirement; not tested |
|
Sdtrig_textra32_sselect_ignore |
SdtrigSm_textra_cg/cp_textra_double_context |
|
Sdtrig_textra32_sselect_scontext |
SdtrigSm_textra_cg/cp_textra_scontext, SdtrigSm_textra_cg/cp_textra_double_context |
|
Sdtrig_textra32_sselect_asid1 |
SdtrigSm_textra_cg/cp_textra_asid, SdtrigS_textra_cg/cp_textra_asid |
|
Sdtrig_textra32_sselect_asid2 |
vsatp ASID matching in VS/VU-mode needs H; deferred to the SdtrigH suite on the hypervisor branch |
|
Sdtrig_textra32_sselect_asid3 |
SdtrigSm_textra_cg/cp_textra_asid, SdtrigS_textra_cg/cp_textra_asid |
|
Sdtrig_textra32_sselect_no_s |
Recommendation (should), not a requirement; not tested |
|
Sdtrig_textra64 |
SdtrigSm_access_cg/cp_csr_access_common |
|
Sdtrig_textra64_reset |
Descriptive spec text with no separately testable behavior |
|
Sdtrig_textra64_access |
SdtrigSm_textra_cg/cp_textra_mcontext, SdtrigSm_textra_cg/cp_textra_scontext |
|
Sdtrig_textra64_retain |
XLEN-dependent behavior not tested; single XLEN assumed |
|
Sdtrig_textra64_xlen32 |
XLEN-dependent behavior not tested; single XLEN assumed |
|
Sdtrig_textra64_byte_granular |
SdtrigSm_textra_cg/cp_textra_scontext |
|
Sdtrig_textra64_byte_mask_applies |
SdtrigSm_textra_cg/cp_textra_scontext, SdtrigSm_textra_cg/cp_textra_asid_sbytemask, SdtrigS_textra_cg/cp_textra_asid_sbytemask |
|
Sdtrig_textra64_sbytemask |
SdtrigSm_textra_cg/cp_textra_scontext, SdtrigSm_textra_cg/cp_textra_scontext_all |
UDB Parameters: None.
As of 10/22/26, the SdtrigSm, SdtrigS and SdtrigU tests and coverpoints exercise the mcontrol6, icount, itrigger and etrigger trigger types, textra,
access to the trigger registers, and address matching on scalar, compressed, atomic, vector, cache-block and translated accesses.
Most Sdtrig features are optional, so the tests take every DUT-specific fact from the Sdtrig parameters of the DUT’s UDB configuration.
SDTRIG_NUM_TRIGGERS gives the number of triggers; the tests exercise up to 16 of them.
For each trigger, SDTRIG_<TYPE>_SUPPORTED_TRIGGERS says whether it supports each type (mcontrol6, icount, itrigger, etrigger).
Other parameters give the writable tdata1 fields (SDTRIG_MCONTROL6_{SELECT,EXECUTE,LOAD,STORE}_WRITABLE, SDTRIG_{M,S,U,VS,VU}_WRITABLE), the legal mcontrol6 match and size values, maskmax6 and the maximum chain length, the interrupts and exceptions itrigger and etrigger can select, the icount options, the textra context matches and value widths, and which optional CSRs (tcontrol, tdata2, tdata3, mcontext, scontext, hcontext) exist.
A test is generated only for values the DUT supports, so a hart with fewer features is still tested, and every absent optional CSR is checked to raise an illegal-instruction exception.
Sail 0.16, the reference model, accepts mcontrol6 sizes only up to XLEN bits, so larger sizes are not tested. TODO: change this when Sail supports larger sizes in the next release.
uncertainen and uncertain are vague and implementation-specific and are thus not tested. hit varies based on timing and is
optional and difficult to check so is presently not tested. Only action=0 is tested because the others depend on Sdext or trace or
implementation-specific external triggers.
dmode is not tested in Sdtrig because it depends on Sdext. hcontext depends on the Hypervisor extension, so the Access tests touch it only on configurations that implement it. Non-maskable interrupts
are not tested because they are not part of RVA23.
mcontrol has been replaced by mcontrol6, so it is deprecated and not tested. mscontext is only for backward compatibility with Sdtrig 0.13 and is not tested.
Trigger Re-entrancy and What Can Be Tested
A trigger with action=0 raises a breakpoint exception.
If that exception is taken while the hart is already in a trap handler, it overwrites xepc and xcause, and the hart cannot return from the original trap.
Sdtrig gives harts two ways to prevent this:
-
Interrupt enables. No trigger with
action=0 matches or fires in M-mode whilemstatus.MIE=0. Ifmedeleg[3]=1, none matches or fires in S-mode whilesstatus.SIE=0, and the same rule applies in VS-mode withhedeleg[3] andvsstatus.SIE. -
tcontrol. No trigger with
action=0 matches or fires in M-mode whiletcontrol.MTE=0. A trap into M-mode copies MTE to MPTE and clears MTE, andmretcopies MPTE back to MTE.medeleg[3] is read-only zero.
Taking a trap clears MIE, SIE or MTE, depending on the method and the mode the trap enters. This decides what the tests can observe, and it affects the two kinds of trigger differently:
-
mcontrol6 and icount fire synchronously in the mode that is executing. The test controls the enable bits there, so it can make the trigger fire or not.
-
etrigger and itrigger fire just before the first instruction of the trap handler. By then the trap has already cleared the enable bit of the mode it entered.
The table below shows when an action=0 trigger can fire.
For mcontrol6 and icount, the column is the mode the trigger matches in.
For etrigger and itrigger, it is the mode the trap is taken from, which the trigger’s m/s/u bits select.
VS-mode and VU-mode behave like S-mode and U-mode, with hedeleg[3] and vsstatus.SIE in place of medeleg[3] and sstatus.SIE.
| Trigger | M-mode (either method) |
S/U-mode, medeleg[3]=0(either method; breakpoint taken to M) |
S/U-mode, medeleg[3]=1(interrupt enables only; breakpoint taken to S) |
|---|---|---|---|
mcontrol6, icount |
Fires when MIE=1 (interrupt enables) or MTE=1 (tcontrol); suppressed otherwise |
Always fires |
S: fires when SIE=1, suppressed when SIE=0. U: always fires. |
etrigger, itrigger |
Never fires, because the trap is handled in M and has cleared MIE or MTE |
Fires if the exception or interrupt is delegated to S; never fires if it is handled in M |
Never fires, because the trap into S has cleared SIE |
Every cell is a constraint of the specification, not of the test suite. The specification states the "never fires" cells directly: "Both options prevent etrigger and itrigger from having any effect on exceptions and interrupts that are handled in M-mode." The consequences for the tests are:
-
mcontrol6 and icount can be tested firing and suppressed in every mode under both methods. The tests set MIE=1 to arm the trigger in M-mode, and also MTE=1 when the DUT’s UDB configuration sets
SDTRIG_BREAKPOINT_REENTRANCYtoUse_tcontrol, withmie=0 so that no interrupt is taken. They set SIE=1 to arm it in S-mode whenmedeleg[3]=1. They exercisemedeleg[3]=1 to check breakpoints taken to S. -
etrigger and itrigger can be shown to fire only for an exception or interrupt that is raised in S or U and delegated to S, while
medeleg[3]=0.-
In every other case, the tests can only check that the trigger stays silent. This includes
tdata1.m=1, a cause that is not delegated, an M-level interrupt, and an etrigger on the breakpoint exception itself. -
A hart without S-mode handles every trap in M. On such a hart, etrigger and itrigger with
action=0 never fire, under either method.
-
-
Some expected outcomes depend on the method the hart implements. An example is an exception delegated to S while
medeleg[3] has its boot value of 1: under interrupt enables the trigger is suppressed, but under tcontrolmedeleg[3] reads 0 and the trigger fires into M. The tests therefore name bins by stimulus rather than by expected outcome. The reference model is configured with the DUT’s method. In this repository, the Spike and Whisper configurations without S-mode use tcontrol. The other Spike, Whisper and Sail configurations use interrupt enables, and so does Imperas, whose configurations settcontrol_undefined=T. -
The specification says harts should implement one of the two methods, so a hart may implement neither. On such a hart, a trigger that fires in an M-mode trap handler overwrites
mepcandmcause, and the test cannot recover. The tests assume one of the two methods.
The three suites start in different modes.
SdtrigSm boots to M-mode and can change medeleg.
SdtrigS and SdtrigU boot to S-mode and U-mode, and keep the boot value of medeleg[3]: 1 on a hart that uses interrupt enables, and read-only 0 on a hart that uses tcontrol.
The exception is their breakpoint-delegation test, which switches to M-mode to clear and then set medeleg[3] and fires mcontrol6 and icount triggers each way.
SdtrigSm arms its M-mode triggers with MIE=1, and with MTE=1 when SDTRIG_BREAKPOINT_REENTRANCY is Use_tcontrol.
SdtrigS arms its triggers with SIE=1.
SdtrigSm reaches S-mode and U-mode only in the etrigger and itrigger tests, which clear medeleg[3] first.
The tables below show what each suite then exercises.
| Trigger | SdtrigSm | SdtrigS | SdtrigU |
|---|---|---|---|
mcontrol6, icount |
Fires in M-mode; breakpoint taken from M to M |
Fires in S-mode; breakpoint taken from S to M ( |
Fires in U-mode; breakpoint taken to M ( |
etrigger, itrigger |
Raised in M-mode: suppressed.
Raised in S-mode or U-mode with |
Suppressed: handled in S with SIE=0 and |
Suppressed, as for SdtrigS |
| Trigger | SdtrigSm | SdtrigS | SdtrigU |
|---|---|---|---|
mcontrol6, icount |
Fires in M-mode, where the tests set MTE; breakpoint taken from M to M |
Fires in S-mode; breakpoint taken from S to M |
Fires in U-mode; breakpoint taken from U to M |
etrigger, itrigger |
As on a hart that uses interrupt enables |
Fires into M if delegated to S; suppressed if handled in M |
As for SdtrigS; suppressed on a hart without S-mode |
So the outcome differs between the two kinds of hart in four of the six cells. Each kind of hart leaves some cases unexercised, but none of these gaps comes from the specification:
-
SdtrigS and SdtrigU (
cp_breakpoint_delegate_s/u) fire mcontrol6 and icount triggers in S-mode and U-mode withmedeleg[3]=0 and withmedeleg[3]=1, so on a hart that uses interrupt enables a breakpoint is also taken from S or U to M. -
The tests read the reentrancy method from
SDTRIG_BREAKPOINT_REENTRANCYand whethertcontrolexists fromTCONTROL_IMPLEMENTED. Thetcontroltests check that a trap into M-mode copies MTE to MPTE and clears MTE and thatmretcopies MPTE to MTE on every hart withtcontrol, and that MTE gates M-mode triggers on a hart that usestcontrolfor reentrancy. -
On a hart that uses interrupt enables, etrigger and itrigger never fire in SdtrigS or SdtrigU, because those suites keep
medeleg[3]=1 for these tests. They fire only in SdtrigSm, which clearsmedeleg[3] first. SdtrigS and SdtrigU could clearmedeleg[3] from M-mode, as their breakpoint-delegation test does.
SdtrigS
Tests run in S-mode with tdata1.s = 1, and the rows mirrored from SdtrigSm read S-mode for M-mode. The trigger CSRs are accessed through T-SBI, so those accesses run in M-mode; cp_csr_access_trap_s instead accesses them directly from S-mode, which traps The trigger-module register rows, cp_tdata2_translate, cp_textra_mhselect_no_h and the icount readbacks are sampled on those M-mode accesses, as in SdtrigSm. cp_csr_access_common runs only in SdtrigSm: through T-SBI it would make the same M-mode accesses medeleg[3] = 1 (breakpoints from triggers are taken in S-mode) unless the hart has no S-mode or hard-wires it to 0 (tcontrol); then they are taken in M-mode. Other assumptions are inherited from SdtrigSm Only SdtrigSm runs cp_csr_unimplemented (an M-mode access to an absent CSR), the itrigger/etrigger cases taken from M and the cross-privilege cases that need medeleg[3] = 0 while the source trap is delegated (cp_itrigger_u, cp_etrigger_s_deleg/u/u_deleg, cp_textra_itrigger_*, cp_textra_etrigger_*). Here an itrigger or etrigger fires on a trap handled in S only on harts using tcontrol, so cp_itrigger_s and cp_etrigger_s record the trap and the tdata1.s setting, and the signature checks the outcome
| Coverpoint | Goal | Feature Description | Expectation | Bins | Normative Rule | Notes |
|---|---|---|---|---|---|---|
Access |
||||||
cp_csr_access_trap_s |
The M-level trigger CSRs are not accessible from S-mode |
For x in {tselect, tdata1, tdata2, tdata3, tinfo}, and tcontrol if UDB_TCONTROL_IMPLEMENTED and mcontext if UDB_MCONTEXT_IMPLEMENTED: |
Illegal instruction exception on every access (into S-mode when medeleg[2] = 1, else into M-mode) |
2 accesses * implemented M-level trigger CSRs (5-7) |
Sdtrig_trigger_modes |
|
Native Triggers |
||||||
cp_breakpoint_s |
Triggers enabled for S-mode fire in S-mode |
For each of UDB_SDTRIG_NUM_TRIGGERS in tselect, for each supported trigger type in {icount, mcontrol6}: |
Breakpoint exception taken from S-mode (into S-mode when medeleg[3] = 1, else into M-mode) |
NUM_TRIGGERS * 2 types |
Sdtrig_mcontrol6_s |
|
cp_breakpoint_delegate_s |
Breakpoints caused by triggers can be delegated |
if S_SUPPORTED |
Breakpoint exception taken into M when medeleg[3] = 0 and into S when medeleg[3] = 1 |
NUM_TRIGGERS * 2 types * 2 medeleg |
Sdtrig_breakpoint_delegated |
|
A Extension |
Repeat for each of UDB_SDTRIG_NUM_TRIGGERS if UDB_SDTRIG_MCONTROL6_SUPPORTED_TRIGGERS[i]: |
|||||
cp_lrsc_addr |
lr instructions are loads |
if ZALRSC_SUPPORTED |
Breakpoint exception when mem access address matches tdata2 and |
if RV32: |
Sdtrig_Aext_lr_op |
|
cp_lrsc_data |
lr instructions are loads |
if ZALRSC_SUPPORTED |
Breakpoint exception when mem access data matches tdata2 and |
2 tdata2 * 3 XSL * 2 ops (lr/sc of XLEN width; size=0 data matches are defined only for XLEN-wide accesses) |
Sdtrig_Aext_lr_op |
|
cp_amo |
Amo is a load for the read portion and a store for the write portion |
if ZAAMO_SUPPORTED |
Breakpoint exception if load or store are set and the access address matches tdata2 |
2 address * 3 XSL * 9 (RV64 18) AMOs |
Sdtrig_AMO_read |
|
Notes: |
||||||
Combined Accesses |
Repeat for each of UDB_SDTRIG_NUM_TRIGGERS if UDB_SDTRIG_MCONTROL6_SUPPORTED_TRIGGERS[i]: |
UDB_VECTOR_SEW |
||||
cp_vector_load_store |
Accesses match as if it performed a load/store of size SEW |
if ZVL32B_SUPPORTED |
Breakpoint exception if the tdata2 matches a address in the vector store and tdata1.size = SEW or 0 |
2 address * legal sizes (up to 7) * 4 SEW * 2 ops |
Sdtrig_mult_mem_access |
|
cp_vector_accesses |
Accesses match as if happened individually |
if ZVL32B_SUPPORTED |
Breakpoint exception if the tdata2 = scratch |
3 address * 2 Vector Lengths * 4 SEW * 2 ops |
Sdtrig_mult_mem_access |
|
cp_vector_mask |
Masked vector operations do not match |
if ZVL32B_SUPPORTED |
Breakpoint exception when the element at tdata2 is active |
2 mask states * 4 SEW * 2 ops |
Sdtrig_mult_mem_access |
|
Cache Operations |
Repeat for each of UDB_SDTRIG_NUM_TRIGGERS if UDB_SDTRIG_MCONTROL6_SUPPORTED_TRIGGERS[i]: |
Sdtrig_caches_stores_1 |
||||
cp_cache_zicbom |
cbo.clean, cbo.flush, and cbo.inval match as if they are stores |
if ZICBOM_SUPPORTED |
Breakpoint exception when tdata2 = scratch and store = 1 and size = 0 and select = 0 |
4 addrs * 2 selects * legal sizes (up to 7) * 3 XSL * 3 ops |
Sdtrig_cache_clears |
|
cp_cache_zicboz |
cbo.zero matches as if it is a store |
if ZICBOZ_SUPPORTED |
Breakpoint exception when tdata2 = scratch and store = 1 and size = 0 and select = 0 |
4 addrs * 2 selects * legal sizes (up to 7) * 3 XSL |
Sdtrig_cbo_zero |
|
cp_cache_zicbop |
The prefetch instructions don’t match at all. |
if ZICBOP_SUPPORTED |
No exceptions |
2 values * 2 selects * 3 ops |
Sdtrig_prefetch |
|
Address Matches |
||||||
cp_tdata2_translate |
tdata2 can hold valid addresses in all supported translation modes |
For each of UDB_SDTRIG_NUM_TRIGGERS in tselect if UDB_SDTRIG_MCONTROL6_SUPPORTED_TRIGGERS[i]: |
Read value matches written |
NTRIG * (1 + 2 * supported VA modes) |
Sdtrig_tdata2_addr_sz1 |
|
cp_tdata2_translate_exec |
An execute trigger matches the virtual address of a translated fetch, not its physical address |
for each mode in {Sv39, Sv48, Sv57 on RV64, Sv32 on RV32} if supported: |
Breakpoint with xepc = the alias VA iff tdata2 = VA |
NTRIG * supported VA modes * 2 |
Sdtrig_vmem |
|
Trigger Module Registers |
||||||
cp_tdata_write |
Writes to one tdata register must not modify the contents of other tdata registers. Note: type 15 allow any supported value to be written to tdata2/3 |
For each of UDB_SDTRIG_NUM_TRIGGERS in tselect |
No exceptions |
3 |
Sdtrig_tdata_write |
coverpoint drafted: 9/10 |
cp_csr_access_global |
The Trigger Module registers, except scontext, and hcontext, are only accessible in machine and Debug Mode |
For x register in {tselect, and tcontrol, mcontext, scontext, hcontext if UDB_x_IMPLEMENTED}: |
No exceptions |
1 + implemented global registers, * 2 values |
Sdtrig_trigger_modes |
coverpoint drafted: 9/10 |
cp_csr_access_local |
The Trigger Module registers are only accessible in machine and Debug Mode |
each of UDB_SDTRIG_NUM_TRIGGERS in tselect: |
No exceptions |
NUM_TRIGGERS * 4 regs * 2 values |
Sdtrig_trigger_modes |
|
cp_tselect_trigs |
The set of triggers must start at 0 and be contiguous |
For tselect = 0 to UDB_SDTRIG_NUM_TRIGGERS -1 |
No exceptions |
NUM_TRIGGERS |
Sdtrig_num_trigs_ge1 |
coverpoint drafted: 9/10 |
cp_tdata1_mode_hardwired |
Non supported mode bits are hardwired zero |
For each of UDB_SDTRIG_NUM_TRIGGERS in tselect: |
Writable mode bits read back 1 and the bits of modes the hart lacks read back 0 after writing all-ones |
NTRIGGERS |
Sdtrig_mcontrol6_s |
coverpoint drafted: 9/10 |
cp_tdata1_dmode |
dmode is writable only from Debug Mode |
For each of UDB_SDTRIG_NUM_TRIGGERS in tselect, for each supported type in {icount, mcontrol6}: |
dmode reads back 0 after an M-mode write of 1 |
NTRIGGERS * 2 types |
Sdtrig_tdata1_dmode_writable |
|
cp_tinfo_read_only |
Writing tinfo has no effect |
For each of UDB_SDTRIG_NUM_TRIGGERS in tselect: |
Writing tinfo has no effect |
NTRIGGERS |
Sdtrig_tinfo_support |
coverpoint drafted: 9/10 |
Mcontrol6 tests: test fire and don’t fire for each scenario |
Repeat for each of UDB_SDTRIG_NUM_TRIGGERS if UDB_SDTRIG_MCONTROL6_SUPPORTED_TRIGGERS[i]: |
|||||
cp_mcontrol6_priv_bits_s |
An mcontrol6 trigger fires in S-mode only when its s bit is set |
For each of UDB_SDTRIG_NUM_TRIGGERS in tselect: |
Breakpoint exception when tdata1.s = 1 |
NUM_TRIGGERS * 2 (own bit and fired, other bits only and not fired) |
Sdtrig_mcontrol6_s |
|
cp_mcontrol6_execute_adr |
tdata2 = {PC address of add x0, x1, x2/0} |
Breakpoint exception on PC of add x0, x1, x2 if tdata2 points to it and tdata1.execute = 1 |
2 values * 8 XSL |
Sdtrig_mcontrol6_s |
comments on test results: Exceptions on triggers when execute = 1 |
|
cp_mcontrol6_load_store_adr |
tdata2 = {scratch/scratch+8/0} |
Breakpoint exception on LW if access address matches tdata2 and tdata1.load = 1 |
3 addresses * 8 XSL * 2 ops * 2 offsets |
Sdtrig_mcontrol6_s |
comments on test results: Exceptions when XSL = 2 or 1 when tdata2 = scratch |
|
cp_mcontrol6_execute_data |
tdata2 = {addi x0, x1, 0 opcode (0x00008013)/0x2} |
Breakpoint exception on fetched instruction if tdata2 matches opcode and tdata1.execute = 1 |
2 values * 8 XSL |
Sdtrig_mcontrol6_select_data |
comments on test results: Exceptions when tdata2 = 0x00008013, and execute = 1 |
|
cp_mcontrol6_load_store_data |
tdata2 = {random XLEN-wide value / the same value with bit 0 (RV32) or bit 32 (RV64) flipped} |
Breakpoint exception on the load if access data matches tdata2 and tdata1.load = 1 |
8 XSL * 2 ops (tdata2 values not binned because the data a load reads is not visible to coverage) |
Sdtrig_mcontrol6_select_data |
comments on test results: Exceptions when td2 = the stored value, and XSL = 1/2/3 |
|
cp_mcontrol6_execute_size |
tdata2 = {addi x0, x1, 0 opcode/c.nop opcode} |
Breakpoint exception if the size of the instruction matches the trigger size in mcontrol6 and tdata1.execute = 1 |
2 values * legal sizes (up to 7) * 2 ops |
Sdtrig_mcontrol6_size_8bit |
comments on test results: Exceptions when td2 = op, size = 0. Note: warls size to zero |
|
cp_mcontrol6_load_store_size |
tdata2 = {scratch/0} |
Breakpoint exception if the size of the memory access matches the trigger size in mcontrol6 |
2 values * legal sizes (up to 5) * up to 36 instructions |
Sdtrig_mcontrol6_size_8bit |
Sizes 4 (48-bit) and 6 (128-bit) are not tested; size 6 is never written (Sail 0.16 disables sizes above XLEN) |
|
cp_mcontrol6_match |
Test boundaries for match conditions |
tdata1.select = 1 (data) |
Breakpoint exception if the store data meets the condition set by tdata1.match |
legal matches (up to 4) * 5 ops |
Sdtrig_mcontrol6_match_equal |
|
cp_mcontrol6_match_napot |
tdata1.select = 1 (data) |
Breakpoint exception if the store data meets the condition set by tdata1.match |
legal matches (up to 2) * min(UDB_SDTRIG_MCONTROL6_MASKMAX6, XLEN-1) values * 3 ops |
Sdtrig_mcontrol6_match_napot |
||
cp_mcontrol6_match_mask |
tdata1.select = 1 (data) |
Breakpoint exception if the store data meets the condition set by tdata1.match |
legal matches (up to 4) * 11 values |
Sdtrig_mcontrol6_match_mask_low |
||
cp_mcontrol6_match_size_store |
Every legal match crossed with every legal size on a select = 1 store trigger in S-mode |
As SdtrigSm cp_mcontrol6_match_size_store, with tdata1.s = 1 and the stores executed in S-mode. |
As SdtrigSm cp_mcontrol6_match_size_store |
NTRIG * legal matches * legal sizes * {fired, not fired, other width} |
Sdtrig_mcontrol6_comparisons |
|
cp_mcontrol6_match_size_load |
Every legal match crossed with every legal size on a select = 1 load trigger in S-mode |
As SdtrigSm cp_mcontrol6_match_size_load, with tdata1.s = 1 and the loads executed in S-mode. |
As SdtrigSm cp_mcontrol6_match_size_load |
NTRIG * legal matches * legal sizes * {fired, not fired, other width} |
Sdtrig_mcontrol6_comparisons |
|
MControl6 Chain |
Repeat for each of UDB_SDTRIG_NUM_TRIGGERS if UDB_SDTRIG_MCONTROL6_SUPPORTED_TRIGGERS[i] and UDB_SDTRIG_MCONTROL6_SUPPORTED_TRIGGERS[i+1]: |
|||||
cp_mcontrol6_chain_adr |
Trigger i (Tselect = i): |
Breakpoint exception from final trigger in chain if all triggers match simultaneously |
2 store values * 2 addresses |
Sdtrig_mcontrol6_chain_start |
comments on test results: Be careful of order when setting up chain, enable chain last |
|
Notes: |
||||||
uncertain and uncertainen not tested because optional and unpredictable |
||||||
vs, vu deferred to SdtrigH |
||||||
hit not tested because optional and implementation-dependent |
||||||
action other than 0 not tested until those features are supported (e.g. SdtrigSdext/SdtrigTrace) |
||||||
Icount tests: test fire and don’t fire for each scenario |
Repeat for each of UDB_SDTRIG_NUM_TRIGGERS if UDB_SDTRIG_ICOUNT_SUPPORTED_TRIGGERS[i]: |
|||||
cp_icount_hardwired |
if UDB_SDTRIG_ICOUNT_COUNT_HARDWIRED_1 (imperas-rv64-max; cp_icount_instr, cp_icount_eq0 and cp_icount_self_write |
breakpoint exception occurs, |
1 |
Sdtrig_icount_match_eq1 |
||
cp_icount_instr |
tdata.pending = 0 |
Count decreases when the instruction retires after having been fetched in S-mode and tdata1.s = 1. Tval=0 after firing, pending=0 after firing. |
2 priv bits (tdata1 readback: s clear and count unchanged, s set and counted to 0) |
Sdtrig_icount_s |
||
cp_icount_instr_fire |
icount fires after count instructions |
cp_icount_instr with tdata1.s = 1: the breakpoint taken while the icount trigger armed with count = 9 is selected |
Breakpoint exception with tval = 0, before the instruction after the 9th |
1 |
Sdtrig_icount_s |
|
cp_icount_trap |
tdata1.count = 1 |
Count decreases when a trap is taken from a privilege mode where the trigger is enabled |
2 priv bits (tdata1 readback: s clear and count unchanged, s set and counted to 0) |
Sdtrig_icount_match2 |
||
cp_icount_trap_fire |
A trap taken in a mode where the trigger is enabled is counted, and pending fires after the handler returns |
cp_icount_trap with tdata1.s = 1: the breakpoint taken on the xRET that returns from the illegal-instruction trap |
Breakpoint exception on return from the trap handler |
1 |
Sdtrig_icount_match2 |
|
cp_icount_eq0 |
tdata1.pending = {0/1} |
Count stays at 0 until explicitly written |
2 pending (tdata1 readback: count stays 0, pending cleared) |
Sdtrig_icount_count_zero |
||
cp_icount_eq0_fire |
A pending icount trigger fires before the next instruction |
cp_icount_eq0 with tdata1.pending = 1: the breakpoint taken on return to S-mode after the CSRW that writes count = 0, pending = 1 |
Breakpoint exception before the next S-mode instruction (after the T-SBI return); pending is cleared |
1 |
Sdtrig_icount_pending |
|
Itrigger tests: test fire and don’t fire for each scenario |
Repeat for each of UDB_SDTRIG_NUM_TRIGGERS if UDB_SDTRIG_ITRIGGER_SUPPORTED_TRIGGERS[i]: |
|||||
cp_itrigger_s |
An itrigger is evaluated on a selected interrupt taken from S-mode and handled in S |
tdata2[x] = 1 for x in {1,5,9,13} if INTERRUPTx_SUPPORTED |
No breakpoint when tdata1.s = 0. With tdata1.s = 1 the trigger matches as the trap is taken; the breakpoint |
NTRIG * 4 interrupts * 2 s bits |
Sdtrig_itrigger_s |
|
cp_itrigger_s_other |
An itrigger does not fire on an interrupt tdata2 does not select |
as cp_itrigger_s, taking another delegated S-level interrupt (5, or 1 when x = 5) instead of x |
No breakpoint |
NTRIG * 2 s bits |
Sdtrig_itrigger_s |
|
Etrigger tests: test fire and don’t fire for each scenario |
Repeat for each of UDB_SDTRIG_NUM_TRIGGERS if UDB_SDTRIG_ETRIGGER_SUPPORTED_TRIGGERS[i]: |
|||||
cp_etrigger_s |
An etrigger is evaluated on a selected exception raised in S-mode |
tdata2[x] = 1 for x in {1,2,5,7,9, and 12,13,15 with Sv} |
No breakpoint when tdata1.s = 0, or when the exception is handled in M (ecall from S). |
NTRIG * 8 exceptions * 2 s bits |
Sdtrig_etrigger_s |
|
cp_etrigger_s_other |
An etrigger does not fire on an exception tdata2 does not select |
tdata2[x] = 1 for each x above and x in {0,3,4,6} and the other modes' ecalls, tdata1.s = {0/1} |
No breakpoint |
NTRIG * 2 s bits |
Sdtrig_etrigger_s |
|
Textra tests: test fire and don’t fire for each scenario |
Repeat for each of UDB_SDTRIG_NUM_TRIGGERS if UDB_TDATA3_IMPLEMENTED: |
|||||
cp_textra_mcontext |
only run tests if MCONTEXT_IMPLEMENTED: |
Breakpoint exception if mhvalue equals mcontext |
3 mhvalues * 2 trigger types (icount, mcontrol6) |
Sdtrig_textra32_filter_modes |
||
cp_textra_scontext |
only run tests if SCONTEXT_IMPLEMENTED: |
Breakpoint exception when svalue equals scontext and mask ignores A’s |
if RV32: |
Sdtrig_textra32_filter_modes |
||
cp_textra_scontext_all |
With every scontext byte masked, the scontext compare always matches |
only run tests if SCONTEXT_IMPLEMENTED: |
Breakpoint exception for every svalue |
2 trigger types |
||
cp_textra_double_context |
only run tests if MCONTEXT_IMPLEMENTED and SCONTEXT_IMPLEMENTED: |
Breakpoint exception when all enabled context numbers match |
2 mhselect * 2 sselect * 2 mhvalue * 2 svalue |
Sdtrig_textra32_mhselect_mcontext |
||
cp_textra_asid |
only run tests if SDTRIG_TEXTRA_SSELECT_ASID_MATCH, ASID_WIDTH >= 2, SDTRIG_TEXTRA_SVALUE_LEN >= ASID_WIDTH, and Sv39 (RV64) or Sv32 (RV32) is supported. |
Breakpoint exception if ASID in satp equals the lower ASIDMAX bits of svalue. |
2 types * 2 asid_match |
Sdtrig_textra32_sselect_asid1 |
||
cp_textra_asid_sbytemask |
sbytemask applies only with sselect = 1 |
as cp_textra_asid, with tdata3.sbytemask = all ones (RV32 11, RV64 1111) and tdata3.svalue = {X / X^1} |
Breakpoint exception if ASID in satp equals the lower ASIDMAX bits of svalue. |
2 types * 2 asid_match |
Sdtrig_textra32_byte_mask_applies |
|
cp_textra_mhselect_no_h |
Without H, mhselect holds only 0 or 4 |
only run tests if H is not supported; the tdata3 accesses run in M-mode (through T-SBI in SdtrigS). |
mhselect reads back 0 or 4 (which of the two is implementation-defined, so only that is recorded) |
2 types * 6 mhselect values |
Sdtrig_textra32_mhselect_no_h |
|
Actions: only action 0 (breakpoint) is tested here (sufficient for RVA23). Eventually add SdtrigSdext with action 1, SdtrigEtrace for Trace 2-4, SdtrigExternal for 8-9 |
||||||
SdtrigU
Tests run in U-mode with tdata1.u = 1, and the rows mirrored from SdtrigSm read U-mode for M-mode. The trigger CSRs are accessed through T-SBI, so those accesses run in M-mode; cp_csr_access_trap_u instead accesses them directly from U-mode, which traps. The icount readbacks are sampled on those M-mode accesses, as in SdtrigSm medeleg[3] = 1 (breakpoints from triggers are taken in S-mode) unless the hart has no S-mode or hard-wires it to 0 (tcontrol); then they are taken in M-mode. Other assumptions are inherited from SdtrigSm cp_csr_access_common runs only in SdtrigSm. The trigger-module register tests, cp_tdata2_translate/exec, cp_textra_asid/_asid_sbytemask and cp_textra_mhselect_no_h run in SdtrigSm and SdtrigS: their accesses run in M-mode or need S-mode paging. Only SdtrigSm runs cp_csr_unimplemented and the itrigger/etrigger cases that need traps handled in M or medeleg[3] = 0 (cp_itrigger_m/s, cp_etrigger_m/s/_deleg, cp_textra_itrigger*, cp_textra_etrigger_*). Here an itrigger or etrigger fires on a trap handled in S only on harts using tcontrol, so cp_itrigger_u and cp_etrigger_u record the trap and the tdata1.u setting, and the signature checks the outcome
| Coverpoint | Goal | Feature Description | Expectation | Bins | Normative Rule | Notes |
|---|---|---|---|---|---|---|
Access |
||||||
cp_csr_access_trap_u |
The M-level trigger CSRs are not accessible from U-mode |
For x in {tselect, tdata1, tdata2, tdata3, tinfo}, and tcontrol if UDB_TCONTROL_IMPLEMENTED and mcontext if UDB_MCONTEXT_IMPLEMENTED: |
Illegal instruction exception on every access (into S-mode when medeleg[2] = 1, else into M-mode) |
2 accesses * implemented M-level trigger CSRs (5-7) |
Sdtrig_trigger_modes |
|
Native Triggers |
||||||
cp_breakpoint_u |
Triggers enabled for U-mode fire in U-mode |
For each of UDB_SDTRIG_NUM_TRIGGERS in tselect, for each supported trigger type in {icount, mcontrol6}: |
Breakpoint exception taken from U-mode (into S-mode when medeleg[3] = 1, else into M-mode) |
NUM_TRIGGERS * 2 types |
Sdtrig_mcontrol6_u |
|
cp_breakpoint_delegate_u |
Breakpoints caused by triggers can be delegated |
if S_SUPPORTED |
Breakpoint exception taken into M when medeleg[3] = 0 and into S when medeleg[3] = 1 |
NUM_TRIGGERS * 2 types * 2 medeleg |
Sdtrig_breakpoint_delegated |
|
A Extension |
Repeat for each of UDB_SDTRIG_NUM_TRIGGERS if UDB_SDTRIG_MCONTROL6_SUPPORTED_TRIGGERS[i]: |
|||||
cp_lrsc_addr |
lr instructions are loads |
if ZALRSC_SUPPORTED |
Breakpoint exception when mem access address matches tdata2 and |
if RV32: |
Sdtrig_Aext_lr_op |
|
cp_lrsc_data |
lr instructions are loads |
if ZALRSC_SUPPORTED |
Breakpoint exception when mem access data matches tdata2 and |
2 tdata2 * 3 XSL * 2 ops (lr/sc of XLEN width; size=0 data matches are defined only for XLEN-wide accesses) |
Sdtrig_Aext_lr_op |
|
cp_amo |
Amo is a load for the read portion and a store for the write portion |
if ZAAMO_SUPPORTED |
Breakpoint exception if load or store are set and the access address matches tdata2 |
2 address * 3 XSL * 9 (RV64 18) AMOs |
Sdtrig_AMO_read |
|
Notes: |
||||||
Combined Accesses |
Repeat for each of UDB_SDTRIG_NUM_TRIGGERS if UDB_SDTRIG_MCONTROL6_SUPPORTED_TRIGGERS[i]: |
UDB_VECTOR_SEW |
||||
cp_vector_load_store |
Accesses match as if it performed a load/store of size SEW |
if ZVL32B_SUPPORTED |
Breakpoint exception if the tdata2 matches a address in the vector store and tdata1.size = SEW or 0 |
2 address * legal sizes (up to 7) * 4 SEW * 2 ops |
Sdtrig_mult_mem_access |
|
cp_vector_accesses |
Accesses match as if happened individually |
if ZVL32B_SUPPORTED |
Breakpoint exception if the tdata2 = scratch |
3 address * 2 Vector Lengths * 4 SEW * 2 ops |
Sdtrig_mult_mem_access |
|
cp_vector_mask |
Masked vector operations do not match |
if ZVL32B_SUPPORTED |
Breakpoint exception when the element at tdata2 is active |
2 mask states * 4 SEW * 2 ops |
Sdtrig_mult_mem_access |
|
Cache Operations |
Repeat for each of UDB_SDTRIG_NUM_TRIGGERS if UDB_SDTRIG_MCONTROL6_SUPPORTED_TRIGGERS[i]: |
Sdtrig_caches_stores_1 |
||||
cp_cache_zicbom |
cbo.clean, cbo.flush, and cbo.inval match as if they are stores |
if ZICBOM_SUPPORTED |
Breakpoint exception when tdata2 = scratch and store = 1 and size = 0 and select = 0 |
4 addrs * 2 selects * legal sizes (up to 7) * 3 XSL * 3 ops |
Sdtrig_cache_clears |
|
cp_cache_zicboz |
cbo.zero matches as if it is a store |
if ZICBOZ_SUPPORTED |
Breakpoint exception when tdata2 = scratch and store = 1 and size = 0 and select = 0 |
4 addrs * 2 selects * legal sizes (up to 7) * 3 XSL |
Sdtrig_cbo_zero |
|
cp_cache_zicbop |
The prefetch instructions don’t match at all. |
if ZICBOP_SUPPORTED |
No exceptions |
2 values * 2 selects * 3 ops |
Sdtrig_prefetch |
|
Mcontrol6 tests: test fire and don’t fire for each scenario |
Repeat for each of UDB_SDTRIG_NUM_TRIGGERS if UDB_SDTRIG_MCONTROL6_SUPPORTED_TRIGGERS[i]: |
|||||
cp_mcontrol6_priv_bits_u |
An mcontrol6 trigger fires in U-mode only when its u bit is set |
For each of UDB_SDTRIG_NUM_TRIGGERS in tselect: |
Breakpoint exception when tdata1.u = 1 |
NUM_TRIGGERS * 2 (own bit and fired, other bits only and not fired) |
Sdtrig_mcontrol6_u |
|
cp_mcontrol6_execute_adr |
tdata2 = {PC address of add x0, x1, x2/0} |
Breakpoint exception on PC of add x0, x1, x2 if tdata2 points to it and tdata1.execute = 1 |
2 values * 8 XSL |
Sdtrig_mcontrol6_u |
comments on test results: Exceptions on triggers when execute = 1 |
|
cp_mcontrol6_load_store_adr |
tdata2 = {scratch/scratch+8/0} |
Breakpoint exception on LW if access address matches tdata2 and tdata1.load = 1 |
3 addresses * 8 XSL * 2 ops * 2 offsets |
Sdtrig_mcontrol6_u |
comments on test results: Exceptions when XSL = 2 or 1 when tdata2 = scratch |
|
cp_mcontrol6_execute_data |
tdata2 = {addi x0, x1, 0 opcode (0x00008013)/0x2} |
Breakpoint exception on fetched instruction if tdata2 matches opcode and tdata1.execute = 1 |
2 values * 8 XSL |
Sdtrig_mcontrol6_select_data |
comments on test results: Exceptions when tdata2 = 0x00008013, and execute = 1 |
|
cp_mcontrol6_load_store_data |
tdata2 = {random XLEN-wide value / the same value with bit 0 (RV32) or bit 32 (RV64) flipped} |
Breakpoint exception on the load if access data matches tdata2 and tdata1.load = 1 |
8 XSL * 2 ops (tdata2 values not binned because the data a load reads is not visible to coverage) |
Sdtrig_mcontrol6_select_data |
comments on test results: Exceptions when td2 = the stored value, and XSL = 1/2/3 |
|
cp_mcontrol6_execute_size |
tdata2 = {addi x0, x1, 0 opcode/c.nop opcode} |
Breakpoint exception if the size of the instruction matches the trigger size in mcontrol6 and tdata1.execute = 1 |
2 values * legal sizes (up to 7) * 2 ops |
Sdtrig_mcontrol6_size_8bit |
comments on test results: Exceptions when td2 = op, size = 0. Note: warls size to zero |
|
cp_mcontrol6_load_store_size |
tdata2 = {scratch/0} |
Breakpoint exception if the size of the memory access matches the trigger size in mcontrol6 |
2 values * legal sizes (up to 5) * up to 36 instructions |
Sdtrig_mcontrol6_size_8bit |
Sizes 4 (48-bit) and 6 (128-bit) are not tested; size 6 is never written (Sail 0.16 disables sizes above XLEN) |
|
cp_mcontrol6_match |
Test boundaries for match conditions |
tdata1.select = 1 (data) |
Breakpoint exception if the store data meets the condition set by tdata1.match |
legal matches (up to 4) * 5 ops |
Sdtrig_mcontrol6_match_equal |
|
cp_mcontrol6_match_napot |
tdata1.select = 1 (data) |
Breakpoint exception if the store data meets the condition set by tdata1.match |
legal matches (up to 2) * min(UDB_SDTRIG_MCONTROL6_MASKMAX6, XLEN-1) values * 3 ops |
Sdtrig_mcontrol6_match_napot |
||
cp_mcontrol6_match_mask |
tdata1.select = 1 (data) |
Breakpoint exception if the store data meets the condition set by tdata1.match |
legal matches (up to 4) * 11 values |
Sdtrig_mcontrol6_match_mask_low |
||
cp_mcontrol6_match_size_store |
Every legal match crossed with every legal size on a select = 1 store trigger in U-mode |
As SdtrigSm cp_mcontrol6_match_size_store, with tdata1.u = 1 and the stores executed in U-mode. |
As SdtrigSm cp_mcontrol6_match_size_store |
NTRIG * legal matches * legal sizes * {fired, not fired, other width} |
Sdtrig_mcontrol6_comparisons |
|
cp_mcontrol6_match_size_load |
Every legal match crossed with every legal size on a select = 1 load trigger in U-mode |
As SdtrigSm cp_mcontrol6_match_size_load, with tdata1.u = 1 and the loads executed in U-mode. |
As SdtrigSm cp_mcontrol6_match_size_load |
NTRIG * legal matches * legal sizes * {fired, not fired, other width} |
Sdtrig_mcontrol6_comparisons |
|
MControl6 Chain |
Repeat for each of UDB_SDTRIG_NUM_TRIGGERS if UDB_SDTRIG_MCONTROL6_SUPPORTED_TRIGGERS[i] and UDB_SDTRIG_MCONTROL6_SUPPORTED_TRIGGERS[i+1]: |
|||||
cp_mcontrol6_chain_adr |
Trigger i (Tselect = i): |
Breakpoint exception from final trigger in chain if all triggers match simultaneously |
2 store values * 2 addresses |
Sdtrig_mcontrol6_chain_start |
comments on test results: Be careful of order when setting up chain, enable chain last |
|
Notes: |
||||||
uncertain and uncertainen not tested because optional and unpredictable |
||||||
vs, vu deferred to SdtrigH |
||||||
hit not tested because optional and implementation-dependent |
||||||
action other than 0 not tested until those features are supported (e.g. SdtrigSdext/SdtrigTrace) |
||||||
Icount tests: test fire and don’t fire for each scenario |
Repeat for each of UDB_SDTRIG_NUM_TRIGGERS if UDB_SDTRIG_ICOUNT_SUPPORTED_TRIGGERS[i]: |
|||||
cp_icount_hardwired |
if UDB_SDTRIG_ICOUNT_COUNT_HARDWIRED_1 (imperas-rv64-max; cp_icount_instr, cp_icount_eq0 and cp_icount_self_write |
breakpoint exception occurs, |
1 |
Sdtrig_icount_match_eq1 |
||
cp_icount_instr |
tdata.pending = 0 |
Count decreases when the instruction retires after having been fetched in U-mode and tdata1.u = 1. Tval=0 after firing, pending=0 after firing. |
2 priv bits (tdata1 readback: u clear and count unchanged, u set and counted to 0) |
Sdtrig_icount_u |
||
cp_icount_instr_fire |
icount fires after count instructions |
cp_icount_instr with tdata1.u = 1: the breakpoint taken while the icount trigger armed with count = 9 is selected |
Breakpoint exception with tval = 0, before the instruction after the 9th |
1 |
Sdtrig_icount_u |
|
cp_icount_trap |
tdata1.count = 1 |
Count decreases when a trap is taken from a privilege mode where the trigger is enabled |
2 priv bits (tdata1 readback: u clear and count unchanged, u set and counted to 0) |
Sdtrig_icount_match2 |
||
cp_icount_trap_fire |
A trap taken in a mode where the trigger is enabled is counted, and pending fires after the handler returns |
cp_icount_trap with tdata1.u = 1: the breakpoint taken on the xRET that returns from the illegal-instruction trap |
Breakpoint exception on return from the trap handler |
1 |
Sdtrig_icount_match2 |
|
cp_icount_eq0 |
tdata1.pending = {0/1} |
Count stays at 0 until explicitly written |
2 pending (tdata1 readback: count stays 0, pending cleared) |
Sdtrig_icount_count_zero |
||
cp_icount_eq0_fire |
A pending icount trigger fires before the next instruction |
cp_icount_eq0 with tdata1.pending = 1: the breakpoint taken on return to U-mode after the CSRW that writes count = 0, pending = 1 |
Breakpoint exception before the next U-mode instruction (after the T-SBI return); pending is cleared |
1 |
Sdtrig_icount_pending |
|
Itrigger tests: test fire and don’t fire for each scenario |
Repeat for each of UDB_SDTRIG_NUM_TRIGGERS if UDB_SDTRIG_ITRIGGER_SUPPORTED_TRIGGERS[i]: |
|||||
cp_itrigger_u |
An itrigger is evaluated on a selected interrupt taken from U-mode and handled in S |
tdata2[x] = 1 for x in {1,5,9,13} if INTERRUPTx_SUPPORTED |
No breakpoint when tdata1.u = 0. With tdata1.u = 1 the trigger matches as the trap is taken; the breakpoint |
NTRIG * 4 interrupts * 2 u bits |
Sdtrig_itrigger_u |
|
cp_itrigger_u_other |
An itrigger does not fire on an interrupt tdata2 does not select |
as cp_itrigger_u, taking another delegated S-level interrupt (5, or 1 when x = 5) instead of x |
No breakpoint |
NTRIG * 2 u bits |
Sdtrig_itrigger_u |
|
Etrigger tests: test fire and don’t fire for each scenario |
Repeat for each of UDB_SDTRIG_NUM_TRIGGERS if UDB_SDTRIG_ETRIGGER_SUPPORTED_TRIGGERS[i]: |
|||||
cp_etrigger_u |
An etrigger is evaluated on a selected exception raised in U-mode |
tdata2[x] = 1 for x in {1,2,5,7,8, and 12,13,15 with Sv} |
No breakpoint when tdata1.u = 0, or when the exception is handled in M (ecall from U). |
NTRIG * 8 exceptions * 2 u bits |
Sdtrig_etrigger_u |
|
cp_etrigger_u_other |
An etrigger does not fire on an exception tdata2 does not select |
tdata2[x] = 1 for each x above and x in {0,3,4,6} and the other modes' ecalls, tdata1.u = {0/1} |
No breakpoint |
NTRIG * 2 u bits |
Sdtrig_etrigger_u |
|
Textra tests: test fire and don’t fire for each scenario |
Repeat for each of UDB_SDTRIG_NUM_TRIGGERS if UDB_TDATA3_IMPLEMENTED: |
|||||
cp_textra_mcontext |
only run tests if MCONTEXT_IMPLEMENTED: |
Breakpoint exception if mhvalue equals mcontext |
3 mhvalues * 2 trigger types (icount, mcontrol6) |
Sdtrig_textra32_filter_modes |
||
cp_textra_scontext |
only run tests if SCONTEXT_IMPLEMENTED: |
Breakpoint exception when svalue equals scontext and mask ignores A’s |
if RV32: |
Sdtrig_textra32_filter_modes |
||
cp_textra_scontext_all |
With every scontext byte masked, the scontext compare always matches |
only run tests if SCONTEXT_IMPLEMENTED: |
Breakpoint exception for every svalue |
2 trigger types |
||
cp_textra_double_context |
only run tests if MCONTEXT_IMPLEMENTED and SCONTEXT_IMPLEMENTED: |
Breakpoint exception when all enabled context numbers match |
2 mhselect * 2 sselect * 2 mhvalue * 2 svalue |
Sdtrig_textra32_mhselect_mcontext |
||
Actions: only action 0 (breakpoint) is tested here (sufficient for RVA23). Eventually add SdtrigSdext with action 1, SdtrigEtrace for Trace 2-4, SdtrigExternal for 8-9 |
||||||
B.11. Miscellaneous Non-RV23 Privileged Extensions
B.11.1. Sm1p13 Machine Mode 1.13
| Coverpoint | Goal | Feature Description | Expectation | Bins | Notes |
|---|---|---|---|---|---|
cp_medelegh |
RV32 only: |
Match ref model |
1 |
Sm_mcsr_cg/cp_mcsr_access |
|
cp_mxlen_ro |
misa.MXL is read only |
Write all U,S,M values of misa.MXL and read back |
Read back M-mode |
3 |
Note : Already covered in cp_misa_mxl |
cp_misa_b |
misa.B and misa.V are correct |
read, set, and clear, readback misa.B and misa.V |
5 |
Sm_mcsr_cg/{cp_misa_b, cp_misa.v} |
|
cp_mcause |
mcause accepts sofware-check and hardware error |
Write mcause = 18, 19, read back |
Match ref model |
2 |
Note : Already covered in cp_mcause_write_exception/ |
cp_msip |
msip write is reflected in mip.MSIP |
Write {all 1s, all 0s} to memory-mapped msip register if it exists. Read back. Wait and then read mip.MSIP. |
Match ref model |
2 |
Sm_mcsr_cg/cp_msip |
Notes: |
|||||
NOTE : It’s tests and coverage files are under the S.py and S_coverage.svh respectvely with the guard of `ifdef SM1P13_SUPPORTED |
|||||
LCOFI tested in Sscofpmf test plan |
|||||
VS-mode counter overflow tested in Shlcofideleg |
|||||
Hints with MXLEN > XLEN not tested |
|||||
Hardware errors tested with Smrnmi |
|||||
Software-check exceptions tested with Zicfilp and Zicfiss |
|||||
hedelegh tested with hypervisor |
|||||
cp_misaligned_atomicity_granule_pma is tested with Zama16b |
|||||
| Normative Rule | Rule Text | Coverpoints |
|---|---|---|
medelegh_sz_acc_enc_xlen32 |
When XLEN=32, |
Sm_mcsr_cg/cp_mcsr_access/medelegh |
misa_mxl_op_isa |
Sm_mcsr_cg/cp_misa_mxl |
|
misa_mxl_op_nz |
If |
Sm_mcsr_cg/cp_misa_mxl |
xlen_le_mxlen |
XLEN is never greater than MXLEN, but XLEN might be smaller than MXLEN in less-privileged modes. |
Sm_mcsr_cg/cp_misa_mxl |
misa_mxl_acc |
Sm_mcsr_cg/cp_misa_mxl |
|
misa_mxl_enc |
Sm_mcsr_cg/cp_misa_mxl |
|
misa_extensions_enc_txt |
Sm_mcsr_cg/{cp_misa_b, cp_misa_v} |
|
misa_extensions_enc_tbl |
Sm_mcsr_cg/{cp_misa_b, cp_misa_v} |
|
misa_extensions_warl_op |
Sm_mcsr_cg/{cp_misa_b, cp_misa_v} |
|
mcause_exccode_enc_img |
Sm_mcause_cg/cp_mcause_write_exception |
|
msip_sz_acc |
A hart’s memory-mapped |
Sm_mcsr_cg/cp_msip |
msip_enc |
bits 31‍–‍1 read as zero and bit 0 contains the |
Sm_mcsr_cg/cp_msip |
mip_msip_rdonly |
Sm_mcsr_cg/cp_msip |
|
msip_update_max_time |
Sm_mcsr_cg/cp_msip |
UDB Parameters: None.
B.11.2. Smstateen Machine State Enable
| Coverpoint | Goal | Feature Description | Expectation | Bins | Normative Rule |
|---|---|---|---|---|---|
cp_mstateen_reset_val |
On reset all mstateen CSRs' bits are initialized to zeros. |
As first test after reset, read mstateen0-3. For RV32, also read msstateen0-3h |
0 |
4-8 CSRs |
mstateen_zero_initialization |
cp_walking_ones |
Bits are accessible |
Write mstateen0-3 with walking ones & walking zero, and read each back. |
Access successful |
4-8 CSRs * 128-64 walking ones/zero |
mstateen_rv64_csrs |
cp_csr_illegal_accesses |
Each stateen CSR allows read/write access from its own and higher privilege modes and denies read/writeaccess from lower privilege modes |
In U-mode (and S, VS and VU-mode if supported), write mstateen0-3 with all ones, and read it back. |
Illegal instruction |
4-8CSRs |
stateen_op |
cp_fcsr |
fcsr controls access to fcsr when misa.F = 0 |
If Zfinx is supported: |
stateen0_fcsr_op |
||
cp_jvt_access |
jvt controls access |
If Zcmt is supported: |
Always successful |
stateen0_jvt_op |
|
cp_envcfg |
envcfg controls access to senvcfg |
With mstateen0.envcfg = {0,1}, read and write sevncfg from M, S if supported, else U |
Always successful |
2 states x 2 accesses |
mstateen0_envcfg_op |
cp_csrind |
csrind controls access |
If Sscsrind supported: |
Illegal instruction if 0 except in M-mode, else successful |
2 states x 5 modes x 3 accesses x 7 regs |
mstateen0_csrind_op |
cp_aia |
aia controls access |
If Ssaia supported: |
Always successful |
2 states x 2 accesses x ? regs |
mstateen0_aia_op |
cp_imsic |
ismic controls access |
If IMSIC supported: |
Always successful |
2 states x 2 accesses x ? regs |
mstateen0_imsic_op |
cp_context |
sdtrig controls access |
If Sdtrig supported: |
Always successful |
2 states x 2 accesses |
Sdtrig_scontext_access |
cp_p1p13 |
hedelegh controls access |
If Sm1p13 and Hypervisor supported: |
Always successful |
2 states x 2 accesses |
mstateen0_p1p13_op |
cp_srmcfg |
srmcfg controls access |
If Ssqosid supported: |
Always successful |
2 states x 2 accesses |
mstateen0_srmcfg_op |
cp_ctr |
ctr controls access |
If Sctr supported: |
Always successful |
2 states x 2 accesses x 3 regs |
mstateen_ctr1 |
cp_fcsr_fp_instrs |
fcsr controls floating-point instructions when misa.F = 0 |
If Zfinx is supported: |
Illegal instruction if 0, else successful |
stateen0_fcsr0_misa_f0_illegal_fpu_instr |
|
cp_mstateen_se_controls_sstateen |
Bit 63 of mstateen0-3 controls access to sstateen0-3 |
For N = 0-3 and mstateenN bit 63 = {0,1}, read and write sstateenN from S-mode (and VS-mode if H is supported, with hstateenN bit 63 = 1), and check the value read. |
Illegal instruction if 0. If 1, access succeeds. sstateen1-3 read 0 (they have no defined bits). |
4 CSRs * 2 states * 2 modes * 3 ops |
stateen_op |
cp_mstateen_se_controls_hstateen |
Bit 63 of mstateen0-3 controls access to hstateen0-3 |
If H is supported, for N = 0-3 and mstateenN bit 63 = {0,1}, read and write hstateenN from HS-mode. |
Illegal instruction if 0, else successful. |
4-8 CSRs * 2 states * 3 ops |
stateen_illegal_state_access |
cp_mstateen0_se0_only_sstateen0 |
Bits that are zero in mstateen0 are read-only zero in sstateen0 |
With only mstateen0.SE0 set, set a walking one in sstateen0 with csrs and clear a walking zero with csrc, from M-mode and S-mode. |
Every sstateen0 bit other than read-only ones stays zero. |
mstateen_lower_priv_roz |
|
cp_mstateen0_se0_only_hstateen0 |
Bits that are zero in mstateen0 are read-only zero in hstateen0 |
If H is supported, with only mstateen0.SE0 set, set a walking one in hstateen0 with csrs and clear a walking zero with csrc, from M-mode and HS-mode. |
Every hstateen0 bit other than read-only ones stays zero. |
mstateen_lower_priv_roz |
|
Note: All of these tests are performed in M-mode unless otherwise noted. |
|||||
Note: The feature and sstateen tests set and clear the mstateen bit and run from M, S, U, and (with H) VS and VU-mode. Each sets the bit in hstateen0 and sstateen0 after changing the mstateen bit, so only the mstateen bit changes the result. The coverpoints sample the bit in all three CSRs. |
|||||
Note: Tests that set mstateen to all ones and vary hstateen0 and sstateen0 are in Ssstateen. |
|||||
Note: Smstateen implies U-mode (otherwise there is no need for this extension) |
|||||
| Normative Rule | Rule Text | Coverpoints |
|---|---|---|
mstateen_rv64_csrs |
{Smstateen_cg,Ssstateen_cg}/{cp_walking_ones} |
|
hstateen_rv64_csrs |
Ssstateen_cg/cp_hstateen_walking_ones |
|
stateen_rv32_upper_bits_csrs |
{Smstateen_cg,Ssstateen_cg}/{cp_walking_ones} |
|
stateen_op |
{Smstateen_cg,Ssstateen_cg}/{cp_csr_illegal_accesses}, Smstateen_cg/cp_mstateen_se_controls_sstateen |
|
stateen_illegal_state_access |
{Smstateen_cg,Ssstateen_cg}/{cp_csr_illegal_accesses}, Smstateen_cg/{cp_mstateen_se_controls_sstateen, cp_mstateen_se_controls_hstateen} |
|
stateen_implicit_state_update |
Not tested: either behavior is permitted |
|
mstateen_bit_correspondence |
{Smstateen_cg,Ssstateen_cg}/{cp_walking_ones} |
|
hstateen_encoding |
Ssstateen_cg/{cp_hstateen_walking_ones, cp_hstateen_illegal_accesses} |
|
stateen_warl_access |
{Smstateen_cg,Ssstateen_cg}/{cp_walking_ones} |
|
stateen_unimplemented_state_roz |
{Smstateen_cg,Ssstateen_cg}/{cp_walking_ones} |
|
stateen_reserved_roz |
Likewise, all reserved bits not yet given a defined meaning are also read-only zeros. |
{Smstateen_cg,Ssstateen_cg}/{cp_walking_ones}, Smstateen_cg/cp_mstateen_se_controls_sstateen |
mstateen_lower_priv_roz |
Smstateen_cg/{cp_mstateen0_se0_only_sstateen0, cp_mstateen0_se0_only_hstateen0} |
|
sstateen_vsmode_access_roz |
Smstateen_cg/cp_mstateen_se_controls_sstateen, Ssstateen_cg/cp_hstateen_se_controls_sstateen |
|
hstateen_ro1_bits |
Ssstateen_cg/cp_hstateen_walking_ones |
|
mstateen_zero_initialization |
On reset, all writable mstateen bits are initialized by the hardware to zeros. |
TODO: record the writable mstateen bits before the boot code writes them |
mstateen_bit_63_op |
Smstateen_cg/{cp_mstateen_se_controls_sstateen, cp_mstateen_se_controls_hstateen} |
|
hstateen_bit_63_op |
Likewise, bit 63 of each hstateen correspondingly controls access to the matching sstateen CSR. |
Ssstateen_cg/cp_hstateen_se_controls_sstateen |
mstateen_bit_63_roz |
{Smstateen_cg,Ssstateen_cg}/{cp_walking_ones} |
|
hstateen_bit_63_writable |
Bit 63 of each hstateen CSR is always writable (not read-only). |
Ssstateen_cg/cp_hstateen_walking_ones |
mstateen0_enc_img |
Smstateen_cg/cp_walking_ones |
|
hstateen0_enc_img |
Ssstateen_cg/cp_hstateen_walking_ones |
|
stateen0_c_op |
Not tested: custom state is non-standard and not certified |
|
stateen0_fcsr_op |
Smstateen_cg/cp_fcsr, Ssstateen_cg/cp_fcsr |
|
mstateen0_fcsr_roz |
Smstateen_cg/cp_walking_ones |
|
stateen0_fcsr0_misa_f0_illegal_fpu_instr |
{Smstateen_cg,Ssstateen_cg}/{cp_fcsr, cp_fcsr_fp_instrs} |
|
stateen0_jvt_op |
The JVT bit controls access to the jvt CSR provided by the Zcmt extension. |
Smstateen_cg/cp_jvt_access, Ssstateen_cg/cp_jvt |
mstateen0_se0_op |
The SE0 bit in mstateen0 controls access to the hstateen0, hstateen0h, and the sstateen0 CSRs. |
Smstateen_cg/cp_mstateen_se_controls_sstateen |
hstateen0_se0_op |
The SE0 bit in hstateen0 controls access to the sstateen0 CSR. |
Ssstateen_cg/cp_hstateen_se_controls_sstateen |
mstateen0_envcfg_op |
The ENVCFG bit in mstateen0 controls access to the henvcfg, henvcfgh, and the senvcfg CSRs. |
Smstateen_cg/cp_envcfg |
hstateen0_envcfg_op |
The ENVCFG bit in hstateen0 controls access to the senvcfg CSRs. |
Ssstateen_cg/cp_hstateen_envcfg |
mstateen0_csrind_op |
Smstateen_cg/cp_csrind |
|
hstateen0_csrind_op |
Ssstateen_cg/cp_hstateen_csrind |
|
mstateen0_imsic_op |
Smstateen_cg/cp_imsic |
|
hstateen0_imsic_op |
Ssstateen_cg/cp_hstateen_imsic |
|
mstateen0_aia_op |
Smstateen_cg/cp_aia |
|
hstateen0_aia_op |
Ssstateen_cg/cp_hstateen_aia |
|
mstateen0_context_op |
Smstateen_cg/cp_context |
|
hstateen0_context_op |
The CONTEXT bit in hstateen0 controls access to the scontext CSR provided by the Sdtrig extension. |
Ssstateen_cg/cp_hstateen_context |
mstateen0_p1p13_op |
Smstateen_cg/cp_p1p13 |
|
mstateen0_srmcfg_op |
Smstateen_cg/cp_srmcfg |
|
mstateen_ctr1 |
Smstateen_cg/cp_ctr |
|
mstateen_ctr0 |
Smstateen_cg/cp_ctr |
UDB Parameters: None.
B.11.3. Smcsrind Machine-Mode Indirect CSR Access
No test plan yet.
| Normative Rule | Rule Text | Coverpoints |
|---|---|---|
miselect_op |
||
miselect_value_range |
||
miselect_warl |
||
miselect_min_sz |
||
miselect_msb_op |
||
mireg_access_on_legal_miselect |
||
siselect_min_range |
The siselect register will support the value range 0..0xFFF at a minimum. |
|
siselect_msb_op |
||
sireg_access_on_illegal_siselect |
||
sireg_access_on_legal_siselect |
||
Sscsrind_smode_csrs_sz |
||
vsiselect_min_range |
The vsiselect register will support the value range 0..0xFFF at a minimum. |
|
vsiselect_msb_op |
||
Sscsrind_virtual_inst_fault |
||
vsireg_access_on_legal_vsiselect |
||
Sscsrind_vsmode_csrs_sz |
||
Sscsrind_csrs_access_control |
||
hypervisor_impl_csrs_access_control |
UDB Parameters: None.
B.11.4. Sscsrind Supervisor-Mode Indirect CSR Access
B.11.5. Smepmp Enhanced PMP
B.11.6. Smrnmi Machine-Mode Resumable Non-Maskable Interrupts
No test plan yet.
| Normative Rule | Rule Text | Coverpoints |
|---|---|---|
mstatus_mdt_clr_mnret |
TODO: covered by the Smdbltrp suite (not yet written) |
|
sstatus_sdt_clr_mnret |
TODO: covered by the Ssdbltrp suite (not yet written) |
|
vsstatus_sdt_clr_mnret |
Additionally, if it is VU, then |
TODO: covered by the Ssdbltrp suite (not yet written): MNRET to VU-mode with Smdbltrp, Ssdbltrp, and H |
trap_unexp_rnmi |
TODO: covered by the Smdbltrp suite (not yet written) |
|
trap_unexp_mnstatus_nmie_0 |
a trap that occurs when executing in M-mode with |
|
trap_unexp_hndl_lead_in |
In the event of a unexpected trap, the handling is as follows: |
|
trap_unexp_hndl_rnmi |
||
trap_unexp_hndl_no_rnmi |
||
mnepc_invalid_convert |
||
mnstatus_nmie_rst |
If the Smrnmi extension is implemented, the mnstatus.NMIE field is reset to 0. |
TODO: record mnstatus.NMIE before the boot code sets it |
UDB Parameters: None.
B.11.7. Ssrnmi Supervisor-Mode Resumable Non-Maskable Interrupts
B.11.8. Smcntrpmf Counter Privilege Mode Filtering
B.11.9. Smcdeleg Counter Delegation
No test plan yet.
| Normative Rule | Rule Text | Coverpoints |
|---|---|---|
Smcdeleg_Ssccfg_tandem |
For a RISC-V hardware platform, Smcdeleg and Ssccfg must always be implemented in tandem. |
|
Smcdeleg_cde_en |
||
menvcfg_cde_op |
TODO: Smcdeleg with menvcfg.CDE = 0 and 1 |
|
Ssccfg_illegal_sireg_cde0 |
||
Ssccfg_illegal_sireg3_6 |
||
Ssccfg_illegal_sireg4_5_xlen64 |
||
Ssccfg_illegal_sireg_not_delegated |
||
Ssccfg_missing_extension_illegal |
||
Ssccfg_hyp_vs_or_vu_access_vsireg_illegal |
||
Ssccfg_hyp_m_s_vsireg_illegal |
An attempt to access any vsireg* from M or S mode raises an illegal-instruction exception. |
|
Ssccfg_hyp_vs_access_sireg_conditional |
||
Ssccfg_scountinhibit_exists |
Smcdeleg/Ssccfg defines a new scountinhibit register, a masked alias of mcountinhibit. |
|
Ssccfg_scountinhibit_delegated_rw |
||
Ssccfg_scountinhibit_nondelegated_ro |
For counters not delegated to S-mode, the associated bits in scountinhibit are read-only zero. |
|
Ssccfg_illegal_scountinhibit_cde0 |
When menvcfg.CDE=0, attempts to access scountinhibit raise an illegal-instruction exception. |
|
Ssccfg_illegal_scountinhibit_vs_vu |
||
Ssccfg_virtual_scountovf_vs_vu |
||
Ssccfg_lcofi_mvip_mvien |
||
Ssccfg_lcofi_hvip_hvien |
UDB Parameters: None.
B.11.10. Ssccfg Counter Delegation
B.11.11. Smdbltrp Machine Double Traps
No test plan yet.
| Normative Rule | Rule Text | Coverpoints |
|---|---|---|
mstatus_mie_clr_by_mdt |
TODO: covered by the Smdbltrp suite (not yet written) |
|
mstatus_mie_clr_by_mdt_rv64 |
TODO: covered by the Smdbltrp suite (not yet written) |
|
mstatus_mie_set_mdt_0 |
The |
TODO: covered by the Smdbltrp suite (not yet written) |
mstatus_mie_set_mdt_0_rv64 |
TODO: covered by the Smdbltrp suite (not yet written) |
|
mstatus_mdt_rst |
TODO: covered by the Smdbltrp suite (not yet written) |
|
mstatus_mdt_not_set_rnmi |
TODO: covered by the Smdbltrp suite (not yet written) |
|
mstatus_mdt_clr_mret_sret |
TODO: covered by the Smdbltrp suite (not yet written) |
|
mstatus_mdt_clr_mnret |
TODO: covered by the Smdbltrp suite (not yet written) |
|
sstatus_sdt_clr_mret_sret |
TODO: covered by the Smdbltrp suite (not yet written) |
|
vsstatus_sdt_clr_mret_sret |
Additionally, if it is VU, then |
TODO: covered by the Smdbltrp suite (not yet written) |
trap_exp |
TODO: covered by the Smdbltrp suite (not yet written) |
|
trap_unexp_mdt_1 |
However, if |
TODO: covered by the Smdbltrp suite (not yet written) |
UDB Parameters: None.
B.11.12. Ssdbltrp Supervisor Double Traps
No test plan yet.
| Normative Rule | Rule Text | Coverpoints |
|---|---|---|
sstatus_sdt |
Sm_mcsr_cg/cp_mstatus_sdt_dte |
|
sstatus_sdt_sstatus_sie_overwrite |
TODO: covered by the Ssdbltrp suite (not yet written) |
|
sstatus_sdt_trap |
TODO: covered by the Ssdbltrp suite (not yet written) |
|
sstatus_sdt_unexpected_trap |
However, if SDT is already set to 1, then this is an unexpected trap. |
TODO: covered by the Ssdbltrp suite (not yet written): take a trap into S-mode with sstatus.SDT=1 |
sstatus_sdt_double_trap |
In the event of an unexpected trap, a double-trap exception trap is delivered into M-mode. |
TODO: covered by the Ssdbltrp suite (not yet written): check that a trap into S-mode with SDT=1 is delivered to M-mode |
sstatus_sdt_double_trap_regs |
TODO: covered by the Ssdbltrp suite (not yet written): check mepc, mtval, and mstatus after a double trap |
|
sstatus_sdt_double_trap_mtval2 |
TODO: covered by the Ssdbltrp suite (not yet written): with H, check that mtval2 holds the unexpected trap’s cause |
|
sstatus_sdt_double_trap_mcause |
The mcause register is set to 16, the double-trap exception code. |
TODO: covered by the Ssdbltrp suite (not yet written): check mcause=16 after a double trap |
sstatus_sdt_sret |
TODO: covered by the Ssdbltrp suite (not yet written) |
|
menvcfg_dte_op |
Sm_mcsr_cg/cp_mstatus_sdt_dte, TODO: covered by the Ssdbltrp suite (not yet written): traps into S-mode and SRET with menvcfg.DTE = 0 and 1 |
UDB Parameters: None.
B.11.13. Smctr Control Transfer Records
B.11.14. Ssqosid Quality-of-Service ID
No test plan yet.
| Normative Rule | Rule Text | Coverpoints |
|---|---|---|
Ssqosid_srmcfg_introduced |
||
Ssqosid_rcid_mcid_accompany_requests |
||
Ssqosid_srmcfg_register_size |
||
Ssqosid_srmcfg_csr_applies_to_all_modes |
||
Ssqosid_Smstateen_srmcfg_requires_mstateen0 |
Smstateen_cg/{cp_walking_ones, cp_srmcfg} |
|
Ssqosid_srmcfg_access_illegal_instruction |
Smstateen_cg/cp_srmcfg |
|
Ssqosid_srmcfg_access_virtual_instruction |
UDB Parameters: None.
TODO: This text is here to prevent Asciidoctor from rendering strangely after an empty table. Delete it when table is populated.
Appendix C: Non-ISA Test Plan
This chapter contains test plans for ratified RISC-V standards outside the Unprivileged and Privileged ISA specifications.
C.1. Debug
This section describes ISA and non-ISA debug-related extensions not required in RVA23.
External debug needs to be able to perform register I/O to the debug module, such as halting and resuming the core, sending abstract commands such as Access Register or Access Memory, or running code from the Program Buffer. This cannot be done from software running on the core because a program cannot halt and single step itself, so these tests will need additional testbench support. External debug is not in RVA23.
A suggested approach is to require all of DM, DTM, and Sdext supported together for systems with External Debug, and to have a testbench send JTAG commands via DTM to the DTM to exercise Debug Mode.
Note that Sdtrig is described in Section B.10.16.
C.1.1. DM Debug Module
C.1.2. DTM Debug Transport Module
C.1.3. Sdext Debug Extension
C.2. AIA Advanced Interrupt Architecture
This section describes AIA extension test plans.
C.2.1. Smaia Machine-Mode Advanced Interrupt Architecture
C.2.2. Ssaia Supervisor-Mode Advanced Interrupt Architecture
C.2.3. IMSIC Incoming MSI Controller
C.2.4. APLIC Advanced Platform-Level Interrupt Controller
C.3. I/O Memory Management Unit (IOMMU)
This section describes IOMMU extension test plans.
C.3.1. IOMMU I/O Memory Management Unit
TODO: This text is here to prevent Asciidoctor from rendering strangely after an empty table. Delete it when table is populated.
Appendix D: UDB Parameters
Table 359 summarizes all of the UDB parameters that affect coverpoints in this testplan. Table 360 summarizes the UDB parameters that are not yet exercised.
| Parameter | Dependent Coverpoints | Defined By | Description |
|---|---|---|---|
ARCH_ID_VALUE |
Sm_cg/cp_mcsr_access |
Sm |
The value of |
COUNTINHIBIT_EN |
Sm_cg/cp_inhibit |
Sm |
Indicates which hardware performance monitor counters can be disabled from
COUNTINHIBIT_EN[1] can never be true, since it corresponds to |
HPM_COUNTER_EN |
Zihpm_cg/cp_cntr_hpm |
Sm |
Whether each HPM counter is implemented in hardware.
There is one entry for each hpmcounter, indexed 0-31. Indices 0-2 must be false: they are placeholders for the three counters
( |
IMP_ID_VALUE |
Sm_cg/cp_mcsr_access |
Sm |
A unique encoding of the version of the processor implementation. |
LRSC_FAIL_ON_NON_EXACT_LRSC |
Zalrsc_cg/Zalrsc_sc_d_cg/cp_custom_sc_lr, Zalrsc_sc_w_cg/cp_custom_sc_addresses |
Zalrsc |
Whether or not a Store Conditional fails if its physical address and size do not exactly match the physical address and size of the last Load Reserved in program order (independent of whether or not the SC is in the current reservation set) |
LRSC_FAIL_ON_VA_SYNONYM |
Zalrsc_cg/Not tested because spec does not require any specific behavior |
Zalrsc |
Whether or not an |
LRSC_MISALIGNED_BEHAVIOR |
ExceptionsZalrsc_cg/cp_{load,store}_address_misaligned |
Zalrsc |
What to do when an LR/SC address is misaligned and MISALIGNED_AMO == false. * 'always raise misaligned exception': self-explanatory * 'always raise access fault': self-explanatory * 'custom': Custom behavior; misaligned LR/SC may sometimes raise a misaligned exception and sometimes raise an access fault. Will lead to an 'unpredictable' call on any misaligned LR/SC access |
LRSC_RESERVATION_STRATEGY |
Zalrsc_cg/Zalrsc_sc_w_cg/cp_custom_sc_addresses |
Zalrsc |
Strategy used to handle reservation sets. * "reserve naturally-aligned 64-byte region": Always reserve the 64-byte block containing the LR/SC address * "reserve naturally-aligned 128-byte region": Always reserve the 128-byte block containing the LR/SC address * "reserve exactly enough to cover the access": Always reserve exactly the LR/SC access, and no more * "custom": Custom behavior, leading to an 'unpredictable' call on any LR/SC |
MARCHID_IMPLEMENTED |
Sm_cg/cp_mcsr_access |
Sm |
* false: |
MCOUNTENABLE_EN |
Zicntr_cg/cp_cntr, Zihpm_cg/cp_cntr_hpm |
Sm |
Indicates which counters can be delegated via
MCOUNTENABLE_EN[0:2] must all be false if |
MIMPID_IMPLEMENTED |
Sm_cg/cp_mcsr_access |
Sm |
* false: |
MISALIGNED_AMO |
Zicfiss_cg/cp_ss_address_alignment_swap, Zicfiss_cg/cp_ss_address_alignment_swap_s |
Zaamo |
Whether or not the implementation supports misaligned atomics in main memory |
MISALIGNED_LDST |
ExceptionsSm_cg/cp_{load_address_misaligned, store_address_misaligned, cp_misaligned_priority_load, cp_misaligned_priority_store} |
Sm |
Does the implementation perform non-atomic misaligned loads and stores to main memory (does not affect misaligned support to device memory)? If not, the implementation always throws a misaligned exception. |
MISALIGNED_LDST_EXCEPTION_PRIORITY |
ExceptionsSm_cg/cp_misaligned_priority_load, cp_misaligned_priority_store, Zicfiss_cg/cp_ss_page_access_store_misaligned, Zicfiss_cg/cp_ss_page_access_store_misaligned_s |
Sm |
The relative priority of a load/store/AMO exception vs. load/store/AMO page-fault or access-fault exceptions. May be one of: [separator="!"] !=== ! low ! Misaligned load/store/AMO exceptions are always lower priority than load/store/AMO page-fault and access-fault exceptions. ! high ! Misaligned load/store/AMO exceptions are always higher priority than load/store/AMO page-fault and access-fault exceptions. !=== MISALIGNED_LDST_EXCEPTION_PRIORITY cannot be "high" when MISALIGNED_MAX_ATOMICITY_GRANULE_SIZE is non-zero, since the atomicity of an access cannot be determined in that case until after address translation. |
MISA_CSR_IMPLEMENTED |
Sm_cg/cp_mcsr_access |
Sm |
Options: true::
The false::
The |
MTVAL_WIDTH |
ExceptionsSm_cg/TODO |
Sm |
The number of implemented bits in the Must be greater than or equal to max( |
MTVEC_ACCESS |
ExceptionsSm_cg/all exception coverpoints, InterruptsSm_cg/all exception coverpoints |
Sm |
Options: ro::
rw::
|
MTVEC_BASE_ALIGNMENT_DIRECT |
ExceptionsSm_cg/all exception coverpoints, InterruptsSm_cg/all exception coverpoints |
Sm |
Minimum alignment of the base pointer. Because |
MTVEC_BASE_ALIGNMENT_VECTORED |
InterruptsSm_cg/all |
Sm |
Because |
MTVEC_ILLEGAL_WRITE_BEHAVIOR |
ExceptionsSm_cg/all exception coverpoints, InterruptsSm_cg/all |
Sm |
Options: retain::
When either custom::
When either Other values may be added over time once other common behaviors are identified. |
MTVEC_MODES |
InterruptsSm_cg/TODO |
Sm |
Options: 0::
Direct; All traps set If only one mode is given, |
MXLEN |
Sm_cg/all tests |
Sm |
XLEN in machine mode, specified in bits |
NUM_USABLE_PMP_ENTRIES |
Zicfiss_cg/cp_ss_pmp_permissions |
Number of implemented PMP entries that are actually usable. An implementation may implement PMP entries (NUM_PMP_ENTRIES) but hardwire
some of them to zero (read-only zero). Such entries exist — their
NUM_USABLE_PMP_ENTRIES gives the number of low-numbered entries that are
writable/usable. Entries Must be between 0 and NUM_PMP_ENTRIES, inclusive. |
|
PMP_GRANULARITY |
Zicfiss_cg/cp_ss_pmp_permissions |
log2 of the smallest supported PMP region. Generally, for systems with an MMU, should not be smaller than 12, as that would preclude caching PMP results in the TLB along with virtual memory translations Note that PMP_GRANULARITY is equal to G+2 (not G) as described in the privileged architecture. |
|
PMP_NAPOT_SUPPORTED |
Zicfiss_cg/cp_ss_pmp_permissions |
Whether or not the Naturally Aligned Power-Of-Two (NAPOT) PMP address matching mode is supported. |
|
REPORT_CAUSE_IN_MTVAL_ON_SHADOW_STACK_SOFTWARE_CHECK |
Zicfiss_cg/cp_ss_swcheck_mtval |
Zicfiss |
When true, When false, |
REPORT_CAUSE_IN_STVAL_ON_SHADOW_STACK_SOFTWARE_CHECK |
Zicfiss_cg/cp_sspopchk_mismatch, Zicfiss_cg/cp_sspopchk_mismatch_s |
Zicfiss |
When true, When false, |
REPORT_CAUSE_IN_VSTVAL_ON_SHADOW_STACK_SOFTWARE_CHECK |
Zicfiss_cg/Untested |
Zicfiss |
When true, When false, |
REPORT_ENCODING_IN_MTVAL_ON_ILLEGAL_INSTRUCTION |
ExceptionsSm_cg/cp_illegal_instruction |
Sm |
Options: * true: |
REPORT_VA_IN_MTVAL_ON_BREAKPOINT |
ExceptionsSm_cg/cp_breakpoint |
Sm |
Options: * true: Regardless, |
REPORT_VA_IN_MTVAL_ON_INSTRUCTION_ACCESS_FAULT |
ExceptionsSm_cg/cp_instr_access_fault |
Sm |
Options: * true: |
REPORT_VA_IN_MTVAL_ON_INSTRUCTION_MISALIGNED |
ExceptionsSm_cg/cp_instr_adr_misaligned_branch, cp_instr_misaligned_jal, cp_instr_misaligned_jalr |
Sm |
Options: * true: |
REPORT_VA_IN_MTVAL_ON_LOAD_ACCESS_FAULT |
ExceptionsSm_cg/cp_load_access_fault |
Sm |
Options: * true: |
REPORT_VA_IN_MTVAL_ON_LOAD_MISALIGNED |
ExceptionsSm_cg/cp_load_address_misaligned |
Sm |
Options: * true: |
REPORT_VA_IN_MTVAL_ON_STORE_AMO_ACCESS_FAULT |
ExceptionsSm_cg/cp_store_access_fault |
Sm |
Options: * true: |
REPORT_VA_IN_MTVAL_ON_STORE_AMO_MISALIGNED |
ExceptionsSm_cg/cp_store_address_misaligned |
Sm |
Options: * true: |
SCOUNTENABLE_EN |
Zicntr_cg/cp_cntr, Zihpm_cg/cp_cntr_hpm |
S |
Indicates which counters can delegated via
SCOUNTENABLE_EN[0:2] must all be false if |
STVEC_BASE_ALIGNMENT_VECTORED |
InterruptsS_cg/all |
S |
Minimum alignment of the base pointer when |
STVEC_MODES |
InterruptsS_cg/TODO |
S |
Options: 0::
Direct; All traps set If only one mode is given, |
TIME_CSR_IMPLEMENTED |
Sm_cg/cp_mtime_write, Zicntr_cg/cp_cntr |
Zicntr |
Whether or not a real hardware Possible values: true::
false::
|
TRAP_ON_EBREAK |
ExceptionsSm_cg/cp_breakpoint |
Sm |
The spec states that implementations may handle EBREAKs transparently without raising a trap, in which case the EEI must provide a builtin. |
TRAP_ON_ECALL_FROM_M |
ExceptionsSm_cg/cp_ecall_m |
Sm |
The spec states that implementations may handle ECALLs transparently without raising a trap, in which case the EEI must provide a builtin. |
VENDOR_ID_BANK |
Sm_cg/cp_mcsr_access |
Sm |
Encodes the number of one-byte continuation codes in the Bank field of iN JEDEC’s parlance, the bank number is one greater than the number of continuation codes; hence, the mvendorid Bank field encodes a value that is one less than the JEDEC bank number. |
VENDOR_ID_OFFSET |
Sm_cg/cp_mcsr_access |
Sm |
Encodes the final byte of a JEDEC manufactor ID, discarding the parity bit. |
| Parameter | Defined By | Description |
|---|---|---|
ASID_WIDTH |
S |
Number of implemented ASID bits. Maximum is 16 for XLEN==64, and 9 for XLEN==32 |
CACHE_BLOCK_SIZE |
Zicbom, Zicbop, Zicboz |
The observable size of a cache block, in bytes. A cache block is a naturally aligned power-of-two (NAPOT) range of memory. |
CONFIG_PTR_ADDRESS |
Sm |
The value returned from |
DBG_HCONTEXT_WIDTH |
Sdtrig |
Specifies the size of HCONTEXT |
DBG_SCONTEXT_WIDTH |
Sdtrig |
Specifies the size of SCONTEXT |
DCSR_MPRVEN_TYPE |
Sdtrig |
Implementation of dcsr.MPRVEN is optional. It may be tied to either 0 or 1. Behavior of the dcsr.MPRVEN bit: * 'read-only-0': tied to 0 * 'read-only-1': tied to 1 * 'rw': read-write |
DCSR_STEPIE_TYPE |
Sdtrig |
Implementation of dcsr.STEPIE is optional. It may be tied to either 0 or 1. Behavior of the dcsr.STEPIE bit: * 'read-only-0': tied to 0 * 'read-only-1': tied to 1 * 'rw': read-write |
DCSR_STOPCOUNT_TYPE |
Sdtrig |
Implementation of dcsr.STOPCOUNT is optional. It may be tied to either 0 or 1. Behavior of the dcsr.STOPCOUNT bit: * 'read-only-0': tied to 0 * 'read-only-1': tied to 1 * 'rw': read-write |
DCSR_STOPTIME_TYPE |
Sdtrig |
Implementation of dcsr.STOPTIME is optional. It may be tied to either 0 or 1. Behavior of the dcsr.STOPTIME bit: * 'read-only-0': tied to 0 * 'read-only-1': tied to 1 * 'rw': read-write |
ELEN |
Zvl32b |
The maximum size in bits of a vector element that any operation can produce or consume. |
FOLLOW_VTYPE_RESET_RECOMMENDATION |
Zvl32b |
It is recommended that at reset, vtype.vill is set, the remaining bits in vtype are zero, and vl is set to zero. If this parameter is set to true, this recommendation is followed. If it is false, at reset the respective fields will be UNDEFINED_LEGAL. |
FORCE_UPGRADE_CBO_INVAL_TO_FLUSH |
Zicbom |
When true, an implementation prohibits setting When false, an implementation allows a true INVAL operation for |
GSTAGE_MODE_BARE |
H |
Whether or not writing mode=Bare is supported in the |
HCONTEXT_IMPLEMENTED |
Sdtrig, H |
Specifies if the hcontext CSR is implemented |
HCOUNTENABLE_EN |
H |
Indicates which counters can delegated via
HCOUNTENABLE_EN[0:2] must all be false if |
HPM_COUNTER10_WIDTH |
Sm |
The number of bits of precision implemented by This parameter exists only when |
HPM_COUNTER11_WIDTH |
Sm |
The number of bits of precision implemented by This parameter exists only when |
HPM_COUNTER12_WIDTH |
Sm |
The number of bits of precision implemented by This parameter exists only when |
HPM_COUNTER13_WIDTH |
Sm |
The number of bits of precision implemented by This parameter exists only when |
HPM_COUNTER14_WIDTH |
Sm |
The number of bits of precision implemented by This parameter exists only when |
HPM_COUNTER15_WIDTH |
Sm |
The number of bits of precision implemented by This parameter exists only when |
HPM_COUNTER16_WIDTH |
Sm |
The number of bits of precision implemented by This parameter exists only when |
HPM_COUNTER17_WIDTH |
Sm |
The number of bits of precision implemented by This parameter exists only when |
HPM_COUNTER18_WIDTH |
Sm |
The number of bits of precision implemented by This parameter exists only when |
HPM_COUNTER19_WIDTH |
Sm |
The number of bits of precision implemented by This parameter exists only when |
HPM_COUNTER20_WIDTH |
Sm |
The number of bits of precision implemented by This parameter exists only when |
HPM_COUNTER21_WIDTH |
Sm |
The number of bits of precision implemented by This parameter exists only when |
HPM_COUNTER22_WIDTH |
Sm |
The number of bits of precision implemented by This parameter exists only when |
HPM_COUNTER23_WIDTH |
Sm |
The number of bits of precision implemented by This parameter exists only when |
HPM_COUNTER24_WIDTH |
Sm |
The number of bits of precision implemented by This parameter exists only when |
HPM_COUNTER25_WIDTH |
Sm |
The number of bits of precision implemented by This parameter exists only when |
HPM_COUNTER26_WIDTH |
Sm |
The number of bits of precision implemented by This parameter exists only when |
HPM_COUNTER27_WIDTH |
Sm |
The number of bits of precision implemented by This parameter exists only when |
HPM_COUNTER28_WIDTH |
Sm |
The number of bits of precision implemented by This parameter exists only when |
HPM_COUNTER29_WIDTH |
Sm |
The number of bits of precision implemented by This parameter exists only when |
HPM_COUNTER30_WIDTH |
Sm |
The number of bits of precision implemented by This parameter exists only when |
HPM_COUNTER31_WIDTH |
Sm |
The number of bits of precision implemented by This parameter exists only when |
HPM_COUNTER3_WIDTH |
Sm |
The number of bits of precision implemented by This parameter exists only when |
HPM_COUNTER4_WIDTH |
Sm |
The number of bits of precision implemented by This parameter exists only when |
HPM_COUNTER5_WIDTH |
Sm |
The number of bits of precision implemented by This parameter exists only when |
HPM_COUNTER6_WIDTH |
Sm |
The number of bits of precision implemented by This parameter exists only when |
HPM_COUNTER7_WIDTH |
Sm |
The number of bits of precision implemented by This parameter exists only when |
HPM_COUNTER8_WIDTH |
Sm |
The number of bits of precision implemented by This parameter exists only when |
HPM_COUNTER9_WIDTH |
Sm |
The number of bits of precision implemented by This parameter exists only when |
HPM_EVENTS |
Sm |
List of defined event numbers that can be written into mhpmeventN |
HSTATEEN_AIA_TYPE |
Ssaia, H, Ssstateen |
Behavior of the hstateen0.AIA bit: * 'rw': read-write * 'read-only-0': read-only, fixed to 0 * 'read-only-1': read-only, fixed to 1 |
HSTATEEN_CONTEXT_TYPE |
Sdtrig, H, Ssstateen |
Behavior of the hstateen0.CONTEXT bit: * 'rw': read-write * 'read-only-0': read-only, fixed to 0 * 'read-only-1': read-only, fixed to 1 |
HSTATEEN_CSRIND_TYPE |
Sscsrind, H, Ssstateen |
Behavior of the hstateen0.CSRIND bit: * 'rw': read-write * 'read-only-0': read-only, fixed to 0 * 'read-only-1': read-only, fixed to 1 |
HSTATEEN_ENVCFG_TYPE |
Behavior of the hstateen0.ENVCFG bit: * 'rw': read-write * 'read-only-0': read-only, fixed to 0 * 'read-only-1': read-only, fixed to 1 |
|
HSTATEEN_IMSIC_TYPE |
Ssaia, H, Ssstateen |
Behavior of the hstateen0.IMSIC bit: * 'rw': read-write * 'read-only-0': read-only, fixed to 0 * 'read-only-1': read-only, fixed to 1 |
HSTATEEN_JVT_TYPE |
Zcmt, H, Ssstateen |
Behavior of the hstateen0.JVT bit: * 'rw': read-write * 'read-only-0': read-only, fixed to 0 * 'read-only-1': read-only, fixed to 1 |
HW_MSTATUS_FS_DIRTY_UPDATE |
F, Sm |
Indicates when hardware will write to Values are:
[separator="!"]
!===
h! precise ! Hardware writes |
HW_MSTATUS_VS_DIRTY_UPDATE |
Zvl32b, Sm |
Indicates when hardware will write to Values are:
[separator="!"]
!===
h! precise ! Hardware writes |
IGNORE_INVALID_VSATP_MODE_WRITES_WHEN_V_EQ_ZERO |
H |
Whether writes from M-mode, U-mode, or S-mode to vsatp with an illegal mode setting are ignored (as they are with satp), or if they are treated as WARL, leading to undpredictable behavior. |
IMPRECISE_VECTOR_TRAP_SETTABLE |
Zvl32b |
Some profiles may provide a privileged configuration bit that selects between precise and imprecise vector trap behavior, allowing flexibility in how traps and partial updates are reported. |
JVT_BASE_MASK |
Zcmt |
Mask representing the implemented bits of jvt.BASE. Includes the implicitly-zero bits of jvt.BASE, so JVT_BASE_MASK[5:0] must always be 0. |
JVT_BASE_TYPE |
Zcmt |
Type of the jvt.BASE CSR field. One of: * mask: jvt.BASE contains one or more implemented bits, which are indicated by JVT_BASE_MASK. * custom: Custom behavior. Will cause hart to enter 'unpredictable' state on a write to jvt.BASE. |
JVT_READ_ONLY |
Zcmt |
If Zcmt is implemented, JVT is implemented, but can contain a read-only value |
LEGAL_VSTART |
Zvl32b |
Implementations may raise illegal-instruction exceptions for vector
instructions that specify a |
MCID_WIDTH |
Ssqosid |
Number of bits used for the Monitoring Counter ID field (MCID). Default is 12. |
MCONTEXT_IMPLEMENTED |
Sdtrig |
Specifies if the mcontext CSR is implemented |
MCOUNTINHIBIT_IMPLEMENTED |
Sm |
Options: true::
The false::
The |
MCTRCTL_CORSWAPINH_IMPLEMENTED |
Smctr |
Whether or not mctrctl.CORSWAPINH is implemented. When not implemented mctrctl.CORSWAPINH will be read-only-zero. |
MCTRCTL_CUSTOM_IMPLEMENTED |
Smctr |
Whether or not mctrctl.CUSTOM is implemented. When not implemented mctrctl.CUSTOM will be read-only-zero. |
MCTRCTL_DIRCALLINH_IMPLEMENTED |
Smctr |
Whether or not mctrctl.DIRCALLINH is implemented. When not implemented mctrctl.DIRCALLINH will be read-only-zero. |
MCTRCTL_DIRJMPINH_IMPLEMENTED |
Smctr |
Whether or not mctrctl.DIRJMPINH is implemented. When not implemented mctrctl.DIRJMPINH will be read-only-zero. |
MCTRCTL_DIRLJMPINH_IMPLEMENTED |
Smctr |
Whether or not mctrctl.DIRLJMPINH is implemented. When not implemented mctrctl.DIRLJMPINH will be read-only-zero. |
MCTRCTL_EXCINH_IMPLEMENTED |
Smctr |
Whether or not mctrctl.EXCINH is implemented. When not implemented mctrctl.EXCINH will be read-only-zero. |
MCTRCTL_INDCALLINH_IMPLEMENTED |
Smctr |
Whether or not mctrctl.INDCALLINH is implemented. When not implemented mctrctl.INDCALLINH will be read-only-zero. |
MCTRCTL_INDJMPINH_IMPLEMENTED |
Smctr |
Whether or not mctrctl.INDJMPINH is implemented. When not implemented mctrctl.INDJMPINH will be read-only-zero. |
MCTRCTL_INDLJMPINH_IMPLEMENTED |
Smctr |
Whether or not mctrctl.INDLJMPINH is implemented. When not implemented mctrctl.INDLJMPINH will be read-only-zero. |
MCTRCTL_INTRINH_IMPLEMENTED |
Smctr |
Whether or not mctrctl.INTRINH is implemented. When not implemented mctrctl.INTRINH will be read-only-zero. |
MCTRCTL_MTE_IMPLEMENTED |
Smctr |
Whether or not mctrctl.MTE is implemented. When not implemented mctrctl.MTE will be read-only-zero. |
MCTRCTL_NTBREN_IMPLEMENTED |
Smctr |
Whether or not mctrctl.NTBREN is implemented. When not implemented mctrctl.NTBREN will be read-only-zero. |
MCTRCTL_RASEMU_IMPLEMENTED |
Smctr |
Whether or not mctrctl.RASEMU is implemented. When not implemented mctrctl.RASEMU will be read-only-zero. |
MCTRCTL_RETINH_IMPLEMENTED |
Smctr |
Whether or not mctrctl.RETINH is implemented. When not implemented mctrctl.RETINH will be read-only-zero. |
MCTRCTL_STE_IMPLEMENTED |
Smctr |
Whether or not mctrctl.STE is implemented. When not implemented mctrctl.STE will be read-only-zero. |
MCTRCTL_TKBRINH_IMPLEMENTED |
Smctr |
Whether or not mctrctl.TKBRINH is implemented. When not implemented mctrctl.TKBRINH will be read-only-zero. |
MCTRCTL_TRETINH_IMPLEMENTED |
Smctr |
Whether or not mctrctl.TRETINH is implemented. When not implemented mctrctl.TRETINH will be read-only-zero. |
MEDELEG_DELEGATABLE |
S |
Indicates which synchronous exceptions can be delegated via Entry i corresponds to An implementation may support any subset of the delegatable exceptions,
but no bit of
|
MEI_INTR_IMPL |
Zicsr, Sm |
Whether or not machine-level external interrupts are implemented. Possible values: true::
Machine-level external interrupts are implemented.
false::
Machine-level external interrupts are not implemented.
|
MIDELEG_DELEGATABLE |
S |
Indicates which interrupts can be delegated via Entry i corresponds to An unimplemented interrupt cannot be delegated, i.e., if When the H extension is implemented, VSSI, VSTI, and VSEI are always delegated to HS-mode,
so |
MISALIGNED_MAX_ATOMICITY_GRANULE_SIZE |
Sm |
When MISALIGNED_MAX_ATOMICITY_GRANULE_SIZE is 0, the hart cannot atomically perform a misaligned load/store/AMO. When a power of two, the hart can atomically load/store/AMO a misaligned access that is fully contained in a MISALIGNED_MAX_ATOMICITY_GRANULE_SIZE-aligned region. [NOTE] Even if the hart is capable of performing a misaligned load/store/AMO atomically, a misaligned exception may still occur if the access does not have the appropriate Misaligned Atomicity Granule PMA set. |
MISALIGNED_SPLIT_STRATEGY |
Sm |
Options: * sequential_bytes: The load/store appears to be broken into byte-sized accesses that processed sequentially from smallest address to largest address * custom: Something else. Will result in a call to unpredictable() in the execution |
MSI_INTR_IMPL |
Zicsr, Sm |
Whether or not machine-level software interrupts are implemented. Possible values: true::
Machine-level software interrupts are implemented.
false::
Machine-level software interrupts are not implemented.
|
MSTATEEN_AIA_TYPE |
Ssaia |
Behavior of the mstateen0.AIA bit: * 'rw': read-write * 'read-only-0': read-only, fixed to 0 * 'read-only-1': read-only, fixed to 1 |
MSTATEEN_CONTEXT_TYPE |
Sdtrig, Smstateen |
Behavior of the mstateen0.CONTEXT bit: * 'rw': read-write * 'read-only-0': read-only, fixed to 0 * 'read-only-1': read-only, fixed to 1 |
MSTATEEN_CSRIND_TYPE |
Sscsrind, Smstateen |
Behavior of the mstateen0.CSRIND bit: * 'rw': read-write * 'read-only-0': read-only, fixed to 0 * 'read-only-1': read-only, fixed to 1 |
MSTATEEN_ENVCFG_TYPE |
S, Smstateen |
Behavior of the mstateen0.ENVCFG bit: * 'rw': read-write * 'read-only-0': read-only, fixed to 0 * 'read-only-1': read-only, fixed to 1 |
MSTATEEN_IMSIC_TYPE |
Ssaia |
Behavior of the mstateen0.IMSIC bit: * 'rw': read-write * 'read-only-0': read-only, fixed to 0 * 'read-only-1': read-only, fixed to 1 |
MSTATEEN_JVT_TYPE |
Zcmt |
Behavior of the mstateen0.JVT bit: * 'rw': read-write * 'read-only-0': read-only, fixed to 0 * 'read-only-1': read-only, fixed to 1 |
MSTATUS_FS_LEGAL_VALUES |
Sm, F, S |
The set of values that mstatus.FS supports. |
MSTATUS_VS_LEGAL_VALUES |
Sm, Zvl32b, S |
The set of values that mstatus.VS will accept from a software write. |
MTI_INTR_IMPL |
Zicsr, Sm |
Whether or not machine-level timer interrupts are implemented. Possible values: true::
Machine-level timer interrupts are implemented.
false::
Machine-level timer interrupts are not implemented.
|
MUTABLE_MISA_A |
A, Sm |
When the |
MUTABLE_MISA_B |
B, Sm |
Indicates whether or not the |
MUTABLE_MISA_C |
C, Sm |
Indicates whether or not the |
MUTABLE_MISA_D |
D, Sm |
Indicates whether or not the |
MUTABLE_MISA_F |
F, Sm |
Indicates whether or not the |
MUTABLE_MISA_H |
Sm, H |
Indicates whether or not the |
MUTABLE_MISA_M |
M, Sm |
Indicates whether or not the |
MUTABLE_MISA_Q |
Q, Sm |
Indicates whether or not the |
MUTABLE_MISA_S |
S, Sm |
Indicates whether or not the |
MUTABLE_MISA_U |
U, Sm |
Indicates whether or not the |
MUTABLE_MISA_V |
V, Sm |
Indicates whether or not the |
M_MODE_ENDIANNESS |
Sm |
Options: [separator="!"]
!===
h! little ! M-mode data is always little endian
h! big ! M-mode data is always big endian
h! dynamic ! M-mode data can be either little or big endian,
depending on the CSR field |
NON_STANDARD_EXTENSION_IMPLEMENTED |
Sm |
If any non-standard extensions are implemented, this parameter must be true.
This parameter is used as the reset value for |
NUM_EXTERNAL_GUEST_INTERRUPTS |
H |
Number of supported virtualized guest interrupts Corresponds to the |
NUM_PMP_ENTRIES |
Sm |
Number of implemented PMP entries. The architecture mandates that the number of implemented PMP registers
must appear to be 0, 16, or 64, so NUM_PMP_ENTRIES must be one of those values.
It directly determines which PMP registers exist: [NOTE]
An implemented entry may still be read-only zero (but will never cause an exception). The number of entries that are actually usable is given by NUM_USABLE_PMP_ENTRIES. |
PHYS_ADDR_WIDTH |
Sm |
Implementation-defined size of the physical address space. |
PMA_GRANULARITY |
Sm |
Generally, for systems with an MMU, should not be smaller than 12, as that would preclude caching PMA results in the TLB along with virtual memory translations |
PMP_NA4_SUPPORTED |
Whether or not the Naturally Aligned four-byte (NA4) PMP address matching mode is supported. |
|
PMP_TOR_SUPPORTED |
Whether or not the Top-of-Range (TOR) PMP address matching mode is supported. |
|
PRECISE_SYNCHRONOUS_EXCEPTIONS |
Sm |
If false, any exception not otherwise mandated to precise (e.g., PMP violation) will cause execution to enter an unpredictable state. |
RCID_WIDTH |
Ssqosid |
Number of bits used for the Resource Control ID field (RCID). Default is 12. |
REPORT_CAUSE_IN_MTVAL_ON_LANDING_PAD_SOFTWARE_CHECK |
Zicfilp |
When true, When false, |
REPORT_CAUSE_IN_STVAL_ON_LANDING_PAD_SOFTWARE_CHECK |
Zicfilp |
When true, When false, |
REPORT_CAUSE_IN_VSTVAL_ON_LANDING_PAD_SOFTWARE_CHECK |
Zicfilp |
When true, When false, |
REPORT_ENCODING_IN_STVAL_ON_ILLEGAL_INSTRUCTION |
S |
When true, When false |
REPORT_ENCODING_IN_VSTVAL_ON_ILLEGAL_INSTRUCTION |
H |
When true, When false |
REPORT_ENCODING_IN_VSTVAL_ON_VIRTUAL_INSTRUCTION |
H |
When true, When false |
REPORT_GPA_IN_HTVAL_ON_GUEST_PAGE_FAULT |
H |
When true, When false, |
REPORT_GPA_IN_TVAL_ON_INSTRUCTION_GUEST_PAGE_FAULT |
H |
Whether or not GPA >> 2 is written into htval/mtval2 when an instruction guest page fault occurs. If false, 0 will be written into htval/mtval2 on an instruction guest page fault. |
REPORT_GPA_IN_TVAL_ON_INTERMEDIATE_GUEST_PAGE_FAULT |
H |
Whether or not GPA >> 2 is written into htval/mtval2 when a guest page fault occurs while walking a VS-mode page table. If false, 0 will be written into htval/mtval2 on an intermediate guest page fault. |
REPORT_GPA_IN_TVAL_ON_LOAD_GUEST_PAGE_FAULT |
H |
Whether or not GPA >> 2 is written into htval/mtval2 when a load guest page fault occurs. If false, 0 will be written into htval/mtval2 on a load guest page fault. |
REPORT_GPA_IN_TVAL_ON_STORE_AMO_GUEST_PAGE_FAULT |
H |
Whether or not GPA >> 2 is written into htval/mtval2 when a store/amo guest page fault occurs. If false, 0 will be written into htval/mtval2 on a store/amo guest page fault. |
REPORT_VA_IN_MTVAL_ON_INSTRUCTION_PAGE_FAULT |
S |
When true, WHen false, |
REPORT_VA_IN_MTVAL_ON_LOAD_PAGE_FAULT |
S |
When true, WHen false, |
REPORT_VA_IN_MTVAL_ON_STORE_AMO_PAGE_FAULT |
S |
When true, WHen false, |
REPORT_VA_IN_STVAL_ON_BREAKPOINT |
S |
When true, When false, Regardless, |
REPORT_VA_IN_STVAL_ON_INSTRUCTION_ACCESS_FAULT |
S |
When true, WHen false, |
REPORT_VA_IN_STVAL_ON_INSTRUCTION_MISALIGNED |
S |
When true, When false, Note that when IALIGN=16 (i.e., when the |
REPORT_VA_IN_STVAL_ON_INSTRUCTION_PAGE_FAULT |
S |
When true, WHen false, |
REPORT_VA_IN_STVAL_ON_LOAD_ACCESS_FAULT |
S |
When true, WHen false, |
REPORT_VA_IN_STVAL_ON_LOAD_MISALIGNED |
S |
When true, When false, |
REPORT_VA_IN_STVAL_ON_LOAD_PAGE_FAULT |
S |
When true, WHen false, |
REPORT_VA_IN_STVAL_ON_STORE_AMO_ACCESS_FAULT |
S |
When true, WHen false, |
REPORT_VA_IN_STVAL_ON_STORE_AMO_MISALIGNED |
S |
When true, When false, |
REPORT_VA_IN_STVAL_ON_STORE_AMO_PAGE_FAULT |
S |
When true, WHen false, |
REPORT_VA_IN_VSTVAL_ON_BREAKPOINT |
H |
When true, When false, Regardless, |
REPORT_VA_IN_VSTVAL_ON_INSTRUCTION_ACCESS_FAULT |
H |
When true, WHen false, |
REPORT_VA_IN_VSTVAL_ON_INSTRUCTION_MISALIGNED |
H |
When true, When false, Note that when IALIGN=16 (i.e., when the |
REPORT_VA_IN_VSTVAL_ON_INSTRUCTION_PAGE_FAULT |
H |
When true, WHen false, |
REPORT_VA_IN_VSTVAL_ON_LOAD_ACCESS_FAULT |
H |
When true, WHen false, |
REPORT_VA_IN_VSTVAL_ON_LOAD_MISALIGNED |
H |
When true, When false, |
REPORT_VA_IN_VSTVAL_ON_LOAD_PAGE_FAULT |
H |
When true, WHen false, |
REPORT_VA_IN_VSTVAL_ON_STORE_AMO_ACCESS_FAULT |
H |
When true, WHen false, |
REPORT_VA_IN_VSTVAL_ON_STORE_AMO_MISALIGNED |
H |
When true, When false, |
REPORT_VA_IN_VSTVAL_ON_STORE_AMO_PAGE_FAULT |
H |
When true, WHen false, |
RESERVED_VSET_X0X0_VILL_SET |
Zvl32b |
When rs1 = x0 and rd = x0, vset instructions act as if the current
vector length in |
RESERVED_VSET_X0X0_VLMAX_CHANGE |
Zvl32b |
When rs1=x0 and rd=x0, the instructions operate as if the current vector length in vl is used as the AVL. Use of the vset instructions with a new SEW/LMUL ratio that would result in a change of VLMAX is reserved. Implementations may set vill in either case. |
RVV_VL_WHEN_AVL_LT_DOUBLE_VLMAX |
Zvl32b |
The value assigned to VL when AVL < 2*VLMAX. |
SATP_MODE_BARE |
S |
Whether or not satp.MODE == Bare is supported. |
SCONTEXT_IMPLEMENTED |
Sdtrig, S |
Specifies if the scontext CSR is implemented |
SCTRDEPTH_DEPTH_LEGAL_VALUES |
Smctr |
The set of supported actual depths for the Control Transfer Records (CTR) buffer. |
SDTRIG_BREAKPOINT_REENTRANCY |
Sdtrig |
How the hart prevents triggers with action=0 (breakpoint exception) from re-firing inside their own handler (Debug spec 1.0, Sdtrig "Native Triggers"). * No_reentrancy_support: no specific support for reentrancy. * Use_interrupt_enables: triggers with action=0 do not match or fire in M-mode while mstatus.MIE is 0 (and likewise S/VS-mode with sstatus.SIE / vsstatus.SIE when delegated). * Use_tcontrol: tcontrol.mte and tcontrol.mpte are implemented, and medeleg[3] is hard-wired to 0. |
SDTRIG_ETRIGGER_SUPPORTED_EXCEPTIONS |
Sdtrig |
The set of exception codes (mcause Exception Code) that etrigger can be enabled for, i.e. the bits of etrigger.tdata2 that are writable as 1. Debug spec 1.0, etrigger: "Hardware may support only a subset of exceptions." |
SDTRIG_ETRIGGER_SUPPORTED_TRIGGERS |
Sdtrig |
Indicates which triggers support etrigger. Entry i is true if the trigger selected by tselect=i supports etrigger. Must have exactly SDTRIG_NUM_TRIGGERS entries. |
SDTRIG_ICOUNT_COUNT_HARDWIRED_1 |
Sdtrig |
If true then icount.count is hard-wired to 1 for all icount triggers: it does not become 0 when the trigger matches, and icount.m, icount.s, icount.u, icount.vs, and icount.vu are cleared when the trigger fires. If false, icount.count is writable and becomes 0 when the trigger matches with a count of 1. |
SDTRIG_ICOUNT_SELF_WRITE_SETS_PENDING |
Sdtrig |
If true, a write to tdata1 that configures an icount trigger with count=1 also sets icount.pending when the writing instruction itself matches the trigger. If false, the writing instruction does not make the trigger pending. |
SDTRIG_ICOUNT_SUPPORTED_TRIGGERS |
Sdtrig |
Indicates which triggers support icount. Entry i is true if the trigger selected by tselect=i supports icount. Must have exactly SDTRIG_NUM_TRIGGERS entries. |
SDTRIG_ITRIGGER_SUPPORTED_INTERRUPTS |
Sdtrig |
The set of interrupt codes (mcause Exception Code) that itrigger can be enabled for, i.e. the bits of itrigger.tdata2 that are writable as 1. Debug spec 1.0, itrigger: "Hardware may only support a subset of interrupts for this trigger." |
SDTRIG_ITRIGGER_SUPPORTED_TRIGGERS |
Sdtrig |
Indicates which triggers support itrigger. Entry i is true if the trigger selected by tselect=i supports itrigger. Must have exactly SDTRIG_NUM_TRIGGERS entries. |
SDTRIG_MAX_CHAIN_LENGTH |
Sdtrig |
The maximum number of triggers in a trigger chain. A value of 1 means chaining is not supported. Cannot exceed SDTRIG_NUM_TRIGGERS. Debug spec 1.0, mcontrol6.chain: "Implementations that wish to limit the maximum length of a trigger chain (eg. to meet timing requirements) may do so by zeroing chain in writes to mcontrol6 that would make the chain too long." |
SDTRIG_MCONTROL6_EXECUTE_WRITABLE |
Sdtrig |
If true, mcontrol6.EXECUTE can be set to 1, so mcontrol6 triggers can match on instruction execution. If false, mcontrol6.EXECUTE is read-only 0. Since mcontrol6.EXECUTE resets to 0, 0 is always supported. |
SDTRIG_MCONTROL6_LOAD_WRITABLE |
Sdtrig |
If true, mcontrol6.LOAD can be set to 1, so mcontrol6 triggers can match on loads. If false, mcontrol6.LOAD is read-only 0. Since mcontrol6.LOAD resets to 0, 0 is always supported. |
SDTRIG_MCONTROL6_MASKMAX6 |
Sdtrig |
In implementations that support match mode 1 (NAPOT), not all NAPOT ranges may be supported. All NAPOT ranges between 2^1 and 2^SDTRIG_MCONTROL6_MASKMAX6 are supported. |
SDTRIG_MCONTROL6_MATCH_LEGAL_VALUES |
Sdtrig |
The set of values that mcontrol6.MATCH supports. |
SDTRIG_MCONTROL6_SELECT_WRITABLE |
Sdtrig |
If true, mcontrol6.SELECT can be set to 1, so mcontrol6 triggers can match on data (select=1) as well as address. If false, mcontrol6.SELECT is read-only 0. Since mcontrol6.SELECT resets to 0, 0 is always supported. |
SDTRIG_MCONTROL6_SIZE_LEGAL_VALUES |
Sdtrig |
The set of values that mcontrol6.SIZE supports (0: any, 1: 8-bit, 2: 16-bit, 3: 32-bit, 4: 48-bit, 5: 64-bit, 6: 128-bit). |
SDTRIG_MCONTROL6_STORE_WRITABLE |
Sdtrig |
If true, mcontrol6.STORE can be set to 1, so mcontrol6 triggers can match on stores. If false, mcontrol6.STORE is read-only 0. Since mcontrol6.STORE resets to 0, 0 is always supported. |
SDTRIG_MCONTROL6_SUPPORTED_TRIGGERS |
Sdtrig |
Indicates which triggers support mcontrol6. Entry i is true if the trigger selected by tselect=i supports mcontrol6. Must have exactly SDTRIG_NUM_TRIGGERS entries. |
SDTRIG_M_WRITABLE |
Sdtrig |
If true, the M bit in every trigger type that has one (mcontrol, mcontrol6, icount, itrigger, etrigger) can be set to 1, so triggers can match in M-mode. If false, the M bit is read-only 0. Since the M bit resets to 0, 0 is always supported. |
SDTRIG_NUM_TRIGGERS |
Sdtrig |
The number of triggers implemented. Triggers are indexed by tselect from 0 to SDTRIG_NUM_TRIGGERS - 1. |
SDTRIG_S_WRITABLE |
Sdtrig, S |
If true, the S bit in every trigger type that has one (mcontrol, mcontrol6, icount, itrigger, etrigger) can be set to 1, so triggers can match in S/HS-mode. If false, the S bit is read-only 0. Since the S bit resets to 0, 0 is always supported. |
SDTRIG_TEXTRA_MHSELECT_MCONTEXT_MATCH |
Sdtrig |
If true, textra.mhselect values 4 (and, with H, 1 and 5) are supported, matching on mcontext. Unsupported mhselect values are legalized to 0 (ignore). |
SDTRIG_TEXTRA_MHSELECT_VMID_MATCH |
Sdtrig, H |
If true, textra.mhselect values 2 and 6 are supported, matching on the VMID in hgatp. Unsupported mhselect values are legalized to 0 (ignore). |
SDTRIG_TEXTRA_MHVALUE_LEN |
Sdtrig |
The number of implemented textra.mhvalue bits. Bits above these are read-only zero. |
SDTRIG_TEXTRA_SSELECT_ASID_MATCH |
Sdtrig, S |
If true, textra.sselect value 2 is supported, matching on the ASID in satp or vsatp. Unsupported sselect values are legalized to 0 (ignore). |
SDTRIG_TEXTRA_SSELECT_SCONTEXT_MATCH |
Sdtrig, S |
If true, textra.sselect value 1 is supported, matching on scontext. Unsupported sselect values are legalized to 0 (ignore). |
SDTRIG_TEXTRA_SVALUE_LEN |
Sdtrig |
The number of implemented textra.svalue bits. Bits above these are read-only zero. |
SDTRIG_U_WRITABLE |
Sdtrig, U |
If true, the U bit in every trigger type that has one (mcontrol, mcontrol6, icount, itrigger, etrigger) can be set to 1, so triggers can match in U-mode. If false, the U bit is read-only 0. Since the U bit resets to 0, 0 is always supported. |
SDTRIG_VS_WRITABLE |
Sdtrig, H |
If true, the VS bit in every trigger type that has one (mcontrol, mcontrol6, icount, itrigger, etrigger) can be set to 1, so triggers can match in VS-mode. If false, the VS bit is read-only 0. Since the VS bit resets to 0, 0 is always supported. |
SDTRIG_VU_WRITABLE |
Sdtrig, H |
If true, the VU bit in every trigger type that has one (mcontrol, mcontrol6, icount, itrigger, etrigger) can be set to 1, so triggers can match in VU-mode. If false, the VU bit is read-only 0. Since the VU bit resets to 0, 0 is always supported. |
SEI_INTR_IMPL |
Zicsr, S |
Whether or not supervisor-level external interrupts are implemented. Possible values: true::
Supervisor-level external interrupts are implemented.
false::
Supervisor-level external interrupts are not implemented.
|
SEW_MIN |
Zvl32b |
Implementations must provide fractional LMUL settings that allow the narrowest supported element width (SEW) to occupy a fractional portion of a vector register relative to the widest supported SEW. In general, implementations must support LMUL >= SEW_MIN/ELEN, where SEW_MIN is the narrowest supported SEW and ELEN is the widest SEW. |
SSEED_READ_ONLY_ZERO |
Sm, Zkr, S |
Indicates whether the Options: true::
false::
|
SSI_INTR_IMPL |
Zicsr, S |
Whether or not supervisor-level software interrupts are implemented. Possible values: true::
Supervisor-level software interrupts are implemented.
false::
Supervisor-level software interrupts are not implemented.
|
SSTATEEN_JVT_TYPE |
Zcmt, Ssstateen |
Behavior of the sstateen0.JVT bit: * 'rw': read-write * 'read-only-0': read-only, fixed to 0 * 'read-only-1': read-only, fixed to 1 |
STI_INTR_IMPL |
Zicsr, S |
Whether or not supervisor-level timer interrupts are implemented. If Sstc is implemented, then STI_INTR_IMPL must be true. Possible values: true::
Supervisor-level timer interrupts are implemented.
false::
Supervisor-level timer interrupts are not implemented.
|
STVAL_WIDTH |
S |
The number of implemented bits in Must be greater than or equal to max( |
SUPPORTED_PMLEN_SMMPM |
Smmpm |
The Options: 0:: PMLEN=0 (pointer masking is disabled) 7:: PMLEN=XLEN-57 (i.e., PMLEN=7 on RV64) 16:: PMLEN=XLEN-48 (i.e., PMLEN=16 on RV64) The current standard only supports these values ( |
SUPPORTED_PMLEN_SMNPM |
Smnpm |
The Options: 0:: PMLEN=0 (pointer masking is disabled) 7:: PMLEN=XLEN-57 (i.e., PMLEN=7 on RV64) 16:: PMLEN=XLEN-48 (i.e., PMLEN=16 on RV64) The current standard only supports these values ( |
SUPPORTED_PMLEN_SSNPM |
Ssnpm |
The Options: 0:: PMLEN=0 (pointer masking is disabled) 7:: PMLEN=XLEN-57 (i.e., PMLEN=7 on RV64) 16:: PMLEN=XLEN-48 (i.e., PMLEN=16 on RV64) The current standard only supports these values ( |
SUPPORT_FRACTIONAL_LMUL_BEYOND_REQUIRED |
Zvl32b |
For a given supported fractional LMUL setting, implementations must provide support for SEW settings covering the range from SEW_MIN up to LMUL * ELEN, inclusive. This ensures types narrower than the maximum SEW are supported when fractional LMULs are selected. |
SV32X4_TRANSLATION |
H |
Whether or not Sv32x4 translation mode is supported. |
SV32_VSMODE_TRANSLATION |
H |
Whether or not Sv32 translation is supported in first-stage (VS-stage) translation. |
SV39X4_TRANSLATION |
H |
Whether or not Sv39x4 translation mode is supported. |
SV39_VSMODE_TRANSLATION |
H |
Whether or not Sv39 translation is supported in first-stage (VS-stage) translation. |
SV48X4_TRANSLATION |
H |
Whether or not Sv48x4 translation mode is supported. |
SV48_VSMODE_TRANSLATION |
H |
Whether or not Sv48 translation is supported in first-stage (VS-stage) translation. |
SV57X4_TRANSLATION |
H |
Whether or not Sv57x4 translation mode is supported. |
SV57_VSMODE_TRANSLATION |
H |
Whether or not Sv57 translation is supported in first-stage (VS-stage) translation. |
SXLEN |
S |
Set of XLENs supported in S-mode. Can be one of: * [32]: SXLEN is always 32 * [64]: SXLEN is always 64 * [32, 64]: SXLEN can be changed (via mstatus.SXL) between 32 and 64 |
S_MODE_ENDIANNESS |
S |
Endianness of data in S-mode. Can be one of: * little: S-mode data is always little endian
* big: S-mode data is always big endian
* dynamic: S-mode data can be either little or big endian,
depending on the CSR field |
TCONTROL_IMPLEMENTED |
Sdtrig |
Specifies if the tcontrol CSR is implemented |
TDATA2_IMPLEMENTED |
Sdtrig |
Specifies if the tdata2 CSR is implemented. Debug spec 1.0, tdata2: "This register is optional if no implemented triggers use it." |
TDATA3_IMPLEMENTED |
Sdtrig |
Specifies if the tdata3 CSR is implemented. Debug spec 1.0, tdata3: "This register is optional if no implemented triggers use it." Must be true if any trigger supports type 2-6 (mcontrol, icount, itrigger, etrigger, mcontrol6). |
TINST_VALUE_ON_BREAKPOINT |
H |
Value written into htinst/mtinst on a Breakpoint exception from VU/VS-mode. Possible values: * "always zero": Always write the value zero * "custom": Write a custom value, which results in UNPREDICTABLE |
TINST_VALUE_ON_FINAL_INSTRUCTION_GUEST_PAGE_FAULT |
H |
Value written into htinst/mtinst when there is an instruction guest-page fault on a final translation. Possible values: * "always zero": Always write the value zero * "always pseudoinstruction": Always write the pseudoinstruction |
TINST_VALUE_ON_FINAL_LOAD_GUEST_PAGE_FAULT |
H |
Value written into htinst/mtinst when there is a load guest-page fault on a final translation. Possible values: * "always zero": Always write the value zero * "always pseudoinstruction": Always write the pseudoinstruction * "always transformed standard instruction": Always write the transformation of the standard instruction encoding * "custom": A custom value, which will cause an UNPREDICTABLE event. |
TINST_VALUE_ON_FINAL_STORE_AMO_GUEST_PAGE_FAULT |
H |
Value written into htinst/mtinst when there is a store/AMO guest-page fault on a final translation. Possible values: * "always zero": Always write the value zero * "always pseudoinstruction": Always write the pseudoinstruction * "always transformed standard instruction": Always write the transformation of the standard instruction encoding * "custom": A custom value, which will cause an UNPREDICTABLE event. |
TINST_VALUE_ON_INSTRUCTION_ADDRESS_MISALIGNED |
H |
Value written into htinst/mtinst when there is an instruction address misaligned exception. Possible values: * "always zero": Always write the value zero * "custom": Write a custom value, which results in UNPREDICTABLE |
TINST_VALUE_ON_LOAD_ACCESS_FAULT |
H |
Value written into htinst/mtinst on an AccessFault exception from VU/VS-mode. Possible values: * "always zero": Always write the value zero * "always transformed standard instruction": Always write a transformed standard instruction as defined by H * "custom": Write a custom value, which results in UNPREDICTABLE |
TINST_VALUE_ON_LOAD_ADDRESS_MISALIGNED |
H |
Value written into htinst/mtinst on a LoadAddressMisaligned exception from VU/VS-mode. Possible values: * "always zero": Always write the value zero * "always transformed standard instruction": Always write a transformed standard instruction as defined by H * "custom": Write a custom value, which results in UNPREDICTABLE |
TINST_VALUE_ON_LOAD_PAGE_FAULT |
H |
Value written into htinst/mtinst on a LoadPageFault exception from VU/VS-mode. Possible values: * "always zero": Always write the value zero * "always transformed standard instruction": Always write a transformed standard instruction as defined by H * "custom": Write a custom value, which results in UNPREDICTABLE |
TINST_VALUE_ON_MCALL |
H |
Value written into htinst/mtinst on a MCall exception from VU/VS-mode. Possible values: * "always zero": Always write the value zero * "custom": Write a custom value, which results in UNPREDICTABLE |
TINST_VALUE_ON_SCALL |
H |
Value written into htinst/mtinst on a SCall exception from VU/VS-mode. Possible values: * "always zero": Always write the value zero * "custom": Write a custom value, which results in UNPREDICTABLE |
TINST_VALUE_ON_STORE_AMO_ACCESS_FAULT |
H |
Value written into htinst/mtinst on an AccessFault exception from VU/VS-mode. Possible values: * "always zero": Always write the value zero * "always transformed standard instruction": Always write a transformed standard instruction as defined by H * "custom": Write a custom value, which results in UNPREDICTABLE |
TINST_VALUE_ON_STORE_AMO_ADDRESS_MISALIGNED |
H |
Value written into htinst/mtinst on a StoreAmoAddressMisaligned exception from VU/VS-mode. Possible values: * "always zero": Always write the value zero * "always transformed standard instruction": Always write a transformed standard instruction as defined by H * "custom": Write a custom value, which results in UNPREDICTABLE |
TINST_VALUE_ON_STORE_AMO_PAGE_FAULT |
H |
Value written into htinst/mtinst on a StoreAmoPageFault exception from VU/VS-mode. Possible values: * "always zero": Always write the value zero * "always transformed standard instruction": Always write a transformed standard instruction as defined by H * "custom": Write a custom value, which results in UNPREDICTABLE |
TINST_VALUE_ON_UCALL |
H |
Value written into htinst/mtinst on a UCall exception from VU/VS-mode. Possible values: * "always zero": Always write the value zero * "custom": Write a custom value, which results in UNPREDICTABLE |
TINST_VALUE_ON_VIRTUAL_INSTRUCTION |
H |
Value written into htinst/mtinst on a VirtualInstruction exception from VU/VS-mode. Possible values: * "always zero": Always write the value zero * "custom": Write a custom value, which results in UNPREDICTABLE |
TINST_VALUE_ON_VSCALL |
H |
Value written into htinst/mtinst on a VSCall exception from VU/VS-mode. Possible values: * "always zero": Always write the value zero * "custom": Write a custom value, which results in UNPREDICTABLE |
TRAP_ON_ECALL_FROM_S |
S |
Whether or not an ECALL-from-S-mode causes a synchronous exception. The spec states that implementations may handle ECALLs transparently without raising a trap, in which case the EEI must provide a builtin. |
TRAP_ON_ECALL_FROM_U |
U |
Whether or not an ECALL-from-U-mode causes a synchronous exception. The spec states that implementations may handle ECALLs transparently without raising a trap, in which case the EEI must provide a builtin. |
TRAP_ON_ECALL_FROM_VS |
H |
Whether or not an ECALL-from-VS-mode causes a synchronous exception. The spec states that implementations may handle ECALLs transparently without raising a trap, in which case the EEI must provide a builtin. |
TRAP_ON_ILLEGAL_WLRL |
Sm |
Options: * true: Writing an illegal value to a WLRL CSR field will cause an IllegalInstruction exception. * false: Writing an illegal value to a WLRL CSR field causes unpredictable behavior. |
TRAP_ON_RESERVED_INSTRUCTION |
Sm |
Options: * true: Fetching an unimplemented and/or undefined instruction from the standard/reserved opcode space will cause an IllegalInstruction exception. * false: Fetching an unimplemented and/or undefined instruction from the standard/reserved opcose space causes unpredictable behavior. TRAP_ON_RESERVED_INSTRUCTION may be false while TRAP_ON_UNIMPLEMENTED_INSTRUCTION is true when a custom instruction is implemented in the standard/reserved opcode space. |
TRAP_ON_SFENCE_VMA_WHEN_SATP_MODE_IS_READ_ONLY |
S, Sv32, Sv39, Sv48, Sv57 |
For implementations that make TRAP_ON_SFENCE_VMA_WHEN_SATP_MODE_IS_READ_ONLY indicates whether or not that exception occurs. TRAP_ON_SFENCE_VMA_WHEN_SATP_MODE_IS_READ_ONLY has no effect when some virtual translation mode is supported. |
TRAP_ON_UNIMPLEMENTED_CSR |
Sm |
Options: * true: Accessing an unimplemented CSR (via a |
TRAP_ON_UNIMPLEMENTED_INSTRUCTION |
Sm |
Options: * true: Fetching an unimplemented instruction will cause an IllegalInstruction exception. * false: Fetching an unimplemented instruction causes unpredictable behavior. An unimplemented instruction is any instruction encoding that is not defined by the implementation. Custom instructions are considered implemented. |
USEED_READ_ONLY_ZERO |
Sm, Zkr, U |
Indicates whether the Options: true::
false::
|
UXLEN |
U |
Set of XLENs supported in U-mode. When both 32 and 64 are supported, UXLEN can be changed, via mstatus.UXL, between 32 and 64. |
U_MODE_ENDIANNESS |
U |
Endianness of data in U-mode. Can be one of: * little: U-mode data is always little endian
* big: U-mode data is always big endian
* dynamic: U-mode data can be either little or big endian,
depending on the CSR field |
VECTOR_FF_NO_EXCEPTION_TRIM |
Zvl32b |
Implementations may process fewer than |
VECTOR_FF_SEG_EXCEPTION_PARTIAL_LOAD |
Zvl32b |
For fault-only-first segment loads, if an exception occurs partway
through the zeroth segment, the trap is taken. If it occurs in a
subsequent segment, |
VECTOR_FF_UPDATE_PAST_TRIM |
Zvl32b |
Fault-only-first (FF) load instructions may update active destination
elements beyond the index that causes vector-length trimming, but not
past the original |
VECTOR_LOAD_PAST_TRAP |
Zvl32b |
Vector load instructions may overwrite active destination vector register group elements past the element index where a trap is reported; the behavior for elements beyond the trap index is implementation-defined. |
VECTOR_LOAD_SEG_FF_OVERWRITE_ELEMENTS_AFTER_FAULT |
Zvl32b |
Fault-only-first segment load instructions may overwrite destination
vector register group elements beyond the point where a trap is
reported or where |
VECTOR_LS_INDEX_MAX_EEW |
Zvl32b |
A profile may place an upper limit on the maximum supported index EEW used by vector load/store indexing. For example, some profiles may limit indexing to sizes no larger than XLEN or a fixed EEW value. |
VECTOR_LS_MISALIGNED_LEGAL |
Zvl32b |
If an element accessed by a vector memory instruction is not naturally aligned to the size of the element, either the element is transferred successfully or an address misaligned exception is raised on that element. Support for misaligned vector memory accesses is independent of an implementation’s support for misaligned scalar memory accesses. |
VECTOR_LS_SEG_PARTIAL_ACCESS |
Zvl32b |
If a trap occurs during access to a segment, it is implementation-defined whether some, all, or none of that segment’s element accesses are performed before the trap is taken. |
VECTOR_LS_WHOLEREG_MISALIGNED_LEGAL |
Zvl32b |
Implementations may raise a misaligned address exception for whole-register loads/stores if the base address is not aligned to the maximum of the encoded EEW size (in bytes) or the implementation’s smallest supported SEW (in bytes). |
VFREDUSUM_FINAL_NODE_ELEMENT_BEHAVIOR |
Zvl32b |
Implementations are permitted to insert an additional additive identity into the final reduction result, which may affect the final outcome when no active elements are present. |
VFREDUSUM_INACTIVE_NODE_ELEMENT_BEHAVIOR |
Zvl32b |
A reduction node that receives an input derived solely from masked-off
elements or elements beyond |
VFREDUSUM_NAN |
Zvl32b |
The reduction tree structure must be deterministic for a given |
VFREDUSUM_NODE_ROUNDING_BEHAVIOR |
Zvl32b |
Each reduction operator computes an exact sum using an ideal scalar floating-point addition, then converts that result into a floating- point format with range and precision at least as large as the element SEW, rounding with the current dynamic rounding mode and raising exceptions as needed. Implementations may choose the exact range and precision per operator. |
VILL_SET_ON_RESERVED_VTYPE |
Zvl32b |
Use of vtype encodings with LMUL < SEW_MIN/ELEN is reserved. Implementations
may set the |
VLEN |
Zvl32b |
The number of bits in a single vector register. |
VMID_WIDTH |
H |
Number of bits supported in |
VSSTAGE_MODE_BARE |
H |
Whether or not writing mode=Bare is supported in the |
VSSTATUS_VS_EXISTS |
Zvl32b |
Some implementations provide a |
VSTVEC_MODES |
H |
Options: 0::
Direct; All traps set If only one mode is given, |
VSXLEN |
H |
Set of XLENs supported in VS-mode. Can be one of: * [32]: VSXLEN is always 32
* [64]: VSXLEN is always 64
* [32, 64]: VSXLEN can be changed (via |
VS_MODE_ENDIANNESS |
H |
Endianness of data in VS-mode. Can be one of: * little: VS-mode data is always little endian
* big: VS-mode data is always big endian
* dynamic: VS-mode data can be either little or big endian,
depending on the CSR field |
VUXLEN |
H |
Set of XLENs supported in VU-mode. When both 32 and 64 are supported, VUXLEN can be changed
via |
VU_MODE_ENDIANNESS |
H |
Endianness of data in VU-mode. Can be one of: * little: VU-mode data is always little endian
* big: VU-mode data is always big endian
* dynamic: VU-mode data can be either little or big endian,
depending on the CSR field |
WFI_FINITE |
Sm |
Options: * true: WFI resumes execution after waiting for a finite amount of time * false: WFI may continue waiting until another event causes execution to resume |
WFI_U_MODE |
Sm |
Options: * true: WFI can be executed in U mode * false: Executing WFI in U mode raises an illegal instruction exception |
ZAWRS_NTO_IS_NOP |
Zawrs |
When true, WRS.NTO completes immediately, behaving as a no-op, rather than stalling the hart. |
Appendix E: Examples
This appendix gives examples of coverpoints and tests consistent with the test plan. These examples are not the only way to satisfy the testplan.
E.1. Unprivileged example: add
Coverage is in I_coverage.svh:
add Covergroupcovergroup I_add_cg with function sample(ins_t ins);
option.per_instance = 0;
cp_asm_count : coverpoint ins.ins_str == "add" iff (ins.trap == 0 ) {
//Number of times instruction is executed
bins count[] = {1};
}
cp_rs1 : coverpoint ins.get_gpr_reg(ins.current.rs1) iff (ins.trap == 0 ) {
//RS1 register assignment
}
cp_rs2 : coverpoint ins.get_gpr_reg(ins.current.rs2) iff (ins.trap == 0 ) {
//RS2 register assignment
}
cp_rd : coverpoint ins.get_gpr_reg(ins.current.rd) iff (ins.trap == 0 ) {
//RD register assignment
}
cp_rs1_edges : coverpoint unsigned'(ins.current.rs1_val) iff (ins.trap == 0 ) {
`ifdef UDB_MXLEN_32
bins zero = {0};
bins one = {32'b00000000000000000000000000000001};
bins two = {32'b00000000000000000000000000000010};
bins min = {32'b10000000000000000000000000000000};
bins minp1 = {32'b10000000000000000000000000000001};
bins max = {32'b01111111111111111111111111111111};
bins maxm1 = {32'b01111111111111111111111111111110};
bins ones = {32'b11111111111111111111111111111111};
bins onesm1 = {32'b11111111111111111111111111111110};
bins walkodd = {32'b10101010101010101010101010101010};
bins walkeven = {32'b01010101010101010101010101010101};
wildcard bins random = {32'b01???????????????????????????010};
`else
bins zero = {0};
bins one = {64'b0000000000000000000000000000000000000000000000000000000000000001};
bins two = {64'b0000000000000000000000000000000000000000000000000000000000000010};
bins min = {64'b1000000000000000000000000000000000000000000000000000000000000000};
bins minp1 = {64'b1000000000000000000000000000000000000000000000000000000000000001};
bins Wmax = {64'b0000000000000000000000000000000011111111111111111111111111111111};
bins Wmaxm1 = {64'b0000000000000000000000000000000011111111111111111111111111111110};
bins Wmaxp1 = {64'b0000000000000000000000000000000100000000000000000000000000000000};
bins Wmaxp2 = {64'b0000000000000000000000000000000100000000000000000000000000000001};
bins W80 = {64'b0000000000000000000000000000000010000000000000000000000000000000};
bins W7F = {64'b0000000000000000000000000000000001111111111111111111111111111111};
bins max = {64'b0111111111111111111111111111111111111111111111111111111111111111};
bins maxm1 = {64'b0111111111111111111111111111111111111111111111111111111111111110};
bins ones = {64'b1111111111111111111111111111111111111111111111111111111111111111};
bins onesm1 = {64'b1111111111111111111111111111111111111111111111111111111111111110};
bins walkodd = {64'b1010101010101010101010101010101010101010101010101010101010101010};
bins walkeven = {64'b0101010101010101010101010101010101010101010101010101010101010101};
wildcard bins random = {64'b01???????????????????????????????????????????????????????????010};
`endif
}
cp_rs2_edges : coverpoint unsigned'(ins.current.rs2_val) iff (ins.trap == 0 ) {
`ifdef UDB_MXLEN_32
bins zero = {0};
...
`else
bins zero = {0};
...
`endif
}
cr_rs1_rs2_edges : cross cp_rs1_edges,cp_rs2_edges iff (ins.trap == 0 ) {
//Cross coverage of RS1 edges and RS2 edges
}
cmp_rs1_rs2 : coverpoint ins.get_gpr_reg(ins.current.rs1) iff (ins.current.rs1 == ins.current.rs2 & ins.trap == 0 ) {
//Compare assignments of all registers
}
cmp_rd_rs1 : coverpoint ins.get_gpr_reg(ins.current.rd) iff (ins.current.rd == ins.current.rs1 & ins.trap == 0 ) {
//Compare assignments of all registers
}
cmp_rd_rs2 : coverpoint ins.get_gpr_reg(ins.current.rd) iff (ins.current.rd == ins.current.rs2 & ins.trap == 0 ) {
//Compare assignments of all registers
}
cmp_rd_rs1_rs2 : coverpoint ins.get_gpr_reg(ins.current.rd) iff (ins.current.rd == ins.current.rs1 & ins.current.rd == ins.current.rs2 & ins.trap == 0 ) {
//Compare assignments of all registers
}
cp_gpr_hazard_rw : coverpoint check_gpr_hazards(ins.hart, ins.issue) iff (ins.trap == 0 ) {
//GPR Hazard
bins hazards[] = {NO_HAZARD, RAW_HAZARD, WAW_HAZARD, WAR_HAZARD};
}
endgroup
Corresponding RV32 tests are in tests/rv32/I/I-add.S. Observe how the directed tests align with the coverpoints and bins. Register numbers and values are randomized unless they are swept by the coverpoint. The RVTEST_SIGUPD macro compares the result against an expected signature produced by a reference model. When register 0 is used, it is loaded with a random value, but hardwired to 0, so the reference model will show that it behaves as 0.
add Tests# Testcase cp_rs1 (Test source rs1 = x0)
li x0, 0xb4e96718 # initialize rs1
li x24, 0xeaa512b3 # initialize rs2
add x25, x0, x24 # perform operation
RVTEST_SIGUPD(x3, x25)
# Testcase cp_rs1 (Test source rs1 = x1)
li x1, 0x81c4ef2a # initialize rs1
li x6, 0x917cfa69 # initialize rs2
add x7, x1, x6 # perform operation
RVTEST_SIGUPD(x3, x7)
...
# Testcase cp_rs1 (Test source rs1 = x31)
mv x21, x31 # switch signature pointer register to avoid conflict with test
li x31, 0x1508dd4e # initialize rs1
li x14, 0x830d07b0 # initialize rs2
add x11, x31, x14 # perform operation
RVTEST_SIGUPD(x21, x11)
# Testcase cp_rd (Test destination rd = x0)
li x19, 0x1d01c852 # initialize rs1
li x9, 0x1bfbf146 # initialize rs2
add x0, x19, x9 # perform operation
RVTEST_SIGUPD(x20, x0)
# Testcase cp_rd (Test destination rd = x1)
li x26, 0x1e3aafcf # initialize rs1
li x19, 0x986da37b # initialize rs2
add x1, x26, x19 # perform operation
RVTEST_SIGUPD(x20, x1)
...
# Testcase cr_rs1_rs2_edges (Test source rs1 = 0x0 rs2 = 0x0)
li x15, 0x00000000 # initialize rs1
li x5, 0x00000000 # initialize rs2
add x11, x15, x5 # perform operation
RVTEST_SIGUPD(x10, x11)
# Testcase cr_rs1_rs2_edges (Test source rs1 = 0x0 rs2 = 0x1)
li x1, 0x00000000 # initialize rs1
li x31, 0x00000001 # initialize rs2
add x20, x1, x31 # perform operation
RVTEST_SIGUPD(x10, x20)
# Testcase cr_rs1_rs2_edges (Test source rs1 = 0x0 rs2 = 0x2)
li x27, 0x00000000 # initialize rs1
li x3, 0x00000002 # initialize rs2
add x11, x27, x3 # perform operation
RVTEST_SIGUPD(x10, x11)
# Testcase cr_rs1_rs2_edges (Test source rs1 = 0x0 rs2 = 0x80000000)
li x8, 0x00000000 # initialize rs1
li x5, 0x80000000 # initialize rs2
add x16, x8, x5 # perform operation
RVTEST_SIGUPD(x10, x16)
E.2. Test case example: cr_rs1_rs2_edges bin with rs1 = 0x0, rs2 = 0x80000000
# Testcase cr_rs1_rs2_edges (Test source rs1 = 0x0 rs2 = 0x80000000)
li x8, 0x00000000 # initialize rs1 in randomly selected register
li x5, 0x80000000 # initialize rs2 in randomly selected register
add x16, x8, x5 # perform operation, write randomly selected destination register
# load expected value of 0x800000000 into x20 from table pointed to by x10. Check x20 against x16 and report mismatch
RVTEST_SIGUPD(x10, x16, x20)
RVTEST_SIGUPD macro:
if (RVTEST_SELFCHECK) # check result against signature
LREG x20, 0(x10)
beq x16, x20, 1f
ecall
1f:
else # generate signature
SREG x16, 0(x10)
addi x10, x10, WORDSIZE
nop