Skip to content

Commit 00213d2

Browse files
authored
Merge pull request #49 from riscv-software-src/crd-james
Crd james
2 parents c02ef47 + c0582e2 commit 00213d2

File tree

149 files changed

+1279
-804
lines changed

Some content is hidden

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

149 files changed

+1279
-804
lines changed

.github/workflows/pages.yml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -53,6 +53,8 @@ jobs:
5353
run: mkdir -p _site/manual
5454
- name: Create _site/pdfs
5555
run: mkdir -p _site/pdfs
56+
- name: Create _site/htmls
57+
run: mkdir -p _site/htmls
5658
- name: Copy cfg html
5759
run: cp -R gen/cfg_html_doc/generic_rv64/html _site/example_cfg
5860
- name: Create RVA Family PDF Spec
@@ -63,6 +65,10 @@ jobs:
6365
run: ./do gen:csc_crd_pdf[MC-1]
6466
- name: Copy MC-1 PDF
6567
run: cp gen/csc_crd_doc/pdf/MC-1.pdf _site/pdfs/MC-1.pdf
68+
- name: Create MC-1 HTML Spec
69+
run: ./do gen:csc_crd_html[MC-1]
70+
- name: Copy MC-1 HTML
71+
run: cp gen/csc_crd_doc/html/MC-1.html _site/htmls/MC-1.html
6672
- name: Copy manual html
6773
run: cp -R gen/manual/isa/top/all/html _site/manual
6874
- name: Setup Pages

README.adoc

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,9 +29,9 @@ This repository contains:
2929

3030
* Generate https://riscv-software-src.github.io/riscv-unified-db/manual/index.html[configuration-specific documentation] taylored to the set of implemented extensions and unnamed implementation options (_e.g._, `./do gen:html[generic_rv64]`).
3131
** Only implemented extensions/instructions/CSRs are included
32-
** Unreachable/unimplmented parts of the formal specification are pruned away
32+
** Unreachable/unimplemented parts of the formal specification are pruned away
3333
** A dedicated documentation page for every implemented instruction, including its encoding, pruned execution behavior, and what types of exceptions it may cause.
34-
** A dedication documentation page for every implemented CSR, including its (possibly runtime-changing) encoding, fields, and pruned behavior on reads and writes
34+
** A dedicated documentation page for every implemented CSR, including its (possibly runtime-changing) encoding, fields, and pruned behavior on reads and writes
3535
** Clickable links to all mentions of instructions, extensions, CSRs, CSR fields, and glossary terms.
3636
* Generate documentation for specific extensions (_e.g._, `./do gen:ext_pdf[B]`)
3737
** Automatically include a complete list of added instructions and CSRs

arch/README.adoc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -200,7 +200,7 @@ marchid: # <1>
200200
length: MXLEN # <4>
201201
description: | # <5>
202202
Asciidoc description
203-
definedBy: I # <6>
203+
definedBy: Sm # <6>
204204
fields: # <7>
205205
Architecture:
206206
location_rv32: 31-0 # <8>

arch/csc_crd/MC-1.yaml

