Skip to content

Commit fa3c6e5

Browse files
authored
Merge branch 'main' into misa-readonly-zero
2 parents 7ae01d6 + e3b25cd commit fa3c6e5

File tree

29 files changed

+431
-125
lines changed

29 files changed

+431
-125
lines changed

.github/workflows/merge.yml

Lines changed: 32 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,18 +6,26 @@ on:
66
merge_group:
77
types: [checks_requested]
88
workflow_dispatch:
9+
workflow_call:
10+
inputs:
11+
dry-run:
12+
required: true
13+
type: boolean
914
env:
1015
SINGULARITY: 1
1116
jobs:
1217
build-reuse-manifest:
18+
if: (github.event_name == 'merge_queue') || (inputs.dry-run == false)
1319
runs-on: ubuntu-latest
1420

1521
steps:
1622
- uses: actions/checkout@v4
17-
- uses: actions/setup-python@v5
23+
- name: singularity setup
24+
uses: ./.github/actions/singularity-setup
1825
- name: run reuse
1926
run: ./bin/reuse spdx
2027
build-udb-api-doc:
28+
if: (github.event_name == 'merge_queue') || (inputs.dry-run == false)
2129
runs-on: ubuntu-latest
2230
steps:
2331
- name: Clone Github Repo Action
@@ -27,6 +35,7 @@ jobs:
2735
- name: Generate UDB API Docs
2836
run: ./do gen:udb:api_doc
2937
build-isa-explorer-csr:
38+
if: (github.event_name == 'merge_queue') || (inputs.dry-run == false)
3039
runs-on: ubuntu-latest
3140
steps:
3241
- name: Clone Github Repo Action
@@ -36,6 +45,7 @@ jobs:
3645
- name: Generate ISA Explorer CSR
3746
run: ./do gen:isa_explorer_browser_csr
3847
build-isa-explorer-ext:
48+
if: (github.event_name == 'merge_queue') || (inputs.dry-run == false)
3949
runs-on: ubuntu-latest
4050
steps:
4151
- name: Clone Github Repo Action
@@ -45,24 +55,27 @@ jobs:
4555
- name: Generate ISA Explorer Extension
4656
run: ./do gen:isa_explorer_browser_ext
4757
build-isa-explorer-inst:
58+
if: (github.event_name == 'merge_queue') || (inputs.dry-run == false)
4859
runs-on: ubuntu-latest
4960
steps:
5061
- name: Clone Github Repo Action
5162
uses: actions/checkout@v4
5263
- name: singularity setup
5364
uses: ./.github/actions/singularity-setup
5465
- name: Generate ISA Explorer Instructions
55-
run: ./do gen:isa_explorer_browser_insts
66+
run: ./do gen:isa_explorer_browser_inst
5667
build-isa-explorer-spreadsheet:
68+
if: (github.event_name == 'merge_queue') || (inputs.dry-run == false)
5769
runs-on: ubuntu-latest
5870
steps:
5971
- name: Clone Github Repo Action
6072
uses: actions/checkout@v4
6173
- name: singularity setup
6274
uses: ./.github/actions/singularity-setup
6375
- name: Generate ISA Explorer Spreadsheet
64-
run: ./do gen:isa_explorer_browser_spreadsheet
76+
run: ./do gen:isa_explorer_spreadsheet
6577
build-html-isa-manual:
78+
if: (github.event_name == 'merge_queue') || (inputs.dry-run == false)
6679
runs-on: ubuntu-latest
6780
env:
6881
MANUAL_NAME: isa
@@ -75,6 +88,7 @@ jobs:
7588
- name: Generate HTML ISA manual
7689
run: ./do gen:html_manual
7790
build-html-cfg-isa-manual:
91+
if: (github.event_name == 'merge_queue') || (inputs.dry-run == false)
7892
runs-on: ubuntu-latest
7993
steps:
8094
- name: Clone Github Repo Action
@@ -84,6 +98,7 @@ jobs:
8498
- name: Generate HTML ISA manual for a config
8599
run: ./do gen:html[example_rv64_with_overlay]
86100
build-instruction-appendix:
101+
if: (github.event_name == 'merge_queue') || (inputs.dry-run == false)
87102
runs-on: ubuntu-latest
88103
steps:
89104
- name: Clone Github Repo Action
@@ -93,6 +108,7 @@ jobs:
93108
- name: Generate instruction appendix
94109
run: ./do gen:instruction_appendix
95110
build-rvi20-profile:
111+
if: (github.event_name == 'merge_queue') || (inputs.dry-run == false)
96112
runs-on: ubuntu-latest
97113
steps:
98114
- name: Clone Github Repo Action
@@ -102,6 +118,7 @@ jobs:
102118
- name: Generate RVI20
103119
run: ./do gen:profile_release_pdf[RVI20]
104120
build-rva20-profile:
121+
if: (github.event_name == 'merge_queue') || (inputs.dry-run == false)
105122
runs-on: ubuntu-latest
106123
steps:
107124
- name: Clone Github Repo Action
@@ -111,6 +128,7 @@ jobs:
111128
- name: Generate RVA20
112129
run: ./do gen:profile_release_pdf[RVA20]
113130
build-rva22-profile:
131+
if: (github.event_name == 'merge_queue') || (inputs.dry-run == false)
114132
runs-on: ubuntu-latest
115133
steps:
116134
- name: Clone Github Repo Action
@@ -120,6 +138,7 @@ jobs:
120138
- name: Generate RVA22
121139
run: ./do gen:profile_release_pdf[RVA22]
122140
build-rva23-profile:
141+
if: (github.event_name == 'merge_queue') || (inputs.dry-run == false)
123142
runs-on: ubuntu-latest
124143
steps:
125144
- name: Clone Github Repo Action
@@ -129,6 +148,7 @@ jobs:
129148
- name: Generate RVA23
130149
run: ./do gen:profile_release_pdf[RVA23]
131150
build-rvb23-profile:
151+
if: (github.event_name == 'merge_queue') || (inputs.dry-run == false)
132152
runs-on: ubuntu-latest
133153
steps:
134154
- name: Clone Github Repo Action
@@ -138,6 +158,7 @@ jobs:
138158
- name: Generate RVB23
139159
run: ./do gen:profile_release_pdf[RVB23]
140160
build-ac100-crd:
161+
if: (github.event_name == 'merge_queue') || (inputs.dry-run == false)
141162
runs-on: ubuntu-latest
142163
steps:
143164
- name: Clone Github Repo Action
@@ -147,6 +168,7 @@ jobs:
147168
- name: Generate AC100 CRD
148169
run: ./do gen:proc_crd_pdf[AC100]
149170
build-ac200-crd:
171+
if: (github.event_name == 'merge_queue') || (inputs.dry-run == false)
150172
runs-on: ubuntu-latest
151173
steps:
152174
- name: Clone Github Repo Action
@@ -156,6 +178,7 @@ jobs:
156178
- name: Generate AC200 CRD
157179
run: ./do gen:proc_crd_pdf[AC200]
158180
build-mc100-32-crd:
181+
if: (github.event_name == 'merge_queue') || (inputs.dry-run == false)
159182
runs-on: ubuntu-latest
160183
steps:
161184
- name: Clone Github Repo Action
@@ -165,6 +188,7 @@ jobs:
165188
- name: Generate MC100-32 CRD
166189
run: ./do gen:proc_crd_pdf[MC100-32]
167190
build-mc100-64-crd:
191+
if: (github.event_name == 'merge_queue') || (inputs.dry-run == false)
168192
runs-on: ubuntu-latest
169193
steps:
170194
- name: Clone Github Repo Action
@@ -174,6 +198,7 @@ jobs:
174198
- name: Generate MC100-64 CRD
175199
run: ./do gen:proc_crd_pdf[MC100-64]
176200
build-mc200-32-crd:
201+
if: (github.event_name == 'merge_queue') || (inputs.dry-run == false)
177202
runs-on: ubuntu-latest
178203
steps:
179204
- name: Clone Github Repo Action
@@ -183,6 +208,7 @@ jobs:
183208
- name: Generate MC200-32 CRD
184209
run: ./do gen:proc_crd_pdf[MC200-32]
185210
build-mc200-64-crd:
211+
if: (github.event_name == 'merge_queue') || (inputs.dry-run == false)
186212
runs-on: ubuntu-latest
187213
steps:
188214
- name: Clone Github Repo Action
@@ -192,6 +218,7 @@ jobs:
192218
- name: Generate MC200-64 CRD
193219
run: ./do gen:proc_crd_pdf[MC200-64]
194220
build-mc300-32-crd:
221+
if: (github.event_name == 'merge_queue') || (inputs.dry-run == false)
195222
runs-on: ubuntu-latest
196223
steps:
197224
- name: Clone Github Repo Action
@@ -201,6 +228,7 @@ jobs:
201228
- name: Generate MC300-32 CRD
202229
run: ./do gen:proc_crd_pdf[MC300-32]
203230
build-mc300-64-crd:
231+
if: (github.event_name == 'merge_queue') || (inputs.dry-run == false)
204232
runs-on: ubuntu-latest
205233
steps:
206234
- name: Clone Github Repo Action
@@ -210,6 +238,7 @@ jobs:
210238
- name: Generate MC300-64 CRD
211239
run: ./do gen:proc_crd_pdf[MC300-64]
212240
build-mc100-32-ctp:
241+
if: (github.event_name == 'merge_queue') || (inputs.dry-run == false)
213242
runs-on: ubuntu-latest
214243
steps:
215244
- name: Clone Github Repo Action

