Skip to content

Commit 31c9e15

Browse files
authored
Merge branch 'main' into fixDefined
2 parents bae8f5b + 9f0f7bd commit 31c9e15

Some content is hidden

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

89 files changed

+3357
-820
lines changed

.github/workflows/pages.yml

Lines changed: 16 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -71,14 +71,22 @@ jobs:
7171
run: ./do gen:profile[RVI20]
7272
- name: Copy RVI20 Profile Release PDF
7373
run: cp gen/profile_doc/pdf/RVA20.pdf _site/pdfs/RVI20.pdf
74-
- name: Create MC100 PDF Spec
75-
run: ./do gen:cert_model_pdf[MC100]
76-
- name: Copy MC100 PDF
77-
run: cp gen/certificate_doc/pdf/MC100.pdf _site/pdfs/MC100.pdf
78-
- name: Create MC100 HTML Spec
79-
run: ./do gen:cert_model_html[MC100]
80-
- name: Copy MC100 HTML
81-
run: cp gen/certificate_doc/html/MC100.html _site/htmls/MC100.html
74+
- name: Create MC100-32 PDF Spec
75+
run: ./do gen:cert_model_pdf[MC100-32]
76+
- name: Copy MC100-32 PDF
77+
run: cp gen/certificate_doc/pdf/MC100-32.pdf _site/pdfs/MC100-32.pdf
78+
- name: Create MC100-32 HTML Spec
79+
run: ./do gen:cert_model_html[MC100-32]
80+
- name: Copy MC100-32 HTML
81+
run: cp gen/certificate_doc/html/MC100-32.html _site/htmls/MC100-32.html
82+
- name: Create MC100-64 PDF Spec
83+
run: ./do gen:cert_model_pdf[MC100-64]
84+
- name: Copy MC100-64 PDF
85+
run: cp gen/certificate_doc/pdf/MC100-64.pdf _site/pdfs/MC100-64.pdf
86+
- name: Create MC100-64 HTML Spec
87+
run: ./do gen:cert_model_html[MC100-64]
88+
- name: Copy MC100-64 HTML
89+
run: cp gen/certificate_doc/html/MC100-64.html _site/htmls/MC100-64.html
8290
- name: Copy manual html
8391
run: cp -R gen/manual/isa/top/all/html _site/manual
8492
- name: Setup Pages

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,3 +14,4 @@ gen
1414
node_modules
1515
_site
1616
images
17+
*.log

.pre-commit-config.yaml

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
---
22
exclude: ^docs/ruby/ # All generated code
3+
default_language_version:
4+
python: python3.12
35

46
repos:
57
- repo: https://github.com/pre-commit/pre-commit-hooks
@@ -55,3 +57,13 @@ repos:
5557
# alias: check-jsonschema-manual-version
5658
# files: ^arch/manual/.*\.(yaml|yml)$
5759
# args: ["--schemafile", "schemas/manual_version_schema.json"]
60+
61+
- repo: https://github.com/psf/black-pre-commit-mirror
62+
rev: 24.8.0
63+
hooks:
64+
- id: black
65+
66+
- repo: https://github.com/asottile/pyupgrade
67+
rev: v3.19.1
68+
hooks:
69+
- id: pyupgrade

.vscode/launch.json

