Skip to content

Commit e57c2d6

Browse files
authored
Merge branch 'main' into misa-readonly-zero
2 parents f857538 + 8b7ad39 commit e57c2d6

File tree

16 files changed

+143
-79
lines changed

16 files changed

+143
-79
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

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,

backends/ext_pdf_doc/templates/ext_pdf.adoc.erb

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,6 @@
4747
// Settings
4848
:experimental:
4949
:reproducible:
50-
:wavedrom: <%= $root %>/node_modules/.bin/wavedrom-cli
5150
// needs to be changed
5251
:imagesoutdir: images
5352
:icons: font

backends/portfolio/tasks.rake

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -13,13 +13,12 @@ require "idlc/passes/gen_adoc"
1313

1414
require "udb/config"
1515

16-
# @return [Architecture]
16+
sig { returns(Udb::ConfiguredArchitecture) }
1717
def pf_create_arch
1818
$resolver.cfg_arch_for("_")
1919
end
2020

21-
# @param portfolio_grp_with_arch [PortfolioGroup] Contains one or more Portfolio objects that have an arch (not a cfg_arch).
22-
# @return [ConfiguredArchitecture]
21+
# @param portfolio_grp_with_arch Contains one or more Portfolio objects that have an arch (not a cfg_arch).
2322
sig { params(portfolio_grp_with_arch: Udb::PortfolioGroup).returns(Udb::ConfiguredArchitecture) }
2423
def pf_create_cfg_arch(portfolio_grp_with_arch)
2524
# Create a ConfiguredArchitecture object and provide it a PortfolioGroupConfig object to implement the AbstractConfig API.
@@ -29,8 +28,7 @@ def pf_create_cfg_arch(portfolio_grp_with_arch)
2928
# object can require that the PortfolioGroup DatabaseObjects contain a ConfiguredArchitecture.
3029
Udb::ConfiguredArchitecture.new(
3130
portfolio_grp_with_arch.name,
32-
Udb::AbstractConfig.create(portfolio_grp_with_arch),
33-
$resolver.gen_path / "resolved_spec" / "_"
31+
Udb::AbstractConfig.create(portfolio_grp_with_arch, $resolver.cfg_info("_"))
3432
)
3533
end
3634

