Skip to content

Commit 3f5a54b

Browse files
Merge remote-tracking branch 'origin/main' into 332-create-better-profile-comparisons
2 parents b1ff611 + 52eb36b commit 3f5a54b

File tree

188 files changed

+9628
-76
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

188 files changed

+9628
-76
lines changed

.devcontainer/Dockerfile

Lines changed: 13 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,26 @@
1-
FROM ubuntu:24.04 AS spython-base
1+
FROM ubuntu:24.04
2+
3+
ENV DEBIAN_FRONTEND=noninteractive
4+
5+
WORKDIR /workspace
6+
27
RUN export DEBIAN_FRONTEND=noninteractive
38
RUN apt-get update
49
RUN apt-get install -y --no-install-recommends git gh
510
RUN apt-get install -y --no-install-recommends less
611
RUN apt-get install -y --no-install-recommends python3
7-
RUN apt-get install -y --no-install-recommends python3.12-venv python3-pip
12+
RUN apt-get install -y --no-install-recommends python3.12-venv
13+
RUN apt-get install -y --no-install-recommends python3-pip
814
RUN apt-get install -y --no-install-recommends build-essential
9-
RUN apt-get install -y --no-install-recommends ruby ruby-dev
15+
RUN apt-get install -y --no-install-recommends ruby
16+
RUN apt-get install -y --no-install-recommends ruby-dev
1017
RUN apt-get install -y --no-install-recommends bundler
1118
RUN apt-get install -y --no-install-recommends nodejs
1219
RUN apt-get install -y --no-install-recommends npm
1320
RUN apt-get install -y --no-install-recommends ditaa
1421
RUN apt-get install -y --no-install-recommends libyaml-dev
1522
RUN apt-get clean autoclean
1623
RUN apt-get autoremove -y
17-
RUN rm -rf /var/lib/{apt, dpkg, cache, log}
24+
RUN rm -rf /var/lib/{apt,dpkg,cache,log}/*
25+
26+
WORKDIR /workspace

.github/workflows/nightly.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,8 @@ jobs:
2626
needs: check_date
2727
if: ${{ needs.check_date.outputs.should_run != 'false' }}
2828
runs-on: ubuntu-latest
29+
env:
30+
SINGULARITY: 1
2931
steps:
3032
- name: Clone Github Repo Action
3133
uses: actions/checkout@v4

.github/workflows/regress.yml

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,8 @@ jobs:
1313
- uses: pre-commit/[email protected]
1414
regress-smoke:
1515
runs-on: ubuntu-latest
16+
env:
17+
SINGULARITY: 1
1618
steps:
1719
- name: Clone Github Repo Action
1820
uses: actions/checkout@v4
@@ -45,6 +47,7 @@ jobs:
4547
env:
4648
MANUAL_NAME: isa
4749
VERSIONS: all
50+
SINGULARITY: 1
4851
steps:
4952
- name: Clone Github Repo Action
5053
uses: actions/checkout@v4
@@ -75,6 +78,7 @@ jobs:
7578
env:
7679
EXT: B
7780
VERSION: latest
81+
SINGULARITY: 1
7882
steps:
7983
- name: Clone Github Repo Action
8084
uses: actions/checkout@v4
@@ -102,6 +106,8 @@ jobs:
102106
regress-gen-certificate:
103107
runs-on: ubuntu-latest
104108
needs: regress-smoke
109+
env:
110+
SINGULARITY: 1
105111
steps:
106112
- name: Clone Github Repo Action
107113
uses: actions/checkout@v4
@@ -129,6 +135,8 @@ jobs:
129135
regress-gen-profile:
130136
runs-on: ubuntu-latest
131137
needs: regress-smoke
138+
env:
139+
SINGULARITY: 1
132140
steps:
133141
- name: Clone Github Repo Action
134142
uses: actions/checkout@v4

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@
77
.stamps
88
.venv
99
.asciidoctor
10+
.container-type
1011
diag-ditaa-*
1112
arch/manual/isa/**/riscv-isa-manual
1213
gen

arch/csr/Smrnmi/mncause.yaml

Lines changed: 43 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,43 @@
1+
# yaml-language-server: $schema=../../../schemas/csr_schema.json
2+
3+
$schema: csr_schema.json#
4+
kind: csr
5+
name: mncause
6+
long_name: Resumable NMI cause
7+
address: 0x742
8+
priv_mode: M
9+
length: MXLEN
10+
definedBy: Smrnmi
11+
description: |
12+
The mncause CSR holds the reason for the NMI.
13+
If the reason is an interrupt, bit MXLEN-1 is set to 1, and the NMI cause is encoded in
14+
the least-significant bits.
15+
If the reason is an interrupt and NMI causes are not supported,
16+
bit MXLEN-1 is set to 1, and zero is written to the least-significant bits.
17+
If the reason is an exception within M-mode that results in a double trap as
18+
specified in the Smdbltrp extension, bit MXLEN-1 is set to 0 and the least-significant
19+
bits are set to the cause code corresponding to the exception that precipitated the
20+
double trap.
21+
fields:
22+
INT:
23+
location_rv32: 31
24+
location_rv64: 63
25+
description: |
26+
Written by hardware when a resumable NMI is taken into M-mode.
27+
28+
When set, the last non-maskable exception was caused by an asynchronous Interrupt.
29+
30+
[when,"TRAP_ON_ILLEGAL_WLRL == true"]
31+
If `mcause` is written with an undefined cause (combination of `mcause.INT` and `mcause.CODE`), an `Illegal Instruction` exception occurs.
32+
33+
[when,"TRAP_ON_ILLEGAL_WLRL == false"]
34+
If `mcause` is written with an undefined cause (combination of `mcause.INT` and `mcause.CODE`), neither `mcause.INT` nor `mcause.CODE` are modified.
35+
type: RW-H
36+
reset_value: UNDEFINED_LEGAL
37+
CODE:
38+
location_rv32: 30-0
39+
location_rv64: 62-0
40+
description: |
41+
TODO
42+
type: RW-H
43+
reset_value: UNDEFINED_LEGAL

