Skip to content

Commit 2cb42b3

Browse files
Merge branch 'main' into 176-missing-description-for-mip-csr
Signed-off-by: james-ball-qualcomm <[email protected]>
2 parents cec5c43 + c550227 commit 2cb42b3

File tree

1,201 files changed

+88801
-86516
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

1,201 files changed

+88801
-86516
lines changed

arch/certificate_class/MC.yaml

Lines changed: 32 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -1,35 +1,38 @@
1-
MC:
2-
name: MC
3-
long_name: Microcontroller Certificate Class
1+
# yaml-language-server: $schema=../../schemas/cert_class_schema.json
42

5-
introduction: |
6-
This certification class specifies requirements for microcontrollers.
7-
It targets microcontrollers running low-level software on an RTOS or bare-metal.
8-
This CRD is not intended for the smallest possible microcontrollers but rather for applications
9-
benefiting from a standardized microcontroller.
10-
See the https://docs.google.com/document/d/133SZKc18tLsQcT1o6gEmBUkjwrtg2ow63me54RQ1jiY[RISC-V CRDs]
11-
document for information relevant to all RISC-V CRDs.
3+
$schema: cert_class_schema.json#
4+
kind: certificate class
5+
name: MC
6+
long_name: Microcontroller Certificate Class
127

13-
naming_scheme: |
14-
The MC (M = Microcontroller, C = Certificate) has the following naming scheme (suffixes after MC
15-
are optional but in the below order):
8+
introduction: |
9+
This 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.
1615
17-
MC<model>[v<version>]
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):
1819
19-
Where:
20+
MC<model>[v<version>]
2021
21-
* Left & right square braces denote optional.
22-
* \<model> is a 3 digit integer. It is changed only when mandatory extensions are added to a CRD.
23-
** The one's digit is incremented when a small mandatory extension is added (e.g., Zicond)
24-
** The ten's digit is incremented when a medium mandatory extension is addded (e.g., PMP)
25-
** The hundreds's digit is incremented when a large mandatory extension is addded (e.g., V or H)
26-
* \<version> is a semantic version (see semver.org) formatted as <major>[.<minor>.[patch]]. If \<version> is omitted, the reference applies equally to all versions.
27-
** A <major> release indicates support for a new optional extension.
28-
** A <minor> release indicates one or more of the following changes to the certification tests associated with the CRD.
29-
*** Fix test bug or increase test coverage
30-
*** Add more allowed parameter values
31-
*** Support new extension version
32-
** A <patch> release indicates just CRD specification changes without any difference in functional behavior
22+
Where:
3323
34-
mandatory_priv_modes:
35-
- M
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
36+
37+
mandatory_priv_modes:
38+
- M
Lines changed: 12 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,16 @@
1-
MockCertificateClass:
2-
name: MockCertificateClass
3-
long_name: Mock Certificate Class Long Name
1+
# yaml-language-server: $schema=../../schemas/cert_class_schema.json
42

5-
introduction: |
6-
Here's the Mock Certificate Class introduction.
3+
$schema: cert_class_schema.json#
4+
kind: certificate class
5+
name: MockCertificateClass
6+
long_name: Mock Certificate Class Long Name
77

8-
naming_scheme: |
9-
Here's the Mock Certificate Class naming scheme.
8+
introduction: |
9+
Here's the Mock Certificate Class introduction.
1010
11-
mandatory_priv_modes:
12-
- M
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.
1314
14-
description: Here's the Mock Certificate Class description.
15+
mandatory_priv_modes:
16+
- M

arch/certificate_model/MC100.yaml

Lines changed: 131 additions & 130 deletions
Original file line numberDiff line numberDiff line change
@@ -1,141 +1,142 @@
1-
# yaml-language-server: $schema=../../schemas/testplan_schema.json
1+
# yaml-language-server: $schema=../../schemas/cert_model_schema.json
22

3-
MC100:
4-
name: MC100
5-
long_name: Basic Microcontroller Certificate
6-
class: MC
7-
model: 100
3+
$schema: cert_model_schema.json#
4+
kind: certificate model
5+
name: MC100
6+
long_name: Basic Microcontroller Certificate
7+
class:
8+
$ref: certificate_class/MC.yaml#
89

