Skip to content

Commit c7d9303

Browse files
authored
Merge branch 'main' into ruby_doc
2 parents 7326e13 + 964567b commit c7d9303

File tree

20 files changed

+420
-367
lines changed

20 files changed

+420
-367
lines changed

.github/workflows/regress.yml

Lines changed: 2 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -31,15 +31,5 @@ jobs:
3131
run: ./bin/build_container
3232
- name: Setup project
3333
run: ./bin/setup
34-
- name: Run IDL tests
35-
run: ./do idl_test
36-
- name: Run validator
37-
run: ./do validate
38-
- name: Build html documentation for generic_rv64
39-
run: ./do gen:html[generic_rv64]
40-
- name: Build PDF documentation for MockCRD-1
41-
run: ./do gen:crd_pdf[MockCRD-1]
42-
- name: Build PDF documentation for MC-1
43-
run: ./do gen:crd_pdf[MC-1]
44-
- name: Build PDF documentation for RVA Profile Family
45-
run: ./do gen:profile_pdf[rva]
34+
- name: Run regression
35+
run: ./do regress

Rakefile

Lines changed: 17 additions & 65 deletions
Original file line numberDiff line numberDiff line change
@@ -98,71 +98,6 @@ namespace :validate do
9898

9999
arch_def_64.type_check
100100

101-
# arch_def_64 = arch_def_for("_64")
102-
# arch_def_64.type_check
103-
104-
# puts "Type checking IDL code..."
105-
# progressbar = ProgressBar.create(title: "Instructions", total: arch_def_32.instructions.size + arch_def_64.instructions.size)
106-
# arch_def_32.instructions.each do |inst|
107-
# progressbar.increment
108-
# inst.type_checked_operation_ast(arch_def_32.idl_compiler, arch_def_32.symtab, 32) if inst.rv32?
109-
# end
110-
# arch_def_64.instructions.each do |inst|
111-
# progressbar.increment
112-
# inst.type_checked_operation_ast(arch_def_64.idl_compiler, arch_def_64.symtab, 64) if inst.rv64?
113-
# # also need to check for an RV64 machine running with effective XLEN of 32
114-
# inst.type_checked_operation_ast(arch_def_64.idl_compiler, arch_def_64.symtab, 32) if inst.rv64? && inst.rv32?
115-
# end
116-
117-
# progressbar = ProgressBar.create(title: "CSRs", total: arch_def_32.csrs.size + arch_def_64.csrs.size)
118-
# arch_def_32.csrs.each do |csr|
119-
# progressbar.increment
120-
# profile = RubyProf::Profile.new
121-
# result = profile.profile do
122-
# if csr.has_custom_sw_read?
123-
# csr.type_checked_sw_read_ast(arch_def_32.symtab) if csr.defined_in_base32?
124-
# end
125-
# csr.fields.each do |field|
126-
# unless field.type_ast(arch_def_32.symtab).nil?
127-
# field.type_checked_type_ast(arch_def_32.symtab) if csr.defined_in_base32? && field.defined_in_base32?
128-
# end
129-
# unless field.reset_value_ast(arch_def_32.symtab).nil?
130-
# field.type_checked_reset_value_ast(arch_def_32.symtab) if csr.defined_in_base32? && field.defined_in_base32?
131-
# end
132-
# unless field.sw_write_ast(arch_def_32.symtab).nil?
133-
# field.type_checked_sw_write_ast(arch_def_32.symtab, 32) if csr.defined_in_base32? && field.defined_in_base32?
134-
# end
135-
# end
136-
# end
137-
# RubyProf::GraphHtmlPrinter.new(result).print(File.open("#{csr.name}-prof.html", "w+"), {})
138-
# end
139-
# arch_def_64.csrs.each do |csr|
140-
# progressbar.increment
141-
# if csr.has_custom_sw_read?
142-
# csr.type_checked_sw_read_ast(arch_def_64.symtab) if csr.defined_in_base64?
143-
# end
144-
# csr.fields.each do |field|
145-
# unless field.type_ast(arch_def_64.symtab).nil?
146-
# field.type_checked_type_ast(arch_def_64.symtab) if csr.defined_in_base64? && field.defined_in_base64?
147-
# end
148-
# unless field.reset_value_ast(arch_def_64.symtab).nil?
149-
# field.type_checked_reset_value_ast(arch_def_64.symtab) if csr.defined_in_base64? && field.defined_in_base64?
150-
# end
151-
# unless field.sw_write_ast(arch_def_64.symtab).nil?
152-
# field.type_checked_sw_write_ast(arch_def_64.symtab, 32) if csr.defined_in_base32? && field.defined_in_base32?
153-
# field.type_checked_sw_write_ast(arch_def_64.symtab, 64) if csr.defined_in_base64? && field.defined_in_base64?
154-
# end
155-
# end
156-
# end
157-
# progressbar = ProgressBar.create(title: "Functions", total: arch_def_32.functions.size + arch_def_64.functions.size)
158-
# arch_def_32.functions.each do |func|
159-
# progressbar.increment
160-
# func.type_check(arch_def_32.symtab)
161-
# end
162-
# arch_def_64.functions.each do |func|
163-
# progressbar.increment
164-
# func.type_check(arch_def_64.symtab)
165-
# end
166101
puts "All IDL passed type checking"
167102
end
168103
end
@@ -326,3 +261,20 @@ namespace :gen do
326261
end
327262
end
328263
end
264+
265+
desc <<~DESC
266+
Run the regression tests
267+
268+
These tests must pass before a commit will be allowed in the main branch on GitHub
269+
DESC
270+
task :regress do
271+
Rake::Task["idl_test"].invoke
272+
Rake::Task["validate"].invoke
273+
Rake::Task["gen:html"].invoke("generic_rv64")
274+
Rake::Task["gen:crd_pdf"].invoke("MockCRD-1")
275+
Rake::Task["gen:crd_pdf"].invoke("MC-1")
276+
Rake::Task["gen:profile_pdf"].invoke("rva")
277+
278+
puts
279+
puts "Regression test PASSED"
280+
end

arch/ext/Sm.yaml

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -415,9 +415,8 @@ Sm:
415415
TODO: GitHub issue 53
416416
schema:
417417
type: integer
418-
# GitHub issue 53
419-
# when:
420-
# version: ">= 1.12.0"
418+
when:
419+
version: ">= 1.12.0"
421420
PMA_GRANULARITY:
422421
description: |
423422
log2 of the smallest supported PMA region.

backends/crd_doc/tasks.rake

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ Dir.glob("#{$root}/arch/crd/*.yaml") do |f|
1919
"#{$root}/arch/crd_family/#{crd_obj[crd_name]['family']}.yaml",
2020
"#{CRD_DOC_DIR}/templates/crd.adoc.erb",
2121
__FILE__,
22-
"gen:arch"
22+
"#{$root}/.stamps/arch-gen-_64.stamp"
2323
] do |t|
2424
# TODO: schema validation
2525
arch_def = arch_def_for("_64")

0 commit comments

Comments
 (0)