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 |
||
Misalign |
Misaligned Load/Store |
o |
o |
o |
o |
o |
|
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 |
|
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 |
|||
Zic64bZicboz |
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 |
|||
UF |
User Float CSRs |
x |
x |
x |
|||
Zkr |
Entropy CSR |
o |
o |
o |
|||
ExceptionsSm |
Machine Exceptions |
x |
x |
x |
x |
||
ExceptionsS |
Supervisor Exceptions |
x |
x |
x |
|||
ExceptionsU |
User Exceptions |
x |
x |
x |
|||
ExceptionsF |
Float Exceptions |
x |
x |
x |
|||
ExceptionsZalrsc |
LR/SC Exceptions |
x |
x |
x |
|||
ExceptionsZaamo |
AMO Exceptions |
x |
x |
x |
|||
ExceptionsZc |
Compressed Exceptions |
x |
x |
x |
x |
||
ExceptionsZicboS |
Supervisor CBO Exceptions |
x |
x |
x |
|||
ExceptionsZicboU |
User CBO Exceptions |
x |
x |
x |
|||
ExceptionsSv |
Virt Mem Exceptions |
x |
x |
x |
|||
ExceptionsSvZalrsc |
Virt Mem LR/SC Exceptions |
x |
x |
x |
|||
ExceptionsSvZaamo |
Virt Mem AMO Exceptions |
x |
x |
x |
|||
InterruptsSm |
Machine Interrupts |
x |
x |
x |
x |
||
InterruptsS |
Supervisor Interrupts |
x |
x |
x |
|||
SstcSm |
Machine Supervisor Timer Compare |
x |
x |
x |
|||
Sstc |
Supervisor Timer Compare |
x |
x |
x |
|||
ZicntrS |
Supervisor Counters |
x |
x |
x |
|||
ZicntrU |
User Counters |
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 |
||||||
PMPSm |
Machine PMP |
x |
x |
x |
x |
||
PMPS |
Supervisor PMP |
x |
x |
x |
|||
PMPU |
User PMP |
x |
x |
x |
|||
PMPF |
Float PMP |
x |
x |
x |
|||
PMPZca |
Compressed PMP |
x |
x |
x |
x |
||
PMPZicbo |
PMP + CBOM/CBOZ |
x |
x |
x |
|||
PMPZaamo |
AMO PMP |
x |
x |
x |
|||
PMPZalrsc |
LR/SC PMP |
x |
x |
x |
|||
Svbare |
No Virtual Memory |
x |
x |
x |
|||
Sv |
Sv32/39/48/57 Virtual Memory |
x |
x |
x |
|||
SvSm |
Machine-Mode Virtual Memory |
x |
x |
x |
|||
Svinval |
TLB Invalidation |
x |
x |
x |
|||
SvPMP |
VM + PMP |
x |
x |
x |
|||
SvZicbo |
VM + CBOM/CBOZ |
x |
x |
x |
|||
SvPMPZicbo |
VM + PMP + CBOM/CBOZ |
x |
x |
x |
|||
Svade |
Page Table A/D Exceptions |
x |
x |
x |
|||
Svadu |
Page Table Update |
o |
o |
||||
SvaduPMP |
Page Table Update + PMP |
o |
o |
||||
Svpbmt |
Page-based Memory Types |
x |
x |
x |
|||
Svnapot |
Naturally Aligned Pages |
o |
x |
x |
|||
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 |
|||||||
SsstrictSm |
Machine Strict (unratified) |
o |
o |
o |
|||
SsstrictS |
Supervisor 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 |
|||
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 |
|||
UV |
User Vector CSRs |
o |
o |
x |
|||
MisalignV |
Vector Misalignment |
o |
o |
o |
|||
SsstrictV |
Vector Strict |
o |
o |
o |
|||
Hypervisor |
|||||||
H |
Hypervisor Instructions |
o |
o |
x |
|||
ExceptionsH |
Hypervisor Exceptions |
o |
o |
x |
|||
ExceptionsHV |
Hypervisor Vector Exceptions |
o |
o |
x |
|||
InterruptsH |
Hypervisor Interrupts |
o |
o |
x |
|||
EndianH |
Hypervisor Endian |
||||||
ZicntrH |
Hypervisor Counters |
o |
o |
x |
|||
HV |
Hypervisor + Vector CSRs |
o |
o |
x |
|||
PMPH |
Hypervisor PMP |
o |
o |
x |
|||
SvH |
Hypervisor Virtual Memory |
o |
o |
x |
|||
SvHZicbo |
Hypervisor Virtual Memory + CBO |
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 |
|||
ZkrH |
Hypervisor Entropy |
o |
o |
x |
|||
SstcH |
Hypervisor Supervisor Timer |
o |
o |
x |
|||
SsstateenH |
Hypervisor State Enable |
o |
o |
x |
|||
SvinvalH |
Hypervisor TLB Inval |
o |
o |
x |
|||
SvaduH |
Hypervisor TLB Update |
o |
o |
o |
|||
ZicfilpH |
Hypervisor Landing Pad |
o |
o |
o |
|||
ZicfissH |
Hypervisor Shadow Stack |
o |
o |
o |
|||
Miscellaneous RV{A/B}23 Extensions |
|||||||
Ss1p13 |
Supervisor 1p13 |
x |
x |
||||
Ssnpm |
Pointer Masking |
x |
x |
||||
SsnpmSm |
Machine-Mode Pointer Masking with MPRV |
x |
x |
||||
SsnpmH |
Hypervisor Pointer Masking |
||||||
Zacas |
Atomic Compare-And-Swap |
o |
o |
||||
Zabha |
Subword Atomics |
o |
o |
||||
Zama16b |
Main memory PMA supports misaligned atomics within 16-byte regions |
x |
|||||
ZicfilpU |
User Landing Pads |
o |
o |
||||
ZicfilpSm |
Machine Landing Pads |
o |
o |
||||
ZicfilpS |
Supervisor Landing Pads |
o |
o |
||||
ZicfissU |
User Shadow Stack |
o |
o |
||||
ZicfissS |
Supervisor Shadow Stack |
o |
o |
||||
ZicfissSm |
Machine Shadow Stack |
o |
o |
||||
Zfbfmin |
BF16 Convert |
o |
o |
||||
Zimop |
Maybe-Ops |
x |
x |
||||
Zcmop |
Compressed Maybe-Ops |
x |
x |
||||
ZawrsSm |
Machine Wait on Reservation Set |
x |
x |
||||
ZawrsS |
Supervisor Wait on Reservation Set |
x |
x |
||||
ZawrsU |
User 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 |
||||||
MisalignQ |
Misaligned Quad |
none yet |
|||||
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 |
||||||
SmnpmS |
Machine Pointer Masking with S-mode |
||||||
SmnpmSSm |
Machine Pointer Masking with S-mode and MPRV |
||||||
SmnpmU |
Machine Pointer Masking without S-mode |
||||||
SmnpmUSm |
Machine Pointer Masking without S-mode and with MPRV |
||||||
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. 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 |
|---|---|---|---|---|---|---|
Ziccif |
Main memory PMA supports instruction fetch |
x |
x |
x |
||
Ziccrse |
Main memory PMA supports RsrvEventual |
x |
x |
x |
||
Ziccamoa |
Main memory PMA supports atomics |
x |
x |
x |
||
Ziccamoc |
Main memory PMA supports AMOCASQ |
x |
x |
|||
Zkt |
Constant-time scalar crypto |
x |
x |
x |
||
Zvkt |
Constant-time vector crypto |
x |
x |
x |
||
Svvptc |
Valid PTEs appear within bounded time without fence |
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.
TODO: ** which of the Zicc extensions are tested by regular instructions?
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 SsstrictS 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
-
separate this into parts required for all test suites including TT vs. parts required only for ACT4
-
key for TT is to invoke RVMODEL_BOOT and RVMODEL_BOOT_TO_xMODE if they exist, and to implement SBI, also use other RVMODEL macros and link.ld
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 exists
-
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. This entire routine can be overridden by a RVMODEL equivalent for custom M-mode implementations that cannot access M-mode CSRs or use the standard mret method of entering S-mode.
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. Again, it can be overridden by RVMODEL_BOOT_TO_UMODE for custom M-mode implementations.
Finally, rvmodel_boot jumps to rvtest_init, which calls RVTEST_INIT_REGS to initialize GPRs, then sets up the signature pointer and checks a canary if applicable.*
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_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_CLR_MEXT_INT_M(_R1, _R2) |
Clears 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_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_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_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_SET_SEXT_INT(_R1, _R2) |
Sets 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_CLR_SEXT_INT(_R1, _R2) |
Clears the Supervisor External Interrupt |
If supervisor external interrupts are not supported. |
Any |
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_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_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_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 an access fault when any part of the region is read or written. 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. |
Omit if DUT does not generate some/all 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 if machine timer interrupts are not tested. |
n/a |
RVMODEL_MTIMECMP_ADDRESS |
The address of the memory-mapped |
Omit if machine timer interrupts are not tested. |
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_MAX_CYCLES_PER_TIMER_TICK |
The highest possible ratio of the clock frequency to the timer frequency in any mode of operation. Defaults to 1 if not defined |
If Machine 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 |
The RVMODEL_MTIME_ADDRESS, RVMODEL_MTIMECMP_ADDRESS and RVMODEL_TIMER_INT_SOON_DELAY macros are required in order to test timer interrupts. Similarly, the DUT (or its testbench) must implement the memory-mapped MTIME and MTIMECMP registers. The RVMODEL_SET_*INT and RVMODEL_CLR*_INT macros are only required for interrupts controlled in a platform-specific fashion.
|
| 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, ExceptionsSm, PMPZca, 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.
The virtual memory tests rely on an identity mapping between physical and virtual addresses in the code and data. Therefore, the starting address in the linker file should be a valid physical and virtual address. For systems supporting Sv39, this means that the starting address should be below 2^38 (typically a maximum of 0x20_0000_0000). 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(): returns xEPC in
a0 -
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 ExceptionsSm. 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.6. 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 |
ExceptionsSm_cg/cp_ecall_m |
|
ebreak_enc |
ExceptionsSm_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.6, I_sraiw_cg/cp_uimm_5, See also Ssstrict in Section B.6, I_srliw_cg/cp_uimm_5, See also Ssstrict in Section B.6 |
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 ExceptionsZc (Table 185) and SsstrictS (Table 231) test plans. Table 186 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 ExceptionsZaamo.
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 ExceptionsZaamo |
|
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 ExceptionsZaamo/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 followed by sc. The lr and both sc are retried, up to 100 attempts, until the first sc succeeds; the second sc must fail. This is not a constrained LR/SC loop, because the second sc follows the LR/SC sequence. |
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*2 |
lr followed by sc at address of 8, …, 248 offset from lr address. For RV64, exercise both lr.d and lr.w. 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} |
|
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 |
|
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 |
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_sc_pass_fail |
|
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, 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, 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 Za1284s, 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.
TODO: On implementations that support the C extension, compressed forms of the I instructions permitted inside constrained LR/SC sequences, as described in the ISA manual, are also permitted.
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
Not tested yet.
| 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
ExceptionsSm, ExceptionsS, and ExceptionsU, 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 |
ExceptionsSm_cg/{cp_instr_adr_misaligned_zibi_branch, cp_instr_adr_misaligned_zibi_branch_nottaken}, ExceptionsS_cg/{cp_instr_adr_misaligned_zibi_branch, cp_instr_adr_misaligned_zibi_branch_nottaken}, ExceptionsU_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. |
SsstrictSm_mcsr_cg/{cp_csrr, cp_csrw_edges, cp_csrcs}, SsstrictU_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 |
SsstrictSm_mcsr_cg/{cp_csrr, cp_csrw_edges, cp_csrcs} |
UDB Parameters: None.
| === TRAP_ON_UNIMPLEMENTED_CSR affects the results of Ssstrict/cp_csrr (Table 231). 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. Misalign: Misaligned Loads/Stores
Misaligned loads/stores to main memory optionally can be handled in hardware. When the UDB MISALIGNED_LDST parameter is true, misaligned scalar loads and stores to main memory do not throw an exception. This parameter is a simplification of the "Access Type PMAs" which could define misaligned behavior on each memory region.
The misaligned family of tests exercises integer, compressed, and single/double-precision floating-point loads/stores. It uses the new cp_misalign and cp_misalign_cross64_{hword/word/double} coverpoints defined in Table 92. 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.10.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 |
|---|---|---|
lh_op |
LH loads a 16-bit value from memory, then sign-extends to 32-bits before storing in rd. |
Misalign_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. |
Misalign_lhu_cg/{cp_misalign} |
lw_op |
The LW instruction loads a 32-bit value from memory into rd. |
Misalign_lw_cg/{cp_misalign} |
sw_sh_sb_op |
Misalign_sh_cg/{cp_misalign}, Misalign_sw_cg/{cp_misalign} |
|
lwu_op |
The LWU instruction, on the other hand, zero-extends the 32-bit value from memory for RV64I. |
Misalign_lwu_cg/{cp_misalign} |
ld_op_rv64i |
The LD instruction loads a 64-bit value from memory into register rd for RV64I. |
Misalign_ld_cg/{cp_misalign} |
sd_sw_sh_sb_op_rv64i |
Misalign_sd_cg/{cp_misalign} |
|
misaligned_ldst_eei_dependent_behavior |
{Misalign_lw_cg,Misalign_sw_cg}/{cp_misalign} |
|
misaligned_ldst_hw_support |
{Misalign_lw_cg,Misalign_sw_cg,Misalign_ld_cg,Misalign_sd_cg}/{cp_misalign} |
|
misaligned_ldst_exc_type |
{Misalign_lw_cg,Misalign_sw_cg}/{cp_misalign} |
|
c-lw_op |
MisalignZca_c_lw_cg/{cp_misalign} |
|
c-lwsp_op |
MisalignZca_c_lwsp_cg/{cp_misalign} |
|
c-ld_op |
MisalignZca_c_ld_cg/{cp_misalign} |
|
c-ldsp_op |
MisalignZca_c_ldsp_cg/{cp_misalign} |
|
c-sw_op |
MisalignZca_c_sw_cg/{cp_misalign} |
|
c-swsp_op |
MisalignZca_c_swsp_cg/{cp_misalign} |
|
c-sd_op |
MisalignZca_c_sd_cg/{cp_misalign} |
|
c-sdsp_op |
MisalignZca_c_sdsp_cg/{cp_misalign} |
|
fsw_flw_op |
MisalignF_flw_cg/{cp_misalign}, MisalignF_fsw_cg/{cp_misalign} |
|
fp_misaligned |
{MisalignF_flw_cg,MisalignF_fsw_cg,MisalignD_fld_cg,MisalignD_fsd_cg}/{cp_misalign} |
|
fld_op |
MisalignD_fld_cg/{cp_misalign} |
|
fsd_op |
FSD stores a double-precision value from the floating-point registers to memory |
MisalignD_fsd_cg/{cp_misalign} |
| Parameter | Description | Coverpoint | Effect |
|---|---|---|---|
MISALIGNED_LDST |
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. |
cp_misalign, cp_misalign_cross64_hword, cp_misalign_cross64_word, cp_misalign_cross64_double |
Coverpoints only run if True, and should not throw exceptions |
| 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. Zicclsm Misaligned Loads/Stores
The Zicclsm extension requires that the UDB MISALIGNED_LDST parameter be true. It is tested with the misaligned scalar load/store tests above and with misaligned vector load/store tests (see Section B.10.1). It does not apply to Za* atomic extensions.
| Normative Rule | Rule Text | Coverpoints |
|---|---|---|
Zicclsm_misaligned_support |
{Misalign_lw_cg, Misalign_sw_cg}/cp_misalign, MisalignZca_c_lw_cg/cp_misalign, MisalignV_vle32_v_cg/cp_misalignv_ls_element_misaligned |
|
Ziccif_if_atomicity |
Instruction fetch from main memory is exercised by every test; fetch atomicity is OUT-OF-SCOPE for single hart |
|
Ziccif_fetch_mechanism |
OUT-OF-SCOPE for single hart |
|
Ziccif_pma_application |
||
Ziccrse_rsrv_eventual |
{Zalrsc_sc_w_cg, Zalrsc_sc_d_cg}/cp_sc_pass_fail |
|
Ziccrse_pma_rsrv_req |
{Zalrsc_sc_w_cg, Zalrsc_sc_d_cg}/cp_sc_pass_fail |
|
Ziccamoa_amo_pma |
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 |
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 |
|
Ziccamoc_casq_pma |
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 |
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.6. 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.7. 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 ZicntrS and ZicntrU 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}, ZicntrU_cg/cp_mcounteren_access_u, ZicntrSm_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}, ZicntrU_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 |
Skip |
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.8. 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 |
| 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.9. 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.10. Zihintntl Non-temporal Locality Hint
These instructions are hints that behave as nops. They are simply executed once.
The rows of Table 106 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.11. 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, Zic64bZicboz_cg/cp_zic64b |
cbo-zero_specified_block |
Zicboz_cbo_zero_cg/cp_custom_cbo |
UDB Parameters: None.
A.10.12. 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.13. 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 |
PMPZicbo_cg/{cp_prefetch_i, cp_prefetch_r, cp_prefetch_w} |
UDB Parameters: None.
A.10.14. 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.15. Zic64bZicboz 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 |
Zic64bZicboz_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.10.
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
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)
UV_coverage.svh
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
...
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
Vf16
Vf32
Vf64
priv
ExceptionsVx
ExceptionsVls
ExceptionsVf16
ExceptionsVf32
MisalignV
SsstrictV
Sm (Sm_V_*.S, Sm_VF-*.S)
UV
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 119 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 |
|
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 |
x |
x |
||||||
cr_vs2_vs1_edges |
x |
x |
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 |
x |
nomask |
nomask |
nomask |
nomask |
nomask |
cr_vtype_agnostic |
x |
x |
x |
x |
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 |
||||||
cp_custom_vindexCorners |
x |
x |
| 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 |
|
mstatus_vs_sstatus_vs_op |
Sm_V_cg/{cp_mstatus_vs_set_dirty_arithmetic, cp_mstatus_vs_off_arithmetic} |
|
mstatus_vs_op_initial_clean |
Sm_V_cg/cp_mstatus_vs_set_dirty_arithmetic, Sm_V_cg/cp_mstatus_vs_set_dirty_csr |
|
vsstatus_vs_mstatus_vs_op_off |
ExceptionsHV_cg/cp_mstatus_vs_off, ExceptionsHV_cg/cp_vsstatus_vs_off |
|
vsstatus_vs_sz_acc |
ExceptionsHV_cg/cp_vsstatus_vs_off |
|
mstatus_vs_op_off |
Sm_V_cg/cp_mstatus_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, Sm_V_cg/cp_sew_lmul_vsetvl |
|
vtype_fields_sz |
Sm_V_cg/cp_sew_lmul_vsetvl |
|
vtype_vsew_op |
Sm_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 |
vtype_lmul_fval |
Vf16_vfadd_vf_cg/cr_vl_lmul_sew16, Sm_V_cg/cp_sew_lmul_vset_i_vli |
|
vtype_sew_val |
Sm_V_cg/cp_sew_lmul_vset_i_vli |
|
vtype_lmul_fval_rsv |
Sm_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, 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 |
|
vstart_acc_sz |
Sm_V_cg/cp_vcsrs_walking1s, Sm_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 |
|
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, 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 |
|
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, Vx16_vsaddu_vv_cg/cp_csr_vxsat |
|
vcsr_vxsat_op |
Sm_V_cg/cp_vcsrrswc |
|
vcsr_vxrm_vxsat_acc |
Sm_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, Sm_V_cg/cp_sew_lmul_vset_i_vli, Sm_V_cg/cp_vsetvl_i_avl_eq_vlmax, Sm_V_cg/cp_vsetivli_avl_edges |
|
vtype_vstart_op |
Sm_V_cg/cp_sew_lmul_vset_i_vli, Sm_V_cg/cp_sew_lmul_vsetvl, Sm_V_cg/cp_vtype_vill_set_vl_0 |
|
vtype_acc |
Sm_V_cg/cp_sew_lmul_vset_i_vli, Sm_V_cg/cp_sew_lmul_vsetvl |
|
vtype_vill_val |
Vls16_vl1re16_v_cg/cp_custom_vwholeRegLS_vill, Sm_V_cg/cp_vill_vsetvl |
|
vtype_vill_val_vill |
A |
Vls16_vl1re16_v_cg/cp_custom_vwholeRegLS_vill, Sm_V_cg/cp_vill_vsetvl |
vtype_vill_all_bits |
Vls16_vl1re16_v_cg/cp_custom_vwholeRegLS_vill, Sm_V_cg/cp_vill_vsetvl |
|
vsetvl_op |
Sm_V_cg/cp_vsetvl_i_rd_x0_rs1_x0, Sm_V_cg/cp_vsetvl_i_rd_nx0_rs1_x0, Sm_V_cg/cp_vsetvl_i_avl_eq_zero, Sm_V_cg/cp_vsetvl_i_avl_eq_vlmax, Sm_V_cg/cp_vsetvl_i_avl_lt_2x_vlmax, Sm_V_cg/cp_vsetvl_i_avl_eq_2x_vlmax, Sm_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 |
|
vsetvl_op_rs1_x0_rd_x0 |
Sm_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 |
|
vl_val_lead_in |
Sm_V_cg/cp_vsetvl_i_avl_eq_vlmax, Sm_V_cg/cp_vsetvl_i_avl_lt_2x_vlmax, Sm_V_cg/cp_vsetvl_i_avl_gt_2x_vlmax, Sm_V_cg/cp_vsetvl_i_avl_eq_zero |
|
vl_val_list |
Sm_V_cg/cp_vsetvl_i_avl_eq_vlmax, Sm_V_cg/cp_vsetvl_i_avl_lt_2x_vlmax, Sm_V_cg/cp_vsetvl_i_avl_gt_2x_vlmax, Sm_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 |
|
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 |
|
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 |
|||
EFFEW16 |
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 |
||||||||
EFFEW16 |
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 |
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 |
||||||
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 |
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 |
|||||
EFFEW16 |
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 |
|||||||||
EFFEW16 |
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 |
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 |
||||
EFFEW16 |
x |
x |
x |
x |
x |
x |
x |
x |
x |
x |
||
EFFEW32 |
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 |
|||||||
EFFEW16 |
x |
x |
x |
x |
x |
x |
x |
x |
||||
EFFEW32 |
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 |
|||||||||
EFFEW16 |
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 |
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 |
|
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 |
|||||||
EFFEW16 |
x |
x |
x |
x |
x |
x |
x |
x |
||||
EFFEW32 |
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 |
|||||||||
EFFEW16 |
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 |
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 |
|||
EFFEW16 |
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 |
||||||||
EFFEW16 |
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_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 |
||||||
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_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 |
x |
x |
| 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 |
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 |
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 |
f |
f |
f_emul2 |
f |
f |
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 |
x |
x |
w |
x |
x |
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 |
|
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 |
f_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 |
w |
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 124 to exercise all floating-point instructions with SEW=16.
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 148 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 |
ExceptionsZaamo_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, ExceptionsZaamo_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 159. 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}, SsstrictSm_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.8.
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.6 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.
| Coverpoint | Goal | Feature Description | Expectation | Bins | Normative Rule | 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_csrr_insufficient_priv |
Debug registers should be inaccessible from M-mode |
Read Debug CSRS 7B0-7BF |
Illegal Instruction |
16 |
||
cp_csrw_readonly |
Read-only registers should trap when written |
Write read-only CSRs (C00-FFF) |
Illegal Instruction |
1024 CSRs |
||
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, scause, sie, stvec, scounteren, senvcfg, sscratch, sip. sepc and stval are not tested because it is hard to express what values are legal. |
Zicsr_higher_priv |
||||
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): 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_rd_nx0_rs1_x0 |
Confirm that when running a vsetvl instruction with rd != x0 and rs1 = x0 that vl is set to vlmax |
with vl != vlmax, conduct vsetvl 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 |
4 sew bins * 7 lmul bins |
test written: yes |
|
cp_vsetvli_rd_nx0_rs1_x0 |
Confirm that when running a vsetvli instruction with rd != x0 and rs1 = x0 that vl is set to vlmax |
with vl != vlmax, conduct 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 |
4 sew bins * 7 lmul bins |
test written: yes |
|
cp_vsetvl_rd_x0_rs1_x0 |
Confirm that when running a vsetvl instruction with rd = x0 and rs1 = x0 that vl is unchanged |
with vl != 0, conduct vsetvl with rd = x0 and rs1 = x0. sew and lmul must be such that vlmax does not change |
vl is unchanged |
1 |
test written: yes |
|
cp_vsetvli_rd_x0_rs1_x0 |
Confirm that when running a vsetvli instruction with rd = x0 and rs1 = x0 that vl is unchanged |
with vl != 0, conduct vsetvli with rd = x0 and rs1 = x0. sew and lmul must be such that vlmax does not change |
vl is unchanged |
1 |
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_corners |
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 |
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. |
|
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, 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 |
SvSm_mstatus_mprv_cg/{cp_mprv_load, cp_mprv_store}, PMPS_cg/cp_mprv_lw, PMPU_cg/cp_mprv_sw |
|
mstatus_mprv_inst_xlat_op |
Instruction address-translation and protection are unaffected by the setting of |
SvSm_mstatus_mprv_cg/{cp_mprv_ins, cp_mprv_upage_smode_sumset_exec}, PMPS_cg/cp_mprv_jalr, PMPU_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 |
SvSm_mstatus_mprv_cg/{cp_mprv_upage_smode_sumunset_noread, cp_mprv_upage_smode_sumunset_nowrite}, SvSm_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 |
SvSm_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 |
|
mstatus_vs_op |
Sm_V_cg/{cp_mstatus_vs_set_dirty_vcsr, cp_mstatus_vs_set_dirty_csr} |
|
mstatus_vs_sstatus_vs_op |
Sm_V_cg/{cp_mstatus_vs_set_dirty_arithmetic, cp_mstatus_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 |
|
mstatus_fs_acc1 |
If the |
Sm_F_cg/cp_mstatus_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 |
|
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 |
|
mstatus_fs_vs_xs_off_op |
Sm_F_cg/{cp_fcsr_access, cp_mstatus_FS_transition}, Sm_V_cg/{cp_mstatus_vs_off_arithmetic, cp_mstatus_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} |
|
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, 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 |
|
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 |
SsstrictSm_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 |
SsstrictSm_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, ExceptionsZicboS_cg/cp_cbze, ExceptionsZicboU_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, ExceptionsZicboS_cg/cp_cbcfe, ExceptionsZicboU_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, ExceptionsZicboS_cg/cp_cbie, ExceptionsZicboU_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 |
ExceptionsZicboS_cg/cp_cbie, ExceptionsZicboU_cg/cp_cbie |
|
menvcfg_cbie_cbo-inval_op_list |
ExceptionsZicboS_cg/cp_cbie, ExceptionsZicboU_cg/cp_cbie |
|
menvcfg_pmm_op |
SmnpmS_cg/cp_pmlen_masking, SmnpmU_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 |
SmnpmS_cg/cp_pmlen_masking, SmnpmU_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}, SscofpmfSm_cg/cp_sscofpmf_access |
|
minstret_op |
The |
Sm_mcsr_cg/cp_cntr_access/minstret, Sm_mcsr_cg/cp_minstret_wraparound, ZicntrSm_cg/cp_instret_add, ZicntrSm_cg/cp_instret_mret, ZicntrSm_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 |
SsstrictSm_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 |
Out of scope. |
|
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 |
ExceptionsSm_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, ZawrsSm_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, ExceptionsSm_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 |
| 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.
| Coverpoint | Goal | Feature Description | Expectation | Bins | Normative Rule |
|---|---|---|---|---|---|
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_csrr_insufficient_priv |
Read Machine CSRS 300-3FF, 700-7FF, B00-BFF, F000-FFF, excluding 7AA (mscontext) |
||||
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. |
|||||
| 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, ExceptionsSm_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}, ExceptionsS_cg/cp_stvec |
|
stvec_mode_enc |
ExceptionsS_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 |
Not tested: ACT does not switch IALIGN by writing misa |
|
sepc_acc_invalid_addr |
S_scsr_cg/cp_sepc_vaddr_walk1, S_scsr_cg/cp_sepc_vaddr_walk0 |
|
sepc_op_trap_write |
ExceptionsS_cg/cp_illegal_instruction, InterruptsS_cg/cp_trigger |
|
scause |
S_scause_cg/{cp_scause_write_exception, cp_scause_write_interrupt}, ExceptionsS_cg/cp_illegal_instruction, InterruptsS_cg/cp_trigger |
|
scause_interrupt |
S_scause_cg/cp_scause_write_{interrupt, exception}, ExceptionsS_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} |
|
scause_exccode_enc_tbl |
S_scause_cg/{cp_scause_write_exception, cp_scause_write_interrupt}, ExceptionsS_cg/{cp_illegal_instruction, cp_breakpoint} |
|
stval |
S_scsr_cg/cp_scsr_access/stval, ExceptionsS_cg/cp_illegal_instruction |
|
stval_op_faulting_addr |
ExceptionsS_cg/{cp_breakpoint, cp_load_address_misaligned, cp_instr_access_fault, cp_store_access_fault} |
|
stval_op_breakpoint |
ExceptionsS_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 |
ExceptionsS_cg/cp_illegal_instruction |
|
stval_op_illegal_instr_format |
On an illegal-instruction exception, the instruction bits are zero-extended and loaded into |
ExceptionsZc_cg/cp_illegal_instruction, SsstrictS_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, Sm_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 |
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.
| Coverpoint | Feature Description | Normative Rule |
|---|---|---|
cp_uprivinst |
Execute ecall and ebreak, mret, uret in user mode |
non_priv_exc |
cp_csrr_insufficient_priv |
Read Machine, Hypervisor, Supervisor CSRS100-3FF, 500-7FF, 900-BFF, D000-FFF |
|
cp_csr_ro |
Write User read-only CSRs C00-CFF |
Zicsr_rw |
Accessing user-mode CSRs such as F, V, Zicntr, Zihpm from machine mode are tested in Sm_F, Sm_V, Zicntr, Zihpm and are not tested again here. |
||
| 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 |
UDB Parameters: None.
B.1.4. UF User-Mode Floating-Point CSRs
These test additional CSR scenarios that exist when floating-point and user mode are supported.
| Coverpoint | Goal | Feature Description | Normative Rule |
|---|---|---|---|
cp_ufcsr_access |
CSR access |
csr read, write all 1s, write all 0s, set all 1s, clear all 1s, write back initial value of each register below |
fcsr_op_sz_acc |
cp_ufcsrwalk |
CSR access |
Set and clear each bit of each writable CSR to exercise bitfields: fcsr, frm, fflags |
fflags_op_sz_acc |
Attempt these tests in user mode unless otherwise specified |
|||
| Normative Rule | Rule Text | Coverpoints |
|---|---|---|
fcsr_op_sz_acc |
UF_ufcsr_cg/cp_ufcsr_access |
|
fflags_op_sz_acc, frm_op_sz_acc |
fflags_op_sz_acc: The |
UF_ufcsr_cg/cp_ufcsrwalk |
fcsr_rsv |
UF_ufcsr_cg/cp_ufcsrwalk |
|
mstatus_fs_vs_xs_update_indep_priv |
The status fields are also updated during execution of instructions, regardless of privilege mode. |
UDB Parameters: None.
B.1.5. Zkr Entropy CSR
These test CSRs when the Zkr entropy extension is supported. The seed CSR tests run once per privilege mode: ZkrSm in M-mode, ZkrS in S-mode, and ZkrU in U-mode.
| Coverpoint | Goal | Feature Description | Expectation | Bins |
|---|---|---|---|---|
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 |
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 |
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 |
| Normative Rule | Rule Text | Coverpoints |
|---|---|---|
Zkr_seed_addr |
{ZkrSm_cg,ZkrS_cg,ZkrU_cg}/{cp_zkr_seed_csrrw} |
|
seed_ro_illegal |
{ZkrSm_cg,ZkrS_cg,ZkrU_cg}/{cp_zkr_seed_illegal_csr_op} |
|
seed_write_ignore |
The write value (in rs1 or uimm) must be ignored by implementations. |
{ZkrSm_cg,ZkrS_cg,ZkrU_cg}/{cp_zkr_seed_csrrw} |
seed_csr_unpriv |
ZkrU_cg/cp_zkr_seed_csrrw |
|
seed_exec_mode_control |
{ZkrSm_cg,ZkrS_cg,ZkrU_cg}/{cp_zkr_seed_csrrw} |
|
seed_entropy_unique |
Not tested: randomness quality is not observable in an architectural signature test |
|
seed_entropy_zero_non_es16 |
{ZkrSm_cg,ZkrS_cg,ZkrU_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 |
ZkrU_cg/{cp_zkr_seed_csrrw, cp_zkr_seed_illegal_csr_op} |
|
mseccfg_sseed_sorhs_mode_op |
ZkrS_cg/{cp_zkr_seed_csrrw, cp_zkr_seed_illegal_csr_op} |
|
mseccfg_sseed_vsorvu_mode_op |
TODO: seed access from VS-mode and VU-mode |
|
mseccfg_sseed_useed_op_tbl |
{ZkrSm_cg,ZkrS_cg,ZkrU_cg}/{cp_zkr_seed_csrrw, cp_zkr_seed_illegal_csr_op}, TODO: the VS and VU rows need the H extension |
UDB Parameters: None.
B.2. Exceptions
Exception tests are organized according to the privilege mode or extension supported. For example, a configuration with Machine, Supervisor, User, and Floating-Point supported should run ExceptionsSm, ExceptionsS, ExceptionsU, and ExceptionsF. Note that vector exceptions are in Section B.10.
B.2.1. ExceptionsSm 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 |
mepc_op |
cp_illegal_instruction |
Illegal Instruction |
Executing instruction 0x00000000 and 0xFFFFFFFF throws an illegal instruction exception. |
Illegal Instruction Exception |
2 instr |
mepc_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 |
mepc_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 |
mcause_exccode_ld_ldrsv |
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_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_order |
cp_misaligned_priority_store |
Priority of exceptions |
Attempt sb, sh, sw (sd) from 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_order |
cp_misaligned_priority_fetch |
Priority of exceptions |
Attempt fetch from memory location causing access fault and misaligned}. Also exercised in PMP, VM. |
Highest priority exception should be taken. |
* |
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 |
medeleg_enc_img |
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 |
|||||
| Normative Rule | Rule Text | Coverpoints |
|---|---|---|
taken_cti_misaligned_exc |
ExceptionsSm_cg/{cp_instr_adr_misaligned_branch, cp_instr_adr_misaligned_jal, cp_instr_adr_misaligned_jalr} |
|
mepc_op |
ExceptionsSm_cg/{cp_instr_access_fault, cp_illegal_instruction, cp_breakpoint, cp_ecall_m} |
|
mcause_op |
ExceptionsSm_cg/{cp_instr_access_fault, cp_illegal_instruction, cp_breakpoint, cp_load_access_fault} |
|
mcause_exccode_op |
The Exception Code field contains a code identifying the last exception or interrupt. |
ExceptionsSm_cg/{cp_instr_access_fault, cp_illegal_instruction, cp_breakpoint, cp_load_access_fault} |
mcause_exccode_enc_img |
ExceptionsSm_cg/{cp_instr_access_fault, cp_illegal_instruction, cp_breakpoint, cp_load_access_fault} |
|
mtvec_mode_enc |
ExceptionsSm_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 |
ExceptionsSm_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 |
ExceptionsSm_cg/{cp_load_address_misaligned, cp_load_access_fault}, ExceptionsZalrsc_cg/{cp_load_address_misaligned, cp_load_access_fault} |
cond_br_no_ia_misaligned_exc_not_taken |
No instruction-address-misaligned exception is generated for a conditional branch that is not taken. |
ExceptionsSm_cg/cp_instr_adr_misaligned_branch_nottaken |
ia_fault_exc_on_target |
ExceptionsSm_cg/cp_instr_access_fault, ExceptionsSv_cg/cp_instr_page_fault_s |
|
branch_misaligned_taken_exception |
ExceptionsSm_cg/cp_instr_adr_misaligned_branch |
|
branch_misaligned_untaken_exception |
ExceptionsSm_cg/cp_instr_adr_misaligned_branch_nottaken |
|
jump_misaligned_exception |
ExceptionsSm_cg/{cp_instr_adr_misaligned_jal, cp_instr_adr_misaligned_jalr} |
|
ldst_no_exc_aligned |
ExceptionsSm_cg/{cp_load_address_misaligned, cp_store_address_misaligned} |
|
load_exc_x0 |
TODO: currently have no cp in ExceptionsSm that tests for load with rd = x0 |
|
misaligned_ldst_eei_dependent_behavior |
ExceptionsSm_cg/{cp_load_address_misaligned, cp_store_address_misaligned} |
|
misaligned_ldst_hw_support |
ExceptionsSm_cg/{cp_load_address_misaligned, cp_store_address_misaligned} |
|
misaligned_ldst_exc_type |
ExceptionsSm_cg/{cp_load_address_misaligned, cp_store_address_misaligned} |
|
misaligned_ldst_contained_or_fatal_trap |
ExceptionsSm_cg/{cp_load_address_misaligned, cp_store_address_misaligned} |
|
ldst_atomicity_for_aligned |
naturally aligned loads and stores are guaranteed to execute atomically |
ExceptionsSm_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. |
ExceptionsSm_cg/cp_ecall_m |
ecall_priv_mode_op |
ExceptionsSm_cg/cp_ecall_m |
|
ebreak_debug_env_op |
The EBREAK instruction is used to return control to a debugging environment. |
ExceptionsSm_cg/cp_breakpoint |
ebreak_debugger_transfer_op |
ExceptionsSm_cg/cp_breakpoint |
|
mcause_exccode_priority_order |
ExceptionsSm_cg/{cp_misaligned_priority_load, cp_misaligned_priority_store} |
|
exc_priority |
ExceptionsSm_cg/{cp_misaligned_priority_load, cp_misaligned_priority_store, cp_misaligned_priority_fetch} |
|
medeleg_enc_img |
ExceptionsSm_cg/{cp_medeleg_msu_illegalinstruction, cp_medeleg_msu_ecall, cp_medeleg_msu_ebreak, cp_medeleg_msu_loadaccessfault} |
|
medeleg_enc_txt |
ExceptionsSm_cg/{cp_medeleg_msu_illegalinstruction, cp_medeleg_msu_ecall, cp_medeleg_msu_ebreak, cp_medeleg_msu_loadaccessfault} |
|
trap_del_s_mode_op |
ExceptionsSm_cg/{cp_medeleg_msu_illegalinstruction, cp_medeleg_msu_ebreak, cp_medeleg_msu_loadaccessfault} |
|
trap_never_trans_lower |
ExceptionsSm_cg/{cp_medeleg_msu_illegalinstruction, cp_medeleg_msu_ecall, cp_medeleg_msu_ebreak, cp_medeleg_msu_loadaccessfault} |
|
trap_horiz |
ExceptionsSm_cg/{cp_medeleg_msu_illegalinstruction, cp_medeleg_msu_ecall, cp_medeleg_msu_ebreak, cp_medeleg_msu_loadaccessfault} |
|
mstatus_xpie_xie_xpp_trap_op |
ExceptionsSm_cg/{cp_medeleg_msu_illegalinstruction, cp_medeleg_msu_ebreak, cp_medeleg_msu_loadaccessfault} |
|
sstatus_spp |
ExceptionsSm_cg/{cp_medeleg_msu_illegalinstruction, cp_medeleg_msu_ebreak, cp_medeleg_msu_loadaccessfault} |
|
pma_indep_exec_context |
ExceptionsSm_cg/{cp_medeleg_msu_instraccessfault, cp_medeleg_msu_loadaccessfault, cp_medeleg_msu_storeaccessfault} |
|
pma_precise_recom |
ExceptionsSm_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 |
ExceptionsSm_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 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 |
ExceptionsSm_cg/{cp_load_address_misaligned, cp_store_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 |
|
mcause_exccode_priority_misaligned |
ExceptionsSm_cg/{cp_misaligned_priority_load, cp_misaligned_priority_store}, ExceptionsSvSm_cg/cp_misaligned_priority_m |
|
mtval_op |
ExceptionsSm_cg/{cp_illegal_instruction, cp_breakpoint, cp_load_address_misaligned, cp_store_address_misaligned} |
|
mtval_ebreak_op |
ExceptionsSm_cg/{cp_breakpoint, cp_ebreak_straddle64}, ExceptionsZc_cg/cp_breakpoint |
|
mtval_instr_bits_lead_in |
ExceptionsSm_cg/cp_illegal_instruction |
|
mtval_instr_bits_list |
ExceptionsSm_cg/cp_illegal_instruction, ExceptionsZc_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 |
ExceptionsSm_cg/cp_illegal_instruction, ExceptionsZc_cg/cp_illegal_instruction |
| Parameter | Description | Coverpoint | Effect |
|---|---|---|---|
MISALIGNED_LDST |
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. |
cp_{load_address_misaligned, store_address_misaligned, cp_misaligned_priority_load, cp_misaligned_priority_store} |
When true, misaligned loads and stores do not cause exceptions |
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_misaligned_priority_load, cp_misaligned_priority_store |
When true, misaligned loads and stores do not cause exceptions |
MTVAL_WIDTH |
The number of implemented bits in the Must be greater than or equal to max( |
TODO |
|
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_ILLEGAL_WRITE_BEHAVIOR |
Options: retain::
When either custom::
When either Other values may be added over time once other common behaviors are identified. |
all exception coverpoints |
If |
REPORT_ENCODING_IN_MTVAL_ON_ILLEGAL_INSTRUCTION |
Options: * true: |
cp_illegal_instruction |
Affects value written to |
REPORT_VA_IN_MTVAL_ON_BREAKPOINT |
Options: * true: Regardless, |
cp_breakpoint |
Affects value written to |
REPORT_VA_IN_MTVAL_ON_INSTRUCTION_ACCESS_FAULT |
Options: * true: |
cp_instr_access_fault |
Affects value written to |
REPORT_VA_IN_MTVAL_ON_INSTRUCTION_MISALIGNED |
Options: * true: |
cp_instr_adr_misaligned_branch, cp_instr_misaligned_jal, cp_instr_misaligned_jalr |
Affects value written to |
REPORT_VA_IN_MTVAL_ON_LOAD_ACCESS_FAULT |
Options: * true: |
cp_load_access_fault |
Affects value written to |
REPORT_VA_IN_MTVAL_ON_LOAD_MISALIGNED |
Options: * true: |
cp_load_address_misaligned |
Affects value written to |
REPORT_VA_IN_MTVAL_ON_STORE_AMO_ACCESS_FAULT |
Options: * true: |
cp_store_access_fault |
Affects value written to |
REPORT_VA_IN_MTVAL_ON_STORE_AMO_MISALIGNED |
Options: * true: |
cp_store_address_misaligned |
Affects value written to |
TRAP_ON_EBREAK |
The spec states that implementations may handle EBREAKs transparently without raising a trap, in which case the EEI must provide a builtin. |
cp_breakpoint |
TODO |
TRAP_ON_ECALL_FROM_M |
The spec states that implementations may handle ECALLs transparently without raising a trap, in which case the EEI must provide a builtin. |
cp_ecall_m |
TODO |
B.2.2. ExceptionsS 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 |
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 ExceptionsSv |
||||||
Note: tests that differ from ExceptionsSm are cp_medeleg_mu and cp_stvec. Also, cp_misaligned_priority is not split here. |
||||||
| Normative Rule | Rule Text | Coverpoints |
|---|---|---|
taken_cti_misaligned_exc |
ExceptionsS_cg/cp_instr_adr_misaligned_{branch, jal, jalr} |
|
branch_misaligned_taken_exception |
ExceptionsS_cg/cp_instr_adr_misaligned_branch |
|
jump_misaligned_exception |
ExceptionsS_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. |
ExceptionsS_cg/cp_instr_adr_misaligned_branch_nottaken |
branch_misaligned_untaken_exception |
ExceptionsS_cg/cp_instr_adr_misaligned_branch_nottaken |
|
ia_fault_exc_on_target |
ExceptionsS_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. |
ExceptionsS_cg/cp_breakpoint |
ecall_ebreak_epc_value |
ExceptionsS_cg/{cp_ecall_s, cp_breakpoint} |
|
ldst_no_exc_aligned |
ExceptionsS_cg/cp_{load, store}_address_misaligned |
|
mcause_exccode_ld_ldrsv |
Note that load and load-reserved instructions generate load exceptions |
ExceptionsS_cg/cp_load_access_fault |
mcause_exccode_st_sc_amo |
store, store-conditional, and AMO instructions generate store/AMO exceptions. |
ExceptionsS_cg/cp_store_access_fault |
mcause_exccode_priority_misaligned |
ExceptionsS_cg/cp_misaligned_priority |
|
trap_del_s_mode_op |
ExceptionsS_cg/{cp_breakpoint, cp_load_access_fault, cp_store_access_fault} |
|
sstatus_spp |
ExceptionsS_cg/{cp_illegal_instruction, cp_breakpoint} |
|
mstatus_xpie_xie_xpp_trap_op |
ExceptionsS_cg/{cp_illegal_instruction, cp_breakpoint} |
UDB Parameters: None.
B.2.3. ExceptionsU 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 |
mstatus_xpie_xie_xpp_trap_op |
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 |
mstatus_xpie_xie_xpp_trap_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 |
trap_del_s_mode_op |
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 |
trap_del_s_mode_op |
cp_ecall_u |
ecall |
ecall from user mode |
throws ecall user exception (trap and mcause) |
1 |
ecall_priv_mode_op |
cp_misaligned_priority |
Priority of exceptions |
Attempt lw and sw and fetch from memory location causing access fault and misaligned |
priority may vary. |
3 ops |
mcause_exccode_priority_order |
cp_mstatus_ie |
Interrupt Enables |
ecall to machine cross mie = {0/1} |
mpie gets xie, mie gets 0 |
2 mie |
| Normative Rule | Rule Text | Coverpoints |
|---|---|---|
mstatus_xpie_xie_xpp_trap_op |
ExceptionsU_cg/{cp_illegal_instruction, cp_breakpoint} |
|
sstatus_spp |
ExceptionsU_cg/{cp_illegal_instruction, cp_breakpoint} |
|
trap_del_s_mode_op |
ExceptionsU_cg/{cp_breakpoint, cp_load_access_fault, cp_store_access_fault} |
|
ecall_priv_mode_op |
ExceptionsU_cg/cp_ecall_u |
|
ecall_ebreak_epc_value |
ExceptionsU_cg/{cp_ecall_u, cp_breakpoint} |
|
taken_cti_misaligned_exc |
ExceptionsU_cg/cp_instr_adr_misaligned_{branch, jal, jalr} |
|
branch_misaligned_taken_exception |
ExceptionsU_cg/cp_instr_adr_misaligned_branch |
|
jump_misaligned_exception |
ExceptionsU_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. |
ExceptionsU_cg/cp_instr_adr_misaligned_branch_nottaken |
branch_misaligned_untaken_exception |
ExceptionsU_cg/cp_instr_adr_misaligned_branch_nottaken |
|
ia_fault_exc_on_target |
ExceptionsU_cg/cp_instr_access_fault |
|
ebreak_debug_env_op |
The EBREAK instruction is used to return control to a debugging environment. |
ExceptionsU_cg/cp_breakpoint |
ebreak_debugger_transfer_op |
ExceptionsU_cg/cp_breakpoint |
|
ldst_no_exc_aligned |
ExceptionsU_cg/cp_{load, store}_address_misaligned |
|
mcause_exccode_ld_ldrsv |
Note that load and load-reserved instructions generate load exceptions |
ExceptionsU_cg/cp_load_access_fault |
mcause_exccode_st_sc_amo |
store, store-conditional, and AMO instructions generate store/AMO exceptions. |
ExceptionsU_cg/cp_store_access_fault |
mcause_exccode_priority_order |
ExceptionsU_cg/cp_misaligned_priority_{load, store} |
|
mcause_exccode_priority_misaligned |
ExceptionsU_cg/cp_misaligned_priority_{load, store} |
UDB Parameters: None.
B.2.4. ExceptionsF 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 |
| Normative Rule | Rule Text | Coverpoints |
|---|---|---|
ldst_no_exc_aligned |
ExceptionsF_cg/cp_{load_address_misaligned, store_address_misaligned} |
|
misaligned_ldst_exc_type |
ExceptionsF_cg/cp_{load_address_misaligned, store_address_misaligned, load_access_fault, store_access_fault} |
|
mstatus_fs_vs_xs_off_op |
ExceptionsF_cg/{cp_mstatus_fs_illegal_instr, cp_mstatus_fs_csr_access} |
|
mstatus_fs_wr |
ExceptionsF_cg/cp_mstatus_fs_legal |
|
mcause_exccode_op |
The Exception Code field contains a code identifying the last exception or interrupt. |
ExceptionsF_cg/cp_{load_address_misaligned, store_address_misaligned, load_access_fault, store_access_fault} |
mcause_exccode_ld_ldrsv |
Note that load and load-reserved instructions generate load exceptions |
ExceptionsF_cg/cp_{load_address_misaligned, load_access_fault} |
UDB Parameters: None.
B.2.5. ExceptionsZalrsc 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 |
mcause_exccode_ld_ldrsv |
|
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 |
| Normative Rule | Rule Text | Coverpoints |
|---|---|---|
mcause_exccode_st_sc_amo |
store, store-conditional, and AMO instructions generate store/AMO exceptions. |
ExceptionsZalrsc_cg/{cp_store_access_fault, cp_store_address_misaligned_illegal_w} |
sc_retire_permission |
No SC.W instruction shall retire unless it passes memory permission checks, |
ExceptionsZalrsc_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. |
ExceptionsZalrsc_cg/cp_store_access_fault |
lr_sc_alignment |
ExceptionsZalrsc_cg/{cp_load_address_misaligned, cp_store_address_misaligned_illegal_w, cp_store_address_misaligned_illegal_d} |
|
ldst_no_exc_aligned |
ExceptionsZalrsc_cg/{cp_load_address_misaligned, cp_store_address_misaligned_legal_w} |
|
mcause_exccode_ld_ldrsv |
Note that load and load-reserved instructions generate load exceptions |
ExceptionsZalrsc_cg/{cp_load_address_misaligned, cp_load_access_fault} |
mcause_exccode_priority_misaligned |
ExceptionsZalrsc_cg/{cp_load_access_misaligned_priority, cp_store_access_misaligned_priority} |
| Parameter | Description | Coverpoint | Effect |
|---|---|---|---|
LRSC_MISALIGNED_BEHAVIOR |
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 |
cp_{load,store}_address_misaligned |
Misaligned LR/SC throws misaligned exception or access fault |
B.2.6. ExceptionsZaamo 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 |
UDB Parameters: None.
B.2.7. ExceptionsZc 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 |
| Normative Rule | Rule Text | Coverpoints |
|---|---|---|
Zca_no_misaligned |
ExceptionsSm_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. |
ExceptionsZc_cg/cp_illegal_instruction |
c-ebreak_op |
ExceptionsZc_cg/cp_breakpoint |
|
c-jalr_ebreak |
ExceptionsZc_cg/cp_breakpoint |
|
Zca_align16 |
ExceptionsSm_cg/cp_ebreak_straddle64 |
UDB Parameters: None.
B.2.8. ExceptionsZicboS 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 |
| Normative Rule | Rule Text | Coverpoints |
|---|---|---|
menvcfg_cbze_op |
ExceptionsZicboS_cg/cp_cbze |
|
menvcfg_cbcfe_op |
ExceptionsZicboS_cg/cp_cbcfe |
|
menvcfg_cbie_warl_op |
ExceptionsZicboS_cg/cp_cbie |
|
menvcfg_cbie_cbo-inval_op_lead_in |
ExceptionsZicboS_cg/cp_cbie |
|
menvcfg_cbie_cbo-inval_op_list |
ExceptionsZicboS_cg/cp_cbie |
|
senvcfg_cbcfe |
ExceptionsZicboS_cg/cp_cbcfe |
|
senvcfg_cbcfe_umode_op |
ExceptionsZicboS_cg/cp_cbcfe |
|
senvcfg_cbie |
ExceptionsZicboS_cg/cp_cbie |
|
senvcfg_cbie_umode_op |
ExceptionsZicboS_cg/cp_cbie |
|
cbo-inval_s_mode_enabled_op |
ExceptionsZicboS_cg/cp_cbie |
|
cbo-inval_s_mode_flush_enc |
ExceptionsZicboS_cg/cp_cbie |
|
cbo-inval_s_mode_inval_enc |
ExceptionsZicboS_cg/cp_cbie |
|
senvcfg_cbze |
The Zicboz extension adds the CBZE (Cache Block Zero instruction enable) field to senvcfg. |
ExceptionsZicboS_cg/cp_cbze |
senvcfg_cbze_op |
The CBZE field controls execution of the cache block zero instruction (CBO.ZERO) in U-mode. |
ExceptionsZicboS_cg/cp_cbze |
senvcfg_cbze_umode_op |
ExceptionsZicboS_cg/cp_cbze |
|
cbxe_unaffected |
||
cbo-inval |
ExceptionsZicboS_cg/cp_cbie |
|
cbo-clean_cbo-flush |
ExceptionsZicboS_cg/cp_cbcfe |
|
cbo-zero_basedon_xenvcfg_cbze |
ExceptionsZicboS_cg/cp_cbze |
|
fault_excep_csr |
ExceptionsZicboS_cg/cp_cbo_access_fault |
|
no_addr_misaligned_excep |
CMO instructions do not generate address-misaligned exceptions. |
ExceptionsZicboS_cg/cp_cbo_address_misaligned |
cbm_access |
Zicbom_cbo_clean_cg/cp_custom_cbo |
|
cbm_unperm_fault |
ExceptionsZicboS_cg/cp_cbo_access_fault |
|
cbz_access |
Zicboz_cbo_zero_cg/cp_custom_cbo |
|
cbz_unperm_fault |
ExceptionsZicboS_cg/cp_cbo_access_fault |
|
cbp_unperm_noexcep |
ExceptionsZicboS_cg/cp_cbo_access_fault |
|
cbo-zero_unaligned |
It is not required that rs1 is aligned to the size of a cache block. |
ExceptionsZicboS_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. |
ExceptionsZicboS_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. |
ExceptionsZicboS_cg/{cp_cbo_access_fault, cp_cbo_address_misaligned} |
UDB Parameters: None.
B.2.9. ExceptionsZicboU 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 |
| Normative Rule | Rule Text | Coverpoints |
|---|---|---|
menvcfg_cbze_op |
ExceptionsZicboU_cg/cp_cbze |
|
menvcfg_cbcfe_op |
ExceptionsZicboU_cg/cp_cbcfe |
|
menvcfg_cbie_warl_op |
ExceptionsZicboU_cg/cp_cbie |
|
menvcfg_cbie_cbo-inval_op_lead_in |
ExceptionsZicboU_cg/cp_cbie |
|
menvcfg_cbie_cbo-inval_op_list |
ExceptionsZicboU_cg/cp_cbie |
|
cbo-inval |
ExceptionsZicboU_cg/cp_cbie |
|
cbo-clean_cbo-flush |
ExceptionsZicboU_cg/cp_cbcfe |
|
cbo-zero_basedon_xenvcfg_cbze |
ExceptionsZicboU_cg/cp_cbze |
|
fault_excep_csr |
ExceptionsZicboU_cg/cp_cbo_access_fault |
|
no_addr_misaligned_excep |
CMO instructions do not generate address-misaligned exceptions. |
ExceptionsZicboU_cg/cp_cbo_address_misaligned |
cbm_access |
Zicbom_cbo_clean_cg/cp_custom_cbo |
|
cbm_unperm_fault |
ExceptionsZicboU_cg/cp_cbo_access_fault |
|
cbz_access |
Zicboz_cbo_zero_cg/cp_custom_cbo |
|
cbz_unperm_fault |
ExceptionsZicboU_cg/cp_cbo_access_fault |
|
cbp_unperm_noexcep |
ExceptionsZicboU_cg/cp_cbo_access_fault |
|
cbo-zero_unaligned |
It is not required that rs1 is aligned to the size of a cache block. |
ExceptionsZicboU_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. |
ExceptionsZicboU_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. |
ExceptionsZicboU_cg/{cp_cbo_access_fault, cp_cbo_address_misaligned} |
UDB Parameters: None.
B.2.10. ExceptionsZicboSm 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 |
| Normative Rule | Rule Text | Coverpoints |
|---|---|---|
menvcfg_cbze_op |
ExceptionsZicboSm_cg/cp_cbze |
|
menvcfg_cbcfe_op |
ExceptionsZicboSm_cg/cp_cbcfe |
|
menvcfg_cbie_warl_op |
ExceptionsZicboSm_cg/cp_cbie |
|
cbxe_unaffected |
||
fault_excep_csr |
ExceptionsZicboSm_cg/cp_cbo_access_fault |
|
no_addr_misaligned_excep |
CMO instructions do not generate address-misaligned exceptions. |
ExceptionsZicboSm_cg/cp_cbo_address_misaligned |
cbm_access |
Zicbom_cbo_clean_cg/cp_custom_cbo |
|
cbm_unperm_fault |
ExceptionsZicboSm_cg/cp_cbo_access_fault |
|
cbz_access |
Zicboz_cbo_zero_cg/cp_custom_cbo |
|
cbz_unperm_fault |
ExceptionsZicboSm_cg/cp_cbo_access_fault |
|
cbp_unperm_noexcep |
ExceptionsZicboSm_cg/cp_cbo_access_fault |
|
cbo-zero_unaligned |
It is not required that rs1 is aligned to the size of a cache block. |
ExceptionsZicboSm_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. |
ExceptionsZicboSm_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. |
ExceptionsZicboSm_cg/{cp_cbo_access_fault, cp_cbo_address_misaligned} |
UDB Parameters: None.
B.2.11. ExceptionsSv 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 |
ia_fault_exc_on_target |
|
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_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_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 |
|
| Normative Rule | Rule Text | Coverpoints |
|---|---|---|
mcause_exccode_priority_misaligned |
ExceptionsSv_cg/{cp_misaligned_priority_s, cp_misaligned_priority_u} |
|
exc_priority |
ExceptionsSv_cg/{cp_misaligned_priority_s, cp_misaligned_priority_u, cp_misaligned_priority_fetch_s, cp_misaligned_priority_fetch_u} |
UDB Parameters: None.
B.2.12. ExceptionsSvSm 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_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. |
|
| Normative Rule | Rule Text | Coverpoints |
|---|---|---|
mcause_exccode_priority_misaligned |
ExceptionsSvSm_cg/cp_misaligned_priority_m |
|
exc_priority |
ExceptionsSvSm_cg/cp_misaligned_priority_m |
UDB Parameters: None.
B.2.13. ExceptionsSvZalrsc 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} |
sc_retire_permission |
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} |
sc_retire_permission |
| Normative Rule | Rule Text | Coverpoints |
|---|---|---|
sc_retire_permission |
No SC.W instruction shall retire unless it passes memory permission checks, |
ExceptionsSvZalrsc_cg/{cp_misaligned_priority_s, cp_misaligned_priority_u} |
lr_sc_alignment |
ExceptionsSvZalrsc_cg/{cp_misaligned_priority_s, cp_misaligned_priority_u} |
|
exc_priority |
ExceptionsSvZalrsc_cg/{cp_misaligned_priority_s, cp_misaligned_priority_u} |
|
mcause_exccode_priority_misaligned |
ExceptionsSvZalrsc_cg/{cp_misaligned_priority_s, cp_misaligned_priority_u} |
UDB Parameters: None.
B.2.14. ExceptionsSvZalrscSm 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. |
B.2.15. ExceptionsSvZaamo 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} |
amo_alignment |
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} |
amo_alignment |
| Normative Rule | Rule Text | Coverpoints |
|---|---|---|
amo_alignment |
ExceptionsSvZaamo_cg/{cp_misaligned_priority_s, cp_misaligned_priority_u} |
|
misaligned_atomicity_granule_size |
ExceptionsSvZaamo_cg/{cp_misaligned_priority_s, cp_misaligned_priority_u} |
|
exc_priority |
ExceptionsSvZaamo_cg/{cp_misaligned_priority_s, cp_misaligned_priority_u} |
|
mcause_exccode_priority_misaligned |
ExceptionsSvZaamo_cg/{cp_misaligned_priority_s, cp_misaligned_priority_u} |
UDB Parameters: None.
B.2.16. ExceptionsSvZaamoSm 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. |
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 |
* |
* |
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_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_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_exists |
| 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_timeout} |
|
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} |
|
wfi_resume_any_priv |
InterruptsSm_cg/{cp_wfi_m, cp_wfi} |
|
wfi_no_intr_pc |
InterruptsSm_cg/cp_wfi_m |
| 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 |
* |
* |
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_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 |
| 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, InterruptsS_cg/cp_wfi_timeout |
|
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. SstcSm 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_exists |
To be Done |
Uncovered |
| Normative Rule | Rule Text | Coverpoints |
|---|---|---|
menvcfg_stce_exists |
The Sstc extension adds the STCE (STimecmp Enable) bit to menvcfg CSR. |
SstcSm_cg/cp_machine_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. |
SstcSm_cg/cp_machine_stce, InterruptsSm_cg/cp_trigger_sti_sstc, InterruptsSm_cg/cp_write_stip_sstc |
menvcfg_stce_enable_op |
SstcSm_cg/cp_machine_stce, InterruptsSm_cg/cp_trigger_sti_sstc, InterruptsSm_cg/cp_write_stip_sstc |
|
menvcfg_stce_zero_op |
SstcSm_cg/cp_machine_stce, InterruptsSm_cg/cp_trigger_sti_sstc, InterruptsSm_cg/cp_write_stip_sstc |
|
menvcfg_stce_zero_vstip |
SstcSm_cg/cp_machine_stce, InterruptsSm_cg/cp_trigger_sti_sstc, InterruptsSm_cg/cp_write_stip_sstc |
|
stimecmp_stimecmph_sz_acc |
||
mip_sip_stip_op |
InterruptsSm_cg/cp_trigger_sti_sstc, InterruptsSm_cg/cp_write_stip_sstc |
|
sip_stip_sie_stie |
InterruptsSm_cg/cp_trigger_sti_sstc, InterruptsSm_cg/cp_write_stip_sstc |
UDB Parameters: None.
B.3.4. 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 |
| 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}, SstcH_vs_cg/cp_vs_stimecmp_accessible |
menvcfg_stce_enable_op |
Sstc_cg/cp_supervisor_stce, InterruptsSm_cg/cp_trigger_sti_sstc |
|
menvcfg_stce_zero_op |
Sstc_cg/{cp_supervisor_stce, cp_user_stce}, InterruptsSm_cg/cp_trigger_sti_sstc |
|
menvcfg_stce_zero_vstip |
||
mcounteren_tm_clr |
Sstc_cg/cp_supervisor_tm |
|
mcounteren_tm_set |
Sstc_cg/cp_supervisor_tm |
|
stimecmp_stimecmph_sz_acc |
Sstc_cg/cp_supervisor_tm, Sstc_cg/cp_supervisor_tm_h, Sstc_cg/cp_supervisor_stce |
UDB Parameters: None.
TODO: beef up testing stimecmp values, behavior near wraparound
B.4. Zicntr
These privileged tests exercise counter and HPM reads (time, cycle, instret, hpmcounter[31:3])
from lower privilege modes, as controlled by mcounteren and scounteren.
Note that the Zicntr and Zihpm unprivileged tests exercise access to these counters
from U-mode (or from M-mode when U-mode is not supported), and the Sm tests exercise access to mcycle, minstret, mhpmcounter, etc. from M-mode.
B.4.1. ZicntrS Supervisor-Mode Counter Reads
| Normative Rule | Rule Text | Coverpoints |
|---|---|---|
scounteren |
S_scsr_cg/cp_scsr_access |
|
scounteren_acc |
ZicntrS_cg/cp_scounteren_access_u |
|
scounteren_op |
ZicntrS_cg/{cp_scounteren_access_u, cp_mscounteren_access_u} |
|
mcounteren_inc_inaccessible |
ZicntrS_cg/cp_mcounter_inc_inaccessible |
|
ecall_ebreak_no_minstret_inc |
ZicntrS_cg/cp_mcounter_inc_inaccessible |
UDB Parameters: None.
B.4.2. ZicntrU User-Mode Counter Reads
| Normative Rule | Rule Text | Coverpoints |
|---|---|---|
mcounteren_op |
ZicntrS_cg/cp_mcounteren_access_s, ZicntrU_cg/cp_mcounteren_access_u, ZicntrSm_cg/cp_mcounteren_access_m, ZicntrH_cg/cp_mcounteren_access_vs |
|
mcounteren_inc_inaccessible |
ZicntrU_cg/cp_mcounter_inc_inaccessible |
|
mcounteren_clr_ill_inst_exc |
ZicntrS_cg/cp_mcounteren_access_s, ZicntrU_cg/cp_mcounteren_access_u |
|
mcounteren_set_nxt_priv |
ZicntrS_cg/cp_mcounteren_access_s, ZicntrU_cg/cp_mcounteren_access_u |
|
ecall_ebreak_no_minstret_inc |
ZicntrU_cg/{cp_instret_ecall, cp_instret_ebreak} |
UDB Parameters: None.
B.5. Endian
B.5.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.5.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.5.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.5.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.5.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.5.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.5.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.6. 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.
Vector instructions introduce complex register constraints and are tested separately in SsstrictV.
B.6.1. SsstrictSm
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 SsstrictS 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 |
medelegh_omit_xlen64 |
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. |
~16384 per quadrant minus excluded branches/jumps/memory ops tested separately. |
||
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 |
||||||
| Normative Rule | Rule Text | Coverpoints |
|---|---|---|
medelegh_omit_xlen64 |
SsstrictSm_mcsr_cg/{cp_csrr, cp_csrw_edges, cp_csrcs}/medelegh |
|
menvcfgh_sz_acc_op |
SsstrictSm_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. |
SsstrictSm_mcsr_cg/{cp_csrr, cp_csrw_edges, cp_csrcs}/mseccfgh |
mstatush_sz_acc |
For RV32 only, |
SsstrictSm_mcsr_cg/{cp_csrr, cp_csrw_edges, cp_csrcs}/mstatush |
stateen_rv32_upper_bits_csrs |
SsstrictSm_mcsr_cg/{cp_csrr, cp_csrw_edges, cp_csrcs}/{mstateen0h, mstateen1h, mstateen2h, mstateen3h} |
|
rv32_high_access |
SsstrictSm_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. |
SsstrictSm_mcsr_cg/{cp_csrr, cp_csrw_edges, cp_csrcs}/{menvcfg, menvcfgh} |
UDB Parameters: None.
B.6.2. SsstrictS
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 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 |
||||||
| Normative Rule | Rule Text | Coverpoints |
|---|---|---|
Ssstrict_no_nonconforming_extensions |
If the Ssstrict extension is implemented, then no non-conforming extensions are present. |
SsstrictS_instr_cg/{cp_illegal, cp_reserved}, SsstrictS_comp_instr_cg/{cp_compressed00, cp_compressed01} |
Ssstrict_unimplemented_opcodes_csr_exception |
SsstrictS_scsr_cg/cp_csrr, SsstrictS_scsr_cg/cp_csrw_edges, SsstrictS_scsr_cg/cp_csrcs, SsstrictS_instr_cg/cp_illegal |
|
slliw_srliw_sraiw_imm5_rsv |
SLLIW, SRLIW, and SRAIW encodings with imm[5]≠0 are reserved. |
SsstrictS_instr_cg/cp_IWshift |
c-addi16sp_rsv |
C.ADDI16SP is valid only when nzimm≠0; the code point with nzimm=0 is reserved. |
SsstrictS_comp_instr_cg/cp_compressed01 |
c-addi4spn_rsv |
C.ADDI4SPN is valid only when nzuimm≠0; the code points with nzuimm=0 are reserved. |
SsstrictS_comp_instr_cg/cp_compressed00 |
c-addiw_rsv |
C.ADDIW is valid only when rd≠x0; the code points with rd=x0 are reserved. |
SsstrictS_comp_instr_cg/cp_compressed01 |
c-jr_rsv |
C.JR is valid only when rs1≠x0; the code point with rs1=x0 is reserved. |
SsstrictS_comp_instr_cg/cp_compressed10 |
c-ldsp_rsv |
C.LDSP is valid only when rd≠x0; the code points with rd=x0 are reserved. |
SsstrictS_comp_instr_cg/cp_compressed10 |
c-lui_rsv |
SsstrictS_comp_instr_cg/cp_compressed01 |
|
c-lwsp_rsv |
C.LWSP is valid only when rd≠x0; the code points with rd=x0 are reserved. |
SsstrictS_comp_instr_cg/cp_compressed10 |
Zilsd_c-ldsp_x0 |
SsstrictS_comp_instr_cg/cp_compressed10 |
|
roundingmode_rsv |
SsstrictS_instr_cg/cp_Ftype, SsstrictS_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 |
SsstrictS_instr_cg/cp_cvtmodwdfrm |
|
Zdinx_x_reg_pair |
TODO |
|
bclri_shamt_rsv_rv32 |
For RV32, the encodings corresponding to shamt[5]=1 are reserved. |
SsstrictS_instr_cg/cp_Itype |
bexti_shamt_rsv_rv32 |
For RV32, the encodings corresponding to shamt[5]=1 are reserved. |
SsstrictS_instr_cg/cp_Itype |
binvi_shamt_rsv_rv32 |
For RV32, the encodings corresponding to shamt[5]=1 are reserved. |
SsstrictS_instr_cg/cp_Itype |
bseti_shamt_rsv_rv32 |
For RV32, the encodings corresponding to shamt[5]=1 are reserved. |
SsstrictS_instr_cg/cp_Itype |
Zacas_rv32_amocas-d_frst_pair_entry_reg_even |
SsstrictS_instr_cg/cp_amocas_odd |
|
Zacas_rv64_amocas-q_frst_pair_entry_reg_even |
SsstrictS_instr_cg/cp_amocas_odd |
|
ldaq_no_aq_reserved |
TODO |
|
sdrl_no_rl_reserved |
TODO |
|
diff_rv32e_rv32i |
SsstrictS_instr_cg/cp_upperreg_rs1, SsstrictS_instr_cg/cp_upperreg_rs2, SsstrictS_instr_cg/cp_upperreg_rd, SsstrictS_instr_cg/cp_upperreg_imm_rd |
|
hedelegh_sz_acc_op |
SsstrictS_scsr_cg/{cp_csrr, cp_csrw_edges, cp_csrcs}/hedelegh |
|
henvcfgh_sz_acc_op |
SsstrictS_scsr_cg/{cp_csrr, cp_csrw_edges, cp_csrcs}/henvcfgh |
|
htimedeltah_sz_acc_op |
SsstrictS_scsr_cg/{cp_csrr, cp_csrw_edges, cp_csrcs}/htimedeltah |
|
stateen_rv32_upper_bits_csrs |
SsstrictS_scsr_cg/{cp_csrr, cp_csrw_edges, cp_csrcs}/{hstateen0h, hstateen1h, hstateen2h, hstateen3h} |
|
vstimecmp_acc |
SsstrictS_scsr_cg/{cp_csrr, cp_csrw_edges, cp_csrcs}/vstimecmph |
|
stimecmp_stimecmph_sz_acc |
SsstrictS_scsr_cg/{cp_csrr, cp_csrw_edges, cp_csrcs}/stimecmph |
UDB Parameters: None.
B.6.3. SsstrictU
Same as SsstrictS, 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 as SsstrictSm/S 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.7. PMP
B.7.1. PMPSm
General Test Environment (PMPSm): - 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_access_fault_exception |
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_access_fault_exception |
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_access_fault_exception |
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_encoding |
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=111, pmpaddr0 = start of the test region, so region 0 is [0, pmpaddr0) and contains the code. lw, sw and jalr at pmpaddr0-4 and pmpaddr0. |
All accesses succeed: pmpaddr0-4 matches entry 0, and pmpaddr0 falls through to the background entry. |
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_granularity |
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 SvPMP. |
|||||
| Normative Rule | Rule Text | Coverpoints |
|---|---|---|
pmp_access_fault_exception |
Failed memory operations generate an instruction, load, or store access-fault exception. |
PMPSm_cg/{cp_cfg_X, cp_cfg_R, cp_cfg_W, cp_cfg_A_napot_all} |
pmp_cfg_permissions |
PMPSm_cg/{cp_cfg_X, cp_cfg_R, cp_cfg_W, cp_cfg_X1_all} |
|
pmp_l_bit_m_mode_enforcement |
PMPSm_cg/{cp_cfg_X0_all, cp_cfg_L_access_exec, cp_cfg_L_access_read, cp_cfg_L_access_write} |
|
pmp_exec_fault |
PMPSm_cg/{cp_cfg_X, cp_cfg_X0_all, cp_cfg_A_napot_x, cp_cfg_A_tor_x} |
|
pmp_rwx_check |
PMPSm_cg/{cp_cfg_X, cp_cfg_R, cp_cfg_W, cp_cfg_L_access_read} |
|
pmp_l_bit_function |
PMPSm_cg/cp_cfg_L_modify |
|
pmp_mmode_locking |
PMPSm_cg/{cp_cfg_L_modify, cp_cfg_X, cp_cfg_R, cp_cfg_W} |
|
pmp_l_bit_write_protection |
PMPSm_cg/cp_cfg_L_modify |
|
pmp_locked_until_reset |
PMPSm_cg/cp_cfg_L_modify |
|
pmp_na4_select_restriction |
PMPSm_cg/{cp_cfg_A_all_even, cp_cfg_A_all_odd} |
|
pmp_a_field_encoding |
PMPSm_cg/{cp_cfg_A_all_even, cp_cfg_A_OFF_all_read, cp_cfg_A_napot_all, cp_cfg_A_tor_r} |
|
pmp_a_field_off |
When A=0, this PMP entry is disabled and matches no addresses. |
PMPSm_cg/{cp_cfg_A_OFF_all_read, cp_cfg_A_OFF_all_write, cp_cfg_A_OFF_all_exec, cp_priority_off_lw} |
pmp_napot_encoding_low_bits |
PMPSm_cg/{cp_cfg_A_napot_all, cp_cfg_A_napot_x, cp_cfg_A_napot_r, cp_cfg_A_napot_w} |
|
pmp_a_field_napot_na4 |
PMPSm_cg/{cp_cfg_A_napot_all, cp_cfg_A_napot_r, cp_cfg_A_NA4_all, cp_cfg_A_na4_r} |
|
pmp_a_field_tor |
PMPSm_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_entry_priority |
PMPSm_cg/{cp_priority_lw, cp_priority_sw, cp_priority_off_lw}, PMPZca_cg/cp_misaligned_napot |
|
pmp_napot_addr_read_mask |
PMPSm_cg/{cp_grain_OFF_to_NAPOT, cp_grain_NAPOT_to_NAPOT} |
|
pmp_tor_off_addr_read_mask |
PMPSm_cg/{cp_grain_OFF_to_OFF, cp_grain_OFF_to_TOR, cp_grain_NAPOT_to_OFF, cp_grain_NAPOT_to_TOR} |
|
pmp_granularity |
PMPSm_cg/{cp_grain_check_write, cp_grain_check_read, cp_cfg_A_NA4_all} |
|
pmp_region_granularity_g |
PMPSm_cg/{cp_grain_check_write, cp_grain_check_read} |
|
pmp_mmode_only_regions |
Descriptive spec text with no separately testable behavior |
|
pmp_addr_registers |
The PMP address registers are CSRs named pmpaddr0-pmpaddr63. |
PMPSm_cg/{cp_pmpaddr_upper_zero, cp_grain_check_write} |
pmp_addr_warl |
Not all physical address bits may be implemented, and so the pmpaddr registers are WARL. |
PMPSm_cg/{cp_pmpaddr_upper_zero, cp_grain_check_write} |
pmp_csrs_warl_access |
PMPSm_cg/{cp_pmpcfg_walk, cp_cfg_A_all_even, cp_grain_check_write, cp_pmpaddr_upper_zero} |
|
pmp_addr_encoding |
PMPSm_cg/{cp_pmpaddr_upper_zero, cp_cfg_A_tor_r, cp_cfg_A_napot_r} |
|
pmp_cfg_rv32_layout |
PMPSm_cg/{cp_pmpcfg_walk, cp_pmpcfg_walk_odd, cp_cfg_A_tor_all3, cp_cfg_A_tor_all4} |
|
pmp_cfg_rv64_layout |
PMPSm_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 |
PMPSm_cg/cp_pmpcfg_walk |
|
pmp_full_match_required |
PMPZca_cg/{cp_misaligned_napot, cp_misaligned_tor, cp_misaligned_na4} |
|
pmp_violation_precise_trap |
PMP violations are always trapped precisely at the processor. |
PMPZaamo_cg/cp_cfg_RW |
pmp_entry_count |
PMPSm_cg/{cp_pmp64_read, cp_pmp64_write} |
|
pmp_load_fault |
PMPSm_cg/cp_cfg_R, PMPZalrsc_cg/cp_cfg_RW, PMPF_cg/cp_cfg_R, PMPZca_cg/cp_cfg_R |
|
pmp_store_fault |
PMPSm_cg/cp_cfg_W, PMPZalrsc_cg/cp_cfg_RW, PMPZaamo_cg/cp_cfg_RW, PMPZicbo_cg/cp_cbo_zero |
|
pmp_misaligned_access_behavior |
PMPZca_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 |
PMPSm_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 |
PMPSm_cg/{cp_grain_OFF_to_NAPOT, cp_grain_NAPOT_to_OFF, cp_grain_NAPOT_to_TOR} |
|
pmp_entry_structure |
PMPSm_cg/cp_pmpcfg_walk |
UDB Parameters: None.
B.7.2. PMPS
General Test Environment (PMPS): - 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 PMPSm. - 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 PMPSm 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_check_priv_modes |
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_check_priv_modes |
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_rwx_check |
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 |
UDB Parameters: None.
B.7.3. PMPU
General Test Environment (PMPU): - 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 PMPSm. - 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 PMPSm 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_check_priv_modes |
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_check_priv_modes |
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_rwx_check |
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 |
UDB Parameters: None.
B.7.4. PMPF
| Coverpoint | Goal | Feature Description | Expectation | Bins | Normative Rule |
|---|---|---|---|---|---|
General Test Environment (PMPF): |
|||||
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 PMPSm 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 |
| Normative Rule | Rule Text | Coverpoints |
|---|---|---|
pmp_load_fault |
PMPF_cg/cp_cfg_R |
|
pmp_store_fault |
PMPF_cg/cp_cfg_W |
|
pmp_l_bit_m_mode_enforcement |
PMPF_cg/{cp_cfg_R, cp_cfg_W} |
UDB Parameters: None.
B.7.5. PMPZca
| Coverpoint | Goal | Feature Description | Expectation | Bins | Normative Rule |
|---|---|---|---|---|---|
General Test Environment (PMPZca): |
|||||
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_cfg_permissions |
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_entry_priority |
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_full_match_required |
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_full_match_required |
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_misaligned_access_behavior |
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 |
| Normative Rule | Rule Text | Coverpoints |
|---|---|---|
mtval_varlen_wr |
PMPZca_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 |
PMPZca_cg/{cp_misaligned_tor, cp_misaligned_napot, cp_misaligned_na4} |
|
pmp_full_match_required |
PMPZca_cg/{cp_cret_tor, cp_cret_napot, cp_cret_na4, cp_misaligned_tor} |
|
pmp_entry_priority |
PMPZca_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. |
PMPZca_cg/cp_misaligned_off |
pmp_exec_fault |
PMPZca_cg/{cp_misaligned_napot, cp_misaligned_tor, cp_misaligned_na4} |
|
pmp_cfg_permissions |
PMPZca_cg/{cp_cfg_R, cp_cfg_W} |
|
pmp_load_fault |
PMPZca_cg/cp_cfg_R |
|
pmp_store_fault |
PMPZca_cg/cp_cfg_W |
|
Zca_align16 |
PMPZca_cg/{cp_misaligned_napot, cp_misaligned_tor} |
UDB Parameters: None.
B.7.6. PMPZicbo
| Coverpoint | Goal | Feature Description | Expectation | Bins | Normative Rule |
|---|---|---|---|---|---|
General Test Environment (PMPZicbo): |
|||||
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 |
| Normative Rule | Rule Text | Coverpoints |
|---|---|---|
cbm_unperm_fault |
PMPZicbo_cg/{cp_cbo_inval, cp_cbo_flush, cp_cbo_clean} |
|
pmp_cbm_fault |
PMPZicbo_cg/{cp_cbo_inval, cp_cbo_flush, cp_cbo_clean} |
|
cbz_unperm_fault |
PMPZicbo_cg/cp_cbo_zero |
|
cbp_unperm_noexcep |
PMPZicbo_cg/{cp_prefetch_w, cp_prefetch_r, cp_prefetch_i} |
|
cbm_access |
PMPZicbo_cg/{cp_cbo_clean, cp_cbo_flush, cp_cbo_inval} |
|
cbz_access |
PMPZicbo_cg/cp_cbo_zero |
|
pmp_store_fault |
PMPZicbo_cg/cp_cbo_zero |
|
fault_excep_csr |
PMPZicbo_cg/{cp_cbo_zero, cp_cbo_clean} |
UDB Parameters: None.
B.7.7. PMPZaamo
| Coverpoint | Goal | Feature Description | Expectation | Bins | Normative Rule |
|---|---|---|---|---|---|
General Test Environment (PMPZaamo): |
|||||
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_violation_precise_trap |
| Normative Rule | Rule Text | Coverpoints |
|---|---|---|
pmp_store_fault |
PMPZaamo_cg/cp_cfg_RW |
|
mcause_exccode_st_sc_amo |
store, store-conditional, and AMO instructions generate store/AMO exceptions. |
PMPZaamo_cg/cp_cfg_RW |
pmp_l_bit_m_mode_enforcement |
PMPZaamo_cg/cp_cfg_RW |
|
pmp_violation_precise_trap |
PMP violations are always trapped precisely at the processor. |
PMPZaamo_cg/cp_cfg_RW |
UDB Parameters: None.
B.7.8. PMPZalrsc
| Coverpoint | Goal | Feature Description | Expectation | Bins | Normative Rule |
|---|---|---|---|---|---|
General Test Environment (PMPZalrsc): |
|||||
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 |
| Normative Rule | Rule Text | Coverpoints |
|---|---|---|
pmp_load_fault |
PMPZalrsc_cg/cp_cfg_RW |
|
pmp_store_fault |
PMPZalrsc_cg/cp_cfg_RW |
|
sc_retire_permission |
No SC.W instruction shall retire unless it passes memory permission checks, |
PMPZalrsc_cg/cp_cfg_RW |
mcause_exccode_ld_ldrsv |
Note that load and load-reserved instructions generate load exceptions |
PMPZalrsc_cg/cp_cfg_RW |
UDB Parameters: None.
B.8. Sv* Virtual Memory
B.8.1. Sv
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 suites: SvSm, SvbareSm and SvinvalSm.
The PMP suites (SvPMP, SvPMPZicbo, SvaduPMP) 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 |
[norm:Sv39_pte_future_rsv] [norm:Svpbmt_nonleaf_pte_pbmt_must_be_zero] [norm:stval_op_faulting_addr] |
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 |
[norm:Sv39_pte_future_rsv] [norm:Svpbmt_nonleaf_pte_pbmt_must_be_zero] [norm:stval_op_faulting_addr] |
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 |
[norm:Sv39_pte_future_rsv] [norm:Svpbmt_nonleaf_pte_pbmt_must_be_zero] [norm:stval_op_faulting_addr] |
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] |
| 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} |
|
satp |
Sv_satp_cg/{cp_access_s,cp_access_u,satp_asid_PPN}, SvSm_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}, SvSm_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 |
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 |
|
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 |
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 |
|
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 |
UDB Parameters: None.
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
B.8.2. SvSm Virtual Memory with M-mode State
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 (SvSm): |
||||||
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 |
| Normative Rule | Rule Text | Coverpoints |
|---|---|---|
satp |
SvSm_satp_cg/cp_access_m |
|
mstatus_mprv_ldst_op |
SvSm_mstatus_mprv_cg/cp_mprv_{load,store} |
|
mstatus_mprv_inst_xlat_op |
Instruction address-translation and protection are unaffected by the setting of |
SvSm_mstatus_mprv_cg/cp_mprv_ins |
mstatus_sum_op, mstatus_sum_op_mprv_mpp |
mstatus_sum_op: When |
SvSm_mstatus_mprv_cg/cp_mprv_upage_smode_sumunset_{noread,nowrite}, SvSm_mstatus_mprv_cg/cp_mprv_upage_smode_sumset_{read,write} |
mstatus_tvm_op, mstatus_tvm_warl |
mstatus_tvm_op: When |
SvSm_mstatus_mprv_cg/cp_tvm_exception_s, SvinvalSm_cg/cr_svinival |
mstatus_mstatush_xbe_warl |
SvSm_mstatus_mprv_cg/cp_mstatus_sbe_{read,write} |
|
mstatus_sbe_implicit |
SvSm_mstatus_mprv_cg/cp_mstatus_sbe_{read,write} |
|
mtval_vaddr_wr_faulting_addr |
SvSm_mstatus_mprv_cg/{load_page_fault,store_page_fault} |
UDB Parameters: None.
B.8.3. Svbare Virtual Memory Off
| 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 |
| 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) |
UDB Parameters: None.
B.8.4. SvbareSm 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 |
| Normative Rule | Rule Text | Coverpoints |
|---|---|---|
mstatus_mprv_ldst_op |
SvbareSm_cg/cp_satp_bare_mprv_{load,store} |
|
mstatus_mprv_inst_xlat_op |
Instruction address-translation and protection are unaffected by the setting of |
SvSm_mstatus_mprv_cg/cp_mprv_ins |
UDB Parameters: None.
B.8.5. SvPMP VirtMem + PMP
| Coverpoint | Goal | Feature Description | Expectation | Bins | ID | Normative Rule |
|---|---|---|---|---|---|---|
General Test Environment (SvPMP): |
||||||
mode |
Verify each supported translation mode is exercised with PMP |
Sampled while the SvPMP 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 |
| Normative Rule | Rule Text | Coverpoints |
|---|---|---|
pmp_check_pagetable_access, pmp_with_paging |
pmp_check_pagetable_access: PMP checks are also applied to page-table accesses for virtual-address translation, for which the effective privilege mode is S. pmp_with_paging: When paging is enabled, instructions that access virtual memory may result in multiple physical-memory accesses, including implicit references to the page tables. The PMP checks apply to all of these accesses. |
SvPMP_cg/pmp0_pte_{noread,nowrite,noexec}_s |
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 |
SvPMP_cg/pmp0_PA_{noread,nowrite,noexec}_s |
UDB Parameters: None.
B.8.6. SvZicbo VirtMem + CBOM/CBOZ
| Coverpoint | Goal | Feature Description | Expectation | Bins | ID | Normative Rule |
|---|---|---|---|---|---|---|
General Test Environment (SvZicbo): |
||||||
cp_PTE_rwx_zicbop_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. |
PTE_RWX_d x PageType_d x zicbop_ins x mode {S-mode} |
cbp_unperm_translate |
[norm:cbp_unperm_translate] |
cp_PTE_rwx_zicbop_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. |
PTE_RWX_d x PageType_d x zicbop_ins x mode {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 |
|
cp_PTE_rw_unset_zicbom_s |
Verify Zicbom CBOs raise a store/AMO page fault with R=0 and W=0 from S-mode |
S-mode: execute-only leaf PTE with 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. |
Store/AMO page fault (scause = 15). |
PTE_x_spage_d x PageType_d x store_page_fault x cbo_ins x mode {S-mode} |
cbm_unperm_fault |
cbm_unperm_fault |
cp_PTE_rw_unset_zicbom_u |
Verify Zicbom CBOs raise a store/AMO page fault with R=0 and W=0 from U-mode |
U-mode: execute-only leaf PTE 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. |
Store/AMO page fault (scause = 15). |
PTE_x_upage_d x PageType_d x store_page_fault x cbo_ins x mode {U-mode} |
cbm_unperm_fault |
cbm_unperm_fault |
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_page_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} |
||
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, 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, 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 instead of the next page table. 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} |
||
| Normative Rule | Rule Text | Coverpoints |
|---|---|---|
fault_excep_csr |
SvZicbo_cg/{cp_PTE_inv_cbo_s,cp_PTE_inv_cbo_u}, TODO: guest page fault |
|
cbm_unperm_fault |
SvZicbo_cg/{cp_PTE_rw_unset_zicbom_s,cp_PTE_rw_unset_zicbom_u}, TODO: guest page fault |
|
cbm_page_fault |
SvZicbo_cg/{cp_PTE_rw_unset_zicbom_s, cp_PTE_rw_unset_zicbom_u, cp_PTE_inv_cbo_s, cp_spage_rwx_cbo_u} |
|
cbm_unperm_translate |
SvZicbo_cg/{cp_Abit_unset_cbo_s,cp_Abit_unset_cbo_u}, TODO: guest page fault |
|
cbz_unperm_fault |
SvZicbo_cg/{cp_PTE_w_unset_zicboz_s,cp_PTE_w_unset_zicboz_u}, TODO: guest page fault |
|
cbz_unperm_translate |
SvZicbo_cg/{cp_Abit_unset_cbo_s, cp_Abit_unset_cbo_u, cp_Dbit_unset_zicboz_s, cp_Dbit_unset_zicboz_u} |
|
cbp_unperm_translate |
||
cbm_access |
SvZicbo_cg/{cp_PTE_r_set_w_unset_zicbom_s,cp_PTE_r_set_w_unset_zicbom_u} |
|
pma_chk_paddr |
SvZicbo_cg/{cp_leaf_PTE_to_nonexistent_pa_cbo_s,cp_leaf_PTE_to_nonexistent_pa_cbo_u} |
UDB Parameters: None.
B.8.7. SvPMPZicbo VirtMem + PMP + CBOM/CBOZ
| Coverpoint | Goal | Feature Description | Expectation | Bins | ID | Normative Rule |
|---|---|---|---|---|---|---|
General Test Environment (SvPMPZicbo): |
||||||
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 |
| Normative Rule | Rule Text | Coverpoints |
|---|---|---|
cbm_unperm_fault |
SvPMPZicbo_cg/{cp_PA_PMP_rw_unset_cbo_s,cp_PA_PMP_rw_unset_cbo_u} |
|
cbz_unperm_fault |
SvPMPZicbo_cg/{cp_PA_PMP_rw_unset_cbo_s,cp_PA_PMP_rw_unset_cbo_u} |
|
fault_excep_csr |
SvPMPZicbo_cg/{cp_PA_PMP_rw_unset_cbo_s,cp_PA_PMP_rw_unset_cbo_u} |
|
pmp_check_pagetable_access, pmp_with_paging |
pmp_check_pagetable_access: PMP checks are also applied to page-table accesses for virtual-address translation, for which the effective privilege mode is S. pmp_with_paging: When paging is enabled, instructions that access virtual memory may result in multiple physical-memory accesses, including implicit references to the page tables. The PMP checks apply to all of these accesses. |
SvPMPZicbo_cg/{cp_PTE_PMP_rw_unset_cbo_s,cp_PTE_PMP_rw_unset_cbo_u} |
UDB Parameters: None.
B.8.8. Svinval Memory Management Unit Table Invalidation
The Svinval extension defines instructions to update memory management tables for virtual memory and optionally for PMP. Their effect is system-dependent, so these tests simply check that the instructions run.
| Coverpoint | Goal | Feature Description | Expectation | Bins | ID | Normative Rule |
|---|---|---|---|---|---|---|
General Test Environment (Svinval): |
||||||
cr_svinival |
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_sinval_vma_invalidates_same_as_sfence_vma Svinval_sfence_w_inval_orders_before_sinval_vma Svinval_sequence_rs1_rs2 Svinval_illegal_instruction_u_mode Svinval_sfence_w_inval_inval_u_mode Svinval_sfence_w_inval_inval_s_vs_mode |
Svinval_illegal_instruction_u_mode |
| Normative Rule | Rule Text | Coverpoints |
|---|---|---|
Svinval_sinval_vma_invalidates_same_as_sfence_vma |
||
Svinval_sfence_w_inval_orders_before_sinval_vma |
||
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_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/cr_svinival |
|
Svinval_sfence_w_inval_inval_u_mode |
Svinval_cg/cr_svinival |
|
Svinval_sfence_w_inval_inval_s_vs_mode |
Svinval_cg/cr_svinival, SvinvalSm_cg/cr_svinival, TODO: test in hypervisor tests |
|
Svinval_hinval_vvma_gvma, Svinval_hinval_gvma_uses_vmid, Svinval_virtual_instruction_vu_vs, Svinval_virtual_instruction_vtvms, Svinval_sfence_w_inval_inval_vu_mode |
Svinval_hinval_vvma_gvma: These have the same semantics as SINVAL.VMA, except that they combine with SFENCE.W.INVAL and SFENCE.INVAL.IR to replace HFENCE.VVMA and HFENCE.GVMA, respectively, instead of SFENCE.VMA. Svinval_hinval_gvma_uses_vmid: HINVAL.GVMA uses VMIDs instead of ASIDs. 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. |
TODO: test in hypervisor tests (SvinvalH_cg/cr_svinivalH has no tests yet) |
UDB Parameters: None.
B.8.9. SvinvalSm Table Invalidation with mstatus.TVM
Runs the Svinval instructions in M, S and U mode with mstatus.TVM=1.
| Coverpoint | Goal | Feature Description | Expectation | Bins | ID | Normative Rule |
|---|---|---|---|---|---|---|
General Test Environment (SvinvalSm): |
||||||
cr_svinival |
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 |
| Normative Rule | Rule Text | Coverpoints |
|---|---|---|
Svinval_illegal_instruction_tvm |
SvinvalSm_cg/cr_svinival |
|
Svinval_sfence_w_inval_inval_s_vs_mode |
SvinvalSm_cg/cr_svinival |
|
mstatus_tvm_op, mstatus_tvm_warl |
mstatus_tvm_op: When |
SvinvalSm_cg/cr_svinival |
UDB Parameters: None.
B.8.10. 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.8.11. 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} |
||
| 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. |
TODO: test in hypervisor tests |
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} |
|
menvcfg_adue_fence |
Svadu_cg/Svadu_enabled |
|
menvcfg_adue_rdonly0 |
Sm_mcsr_cg/cp_mcsrwalk_masked/menvcfg |
|
menvcfg_adue_henvcfg_adue_rdonly0 |
TODO: test in hypervisor tests |
UDB Parameters: None.
B.8.12. Svadu A/D Bit Hardware Update + PMP
| Coverpoint | Goal | Feature Description | Expectation | Bins | ID | Normative Rule |
|---|---|---|---|---|---|---|
General Test Environment (SvaduPMP): |
||||||
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 |
Svadu_hw_update_a_d_bits |
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 |
Svadu_hw_update_a_d_bits |
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 |
Svadu_hw_update_a_d_bits |
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 |
Svadu_hw_update_a_d_bits |
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 |
| Normative Rule | Rule Text | Coverpoints |
|---|---|---|
Svadu_hw_update_a_d_bits, pmp_check_pagetable_access |
Svadu_hw_update_a_d_bits: If the Svadu extension is implemented, the menvcfg.ADUE field is writable. pmp_check_pagetable_access: PMP checks are also applied to page-table accesses for virtual-address translation, for which the effective privilege mode is S. |
SvaduPMP_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} |
UDB Parameters: None.
B.8.13. 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 |
| 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, menvcfg_pbmte_henvcfg_pbmte_rdonly0 |
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. menvcfg_pbmte_henvcfg_pbmte_rdonly0: for implementations with the hypervisor extension, henvcfg.PBMTE is read-only zero if menvcfg.PBMTE is zero. |
TODO: test in hypervisor tests |
UDB Parameters: None.
B.8.14. 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 |
||||
| 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 |
TODO: test in hypervisor tests |
UDB Parameters: None.
B.8.15. 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.9. 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.9.1. H Hypervisor CSRs and Instructions
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) h H-extension CSRS (RV64 only): 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 Note: * trap handler should also record hstatus, m/s status in signature
| Coverpoint | Goal | Feature Description | Expectation | Bins | Normative Rule | Notes |
|---|---|---|---|---|---|---|
Tests executed in M-mode (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. hgeip is read-only. |
5 * (2 + 14-17 + 9-11) |
m_access_all_lower_priv_csrs |
* also capture 2.7 >xlen,2 "accessible at higher priv levels" |
cp_hcsrwalk |
Exercise each bit of H-extension CSRs |
Set and clear each bit of each Machine H-Extension CSR. |
All registers are accessible. Some fields are WARL and will not change. |
64*2*(2 + 13-16 + 8-10) |
mtval2_sz_acc_op |
* make sure each bit of hstatus, vsstatus are tested elsewhere |
cp_replica |
Writing to S/VS-mode CSRs doesn’t affect replica |
Write different random values into S-mode CSRs and their VS-mode replicas. Read back |
Each CSR should have value written. |
9 |
H_vscsrs_v0 |
|
cp_mtvala |
mtval must not be read-only zero |
Write 1s to mtval |
nonzero |
1 |
H_mtval_nrz |
|
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. hgeip is read-only. |
5 * (14-17 + 9-11) |
m_access_all_lower_priv_csrs |
|
cp_hcsrwalk |
Exercise each bit of H-extension CSRs |
Set and clear each bit of each {HS/VS} H-Extension CSR. Exclude hstatus, vsstatus because of WPRI bits. |
All registers are accessible. Some fields are WARL and will not change. |
64 * 2 * (13-16 + 8-10) |
hedeleg_sz_acc |
The …X bits, when set, indicate that the PMP entry permits … instruction execution |
cp_hcsr_inaccessible |
M-mode H-extension registers are inaccessible from HS-mode |
csrrw, csrrs, csrrc, csrr each Machine H-Extension CSR |
Illegal instruction fault |
5 * 2 |
Zicsr_illegal_mode |
|
cp_replica |
In HS, writing to S/VS-mode CSRs doesn’t affect replica |
In M-mode, write different random values into S-mode CSRs and their VS-mode replicas. Switch to HS-mode and read, write random, and readback S and VS CSRs. Switch back to M-mode and read back both the S-mode CSRs and VS replicas. |
Each CSR should have value written. |
9 |
H_vscsrs_v0 |
|
cp_hstatus_vgein |
VGEIN can hold values between 0 and GEILEN |
Write {0, 1, GEILEN-1, GEILEN, GEILEN+1, 63} to hstatus.VGEIN |
Only write legal values |
6 |
hstatus_vgein_wlrl |
|
cp_vscause_write |
vscause WLRL fields writable |
Write values |
with interrupt = 1: 0-15 |
81 |
||
cp_tvm |
TVM traps access to satp and hgatp |
With mstatus.TVM = {0/1} read and write satp and hgatp |
Illegal instruction fault if TVM = 1 |
2 TVM * 2 accesses * 2 regs |
||
* check if any other bitfields need special cases, including hstatus, vsstatus |
||||||
Tests executed in VS-mode (H_vscsr_cg) |
||||||
cp_hcsr_inaccessible |
M-mode H-extension registers are inaccessible from VS-mode |
csrrw, csrrs, csrrc, csrr each Machine H-Extension CSR |
Illegal instruction fault |
5 * 2 |
Zicsr_illegal_mode |
|
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 |
5 * (13-16 + 8-10) |
H_csrs_hs_not_vs |
|
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 |
"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 M-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 M-mode and read back both the S-mode CSRs and VS replicas. |
VS replica should have changed but S CSR does not change. |
9 |
H_vscsrs_v0 |
|
cp_nonreplica |
In VS, accessing nonreplicated S-mode CSRs behaves normally |
csrrw, csrrc, csrrs, csrr each S CSR without VS replica |
Normal access |
5 * 3 |
H_scsrs_nomatch |
|
cp_vsstatus_sd_write |
vstatus.SD affected by vstatus.FS/VS |
Write 1 and 0 to SD with FS/VS all 0. Write cross-product of all bits of vsstatus.SD/ FS/ VS. |
vsstatus.SD = 1 if FS or VS are nonzero |
2 * 4 * 4 |
||
cp_tvm |
VTVM traps access to satp |
With mstatus.TVM = {0/1} cross hstatus.VTVM = {0/1} read and write satp |
Virtual instruction fault if VTVM = 1. TVM does not affect VS-mode. |
2 TVM * 2 VTVM * 2 accesses |
||
Tests executed in U-mode (H_ucsr_cg) |
||||||
cp_hcsr_inaccessible |
All H-extenion CSRs are inaccessible from U-mode |
csrrw, csrrc, csrrs, csrr each {Machine/HS/VS} H-Extension CSR |
Illegal instruction fault |
5 * (2 + 14-17 + 9-11) |
Zicsr_illegal_mode |
|
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 |
Zicsr_illegal_mode |
* |
cp_scsr |
Illegal instruction fault on U access to supervisor CSRs |
csrrw, csrrc, csrrs, csrr each S CSRs {with/without VS replicas}*** this should get tested in ZicsrS, along with other illegal instruction faults for CSRs of too much priv |
Illegal instruction fault |
5 * (9 + 3) |
Zicsr_illegal_mode |
|
Tests executed in VU-mode (H_vucsr_cg) |
||||||
cp_hcsr_inaccessible |
M-mode H-extension registers are inaccessible from VS-mode |
csrrw, csrrs, csrrc, csrr each {Machine/HS/VS} H-Extension and {Machine/Supervisor} CSR |
Illegal instruction fault |
5 * (2 + 14-17 + 9-11) |
Zicsr_illegal_mode |
|
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 |
Zicsr_illegal_mode |
|
cp_scsr |
Virtual instruction fault on VU access to hypervisor CSRs |
csrrw, csrrc, csrrs, csrr each {HS/VS/S} CSRs {with/without VS replicas} |
Virtual instruction fault or illegal instruction |
5 * (9 + 3) |
H_vscsrs_acc_vs |
|
Seems Zicsr* should write all 0s and all 1s to each standard CSR and read the CSR. Applies to all Zicsr* tabs. * maybe already done? |
||||||
Instructions (H_inst_cg) |
||||||
cp_hlv |
Basic load |
Set up non-identity G and VS-stage page tables. In {M, HS, U (with hstatus.HU = 1)}: Write a random value 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 |
3 modes * 7 instr |
||
cp_hlvx |
Basic load |
Set up non-identity G and VS-stage page tables. In {M, HS, U (with hstatus.HU = 1): Write a random value to scratch. hlvx.hu, hlvx.wu from scratch. Random source and destination registers. |
Read and sign/zero extend |
3 modes * 2 instr |
||
cp_hsv |
Basic store |
Set up non-identity G and VS-stage page tables. In {M, HS, U (with hstatus.HU = 1): Write a random value to scratch. hsv.b, hsv.h, hsv.w to scratch. For rv64, also test hsv.d. Random source and destination registers and values. |
Read and sign/zero extend |
3 modes * 4 instr |
||
cp_hfence |
Basic fence |
Execute hfence.vvma, hfence.gvma in {M, HS mode} cross with mstatus.TVM = {0,1} and with hstatus.VTVM = {0,1} |
Only exception for HFENCE.GVMA in HS-mode with mstatus.TVM=1 |
2 modes * 2 instr * 2 TVM * 2 VTVM |
||
cp_sfence |
Basic fence |
Execute sfence.vma in {M, HS, VS mode} cross with mstatus.TVM = {0,1} and with hstatus.VTVM = {0,1} |
Only exception in HS mode when TVM = 1 or in VS-mode when VTMV = 1 |
3 modes * 2 TVM * 2 VTVM |
||
cp_mret_m |
mret uses MPV |
Execute mret in machine mode with cross-product of mstatus.MPP / MPV / MPIE. |
Goes to appropriate mode |
2 MPP * 2 MPV * 2 MPIE |
||
cp_mret_illegal |
mret unavailable below M mode |
Execute mret in {HS, VS, VU} modes. |
Illegal instruction |
3 modes |
||
cp_sret_illegal |
sret unavailable in VU mode |
Execute sret in VU mode. |
Virtual instruction |
1 mode |
||
cp_sret_m |
sret from M mode |
Execute sret in machine mode with cross-product of mstatus.SPP / SPV / SPIE. |
Goes to appropriate mode |
2 SPP * 2 SPV * 2 SPIE |
||
cp_sret_hs |
sret from HS mode |
Execute sret in HS-mode with cross-product of sstatus.SPP / SPIE / hstatus.SPV. Check sstatus.SPP, SIE, SPIE, hstatus.SPV. |
Goes to appropriate mode |
2 SPP * 2 SPIE * 2 SPV |
||
cp_sret_vs |
sret from VS mode |
Execute sret in VS-mod ewith cross-product of sstatus.SPP / SPIE / hstatus.VTSR. Check sstatus.SPP, SIE, SPIE. |
Goes to appropriate mode, or virtual-instruction exception if VTSR=1. |
2 SPP * 2 SPIE * 2 VTSR |
||
B.9.2. ExceptionsH Hypervisor Exceptions
Note: M trap handler should log mcause/mepc/mtval/mstatus/mtinst/mtval2. Only certain mstatus bits need to be saved: GVA, SPP, MPP, SPIE, MPIE, MPV. HS trap handler should log scause/sepc/stval/sstatus/hstatus/htinst/htval. Only certain bits of status: hstatus.GVA/SPV/SPVP. sstatus.SPP, SPIE
| Coverpoint | Goal | Feature Description | Expectation | Bins | ID | Notes |
|---|---|---|---|---|---|---|
VS trap handler should log scause/spec/stval/sstatus (these will be the VS versions). Save sstatu.SPP, SPIE |
||||||
cp_hedeleg |
Delegation to HS or VS |
Attempt {instruction/load/store access fault, instruction/load/store misaligned fault, illegal instruction, ebreak} crossed with privilege mode M/HS/VS/VU/U crossed with medeleg = {0s/1111_0000_1011_0111_1111_111?} crossed with hedeleg = {0s/ 0000_11?0_1?11_0001_1111_111?/(walking 1s in hedeleg[8:1])} |
VU/U/VS delegate to VS when bit is set in both delegation registers. |
8 faults * 5 priv modes * 2 medeleg * 9 hedeleg |
* a version of this is needed in VMH for page faults. Umer doing this. |
Also covers {m/h}status.GVA; see also cp_gva |
cp_ecall_to_vs |
ecall to VS sets status bits |
Delegate ecalls from VU to VS with medeleg and hedeleg. Make ecall from VU to VS. Check vsstatus.SPP, vsstatus.SPIE, vsstatus.SIE. |
status bits written per spec |
1 priv modes |
||
cp_ecall_to_hs |
ecall to HS sets status bits |
Delegate ecalls from {U, VS, VU} to HS with medeleg with hedeleg = 0. Make ecall to HS cross with hstatus.SPVP={0/1}. Check hstatus.SPP/SPV/SPVP/GVA, sstatus.SIE/SPIE |
status bits written per spec |
4 |
||
cp_ecall_to_m |
ecall to M sets status bits |
No delegation of ecalls. Make ecall from M/HS/U/VS/VU to M. Check mstatus.MPV/MPP/GVA/MPIE/MIE |
status bits written per spec |
5 |
mode x medeleg ecall bits 0 x mstatus |
note: medelg ecall bits 0 (check for this) |
cp_ebreak_to_m |
ebreak to M sets status bits |
No delegation of ebreak. Make ebreak from M/HS/U/VS/VU to M. Check mstatus.MPV/MPP/GVA/MPIE/MIE |
status bits written per spec |
5 |
||
cp_vstvec |
ecall to VS uses vstvec |
Delegate ecall from {VU, VS} to VS with medeleg and hedeleg. Point vstvec to a different trap handler than stvec. Make ecall to VS from VU/VS |
Goes to vstvec handler |
2 |
Should this move to SvH because of page faults? |
|
cp_priority |
priority of illegal/virtual instruction, misaligned, access fault |
Execute {hlv.w / hsv.w} x {legal/illegal address} x {addr[1:0] = 00/01} x {priv=M/HS/VS/VU/U} x hstatus.HU={0/1} to cause all combinations of illegal, virtual, access fault misaligned |
Highest priority exception should occur |
2 instr * 2 access * 2 misaligned * 5 priv * 2 HU |
||
cp_virtual_instr_vs |
exercise all ways to trigger virtual-instruction exceptions from VS |
read instret with hcounteren[2] = 0, mcounteren[2] = 1 |
virtual instruction exception |
14+ |
* check which fences belong in each. |
|
cp_virtual_instr_vu |
exercise all ways to trigger virtual-instruction exceptions from VU |
in VU: |
virtual instruction exception |
14+ |
* check which fences belong in each. |
|
cp_loadstore_priv |
Valid privilege modes of hypervisor load/store |
In each privilege mode {M/HS/VS/U/VU} with hstatus.HU={0/1}, attempt {HLV.W, HLVX.W, HSV.W} from scratch memory |
succeeds in M, HS; virtual-instruction in VS,VU; illegal instruction in U with HU=0 |
5 priv * 2 HU |
||
cp_hfence_priv |
valid priv mode of hypervisor fences |
In each privilege mode {M/HS/VS/U/VU} with mstatus.TVM={0/1}, hstatus.VTVM = {0/1}, attempt {sfence.vma, hfence.vvma, hfence.gvma} |
Illegal instruction in U/VU-mode or in HS-mode with TVM=1. Virtual instruction exception in VS-mode. Otherwise succeed. |
5 priv * 2 TVM * 2 VTMV |
||
cp_hlv_address_misaligned |
Hypervisor Load Misaligned |
In M mode with identity page tables set up and XR permission, attempt hlv.{b, bu, h, hu, w} and hlvx.{hu, wu} with every combination of three lsbs:000-111. For RV64, also hlv.d and hlv.wu |
Success or load misaligned, affected by Zicclsm |
8 instr * 8 addr |
||
cp_hlv_access_fault |
Hypervisor Load Access Fault |
In M mode with identity page tables set up and XR permission, attempt hlv.{b, bu, h, hu, w} and hlvx.{hu, wu} from an illegal address (parameterized). For RV64, also hlv.d and hlv.wu |
Access fault |
8 instr |
||
cp_hsv_address_misaligned |
Hypervisor Store Misaligned |
In M mode with identity page tables set up and WR permission, attempt hsv.{b, h, w} with every combination of three lsbs:000-111. For RV64, also hsv.d. |
Success or store misaligned, affected by Zicclsm |
3 instr * 8 addr |
||
cp_hsv_access_fault |
Hypervisor Store Access Fault |
In M mode with identity page tables set up and WR permission, attempt hsv.{b, h, w} from an illegal address (parameterized). For RV64, also hsv.d. |
Access fault |
3 instr |
||
cp_xtinst_instr_misaligned |
Instruction address misaligned writes xtinst |
From VS mode with medeleg = {0/1}, hedeleg = 0, random value written to mtinst and mtval2, jump to misaligned address. Note medeleg 0/1 refers to all bits except ecall from M/HS mode |
If Zca supported, no fault. Otherwise, Instruction misaligned trap with {m/h}tinst = 0 or custom, Trap to machine also sets mtval2 = 0. |
2 |
mtinst could be hardwired to 0 and would ignore random value |
|
cp_xtinst_instr_access |
Instruction acc fault writes xtinst |
From VS mode with medeleg = {0/1}, hedeleg = 0, random value written to mtinst and mtval2, jump to access fault address |
Inst Access fault with {m/h}tinst = 0. Trap to machine also sets mtval2 = 0. |
2 |
||
cp_xtinst_illegalinstr |
Illegal instruction writes xtinst |
From VS mode with medeleg = {0/1}, hedeleg = 0, execute illegal instruction all 0s |
Illegal Instr fault with {m/h}tinst = 0. Trap to machine also sets mtval2 = 0. |
2 |
||
cp_xtinst_breakpoint |
breakpoint writes xtinst |
From VS mode with medeleg = {0/1}, hedeleg = 0, execute ebreak |
Breakpoint exception with {m/h}tinst = 0 or custom. Trap to machine also sets mtval2 = 0. |
2 |
||
cp_xtinst_virtinstr |
Virtual instruction writes xtinst |
From VS mode with medeleg = {0/1}, hedeleg = 0, csrr vstval |
Virtual instr exception with {m/h}tinst = 0 or custom. Trap to machine also sets mtval2 = 0. |
2 |
||
cp_xtinst_load_misaligned |
load misaligned writes xtinst |
From VS mode with medeleg = {0/1}, hedeleg = 0, misaligned load |
If Zicclsm supported, no fault. Otherwise Load misaligned exception with {m/h}tinst = 0 or transformed or custom. Trap to machine also sets mtval2 = 0. |
2 |
||
cp_xtinst_load_access |
load access writes xtinst |
From VS mode with medeleg = {0/1}, hedeleg = 0, load access fault |
Load access exception with {m/h}tinst = 0 or transformed or custom. Trap to machine also sets mtval2 = 0. |
2 |
||
cp_xtinst_store_misaligned |
store misaligned writes xtinst |
From VS mode with medeleg = {0/1}, hedeleg = 0, misaligned store |
Store misaligned exception with {m/h}tinst = 0 or transformed or custom. Trap to machine also sets mtval2 = 0. |
2 |
||
cp_xtinst_store_access |
store access writes xtinst |
From VS mode with medeleg = {0/1}, hedeleg = 0, store access fault |
If Zicclsm supported, no trap. Otherwise store access exception with {m/h}tinst = 0 or transformed or custom. Trap to machine also sets mtval2 = 0. |
2 |
||
cp_xtinst_ecall |
ecall writes xtinst |
From VS mode with medeleg = {0/1}, hedeleg = 0,ecall |
ecall from vs mode with {m/h}tinst = 0 or custom. Trap to machine also sets mtval2 = 0. |
2 |
||
B.9.3. ExceptionsHV Hypervisor Vector Exceptions
| Coverpoint | Goal | Feature Description | Expectation | Bins | Normative Rule | Notes |
|---|---|---|---|---|---|---|
cp_mstatus_vs_off |
mstatus.VS and vsstatus.VS are selected correctly according to the privilege level to disable vector instructions when off. |
Set misa.V to 1. Cross mstatus.VS = {00, 01, 10, 11}, vsstatus.vs = {00, 01 10, 11}, mode = {M/HS/VS/VU/U}. Attempt csrr t0, vl and vadd.vv v1, v2, v3. Read back mstatus.VS and vssstatus.VS. |
Illegal instruction if mstatus.VS = 00 or ((mode = VS or VU) and vsstatus.VS = 00). Otherwise, vadd.vv sets mstatus.VS to 11, and also sets vsstatus.VS to 11 if mode = VS or VU. |
4 * 4 * 5 |
vsstatus_vs_mstatus_vs_op_off |
|
cp_misa_V |
vector instructions don’t work when misa.V = 0 |
Set misa.V to 0. Attempt vadd.vv. |
Illegal instruction if V is not hardwired to 1 |
1 |
ins.prev = csrw misa x0; ins.current = vadd.v |
B.9.4. 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.9.5. HV Hypervisor Vector CSRs
*[Google Sheet Testplan] |
B.9.6. 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.9.7. ZicntrH Hypervisor Counters
| Coverpoint | Goal | Feature Description | Expectation | Bins | Normative Rule | ID | Notes |
|---|---|---|---|---|---|---|---|
in M mode |
|||||||
cp_mhscounteren_access_mcnt_m |
vscounters |
Write walking 1s and 0s to all of mcounteren, hcounteren, scounteren. Read from corresponding counter and counterh in M-mode (should always succeed) |
always succeeds |
Reading back counter is part of test program but not coverpoint |
|||
cp_delta |
htimedelta does not affect time in M mode |
With htimedelta = {0, 2^30, 2^60, -2^30, -2^60}, read time. In RV32, this also involves htimedeltah and timeh. Note: do not check time directly against reference model, which might tick differently. Only look at the range of values. |
0 < time < 2^30 in all circumstances |
5 |
norm:csr:htimedleta:delta |
||
in HS mode |
|||||||
cp_scounteren_access_scnt_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 (should always succeed) |
always succeeds |
Reading back counter is part of test program but not coverpoint |
|||
cp_delta |
htimedelta does not affect time in HS mode |
With htimedelta = {0, 2^30, 2^60, -2^30, -2^60}, read time. In RV32, this also involves htimedeltah and timeh. Note: do not check time directly against reference model, which might tick differently. Only look at the range of values. |
0 < time < 2^30 in all circumstances |
5 |
|||
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 (should fail when 0) |
fails when 0 |
mcounteren_op |
Reading back counter is part of test program but not coverpoint |
||
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 (should fail when 0) |
fails when 0 |
Reading back counter is part of test program but not coverpoint |
|||
cp_delta |
htimedelta affects time in VS mode |
With htimedelta = {0, 2^30, 2^60, -2^30, -2^60}, read time. In RV32, this also involves htimedeltah and timeh. Note: do not check time directly against reference model, which might tick differently. Only look at the range of values. |
0: 0 < time < 2^30 |
5 |
|||
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 (should fail when 0) |
fails when 0 |
Reading back counter is part of test program but not coverpoint |
|||
cp_delta |
htimedelta does not affect time in U mode |
With htimedelta = {0, 2^30, 2^60, -2^30, -2^60}, read time. In RV32, this also involves htimedeltah and timeh. Note: do not check time directly against reference model, which might tick differently. Only look at the range of values. |
0 < time < 2^30 in all circumstances |
5 |
|||
in VU mode |
|||||||
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 (should fail when 0) |
fails when 0 |
Reading back counter is part of test program but not coverpoint |
|||
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 (should fail when 0) |
fails when 0 |
||||
cp_delta |
htimedelta affects time in VU mode |
With htimedelta = {0, 2^30, 2^60, -2^30, -2^60}, read time. In RV32, this also involves htimedeltah and timeh. Note: do not check time directly against reference model, which might tick differently. Only look at the range of values. |
0: 0 < time < 2^30 |
5 |
|||
NOTE: xcounteren are WARL and some bits could be read-only zero. Currently, the coverpoints won’t be hit. What should we do about this? |
|||||||
* move everything related to htimedelta from ZicsrH to here |
|||||||
|
ZicntrH exercises hcounteren for all 32 counters, so no separate ZihpmH suite is needed. |
B.9.8. 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.9.9. SvH Hypervisor 2-Stage Virtual Memory
| Coverpoint | Goal | Feature Description | Expectation | Bins | ID | Normative Rule | Notes |
|---|---|---|---|---|---|---|---|
note that BARE-only implementations would likely make whole of satp read only 0 |
This test plan verifies functional behavior of RISC-V Hypervisor extension features, including memory translation across privilege modes, page fault handling, permission enforcement, and legal instruction execution in virtual environments. It includes both synchronous and asynchronous exception tests, and exercises fields like SPVP, HU, SUM, MPRV, and MXR under a variety of mode settings (M, HS, VS, VU). The plan ensures coverage of MMU, privilege enforcement, access faults, and instruction legality across different translation stages and address spaces. |
||||||
cp_vsatp_mode_field |
supported/unsupported MODE encodings |
RV64 Only: |
write to vsatp 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. |
{16 x} * 2 starting modes |
vsatp_mode_unsupported_v0_param |
reviewed: y |
|
cp_satp_mode_field |
supported/unsupported MODE encodings |
RV64 Only: |
write to satp with an unsupported MODE value is ignored, so the old value is preserved |
{16 x} * 2 starting modes |
vsatp_mode_unsupported_v1 |
reviewed: y |
|
cp_vsatp_ppn_field |
programmability of PPN field |
Environment: in HS mode, Set vsatp.MODE = Sv32 or Sv39. |
PPN field retains patterns (at least for legal PPNs). |
{0s,1s,22 or 44 PPN walknig 1s} |
vsatp-ppn_sz_param |
reviewed: y |
|
cp_vsatp_asidlen_detect |
implemented ASID length |
Environment: Set vsatp.MODE vsatp.MODE Sv32 or Sv39. |
Only implemented bits writable; readback equals ASIDLEN. |
1 |
vsatp-asidlen |
reviewed: y |
|
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, page table with no read/write permission. |
Data accesses translated via VS page tables, causing fault; instructions bypass and don’t fault. |
{read,write} × {MPP=S,U} |
mstatus_mprv_hypervisor, add tag to machine.adoc Instruction address-translation and protection are unaffected by the |
reviewed: y |
|
cp_vsatp_sum_effects |
SUM=0 restriction and SUM=1 behavior |
Environment: Valid PTE.U=1. Set vsstatus.SUM={0,1}, mode=VS. |
Page fault raised for all access types for SUM=0. Read/write succeed; exec raises page fault for SUM=1. |
{read,write,exec}x{SUM=0,1} |
norm:H_vscsrs_sub, add tag to supervisor instruction.adoc related to status.SUM & PTE.U |
reviewed: y |
|
vsatp_sum_set |
SUM=1 behavior |
Environment: Valid PTE.U=1. Set vsstatus.SUM=1, mode=VS. |
Read/write succeed; exec raises page fault. |
{read,write,exec} |
H_vscsrs_sub, add tag to supervisor instruction.adoc related to status.SUM & PTE.U |
reviewed: y |
|
cp_vsatp_endianess |
SBE endianness |
Environment: In VS mode, Set vsatp.MODE={Sv32 or Sv39}. Enable PTE perms. |
RW succeeds; endian swap affects data ordering. |
{SBE=0,SBE=1} × {read,write} |
hstatus-vsbe_op |
reviewed: y |
|
cp_vsatp_pte_rsw |
reserved RSW bits ignored |
Environment: Construct valid PTE with RSW set to {00,01,10,11}. |
RSW reads as written |
{00,01,10,11} |
H_vscsrs_sub, add tag to the supervisor instruction.adoc related to RSW set of PTE |
reviewed: y |
|
cp_vsatp_invalid_pte |
invalid PTE behavior |
Environment: PTE.V=0, vsatp.MODE={Sv32 orSv39}. |
Page fault on all access types. |
{read,write,exec} |
H_vscsrs_sub, add tag to the supervisor instruction.adoc related to PTE.V |
reviewed: y |
|
cp_vsatp_nonleaf_lvl0 |
non-leaf L0 PTE fault |
Environment: PTE at L0 with RWX=0. |
Page fault. |
{read,write,exec} |
H_vscsrs_sub, add tag to the supervisor instruction.adoc related to non-leaf L0 PTE |
reviewed: y |
|
cp_vsatp_spages_sum |
RWX on VS-mode pages, vsstaus.SUM=0 |
Environment: PTE.U=0. vsstatus.SUM=0. RWX = {001, 011, 100, 101, 111} vsatp.MODE={Sv32 orSv39} |
Allowed if perms; else page fault. |
{read,write,exec} * 5 RWX |
H_vscsrs_sub, add tag to supervisor instruction.adoc related to status.SUM & PTE.U |
reviewed: y |
|
cp_vsstatus_mxr_sum |
MXR=0 on exec-only page |
Environment: RWX = {001, 111} PTE.U = {0/1}. vsatp.MODE={Sv32 or Sv39}. |
Depends on case |
{read, write, exec} * 2 RWX * 2 U * 2 SUM * 2 MXR * 2 modes |
vsstatus-mxr_vm |
vsstatus_mxr_vm |
reviewed: y |
cp_vsatp_svpbmt |
SVpbmt extension |
Environment: If RV64 & !SVPBMT_SUPPORTED, PTE[62:61] = {0…3} |
Page fault if nonzero, else normal. |
{read,write,exec} * 4 PTE[62:61] |
reviewed: y |
||
cp_vsatp_reserved_fields |
reserved PTE bits |
Environment: RV64 & PTE[60:54]: Walking 1s, all 1s, all 0s |
Page fault if nonzero, else normal. |
{read,write,exec} * 9 values |
H_vscsrs_sub, add tag to the supervisor instruction.adoc related to RSW set of PTE |
reviewed: y |
|
cp_hgatp_mode_field |
supported/unsupported MODE encodings for hgatp |
"RV64 Only: |
Supported MODEs accepted and retained; unsupported encodings get WARL handling (fields may be masked/unchanged). |
2^4 |
hgatp-mode_warl |
reviewed: y |
|
cp_hgatp_ppn_field |
programmability of PPN in hgatp |
Environment: hgatp.MODE != Sv39x4 or Sv32x4. |
PPN retains written pattern within WARL constraints; PPN[1:0]=0 in paged modes. |
2 + 44 (RV64) or |
hgatp-ppn_op |
reviewed: y |
|
cp_hgatp_vmidlen_detect |
implemented VMIDLEN via hgatp.VMID |
Environment: Set hgatp.MODE Sv32x4 or Sv39x4. |
Only implemented bits writable |
{RV32: 7, RV64:14} |
hgatp-vmid_param |
reviewed: y |
|
cp_hgatp_tvm_effects |
TVM gating on hgatp |
Environment: Set mstatus.TVM={0,1} in HS. |
Access to hgatp from HS cause illegal-instruction trap when TVM=1. |
{TVM=0,1} |
hgatp_tvm_illegal |
reviewed: y |
|
cp_hgatp_mprv_effects |
MPRV behavior when G-stage present |
Environment: While in M-mode, set MPRV={0/1}, mstatus.MPP/MPV={M, HS, VS, U, VU}, hgatp.MODE = Sv32x4 or Sv39x4, identity page table with no read/write permission. |
When MPRV=1 and MPV=1, data accesses via basic load/store instructions translated via HS page tables, causing fault; instructions bypass and don’t fault, HLV/HSV don’t fault. When MPRV=0 or MPV=0, no faults. |
2 MPRV x 5 MPP/MPV x {lw,sw, hlv.w, hsv.w} |
mstatus_mprv_hypervisor |
reviewed: y |
|
cp_hgatp_gpa_width_checks |
guest-physical address width limits |
RV64 Only |
Sv39x4: guest page fault if GPA bits 63:41 are nonzero. |
up to 3 modes x (63-37) bits GPA |
H_vm_gpatrans |
reviewed: y |
|
cp_hgatp_perm_checks |
G-stage permissions enforcement |
Environment: Create G-stage PTEs with URWX = {0111, 1111, 0000, 1000}. |
Access blocked if G-stage denies; guest page fault raised with appropriate cause. |
2 modes * 4 URWX combinations |
H_vm_gpatrans |
reviewed: y |
|
cp_hgatp_pte_g_bit |
PTE.G bit is reserved in G-stage PTEs |
Environment: Set G-stage PTE.G i(bit not used by Sv*x4). |
Normal. |
{read,write,exec} |
H_vm_gpa_g |
reviewed: y |
|
cp_hgatp_svpbmt |
Svpbmt extension in G-stage |
Environment: If RV64 & !SVPBMT_SUPPORTED, G-stage PTE[62:61] = {0…3} |
Guest page fault if nonzero, else normal. |
{read,write,exec} * 4 PTE[62:61] |
* US add rule |
reviewed: y |
|
cp_hgatp_reserved_fields |
reserved PTE bits in G-stage |
Environment: RV64 & G-stage PTE[60:54]: Walking 1s, all 1s, all 0s |
Guest page fault if nonzero, else normal. |
{read,write,exec} * 9 values |
H_vm_gpatrans, add tag to the supervisor instruction.ado related to PTE.RSV bits |
reviewed: y |
|
cp_hgatp_pte_rsw |
reserved RSW bits ignored |
Environment: Construct valid G-stage PTE with RSW set to {00,01,10,11}. |
Normal. |
{read,write,exec} * 4 PTE[9:8] |
H_vm_gpatrans, add tag to the supervisor instruction.adoc related to RSW set of PTE |
reviewed: y |
|
cp_hgatp_invalid_pte |
invalid PTE behavior |
Environment: G-stage PTE.V=0, hgatp.MODE={Sv32x4 or Sv39x4}. |
Guest page fault on all access types. |
{read,write,exec} |
H_vm_gpatrans, add tag to the supervisor instruction.adoc related to PTE.V |
reviewed: y |
|
cp_hgatp_nonleaf_lvl0 |
non-leaf L0 PTE fault |
Environment: PTE at L0 with RWX=0. |
Guest page fault. |
{read,write,exec} |
H_vm_gpatrans, add tag to the supervisor instruction.adoc related to non-leaf L0 PTE |
reviewed: y |
|
hgatp_misaligned_superpage |
misaligned superpage detection in G-stage |
Environment: Create G-stage superpage PTE with PPN low bits != 0 at given level. |
Page fault raised for misaligned superpage. |
{level-specific tests per mode} |
H_vm_gpatrans, add tag to the supervisor instruction.adoc related to misaligned superpage |
reviewed: y |
|
cp_hgatp_vmid_scoping |
implemented VMID length |
Environment: Set hgatp.MODE to Sv32 or Sv39. |
Only implemented bits writable; readback equals VMIDLEN. |
1 |
hgatp-vmid_param |
reviewed: y |
|
hgatp_root_table_alignment_and_size |
Validate root page table expansion and alignment for G-stage translation in Sv{32,39,48,57}x4 modes |
Environment: Set hgatp.MODE = {Sv32x4 or Sv39x4}. Configure G-stage root page table at both {4 KiB-,16 KiB-}aligned addresses. |
When root page table is not 16 KiB aligned, translation fails with guest page fault. |
{mode = 1 for HXLEN=32, 3 for HXLEN=64} × {4KiB aligned, 16 KiB aligned} |
hgatp-mode_x4, hgatp-mode_sv32x4, hgatp-mode_sv39x4, hgatp-mode_sv48x4, hgatp-mode_sv57x4 |
reviewed: y |
|
cp_hgatp_u_mode_access |
Verify that all G-stage memory accesses are treated as U-mode accesses, including those made from VS-mode |
Environment: In HS-mode, Configure G-stage page tables, Mark a G-stage PTE with U=0 (not user-accessible). Set vsatp=BARE. |
Since G-stage accesses are treated as U-mode, a guest-page fault should occur due to lack of user access permission, even though access was from VS-mode. |
{access_type = inst_fetch, load, store} × {U-bit = 0, 1} |
H_vm_gpapriv |
reviewed: y |
|
cp_hgatp_adbit_behavior |
Verify that A/D bits in G-stage PTEs are updated for implicit page table accesses (not the original access type) |
Environment: Configure a G-stage PTE with A=0, D=0. Configure VS-stage PTE with A=D={00, 11}. Do a sfence.vma to clear the TLB. |
If Svade is supported and menvcfg.adue = 1, then the G-stage PTE should set A=1 because it is implicitly accessed. If the VS-stage PTE had A=D=00, then those bits are set to 1, which causes an implicit write, which sets D=1 in the G-stage PTE. |
{implicit_access = read, write} × {A/D bits before/after} |
H_vm_gpapriv |
reviewed: y |
|
hgatp_exception_reporting |
Verify that G-stage page faults are reported with respect to the original access type |
Environment: Configure G-stage PTEs to deny R/W/X permissions. Perform VS-stage instruction fetch, load, and store operations that trigger G-stage translation faults. |
Even though all G-stage accesses are treated as U-mode, the trap cause (e.g., instruction guest page fault, load guest page fault, store/AMO guest page fault) must match the original access type. |
{access_type = inst_fetch, load, store} × {permission_fault} |
H_vm_gpapriv |
||
cp_vsatp_perm_checks |
VS-stage permissions enforcement |
Environment: Create VS-stage PTEs with URWX = {0111, 1111, 0000, 1000}. |
Access blocked if VS-stage denies; page fault raised with appropriate cause. |
2 modes * 4 URWX combinations |
reviewed: y |
||
two_stage_read |
Verify two-stage read translation (GVA to GPA to SPA) across all page sizes |
Environment: In M-mode, initialize a known pattern in memory at a physical address (PA). Configure vsatp.MODE = {Sv32 or Sv39} with a non-identity VS page table mapping guest virtual addresses (GVAs) to guest physical addresses (GPAs), Configure hgatp.MODE = {Sv32x4 or Sv39x4} with a non-identity G-stage page table mapping GPAs to system physical addresses (SPAs). Ensure all PTEs are valid, readable. G stage accessible in U-mode and VS-stage accessible in S-mode. |
The read value at GVA in VS-mode must match the initialized PA value in M-mode after GVA→GPA→SPA translation. No page faults or access faults should occur. |
3 VS-stage pages sizes x 3 G-stage page sizes |
hgatp-mode_x4, hgatp-mode_sv32x4, hgatp-mode_sv39x4, hgatp-mode_sv48x4, hgatp-mode_sv57x4 |
||
two_stage_write |
Verify two-stage write translation and data propagation through both stages |
Environment: Same VS and G-stage mappings as the read test. Ensure G-stage and VS-stage PTEs are writable. G stage accessible in U-mode and VS-stage accessible in S-mode. |
The data written in VS-mode must be visible when read from the same SPA in M-mode. No faults or misaligned accesses should occur. |
3 VS-stage pages sizes x 3 G-stage page sizes |
hgatp-mode_x4, hgatp-mode_sv32x4, hgatp-mode_sv39x4, hgatp-mode_sv48x4, hgatp-mode_sv57x4 |
||
two_stage_ifetch |
Verify instruction fetch through two-stage translation (GVA, GPA, SPA) and interplay with MXR and X-permissions |
Environment: Setup executable code region at a known PA. Configure VS-stage page table with executable PTE mapping GVA to GPA. Configure G-stage page table mapping GPA to SPA with executable permission. Also create variations where VS or G-stage PTEs have only R=1, X=0 to test MXR behavior. G stage accessible in U-mode and VS-stage accessible in S-mode. Repeat for different page sizes. |
Instruction fetch should succeed only when both VS and G-stage PTEs permit execute or when MXR allows read-as-execute. If either stage denies execute, a guest instruction page fault should occur. |
3 VS-satge page sizes x 3 G-stage page sizes x (1 executable + 2 mstatus.MXR x 2 hstatus.MXR) x (2 VS-stage X vs R) x (2 G-stage X vs R) = 180 |
hgatp-mode_x4, hgatp-mode_sv32x4, hgatp-mode_sv39x4, hgatp-mode_sv48x4, hgatp-mode_sv57x4 |
||
stage_both_bare |
Validate direct VA to SPA mapping when both stages are Bare |
Environment: Set vsatp.MODE = Bare and hgatp.MODE = Bare. Disable all address translation stages. |
VA must be treated as SPA directly with no translation applied. No page walks or faults must occur. |
{vsatp.MODE = Bare, hgatp.MODE = Bare} |
hgatp-mode_x4, hgatp-mode_sv32x4, hgatp-mode_sv39x4, hgatp-mode_sv48x4, hgatp-mode_sv57x4 |
||
* |
With virtualization enabled and two-stage translation active (hgatp.MODE = Sv32x4/Sv39x4), current privilege is {HS/VS/U/VU}. Suitable VS and G-Stage page tables with all combinations of {RWX = 111/000 and U = 1/0}. Perform read, write, execute. |
* |
3 Access types * 4 priv modes * 2 SUM x 4 VS permissions x 4 G permissions = 384 |
||||
mprv_sum_effect_hs_two_stage |
effect of mstatus.MPRV with MPP=HS on accesses to user pages (two-stage on) |
With virtualization enabled and two-stage translation active (hgatp.MODE = Sv32x4/Sv39x4), set mstatus.MPRV=1, mstatus.{MPP,MPV}={M, HS, VS, U, VU}, current privilege is M. Suitable VS and G-Stage page tables with all combinations of {RWX = 111/000 and U = 1/0}. Perform read, write, execute. |
For data accesses: when sstatus.SUM=0, HS data access to a U page must fault with page fault of the corresponding type (load page fault for load; store/AMO page fault for store). When sstatus.SUM=1, data access succeeds subject to normal PTE permissions. Instruction fetch is unaffected by MPRV/SUM (fetch uses current mode translation); executing test code does not require setting guest code PTEs. Trap PC (mepc) points to faulting instruction; cause (mcause) matches access type. ***update |
3 Access type × 5 MPP/MPV × 2 SUM × 4 VS permissions x 4 G-stage permissions = 480 |
H_vm_gpatrans |
||
VM_permission_invalid |
that invalid permission in a guest PTE (pte.V=0) during 2-stage translation triggers correct page fault exceptions for instruction fetch, load, and store/AMO accesses across privilege modes.* update |
With two-stage transnslation active, in each of {HS, VS, U, VU}, with each pages size {kilo/mega/giga} in VS and G stages, with leaf page V={0/1} in each stage, perform {read/write/execute}. |
The following guest page faults must be raised depending on access type: - Instruction page fault for execute. - Load page fault for read. - Store/AMO page fault for write. Trap information: mtval must contain the faulting guest virtual address; scause must report the correct exception cause. ***update |
4 Privilege Mode × 3 Access Type × 2 HS-stage valid x 2 VS-stage valid x 3 VS page sizes x 3 G page sizes = 432 |
H_vm_gpatrans |
||
RWX access on Umode pages in Umode |
RWX access permissions when U=1 in user mode across both guest (Stage-1) and host (Stage-2) translations. |
Stage-1 (Guest PTEs):• If PTE.U=1, user mode can access the page.• Access type must match granted permissions (R, W, X).• If disallowed, raise a Stage-1 page fault:– Instruction page fault (exec)– Load page fault (read)– Store/AMO page fault (write).• Valid for leaf PTEs at all levels (L0–L3 depending on satp.mode).• Test with both granted and denied RWX combinations. |
• Access succeeds if Stage-1 PTE grants permission and the U=1 condition matches user mode.• Faults raised if permission bit is 0.• m/scause = page fault exception according to access type.• m/sepc = virtual address of trapping instruction. |
RWX bins (for each stage):1. Read allowed (R=1), denied (R=0).2. Write allowed (W=1 & R=1), denied (W=0).3. Exec allowed (X=1), denied (X=0).4. Combinations where Stage-1 allows but Stage-2 denies (mismatched permissions).5. Different satp.modes (sv32, sv39, sv48, sv57).6. Faults at leaf level with higher levels cleared except V=1. |
|||
PTE with only X=1 and MXR=0, VS-stage, HS-mode |
enforcement of MXR=0 across all relevant privilege modes. |
Verifies that supervisor attempts to read from execute-only page cause load page fault at VS-stage translation |
Load page fault must be raised m/scause = Load Page Fault m/sepc = faulting VA instruction |
||||
PTE with only X=1 and MXR=0, VS-stage, VS-mode |
fault is correctly raised at all valid page table levels. |
Verifies same behavior when VS-mode accesses VS-stage translation |
Load page fault expected at VS-stage Trap visible in HS as virtual instruction trap |
||||
Execute-only PTE read access with MXR=0, VU-stage, VS-mode |
Ensure exception behavior is consistent across all supported virtual memory configurations. |
Ensures guest user access follows VS-stage semantics |
Load page fault raised at VS-stage Propagates to HS |
Read (should fault) |
|||
Second stage translation of GPA with execute-only mapping and MXR=0, HS-mode, G-stage |
Confirm that read attempts raise an exception while execute works fine. |
Ensures G-stage honors MXR restrictions when translating GPAs for HS-mode |
Load page fault raised at G-stage Trap in HS with correct mcause |
PTE.U=0 with access from Supervisor/HS/VS |
|||
* hgatp misaligned super pages and 16KB (US) |
|||||||
* tests exercising successful translation with any bits of the GPA (including 33:32 for Sv32x4) |
|||||||
* need some tests involving translation through both G and VS-stage |
|||||||
* tests with cross-product of either G or VS denying |
|||||||
* add cases exercising SV48 and SV57 |
|||||||
* add case of access from M-mode with MPRV=0 doing no translation |
|||||||
B.9.10. SvHZicbo Hypervisor VirtMem + Cache Block Operations
-
also includes hypervisor instructions, CSRs related to hypervisor
| Coverpoint | Goal | Feature Description | Expectation | Bins |
|---|---|---|---|---|
Be sure hgatp WARL fields are exercised in VM tests. |
||||
vs_invalid_pte_cbo |
Verify CBO faulting when VS-stage PTE.V=0 |
Environment: vsatp.mode={Sv32,Sv39,Sv48,Sv57}, PMP permits SPA. |
Store/AMO page fault at VS-stage. |
satp.mode × {VS,VU} |
g_invalid_pte_cbo |
Verify CBO faulting when G-stage PTE.V=0 |
Environment: Valid VS mapping, invalid G PTE.V=0. |
Store/AMO page fault at G-stage. |
hgatp.mode × {VS,VU} |
reserved_rwx_vs |
Detect reserved RWX encoding at VS-stage |
Env: Leaf PTE with W=1,R=0. |
Page fault at VS-stage. |
{VS,VU} × Levels |
reserved_rwx_g |
Detect reserved RWX encoding at G-stage |
Env: Leaf G PTE with W=1,R=0. |
Page fault at G-stage. |
{VS,VU} × Levels |
nonleaf_vs |
Detect CBO on VS non-leaf PTE at L0 |
Env: Level0 PTE with RWX=0. |
Page fault. |
{VS,VU} × satp.mode |
nonleaf_g |
Detect CBO on G non-leaf PTE at L0 |
Env: G-stage level0 PTE with RWX=0. |
Page fault. |
{VS,VU} × hgatp.mode |
sum_effect_vs |
Verify SUM effects in VS-stage |
Env: PTE.U=1, SUM={0,1}. |
SUM=0 → page fault; SUM=1 → no fault. |
SUM={0,1} |
hu_effect_cbo |
Verify hstatus.HU allows U-mode CBO |
Env: hstatus.HU={0,1}. |
HU=1 → CBO permitted; HU=0 → illegal. |
HU={0,1} |
vs_access_bit |
Verify PTE.A handling in VS-stage for CBO |
Env: Leaf VS PTE.A=0. sfence.vma before. |
Page fault if Svade implemented. |
{VS,VU} × satp.mode |
g_access_bit |
Verify PTE.A handling in G-stage for CBO |
Env: Leaf G PTE.A=0. |
Page fault if Svade implemented. |
hgatp.mode |
vs_dirty_bit |
Verify PTE.D handling in VS-stage for CBO |
Env: Leaf VS PTE.D=0. |
No fault; CBO succeeds. |
{VS,VU} |
g_dirty_bit |
Verify PTE.D handling in G-stage for CBO |
Env: Leaf G PTE.D=0. |
No fault; CBO succeeds. |
hgatp.mode |
misaligned_superpage_vs |
Detect misaligned VS superpage with CBO |
Env: Leaf VS PTE with misaligned PPN. |
Page fault. |
{levels L1–L4} |
misaligned_superpage_g |
Detect misaligned G superpage with CBO |
Env: Leaf G PTE with misaligned PPN. |
Page fault. |
{levels L1–L4} |
leaf_invalid_pa_vs |
Detect invalid PA in VS PTE |
Env: VS leaf points to non-existent GPA. |
Store access fault. |
{VS,VU} |
leaf_invalid_pa_g |
Detect invalid PA in G PTE |
Env: G leaf points to non-existent SPA. |
Store access fault. |
hgatp.mode |
nonleaf_invalid_pa_vs |
Detect invalid PA in VS non-leaf |
Env: Non-leaf VS PTE invalid pointer. |
Store access fault. |
satp.mode |
nonleaf_invalid_pa_g |
Detect invalid PA in G non-leaf |
Env: Non-leaf G PTE invalid pointer. |
Store access fault. |
hgatp.mode |
dau_bits_vs |
Verify DAU bits set in VS non-leaf PTE |
Env: Non-leaf VS PTE with D/A/U set. |
Store/AMO page fault. |
{D,A,U} |
dau_bits_g |
Verify DAU bits set in G non-leaf PTE |
Env: Non-leaf G PTE with D/A/U set. |
Store/AMO page fault. |
{D,A,U} |
aliasing_vs_g |
Check aliasing across 2-stage |
Env: Map two GVAs to same SPA via VS+G. |
Both aliases affected. |
{cbo.clean,cbo.flush,cbo.inval} |
hfence_interaction |
Verify HFENCE with CBO |
Env: Modify VS/G tables; omit/insert HFENCE.VVMA/GVMA. |
Without HFENCE, stale ops; with HFENCE, correct. |
{with fence, without fence} |
vmid_reuse_cbo |
Check VMID reuse without flush |
Env: Run CBO under VMID1, reuse VMID for new mappings. |
Without HFENCE, stale; with HFENCE, correct. |
{reuse, fresh} |
pmp_deny_spa |
PMP denies SPA for CBO |
Env: GPA valid, but PMP denies SPA. |
Store access fault. |
PMP deny bit |
B.9.11. 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 |
Write a 0 and a -1 to hcounteren. |
0 writes 32 bits of 0 |
2 |
Shcounterenw_hpmcounter_hcounteren |
check that hcounteren works with mcounteren and scounteren to control access to counters from lower privilege modes. |
|||||
B.9.12. Shvsatpa Virtual Memory Modes Supported
| Coverpoint | Goal | Feature Description | Expectation | Bins | Normative Rule |
|---|---|---|---|---|---|
Following tests are done in M-mode |
|||||
cp_shvsatpa |
Check all values writable to vsatp.mode |
RV32: write vsatp.mode = 0/1 |
Matches reference model, which should accept same values as satp.mode |
2 or 4 |
Shvsatpa_satp_vsatp_modes |
B.9.13. Shgatpa Virtual Memory x4 Modes Supported
| Coverpoint | Goal | Feature Description | Expectation | Bins | Normative Rule |
|---|---|---|---|---|---|
Following tests are done in M-mode |
|||||
cp_shgatpa |
Check all values writable to hgatp.mode |
RV32: write hgatp.mode = 0/1 |
Matches reference model, which should accept same values as satp.mode |
2 or 4 |
Shgatpa_satp_hgatp_mode_support |
B.9.14. Shvstvecd VS-Mode Direct Vectors
| Coverpoint | Goal | Feature Description | Expectation | Bins | Normative Rule |
|---|---|---|---|---|---|
Following tests are done in M-mode |
|||||
cp_shvstvecd |
Check vstvec.MODE can be 0 and when it is, vstvec.base can hold valid 4-byte aligned addresses |
Write vstvec = RAM_BASE_ADDR, RAM_BASE_ADDR+4 |
vstvec gets value written |
2 |
Shvstvecd_vstvec_mode_direct |
B.9.15. Shvstvala VS-Mode Trap Address
Following tests are done in from VU-mode and VS-mode into VS-mode
| Coverpoint | Goal | Feature Description | Expectation | Bins | Normative Rule | Notes |
|---|---|---|---|---|---|---|
Initialize vstval to some random value before each test |
||||||
cp_load_page_fault |
Fault writes VA to vstval |
Load from bad page |
vstval written with VA |
2 |
Shvstvala_vstval_written |
|
cp_store_page_fault |
Fault writes VA to vstval |
Store to bad page |
vstval written with VA |
2 |
||
cp_instr_page_fault |
Fault writes VA to vstval |
Fetch from bad page |
vstval written with VA |
2 |
||
cp_load_access_fault |
Fault writes VA to vstval |
Load from ACCESS_FAULT_ADDRESS+4 |
vstval written with VA |
2 |
don’t use ACCESS_FAULT_ADDR because it is probably 0 and doesn’t prove hvstval is writable |
|
cp_store_access_fault |
Fault writes VA to vstval |
Store to ACCESS_FAULT_ADDRESS+4 |
vstval written with VA |
2 |
||
cp_instr_access_fault |
Fault writes VA to vstval |
Fetch from ACCESS_FAULT_ADDRESS+4 |
vstval written with VA |
2 |
||
cp_misaligned_load |
Fault writes VA to vstval |
lw from scratch+2 |
no fault, or vstval written with VA |
2 |
No fault when misaligned load/store supported (e.g. Zicclsm) |
|
cp_misaligned_store |
Fault writes VA to vstval |
sw to scratch+2. Scratch should be 8 bytes |
no fault, or vstval written with VA |
2 |
No fault when misaligned load/store supported (e.g. Zicclsm) |
|
cp_misaligned_instr |
Fault writes VA to vstval |
fetch ret from scratch+2. |
no fault, or vstval written with VA |
2 |
No fault when Zca is supported |
|
cp_virt_instr |
Fault writes instr to vstval |
Cause virtual instruction fault |
vstval written with instr |
2 |
||
cp_illegal_instr |
Fault writes instr to vstval |
Cause illegal instruction fault |
vstval written with instr |
2 |
||
Note that debug breakpoint vstval is checked in Sdtrig ***confirm when written |
||||||
B.9.16. Shtvala HS-Mode Trap Address
Following tests are done in from VU and VS-modes into HS-mode
| Coverpoint | Goal | Feature Description | Expectation | Bins | Normative Rule |
|---|---|---|---|---|---|
Initialize htval to some random value before each test |
|||||
cp_load_guest_page_fault |
Fault writes GPA >> 2 to htval |
Cause load guest-page fault |
htval written with GPA |
1 |
Shtvala_htval_faulting_gpa |
cp_store_guest_page_fault |
Fault writes GPA >> 2 to htval |
Cause store guest-page fault |
htval written with GPA |
1 |
|
cp_instr_guest_page_fault |
Fault writes GPA >> 2 to htval |
Cause fetch guest-page fault |
htval written with GPA |
1 |
|
B.9.17. Shlcofideleg Hypervisor Counter Overflow Delegation
Develop this after baseline overflow delegation tests
B.9.18. ZkrH Hypervisor Entropy Register
Develop this after baseline entropy CSR tests focus on registers being accessible
B.9.19. SstcH Hypervisor Timer Compare
| 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 = {0/1}, hvip.VSTIP = {0/1}, htimedelta = 0, vstimecmp = {0, 2^30}. Check hip.VSTIP. For RV32, htimedeltah and vstimecmph = 0. Note that this assumes 0 < time << 2^29 when the test is run. |
If both STCE = 1 and vstimecmp = 0, hip.VSTIP = 1. Else hip.VSTIP = hvip.VSTIP. |
||
cp_htimedelta |
htimedelta affects vstimecmp |
menvcfg.STCE = 1, henvcfg.STCE = 1, hvip.VSTIP = 0, htimedelta = {0, 2^30, 2^60, 2^-30, 2^-60}, vstimecmp = {0, 2^29, 2^31, 2^61, -2^29, -2^31, -2^61}. Check hip.VSTIP. For RV32, htimedletah and vstimecmph are involved. |
hip.VSTIP = (htimedelta >= 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 |
success |
2 mSTCE *2 hSTCE * 2 mTM * 2hTM * up to 2 regs |
|
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 |
|
In HS-Mode |
|||||
cp_walk_vstimecmp |
SSTC CSRs accessible |
Walking 1s and 0s in vstimecmp. Also vstimecmph for RV32. |
Writable |
64 |
|
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 |
2 mSTCE *2 hSTCE * 2 mTM * 2hTM * up to 2 regs |
|
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 |
|
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 |
trap 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 |
2 mSTCE *2 hSTCE * 2 mTM * 2hTM * up to 2 regs |
stce_bit_exist |
cp_vs_stimecmp_accesses |
All types of access |
Put random value in stimecmp/h 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. Check from M-mode that these are reflected in vstimecmp/vstimecmph but not stimecmp/h. |
Changes should show up in vstimecmp/h |
5 accesses * up to 2 regs |
|
cp_vs_vstimecmp_inaccessible |
With menvcfg.STCE=1, henvcft.STCE=1, mcounteren.TM = 1, hcounteren.TM = 1, read vstimecmp. For RV32, also vstimecmph |
Illegal instruction trap |
2 |
||
In VU-Mode |
|||||
cp_vu_timecmp_inaccessible |
With menvcfg.STCE=1, henvcfg.STCE=1, mcounteren.TM = 1, hcounteren.TM = 1, read stimecmp, vstimecmp. For RV32, also stimecmph, vstimecmph |
Illegal instruction trap |
4 |
||
In U-Mode |
|||||
cp_u_timecmp_inaccessible |
With menvcfg.STCE=1, henvcft.STCE=1, mcounteren.TM = 1, hcounteren.TM = 1, read stimecmp, vstimecmp. For RV32, also stimecmph, vstimecmph |
Illegal instruction trap |
4 |
||
B.9.20. SsstateenH Hypervisor State Enable
Develop this after baseline state enable tests
B.9.21. SscrindH Hypervisor Indirect CSR Access
Hypervisor indirect CSR access.
Develop this after baseline indirect CSR tests
B.9.22. SscfgH Hypervisor Counter Delegation
Develop this after baseline Sscfg tests
B.9.23. SmctrH Hypervisor Control Transfer Records
Develop this after baseline control transfer record tests
B.9.24. SvinvalH Hypervisor Memory Management Table Invalidation
| Coverpoint | Goal | Feature Description | Expectation | Bins | Normative Rule |
|---|---|---|---|---|---|
cr_svinivalH |
Svinval instructions trap appropriately. |
Test all Svinval instructions { sfence.w.inval, sfence.inval.ir, sinval.vma, hinval.vvma, hinval.gvma} in each privilege mode {M/HS/VS/U/VU} with TVM = {0/1} and VTVM = {0/1} |
Instruction executes or throws illegal instruction trap. Doesn’t try to check that anything is actually invalidated. |
5 instructions x 5 privilege modes x 2 TVM * 2 VTVM |
Svinval_hinval_vvma_gvma |
B.9.25. SvaduH Hypervisor Hardware Page Table A/D Updates
| Coverpoint | Goal | Feature Description | Expectation | Bins |
|---|---|---|---|---|
Develop as part of virtual memory |
||||
vsatp_svadu |
Verify SVADU |
Environment: If unsupported, menvcfg.ADUE must=0. |
Always 0 if not implemented. |
— |
B.9.26. ZicfilpH Hypervisor Landing Pads
| Coverpoint | Goal | Feature Description | Expectation | Bins | ID | Normative Rule |
|---|---|---|---|---|---|---|
General Test Environment: |
||||||
cp_elp_state_preservation_zicflip_vs |
Verify trap in VS-mode saves and restores previous ELP via vsstatus.VSPELP |
Test Environment: |
Trap delivered to VS-mode, vsstatus.VSPELP stores previous ELP value, after executing VSRET, ELP is restored to LP_EXPECTED |
Origin mode (VS-mode) × Trap target (VS-mode) × ELP state |
sstatus-spelp_op |
[norm:sstatus-spelp_op] |
B.9.27. ZicfissH 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_Zicfilp menvcfg_sse_op_list |
[norm:henvcfg_sse_op] [norm:senvcfg_sse_Zicfilp] [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_Zicfilp |
[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_Zicfilp] |
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_op1 |
[norm:sspop_exception] [norm:mtval_swchk_lead-in] [norm:mtval_swchk_list] [norm:hedeleg_op] [norm:medeleg_mideleg_op1] |
(reused) ZicfissU instruction coverpoints, re-run from VS-mode and VU-mode |
Re-run the ZicfissU coverpoints with the hart in VS/VU instead of U |
BOOKKEEPING ROW, not a new coverpoint. These 14 ZicfissU 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. |
|||||
B.9.28. SsdbltrpH Hypervisor Double Trap
-
develop after Ssdbltrp
B.9.29. SsnpmH Hypervisor Pointer Masking
Develop this after baseline pointer masking tests
B.9.30. SmnpmH Hypervisor Pointer Masking
Develop this after baseline pointer masking tests
B.10. Vector Privileged Test Suites
All of the vector privileged suites are collected in this section. The machine-mode vector CSR tests, Sm_V and Sm_VF, are part of the Sm suite and its test plan.
B.10.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.10.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 |
|
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.10.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 |
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.10.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.10.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.6. UV
User-mode access to vector CSRs.
| Coverpoint | Goal | Feature Description | Expectation |
|---|---|---|---|
cp_vucsrwalk |
CSR access |
Set and clear each bit of each writable CSR to exercise bitfields: vxrm, vxsat, vcsr. vstart |
|
cp_vucsraccess |
CSR access |
csr read, write all 1s, write all 0s, set all 1s, clear all 1s, write back initial value of each register: vxrm, vxsat, vcsr, vstart, vtype, vlenb, vl |
vtype, vlenb, vl are read-only and will throw illegal instruction if written |
See also Sm_V in Vector spreadsheet |
|||
Attempt these tests in user mode unless otherwise specified |
|||
No normative rules found for this section.
UDB Parameters: None.
B.11. Miscellaneous RV23 Privileged Extensions
B.11.1. Sscofpmf Counter filtering
| Coverpoint | Goal | Feature Description | Expectation | Bins | Normative Rule |
|---|---|---|---|---|---|
To test Sscofpf, the user must give values to the following RVMODEL macros. If any are undefined and SSCOFPMF_SUPPORTED, error. |
|||||
RVMODEL_MHPMCOUNTER |
Name of a hpmcounter CSR to test (e.g. mhpmcounter3) |
||||
RVMODEL_MHPMEVENT |
Name of a event CSR to test (e.g. mhpmevent3) |
||||
RVMODEL_MHPMEVENT_VAL |
Value to put in the event CSR to make it count. |
||||
RVMODEL_MHPMEVENT_CODE |
Code that increments the event counter (shouldn’t trash certain registers), should be able to run in all privilege modes |
||||
These values need to be different in sail_macros.h to support how Sail will do this (github.com/riscv/sail-riscv/issues/1733) |
|||||
Only one of the HPM counters is tested because the spec does not require multiple counters supported even when Zihpm is active. |
|||||
Tests are performed in Sm/S/U for SscofpmfSm/S/U suites |
|||||
Use T-SBI calls where necessary to access machine mode CSRs from lower privilege modes. |
|||||
cp_xinh_inhibits_xmode |
xINH bit inhibits counting in {M/S/U}-mode |
For SscofpmfSm/S/U: |
RVMODEL_HPMCOUNTER becomes nonzero iff xinh = 0 |
2^5 combinations |
mhpmevent_inh_op |
cp_of_set_on_overflow |
OF bit is set when hpmcounter |
For SscofpmfSm/S/U: |
OF becomes 1 |
2 OF |
mhpmevent_of_op |
cp_overflow_hw_only |
Counter overflow interrupt triggered by hardware |
For SscofpmfSm/S/U: |
OF stays 0 |
2 modes |
count_overflow_trigger |
cp_lcofip_hw_only |
counter overflow only results form hardware increments of counter registers. |
For SscofpmfSm/S/U: |
mip.LCOFIP remains 0 |
1 |
lcofip_op |
cp_scountovf_shadow |
scountovf shadows OF bits of mhpmenvent3:31 |
For SscofpmfSm/S, if (S_SUPPORTED): |
scountovf should match 1s in OF fields |
31 |
scountovf_op |
cp_scountovf_mcounteren |
scountovf masked by mcounteren |
For SscofpmfSm/S, if (S_SUPPORTED): |
In M-mode, scountovf = value written (except bits 2:0 are always 0) |
3 OF * 31 mcounteren |
scountovf_mmode_read_access |
cp_sscofpmf_access |
Access hpm CSRs |
For SscofpmfSm/S: |
scountovf should trap on write |
5 accesses * 31 CSRs |
scountovf_mmode_read_access |
cp_lcofi_m |
Interrupt pending and enable |
For SscofpmfSm: |
Trap to M mode if enabled and pending |
2 pending * 2 enabled * 2 deleg |
mip_lcofip_mie_lcofie_op |
cp_lcofi_sip_s |
Interrupt from sip.LCOFIP |
For SscofpmfS: |
Trap to S if enabled and pending |
2 pending * 2 enabled |
sip_sie_Sscofpmf |
cp_lcofi_sip_u |
Interrupt from sip.LCOFIP |
For SscofpmfU: |
Trap to S if S_SUPPORTED if enabled and pending |
2 pending * 2 enabled |
sip_sie_Sscofpmf |
cp_lcofip_priority_m |
Priority of LCOFI interrupt |
xinh = 00000 |
Highest priority interrupt fires. LCOFIP only fires if none of the others are pending because it is lowest priority. |
7 interrupts |
intr_m_mode_pri |
| Normative Rule | Rule Text | Coverpoints |
|---|---|---|
mhpmevent_inh_op |
SscofpmfSm_cg/cp_minh_inhibits_mmode, SscofpmfS_cg/cp_sinh_inhibits_smode, SscofpmfU_cg/cp_uinh_inhibits_umode |
|
mhpmevent_of_op |
{SscofpmfSm_cg,SscofpmfS_cg,SscofpmfU_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. |
{SscofpmfSm_cg,SscofpmfS_cg,SscofpmfU_cg}/{cp_of_set_on_overflow} |
hpmcounter_overflow |
{SscofpmfSm_cg,SscofpmfS_cg,SscofpmfU_cg}/{cp_of_set_on_overflow} |
|
count_overflow_interrupt |
{SscofpmfSm_cg,SscofpmfS_cg,SscofpmfU_cg}/{cp_of_set_on_overflow,cp_of_already_set} |
|
count_overflow_trigger |
{SscofpmfSm_cg,SscofpmfS_cg}/{cp_overflow_hw_only, cp_lcofip_hw_only} |
|
scountovf_op |
{SscofpmfSm_cg,SscofpmfS_cg}/{cp_scountovf_shadow} |
|
scountovf_mmode_read_access |
SscofpmfSm_cg/cp_scountovf_mcounteren, SscofpmfSm_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. |
SscofpmfS_cg/cp_scountovf_mcounteren, SscofpmfS_cg/cp_sscofpmf_access |
scountovf_smode_read_access_control |
SscofpmfS_cg/cp_scountovf_mcounteren |
|
mhpmeventh_presence |
The mhpmeventnh CSRs are provided only if the |
SscofpmfSm_cg/cp_sscofpmf_access |
mip_lcofip_mie_lcofie_op |
SscofpmfSm_cg/cp_lcofi_m |
|
mip_lcofip_reflects_overflow |
SscofpmfSm_cg/cp_lcofi_m |
|
lcofip_op |
SscofpmfSm_cg/cp_lcofi_m, SscofpmfS_cg/cp_lcofi_sip_s |
|
mip_lcofip_acc |
SscofpmfSm_cg/cp_lcofi_m |
|
sip_sie_Sscofpmf |
SscofpmfS_cg/cp_lcofi_sip_s, SscofpmfU_cg/cp_lcofi_sip_u |
|
intr_m_mode_pri |
SscofpmfSm_cg/cp_lcofip_priority_m |
|
sip_sie_priority_bit_order |
SscofpmfS_cg/cp_lcofip_priority_s |
|
scountovf_vsmode_read_access |
UDB Parameters: None.
B.11.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_envcfg |
envcfg controls access to senvcfg |
With mstateen0.ENVCFG = {0,1}, read and write sevncfg |
Illegal instruction if 0, else successful |
2 states x 2 accesses |
mstateen0_envcfg_op |
cp_fcsr_lower |
fcsr controls access to fcsr when misa.F = 0 |
If Zfinx is supported: |
Illegal instruction if 0, else successful |
2 states x 2 accesses |
sstateen_user_access_control |
cp_jvt |
jvt controls access |
If Zcmt is supported: |
Illegal instruction if 0, else successful |
2 states x 2 accesses |
sstateen_user_access_control |
Note: All of these tests are performed in S-mode unless otherwise noted. |
|||||
Note: mstateen0.SE0 must be 1 (else sstateen0 is inaccessible). |
|||||
The same normative rules apply to Ssstateen as to Smstateen (see Table 355).
B.11.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.11.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 ZicntrS |
|||||
| Normative Rule | Rule Text | Coverpoints |
|---|---|---|
Sscounterenw_hpmcounter_scounteren |
Sscounterenw_cg/cp_scounteren_writable |
UDB Parameters: None.
B.11.5. Sstvecd Direct Trap Vector
| Coverpoint | Goal | Feature Description | Expectation | Bins | Normative Rule |
|---|---|---|---|---|---|
cp_stvec_mode |
Check stvec.MODE can hold 0 and stvec.BASE can hold any valid address |
In S-mode with virtual memory disabled, write stvec.MODE = direct and walking 1s to stvec.BASE. |
Match reference model |
2*XLEN-4 |
Sstvecd_stvec_mode_direct |
| Normative Rule | Rule Text | Coverpoints |
|---|---|---|
Sstvecd_stvec_mode_direct |
Sstvecd_cg/cp_stvec_mode, S_scsr_cg/cp_stvec_vaddr_walk1, S_scsr_cg/cp_stvec_vaddr_walk0 |
|
Sstvecd_stvec_base_aligned_address |
Sstvecd_cg/cp_stvec_mode, 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.11.6. Sstvala Trap Address
| Coverpoint | Goal | Feature Description | Expectation | Bins | Normative Rule |
|---|---|---|---|---|---|
All tests take place in S-mode with exceptions delegated to S-mode. |
|||||
cp_stval_load_page_fault |
stval is written with faulting VA |
With VM enabled, cause load page fault. |
fault, stval written with VA |
1 |
Sstvala_stval_faulting_vaddr |
cp_stval_store_page_fault |
stval is written with faulting VA |
With VM enabled, cause store page fault. |
fault, stval written with VA |
1 |
|
cp_stval_instr_page_fault |
stval is written with faulting VA |
With VM enabled, cause instruction page fault. |
fault, stval written with VA |
1 |
Sstvala_stval_faulting_vaddr |
cp_load_access_fault |
stval is written with faulting VA |
load from an illegal address |
fault, stval written with VA |
1 |
Sstvala_stval_faulting_vaddr |
cp_store_access_fault |
stval is written with faulting VA |
store to an illegal address |
fault, stval written with VA |
1 |
Sstvala_stval_faulting_vaddr |
cp_instr_access_fault |
stval is written with faulting VA |
jump to an illegal address |
fault, stval written with VA |
1 |
Sstvala_stval_faulting_vaddr |
cp_load_address_misaligned |
stval is written with faulting VA if misaligned fault occurs |
lw with misaligned address |
succeed, or fault with stval containing address |
Sstvala_stval_faulting_vaddr |
|
cp_store_address_misaligned |
stval is written with faulting VA if misaligned fault occurs |
sw with misaligned address |
succeed, or fault with stval containing address |
Sstvala_stval_faulting_vaddr |
|
cp_instr_adr_misaligned_jalr |
stval is written with faulting VA if misaligned fault occurs |
jalr with misaligned address |
succeed, or fault with stval containing address |
Sstvala_stval_faulting_vaddr |
|
cp_illegal_instruction |
stval is written with the illegal instruction |
Execute 0xFFFFFFFF, 0x00000000 |
Illegal instruction fault with stval = 0xFFFFFFFF, 0x00000000 |
2 |
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_stval_load_page_fault, cp_stval_instr_page_fault} |
|
Sstvala_stval_faulting_instruction |
Sstvala_cg/cp_illegal_instruction |
UDB Parameters: None.
B.11.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.11.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.11.9. Ssnpm Pointer Masking
| 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 |
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 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 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 |
| Normative Rule | Rule Text | Coverpoints |
|---|---|---|
senvcfg_pmm_ssnpm |
Ssnpm_cg/cp_pmlen_masking, S_scsr_cg/cp_scsrwalk/senvcfg |
|
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, S_scsr_cg/cp_scsrwalk/senvcfg (the walk writes the reserved PMM=0b01) |
UDB Parameters: None.
| Normative Rule | Rule Text | Coverpoints |
|---|---|---|
pm_ignore_upper_bits |
{Smmpm_cg, SmnpmS_cg, SmnpmU_cg, Ssnpm_cg}/cp_pmlen_masking |
|
pm_ignore_va |
{Smmpm_cg, SmnpmS_cg, SmnpmU_cg, Ssnpm_cg}/cp_pmlen_masking |
|
pm_ignore_pa |
{Smmpm_cg, SmnpmS_cg, SmnpmU_cg, Ssnpm_cg}/cp_pmlen_masking |
|
pm_apply_explicit |
{Smmpm_cg, SmnpmS_cg, SmnpmU_cg, Ssnpm_cg}/cp_pmlen_masking |
|
pm_not_apply_implicit |
{Smmpm_cg, SmnpmS_cg, SmnpmU_cg, Ssnpm_cg}/cp_pmm_jalr |
|
pm_deterministic_effect |
{Smmpm_cg, SmnpmS_cg, SmnpmU_cg, Ssnpm_cg}/cp_pmlen_masking |
|
pmlen_supported_values |
{Smmpm_cg, SmnpmS_cg, SmnpmU_cg, Ssnpm_cg}/cp_pmlen_masking |
|
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, SmnpmS_cg, SmnpmU_cg, Ssnpm_cg}/cp_pmlen_masking |
pm_auto_apply_active_mode |
{Smmpm_cg, SmnpmS_cg, SmnpmU_cg, Ssnpm_cg}/cp_pmlen_masking |
|
pm_config_next_higher |
{Smmpm_cg, SmnpmS_cg, SmnpmU_cg, Ssnpm_cg}/cp_pmlen_masking |
|
pm_mode_only_dependency |
{Smmpm_cg, SmnpmS_cg, SmnpmU_cg, Ssnpm_cg}/cp_pmlen_masking |
|
pm_explicit_accesses |
Unless otherwise specified, pointer masking applies to all explicit memory accesses. |
{Smmpm_cg, SmnpmS_cg, SmnpmU_cg, Ssnpm_cg}/cp_pmlen_masking |
pm_mprv_spvp |
Smmpm_cg/cp_pm_mprv_mpp_m, SsnpmSm_cg/cp_pm_mprv_mpp_u, SmnpmSSm_cg/cp_pm_mprv_mpp_s, SmnpmUSm_cg/cp_pm_mprv_mpp_u |
|
pm_mxr_exception |
{Smmpm_cg, SmnpmS_cg, Ssnpm_cg}/cp_pmm_mxr |
|
pm_cpu_only |
{Smmpm_cg, SmnpmS_cg, SmnpmU_cg, Ssnpm_cg}/cp_pmlen_masking |
|
pm_misaligned_equivalence |
{Smmpm_cg, SmnpmS_cg, SmnpmU_cg, Ssnpm_cg}/cp_pmlen_misaligned_word |
|
pm_no_csr_sw |
{Smmpm_cg, SmnpmS_cg}/cp_pm_csr_software_access |
|
pm_warl_unaffected |
The implemented WARL width of CSRs is unaffected by pointer masking |
{Smmpm_cg, SmnpmS_cg}/cp_pm_csr_software_access |
pm_csr_hw_apply |
{Smmpm_cg, SmnpmS_cg, SmnpmU_cg, Ssnpm_cg}/cp_hardware_csr_writes_fault |
|
pm_debug_trigger |
||
pm_no_trap_vector_mask |
||
ssnpm_definition |
Ssnpm_cg/cp_pmlen_masking |
|
smnpm_definition |
{SmnpmS_cg, SmnpmU_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, SmnpmS_cg, SmnpmU_cg, Ssnpm_cg}/cp_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 |
pmlen_mode_depend |
{Smmpm_cg, SmnpmS_cg, SmnpmU_cg, Ssnpm_cg}/cp_pmlen_masking |
|
pmlen_illegal_warl |
Sm_mcsr_cg/cp_mcsrwalk_masked/{menvcfg, mseccfg, menvcfgh, mseccfgh}, S_scsr_cg/cp_scsrwalk/senvcfg |
UDB Parameters: None.
B.11.10. Smnpm Pointer Masking
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 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 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 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 328 for normative rules.
B.11.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 328 for normative rules.
B.11.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 ZicfilpU, ZicfilpSm and ZicfilpS suites in their privilege mode; each of those suites adds the coverpoints for its mode’s xPELP handling. ZicfilpH covers VS/VU-mode (see Table 298).
ZicfilpU 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). since U-mode traps are delivered to M-mode. - 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. Excluded (Debug testplan — separate file): - Excluded (Redundant — standard ISA traps already cover these):
ZicfilpSm 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_m_zicfilp cp_pelp_trap_entry_m_guarded_zicfilp cp_pelp_trap_return_m_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_zicflip - cp_pelp_debug_mode_r_zicflip Excluded (Redundant — standard ISA traps already cover these): - cp_lpad_misaligned_address_exception_zicfilp - cp_lpad_alignment_exception_zicflip
| 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 |
[norm:mstatus-mpelp_op] |
cp_pelp_trap_entry_m_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 |
[norm:Zicfilp_pelp_trap] |
cp_pelp_trap_entry_m_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 |
[norm:Zicfilp_pelp_trap] |
cp_pelp_trap_return_m_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 |
[norm:Zicfilp_pelp_trap_return] |
ZicfilpS 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_s_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 |
[norm:Zicfilp_pelp_trap] |
cp_pelp_trap_entry_s_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, zicflip_indirect_branch_lpad |
[norm:Zicfilp_pelp_trap], [norm:zicflip_indirect_branch_lpad] |
cp_elp_state_preservation_s_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 |
[norm:Zicfilp_pelp_trap], [norm:cfi_sstatus_spelp_op] |
cp_pelp_trap_return_s_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 |
[norm:Zicfilp_pelp_trap_return] |
| Normative Rule | Rule Text | Coverpoints |
|---|---|---|
mstatus_spelp_mpelp_op |
||
cfi_mstatus_spelp_op |
||
cfi_mstatus_mpelp_op |
||
mstatus_spelp_mpelp_enc_lead_in |
||
mstatus_spelp_mpelp_enc_list |
||
sstatus_spelp |
||
senvcfg_lpe_Zicfilp |
||
Zicfilp_forward_trap_async_interrupt |
||
Zicfilp_forward_trap_async_exception |
||
Zicfilp_exception_priority |
||
lpad_sw_exception |
||
cfi_sstatus_spelp_op |
The |
|
vsstatus_spelp_exists |
||
dcsr_pelp_op |
||
Zicfilp_pelp_debug_mode |
||
Zicfilp_pelp_trap |
||
Zicfilp_pelp_trap_return |
||
stval_exception_info |
TODO: Zicfilp and Zicfiss should both cause exceptions and read xtval |
UDB Parameters: None.
B.11.13. Zicfiss Shadow Stack
In Privileged section because it has both unpriv and privileged behaviors. ZicfissU holds the instruction-behavior coverpoints, which ZicfissS and ZicfissH re-run in their own modes; ZicfissS and ZicfissSm add the supervisor and machine gating coverpoints. ZicfissH covers VS/VU-mode (see Table 299).
ZicfissU 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 | ID | Normative Rule |
|---|---|---|---|---|---|---|
cp_ssp_access_zicfiss |
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) |
ssp_op ssp_addr ssp_sz ssp-field_1_0 |
[norm:ssp_op] [norm:ssp_addr] [norm:ssp_sz] [norm:ssp-field_1_0] |
cp_sspush_zicfiss |
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_push sspush_c-sspush_instr sspush_c-sspush_decrement zicfiss_sspush_enc zicfiss_c-sspush_enc zicfiss_enc |
[norm:ss_push] [norm:sspush_c-sspush_instr] [norm:sspush_c-sspush_decrement] [norm:zicfiss_sspush_enc] [norm:zicfiss_c-sspush_enc] [norm:zicfiss_enc] |
cp_sspopchk_match_zicfiss |
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_pop sspopchk_shadow_return_pop sspopchk-c_load_op sspop_increment zicfiss_sspopchk_enc zicfiss_c-sspopchk_enc |
[norm:ss_pop] [norm:sspopchk_shadow_return_pop] [norm:sspopchk-c_load_op] [norm:sspop_increment] [norm:zicfiss_sspopchk_enc] [norm:zicfiss_c-sspopchk_enc] |
cp_sspopchk_mismatch_zicfiss |
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} |
sspop_exception sspop_increment sspopchk_shadow_return_pop zicfiss_stack_compare |
[norm:sspop_exception] [norm:sspop_increment] [norm:sspopchk_shadow_return_pop] [norm:zicfiss_stack_compare] |
cp_sspopchk_fault_priority_zicfiss |
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 → cause 7} x mismatch_also_present {yes} x reported_cause {not 18} |
sspop_exception |
[norm:sspop_exception] |
cp_ss_call_return_zicfiss |
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. |
zicfiss_link_reg_func_enter zicfiss_link_reg_func_return zicfiss_stack_compare |
[norm:zicfiss_link_reg_func_enter] [norm:zicfiss_link_reg_func_return] [norm:zicfiss_stack_compare] |
cp_ssrdp_zicfiss |
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} |
ssrdp_read zicfiss_ssrdp_enc zicfiss_enc |
[norm:ssrdp_read] [norm:zicfiss_ssrdp_enc] [norm:zicfiss_enc] |
cp_ssamoswap_zicfiss |
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 rv64_ssamoswap-w_op zicfiss_atomic_swap |
[norm:rv32_ssamoswap-w_op] [norm:rv64_ssamoswap-w_op] [norm:zicfiss_atomic_swap] |
cp_ss_address_alignment_zicfiss |
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} |
ssamoswap_address ssp_xlen_aligned |
[norm:ssamoswap_address] [norm:ssp_xlen_aligned] |
cp_ss_instr_target_page_zicfiss |
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. |
[Threaded comment] Your version of Excel allows you to read this threaded comment; however, any edits to it will get removed if the file is opened in a newer version of Excel. Learn more: go.microsoft.com/fwlink/?linkid=870924 Comment: I thin xwr=110 should cause a store page fault, not access fault. 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} |
ssmp_ss_page_illegeal_access ssmp_ss_read_only_page ss_fault_exception_code ssmp_ss_idempotent_memory satp_mode_bare |
[norm:ssmp_ss_page_illegeal_access] [norm:ssmp_ss_read_only_page] [norm:ss_fault_exception_code] [norm:ssmp_ss_idempotent_memory] [norm:satp_mode_bare] |
cp_ss_page_access_zicfiss |
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, ifetch, implicit_walk, ordinary_load, vector_load, vector_store} x MXR {0,1} x result {ok, af} |
ssmp_ss_page_access_fault ssmp_ss_cache_block_access_fault ssmp_ss_implicit_access_fault ssmp_ss_load |
[norm:ssmp_ss_page_access_fault] [norm:ssmp_ss_cache_block_access_fault] [norm:ssmp_ss_implicit_access_fault] [norm:ssmp_ss_load] |
cp_ssp_csr_gating_u_zicfiss |
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} |
zicfiss_ssp_csr zicfiss_m_menvcfg_sse zicfiss_u_senvcfg_sse zicfiss_sse_access |
[norm:zicfiss_ssp_csr] [norm:zicfiss_m_menvcfg_sse] [norm:zicfiss_u_senvcfg_sse] [norm:zicfiss_sse_access] |
cp_ss_instr_inactive_zicfiss |
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_zicfiss). |
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} |
zicfiss_enc menvcfg_sse_op_lead-in menvcfg_sse_op_list senvcfg_sse_Zicfilp |
[norm:zicfiss_enc] [norm:menvcfg_sse_op_lead-in] [norm:menvcfg_sse_op_list] [norm:senvcfg_sse_Zicfilp] |
cp_ssamoswap_sse_gating_zicfiss |
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) illegal-instruction exception in every privilege mode less than M. |
instr {SSAMOSWAP.W, SSAMOSWAP.D} x gate {menvcfg.SSE=0, (menvcfg.SSE=1 & senvcfg.SSE=0)} x mode {S, U} x result {illegal_instruction} |
menvcfg_sse_op_lead-in menvcfg_sse_op_list senvcfg_sse_Zicfilp |
[norm:menvcfg_sse_op_lead-in] [norm:menvcfg_sse_op_list] [norm:senvcfg_sse_Zicfilp] |
cp_ss_page_crossing_zicfiss |
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 sspush_c-sspush_decrement sspop_increment ssmp_ss_page_illegeal_access ssmp_ss_read_only_page ss_fault_exception_code |
[norm:ss_push] [norm:sspush_c-sspush_decrement] [norm:sspop_increment] [norm:ssmp_ss_page_illegeal_access] [norm:ssmp_ss_read_only_page] [norm:ss_fault_exception_code] |
cp_ss_page_ad_bits_zicfiss |
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} |
ss_fault_exception_code ssmp_ss_page_access_fault ssmp_ss_load |
[norm:ss_fault_exception_code] [norm:ssmp_ss_page_access_fault] [norm:ssmp_ss_load] |
cp_ss_non_idempotent_zicfiss |
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 |
[norm:ssmp_ss_idempotent_memory] |
Folded into cp_ss_instr_inactive_zicfiss (gate sweep) and cp_ssamoswap_sse_gating_zicfiss (the trapping half). Other privilege modes are the corresponding rows on the ZicfissS / ZicfissSm / ZicfissH 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_zicfiss. |
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_zicfiss: pte.xwr now sweeps all 8 encodings and is crossed with MXR = 0/1. |
For cp_ss_instr_target_page_zicfiss, test all 8 XWR with MXR=0/1. |
|||||
Folded into cp_ssamoswap_zicfiss: {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_zicfiss as accessor leg (j), 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_zicfiss as accessor legs (h) and (i). Needs Zalrsc and Zacas in the suite’s required_extensions. |
LRSC and AMOCAS to SS page. |
|||||
Folded into cp_ss_instr_target_page_zicfiss as a pte.U = 0/1 axis. |
Test U bit of shadow stack page = 0/1 |
|||||
Folded into cp_ss_instr_inactive_zicfiss 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_zicfiss, 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_zicfiss. 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_zicfiss: the ordinary-load leg (g) 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_zicfiss 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. |
ZicfissS Supervisor-Mode Shadow Stack
General Test Environment (S/HS-mode execution): - Same base environment as ZicfissU, but tests execute in S/HS-mode. menvcfg.SSE alone gates S/HS; senvcfg.SSE does NOT gate S/HS. - The instruction-behaviour coverpoints (cp_sspush / cp_sspopchk_* / cp_ssamoswap / cp_ss_address_alignment / cp_ss_instr_target_page / cp_ss_page_access) are re-run unchanged from S-mode by reusing the ZicfissU generators with an S-mode boot; they are not duplicated as rows here. Only S-specific control behaviour is listed below.
| Coverpoint | Goal | Feature Description | Expectation | Bins | ID | Normative Rule |
|---|---|---|---|---|---|---|
cp_ssp_csr_gating_s_zicfiss |
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} |
zicfiss_sse_access zicfiss_ssp_csr zicfiss_m_menvcfg_sse |
[norm:zicfiss_sse_access] [norm:zicfiss_ssp_csr] [norm:zicfiss_m_menvcfg_sse] |
cp_ss_page_enc_zicfiss |
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 and U-mode (SSPUSH then SSPOPCHK round trip, plus an ordinary load). |
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, U} x access {ss_store, ordinary_load} x result {ok, page_fault} |
ss_page_enc ssmp_menvcfg_sse |
[norm:ss_page_enc] [norm:ssmp_menvcfg_sse] |
cp_ss_page_perm_priority_zicfiss |
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} |
ssmp_ss_load ssmp_ss_page_access_fault ssmp_ss_page_illegeal_access ss_fault_exception_code |
[norm:ssmp_ss_load] [norm:ssmp_ss_page_access_fault] [norm:ssmp_ss_page_illegeal_access] [norm:ss_fault_exception_code] |
cp_senvcfg_sse_rdonly0_s_zicfiss |
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 |
[norm:menvcfg_sse_rdonly0] |
(reused) ZicfissU instruction coverpoints, re-run from S-mode |
Re-run the ZicfissU coverpoints with the hart booted in S-mode instead of U-mode |
BOOKKEEPING ROW, not a new coverpoint. These 16 ZicfissU coverpoints are re-run unchanged with an S-mode boot; coverage is sampled into the S-mode covergroup via the priv_mode_s coverpoint: |
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) |
(inherits the ID list of each reused coverpoint) |
(inherits the normative rules of each reused coverpoint) |
PROMOTED to its own coverpoint: cp_ss_page_perm_priority_zicfiss, 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_zicfiss — writes senvcfg.SSE from S-mode and reads back 0 while menvcfg.SSE=0. The M-mode counterpart is cp_envcfg_sse_rdonly0_zicfiss on ZicfissSm. |
Write m0s1 to xenvcfg.SSE and read back and make sure s shows up 0. |
ZicfissSm Machine-Mode Shadow Stack
| Coverpoint | Goal | Feature Description | Expectation | Bins | ID | Normative Rule |
|---|---|---|---|---|---|---|
General Test Environment (M-mode control plane): |
||||||
cp_ssamoswap_mmode_fault_zicfiss |
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 and satp.MODE. |
instr {SSAMOSWAP.W, SSAMOSWAP.D} x menvcfg.SSE {0,1} x satp.MODE {Bare, Sv} |
ssmp_ssamoswap |
[norm:ssmp_ssamoswap] |
cp_menvcfg_sse_gating_zicfiss |
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, pte_xwr_010_access} x result {ok at M always, ok at S iff menvcfg.SSE=1, illegal_instruction, page_fault} |
zicfiss_m_menvcfg_sse zicfiss_ssp_csr ssmp_menvcfg_sse |
[norm:zicfiss_m_menvcfg_sse] [norm:zicfiss_ssp_csr] [norm:ssmp_menvcfg_sse] |
cp_envcfg_sse_rdonly0_zicfiss |
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 henvcfg_sse_op |
[norm:menvcfg_sse_rdonly0] [norm:henvcfg_sse_op] |
cp_ss_pmp_permissions_zicfiss |
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} |
sspop_exception (PMP read-write requirement: priv/cfi.adoc, untagged) |
[norm:sspop_exception] |
cp_ss_satp_bare_zicfiss |
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 |
[norm:satp_mode_bare] |
cp_ss_instr_inactive_zicfiss |
Verify SS instructions act as MOPs, touching no memory and raising nothing, whenever Zicfiss is inactive |
MOVED here from ZicfissU: 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} |
zicfiss_enc menvcfg_sse_op_lead-in menvcfg_sse_op_list senvcfg_sse_Zicfilp |
[norm:zicfiss_enc] [norm:menvcfg_sse_op_lead-in] [norm:menvcfg_sse_op_list] [norm:senvcfg_sse_Zicfilp] |
Folded into cp_menvcfg_sse_gating_zicfiss: 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 |
|||||
MOVED here from ZicfissU as cp_ss_instr_inactive_zicfiss, 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_zicfiss, 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. |
|||||
| Normative Rule | Rule Text | Coverpoints |
|---|---|---|
senvcfg_sse_Zicfiss |
||
Zicfiss_m_menvcfg_sse |
||
Zicfiss_ssp_csr |
||
Zicfiss_u_senvcfg_sse |
Otherwise, if in U-mode and |
|
Zicfiss_vs_henvcfg_sse |
Otherwise, if in VS-mode and |
|
Zicfiss_vu_senvcfg_sse |
Otherwise, if in VU-mode and |
|
Zicfiss_sse_access |
||
Zicfiss_smode_xsse |
||
ss_page_enc |
The encoding R=0, W=1, and X=0, is defined to represent an SS page. |
|
ssmp_menvcfg_sse |
||
ssmp_henvcfg_sse |
Similarly, when V=1 and |
|
satp_mode_bare |
||
ssmp_ssamoswap |
||
ssmp_ss_page_access_fault |
||
ssmp_ss_cache_block_access_fault |
||
ssmp_ss_implicit_access_fault |
||
ssmp_ss_load |
However, the shadow stack is readable by all instructions that only load from memory. |
|
ss_fault_exception_code |
||
ssmp_ss_page_illegal_access |
||
ssmp_ss_read_only_page |
||
ssp_xlen_aligned |
||
ssmp_ss_idempotent_memory |
||
active_g_stage_pte |
UDB Parameters: None.
B.11.14. Zawrs Wait on Reservation Set
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 suite is defined for each.
covergroup Zawrs
| 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 |
||||||
covergroup Zawrs
| 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 |
||
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 |
|||||
spec: |
|||||||
As implementations are free to implement WFI as a NOP, software must explicitly check for |
|||||||
any relevant pending but disabled interrupts in the code following an WFI, and should loop |
|||||||
back to the WFI if no suitable interrupt was detected. The mip or sip registers can be |
|||||||
interrogated to determine the presence of any interrupt in machine or supervisor mode |
|||||||
respectively. |
|||||||
covergroup Zawrs
| 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 |
|
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 |
|||
| Normative Rule | Rule Text | Coverpoints |
|---|---|---|
Zawrs_wrs-nto_stall_exec |
ZawrsSm_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. |
ZawrsSm_cg/cp_wrs_sto_timeout |
Zawrs_all_priv_modes |
ZawrsSm_cg/cp_wrs_no_res |
|
Zawrs_stall_terminate |
ZawrsSm_cg/cp_wrs_resume |
|
Zawrs_exec_resume_rules |
ZawrsSm_cg/cp_wrs_resume |
UDB Parameters: None.
| Normative Rule | Rule Text | Coverpoints |
|---|---|---|
Zawrs_wrs-nto_stall_exec |
ZawrsS_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. |
ZawrsS_cg/cp_wrs_sto_timeout |
Zawrs_all_priv_modes |
ZawrsS_cg/cp_wrs_no_res |
|
Zawrs_stall_terminate |
ZawrsS_cg/cp_wrs_{resume, nto_timeout} |
|
Zawrs_exec_resume_rules |
ZawrsS_cg/cp_wrs_resume |
|
Zawrs_priv_illegal_instr_excp |
ZawrsS_cg/cp_wrs_nto_timeout |
|
Zawrs_virtual_instr_excp |
ZawrsS_cg/cp_wrs_nto_timeout_h |
UDB Parameters: None.
| Normative Rule | Rule Text | Coverpoints |
|---|---|---|
Zawrs_wrs-nto_stall_exec |
ZawrsU_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. |
ZawrsU_cg/cp_wrs_sto_timeout |
Zawrs_all_priv_modes |
ZawrsU_cg/cp_wrs_no_res |
|
Zawrs_stall_terminate |
ZawrsU_cg/cp_wrs_{resume, nto_timeout} |
|
Zawrs_exec_resume_rules |
ZawrsU_cg/cp_wrs_resume |
|
Zawrs_priv_illegal_instr_excp |
ZawrsU_cg/cp_wrs_nto_timeout |
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.11.15. Zama16b Misaligned Atomics
Misaligned atomics are supported by the Misaligned Atomicity Granularity. They are also exercised via ExceptionsZaamo.
| 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.11.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), 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 | 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 * 16 types * 9 regs * 6 accesses |
Sdtrig_num_trigs_ge1 |
comments on test results: No exceptions. Tcontrol, mscontext, hcontext not implemented on spike |
Note: Use CSRW/CSRR to access registers in all modes |
||||||
Native Triggers |
||||||
cp_breakpoint_delegate |
Breakpoints caused by triggers can be delegated |
if S_SUPPORTED |
Trap to M mode if medeleg[3] = 0, trap to S mode of medeleg[3] = 1, when in a mode < M |
2 medeleg |
Sdtrig_breakpoint_delegated |
|
A Extension |
Repeat for each of UDB_SDTRIG_NUM_TRIGGERS if UDB_SDTRIG_MCONTROL6_SUPPORTED[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 |
if RV32: |
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 mem access data matches tdata2 |
2 address * 3 XSL |
Sdtrig_AMO_read |
|
Notes: |
||||||
Combined Accesses |
Repeat for each of UDB_SDTRIG_NUM_TRIGGERS if UDB_SDTRIG_MCONTROL6_SUPPORTED[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 * 7 sizes * 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 |
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 |
|
Cache Operations |
Repeat for each of UDB_SDTRIG_NUM_TRIGGERS if UDB_SDTRIG_MCONTROL6_SUPPORTED[i]: |
For all: Sdtrig_caches_stores |
||||
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 |
2 addrs * 2 selects * 7 sizes * 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 |
2 addrs * 2 selects * 7 sizes * 3 XSL |
Sdtrig_caches_stores_1 |
|
cp_cache_zicbop |
The prefetch instructions don’t match at all. |
if ZICBOP_SUPPORTED |
No exceptions |
5 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 |
Read value matches written |
SVMODE * 2 |
Sdtrig_tdata2_addr_sz1 |
|
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 |
The Trigger Module registers, except scontext, and hcontext, are only accessible in machine and Debug Mode |
each of UDB_SDTRIG_NUM_TRIGGERS in tselect: |
No exceptions |
NUM_TRIGGERS * 4 regs + 5 regs |
Sdtrig_trigger_modes |
coverpoint drafted: 9/10 |
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: |
Non-supported mode bits read back as zero after writing all-ones |
NTRIGGERS |
Sdtrig_tdata1_dmode_type_0 |
coverpoint drafted: 9/10 |
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 |
Trigger Control |
||||||
cp_tcontrol_enable |
tcontrol.mte enables debug triggers in M-mode |
if UDB_TCONTROL_AVAILABLE |
Breakpoint exception when mte = 1 and trigger fires in M-mode |
2 mte |
Sdtrig_tcontrol_mte_disabled |
|
cp_tcontrol_mtrap |
tcontrol.mte/mpte on trap into M-mode |
if UDB_TCONTROL_AVAILABLE |
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_AVAILABLE |
When mret is executed, mte is set to the value of mpte. |
2 mpte * 2 mte |
Sdtrig_tcontrol_mte_mret |
|
Mcontrol |
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[i]: |
|||||
cp_mcontrol6_priv_mode |
tdata2 = {scratch} |
Breakpoint exception on instruction if tdata1.m = 1 |
2 priv bits |
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_select_address |
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_select_address |
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 value} |
Breakpoint exception on LW 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 * 7 sizes * 2 ops |
Sdtrig_mcontrol6_size_any |
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 * 5 sizes * up to 36 instructions |
Sdtrig_mcontrol6_size_any |
Sizes 4 (48-bit) and 6 (128-bit) are not tested |
|
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 |
4 matches * 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 |
2 matches * (min(UDB_SDTRIG_MASKMAX6, XLEN-1)-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 |
4 matches * 11 values |
Sdtrig_mcontrol6_match_mask_low |
||
MControl6 Chain |
Repeat for each of UDB_SDTRIG_NUM_TRIGGERS if UDB_SDTRIG_MCONTROL6_SUPPORTED[i] and UDB_SDTRIG_MCONTROL6_SUPPORTED[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 |
|
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[i]: |
|||||
cp_icount_hardwired |
if UDB_COUNT_HARDWIRED_1 = true: |
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 |
Sdtrig_icount_access |
||
cp_icount_trap |
tdata1.count = 1 |
Count decreases when a trap is taken from a privilege mode where the trigger is enabled |
1 |
Sdtrig_icount_match2 |
||
cp_icount_eq0 |
tdata1.pending = {0/1} |
Count stays at 0 until explicitly written |
2 pending |
Sdtrig_icount_count_zero |
||
Itrigger tests: test fire and don’t fire for each scenario |
Repeat for each of UDB_SDTRIG_NUM_TRIGGERS if UDB_SDTRIG_ITRIGGER_SUPPORTED[i]: |
|||||
cp_itrigger |
for x in {1,3,5,7,9,11,13} if INTERRUPTx_SUPPORTED: |
Breakpoint exception when the interrupt matches the interrupt number enabled in tdata2 and the corresponding privilege-mode bit (tdata1.m/s/u) is set. The trigger shall not fire when the corresponding privilege-mode bit is cleared. tval shall be set to 0 on a trigger match, and if HIT_IMPLEMENTED, hit shall be 1. Trigger firing shall be suppressed where required by the implemented reentrancy solution. |
7 interrupt codes * 2 priv bits* 2 interrupts |
Sdtrig_itrigger_access |
||
Etrigger tests: test fire and don’t fire for each scenario |
Repeat for each of UDB_SDTRIG_NUM_TRIGGERS if UDB_SDTRIG_ETRIGGER_SUPPORTED[i]: |
|||||
cp_etrigger |
for x in {0-9/11/12/13/15/16/18} if EXCEPTIONx_SUPPORTED |
Breakpoint exception when the exception matches the exception number enabled in tdata2 and the corresponding privilege-mode bit (tdata1.m/s/u) is set. The trigger shall not fire when the corresponding privilege-mode bit is cleared. tval shall be set to 0 on a trigger match, and if HIT_IMPLEMENTED, hit shall be 1. Trigger firing shall be suppressed where required by the implemented reentrancy solution. |
17 exception codes * 2 priv bits * 2 exceptions |
Sdtrig_etrigger_access |
||
Textra |
Repeat for each of UDB_SDTRIG_NUM_TRIGGERS if UDB_TDATA3_EXISTS[i]: |
|||||
cp_textra_mcontext |
only run tests if MCONTEXT_AVAILABLE: |
Breakpoint exception if mhvalue equals mcontext |
3 mhvalues * 4 trigger types |
Sdtrig_mcontrol6_textra |
||
cp_textra_scontext |
only run tests if SCONTEXT_AVAILABLE: |
Breakpoint exception when svalue equals scontext and mask ignores A’s |
if RV32: |
Sdtrig_mcontrol6_textra |
||
cp_textra_double_context |
only run tests if MCONTEXT_AVAILABLE and SCONTEXT_AVAILABLE: |
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 SCONTEXT_AVAILABLE: |
Breakpoint exception if ASID in satp equals the lower ASIDMAX bits of svalue. |
5 svalues * 4 trigger types |
Sdtrig_mcontrol6_textra |
||
cp_smode_fields_hardwired |
For each of UDB_SDTRIG_NUM_TRIGGERS in tselect: |
svalue tied 0 if S-mode not supported |
1 |
Sdtrig_textra32_svalue_no_s |
||
Actions |
Only action 0 (breakpoint) supported in this file (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_sdtrig_cg/cp_csr_access_common, SdtrigSm_csr_cg/cp_tselect_trigs |
|
Sdtrig_unimp_csr_illegal |
Implementation-specific behavior; not tested in this suite |
|
Sdtrig_csr_mode |
SdtrigSm_sdtrig_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 |
|
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 |
Requires tmexttrigger external trigger inputs; implementation specific |
|
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 |
Trigger priority not tested; triggers assumed imprecise |
|
Sdtrig_debug_breakpoint |
Trigger priority not tested; triggers assumed imprecise |
|
Sdtrig_simul_debug_breakpoint_fallback |
Trigger priority not tested; triggers assumed imprecise |
|
Sdtrig_hit_set_on_action0 |
Trigger priority not tested; triggers assumed imprecise |
|
Sdtrig_independent_trigs |
Trigger priority not tested; triggers assumed imprecise |
|
Sdtrig_breakpoint_delegated |
SdtrigSm_native_triggers_cg/cp_breakpoint_delegate |
|
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_cm_pop_push |
|
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 |
|
Sdtrig_pmem |
SdtrigSm_address_matches_cg/cp_tdata2_translate |
|
Sdtrig_vmem |
SdtrigSm_address_matches_cg/cp_tdata2_translate |
|
Sdtrig_csr_tdata2_sz2 |
SdtrigSm_address_matches_cg/cp_tdata2_translate |
|
Sdtrig_csr_tdata2_invalid |
WARL write-any-read-legal behavior not separately tested |
|
Sdtrig_multistate_change |
Descriptive spec text with no separately testable behavior |
|
Sdtrig_tdata_warl |
WARL write-any-read-legal behavior not separately tested |
|
Sdtrig_tdata_write |
SdtrigSm_csr_cg/cp_tdata_write |
|
Sdtrig_disable_trig |
Unpredictable behavior on this access; not tested |
|
Sdtrig_unimplemented_register |
Unpredictable behavior on this access; not tested |
|
Sdtrig_trigger_modes |
SdtrigSm_csr_cg/cp_csr_access |
|
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_csr_cg/cp_tselect_trigs |
|
Sdtrig_tselect_access |
SdtrigSm_csr_cg/cp_tselect_trigs |
|
Sdtrig_tselect_warl |
WARL write-any-read-legal behavior not separately tested |
|
Sdtrig_tdata1 |
SdtrigSm_sdtrig_cg/cp_csr_access_common |
|
Sdtrig_tdata1_reset |
Reset values not tested in this suite |
|
Sdtrig_tdata1_write0 |
WARL write-any-read-legal behavior not separately tested |
|
Sdtrig_tdata1_multiple_types |
WARL write-any-read-legal behavior not separately tested |
|
Sdtrig_tdata1_type_disabled |
Descriptive spec text with no separately testable behavior, WARL write-any-read-legal behavior not separately tested |
|
Sdtrig_tdata1_type_rsv |
Reserved encoding for future use; nothing to test |
|
Sdtrig_tdata1_dmode_type_0 |
SdtrigSm_csr_cg/cp_tdata1_mode_hardwired |
|
Sdtrig_tdata1_dmode_0 |
Requires Sdext external debug support; not implemented |
|
Sdtrig_tdata1_dmode_1 |
Requires Sdext external debug support; not implemented |
|
Sdtrig_tdata1_dmode_writable |
Requires Sdext external debug support; not implemented |
|
Sdtrig_tdata1_data |
SdtrigSm_csr_cg/cp_tdata1_mode_hardwired |
|
Sdtrig_tdata2 |
SdtrigSm_sdtrig_cg/cp_csr_access_common |
|
Sdtrig_tdata2_reset |
Descriptive spec text with no separately testable behavior |
|
Sdtrig_tdata2_disabled |
WARL write-any-read-legal behavior not separately tested |
|
Sdtrig_tdata2_sign_extend |
XLEN-dependent behavior not tested; single XLEN assumed |
|
Sdtrig_tdata3 |
SdtrigSm_sdtrig_cg/cp_csr_access_common |
|
Sdtrig_tdata3_reset |
Descriptive spec text with no separately testable behavior |
|
Sdtrig_tdata3_disabled |
WARL write-any-read-legal behavior not separately tested |
|
Sdtrig_tdata3_sign_extend |
XLEN-dependent behavior not tested; single XLEN assumed |
|
Sdtrig_tinfo |
SdtrigSm_sdtrig_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 |
Only ratified version 1.0 supported; version assumed |
|
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_csr_cg/cp_tinfo_read_only |
|
Sdtrig_tinfo_no_trigger |
WARL tselect; nonexistent-trigger reporting not tested |
|
Sdtrig_trigger_modes_1 |
SdtrigSm_sdtrig_cg/cp_csr_access_common |
|
Sdtrig_tcontrol_mpte |
SdtrigSm_csr_cg/cp_tcontrol_mtrap |
|
Sdtrig_tcontrol_mte_disabled |
SdtrigSm_csr_cg/cp_tcontrol_enable |
|
Sdtrig_tcontrol_mte_enabled |
SdtrigSm_csr_cg/cp_tcontrol_enable |
|
Sdtrig_tcontrol_mte |
SdtrigSm_csr_cg/cp_tcontrol_mtrap |
|
Sdtrig_tcontrol_mte_mret |
SdtrigSm_csr_cg/cp_tcontrol_mret |
|
Sdtrig_hcontext_implemented |
Hypervisor extension not implemented, so not testable |
|
Sdtrig_hcontext_access |
Hypervisor extension not implemented, so not testable |
|
Sdtrig_hcontext_smstateen |
Hypervisor extension not implemented, so not testable |
|
Sdtrig_hcontext |
Hypervisor extension not implemented, so not testable |
|
Sdtrig_scontext_access |
SdtrigSm_csr_cg/cp_csr_access |
|
Sdtrig_scontext_accessibility |
State-enable accessibility tested in the Smstateen suite |
|
Sdtrig_scontext_data |
SdtrigSm_sdtrig_cg/cp_csr_access_common |
|
Sdtrig_mcontext_implementation |
Hypervisor extension not implemented, so not testable |
|
Sdtrig_mcontext_access |
SdtrigSm_csr_cg/cp_mcontext_smode |
|
Sdtrig_mcontext_hcontext_data |
SdtrigSm_sdtrig_cg/cp_csr_access_common |
|
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_sdtrig_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 |
Only ratified version 1.0 supported; version assumed |
|
Sdtrig_mcontrol6_chain |
SdtrigSm_mcontrol6_cg/cp_mcontrol6_chain_adr |
|
Sdtrig_mcontrol6_breakpoint |
Covered by Privileged-spec breakpoint and tval testing |
|
Sdtrig_mcontrol6_faulting_address |
Covered by Privileged-spec breakpoint and tval testing |
|
Sdtrig_mcontrol6_chained_faulting |
Covered by Privileged-spec breakpoint and tval testing |
|
Sdtrig_mcontrol6_napot_range |
NAPOT range support is optional; not required here |
|
Sdtrig_mcontrol6_textra |
SdtrigSm_textra_cg/cp_textra_mcontext, SdtrigSm_textra_cg/cp_textra_scontext, 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 |
Hypervisor extension not implemented, so not testable |
|
Sdtrig_mcontrol6_vu |
Hypervisor extension not implemented, so not testable |
|
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 |
Optional WARL field (hit/uncertain bits); not tested |
|
Sdtrig_mcontrol6_hit0_2 |
Optional WARL field (hit/uncertain bits); not tested |
|
Sdtrig_mcontrol6_hit0_3 |
Optional WARL field (hit/uncertain bits); not tested |
|
Sdtrig_mcontrol6_hit0_multiple_accesses |
Optional WARL field (hit/uncertain bits); 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 |
|
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 |
|
Sdtrig_mcontrol6_size_16bit |
SdtrigSm_mcontrol6_cg/cp_mcontrol6_execute_size, SdtrigSm_mcontrol6_cg/cp_mcontrol6_load_store_size |
|
Sdtrig_mcontrol6_size_32bit |
SdtrigSm_mcontrol6_cg/cp_mcontrol6_execute_size, SdtrigSm_mcontrol6_cg/cp_mcontrol6_load_store_size |
|
Sdtrig_mcontrol6_size_48bit |
SdtrigSm_mcontrol6_cg/cp_mcontrol6_execute_size |
|
Sdtrig_mcontrol6_size_64bit |
SdtrigSm_mcontrol6_cg/cp_mcontrol6_execute_size, SdtrigSm_mcontrol6_cg/cp_mcontrol6_load_store_size |
|
Sdtrig_mcontrol6_size_128bit |
SdtrigSm_mcontrol6_cg/cp_mcontrol6_execute_size, SdtrigSm_mcontrol6_cg/cp_mcontrol6_load_store_size |
|
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 |
|
Sdtrig_mcontrol6_chain_start |
SdtrigSm_mcontrol6_cg/cp_mcontrol6_chain_adr |
|
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 |
|
Sdtrig_mcontrol6_match_napot |
SdtrigSm_mcontrol6_cg/cp_mcontrol6_match_napot |
|
Sdtrig_mcontrol6_match_napot_mask |
SdtrigSm_mcontrol6_cg/cp_mcontrol6_match_napot |
|
Sdtrig_mcontrol6_match_napot_legal |
SdtrigSm_mcontrol6_cg/cp_mcontrol6_match_napot |
|
Sdtrig_mcontrol6_match_ge |
SdtrigSm_mcontrol6_cg/cp_mcontrol6_match |
|
Sdtrig_mcontrol6_match_lt |
SdtrigSm_mcontrol6_cg/cp_mcontrol6_match |
|
Sdtrig_mcontrol6_match_mask_low |
SdtrigSm_mcontrol6_cg/cp_mcontrol6_match_mask |
|
Sdtrig_mcontrol6_match_mask_high |
SdtrigSm_mcontrol6_cg/cp_mcontrol6_match_mask |
|
Sdtrig_mcontrol6_match_not_equal |
SdtrigSm_mcontrol6_cg/cp_mcontrol6_match |
|
Sdtrig_mcontrol6_match_not_napot |
SdtrigSm_mcontrol6_cg/cp_mcontrol6_match_napot |
|
Sdtrig_mcontrol6_match_not_mask_low |
SdtrigSm_mcontrol6_cg/cp_mcontrol6_match_mask |
|
Sdtrig_mcontrol6_match_not_mask_high |
SdtrigSm_mcontrol6_cg/cp_mcontrol6_match_mask |
|
Sdtrig_mcontrol6_match_rsv |
Reserved encoding for future use; nothing to test |
|
Sdtrig_mcontrol6_comparisons |
XLEN-dependent behavior not tested; single XLEN assumed |
|
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 |
SdtrigSm_mcontrol6_cg/cp_mcontrol6_priv_mode |
|
Sdtrig_mcontrol6_u |
SdtrigSm_mcontrol6_cg/cp_mcontrol6_priv_mode |
|
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_sdtrig_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 |
|
Sdtrig_icount_match2 |
SdtrigSm_icount_cg/cp_icount_trap |
|
Sdtrig_icount_multiple_match |
SdtrigSm_icount_cg/cp_icount_trap |
|
Sdtrig_icount_match_non_reexecuted |
SdtrigSm_icount_cg/cp_icount_trap |
|
Sdtrig_icount_all_traps_match |
SdtrigSm_icount_cg/cp_icount_trap |
|
Sdtrig_icount_match_gt1 |
SdtrigSm_icount_cg/cp_icount_instr |
|
Sdtrig_icount_match_eq1 |
SdtrigSm_icount_cg/cp_icount_hardwired |
|
Sdtrig_icount_exception |
WARL write-any-read-legal behavior not separately tested |
|
Sdtrig_icount_count_zero |
SdtrigSm_icount_cg/cp_icount_eq0 |
|
Sdtrig_icount_pending |
SdtrigSm_icount_cg/cp_icount_instr |
|
Sdtrig_icount_action0 |
SdtrigSm_icount_cg/cp_icount_instr |
|
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 |
|
Sdtrig_icount_vs |
Hypervisor extension not implemented, so not testable |
|
Sdtrig_icount_vu |
Hypervisor extension not implemented, so not testable |
|
Sdtrig_icount_hit |
Optional WARL field (hit/uncertain bits); not tested |
|
Sdtrig_icount_m |
SdtrigSm_icount_cg/cp_icount_instr |
|
Sdtrig_icount_pending_set |
SdtrigSm_icount_cg/cp_icount_instr |
|
Sdtrig_icount_s |
SdtrigSm_icount_cg/cp_icount_instr |
|
Sdtrig_icount_u |
SdtrigSm_icount_cg/cp_icount_instr |
|
Sdtrig_itrigger |
SdtrigSm_sdtrig_cg/cp_csr_access_common |
|
Sdtrig_itrigger_reset |
Descriptive spec text with no separately testable behavior |
|
Sdtrig_itrigger_access |
SdtrigSm_itrigger_cg/cp_itrigger |
|
Sdtrig_itrigger_fire |
SdtrigSm_itrigger_cg/cp_itrigger |
|
Sdtrig_itrigger_enable_num |
SdtrigSm_itrigger_cg/cp_itrigger |
|
Sdtrig_itrigger_enable_nmi |
Non-maskable interrupts not defined by the specifications |
|
Sdtrig_itrigger_xlen32 |
XLEN-dependent behavior not tested; single XLEN assumed |
|
Sdtrig_itrigger_timing |
SdtrigSm_itrigger_cg/cp_itrigger |
|
Sdtrig_itrigger_action0 |
SdtrigSm_itrigger_cg/cp_itrigger |
|
Sdtrig_itrigger_textra |
SdtrigSm_textra_cg/cp_textra_mcontext, SdtrigSm_textra_cg/cp_textra_scontext, SdtrigSm_textra_cg/cp_textra_asid |
|
Sdtrig_itrigger_hit |
Optional WARL field (hit/uncertain bits); not tested |
|
Sdtrig_itrigger_vs |
Hypervisor extension not implemented, so not testable |
|
Sdtrig_itrigger_vu |
Hypervisor extension not implemented, so not testable |
|
Sdtrig_itrigger_nmi |
Non-maskable interrupts not defined by the specifications |
|
Sdtrig_itrigger_m |
SdtrigSm_itrigger_cg/cp_itrigger |
|
Sdtrig_itrigger_s |
SdtrigSm_itrigger_cg/cp_itrigger |
|
Sdtrig_itrigger_u |
SdtrigSm_itrigger_cg/cp_itrigger |
|
Sdtrig_etrigger |
SdtrigSm_sdtrig_cg/cp_csr_access_common |
|
Sdtrig_etrigger_reset |
Descriptive spec text with no separately testable behavior |
|
Sdtrig_etrigger_access |
SdtrigSm_etrigger_cg/cp_etrigger |
|
Sdtrig_etrigger_fire |
Descriptive spec text with no separately testable behavior |
|
Sdtrig_etrigger_config |
SdtrigSm_etrigger_cg/cp_etrigger |
|
Sdtrig_etrigger_xlen32 |
XLEN-dependent behavior not tested; single XLEN assumed |
|
Sdtrig_etrigger_timing |
SdtrigSm_etrigger_cg/cp_etrigger |
|
Sdtrig_etrigger_action0 |
SdtrigSm_etrigger_cg/cp_etrigger |
|
Sdtrig_etrigger_textra |
SdtrigSm_textra_cg/cp_textra_mcontext, SdtrigSm_textra_cg/cp_textra_scontext, SdtrigSm_textra_cg/cp_textra_asid |
|
Sdtrig_etrigger_hit |
Optional WARL field (hit/uncertain bits); not tested |
|
Sdtrig_etrigger_vs |
Hypervisor extension not implemented, so not testable |
|
Sdtrig_etrigger_vu |
Hypervisor extension not implemented, so not testable |
|
Sdtrig_etrigger_m |
SdtrigSm_etrigger_cg/cp_etrigger |
|
Sdtrig_etrigger_s |
SdtrigSm_etrigger_cg/cp_etrigger |
|
Sdtrig_etrigger_u |
SdtrigSm_etrigger_cg/cp_etrigger |
|
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_sdtrig_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_asid |
|
Sdtrig_textra32_dxlen64 |
Descriptive spec text with no separately testable behavior |
|
Sdtrig_textra32_byte_granular |
Descriptive spec text with no separately testable behavior |
|
Sdtrig_textra32_byte_mask_applies |
SdtrigSm_textra_cg/cp_textra_scontext |
|
Sdtrig_textra32_filter_modes |
SdtrigSm_textra_cg/cp_textra_mcontext_smode, SdtrigSm_textra_cg/cp_textra_scontext_smode |
|
Sdtrig_textra32_mhselect_ignore |
SdtrigSm_textra_cg/cp_textra_mcontext |
|
Sdtrig_textra32_mhselect_mcontext |
SdtrigSm_textra_cg/cp_textra_mcontext, SdtrigSm_textra_cg/cp_textra_double_context |
|
Sdtrig_textra32_mhselect_mctx_sel |
Hypervisor extension not implemented, so not testable |
|
Sdtrig_textra32_mhselect_vmid_sel |
Hypervisor extension not implemented, so not testable |
|
Sdtrig_textra32_mhselect_rsv |
Reserved encoding for future use; nothing to test |
|
Sdtrig_textra32_mhselect_no_h |
SdtrigSm_textra_cg/cp_textra_mcontext |
|
Sdtrig_textra32_sbytemask |
SdtrigSm_textra_cg/cp_textra_mcontext |
|
Sdtrig_textra32_svalue_no_s |
SdtrigSm_textra_cg/cp_smode_fields_hardwired |
|
Sdtrig_textra32_sselect_ignore |
SdtrigSm_textra_cg/cp_textra_scontext |
|
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 |
|
Sdtrig_textra32_sselect_asid2 |
SdtrigSm_textra_cg/cp_textra_asid |
|
Sdtrig_textra32_sselect_asid3 |
SdtrigSm_textra_cg/cp_textra_asid |
|
Sdtrig_textra32_sselect_no_s |
SdtrigSm_textra_cg/cp_smode_fields_hardwired |
|
Sdtrig_textra64 |
SdtrigSm_sdtrig_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 |
|
Sdtrig_textra64_sbytemask |
SdtrigSm_textra_cg/cp_textra_scontext |
UDB Parameters: None.
As of 7/24/26, Sdtrig is partially implemented. Only the mcontrol6 covergroup is fully developed. Coverpoints are incomplete and are in a draft PR.
Sail does not yet support Sdtrig, so the tests are exercised by running whisper against spike. QEMU and Imperas do not yet match spike and some issues
have been filed and are tracked here.
Run with make whisper-rv64-max-spike-ref EXTENSIONS=SdtrigSm.
An initial set of parameters for Sdtrig is proposed for UDB.
Most Sdtrig features are optional, so defining what to test requires many parameters. UDB_SDTRIG_NUM_TRIGGERS define how many triggers exist.
For each trigger, each type (mcontrol6, icount, itrigger, etrigger) is optionally supported. Many of the fields in tdata1 for each type are optional.
uncertainen and uncertain are vague and implementation-specific and is 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 is not tested because it depends on Hypervisor. Non-maskable interrupts
are not tested because they are not part of RVA23.
mcontrol has been replaced by mcontrol6. It is deprecated and not tested. mscontext is only for backward compatibility with Sdtrig 0.13 and is not tested.
SdtrigS
Unless otherwise specified, run tests in S-Mode, with tdata1.s = 1 mideleg.breakpoint = 1 Unless otherwise specified, use SBI Calls to access trigger CSRs All other assumptions are inherited from SdtrigSm Perform all tests defined in SdtrigSm Expectations provided below differ from those in SdtrigSm Note: cp_csr_access_common will trap on privileged registers.
SdtrigU
Unless otherwise specified, run tests in U-Mode, with tdata1.u = 1 mideleg.breakpoint = 1 Unless otherwise specified, use SBI Calls to access trigger CSRs All other assumptions are inherited from SdtrigSm Perform all tests defined in SdtrigSm Expectations provided below differ from those in SdtrigSm Note: cp_csr_access_common will trap on privileged registers.
B.12. Miscellaneous Non-RV23 Privileged Extensions
B.12.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.12.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 Umode, write mstateen0-3 with all ones, and read it back. |
Illegal instruction |
4-8CSRs |
stateen_op |
cp_fcsr_ro_zero |
Test if fcsr bit is read-only zero when misa.F=1 |
Write 1 to mstateen0.FCSR and read back |
Expect 0 if misa.F = 1 |
1 |
mstateen0_fcsr_roz |
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: |
Always successful |
2 states x 2 accesses x 6 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 |
mstateen0_context_op |
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_lower |
fcsr controls access to fcsr when misa.F = 0 |
If Zfinx is supported: |
Illegal instruction if 0, else successful |
stateen0_fcsr_op |
|
cp_mstateen0_se0_controls_sstateen0 |
mstateen.SE0 controls access to sstateen0 |
For mstateen0.SE0 = {0,1} write and read back sstateen0. |
Access fault if 0, success if 1. |
2 SE0*2R/W |
mstateen0_se0_op |
Note: All of these tests are performed in M-mode unless otherwise noted. |
|||||
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} |
|
sstateen_rv64_csrs |
{Smstateen_cg,Ssstateen_cg}/{cp_walking_ones} |
|
hstateen_rv64_csrs |
||
stateen_rv32_upper_bits_csrs |
{Smstateen_cg,Ssstateen_cg}/{cp_walking_ones} |
|
stateen_op |
{Smstateen_cg,Ssstateen_cg}/{cp_csr_illegal_accesses} |
|
stateen_illegal_state_access |
{Smstateen_cg,Ssstateen_cg}/{cp_csr_illegal_accesses} |
|
stateen_implicit_state_update |
Not tested: either behavior is permitted |
|
sstateen_user_access_control |
Ssstateen_cg/{cp_jvt, cp_fcsr_lower} |
|
mstateen_bit_correspondence |
{Smstateen_cg,Ssstateen_cg}/{cp_walking_ones} |
|
hstateen_encoding |
||
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} |
mstateen_lower_priv_roz |
TODO: clear an mstateen0 bit (e.g. FCSR or JVT) and check that the matching sstateen0 bit reads zero |
|
sstateen_vsmode_access_roz |
||
sstateen_ro1_bits |
{Smstateen_cg,Ssstateen_cg}/{cp_walking_ones} |
|
hstateen_ro1_bits |
||
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,Ssstateen_cg}/{cp_walking_ones} |
|
hstateen_bit_63_op |
Likewise, bit 63 of each hstateen correspondingly controls access to the matching sstateen CSR. |
|
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). |
|
mstateen0_enc_img |
Smstateen_cg/cp_walking_ones |
|
hstateen0_enc_img |
TODO: walk hstateen0 in hypervisor tests |
|
sstateen0_enc_img |
Ssstateen_cg/cp_walking_ones |
|
stateen0_c_op |
Not tested: custom state is non-standard and not certified |
|
stateen0_fcsr_op |
Smstateen_cg/{cp_fcsr, cp_fcsr_lower}, Ssstateen_cg/cp_fcsr_lower |
|
mstateen0_fcsr_roz |
Smstateen_cg/cp_fcsr_ro_zero |
|
stateen0_fcsr0_misa_f0_illegal_fpu_instr |
{Smstateen_cg,Ssstateen_cg}/{cp_fcsr_lower} |
|
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_mstateen0_se0_controls_sstateen0 |
hstateen0_se0_op |
The SE0 bit in hstateen0 controls access to the sstateen0 CSR. |
|
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. |
|
mstateen0_csrind_op |
TODO: mstateen0.CSRIND gating of siselect, sireg*, vsiselect, and vsireg* |
|
hstateen0_csrind_op |
||
mstateen0_imsic_op |
Smstateen_cg/cp_imsic |
|
hstateen0_imsic_op |
||
mstateen0_aia_op |
Smstateen_cg/cp_aia |
|
hstateen0_aia_op |
||
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. |
|
mstateen0_p1p13_op |
Smstateen_cg/cp_p1p13 |
|
mstateen0_srmcfg_op |
The SRMCFG bit in mstateen0 controls access to the srmcfg CSR introduced by the Ssqosid extension. |
Smstateen_cg/cp_srmcfg |
mstateen_ctr1 |
Smstateen_cg/cp_ctr |
|
mstateen_ctr0 |
Smstateen_cg/cp_ctr |
UDB Parameters: None.
B.12.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.12.4. Sscsrind Supervisor-Mode Indirect CSR Access
B.12.5. Smepmp Enhanced PMP
B.12.6. Smrnmi Machine-Mode Resumable Non-Maskable Interrupts
No test plan yet.
| Normative Rule | Rule Text | Coverpoints |
|---|---|---|
mstatus_mdt_clr_mnret |
||
sstatus_sdt_clr_mnret |
||
vsstatus_sdt_clr_mnret |
Additionally, if it is VU, then |
TODO: MNRET to VU-mode with Smdbltrp, Ssdbltrp, and H |
trap_unexp_rnmi |
||
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.12.7. Ssrnmi Supervisor-Mode Resumable Non-Maskable Interrupts
B.12.8. Smcntrpmf Counter Privilege Mode Filtering
B.12.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.12.10. Ssccfg Counter Delegation
B.12.11. Smdbltrp Machine Double Traps
No test plan yet.
| Normative Rule | Rule Text | Coverpoints |
|---|---|---|
mstatus_mie_clr_by_mdt |
||
mstatus_mie_clr_by_mdt_rv64 |
||
mstatus_mie_set_mdt_0 |
The |
TODO |
mstatus_mie_set_mdt_0_rv64 |
TODO |
|
mstatus_mdt_rst |
||
mstatus_mdt_not_set_rnmi |
||
mstatus_mdt_clr_mret_sret |
||
mstatus_mdt_clr_mnret |
||
sstatus_sdt_clr_mret_sret |
||
vsstatus_sdt_clr_mret_sret |
Additionally, if it is VU, then |
|
trap_exp |
||
trap_unexp_mdt_1 |
However, if |
UDB Parameters: None.
B.12.12. Ssdbltrp Supervisor Double Traps
No test plan yet.
| Normative Rule | Rule Text | Coverpoints |
|---|---|---|
sstatus_sdt |
||
sstatus_sdt_sstatus_sie_overwrite |
||
sstatus_sdt_trap |
||
sstatus_sdt_unexpected_trap |
However, if SDT is already set to 1, then this is an unexpected trap. |
TODO: 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: check that a trap into S-mode with SDT=1 is delivered to M-mode |
sstatus_sdt_double_trap_regs |
TODO: check mepc, mtval, and mstatus after a double trap |
|
sstatus_sdt_double_trap_mtval2 |
TODO: 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: check mcause=16 after a double trap |
sstatus_sdt_sret |
||
menvcfg_dte_op |
TODO: Ssdbltrp with menvcfg.DTE = 0 and 1 |
UDB Parameters: None.
B.12.13. Smctr Control Transfer Records
B.12.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.11.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 362 summarizes all of the UDB parameters that affect coverpoints in this testplan. Table 363 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: |
MIMPID_IMPLEMENTED |
Sm_cg/cp_mcsr_access |
Sm |
* false: |
MISALIGNED_LDST |
ExceptionsSm_cg/cp_{load_address_misaligned, store_address_misaligned, cp_misaligned_priority_load, cp_misaligned_priority_store}, Misalign_cg/cp_misalign, Misalign_cg/cp_misalign_cross64_hword, Misalign_cg/cp_misalign_cross64_word, Misalign_cg/cp_misalign_cross64_double, MisalignD_cg/cp_misalign, MisalignD_cg/cp_misalign_cross64_double, MisalignF_cg/cp_misalign, MisalignF_cg/cp_misalign_cross64_word, MisalignZca_cg/cp_misalign, MisalignZca_cg/cp_misalign_cross64_word, MisalignZca_cg/cp_misalign_cross64_double |
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 |
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 |
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: |
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_AVAILABLE |
Sdtrig |
Specifies if HCONTEXT is available |
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_AVAILABLE |
Sdtrig |
Specifies if MCONTEXT is available |
MCOUNTENABLE_EN |
Sm |
Indicates which counters can be delegated via
MCOUNTENABLE_EN[0:2] must all be false if |
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. |
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.
|
MISALIGNED_AMO |
Zaamo |
Whether or not the implementation supports misaligned atomics in main memory |
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. |
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. |
|
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_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. |
|
PMP_NA4_SUPPORTED |
Whether or not the Naturally Aligned four-byte (NA4) PMP address matching mode is supported. |
|
PMP_NAPOT_SUPPORTED |
Whether or not the Naturally Aligned Power-Of-Two (NAPOT) 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_MTVAL_ON_SHADOW_STACK_SOFTWARE_CHECK |
Zicfiss |
When true, When false, |
REPORT_CAUSE_IN_STVAL_ON_LANDING_PAD_SOFTWARE_CHECK |
Zicfilp |
When true, When false, |
REPORT_CAUSE_IN_STVAL_ON_SHADOW_STACK_SOFTWARE_CHECK |
Zicfiss |
When true, When false, |
REPORT_CAUSE_IN_VSTVAL_ON_LANDING_PAD_SOFTWARE_CHECK |
Zicfilp |
When true, When false, |
REPORT_CAUSE_IN_VSTVAL_ON_SHADOW_STACK_SOFTWARE_CHECK |
Zicfiss |
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. |
SCOUNTENABLE_EN |
S |
Indicates which counters can delegated via
SCOUNTENABLE_EN[0:2] must all be false if |
SCTRDEPTH_DEPTH_LEGAL_VALUES |
Smctr |
The set of supported actual depths for the Control Transfer Records (CTR) buffer. |
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. |
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 |
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. |
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 |
VSEI_INTR_IMPL |
Zicsr, H |
Whether or not virtual supervisor-level external interrupts are implemented. Possible values: true::
Virtual supervisor-level external interrupts are implemented.
false::
Virtual supervisor-level external interrupts are not implemented.
|
VSSI_INTR_IMPL |
Zicsr, H |
Whether or not virtual supervisor-level software interrupts are implemented. Possible values: true::
Virtual supervisor-level software interrupts are implemented.
false::
Virtual supervisor-level software interrupts are not implemented.
|
VSSTAGE_MODE_BARE |
H |
Whether or not writing mode=Bare is supported in the |
VSSTATUS_VS_EXISTS |
Zvl32b |
Some implementations provide a |
VSTI_INTR_IMPL |
Zicsr, H |
Whether or not virtual supervisor-level timer interrupts are implemented. If Sstc is implemented, then VSTI_INTR_IMPL must be true. Possible values: true::
Virtual supervisor-level timer interrupts are implemented.
false::
Virtual supervisor-level timer interrupts are not implemented.
|
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