9-
# Semantic versions within the model
10-
versions:
11-
- version: "1.0.0"
10+
# Semantic versions within the model
11+
versions:
12+
- version: "1.0.0"
1213

13-
# XLEN used by rakefile
14-
base: 32
14+
# XLEN used by rakefile
15+
base: 32
1516

16-
revision_history:
17-
- revision: "0.7"
18-
date: 2024-07-29
19-
changes:
20-
- First version after moving non-microcontroller content in this document to a new document
21-
called RISC-V CRDs (Certification Requirement Documents)
22-
- Change MC100 Unpriv ISA spec from
23-
https://riscv.org/wp-content/uploads/2016/06/riscv-spec-v2.1.pdf[riscv-spec-v2.1], May 31,
24-
2016 to https://github.com/riscv/riscv-isa-manual/releases/tag/Ratified-IMAFDQC since the
25-
former isn't ratified by the latter is the oldest ratified version.
26-
- Added requirements for WFI instruction
27-
- Added requirements related to msip memory-mapped register
28-
- revision: "0.6"
29-
date: 2024-07-11
30-
changes:
31-
- Supporting multiple MC versions to support customers wanting to certify existing microcontrollers not using the latest version of ratified standards.
32-
- Changed versioning scheme to use major.minor.patch instead of 3-digit major & minor.
33-
- Added a table showing the mapping from MC version to ISA manuals.
34-
- Reluctantly made interrupts OUT OF SCOPE for MC100 since only the CLINT interrupt controller
35-
was ratified at that time and isnt anticipated to be the interrupt controller used by MC100 implementations.
36-
- Clarified MANDATORY behaviors for mie and mip CSRs
37-
- Removed canonical discovery recipe because the OPT-* options directly inform the certification
38-
tests and certification reference model of the status of the various options. Also, canonical
39-
discovery recipes (e.g., probing for CLIC) violate the certification approach of avoiding writing
40-
potentially illegal values to CSR fields.
41-
- Added more options for interrupts
42-
- Moved non-microcontroller content in this document to a new document called RISC-V Certification Plans
43-
- revision: "0.5"
44-
date: 2024-06-03
45-
changes:
46-
- Renamed to RISC-V Microcontroller Certification Plan based on Jasons recommendation
47-
- Added mvendorid, marchid, mimpid, and mhardid read-only priv CSRs because Allen pointed out
48-
these are mandatory in M-mode v1.13 (probably older versions too, havent looked yet).
49-
- Added table showing mapping of MC versions to associated RISC-V specifications
50-
- revision: "0.4"
51-
date: 2024-06-03
52-
changes:
53-
- Added M-mode instruction requirements
54-
- Made Zicntr MANDATORY due to very low cost for implementations to support (in the spirit of minimizing options).
55-
- Removed OPT-CNTR-PREC since minstret and mcycle must be a full 64 bits to be standard-compliant.
56-
- revision: "0.3"
57-
date: 2024-05-25
58-
changes:
59-
- Includes Zicntr as OPTIONAL and then has only 32-bit counters for instret and cycle.
60-
- revision: "0.2"
61-
date: 2024-05-20
62-
changes:
63-
- Very early draft
64-
- revision: "0.1"
65-
date: 2024-05-16
66-
changes:
67-
- Initial version
17+
revision_history:
18+
- revision: "0.7.0"
19+
date: 2024-07-29
20+
changes:
21+
- First version after moving non-microcontroller content in this document to a new document
22+
called "RISC-V CRDs (Certification Requirement Documents)"
23+
- Change MC100 Unpriv ISA spec from
24+
"https://riscv.org/wp-content/uploads/2016/06/riscv-spec-v2.1.pdf[riscv-spec-v2.1], May 31,
25+
2016" to https://github.com/riscv/riscv-isa-manual/releases/tag/Ratified-IMAFDQC since the
26+
former isn't ratified by the latter is the oldest ratified version.
27+
- Added requirements for WFI instruction
28+
- Added requirements related to msip memory-mapped register
29+
- revision: "0.6.0"
30+
date: 2024-07-11
31+
changes:
32+
- Supporting multiple MC versions to support customers wanting to certify existing microcontrollers not using the latest version of ratified standards.
33+
- Changed versioning scheme to use major.minor.patch instead of 3-digit major & minor.
34+
- Added a table showing the mapping from MC version to ISA manuals.
35+
- Reluctantly made interrupts OUT OF SCOPE for MC100 since only the CLINT interrupt controller
36+
was ratified at that time and isn't anticipated to be the interrupt controller used by MC100 implementations.
37+
- Clarified MANDATORY behaviors for mie and mip CSRs
38+
- Removed canonical discovery recipe because the OPT-* options directly inform the certification
39+
tests and certification reference model of the status of the various options. Also, canonical
40+
discovery recipes (e.g., probing for CLIC) violate the certification approach of avoiding writing
41+
potentially illegal values to CSR fields.
42+
- Added more options for interrupts
43+
- Moved non-microcontroller content in this document to a new document called "RISC-V Certification Plans"
44+
- revision: "0.5.0"
45+
date: 2024-06-03
46+
changes:
47+
- Renamed to "RISC-V Microcontroller Certification Plan" based on Jason's recommendation
48+
- Added mvendorid, marchid, mimpid, and mhardid read-only priv CSRs because Allen pointed out
49+
these are mandatory in M-mode v1.13 (probably older versions too, haven't looked yet).
50+
- Added table showing mapping of MC versions to associated RISC-V specifications
51+
- revision: "0.4.0"
52+
date: 2024-06-03
53+
changes:
54+
- Added M-mode instruction requirements
55+
- Made Zicntr MANDATORY due to very low cost for implementations to support (in the spirit of minimizing options).
56+
- Removed OPT-CNTR-PREC since minstret and mcycle must be a full 64 bits to be standard-compliant.
57+
- revision: "0.3.0"
58+
date: 2024-05-25
59+
changes:
60+
- Includes Zicntr as OPTIONAL and then has only 32-bit counters for instret and cycle.
61+
- revision: "0.2.0"
62+
date: 2024-05-20
63+
changes:
64+
- Very early draft
65+
- revision: "0.1.0"
66+
date: 2024-05-16
67+
changes:
68+
- Initial version
6869

69-
description: |
70-
MC100 can be though of as minimal 32-bit RISC-V processors with M-mode support:
70+
description: |
71+
MC100 can be though of as minimal 32-bit RISC-V processors with M-mode support:
7172
72-
* The Unprivileged ISA is RV32I with a few extensions suitable for a basic microcontroller
73-
* The M-mode features are those listed as mandatory in the associated RISC-V Privileged ISA manual
73+
* The Unprivileged ISA is RV32I with a few extensions suitable for a basic microcontroller
74+
* The M-mode features are those listed as mandatory in the associated RISC-V Privileged ISA manual
7475
75-
Key features not included in MC100 (i.e., OUT OF SCOPE):
76+
Key features not included in MC100 (i.e., OUT OF SCOPE):
7677
77-
* Interrupt Controller (e.g., CLIC, CLINT, PLIC)
78-
* Features for modes other than M-mode
79-
* PMP
80-
* Debug & trace (TBD)
78+
* Interrupt Controller (e.g., CLIC, CLINT, PLIC)
79+
* Features for modes other than M-mode
80+
* PMP
81+
* Debug & trace (TBD)
8182
82-
# Specification versions
83-
tsc_profile: null # None for MC100
84-
unpriv_isa_manual_revision: "20191213"
85-
priv_isa_manual_revision: "20190608-Priv-MSU-Ratified"
86-
debug_manual_revision: "0.13.2"
83+
# Specification versions
84+
tsc_profile: null # None for MC100
85+
unpriv_isa_manual_revision: "20191213"
86+
priv_isa_manual_revision: "20190608-Priv-MSU-Ratified"
87+
debug_manual_revision: "0.13.2"
8788

8889
# XXX - Remove version information since specifying priv/unpriv ISA manual should imply this.
89-
extensions:
90-
I:
91-
version: "~> 2.1"
92-
presence: mandatory
93-
C:
94-
version: "~> 2.2"
95-
presence: mandatory
96-
M:
97-
version: "~> 2.0"
98-
presence: mandatory
99-
Zicsr:
100-
version: "~> 2.0"
101-
presence: mandatory
102-
Zicntr:
103-
version: "~> 2.0"
104-
presence: mandatory
105-
parameters:
106-
TIME_CSR_IMPLEMENTED: {} # Unconstrained
107-
Sm:
108-
version: "~> 1.11.0"
109-
presence: mandatory
110-
parameters:
111-
MTVEC_BASE_ALIGNMENT_DIRECT: {} # Unconstrained
112-
MTVEC_BASE_ALIGNMENT_VECTORED: {} # Unconstrained
113-
ARCH_ID: {} # Unconstrained
114-
IMP_ID: {} # Unconstrained
115-
VENDOR_ID_BANK: {} # Unconstrained
116-
VENDOR_ID_OFFSET: {} # Unconstrained
117-
MISA_CSR_IMPLEMENTED: {} # Unconstrained
118-
MTVAL_WIDTH: {} # Unconstrained
119-
MTVEC_MODES: {} # Unconstrained
120-
PHYS_ADDR_WIDTH: {} # Unconstrained
121-
MISALIGNED_LDST: {} # Unconstrained
122-
MISALIGNED_LDST_EXCEPTION_PRIORITY : {} # Unconstrained
123-
MISALIGNED_MAX_ATOMICITY_GRANULE_SIZE: {} # Unconstrained
124-
MISALIGNED_SPLIT_STRATEGY:
125-
schema:
126-
const: by_byte
127-
PRECISE_SYNCHRONOUS_EXCEPTIONS:
128-
schema:
129-
const: true
130-
TRAP_ON_ECALL_FROM_M:
131-
schema:
132-
const: true
133-
TRAP_ON_EBREAK:
134-
schema:
135-
const: true
136-
M_MODE_ENDIANESS:
137-
schema:
138-
const: little
139-
XLEN:
140-
schema:
141-
const: 32
90+
extensions:
91+
I:
92+
version: "~> 2.1"
93+
presence: mandatory
94+
C:
95+
version: "~> 2.2"
96+
presence: mandatory
97+
M:
98+
version: "~> 2.0"
99+
presence: mandatory
100+
Zicsr:
101+
version: "~> 2.0"
102+
presence: mandatory
103+
Zicntr:
104+
version: "~> 2.0"
105+
presence: mandatory
106+
parameters:
107+
TIME_CSR_IMPLEMENTED: {} # Unconstrained
108+
Sm:
109+
version: "~> 1.11.0"
110+
presence: mandatory
111+
parameters:
112+
MTVEC_BASE_ALIGNMENT_DIRECT: {} # Unconstrained
113+
MTVEC_BASE_ALIGNMENT_VECTORED: {} # Unconstrained
114+
ARCH_ID: {} # Unconstrained
115+
IMP_ID: {} # Unconstrained
116+
VENDOR_ID_BANK: {} # Unconstrained
117+
VENDOR_ID_OFFSET: {} # Unconstrained
118+
MISA_CSR_IMPLEMENTED: {} # Unconstrained
119+
MTVAL_WIDTH: {} # Unconstrained
120+
MTVEC_MODES: {} # Unconstrained
121+
PHYS_ADDR_WIDTH: {} # Unconstrained
122+
MISALIGNED_LDST: {} # Unconstrained
123+
MISALIGNED_LDST_EXCEPTION_PRIORITY : {} # Unconstrained
124+
MISALIGNED_MAX_ATOMICITY_GRANULE_SIZE: {} # Unconstrained
125+
MISALIGNED_SPLIT_STRATEGY:
126+
schema:
127+
const: by_byte
128+
PRECISE_SYNCHRONOUS_EXCEPTIONS:
129+
schema:
130+
const: true
131+
TRAP_ON_ECALL_FROM_M:
132+
schema:
133+
const: true
134+
TRAP_ON_EBREAK:
135+
schema:
136+
const: true
137+
M_MODE_ENDIANESS:
138+
schema:
139+
const: little
140+
XLEN:
141+
schema:
142+
const: 32

0 commit comments

Comments
 (0)