Skip to content

Commit 9e347b3

Browse files
Improve organization of CRDs.
1 parent 0d1d406 commit 9e347b3

File tree

10 files changed

+94
-137
lines changed

10 files changed

+94
-137
lines changed

arch/certificate_class/MC.yaml

Lines changed: 3 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -1,38 +1,12 @@
11
# yaml-language-server: $schema=../../schemas/cert_class_schema.json
22

33
$schema: cert_class_schema.json#
4-
kind: certificate class
4+
kind: Processor CRD
55
name: MC
6-
long_name: Microcontroller Certificate Class
6+
long_name: Microcontroller Class CRD
77

88
introduction: |
9-
The MC certification class specifies requirements for microcontrollers.
10-
It targets microcontrollers running low-level software on an RTOS or bare-metal.
11-
This CRD is not intended for the smallest possible microcontrollers but rather for applications
12-
benefiting from a standardized microcontroller.
13-
See the https://docs.google.com/document/d/133SZKc18tLsQcT1o6gEmBUkjwrtg2ow63me54RQ1jiY[RISC-V CRDs]
14-
document for information relevant to all RISC-V CRDs.
15-
16-
naming_scheme: |
17-
The MC (M = Microcontroller, C = Certificate) has the following naming scheme (suffixes after MC
18-
are optional but in the below order):
19-
20-
MC<model>[*v*<version>]
21-
22-
Where:
23-
24-
* Left & right square braces denote optional.
25-
* <model> is a 3 digit integer. It is changed only when mandatory extensions are added to a CRD.
26-
** The one's digit is incremented when a small mandatory extension is added (e.g., Zicond)
27-
** The ten's digit is incremented when a medium mandatory extension is addded (e.g., PMP)
28-
** The hundreds's digit is incremented when a large mandatory extension is addded (e.g., V or H)
29-
* <version> is a semantic version (see semver.org) formatted as <major>[.<minor>.[patch]]. If <version> is omitted, the reference applies equally to all versions.
30-
** A <major> release indicates support for a new optional extension.
31-
** A <minor> release indicates one or more of the following changes to the certification tests associated with the CRD.
32-
*** Fix test bug or increase test coverage
33-
*** Add more allowed parameter values
34-
*** Support new extension version
35-
** A <patch> release indicates just CRD specification changes without any difference in functional behavior
9+
The MC (Microcontroller Class) targets processors running low-level software on an RTOS or bare-metal.
3610
3711
mandatory_priv_modes:
3812
- M
Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,12 @@
11
# yaml-language-server: $schema=../../schemas/cert_class_schema.json
22

33
$schema: cert_class_schema.json#
4-
kind: certificate class
4+
kind: Processor CRD
55
name: MockCertificateClass
66
long_name: Mock Certificate Class Long Name
77

88
introduction: |
99
Here's the Mock Certificate Class introduction.
1010
11-
naming_scheme: |
12-
Here's the Mock Certificate Class naming scheme.
13-
A Mock certificate class or model can have any name as long as it can be a hash key.
14-
1511
mandatory_priv_modes:
1612
- M

arch/certificate_model/MC100-32.yaml

Lines changed: 9 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -67,19 +67,17 @@ revision_history:
6767
changes:
6868
- Initial version
6969

70-
description: |
71-
MC100 is a basic RISC-V processor with minimal M-mode support:
70+
introduction: |
71+
The MC100 Processor CRD (Certification Requirements Document) defines the requirements
72+
a processor implementation must meet in order to be eligible for the associated MC100 certificate.
73+
MC100 is a basic RISC-V processor with minimal M-mode support and has 32-bit and 64-bit variants.
7274
73-
* The Unprivileged ISA is RV32I for MC100-32 and RV64I for MC100-64 with a few extensions suitable
74-
for a basic microcontroller
75-
* The M-mode features are those listed as mandatory in the associated RISC-V Privileged ISA manual
75+
MC100 is not intended for the smallest possible microcontrollers but rather for applications
76+
benefiting from a minimal but standardized microcontroller. It consists of:
7677
77-
Key features not included in MC100 (i.e., OUT OF SCOPE):
78-
79-
* Interrupt Controller (e.g., CLIC, CLINT, PLIC)
80-
* Features for modes other than M-mode
81-
* PMP
82-
* Debug & trace
78+
* Unprivileged ISA: RV32I for MC100-32 and RV64I for MC100-64 with a few extensions suitable
79+
for a basic microcontroller.
80+
* Privileged ISA: Only the M-mode features listed as mandatory in the RISC-V Privileged ISA manual
8381
8482
# Specification versions
8583
tsc_profile: null # None for MC100

backends/certificate_doc/templates/certificate.adoc.erb

Lines changed: 63 additions & 69 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
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.
6672
The CRDs refer to and augment information provided in existing ratified RVI standards.
6773

6874
There 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
7278
RISC-V implementations from basic microcontrollers to advanced Applications-class processors.
7379

7480
Each 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.
7681
Note 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

8489
Where:
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.
135138
These 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

177188
The Priv ISA requires reads of WARL fields to return some implementation-dependent deterministic legal value
178189
after the field is written with an illegal value.
179190
Certifying such behaviors is expensive and provides low value for a certificate since software can’t rely
180191
on 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).
184195
When not OUT-OF-SCOPE, the required behavior is defined as this might be more constrained in implementations than
185196
in the standard.
186197

187198
The following special cases for WARL are supported when explicitly listed in the corresponding CRD CSR field requirements:
199+
188200
1. 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+
196210
2. Probing for Options
211+
197212
* E.g., Writable misa bits
213+
198214
3. 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
204221
after the field is written with an illegal value.
205222
Certifying such behaviors is expensive and provides low value for a certificate since software can’t rely
206223
on 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
218235
verification 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"]
@@ -269,8 +263,8 @@ TBD
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

backends/portfolio_doc/templates/family_intro.erb

Lines changed: 0 additions & 11 deletions
This file was deleted.

lib/arch_obj_models/portfolio.rb

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,8 +24,10 @@ class PortfolioClass < DatabaseObjectect
2424
# @return [ConfiguredArchitecture] The defining ConfiguredArchitecture
2525
attr_reader :cfg_arch
2626

27+
# @return [String] Small enough (~1 paragraph) to be suitable immediately after a higher-level heading.
2728
def introduction = @data["introduction"]
28-
def naming_scheme = @data["naming_scheme"]
29+
30+
# @return [String] Large enough to need its own heading (generally one level deeper than the "introduction").
2931
def description = @data["description"]
3032

3133
# Returns true if other is the same class (not a derived class) and has the same name.
@@ -44,6 +46,10 @@ class PortfolioInstance < DatabaseObjectect
4446
# @return [ConfiguredArchitecture] The defining ConfiguredArchitecture
4547
attr_reader :cfg_arch
4648

49+
# @return [String] Small enough (~1 paragraph) to be suitable immediately after a higher-level heading.
50+
def introduction = @data["introduction"]
51+
52+
# @return [String] Large enough to need its own heading (generally one level deeper than the "introduction").
4753
def description = @data["description"]
4854

4955
# @return [Gem::Version] Semantic version of the PortfolioInstance

0 commit comments

Comments
 (0)