spec/custom/isa/qc_iu/inst/Xqci/qc.addsat.yaml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -34,13 +34,13 @@ access:
3434
vs: always
3535
vu: always
3636
operation(): |
37-
Bits<xlen()+1> sum = X[rs1] `+ X[rs2];
38-
Bits<xlen()+1> most_negative_number = {2'b11,{(xlen()-1){1'b0}}};
39-
Bits<xlen()+1> most_positive_number = {2'b00,{(xlen()-1){1'b1}}};
37+
Bits<MXLEN+1> sum = X[rs1] `+ X[rs2];
38+
Bits<MXLEN+1> most_negative_number = {2'b11,{(xlen()-1){1'b0}}};
39+
Bits<MXLEN+1> most_positive_number = {2'b00,{(xlen()-1){1'b1}}};
4040
# overflow occurs if the operands are the same sign and the result is a different sign
4141
if (X[rs1][xlen()-1] == X[rs2][xlen()-1]) {
4242
if (sum[xlen()-1] != X[rs1][xlen()-1]) {
43-
if ($signed(X[rs1]) < 0) {
43+
if ($signed(X[rs1]) < 's0) {
4444
sum = most_negative_number;
4545
} else {
4646
sum = most_positive_number;

spec/custom/isa/qc_iu/inst/Xqci/qc.addusat.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -34,8 +34,8 @@ access:
3434
vs: always
3535
vu: always
3636
operation(): |
37-
Bits<xlen()+1> sum = X[rs1] `+ X[rs2];
38-
Bits<xlen()+1> largest_unsigned_value = {1'b0, {xlen(){1'b1}}};
37+
Bits<MXLEN+1> sum = X[rs1] `+ X[rs2];
38+
Bits<MXLEN+1> largest_unsigned_value = {1'b0, {xlen(){1'b1}}};
3939
4040
if (sum > largest_unsigned_value) {
4141
X[rd] = largest_unsigned_value[(xlen() - 1):0];

spec/custom/isa/qc_iu/inst/Xqci/qc.shlsat.yaml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -34,10 +34,10 @@ access:
3434
vs: always
3535
vu: always
3636
operation(): |
37-
Bits<xlen()`*2> sext_double_width_rs1 = {{xlen(){X[rs1][xlen()-1]}}, X[rs1]};
38-
Bits<xlen()`*2> shifted_value = sext_double_width_rs1 << X[rs2][4:0];
39-
Bits<xlen()`*2> most_negative_number = {{(xlen()+1){1'b1}}, {(xlen()-1){1'b0}}};
40-
Bits<xlen()`*2> most_positive_number = {{(xlen()+1){1'b0}}, {(xlen()-1){1'b1}}};
37+
Bits<MXLEN`*2> sext_double_width_rs1 = {{xlen(){X[rs1][xlen()-1]}}, X[rs1]};
38+
Bits<MXLEN`*2> shifted_value = sext_double_width_rs1 << X[rs2][4:0];
39+
Bits<MXLEN`*2> most_negative_number = {{(xlen()+1){1'b1}}, {(xlen()-1){1'b0}}};
40+
Bits<MXLEN`*2> most_positive_number = {{(xlen()+1){1'b0}}, {(xlen()-1){1'b1}}};
4141
4242
if ($signed(shifted_value) < $signed(most_negative_number)) {
4343
X[rd] = most_negative_number[(xlen() - 1):0];

spec/custom/isa/qc_iu/inst/Xqci/qc.shlusat.yaml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -34,9 +34,9 @@ access:
3434
vs: always
3535
vu: always
3636
operation(): |
37-
Bits<xlen()`*2> zext_double_width_rs1 = {{xlen(){1'b0}}, X[rs1]};
38-
Bits<xlen()`*2> shifted_value = zext_double_width_rs1 << X[rs2][4:0];
39-
Bits<xlen()`*2> largest_unsigned_value = {{xlen(){1'b0}}, {xlen(){1'b1}}};
37+
Bits<MXLEN`*2> zext_double_width_rs1 = {{xlen(){1'b0}}, X[rs1]};
38+
Bits<MXLEN`*2> shifted_value = zext_double_width_rs1 << X[rs2][4:0];
39+
Bits<MXLEN`*2> largest_unsigned_value = {{xlen(){1'b0}}, {xlen(){1'b1}}};
4040
4141
if (shifted_value > largest_unsigned_value) {
4242
X[rd] = largest_unsigned_value[(xlen() - 1):0];

spec/custom/isa/qc_iu/inst/Xqci/qc.subsat.yaml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -34,14 +34,14 @@ access:
3434
vs: always
3535
vu: always
3636
operation(): |
37-
Bits<xlen()+1> result = X[rs1] `- X[rs2];
38-
Bits<xlen()+1> most_negative_number = {2'b11,{(xlen()-1){1'b0}}};
39-
Bits<xlen()+1> most_positive_number = {2'b00,{(xlen()-1){1'b1}}};
37+
Bits<MXLEN+1> result = X[rs1] `- X[rs2];
38+
Bits<MXLEN+1> most_negative_number = {2'b11,{(xlen()-1){1'b0}}};
39+
Bits<MXLEN+1> most_positive_number = {2'b00,{(xlen()-1){1'b1}}};
4040
4141
# overflow occurs if the operands have different signs and the result is a different sign than the first operand
4242
if (X[rs1][xlen()-1] != X[rs2][xlen()-1]) {
4343
if (result[xlen()-1] != X[rs1][xlen()-1]) {
44-
if ($signed(X[rs1]) < 0) {
44+
if ($signed(X[rs1]) < 's0) {
4545
result = most_negative_number;
4646
} else {
4747
result = most_positive_number;

0 commit comments

Comments
 (0)