@@ -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
168103end
@@ -326,3 +261,20 @@ namespace :gen do
326261 end
327262 end
328263end
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
0 commit comments