Skip to content

Commit 7f5c668

Browse files
authored
Merge branch 'main' into fix/pr-1024-proxy-support
2 parents f388b22 + a83d966 commit 7f5c668

26 files changed

+473
-77
lines changed

.github/workflows/pages.yml

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -223,11 +223,7 @@ jobs:
223223
PAGES_URL: https://riscv-software-src.github.io/riscv-unified-db
224224
run: >
225225
cp doc/udb-block.svg _site/ &&
226-
ruby -r erb -r date
227-
-e "File.write('_site/index.html',
228-
ERB.new(File.read('tools/scripts/pages.html.erb'),
229-
trim_mode: '-').result(binding))"
230-
226+
ruby -r erb -r date -e "File.write('_site/index.html', ERB.new(File.read('tools/scripts/pages.html.erb'), trim_mode: '-').result(binding))"
231227
232228
- name: Setup Pages
233229
uses: actions/configure-pages@v5

backends/instructions_appendix/all_instructions.golden.adoc

Lines changed: 22 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
= Instruction Appendix
22
:doctype: book
3-
:wavedrom: /home/hbg/Projects/riscv-unified-db/node_modules/.bin/wavedrom-cli
3+
:wavedrom: /workspaces/riscv-unified-db/node_modules/.bin/wavedrom-cli
44
// Now the document header is complete and the wavedrom attribute is active.
55

66

@@ -5206,18 +5206,18 @@ This instruction has different encodings in RV32 and RV64
52065206
RV32::
52075207
[wavedrom, ,svg,subs='attributes',width="100%"]
52085208
....
5209-
{"reg":[{"bits":2,"name": 0x2,"type":2},{"bits":5,"name": "shamt != 0","type":4},{"bits":5,"name": "rd","type":4},{"bits":4,"name": 0x0,"type":2}]}
5209+
{"reg":[{"bits":2,"name": 0x2,"type":2},{"bits":5,"name": "shamt != 0","type":4},{"bits":5,"name": "xd","type":4},{"bits":4,"name": 0x0,"type":2}]}
52105210
....
52115211

52125212
RV64::
52135213
[wavedrom, ,svg,subs='attributes',width="100%"]
52145214
....
5215-
{"reg":[{"bits":2,"name": 0x2,"type":2},{"bits":5,"name": "shamt != 0[4:0]","type":4},{"bits":5,"name": "rd","type":4},{"bits":1,"name": "shamt != 0[5]","type":4},{"bits":3,"name": 0x0,"type":2}]}
5215+
{"reg":[{"bits":2,"name": 0x2,"type":2},{"bits":5,"name": "shamt != 0[4:0]","type":4},{"bits":5,"name": "xd","type":4},{"bits":1,"name": "shamt != 0[5]","type":4},{"bits":3,"name": 0x0,"type":2}]}
52165216
....
52175217

52185218
Description::
5219-
Shift the value in rd left by shamt, and store the result back in rd.
5220-
C.SLLI expands into `slli rd, rd, shamt`.
5219+
Shift the value in xd left by shamt, and store the result back in xd.
5220+
C.SLLI expands into `slli xd, xd, shamt`.
52215221

52225222

52235223
Decode Variables::
@@ -5227,7 +5227,7 @@ Decode Variables::
52275227
|===
52285228
|Variable Name |Location
52295229
|shamt |$encoding[6:2]
5230-
|rd |$encoding[11:7]
5230+
|xd |$encoding[11:7]
52315231
|===
52325232

52335233
*RV64:*
@@ -5236,7 +5236,7 @@ Decode Variables::
52365236
|===
52375237
|Variable Name |Location
52385238
|shamt |{$encoding[12], $encoding[6:2]}
5239-
|rd |$encoding[11:7]
5239+
|xd |$encoding[11:7]
52405240
|===
52415241

