1515// TODO: needs to be changed
1616:imagesoutdir: images
1717
18- = <%= cert_model.name %> Certification Requirements Document
18+ = <%= cert_model.name %> Processor Certification Requirements Document
1919
2020[Preface]
2121== Revision History
@@ -56,13 +56,19 @@ CSR field types::
5656<% end -%>
5757|===
5858
59- == Certification Requirements Documents (CRDs)
59+ == Introduction
6060
61- === Introduction
61+ <%= cert_model.introduction %>
62+
63+ <%= cert_class.introduction %>
64+
65+ === What's a CRD?
66+
67+ Certification Requirements Documents (CRDs) list requirements an implementation must meet
68+ to obtain an associated RVI (RISC-V International) certificate.
69+ CRDs are developed by the RVI CSC (Certification Steering Committee) organization in collaboration
70+ with the RVI TSC (Technical Steering Committee) organization who creates RISC-V standards.
6271
63- A Certification Requirements Document (CRD) lists requirements an implementation must meet
64- to obtain a specific RVI (RISC-V International) certificate.
65- CRDs are developed by the RVI CSC (Certification Steering Committee) organization.
6672The CRDs refer to and augment information provided in existing ratified RVI standards.
6773
6874There are a variety of certificates offered by RVI to accomodate the various RVI standards.
@@ -72,41 +78,39 @@ There are multiple classes of processor certificates available to accomodate the
7278RISC-V implementations from basic microcontrollers to advanced Applications-class processors.
7379
7480Each CRD has a list of mandatory behaviors along with a list of optional behaviors.
75- Each certificate has a name and version number that is shared by its associated CRD.
7681Note that not all behaviors allowed in RISC-V standards are supported by a particular CRD.
7782
78- === Naming Scheme
83+ === CRD Naming Scheme
7984
80- CRDs and certificates have the following naming scheme:
85+ CRDs have the following naming scheme:
8186
82- Format: <name > [*v* < version > ]
87+ Format: <name > [v < version > ]
8388
8489Where:
8590
8691* Left & right square braces denote optional.
8792* Less-than & greater-than signs just separate fields (i.e., they aren't present in the CRD name).
88- * < name > identifies the type of CRD/certificate (e.g., processor vs. non-processor system IP)
89- ** The < name > is changed when new mandatory behaviors are added to a certificate .
90- * < version > identifies a particular CRD/certificate release
93+ * < name > identifies the type of RISC-V standard (processor, non-processor system IP, or platform) along with
94+ any other information required to identify the variant of that standard .
95+ * < version > identifies a particular CRD release
9196** Format is < major > [.< minor > [.< patch > ]]
9297** Follows semantic versioning scheme (https://semver.org/)
9398** The < major > release is updated when certification test changes are made that *could* cause a previously certified
9499 implementation to now fail.
95- Examples are fixing a test bug or increasing test coverage.
100+ Examples are fixing a test bug, or increasing test coverage, or requiring a new version of a standard
96101 A < major > release of 0 is used for pre-release versions of a CRD and release versions start with 1.
97- ** The < minor > release is updated when a certificate increases support for optional behaviors.
102+ ** The < minor > release is updated when a CRD increases support for optional behaviors.
98103 Examples are supporting for new optional standards or
99104 supporting additional optional behaviors for standards already in a certificate.
100105** The < patch > release is updated when certification test changes are made that *can't* cause a previously certified
101- implementation to now fail or for non-functional changes to documentation .
106+ implementation to now fail.
102107 Examples are test changes not designed to increase coverage or fixing a documentation typo.
103108** If omitted, defaults to v1.0.0
104109** Examples: v1, v1.1, v2.3.1, 0.3.4 (pre-release)
105110
106- === Terminology
107-
108- ==== Requirements
111+ === CRD Terminology
109112
113+ .Requirement Types
110114[%autowidth]
111115|===
112116| Term | Meaning
@@ -118,8 +122,7 @@ Where:
118122| INCOMPATIBLE | If you implement it you won’t get a certificate
119123|===
120124
121- ==== Glossary
122-
125+ .Glossary
123126[%autowidth]
124127|===
125128| Term | Meaning
@@ -129,35 +132,45 @@ Where:
129132| AKA | “Also Known As”
130133|===
131134
132- === Processor Certificates
135+ === Processor CRDs
133136
134- Certificates are available for different classes of processors as shown in the table below .
137+ There are Processor CRDs for different classes of RISC-V processors .
135138These documents augment information in the related TSC Profile when available and/or other RVI standards documents
136139(e.g., Priv and Unpriv ISA manuals).
137- Please refer to the CRDs listed below for detailed certification requirements for the corresponding class of processors.
140+ Only ratified extensions are candidates for certification.
141+ This implies all custom extensions are also OUT-OF-SCOPE.
138142
139- [%autowidth]
140- |===
141- | Certificate | CRD | TSC Profile | Description
143+ ==== Processor CRD Naming Scheme
142144
143- | MC100-series | TBD | None | Minimal microcontroller that runs low-level software on an RTOS or bare-metal (no virtual memory)
144- | MC200-series | TBD | RVM | Advanced microcontroller
145- | RVB-series | TBD | RVB23 | Applications-class processors running Bespoke rich operating systems (e.g., Yocto Linux)
146- | RVA-series | TBD | RVA23 | Applications-class processors running standard rich operating systems (e.g., commercial Linux distributions, Android)
147- |===
145+ Processor CRD names have the following format:
148146
149- === RISC-V Extensions
147+ < class > < model > [ < -base > ]
150148
151- All optional extensions of the RISC-V ISA not explicitly mentioned by the individual CRDs are OUT-OF-SCOPE.
152- Only ratified extensions are candidates for certification.
153- This means all custom extensions are OUT-OF-SCOPE.
154- This is independent of where a custom extension opcodes are located
155- (i.e., either in the custom opcode space or standard & reserved opcode space).
149+ Where:
156150
157- === CSR Fields
151+ * < class > is MC for Microcontroller Class and AC for Apps-processor Class
152+ * < model > is 3-digit integer defined as follows:
153+ ** The hundreds's digit indicates the series
154+ ** The ten's digit identifies large differences in mandatory extensions (e.g., V, H) within the series
155+ ** The one's digit indentifies small/medium differences in mandatory extensions (e.g., Zicond, PMP) within the series
156+ * < base > is optional and is 32 for RV32I, 64 for RV64I, and 32E for RV32E
157+ ** If a CRD supports multiple bases and < base > is omitted in a reference, it applies to all supported bases
158+ ** If a CRD only supports one base then < base > is generally omitted
158159
159- ==== Definition of CSR Fields
160+ [%autowidth]
161+ |===
162+ | CRD | TSC Profile | Description
160163
164+ | MC100-series | TBD | 32/64-bit minimal microcontroller that runs low-level software on an RTOS or bare-metal (no virtual memory)
165+ | MC200-series | TBD | 32/64-bit intermediate microcontroller
166+ | MC300-series | TBD | 32/64-bit advanced microcontroller
167+ | AC100-series | RVB23 | 64-bit Apps-processor running Bespoke rich operating systems (e.g., Yocto Linux)
168+ | AC200-series | RVA23 | 64-bit Apps-processor running standard rich operating systems (e.g., commercial Linux distributions, Android)
169+ |===
170+
171+ ==== CSR Field Terminology
172+
173+ .Definition of CSR Fields
161174[%autowidth]
162175|===
163176| Field Type | Read Value After Writing Illegal Value | Read Value Function Of | Illegal Instruction Exception | Priv ISA Manual Quote
@@ -170,32 +183,36 @@ This is independent of where a custom extension opcodes are located
170183| Some whole read/write fields are reserved for future use. Implementations that do not furnish these fields must make them read-only zero.
171184|===
172185
173- ==== Treatment of CSR Fields
174-
175186*WARL (Write Anything, Read Legal)*:
176187
177188The Priv ISA requires reads of WARL fields to return some implementation-dependent deterministic legal value
178189after the field is written with an illegal value.
179190Certifying such behaviors is expensive and provides low value for a certificate since software can’t rely
180191on a particular behavior from one implementation to another.
181192
182- CSC processor CRDs define writes to WARL fields of illegal values to be OUT-OF-SCOPE unless otherwise stated
193+ Processor CRDs define writes to WARL fields of illegal values to be OUT-OF-SCOPE unless otherwise stated
183194(i.e., certification tests will only ever write legal values to WARL fields except for the special cases listed below).
184195When not OUT-OF-SCOPE, the required behavior is defined as this might be more constrained in implementations than
185196in the standard.
186197
187198The following special cases for WARL are supported when explicitly listed in the corresponding CRD CSR field requirements:
199+
1882001. Probing for Field Width
201+
189202* Some WARL fields are variable length such as the ASID field in the virtual memory extension.
190203* Here’s the algorithm recommended to discover the ASID width:
191204** The number of implemented ASID bits, termed ASIDLEN, may be determined by writing one to every bit position in
192205 the ASID field, then reading back the value in the satp CSR to see which bit positions in the ASID field hold a one.
193206* The RVCP-provided certification materials (certification tests, certification reference models) can map writes of
194207 illegal values to the ASID field to the corresponding read value as long as they are provided the ASIDLEN value
195208 for an implementation.
209+
1962102. Probing for Options
211+
197212* E.g., Writable misa bits
213+
1982143. Allowed values are a function of extension presence and/or their parameters
215+
199216* E.g., satp.mode legal write values
200217
201218*WLRL (Write Legal, Read Legal)*:
@@ -204,7 +221,7 @@ The Priv ISA requires reads of WLRL fields to return some implementation-depende
204221after the field is written with an illegal value.
205222Certifying such behaviors is expensive and provides low value for a certificate since software can’t rely
206223on a particular behavior.
207- CSC processor CRDs define writes to WLRL fields of illegal values to be OUT-OF-SCOPE unless otherwise stated
224+ Processor CRDs define writes to WLRL fields of illegal values to be OUT-OF-SCOPE unless otherwise stated
208225(i.e., certification tests will only ever write legal values to WLRL fields).
209226
210227*WPRI (Write Preserve, Read Ignore)*:
@@ -217,29 +234,6 @@ It is OUT-OF-SCOPE for certification tests to write all possible values of WPRI
217234(especially if they are more than just a few bits) and certification tests aren’t designed to be comprehensive
218235verification test suites anyways.
219236
220- === System IP CRDs
221-
222- TBD
223-
224- === Platform CRDs
225- TBD
226-
227- == <%= cert_class . name %> and <%= cert_model . name %> Introduction
228-
229- <%= cert_class . introduction %>
230-
231- === <%= cert_class . name %> Naming Scheme
232-
233- <%= cert_class . naming_scheme %>
234-
235- === <%= cert_class . name %> Class Description
236-
237- <%= cert_class . description %>
238-
239- === <%= cert_model . name %> Description
240-
241- <%= cert_model . description %>
242-
243237=== Related Specifications
244238
245239[cols="2,2,3,3,3"]
269263< < <
270264== Extensions
271265
272- Any RISC-V extension not listed in this section is OUT-OF-SCOPE so the <%= cert_model . name %>
273- certificate doesn't cover its associated behaviors.
266+ Any RISC-V extensions not listed in this section are OUT-OF-SCOPE.
267+ The <%= cert_model . name %> certificate doesn't cover their behaviors.
274268
275269<% ExtensionPresence . presence_types_obj . each do |presence_obj | -%>
276270
0 commit comments