backends/common_templates/adoc/csr.adoc.erb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,7 @@ This CSR has no fields. However, it must still exist (not cause an `Illegal Inst
6767

6868
<%- csr.fields.each do |field| -%>
6969
[[<%=csr.name%>-<%=field.name%>-def]]
70-
===== `<%= field.name %>`
70+
=== `<%= field.name %>`
7171

7272
[example]
7373
****

backends/ext_pdf_doc/tasks.rake

Lines changed: 16 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -55,6 +55,7 @@ rule %r{#{$root}/gen/ext_pdf_doc/.*/pdf/.*_extension\.pdf} => proc { |tname|
5555
config_name = Pathname.new(tname).relative_path_from("#{$root}/gen/ext_pdf_doc").to_s.split("/")[0]
5656
ext_name = Pathname.new(tname).basename(".pdf").to_s.split("_")[0..-2].join("_")
5757
[
58+
ENV["THEME"],
5859
"#{$root}/ext/docs-resources/themes/riscv-pdf.yml",
5960
"#{$root}/gen/ext_pdf_doc/#{config_name}/adoc/#{ext_name}_extension.adoc"
6061
]
@@ -70,7 +71,7 @@ rule %r{#{$root}/gen/ext_pdf_doc/.*/pdf/.*_extension\.pdf} => proc { |tname|
7071
"-v",
7172
"-a toc",
7273
"-a compress",
73-
"-a pdf-theme=#{$root}/ext/docs-resources/themes/riscv-pdf.yml",
74+
"-a pdf-theme=#{ENV['THEME']}",
7475
"-a pdf-fontsdir=#{$root}/ext/docs-resources/fonts",
7576
"-a imagesdir=#{$root}/ext/docs-resources/images",
7677
"-r asciidoctor-diagram",
@@ -128,7 +129,7 @@ rule %r{#{$root}/gen/ext_pdf_doc/.*/adoc/.*_extension\.adoc} => proc { |tname|
128129
} do |t|
129130
config_name = Pathname.new(t.name).relative_path_from("#{$root}/gen/ext_pdf_doc").to_s.split("/")[0]
130131

131-
cfg_arch = cfg_arch_for("_")
132+
cfg_arch = cfg_arch_for(config_name)
132133

133134
ext_name = Pathname.new(t.name).basename(".adoc").to_s.split("_")[0..-2].join("_")
134135

@@ -143,11 +144,13 @@ rule %r{#{$root}/gen/ext_pdf_doc/.*/adoc/.*_extension\.adoc} => proc { |tname|
143144
ext.versions
144145
else
145146
vs = ext.versions.select do |ext_ver|
146-
version_strs.include?(ext_ver.version_spec.to_s)
147+
version_strs.any? { |v| v != "latest" && ext_ver.version_spec == VersionSpec.new(v) }
147148
end
148149
vs << ext.max_version if version_strs.include?("latest")
149150
vs.uniq
150151
end
152+
raise "No version matches #{ENV['VERSION']}" if versions.empty?
153+
151154
max_version = versions.max { |a, b| a.version <=> b.version }
152155
FileUtils.mkdir_p File.dirname(t.name)
153156
File.write t.name, AsciidocUtils.resolve_links(cfg_arch.find_replace_links(erb.result(binding)))
@@ -164,29 +167,36 @@ namespace :gen do
164167
* EXT - The extension name
165168
* CFG - The config name, required only when an overlay is required
166169
* VERSION - A list of versions to include. May also be "all" or "latest".
170+
* THEME - path to an AsciidocPDF theme file. If not set, will use default RVI theme.
167171
168172
Examples:
169173
170-
./do gen:ext_pdf EXT=Xqci CFG=qc_iu VERSION=latest
174+
./do gen:ext_pdf EXT=Xqci CFG=qc_iu VERSION=latest THEME=cfgs/qc_iu/qc_theme.yaml
171175
./do gen:ext_pdf EXT=B VERSION=all
172176
./do gen:ext_pdf EXT=B VERSION=1.0.0
173177
./do gen:ext_pdf EXT=B VERSION=1.0.0,1.1.0
174178
175179
DESC
176-
task :ext_pdf, [:extension] do |_t, args|
180+
task :ext_pdf do
177181
raise ArgumentError, "Missing required argument EXT" if ENV["EXT"].nil?
178182

179183
extension = ENV["EXT"]
180184
cfg = ENV["CFG"]
181185
version = ENV["VERSION"]
186+
ENV["THEME"] =
187+
if ENV["THEME"].nil?
188+
"#{$root}/ext/docs-resources/themes/riscv-pdf.yml"
189+
else
190+
Pathname.new(ENV["THEME"]).realpath.to_s
191+
end
182192

183193
versions = version.split(",")
184194
raise ArgumentError, "Nothing else should be specified with 'all'" if versions.include?("all") && versions.size > 1
185195

186196
if cfg.nil?
187197
Rake::Task[$root / "gen" / "ext_pdf_doc" / "_" / "pdf" / "#{extension}_extension.pdf"].invoke
188198
else
189-
Rake::Task[$root / "gen" / "ext_pdf_doc" / cfg / "pdf" / "#{extension}_extension.pdf"].invoke(args)
199+
Rake::Task[$root / "gen" / "ext_pdf_doc" / cfg / "pdf" / "#{extension}_extension.pdf"].invoke
190200
end
191201
end
192202

0 commit comments

Comments
 (0)