52425242
Included in::
@@ -5267,19 +5267,19 @@ This instruction has different encodings in RV32 and RV64
52675267
RV32::
52685268
[wavedrom, ,svg,subs='attributes',width="100%"]
52695269
....
5270-
{"reg":[{"bits":2,"name": 0x1,"type":2},{"bits":5,"name": "shamt != 0","type":4},{"bits":3,"name": "rd","type":4},{"bits":6,"name": 0x21,"type":2}]}
5270+
{"reg":[{"bits":2,"name": 0x1,"type":2},{"bits":5,"name": "shamt != 0","type":4},{"bits":3,"name": "xd","type":4},{"bits":6,"name": 0x21,"type":2}]}
52715271
....
52725272

52735273
RV64::
52745274
[wavedrom, ,svg,subs='attributes',width="100%"]
52755275
....
5276-
{"reg":[{"bits":2,"name": 0x1,"type":2},{"bits":5,"name": "shamt != 0[4:0]","type":4},{"bits":3,"name": "rd","type":4},{"bits":2,"name": 0x1,"type":2},{"bits":1,"name": "shamt != 0[5]","type":4},{"bits":3,"name": 0x4,"type":2}]}
5276+
{"reg":[{"bits":2,"name": 0x1,"type":2},{"bits":5,"name": "shamt != 0[4:0]","type":4},{"bits":3,"name": "xd","type":4},{"bits":2,"name": 0x1,"type":2},{"bits":1,"name": "shamt != 0[5]","type":4},{"bits":3,"name": 0x4,"type":2}]}
52775277
....
52785278

52795279
Description::
5280-
Arithmetic shift (the original sign bit is copied into the vacated upper bits) the value in rd right by shamt, and store the result in rd.
5281-
The rd register index should be used as rd+8 (registers x8-x15).
5282-
C.SRAI expands into `srai rd, rd, shamt`.
5280+
Arithmetic shift (the original sign bit is copied into the vacated upper bits) the value in xd right by shamt, and store the result in xd.
5281+
The xd register index should be used as xd+8 (registers x8-x15).
5282+
C.SRAI expands into `srai xd, xd, shamt`.
52835283

52845284

52855285
Decode Variables::
@@ -5289,7 +5289,7 @@ Decode Variables::
52895289
|===
52905290
|Variable Name |Location
52915291
|shamt |$encoding[6:2]
5292-
|rd |$encoding[9:7]
5292+
|xd |$encoding[9:7]
52935293
|===
52945294

52955295
*RV64:*
@@ -5298,7 +5298,7 @@ Decode Variables::
52985298
|===
52995299
|Variable Name |Location
53005300
|shamt |{$encoding[12], $encoding[6:2]}
5301-
|rd |$encoding[9:7]
5301+
|xd |$encoding[9:7]
53025302
|===
53035303

53045304
Included in::
@@ -5329,19 +5329,19 @@ This instruction has different encodings in RV32 and RV64
53295329
RV32::
53305330
[wavedrom, ,svg,subs='attributes',width="100%"]
53315331
....
5332-
{"reg":[{"bits":2,"name": 0x1,"type":2},{"bits":5,"name": "shamt != 0","type":4},{"bits":3,"name": "rd","type":4},{"bits":6,"name": 0x20,"type":2}]}
5332+
{"reg":[{"bits":2,"name": 0x1,"type":2},{"bits":5,"name": "shamt != 0","type":4},{"bits":3,"name": "xd","type":4},{"bits":6,"name": 0x20,"type":2}]}
53335333
....
53345334

53355335
RV64::
53365336
[wavedrom, ,svg,subs='attributes',width="100%"]
53375337
....
5338-
{"reg":[{"bits":2,"name": 0x1,"type":2},{"bits":5,"name": "shamt != 0[4:0]","type":4},{"bits":3,"name": "rd","type":4},{"bits":2,"name": 0x0,"type":2},{"bits":1,"name": "shamt != 0[5]","type":4},{"bits":3,"name": 0x4,"type":2}]}
5338+
{"reg":[{"bits":2,"name": 0x1,"type":2},{"bits":5,"name": "shamt != 0[4:0]","type":4},{"bits":3,"name": "xd","type":4},{"bits":2,"name": 0x0,"type":2},{"bits":1,"name": "shamt != 0[5]","type":4},{"bits":3,"name": 0x4,"type":2}]}
53395339
....
53405340