.github/workflows/regress.yml

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -201,3 +201,18 @@ jobs:
201201
uses: ./.github/actions/singularity-setup
202202
- name: Run cpp unit tests
203203
run: ./do test:cpp_hart CONFIG=rv64 JOBS=4
204+
regress-xqci-doc:
205+
runs-on: ubuntu-latest
206+
env:
207+
SINGULARITY: 1
208+
steps:
209+
- name: Clone Github Repo Action
210+
uses: actions/checkout@v4
211+
- name: singularity setup
212+
uses: ./.github/actions/singularity-setup
213+
- name: Run cpp unit tests
214+
run: ./do gen:ext_pdf EXT=Xqci CFG=qc_iu.yaml VERSION=latest
215+
call-deploy:
216+
uses: ./.github/workflows/merge.yml
217+
with:
218+
dry-run: true

Gemfile.lock

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -130,7 +130,7 @@ GEM
130130
nokogiri (1.18.8-x86_64-linux-gnu)
131131
racc (~> 1.4)
132132
observer (0.1.2)
133-
ostruct (0.6.1)
133+
ostruct (0.6.2)
134134
parallel (1.27.0)
135135
parser (3.3.8.0)
136136
ast (~> 2.4.1)
@@ -188,18 +188,18 @@ GEM
188188
nokogiri
189189
rexml (3.4.1)
190190
rouge (4.5.2)
191-
rubocop (1.76.0)
191+
rubocop (1.77.0)
192192
json (~> 2.3)
193193
language_server-protocol (~> 3.17.0.2)
194194
lint_roller (~> 1.1.0)
195195
parallel (~> 1.10)
196196
parser (>= 3.3.0.2)
197197
rainbow (>= 2.2.2, < 4.0)
198198
regexp_parser (>= 2.9.3, < 3.0)
199-
rubocop-ast (>= 1.45.0, < 2.0)
199+
rubocop-ast (>= 1.45.1, < 2.0)
200200
ruby-progressbar (~> 1.7)
201201
unicode-display_width (>= 2.4.0, < 4.0)
202-
rubocop-ast (1.45.0)
202+
rubocop-ast (1.45.1)
203203
parser (>= 3.3.7.2)
204204
prism (~> 1.4)
205205
rubocop-github (0.26.0)
@@ -239,7 +239,7 @@ GEM
239239
simplecov-html (0.13.1)
240240
simplecov_json_formatter (0.1.4)
241241
simpleidn (0.2.3)
242-
solargraph (0.55.0)
242+
solargraph (0.56.0)
243243
backport (~> 1.2)
244244
benchmark (~> 0.4)
245245
bundler (~> 2.0)
@@ -251,6 +251,7 @@ GEM
251251
observer (~> 0.1)
252252
ostruct (~> 0.6)
253253
parser (~> 3.0)
254+
prism (~> 1.4)
254255
rbs (~> 3.3)
255256
reverse_markdown (~> 3.0)
256257
rubocop (~> 1.38)
@@ -287,7 +288,7 @@ GEM
287288
terminal-table (4.0.0)
288289
unicode-display_width (>= 1.1.1, < 4)
289290
thor (1.3.2)
290-
tilt (2.6.0)
291+
tilt (2.6.1)
291292
treetop (1.6.12)
292293
polyglot (~> 0.3)
293294
ttfunk (1.7.0)

