You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/source/yaml-specs.rst
+17-17Lines changed: 17 additions & 17 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -11,7 +11,7 @@ ISA YAML Spec
11
11
12
12
**NOTE**:
13
13
14
-
1. All fields accept values as integers or hexadecimals(can be used interchangeably) unless specified otherwise.
14
+
1. All integer fields accept values as integers or hexadecimals(can be used interchangeably) unless specified otherwise.
15
15
2. An elaborate example of the full-fledge ISA-YAML file can be found here: `ISA-YAML <https://github.com/riscv/riscv_config/blob/master/examples/template_isa.yaml>`_
16
16
17
17
.. include:: schema_isa.rst
@@ -34,16 +34,16 @@ CSRs with sub-fields
34
34
# of the all reset values of the sub-fields
35
35
rv32: # this node and its subsequent fields can exist
36
36
# if [M/S/U]XL value can be 1
37
-
implemented: <boolean> # indicates if the csr exists in rv32 mode or not.
37
+
accessible: <boolean> # indicates if the csr is accessible in rv32 mode or not.
38
38
# When False, all fields below will be trimmed off
39
39
# in the checked yaml. False also indicates that
40
-
# access-exception should be generated
40
+
# access-exception should be generated.
41
41
fields: # a quick summary of the list of all fields of the
42
42
# csr including a list of WPRI fields of the csr.
43
43
- <field_name1>
44
44
- <field_name2>
45
-
- - [30,23] # A list which contains a squashed pair
46
-
- 6# (of form [msb,lsb]) of all WPRI bits within the
45
+
- - [23,30] # A list which contains a squashed pair
46
+
- 6# (of form [lsb,msb]) of all WPRI bits within the
47
47
# csr. Does not exist if there are no WPRI bits
48
48
49
49
<field_name1>: # name of the field
@@ -56,7 +56,7 @@ CSRs with sub-fields
56
56
# or not. When False, all
57
57
# fields below this will be trimmed.
58
58
type: # type of field. Can be only one of the following
59
-
wlrl: [list of ranges] # field is wlrl and the list of legal values.
59
+
wlrl: [list of value-descriptors] # field is wlrl and the set of legal values.
60
60
ro_constant: <hex> # field is readonly and will return the same value.
61
61
ro_variable: True # field is readonly but the value returned depends
62
62
# on other arch-states
@@ -66,11 +66,11 @@ CSRs with sub-fields
66
66
wr_illegal: [list of warl-string]
67
67
rv64: # this node and its subsequent fields can exist
68
68
# if [M/S/U]XL value can be 2
69
-
implemented: <boolean> # indicates if this register exists in rv64 mode
69
+
accessible: <boolean># indicates if this register exists in rv64 mode
70
70
# or not. Same definition as for rv32 node.
71
71
rv128: # this node and its subsequent fields can exist if
72
72
# [M/S/U]XL value can be 3
73
-
implemented: <boolean> # indicates if this register exists in rv128 mode
73
+
accessible: <boolean># indicates if this register exists in rv128 mode
74
74
# or not. Same definition as for rv32 node.
75
75
76
76
CSRs without sub-fields
@@ -86,17 +86,17 @@ CSRs without sub-fields
86
86
# of the all reset values of the sub-fields
87
87
rv32: # this node and its subsequent fields can exist
88
88
# if [M/S/U]XL value can be 1
89
-
implemented: <boolean> # indicates if the csr exists in rv32 mode or not.
89
+
accessible: <boolean> # indicates if the csr is accessible in rv32 mode or not.
90
90
# When False, all fields below will be trimmed off
91
91
# in the checked yaml. False also indicates that
92
92
# access-exception should be generated
93
-
fields: # This should be empty always.
93
+
fields: []# This should be empty always.
94
94
shadow: <csr-name>::<register> # which this register shadows,'none' indicates that
95
95
# this register does not shadow anything.
96
96
msb: <int> # msb index of the csr. max: 31, min:31
97
97
lsb: <int> # lsb index of the csr. max: 0, min:0
98
98
type: # type of field. Can be only one of the following
99
-
wlrl: [list of ranges] # field is wlrl and the list of legal values.
99
+
wlrl: [list of value-descriptors] # field is wlrl and the set of legal values.
100
100
ro_constant: <hex> # field is readonly and will return the same value.
101
101
ro_variable: True # field is readonly but the value returned depends
102
102
# on other arch-states
@@ -106,11 +106,11 @@ CSRs without sub-fields
106
106
wr_illegal: [list of warl-string]
107
107
rv64: # this node and its subsequent fields can exist
108
108
# if [M/S/U]XL value can be 2
109
-
implemented: <boolean> # indicates if this register exists in rv64 mode
109
+
accessible: <boolean># indicates if this register exists in rv64 mode
110
110
# or not. Same definition as for rv32 node.
111
111
rv128: # this node and its subsequent fields can exist if
112
112
# [M/S/U]XL value can be 3
113
-
implemented: <boolean> # indicates if this register exists in rv128 mode
113
+
accessible: <boolean> # indicates if this register exists in rv128 mode
114
114
115
115
Constraints
116
116
-----------
@@ -120,7 +120,7 @@ Each CSR undergoes the following checks:
120
120
1. All implemented fields at the csr-level, if set to True, are checked if
121
121
they comply with the supported_xlen field of the ISA yaml.
122
122
2. The reset-val is checked against compliance with the type field specified
123
-
by the user.
123
+
by the user. All unimplemented fields are considered to be hardwired to 0.
124
124
125
125
For each of the above templates the following fields for all standard CSRs
126
126
defined by the spec are frozen and **CANNOT** be modified by the user.
@@ -152,7 +152,7 @@ Following is an example of how a user can define the mtvec csr in the input ISA
0 commit comments