53415341
Description::
5342-
Shift the value in rd right by shamt, and store the result back in rd.
5343-
The rd register index should be used as rd+8 (registers x8-x15).
5344-
C.SRLI expands into `srli rd, rd, shamt`.
5342+
Shift the value in xd right by shamt, and store the result back in xd.
5343+
The xd register index should be used as xd+8 (registers x8-x15).
5344+
C.SRLI expands into `srli xd, xd, shamt`.
53455345

53465346

53475347
Decode Variables::
@@ -5351,7 +5351,7 @@ Decode Variables::
53515351
|===
53525352
|Variable Name |Location
53535353
|shamt |$encoding[6:2]
5354-
|rd |$encoding[9:7]
5354+
|xd |$encoding[9:7]
53555355
|===
53565356

53575357
*RV64:*
@@ -5360,7 +5360,7 @@ Decode Variables::
53605360
|===
53615361
|Variable Name |Location
53625362
|shamt |{$encoding[12], $encoding[6:2]}
5363-
|rd |$encoding[9:7]
5363+
|xd |$encoding[9:7]
53645364
|===
53655365

53665366
Included in::
@@ -5860,7 +5860,7 @@ The table below summarizes the options.
58605860
5+^.>h! `cbe.inval` Operation
58615861
.^h! M-mode .^h! S-mode .^h! U-mode .^h! VS-mode .^h! VU-mode
58625862

5863-
! 00 ! - ! - ! Invalidate ! `Illegal Instruction` ! `Illegal Instruction` ! `Virtual Instruction` ! `Virtual Instruction`
5863+
! 00 ! - ! - ! Invalidate ! `Illegal Instruction` ! `Illegal Instruction` ! `Illegal Instruction` ! `Illegal Instruction`
58645864
! 01 ! 00 ! 00 ! Invalidate ! Flush ! `Illegal Instruction` ! `Virtual Instruction` ! `Virtual Instruction`
58655865
! 01 ! 00 ! 01 ! Invalidate ! Flush ! `Illegal Instruction` ! Flush ! `Virtual Instruction`
58665866
! 01 ! 00 ! 11 ! Invalidate ! Flush ! `Illegal Instruction` ! Flush ! `Virtual Instruction`

bin/setup

Lines changed: 32 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,34 @@ cd $ROOT
66

77
CONTAINER_TAG=`cat ${ROOT}/bin/.container-tag`
88

9+
# Parse command line arguments
10+
PRESERVE_CONFIG=0
11+
12+
# Only parse arguments if this script is being run directly (not sourced)
13+
if [[ "${BASH_SOURCE[0]}" == "${0}" ]]; then
14+
for arg in "$@"; do
15+
case $arg in
16+
--preserve-config)
17+
PRESERVE_CONFIG=1
18+
shift
19+
;;
20+
--help|-h)
21+
echo "Usage: $0 [OPTIONS]"
22+
echo ""
23+
echo "Options:"
24+
echo " --preserve-config Only create .bundle/config if missing (default: always recreate)"
25+
echo " --help, -h Show this help message"
26+
exit 0
27+
;;
28+
*)
29+
echo "Unknown option: $arg"
30+
echo "Use --help for usage information"
31+
exit 1
32+
;;
33+
esac
34+
done
35+
fi
36+
937
# Supported container types:
1038
#
1139
# = devcontainer
@@ -128,7 +156,10 @@ if [ ! -d $ROOT/.home ]; then
128156
mkdir $ROOT/.home
129157
fi
130158