Rakefile

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -489,6 +489,10 @@ task :portfolios do
489489
Rake::Task["#{$root}/gen/proc_ctp/pdf/MockProcessor-CTP.pdf"].invoke
490490
portfolio_start_msg("MockProfileRelease")
491491
Rake::Task["#{$root}/gen/profile/pdf/MockProfileRelease.pdf"].invoke
492+
portfolio_start_msg("RVI20-32-CTP")
493+
Rake::Task["#{$root}/gen/proc_ctp/pdf/RVI20-32-CTP.pdf"].invoke
494+
portfolio_start_msg("RVI20-64-CTP")
495+
Rake::Task["#{$root}/gen/proc_ctp/pdf/RVI20-64-CTP.pdf"].invoke
492496
portfolio_start_msg("MC100-32-CTP")
493497
Rake::Task["#{$root}/gen/proc_ctp/pdf/MC100-32-CTP.pdf"].invoke
494498
portfolio_start_msg("MC100-32-CRD")
@@ -534,6 +538,8 @@ task "MockCTP": "#{$root}/gen/proc_ctp/pdf/MockProcessor-CTP.pdf"
534538
task "MockProcessorCTP": "#{$root}/gen/proc_ctp/pdf/MockProcessor-CTP.pdf"
535539
task "MockCTP-HTML": "#{$root}/gen/proc_ctp/pdf/MockProcessor-CTP.html"
536540
task "MockProcessorCTP-HTML": "#{$root}/gen/proc_ctp/pdf/MockProcessor-CTP.html"
541+
task "RVI20-32-CTP": "#{$root}/gen/proc_ctp/pdf/RVI20-32-CTP.pdf"
542+
task "RVI20-64-CTP": "#{$root}/gen/proc_ctp/pdf/RVI20-64-CTP.pdf"
537543
task "MC100-32-CTP": "#{$root}/gen/proc_ctp/pdf/MC100-32-CTP.pdf"
538544
task "MC100-32-CTP-HTML": "#{$root}/gen/proc_ctp/pdf/MC100-32-CTP.html"
539545
task "MC100-32-CRD": "#{$root}/gen/proc_crd/pdf/MC100-32-CRD.pdf"

