Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Crd james #49

Merged
merged 17 commits into from
Oct 3, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
17 commits
Select commit Hold shift + click to select a range
d834e91
Merge remote-tracking branch 'origin/main' into crd-james
james-ball-qualcomm Sep 26, 2024
0e12df8
Remove files accidentally checked in
james-ball-qualcomm Sep 26, 2024
60ade32
Merge branch 'main' into crd-james
james-ball-qualcomm Sep 26, 2024
e5f0e46
Fix: Wasn't looking in optional extensions to find all in scope param…
james-ball-qualcomm Sep 27, 2024
0afa6cb
Improving MC-1 YAML and allow sorting of parameters.
james-ball-qualcomm Sep 27, 2024
b48a51b
Created Sm extension and moved many I extension parameters to it.
james-ball-qualcomm Sep 30, 2024
36d8afc
Added "changes" to Sm extension and changed definedBy from I to Sm fo…
james-ball-qualcomm Oct 1, 2024
dfc6c6d
Added instruction and CSR appendixes to CRD
james-ball-qualcomm Oct 2, 2024
15dd2cc
Add Sm to generic_rv64 config.
dhower-qc Oct 2, 2024
1fde0fd
Fix for issue #56 and moved misaligned LD/ST parameter from I to Sm s…
james-ball-qualcomm Oct 2, 2024
d184177
Add missing MTVEC_MODES param to generic_rv64
dhower-qc Oct 2, 2024
598678a
Merge remote-tracking branch 'origin/crd-james' into crd-james
james-ball-qualcomm Oct 2, 2024
ad8477a
Merge remote-tracking branch 'origin/crd-james' into crd-james
james-ball-qualcomm Oct 2, 2024
c5d7846
Merge remote-tracking branch 'origin/main' into crd-james
james-ball-qualcomm Oct 2, 2024
e9f6907
Merge branch 'main' into crd-james
james-ball-qualcomm Oct 2, 2024
cc96b48
Adding CRD HTML to pages.
james-ball-qualcomm Oct 2, 2024
c0582e2
Merge branch 'crd-james' of https://github.com/riscv-software-src/ris…
james-ball-qualcomm Oct 2, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions .github/workflows/pages.yml
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,8 @@ jobs:
run: mkdir -p _site/manual
- name: Create _site/pdfs
run: mkdir -p _site/pdfs
- name: Create _site/htmls
run: mkdir -p _site/htmls
- name: Copy cfg html
run: cp -R gen/cfg_html_doc/generic_rv64/html _site/example_cfg
- name: Create RVA Family PDF Spec
Expand All @@ -63,6 +65,10 @@ jobs:
run: ./do gen:csc_crd_pdf[MC-1]
- name: Copy MC-1 PDF
run: cp gen/csc_crd_doc/pdf/MC-1.pdf _site/pdfs/MC-1.pdf
- name: Create MC-1 HTML Spec
run: ./do gen:csc_crd_html[MC-1]
- name: Copy MC-1 HTML
run: cp gen/csc_crd_doc/html/MC-1.html _site/htmls/MC-1.html
- name: Copy manual html
run: cp -R gen/manual/isa/top/all/html _site/manual
- name: Setup Pages
Expand Down
4 changes: 2 additions & 2 deletions README.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -29,9 +29,9 @@ This repository contains:

* 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]`).
** Only implemented extensions/instructions/CSRs are included
** Unreachable/unimplmented parts of the formal specification are pruned away
** Unreachable/unimplemented parts of the formal specification are pruned away
** A dedicated documentation page for every implemented instruction, including its encoding, pruned execution behavior, and what types of exceptions it may cause.
** A dedication documentation page for every implemented CSR, including its (possibly runtime-changing) encoding, fields, and pruned behavior on reads and writes
** A dedicated documentation page for every implemented CSR, including its (possibly runtime-changing) encoding, fields, and pruned behavior on reads and writes
** Clickable links to all mentions of instructions, extensions, CSRs, CSR fields, and glossary terms.
* Generate documentation for specific extensions (_e.g._, `./do gen:ext_pdf[B]`)
** Automatically include a complete list of added instructions and CSRs
Expand Down
2 changes: 1 addition & 1 deletion arch/README.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -200,7 +200,7 @@ marchid: # <1>
length: MXLEN # <4>
description: | # <5>
Asciidoc description
definedBy: I # <6>
definedBy: Sm # <6>
fields: # <7>
Architecture:
location_rv32: 31-0 # <8>
Expand Down
76 changes: 39 additions & 37 deletions arch/csc_crd/MC-1.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -32,19 +32,38 @@ MC-1:
mandatory:
- name: I
version: "~> 2.1"
note: "The I extension is the base Integer instruction set and is considered an \"extension\" for convenience."
- name: C
version: "~> 2.2"
param_constraints:
PRECISE_SYNCHRONOUS_EXCEPTIONS:
MUTABLE_MISA_C:
schema:
const: true
TRAP_ON_UNIMPLEMENTED_CSR:
const: false
- name: M
version: "~> 2.0"
- name: Zicsr
version: "~> 2.0"
- name: Zicntr
version: "~> 2.0"
- name: Sm
version: "~> 1.11"
param_constraints:
MTVEC_BASE_ALIGNMENT_DIRECT: {} # Unconstrained
MTVEC_BASE_ALIGNMENT_VECTORED: {} # Unconstrained
ARCH_ID: {} # Unconstrained
IMP_ID: {} # Unconstrained
VENDOR_ID_BANK: {} # Unconstrained
VENDOR_ID_OFFSET: {} # Unconstrained
MISA_CSR_IMPLEMENTED: {} # Unconstrained
TIME_CSR_IMPLEMENTED: {} # Unconstrained
MTVAL_WIDTH: {} # Unconstrained
PHYS_ADDR_WIDTH: {} # Unconstrained
PRECISE_SYNCHRONOUS_EXCEPTIONS:
schema:
const: true
TRAP_ON_UNIMPLEMENTED_INSTRUCTION:
TRAP_ON_ECALL_FROM_M:
schema:
const: true
TRAP_ON_ECALL_FROM_M:
note: REQ-UINST-017
TRAP_ON_EBREAK:
schema:
const: true
REPORT_VA_IN_MTVAL_ON_BREAKPOINT:
Expand All @@ -65,41 +84,16 @@ MC-1:
M_MODE_ENDIANESS:
schema:
const: little
# OPT-RDTIME doesn't need constraint (behavior defined by TIME_CSR_IMPLEMENTED)
# OPT-MTIME-PADDR doesn't have parameter -- it's considered non-ISA by the database
# OPT-MTIMECMP-PADDR doesn't have parameter -- it's considered non-ISA by the database
# OPT-MSIP-PADDR doesn't have parameter -- it's considered non-ISA by the database
# OPT-MHARTID doesn't need constrained (behavior is a builtin)
# OPT-MVENDORID doesn't need constrained (but behavior is controlled by VENDOR_ID_BANK and VENDOR_ID_OFFSET)
# OPT-MARCHID doesn't need constrained (but behavior is controlled by ARCH_ID)
# OPT-MIMPID doesn't need constrained (but behavior is controlled by IMP_ID)
# OPT-MISA doesn't need constrained (but behavior is controlled by MISA_CSR_IMPLEMENTED)
# OPT-CLINT doesn't need a parameter; it is mandated in the spec
# OPT-CLIC doesn't need a paramter
MTVEC_BASE_ALIGNMENT_DIRECT:
note: OPT-MTVEC-ALIGN-DIRECT
schema:
const: 4
MTVEC_BASE_ALIGNMENT_VECTORED:
note: OPT-MTVEV-ALIGN-VECTORED
schema:
const: 4
ARCH_ID: {} # Unconstrained
XLEN:
schema:
const: 32
- name: C
version: "~> 2.2"
- name: M
version: "~> 2.0"
- name: Zicsr
version: "~> 2.0"
- name: Zicntr
version: "~> 2.0"
CONFIG_PTR_ADDRESS:
schema:
const: 0
#XXX optional: {} # None
optional:
- name: B
note: "This is just for testing. B isn't really optional for MC-1."
- name: Zifencei
note: "This is just for testing. Zifencei extension isn't really optional for MC-1."

requirement_groups:
- name: MC-Unpriv
Expand Down Expand Up @@ -147,3 +141,11 @@ MC-1:
description: Should return the most-significant 32-bits of the `mcycle` CSR when reading `cycleh`
- name: REQ-M32CSR-002
description: Should return the most-significant 32-bits of the `minstret` CSR when reading `instreth`

- name: MC-Priv
description: |
The MC-Priv defines Privileged ISA requirements.
requirements:
- name: REQ-PRIV-HARTID
description: |
One hart in system has to have a HARTID of 0. Reading `mhartid` on other CSRs provides some value.
2 changes: 1 addition & 1 deletion arch/csr/I/pmpaddr0.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ pmpaddr0:
priv_mode: M
length: MXLEN
description: PMP entry address
definedBy: I
definedBy: Sm
fields:
ADDR:
location_rv32: 31-0
Expand Down
2 changes: 1 addition & 1 deletion arch/csr/I/pmpaddr1.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ pmpaddr1:
priv_mode: M
length: MXLEN
description: PMP entry address
definedBy: I
definedBy: Sm
fields:
ADDR:
location_rv32: 31-0
Expand Down
2 changes: 1 addition & 1 deletion arch/csr/I/pmpaddr10.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ pmpaddr10:
priv_mode: M
length: MXLEN
description: PMP entry address
definedBy: I
definedBy: Sm
fields:
ADDR:
location_rv32: 31-0
Expand Down
2 changes: 1 addition & 1 deletion arch/csr/I/pmpaddr11.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ pmpaddr11:
priv_mode: M
length: MXLEN
description: PMP entry address
definedBy: I
definedBy: Sm
fields:
ADDR:
location_rv32: 31-0
Expand Down
2 changes: 1 addition & 1 deletion arch/csr/I/pmpaddr12.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ pmpaddr12:
priv_mode: M
length: MXLEN
description: PMP entry address
definedBy: I
definedBy: Sm
fields:
ADDR:
location_rv32: 31-0
Expand Down
2 changes: 1 addition & 1 deletion arch/csr/I/pmpaddr13.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ pmpaddr13:
priv_mode: M
length: MXLEN
description: PMP entry address
definedBy: I
definedBy: Sm
fields:
ADDR:
location_rv32: 31-0
Expand Down
2 changes: 1 addition & 1 deletion arch/csr/I/pmpaddr14.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ pmpaddr14:
priv_mode: M
length: MXLEN
description: PMP entry address
definedBy: I
definedBy: Sm
fields:
ADDR:
location_rv32: 31-0
Expand Down
2 changes: 1 addition & 1 deletion arch/csr/I/pmpaddr15.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ pmpaddr15:
priv_mode: M
length: MXLEN
description: PMP entry address
definedBy: I
definedBy: Sm
fields:
ADDR:
location_rv32: 31-0
Expand Down
2 changes: 1 addition & 1 deletion arch/csr/I/pmpaddr16.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ pmpaddr16:
priv_mode: M
length: MXLEN
description: PMP entry address
definedBy: I
definedBy: Sm
fields:
ADDR:
location_rv32: 31-0
Expand Down
2 changes: 1 addition & 1 deletion arch/csr/I/pmpaddr17.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ pmpaddr17:
priv_mode: M
length: MXLEN
description: PMP entry address
definedBy: I
definedBy: Sm
fields:
ADDR:
location_rv32: 31-0
Expand Down
2 changes: 1 addition & 1 deletion arch/csr/I/pmpaddr18.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ pmpaddr18:
priv_mode: M
length: MXLEN
description: PMP entry address
definedBy: I
definedBy: Sm
fields:
ADDR:
location_rv32: 31-0
Expand Down
2 changes: 1 addition & 1 deletion arch/csr/I/pmpaddr19.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ pmpaddr19:
priv_mode: M
length: MXLEN
description: PMP entry address
definedBy: I
definedBy: Sm
fields:
ADDR:
location_rv32: 31-0
Expand Down
2 changes: 1 addition & 1 deletion arch/csr/I/pmpaddr2.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ pmpaddr2:
priv_mode: M
length: MXLEN
description: PMP entry address
definedBy: I
definedBy: Sm
fields:
ADDR:
location_rv32: 31-0
Expand Down
2 changes: 1 addition & 1 deletion arch/csr/I/pmpaddr20.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ pmpaddr20:
priv_mode: M
length: MXLEN
description: PMP entry address
definedBy: I
definedBy: Sm
fields:
ADDR:
location_rv32: 31-0
Expand Down
2 changes: 1 addition & 1 deletion arch/csr/I/pmpaddr21.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ pmpaddr21:
priv_mode: M
length: MXLEN
description: PMP entry address
definedBy: I
definedBy: Sm
fields:
ADDR:
location_rv32: 31-0
Expand Down
2 changes: 1 addition & 1 deletion arch/csr/I/pmpaddr22.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ pmpaddr22:
priv_mode: M
length: MXLEN
description: PMP entry address
definedBy: I
definedBy: Sm
fields:
ADDR:
location_rv32: 31-0
Expand Down
2 changes: 1 addition & 1 deletion arch/csr/I/pmpaddr23.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ pmpaddr23:
priv_mode: M
length: MXLEN
description: PMP entry address
definedBy: I
definedBy: Sm
fields:
ADDR:
location_rv32: 31-0
Expand Down
2 changes: 1 addition & 1 deletion arch/csr/I/pmpaddr24.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ pmpaddr24:
priv_mode: M
length: MXLEN
description: PMP entry address
definedBy: I
definedBy: Sm
fields:
ADDR:
location_rv32: 31-0
Expand Down
2 changes: 1 addition & 1 deletion arch/csr/I/pmpaddr25.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ pmpaddr25:
priv_mode: M
length: MXLEN
description: PMP entry address
definedBy: I
definedBy: Sm
fields:
ADDR:
location_rv32: 31-0
Expand Down
2 changes: 1 addition & 1 deletion arch/csr/I/pmpaddr26.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ pmpaddr26:
priv_mode: M
length: MXLEN
description: PMP entry address
definedBy: I
definedBy: Sm
fields:
ADDR:
location_rv32: 31-0
Expand Down
2 changes: 1 addition & 1 deletion arch/csr/I/pmpaddr27.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ pmpaddr27:
priv_mode: M
length: MXLEN
description: PMP entry address
definedBy: I
definedBy: Sm
fields:
ADDR:
location_rv32: 31-0
Expand Down
2 changes: 1 addition & 1 deletion arch/csr/I/pmpaddr28.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ pmpaddr28:
priv_mode: M
length: MXLEN
description: PMP entry address
definedBy: I
definedBy: Sm
fields:
ADDR:
location_rv32: 31-0
Expand Down
2 changes: 1 addition & 1 deletion arch/csr/I/pmpaddr29.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ pmpaddr29:
priv_mode: M
length: MXLEN
description: PMP entry address
definedBy: I
definedBy: Sm
fields:
ADDR:
location_rv32: 31-0
Expand Down
2 changes: 1 addition & 1 deletion arch/csr/I/pmpaddr3.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ pmpaddr3:
priv_mode: M
length: MXLEN
description: PMP entry address
definedBy: I
definedBy: Sm
fields:
ADDR:
location_rv32: 31-0
Expand Down
2 changes: 1 addition & 1 deletion arch/csr/I/pmpaddr30.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ pmpaddr30:
priv_mode: M
length: MXLEN
description: PMP entry address
definedBy: I
definedBy: Sm
fields:
ADDR:
location_rv32: 31-0
Expand Down
2 changes: 1 addition & 1 deletion arch/csr/I/pmpaddr31.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ pmpaddr31:
priv_mode: M
length: MXLEN
description: PMP entry address
definedBy: I
definedBy: Sm
fields:
ADDR:
location_rv32: 31-0
Expand Down
2 changes: 1 addition & 1 deletion arch/csr/I/pmpaddr32.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ pmpaddr32:
priv_mode: M
length: MXLEN
description: PMP entry address
definedBy: I
definedBy: Sm
fields:
ADDR:
location_rv32: 31-0
Expand Down
2 changes: 1 addition & 1 deletion arch/csr/I/pmpaddr33.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ pmpaddr33:
priv_mode: M
length: MXLEN
description: PMP entry address
definedBy: I
definedBy: Sm
fields:
ADDR:
location_rv32: 31-0
Expand Down
Loading
Loading