131-
if [ ! -f $ROOT/.bundle/config ]; then
159+
if [ $PRESERVE_CONFIG -eq 0 ] || [ ! -f $ROOT/.bundle/config ]; then
160+
if [ -f $ROOT/.bundle/config ] && [ $PRESERVE_CONFIG -eq 0 ]; then
161+
echo "Recreating bundle config..."
162+
fi
132163
OLDDIR=$PWD
133164
cd $ROOT
134165
${RUN} bundle config set --local path ${ROOT}/.home/.gems

cfgs/example_rv64_with_overlay.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ implemented_extensions:
3030
- [Sscofpmf, "1.0.0"]
3131
- [Ssaia, "1.0.0"]
3232
- [Ssccfg, "1.0.0"]
33-
- [Sstc, "0.9.0"]
33+
- [Sstc, "1.0.0"]
3434
- [Sv39, "1.12.0"]
3535
- [Sv48, "1.12.0"]
3636
- [Zicboz, "1.0.0"]

package-lock.json

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

spec/schemas/proc_cert_class_schema.json

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,13 @@
11
{
22
"$schema": "http://json-schema.org/draft-07/schema#",
3-
43
"type": "object",
54
"required": ["$schema", "kind", "name", "long_name", "introduction"],
65
"additionalProperties": false,
76
"properties": {
87
"$schema": {
9-
"type": "string",
108
"const": "proc_cert_class_schema.json#"
119
},
1210
"kind": {
13-
"type": "string",
1411
"const": "processor certificate class"
1512
},
1613
"name": {
@@ -23,7 +20,6 @@
2320
"description": "Descriptive name of the class"
2421
},
2522
"processor_kind": {
26-
"type": "string",
2723
"enum": ["Generic Unprivileged", "Microcontroller", "Apps Processor"],
2824
"description": "What kind of class is this?"
2925
},

spec/schemas/proc_cert_model_schema.json

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
{
22
"$schema": "http://json-schema.org/draft-07/schema#",
3-
43
"type": "object",
54
"required": ["$schema", "kind", "name", "long_name", "base"],
65
"additionalProperties": false,
@@ -54,11 +53,9 @@
5453
]
5554
},
5655
"$schema": {
57-
"type": "string",
5856
"const": "proc_cert_model_schema.json#"
5957
},
6058
"kind": {
61-
"type": "string",
6259
"const": "processor certificate model"
6360
},
6461
"name": {
@@ -96,7 +93,6 @@
9693
"description": "List of semantic versions within the model"
9794
},
9895
"base": {
99-
"type": "integer",
10096
"enum": [32, 64],
10197
"description": "Base of the model"
10298
},
@@ -143,7 +139,6 @@
143139
"in_scope_priv_modes": {
144140
"type": "array",
145141
"items": {
146-
"type": "string",
147142
"enum": ["M", "S", "U", "HS", "VS", "VU"]
148143
},
149144
"uniqueItems": true,

spec/schemas/profile_family_schema.json

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,15 @@
11
{
22
"$schema": "http://json-schema.org/draft-07/schema#",
3-
43
"type": "object",
54
"required": ["$schema", "kind", "name", "long_name"],
65
"properties": {
76
"$schema": {
8-
"type": "string",
97
"const": "profile_family_schema.json#"
108
},
119
"kind": {
12-
"type": "string",
1310
"const": "profile family"
1411
},
1512
"processor_kind": {
16-
"type": "string",
1713
"enum": ["Generic Unprivileged", "Microcontroller", "Apps Processor"],
1814
"description": "What kind of processor is this?"
1915
},

spec/schemas/profile_release_schema.json

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,12 @@
11
{
22
"$schema": "http://json-schema.org/draft-07/schema#",
3-
43
"type": "object",
54
"required": ["$schema", "kind", "name", "long_name", "description"],
65
"properties": {
76
"$schema": {
8-
"type": "string",
97
"const": "profile_release_schema.json#"
108
},
119
"kind": {
12-
"type": "string",
1310
"const": "profile release"
1411
},
1512
"name": {

0 commit comments

Comments
 (0)