Lines changed: 39 additions & 37 deletions
Original file line numberDiff line numberDiff line change
@@ -32,19 +32,38 @@ MC-1:
3232
mandatory:
3333
- name: I
3434
version: "~> 2.1"
35-
note: "The I extension is the base Integer instruction set and is considered an \"extension\" for convenience."
35+
- name: C
36+
version: "~> 2.2"
3637
param_constraints:
37-
PRECISE_SYNCHRONOUS_EXCEPTIONS:
38+
MUTABLE_MISA_C:
3839
schema:
39-
const: true
40-
TRAP_ON_UNIMPLEMENTED_CSR:
40+
const: false
41+
- name: M
42+
version: "~> 2.0"
43+
- name: Zicsr
44+
version: "~> 2.0"
45+
- name: Zicntr
46+
version: "~> 2.0"
47+
- name: Sm
48+
version: "~> 1.11"
49+
param_constraints:
50+
MTVEC_BASE_ALIGNMENT_DIRECT: {} # Unconstrained
51+
MTVEC_BASE_ALIGNMENT_VECTORED: {} # Unconstrained
52+
ARCH_ID: {} # Unconstrained
53+
IMP_ID: {} # Unconstrained
54+
VENDOR_ID_BANK: {} # Unconstrained
55+
VENDOR_ID_OFFSET: {} # Unconstrained
56+
MISA_CSR_IMPLEMENTED: {} # Unconstrained
57+
TIME_CSR_IMPLEMENTED: {} # Unconstrained
58+
MTVAL_WIDTH: {} # Unconstrained
59+
PHYS_ADDR_WIDTH: {} # Unconstrained
60+
PRECISE_SYNCHRONOUS_EXCEPTIONS:
4161
schema:
4262
const: true
43-
TRAP_ON_UNIMPLEMENTED_INSTRUCTION:
63+
TRAP_ON_ECALL_FROM_M:
4464
schema:
4565
const: true
46-
TRAP_ON_ECALL_FROM_M:
47-
note: REQ-UINST-017
66+
TRAP_ON_EBREAK:
4867
schema:
4968
const: true
5069
REPORT_VA_IN_MTVAL_ON_BREAKPOINT:
@@ -65,41 +84,16 @@ MC-1:
6584
M_MODE_ENDIANESS:
6685
schema:
6786
const: little
68-
# OPT-RDTIME doesn't need constraint (behavior defined by TIME_CSR_IMPLEMENTED)
69-
# OPT-MTIME-PADDR doesn't have parameter -- it's considered non-ISA by the database
70-
# OPT-MTIMECMP-PADDR doesn't have parameter -- it's considered non-ISA by the database
71-
# OPT-MSIP-PADDR doesn't have parameter -- it's considered non-ISA by the database
72-
# OPT-MHARTID doesn't need constrained (behavior is a builtin)
73-
# OPT-MVENDORID doesn't need constrained (but behavior is controlled by VENDOR_ID_BANK and VENDOR_ID_OFFSET)
74-
# OPT-MARCHID doesn't need constrained (but behavior is controlled by ARCH_ID)
75-
# OPT-MIMPID doesn't need constrained (but behavior is controlled by IMP_ID)
76-
# OPT-MISA doesn't need constrained (but behavior is controlled by MISA_CSR_IMPLEMENTED)
77-
# OPT-CLINT doesn't need a parameter; it is mandated in the spec
78-
# OPT-CLIC doesn't need a paramter
79-
MTVEC_BASE_ALIGNMENT_DIRECT:
80-
note: OPT-MTVEC-ALIGN-DIRECT
81-
schema:
82-
const: 4
83-
MTVEC_BASE_ALIGNMENT_VECTORED:
84-
note: OPT-MTVEV-ALIGN-VECTORED
85-
schema:
86-
const: 4
87-
ARCH_ID: {} # Unconstrained
8887
XLEN:
8988
schema:
9089
const: 32
91-
- name: C
92-
version: "~> 2.2"
93-
- name: M
94-
version: "~> 2.0"
95-
- name: Zicsr
96-
version: "~> 2.0"
97-
- name: Zicntr
98-
version: "~> 2.0"
90+
CONFIG_PTR_ADDRESS:
91+
schema:
92+
const: 0
9993
#XXX optional: {} # None
10094
optional:
101-
- name: B
102-
note: "This is just for testing. B isn't really optional for MC-1."
95+
- name: Zifencei
96+
note: "This is just for testing. Zifencei extension isn't really optional for MC-1."
10397

10498
requirement_groups:
10599
- name: MC-Unpriv
@@ -147,3 +141,11 @@ MC-1:
147141
description: Should return the most-significant 32-bits of the `mcycle` CSR when reading `cycleh`
148142
- name: REQ-M32CSR-002
149143
description: Should return the most-significant 32-bits of the `minstret` CSR when reading `instreth`
144+
145+
- name: MC-Priv
146+
description: |
147+
The MC-Priv defines Privileged ISA requirements.
148+
requirements:
149+
- name: REQ-PRIV-HARTID
150+
description: |
151+
One hart in system has to have a HARTID of 0. Reading `mhartid` on other CSRs provides some value.

arch/csr/I/pmpaddr0.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ pmpaddr0:
1010
priv_mode: M
1111
length: MXLEN
1212
description: PMP entry address
13-
definedBy: I
13+
definedBy: Sm
1414
fields:
1515
ADDR:
1616
location_rv32: 31-0

arch/csr/I/pmpaddr1.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ pmpaddr1:
1010
priv_mode: M
1111
length: MXLEN
1212
description: PMP entry address
13-
definedBy: I
13+
definedBy: Sm
1414
fields:
1515
ADDR:
1616
location_rv32: 31-0

arch/csr/I/pmpaddr10.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ pmpaddr10:
1010
priv_mode: M
1111
length: MXLEN
1212
description: PMP entry address
13-
definedBy: I
13+
definedBy: Sm
1414
fields:
1515
ADDR:
1616
location_rv32: 31-0

arch/csr/I/pmpaddr11.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ pmpaddr11:
1010
priv_mode: M
1111
length: MXLEN
1212
description: PMP entry address
13-
definedBy: I
13+
definedBy: Sm
1414
fields:
1515
ADDR:
1616
location_rv32: 31-0

arch/csr/I/pmpaddr12.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ pmpaddr12:
1010
priv_mode: M
1111
length: MXLEN
1212
description: PMP entry address
13-
definedBy: I
13+
definedBy: Sm
1414
fields:
1515
ADDR:
1616
location_rv32: 31-0

arch/csr/I/pmpaddr13.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ pmpaddr13:
1010
priv_mode: M
1111
length: MXLEN
1212
description: PMP entry address
13-
definedBy: I
13+
definedBy: Sm
1414
fields:
1515
ADDR:
1616
location_rv32: 31-0

0 commit comments

Comments
 (0)