backends/cfg_html_doc/templates/inst.adoc.erb

Lines changed: 48 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -42,21 +42,55 @@ RV64::
4242
<%= inst.description %>
4343

4444
== Access
45-
<%- if cfg_arch.ext?(:H) -%>
46-
[cols="^,^,^,^,^"]
47-
<%- else -%>
48-
[cols="^,^,^"]
49-
<%- end -%>
45+
<%-
46+
# Determine which privilege modes to display based on implemented extensions
47+
modes = ["M"] # M-mode is always present
48+
mode_headers = ["M"]
49+
mode_values = ["[.access-always]#Always#"]
50+
51+
# Add S-mode if S extension is implemented
52+
if cfg_arch.ext?(:S)
53+
if cfg_arch.ext?(:H)
54+
modes << "HS"
55+
mode_headers << "HS"
56+
else
57+
modes << "S"
58+
mode_headers << "S"
59+
end
60+
mode_values << "[.access-#{inst.access['s']}]##{inst.access['s'].capitalize}#"
61+
end
62+
63+
# Add U-mode if U extension is implemented
64+
if cfg_arch.ext?(:U)
65+
modes << "U"
66+
mode_headers << "U"
67+
mode_values << "[.access-#{inst.access['u']}]##{inst.access['u'].capitalize}#"
68+
end
69+
70+
# Add virtual modes if H extension is implemented
71+
if cfg_arch.ext?(:H)
72+
# Always add VS mode when H extension is present
73+
modes << "VS"
74+
mode_headers << "VS"
75+
mode_values << "[.access-#{inst.access['vs']}]##{inst.access['vs'].capitalize}#"
76+
77+
# Only add VU mode if both H and U extensions are present
78+
if cfg_arch.ext?(:U)
79+
modes << "VU"
80+
mode_headers << "VU"
81+
mode_values << "[.access-#{inst.access['vu']}]##{inst.access['vu'].capitalize}#"
82+
end
83+
end
84+
85+
# Generate column specification
86+
col_spec = "^," * modes.size
87+
col_spec = col_spec.chomp(",")
88+
-%>
89+
[cols="<%= col_spec %>"]
5090
|===
51-
| M | <%- if cfg_arch.ext?(:H) -%>HS<%- else -%>S<%- end -%> | U <%- if cfg_arch.ext?(:H) -%> | VS | VU <%- end -%>
52-
53-
| [.access-always]#Always#
54-
| [.access-<%=inst.access['s']%>]#<%= inst.access['s'].capitalize %>#
55-
| [.access-<%=inst.access['u']%>]#<%= inst.access['u'].capitalize %>#
56-
<% if cfg_arch.ext?(:H) %>
57-
| [.access-<%=inst.access['vs']%>]#<%= inst.access['vs'].capitalize %>#
58-
| [.access-<%=inst.access['vu']%>]#<%= inst.access['vu'].capitalize %>#
59-
<% end %>
91+
| <%= mode_headers.join(" | ") %>
92+
93+
| <%= mode_values.join("\n| ") %>
6094
|===
6195