Lines changed: 19 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,25 @@
33
"configurations": [
44
{
55
"type": "rdbg",
6-
"name": "RVA20 Profile",
6+
"name": "MC100-32",
7+
"request": "launch",
8+
"command": "bundle exec rake",
9+
"script": "gen:cert_model_pdf[MC100-32]",
10+
"args": [],
11+
"askParameters": false
12+
},
13+
{
14+
"type": "rdbg",
15+
"name": "MC200-32",
16+
"request": "launch",
17+
"command": "bundle exec rake",
18+
"script": "gen:cert_model_pdf[MC200-32]",
19+
"args": [],
20+
"askParameters": false
21+
},
22+
{
23+
"type": "rdbg",
24+
"name": "RVA20",
725
"request": "launch",
826
"command": "bundle exec rake",
927
"script": "gen:profile[RVA20]",

README.adoc

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,8 @@ The following artifacts have been generated from the top of the `main` branch:
1111
* https://riscv-software-src.github.io/riscv-unified-db/pdfs/RVI20.pdf[RVI20 Profile Release]
1212
* https://riscv-software-src.github.io/riscv-unified-db/pdfs/RVA20.pdf[RVA20 Profile Release]
1313
* https://riscv-software-src.github.io/riscv-unified-db/pdfs/RVA22.pdf[RVA22 Profile Release]
14-
* https://riscv-software-src.github.io/riscv-unified-db/pdfs/MC100.pdf[MC100 Certification Requirements Document]
14+
* https://riscv-software-src.github.io/riscv-unified-db/pdfs/MC100-32.pdf[MC100-32 Certification Requirements Document]
15+
* https://riscv-software-src.github.io/riscv-unified-db/pdfs/MC100-64.pdf[MC100-64 Certification Requirements Document]
1516

1617
== Overview
1718

Rakefile

Lines changed: 44 additions & 49 deletions
Original file line numberDiff line numberDiff line change
@@ -327,68 +327,63 @@ namespace :test do
327327
DESC
328328
task :nightly do
329329
Rake::Task["regress"].invoke
330-
331-
Rake::Task["#{$root}/gen/certificate_doc/pdf/MC100.pdf"].invoke
332-
Rake::Task["#{$root}/gen/profile_doc/pdf/RVA20.pdf"].invoke
333-
Rake::Task["#{$root}/gen/profile_doc/pdf/RVA22.pdf"].invoke
334-
Rake::Task["#{$root}/gen/profile_doc/pdf/RVI20.pdf"].invoke
335-
330+
Rake::Task["portfolios"].invoke
336331
puts
337332
puts "Nightly regression test PASSED"
338333
end
339334
end
340335

341336
desc <<~DESC
342-
Generate all portfolio-based PDFs (certificates and profiles).
337+
Generate all portfolio-based PDF artifacts (certificates and profiles)
343338
DESC
344-
task :portfolio_pdfs do
345-
puts ""
346-
puts "==================================="
347-
puts "Generating MC100"
348-
puts "==================================="
349-
puts ""
350-
Rake::Task["#{$root}/gen/certificate_doc/pdf/MC100.pdf"].invoke
351-
352-
puts ""
353-
puts "=================================================="
354-
puts "Generating MockCertificateModel"
355-
puts "=================================================="
356-
puts ""
339+
task :portfolios do
340+
portfolio_start_msg("MockCertificateModel")
357341
Rake::Task["#{$root}/gen/certificate_doc/pdf/MockCertificateModel.pdf"].invoke
358-
359-
puts ""
360-
puts "==================================="
361-
puts "Generating RVA20"
362-
puts "==================================="
363-
puts ""
342+
portfolio_start_msg("MockProfileRelease")
343+
Rake::Task["#{$root}/gen/profile_doc/pdf/MockProfileRelease.pdf"].invoke
344+
portfolio_start_msg("MC100-32")
345+
Rake::Task["#{$root}/gen/certificate_doc/pdf/MC100-32.pdf"].invoke
346+
portfolio_start_msg("MC100-64")
347+
Rake::Task["#{$root}/gen/certificate_doc/pdf/MC100-64.pdf"].invoke
348+
portfolio_start_msg("MC200-32")
349+
Rake::Task["#{$root}/gen/certificate_doc/pdf/MC200-32.pdf"].invoke
350+
portfolio_start_msg("MC200-64")
351+
Rake::Task["#{$root}/gen/certificate_doc/pdf/MC200-64.pdf"].invoke
352+
portfolio_start_msg("MC300-32")
353+
Rake::Task["#{$root}/gen/certificate_doc/pdf/MC300-32.pdf"].invoke
354+
portfolio_start_msg("MC300-64")
355+
Rake::Task["#{$root}/gen/certificate_doc/pdf/MC300-64.pdf"].invoke
356+
portfolio_start_msg("RVI20")
357+
Rake::Task["#{$root}/gen/profile_doc/pdf/RVI20.pdf"].invoke
358+
portfolio_start_msg("RVA20")
364359
Rake::Task["#{$root}/gen/profile_doc/pdf/RVA20.pdf"].invoke
365-
366-
puts ""
367-
puts "==================================="
368-
puts "Generating RVA22"
369-
puts "==================================="
370-
puts ""
360+
portfolio_start_msg("RVA22")
371361
Rake::Task["#{$root}/gen/profile_doc/pdf/RVA22.pdf"].invoke
362+
portfolio_start_msg("RVA23")
363+
Rake::Task["#{$root}/gen/profile_doc/pdf/RVA23.pdf"].invoke
364+
portfolio_start_msg("RVB23")
365+
Rake::Task["#{$root}/gen/profile_doc/pdf/RVB23.pdf"].invoke
366+
end
372367

368+
def portfolio_start_msg(name)
373369
puts ""
374-
puts "==================================="
375-
puts "Generating RVI20"
376-
puts "==================================="
377-
puts ""
378-
Rake::Task["#{$root}/gen/profile_doc/pdf/RVI20.pdf"].invoke
379-
380-
puts ""
381-
puts "==================================="
382-
puts "Generating MockProfileRelease"
383-
puts "==================================="
370+
puts "================================================================================================="
371+
puts "#{name}"
372+
puts "================================================================================================="
384373
puts ""
385-
Rake::Task["#{$root}/gen/profile_doc/pdf/MockProfileRelease.pdf"].invoke
386374
end
387375

388376
# Shortcut targets for building profiles and certificates.
389-
task MC100: "#{$root}/gen/certificate_doc/pdf/MC100.pdf"
390-
task MockCertificateModel: "#{$root}/gen/certificate_doc/pdf/MockCertificateModel.pdf"
391-
task RVI20: "#{$root}/gen/profile_doc/pdf/RVI20.pdf"
392-
task RVA20: "#{$root}/gen/profile_doc/pdf/RVA20.pdf"
393-
task RVA22: "#{$root}/gen/profile_doc/pdf/RVA22.pdf"
394-
task MockProfileRelease: "#{$root}/gen/profile_doc/pdf/MockProfileRelease.pdf"
377+
task "MockCertificateModel": "#{$root}/gen/certificate_doc/pdf/MockCertificateModel.pdf"
378+
task "MC100-32": "#{$root}/gen/certificate_doc/pdf/MC100-32.pdf"
379+
task "MC100-64": "#{$root}/gen/certificate_doc/pdf/MC100-64.pdf"
380+
task "MC200-32": "#{$root}/gen/certificate_doc/pdf/MC200-32.pdf"
381+
task "MC200-64": "#{$root}/gen/certificate_doc/pdf/MC200-64.pdf"
382+
task "MC300-32": "#{$root}/gen/certificate_doc/pdf/MC300-32.pdf"
383+
task "MC300-64": "#{$root}/gen/certificate_doc/pdf/MC300-64.pdf"
384+
task "MockProfileRelease": "#{$root}/gen/profile_doc/pdf/MockProfileRelease.pdf"
385+
task "RVI20": "#{$root}/gen/profile_doc/pdf/RVI20.pdf"
386+
task "RVA20": "#{$root}/gen/profile_doc/pdf/RVA20.pdf"
387+
task "RVA22": "#{$root}/gen/profile_doc/pdf/RVA22.pdf"
388+
task "RVA23": "#{$root}/gen/profile_doc/pdf/RVA23.pdf"
389+
task "RVB23": "#{$root}/gen/profile_doc/pdf/RVB23.pdf"

arch/certificate_class/MC.yaml

Lines changed: 4 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -1,38 +1,13 @@
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
5+
processor_kind: Microcontroller
56
name: MC
6-
long_name: Microcontroller Certificate Class
7+
long_name: Microcontroller Class CRD
78

89
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.
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 added (e.g., PMP)
28-
** The hundreds's digit is incremented when a large mandatory extension is added (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
10+
The MC (Microcontroller Class) targets processors running low-level software on an RTOS or bare-metal.
3611
3712
mandatory_priv_modes:
3813
- M
Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,13 @@
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
5+
processor_kind: Apps Processor
56
name: MockCertificateClass
67
long_name: Mock Certificate Class Long Name
78

89
introduction: |
910
Here's the Mock Certificate Class introduction.
1011
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-
1512
mandatory_priv_modes:
1613
- M

arch/certificate_model/MC100.yaml renamed to arch/certificate_model/MC100-32.yaml

Lines changed: 11 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,8 @@
22

33
$schema: cert_model_schema.json#
44
kind: certificate model
5-
name: MC100
6-
long_name: Basic Microcontroller Certificate
5+
name: MC100-32
6+
long_name: Basic 32-bit Microcontroller Certificate
77
class:
88
$ref: certificate_class/MC.yaml#
99

@@ -67,18 +67,17 @@ revision_history:
6767
changes:
6868
- Initial version
6969

70-
description: |
71-
MC100 can be though of as minimal 32-bit RISC-V processors with 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 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
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:
7577
76-
Key features not included in MC100 (i.e., OUT OF SCOPE):
77-
78-
* Interrupt Controller (e.g., CLIC, CLINT, PLIC)
79-
* Features for modes other than M-mode
80-
* PMP
81-
* Debug & trace (TBD)
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
8281
8382
# Specification versions
8483
tsc_profile: null # None for MC100
Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
# yaml-language-server: $schema=../../schemas/cert_model_schema.json
2+
3+
$schema: cert_model_schema.json#
4+
kind: certificate model
5+
name: MC100-64
6+
long_name: Basic 64-bit Microcontroller Certificate
7+
class:
8+
$ref: certificate_class/MC.yaml#
9+
10+
$inherits: "certificate_model/MC100-32.yaml#"
11+
12+
# XLEN used by rakefile
13+
base: 64
14+
15+
extensions:
16+
Sm:
17+
parameters:
18+
XLEN:
19+
schema:
20+
const: 64

0 commit comments

Comments
 (0)