6296
<%- if inst.access_detail? -%>

backends/ext_pdf_doc/tasks.rake

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,7 @@ rule %r{#{$resolver.gen_path}/ext_pdf_doc/.*/pdf/.*_extension\.pdf} => proc { |t
3434
"-a pdf-theme=#{ENV['THEME']}",
3535
"-a pdf-fontsdir=#{$root}/ext/docs-resources/fonts",
3636
"-a imagesdir=#{$root}/ext/docs-resources/images",
37+
"-a wavedrom=#{$root}/node_modules/.bin/wavedrom-cli",
3738
"-r asciidoctor-diagram",
3839
"-r idl_highlighter",
3940
"-o #{t.name}",
@@ -62,6 +63,7 @@ rule %r{#{$resolver.gen_path}/ext_pdf_doc/.*/html/.*_extension\.html} => proc {
6263
"-v",
6364
"-a toc",
6465
"-r asciidoctor-diagram",
66+
"-a wavedrom=#{$root}/node_modules/.bin/wavedrom-cli",
6567
"-o #{t.name}",
6668
adoc_file
6769
].join(" ")
@@ -74,7 +76,7 @@ rule %r{#{$resolver.gen_path}/ext_pdf_doc/.*/adoc/.*_extension\.adoc} => proc {
7476
config_name = Pathname.new(tname).relative_path_from("#{$resolver.gen_path}/ext_pdf_doc").to_s.split("/")[0]
7577
arch_yaml_paths = Dir.glob("#{$resolver.resolved_spec_path(config_name)}/**/*.yaml")
7678
cfg_path = $resolver.gen_path / "ext_pdf_doc" / "#{config_name}.yaml"
77-
cfg = Udb::AbstractConfig.create(cfg_path)
79+
cfg = Udb::AbstractConfig.create(cfg_path, $resolver.cfg_info(config_name))
7880
arch_yaml_paths += Dir.glob("#{cfg.arch_overlay_abs}/**/*.yaml") unless cfg.arch_overlay.nil?
7981
[
8082
(EXT_PDF_DOC_DIR / "templates" / "ext_pdf.adoc.erb").to_s,

0 commit comments

Comments
 (0)