forked from Github_Repos/cvw
commiting current changes to riscof wally tests
This commit is contained in:
parent
c65aa54a1e
commit
526f70e772
@ -1 +1 @@
|
||||
Subproject commit be67c99bd461742aa1c100bcc0732657faae2230
|
||||
Subproject commit 307c77b26e070ae85ffea665ad9b642b40e33c86
|
@ -179,7 +179,7 @@ logic [3:0] dummy;
|
||||
testadr = 0;
|
||||
testadrNoBase = 0;
|
||||
// riscof tests have a different signature, tests[0] == "1" refers to RiscvArchTests and tests[0] == "2" refers to WallyRiscvArchTests
|
||||
riscofTest = tests[0] == "1"; // | tests[0] == "2";
|
||||
riscofTest = tests[0] == "1" | tests[0] == "2";
|
||||
// fill memory with defined values to reduce Xs in simulation
|
||||
// Quick note the memory will need to be initialized. The C library does not
|
||||
// guarantee the initialized reads. For example a strcmp can read 6 byte
|
||||
@ -195,13 +195,19 @@ logic [3:0] dummy;
|
||||
/* if (tests[0] == `IMPERASTEST)
|
||||
pathname = tvpaths[0];
|
||||
else pathname = tvpaths[1]; */
|
||||
memfilename = {pathname, tests[test], ".elf.memfile"};
|
||||
if (riscofTest) memfilename = {pathname, tests[test], "/ref/ref.elf.memfile"};
|
||||
else memfilename = {pathname, tests[test], ".elf.memfile"};
|
||||
if (`IMEM == `MEM_TIM) $readmemh(memfilename, dut.core.ifu.irom.irom.ram.memory.RAM);
|
||||
else $readmemh(memfilename, dut.uncore.ram.ram.memory.RAM);
|
||||
if (`DMEM == `MEM_TIM) $readmemh(memfilename, dut.core.lsu.dtim.dtim.ram.memory.RAM);
|
||||
|
||||
ProgramAddrMapFile = {pathname, tests[test], ".elf.objdump.addr"};
|
||||
ProgramLabelMapFile = {pathname, tests[test], ".elf.objdump.lab"};
|
||||
if (riscofTest) begin
|
||||
ProgramAddrMapFile = {pathname, tests[test], "/ref/ref.elf.objdump.addr"};
|
||||
ProgramLabelMapFile = {pathname, tests[test], "/ref/ref.elf.objdump.lab"};
|
||||
end else begin
|
||||
ProgramAddrMapFile = {pathname, tests[test], ".elf.objdump.addr"};
|
||||
ProgramLabelMapFile = {pathname, tests[test], ".elf.objdump.lab"};
|
||||
end
|
||||
// declare memory labels that interest us, the updateProgramAddrLabelArray task will find the addr of each label and fill the array
|
||||
// to expand, add more elements to this array and initialize them to zero (also initilaize them to zero at the start of the next test)
|
||||
updateProgramAddrLabelArray(ProgramAddrMapFile, ProgramLabelMapFile, ProgramAddrLabelArray);
|
||||
@ -241,7 +247,8 @@ logic [3:0] dummy;
|
||||
// this contains instret and cycles for start and end of test run, used by embench python speed script to calculate embench speed score
|
||||
// also begin_signature contains the results of the self checking mechanism, which will be read by the python script for error checking
|
||||
$display("Embench Benchmark: %s is done.", tests[test]);
|
||||
outputfile = {pathname, tests[test], ".sim.output"};
|
||||
if (riscofTest) outputfile = {pathname, tests[test], "/ref/ref.sim.output"};
|
||||
else outputfile = {pathname, tests[test], ".sim.output"};
|
||||
outputFilePointer = $fopen(outputfile);
|
||||
i = 0;
|
||||
while ($unsigned(i) < $unsigned(5'd5)) begin
|
||||
@ -256,7 +263,7 @@ logic [3:0] dummy;
|
||||
for(i=0; i<SIGNATURESIZE; i=i+1) begin
|
||||
sig32[i] = 'bx;
|
||||
end
|
||||
if (riscofTest) signame = {pathname, tests[test], "erence-sail_c_simulator.signature"};
|
||||
if (riscofTest) signame = {pathname, tests[test], "/ref/Reference-sail_c_simulator.signature"};
|
||||
else signame = {pathname, tests[test], ".signature.output"};
|
||||
// read signature, reformat in 64 bits if necessary
|
||||
$readmemh(signame, sig32);
|
||||
@ -313,14 +320,20 @@ logic [3:0] dummy;
|
||||
else begin
|
||||
// If there are still additional tests to run, read in information for the next test
|
||||
//pathname = tvpaths[tests[0]];
|
||||
memfilename = {pathname, tests[test], ".elf.memfile"};
|
||||
if (riscofTest) memfilename = {pathname, tests[test], "/ref/ref.elf.memfile"};
|
||||
else memfilename = {pathname, tests[test], ".elf.memfile"};
|
||||
//$readmemh(memfilename, dut.uncore.ram.ram.memory.RAM);
|
||||
if (`IMEM == `MEM_TIM) $readmemh(memfilename, dut.core.ifu.irom.irom.ram.memory.RAM);
|
||||
else $readmemh(memfilename, dut.uncore.ram.ram.memory.RAM);
|
||||
if (`DMEM == `MEM_TIM) $readmemh(memfilename, dut.core.lsu.dtim.dtim.ram.memory.RAM);
|
||||
|
||||
ProgramAddrMapFile = {pathname, tests[test], ".elf.objdump.addr"};
|
||||
ProgramLabelMapFile = {pathname, tests[test], ".elf.objdump.lab"};
|
||||
if (riscofTest) begin
|
||||
ProgramAddrMapFile = {pathname, tests[test], "/ref/ref.elf.objdump.addr"};
|
||||
ProgramLabelMapFile = {pathname, tests[test], "/ref/ref.elf.objdump.lab"};
|
||||
end else begin
|
||||
ProgramAddrMapFile = {pathname, tests[test], ".elf.objdump.addr"};
|
||||
ProgramLabelMapFile = {pathname, tests[test], ".elf.objdump.lab"};
|
||||
end
|
||||
ProgramAddrLabelArray = '{ "begin_signature" : 0, "tohost" : 0 };
|
||||
updateProgramAddrLabelArray(ProgramAddrMapFile, ProgramLabelMapFile, ProgramAddrLabelArray);
|
||||
$display("Read memfile %s", memfilename);
|
||||
|
2
tests/riscof/sail_cSim/env/model_test.h
vendored
2
tests/riscof/sail_cSim/env/model_test.h
vendored
@ -15,7 +15,7 @@
|
||||
#define RVMODEL_HALT \
|
||||
li x1, 1; \
|
||||
write_tohost: \
|
||||
sw x1, tohost, t5; \
|
||||
sw x1, tohost, t0; \
|
||||
j write_tohost;
|
||||
|
||||
#define RVMODEL_BOOT
|
||||
|
@ -52,7 +52,7 @@ class sail_cSim(pluginTemplate):
|
||||
ispec = utils.load_yaml(isa_yaml)['hart0']
|
||||
self.xlen = ('64' if 64 in ispec['supported_xlen'] else '32')
|
||||
self.isa = 'rv' + self.xlen
|
||||
self.compile_cmd = self.compile_cmd+' -mabi='+('lp64 ' if 64 in ispec['supported_xlen'] else 'ilp32 ')
|
||||
self.compile_cmd = self.compile_cmd+' -mabi='+('lp64 ' if 64 in ispec['supported_xlen'] else ('ilp32e ' if "E" in ispec["ISA"] else 'ilp32 '))
|
||||
if "I" in ispec["ISA"]:
|
||||
self.isa += 'i'
|
||||
if "M" in ispec["ISA"]:
|
||||
@ -90,7 +90,7 @@ class sail_cSim(pluginTemplate):
|
||||
test_dir = testentry['work_dir']
|
||||
test_name = test.rsplit('/',1)[1][:-2]
|
||||
|
||||
elf = 'Ref.elf'
|
||||
elf = 'ref.elf'
|
||||
|
||||
execute = "@cd "+testentry['work_dir']+";"
|
||||
|
||||
@ -98,10 +98,16 @@ class sail_cSim(pluginTemplate):
|
||||
compile_cmd = cmd + ' -D' + " -D".join(testentry['macros'])
|
||||
execute+=compile_cmd+";"
|
||||
|
||||
execute += self.objdump_cmd.format(elf, self.xlen, 'Ref.elf.objdump')
|
||||
execute += self.objdump_cmd.format(elf, self.xlen, 'ref.elf.objdump')
|
||||
sig_file = os.path.join(test_dir, self.name[:-1] + ".signature")
|
||||
|
||||
execute += self.sail_exe[self.xlen] + ' -z268435455 --test-signature={0} {1} > {2}.log 2>&1;'.format(sig_file, elf, test_name)
|
||||
|
||||
# Check if the tests can be run on SAIL
|
||||
if ('NO_SAIL=True' in testentry['macros']):
|
||||
# if the tests can't run on SAIL we copy the reference output to the src directory
|
||||
reference_output = re.sub("/src/","/references/", re.sub(".S",".reference_output", test))
|
||||
execute += 'cut -c-{0:g} {1} > {2}'.format(8, reference_output, sig_file) #use cut to remove comments when copying
|
||||
else:
|
||||
execute += self.sail_exe[self.xlen] + ' -z268435455 -i --test-signature={0} {1} > {2}.log 2>&1;'.format(sig_file, elf, test_name)
|
||||
|
||||
cov_str = ' '
|
||||
for label in testentry['coverage_labels']:
|
||||
|
2
tests/riscof/spike/env/model_test.h
vendored
2
tests/riscof/spike/env/model_test.h
vendored
@ -14,7 +14,7 @@
|
||||
#define RVMODEL_HALT \
|
||||
li x1, 1; \
|
||||
write_tohost: \
|
||||
sw x1, tohost, t5; \
|
||||
sw x1, tohost, t0; \
|
||||
j write_tohost;
|
||||
|
||||
#define RVMODEL_BOOT
|
||||
|
@ -11,7 +11,7 @@
|
||||
// #define rvtest_gpr_save
|
||||
// #endif
|
||||
|
||||
#define TEST_CASE_1
|
||||
// #define TEST_CASE_1
|
||||
|
||||
//-----------------------------------------------------------------------
|
||||
// RV Arch Test Macros
|
||||
@ -95,14 +95,14 @@
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#if XLEN==64
|
||||
#if FLEN==32
|
||||
#define SREG sw
|
||||
#define LREG lW
|
||||
#define REGWIDTH 4
|
||||
#define MASK 0xFFFFFFFF
|
||||
#endif
|
||||
#endif
|
||||
// #if XLEN==64
|
||||
// #if FLEN==32
|
||||
// #define SREG sw
|
||||
// #define LREG lW
|
||||
// #define REGWIDTH 4
|
||||
// #define MASK 0xFFFFFFFF
|
||||
// #endif
|
||||
// #endif
|
||||
|
||||
#define MMODE_SIG 3
|
||||
#define RLENG (REGWIDTH<<3)
|
||||
|
@ -19,6 +19,7 @@
|
||||
|
||||
#include "model_test.h"
|
||||
#include "arch_test.h"
|
||||
RVTEST_ISA("RV32I")
|
||||
|
||||
.section .text.init
|
||||
.globl rvtest_entry_point
|
||||
@ -27,6 +28,7 @@ RVMODEL_BOOT
|
||||
RVTEST_CODE_BEGIN
|
||||
|
||||
RVTEST_SIGBASE( x6, wally_signature)
|
||||
RVTEST_CASE(0,"//check ISA:=regex(.*32.*);check ISA:=regex(.*I.*);def TEST_CASE_1=True;",add)
|
||||
|
||||
# Testcase 0: rs1:x28(0x00000000), rs2:x13(0x00000000), result rd:x25(0x00000000)
|
||||
li x28, MASK_XLEN(0x00000000)
|
||||
|
@ -19,6 +19,7 @@
|
||||
|
||||
#include "model_test.h"
|
||||
#include "arch_test.h"
|
||||
RVTEST_ISA("RV32I")
|
||||
|
||||
.section .text.init
|
||||
.globl rvtest_entry_point
|
||||
@ -28,6 +29,8 @@ RVTEST_CODE_BEGIN
|
||||
|
||||
RVTEST_SIGBASE( x6, wally_signature)
|
||||
|
||||
RVTEST_CASE(0,"//check ISA:=regex(.*32.*);check ISA:=regex(.*I.*);def TEST_CASE_1=True;",slt)
|
||||
|
||||
# Testcase 0: rs1:x11(0x00000000), rs2:x8(0x00000000), result rd:x24(0x00000000)
|
||||
li x11, MASK_XLEN(0x00000000)
|
||||
li x8, MASK_XLEN(0x00000000)
|
||||
|
@ -19,6 +19,7 @@
|
||||
|
||||
#include "model_test.h"
|
||||
#include "arch_test.h"
|
||||
RVTEST_ISA("RV32I")
|
||||
|
||||
.section .text.init
|
||||
.globl rvtest_entry_point
|
||||
@ -28,6 +29,8 @@ RVTEST_CODE_BEGIN
|
||||
|
||||
RVTEST_SIGBASE( x6, wally_signature)
|
||||
|
||||
RVTEST_CASE(0,"//check ISA:=regex(.*32.*);check ISA:=regex(.*I.*);def TEST_CASE_1=True;",sltu)
|
||||
|
||||
# Testcase 0: rs1:x20(0x00000000), rs2:x26(0x00000000), result rd:x13(0x00000000)
|
||||
li x20, MASK_XLEN(0x00000000)
|
||||
li x26, MASK_XLEN(0x00000000)
|
||||
|
@ -19,6 +19,7 @@
|
||||
|
||||
#include "model_test.h"
|
||||
#include "arch_test.h"
|
||||
RVTEST_ISA("RV32I")
|
||||
|
||||
.section .text.init
|
||||
.globl rvtest_entry_point
|
||||
@ -26,6 +27,8 @@ rvtest_entry_point:
|
||||
RVMODEL_BOOT
|
||||
RVTEST_CODE_BEGIN
|
||||
|
||||
RVTEST_CASE(0,"//check ISA:=regex(.*32.*);check ISA:=regex(.*I.*);def TEST_CASE_1=True;",sub)
|
||||
|
||||
RVTEST_SIGBASE( x6, wally_signature)
|
||||
|
||||
# Testcase 0: rs1:x3(0x00000000), rs2:x29(0x00000000), result rd:x28(0x00000000)
|
||||
|
@ -19,6 +19,7 @@
|
||||
|
||||
#include "model_test.h"
|
||||
#include "arch_test.h"
|
||||
RVTEST_ISA("RV32I")
|
||||
|
||||
.section .text.init
|
||||
.globl rvtest_entry_point
|
||||
@ -28,6 +29,8 @@ RVTEST_CODE_BEGIN
|
||||
|
||||
RVTEST_SIGBASE( x6, wally_signature)
|
||||
|
||||
RVTEST_CASE(0,"//check ISA:=regex(.*32.*);check ISA:=regex(.*I.*);def TEST_CASE_1=True;",xor)
|
||||
|
||||
# Testcase 0: rs1:x14(0x00000000), rs2:x19(0x00000000), result rd:x9(0x00000000)
|
||||
li x14, MASK_XLEN(0x00000000)
|
||||
li x19, MASK_XLEN(0x00000000)
|
||||
|
@ -6,16 +6,16 @@
|
||||
00000000 # mtval of faulting instruction (0x0)
|
||||
00001880 # masked out mstatus.MPP = 11, mstatus.MPIE = 1, and mstatus.MIE = 0
|
||||
00000003 # mcause from Breakpoint
|
||||
80000168 # mtval of breakpoint instruction adress
|
||||
8000015c # mtval of breakpoint instruction adress
|
||||
00001880 # masked out mstatus.MPP = 11, mstatus.MPIE = 1, and mstatus.MIE = 0
|
||||
00000004 # mcause from load address misaligned
|
||||
80000171 # mtval of misaligned address
|
||||
80000165 # mtval of misaligned address
|
||||
00001880 # masked out mstatus.MPP = 11, mstatus.MPIE = 1, and mstatus.MIE = 0
|
||||
00000005 # mcause from load access
|
||||
00000000 # mtval of accessed adress (0x0)
|
||||
00001880 # masked out mstatus.MPP = 11, mstatus.MPIE = 1, and mstatus.MIE = 0
|
||||
00000006 # mcause from store misaligned
|
||||
80000189 # mtval of address with misaligned store instr
|
||||
8000017d # mtval of address with misaligned store instr
|
||||
00001880 # masked out mstatus.MPP = 11, mstatus.MPIE = 1, and mstatus.MIE = 0
|
||||
00000007 # mcause from store access
|
||||
00000000 # mtval of accessed address (0x0)
|
||||
@ -62,16 +62,16 @@ fffff7ff # medeleg after attempted write of all 1's (only some bits are writeabl
|
||||
00000000 # mtval of faulting instruction (0x0)
|
||||
00001880 # masked out mstatus.MPP = 11, mstatus.MPIE = 1, and mstatus.MIE = 0
|
||||
00000003 # mcause from Breakpoint
|
||||
80000168 # mtval of breakpoint instruction adress
|
||||
8000015c # mtval of breakpoint instruction adress
|
||||
00001880 # masked out mstatus.MPP = 11, mstatus.MPIE = 1, and mstatus.MIE = 0
|
||||
00000004 # mcause from load address misaligned
|
||||
80000171 # mtval of misaligned address
|
||||
80000165 # mtval of misaligned address
|
||||
00001880 # masked out mstatus.MPP = 11, mstatus.MPIE = 1, and mstatus.MIE = 0
|
||||
00000005 # mcause from load access
|
||||
00000000 # mtval of accessed adress (0x0)
|
||||
00001880 # masked out mstatus.MPP = 11, mstatus.MPIE = 1, and mstatus.MIE = 0
|
||||
00000006 # mcause from store misaligned
|
||||
80000189 # mtval of address with misaligned store instr
|
||||
8000017d # mtval of address with misaligned store instr
|
||||
00001880 # masked out mstatus.MPP = 11, mstatus.MPIE = 1, and mstatus.MIE = 0
|
||||
00000007 # mcause from store access
|
||||
00000000 # mtval of accessed address (0x0)
|
||||
|
@ -9,16 +9,16 @@
|
||||
00000000 # stval of faulting instruction (0x0)
|
||||
00000800 # masked out mstatus.mpp = 1, mstatus.MPIE = 0, and mstatus.MIE = 0
|
||||
00000003 # scause from Breakpoint
|
||||
80000168 # stval of breakpoint instruction adress
|
||||
8000015c # stval of breakpoint instruction adress
|
||||
00000800 # masked out mstatus.mpp = 1, mstatus.MPIE = 0, and mstatus.MIE = 0
|
||||
00000004 # scause from load address misaligned
|
||||
80000171 # stval of misaligned address
|
||||
80000165 # stval of misaligned address
|
||||
00000800 # masked out mstatus.mpp = 1, mstatus.MPIE = 0, and mstatus.MIE = 0
|
||||
00000005 # scause from load access
|
||||
00000000 # stval of accessed adress (0x0)
|
||||
00000800 # masked out mstatus.mpp = 1, mstatus.MPIE = 0, and mstatus.MIE = 0
|
||||
00000006 # scause from store misaligned
|
||||
80000189 # stval of address with misaligned store instr
|
||||
8000017d # stval of address with misaligned store instr
|
||||
00000800 # masked out mstatus.mpp = 1, mstatus.MPIE = 0, and mstatus.MIE = 0
|
||||
00000007 # scause from store access
|
||||
00000000 # stval of accessed address (0x0)
|
||||
@ -64,16 +64,16 @@ fffff7ff # medeleg after attempted write of all 1's (only some bits are writeabl
|
||||
00000000 # stval of faulting instruction (0x0)
|
||||
00000120 # masked out sstatus.SPP = 1, sstatus.SPIE = 1, and sstatus.SIE = 0
|
||||
00000003 # scause from Breakpoint
|
||||
80000168 # stval of breakpoint instruction adress
|
||||
8000015c # stval of breakpoint instruction adress
|
||||
00000120 # masked out sstatus.SPP = 1, sstatus.SPIE = 1, and sstatus.SIE = 0
|
||||
00000004 # scause from load address misaligned
|
||||
80000171 # stval of misaligned address
|
||||
80000165 # stval of misaligned address
|
||||
00000120 # masked out sstatus.SPP = 1, sstatus.SPIE = 1, and sstatus.SIE = 0
|
||||
00000005 # scause from load access
|
||||
00000000 # stval of accessed adress (0x0)
|
||||
00000120 # masked out sstatus.SPP = 1, sstatus.SPIE = 1, and sstatus.SIE = 0
|
||||
00000006 # scause from store misaligned
|
||||
80000189 # stval of address with misaligned store instr
|
||||
8000017d # stval of address with misaligned store instr
|
||||
00000120 # masked out sstatus.SPP = 1, sstatus.SPIE = 1, and sstatus.SIE = 0
|
||||
00000007 # scause from store access
|
||||
00000000 # stval of accessed address (0x0)
|
||||
|
@ -26,7 +26,7 @@
|
||||
|
||||
.macro INIT_TESTS
|
||||
|
||||
RVTEST_ISA("RV32I")
|
||||
// RVTEST_ISA("RV32I")
|
||||
|
||||
.section .text.init
|
||||
.globl rvtest_entry_point
|
||||
@ -152,7 +152,15 @@ cause_s_soft_interrupt:
|
||||
csrs sip, t3 // set supervisor software interrupt pending. SIP is a subset of MIP, so writing this should also change MIP.
|
||||
ret
|
||||
|
||||
cause_s_soft_from_m_interrupt:
|
||||
li t3, 0x2
|
||||
csrs mip, t3 // set supervisor software interrupt pending. SIP is a subset of MIP, so writing this should also change MIP.
|
||||
ret
|
||||
|
||||
cause_m_ext_interrupt:
|
||||
// these interrupts involve a time loop waiting for the interrupt to go off.
|
||||
// since interrupts are not always enabled, we need to make it stop after a certain number of loops, which is the number in a3
|
||||
li a3, 0x40
|
||||
// ========== Configure PLIC ==========
|
||||
// m priority threshold = 0
|
||||
li t3, 0xC200000
|
||||
@ -189,6 +197,9 @@ m_ext_loop:
|
||||
ret
|
||||
|
||||
cause_s_ext_interrupt_GPIO:
|
||||
// these interrupts involve a time loop waiting for the interrupt to go off.
|
||||
// since interrupts are not always enabled, we need to make it stop after a certain number of loops, which is the number in a3
|
||||
li a3, 0x40
|
||||
// ========== Configure PLIC ==========
|
||||
// s priority threshold = 0
|
||||
li t3, 0xC201000
|
||||
|
@ -24,7 +24,8 @@
|
||||
#include "model_test.h"
|
||||
#include "arch_test.h"
|
||||
|
||||
RVTEST_ISA("RV64I")
|
||||
RVTEST_ISA("RV32IAF")
|
||||
RVTEST_CASE(0,"//check ISA:=regex(.*32.*);check ISA:=regex(.*I.*A.*F.*); def Drvtest_mtrap_routine=True;def TEST_CASE_1=True;",amo)
|
||||
|
||||
.section .text.init
|
||||
.globl rvtest_entry_point
|
||||
|
@ -22,6 +22,8 @@
|
||||
///////////////////////////////////////////
|
||||
|
||||
#include "WALLY-TEST-LIB-32.h"
|
||||
RVTEST_ISA("RV32I")
|
||||
RVTEST_CASE(0,"//check ISA:=regex(.*32.*);check ISA:=regex(.*I.*); def Drvtest_mtrap_routine=True;def TEST_CASE_1=True;",clint) #def NO_SAIL=True;
|
||||
|
||||
INIT_TESTS
|
||||
|
||||
|
@ -23,6 +23,9 @@
|
||||
|
||||
#include "WALLY-TEST-LIB-32.h"
|
||||
|
||||
RVTEST_ISA("RV32I")
|
||||
RVTEST_CASE(0,"//check ISA:=regex(.*32.*);check ISA:=regex(.*I.*); def Drvtest_mtrap_routine=True;def TEST_CASE_1=True;",csr-permission-s)
|
||||
|
||||
INIT_TESTS
|
||||
|
||||
TRAP_HANDLER m
|
||||
|
@ -23,6 +23,9 @@
|
||||
|
||||
#include "WALLY-TEST-LIB-32.h"
|
||||
|
||||
RVTEST_ISA("RV32I")
|
||||
RVTEST_CASE(0,"//check ISA:=regex(.*32.*);check ISA:=regex(.*I.*); def Drvtest_mtrap_routine=True;def TEST_CASE_1=True;",csr-permission-u)
|
||||
|
||||
INIT_TESTS
|
||||
|
||||
TRAP_HANDLER m
|
||||
|
@ -23,6 +23,9 @@
|
||||
|
||||
#include "WALLY-TEST-LIB-32.h"
|
||||
|
||||
RVTEST_ISA("RV32I")
|
||||
RVTEST_CASE(0,"//check ISA:=regex(.*32.*);check ISA:=regex(.*I.*); def Drvtest_mtrap_routine=True;def TEST_CASE_1=True;def NO_SAIL=True;",gpio)
|
||||
|
||||
INIT_TESTS
|
||||
|
||||
TRAP_HANDLER m
|
||||
|
@ -24,7 +24,8 @@
|
||||
#include "model_test.h"
|
||||
#include "arch_test.h"
|
||||
|
||||
RVTEST_ISA("RV64I")
|
||||
RVTEST_ISA("RV32IA")
|
||||
RVTEST_CASE(0,"//check ISA:=regex(.*32.*);check ISA:=regex(.*I.*A.*); def Drvtest_mtrap_routine=True;def TEST_CASE_1=True;",lrsc)
|
||||
|
||||
.section .text.init
|
||||
.globl rvtest_entry_point
|
||||
|
@ -23,6 +23,9 @@
|
||||
|
||||
#include "WALLY-TEST-LIB-32.h"
|
||||
|
||||
RVTEST_ISA("RV32I")
|
||||
RVTEST_CASE(0,"//check ISA:=regex(.*32.*);check ISA:=regex(.*I.*); def Drvtest_mtrap_routine=True;def TEST_CASE_1=True;def NO_SAIL=True;",mie)
|
||||
|
||||
INIT_TESTS
|
||||
|
||||
CAUSE_TRAP_TRIGGERS // initialize code that will cause traps for consistent mtval addresses
|
||||
|
@ -23,6 +23,9 @@
|
||||
|
||||
#include "WALLY-TEST-LIB-32.h"
|
||||
|
||||
RVTEST_ISA("RV32I")
|
||||
RVTEST_CASE(0,"//check ISA:=regex(.*32.*);check ISA:=regex(.*I.*); def Drvtest_mtrap_routine=True;def TEST_CASE_1=True;",minfo)
|
||||
|
||||
INIT_TESTS
|
||||
|
||||
TRAP_HANDLER m
|
||||
|
@ -23,6 +23,9 @@
|
||||
|
||||
#include "WALLY-TEST-LIB-32.h"
|
||||
|
||||
RVTEST_ISA("RV32I")
|
||||
RVTEST_CASE(0,"//check ISA:=regex(.*32.*);check ISA:=regex(.*I.*); def Drvtest_mtrap_routine=True;def TEST_CASE_1=True;",misa)
|
||||
|
||||
INIT_TESTS
|
||||
|
||||
TRAP_HANDLER m
|
||||
|
@ -23,6 +23,9 @@
|
||||
|
||||
#include "WALLY-TEST-LIB-32.h"
|
||||
|
||||
RVTEST_ISA("RV32I")
|
||||
RVTEST_CASE(0,"//check ISA:=regex(.*32.*);check ISA:=regex(.*I.*); def Drvtest_mtrap_routine=True;def TEST_CASE_1=True;",mmu)
|
||||
|
||||
INIT_TESTS
|
||||
|
||||
TRAP_HANDLER m
|
||||
|
@ -23,6 +23,9 @@
|
||||
|
||||
#include "WALLY-TEST-LIB-32.h"
|
||||
|
||||
RVTEST_ISA("RV32I")
|
||||
RVTEST_CASE(0,"//check ISA:=regex(.*32.*);check ISA:=regex(.*I.*); def Drvtest_mtrap_routine=True;def TEST_CASE_1=True;def NO_SAIL=True;",mtvec)
|
||||
|
||||
INIT_TESTS
|
||||
|
||||
CAUSE_TRAP_TRIGGERS // initialize code that will cause traps for consistent mtval addresses
|
||||
|
@ -36,6 +36,9 @@
|
||||
|
||||
#include "WALLY-TEST-LIB-32.h"
|
||||
|
||||
RVTEST_ISA("RV32I")
|
||||
RVTEST_CASE(0,"//check ISA:=regex(.*32.*);check ISA:=regex(.*I.*); def Drvtest_mtrap_routine=True;def TEST_CASE_1=True;def NO_SAIL=True;",pma)
|
||||
|
||||
INIT_TESTS
|
||||
|
||||
TRAP_HANDLER m
|
||||
|
@ -23,6 +23,9 @@
|
||||
|
||||
#include "WALLY-TEST-LIB-32.h"
|
||||
|
||||
RVTEST_ISA("RV32I")
|
||||
RVTEST_CASE(0,"//check ISA:=regex(.*32.*);check ISA:=regex(.*I.*); def Drvtest_mtrap_routine=True;def TEST_CASE_1=True;",pmp)
|
||||
|
||||
INIT_TESTS
|
||||
|
||||
TRAP_HANDLER m
|
||||
@ -54,6 +57,8 @@ test_cases:
|
||||
|
||||
# Test 12.3.2.2.1 Config: Write known values and set PMP config according to table 12.4 in the *** riscv book, copied below
|
||||
|
||||
.4byte 0x80100300, 0xFEEDBEEF, write32_test
|
||||
|
||||
# write pmpaddr regs
|
||||
# | Reg | pmpaddr | pmpcfg | L | A | X | W | R | Comments |
|
||||
.4byte 0x0, 0x0FFFFFFF, write_pmpaddr_0 # | 0 | 0x0FFFFFFF | 1F | 0 | NAPOT | 0 | 1 | 1 | I/O 00000000-7FFFFFFF RW |
|
||||
|
@ -23,6 +23,9 @@
|
||||
|
||||
#include "WALLY-TEST-LIB-32.h"
|
||||
|
||||
RVTEST_ISA("RV32I")
|
||||
RVTEST_CASE(0,"//check ISA:=regex(.*32.*);check ISA:=regex(.*I.*); def Drvtest_mtrap_routine=True;def TEST_CASE_1=True;def NO_SAIL=True;",sie)
|
||||
|
||||
INIT_TESTS
|
||||
|
||||
CAUSE_TRAP_TRIGGERS // initialize code that will cause traps for consistent mtval addresses
|
||||
@ -43,7 +46,7 @@ WRITE_READ_CSR sie, 0x0 // force zeroing out mie CSR.
|
||||
jal cause_s_time_interrupt // write this from M mode to attempt to make s time interrupt pending
|
||||
GOTO_S_MODE // this would cause S mode interrupt to fire, but it shouldn't since SIE is zeored out.
|
||||
jal cause_s_soft_interrupt
|
||||
li a3, 0x40 // these interrupts involve a time loop waiting for the interrupt to go off.
|
||||
# li a3, 0x40 // these interrupts involve a time loop waiting for the interrupt to go off.
|
||||
// since interrupts are not always enabled, we need to make it stop after a certain number of loops, which is the number in a3
|
||||
jal cause_s_ext_interrupt_GPIO
|
||||
|
||||
|
@ -23,8 +23,15 @@
|
||||
|
||||
#include "WALLY-TEST-LIB-32.h"
|
||||
|
||||
RVTEST_ISA("RV32IAF")
|
||||
RVTEST_CASE(0,"//check ISA:=regex(.*32.*);check ISA:=regex(.*I.*A.*F.*); def Drvtest_mtrap_routine=True;def TEST_CASE_1=True;def NO_SAIL=True;",status-fp-enabled)
|
||||
|
||||
INIT_TESTS
|
||||
|
||||
// Set the FS bits to 01, This makes sure SAILs mstatus matches wally in the signature
|
||||
li x29, 0x00002000
|
||||
csrw mstatus, x29
|
||||
|
||||
TRAP_HANDLER m
|
||||
|
||||
// Misa.F is already 1 in this config, making floating point enabled
|
||||
|
@ -23,6 +23,9 @@
|
||||
|
||||
#include "WALLY-TEST-LIB-32.h"
|
||||
|
||||
RVTEST_ISA("RV32I")
|
||||
RVTEST_CASE(0,"//check ISA:=regex(.*32.*);check ISA:=regex(.*I.*); def Drvtest_mtrap_routine=True;def TEST_CASE_1=True;",status-mie)
|
||||
|
||||
INIT_TESTS
|
||||
|
||||
CAUSE_TRAP_TRIGGERS // initialize code that will cause traps for consistent mtval addresses
|
||||
|
@ -23,6 +23,9 @@
|
||||
|
||||
#include "WALLY-TEST-LIB-32.h"
|
||||
|
||||
RVTEST_ISA("RV32I")
|
||||
RVTEST_CASE(0,"//check ISA:=regex(.*32.*);check ISA:=regex(.*I.*); def Drvtest_mtrap_routine=True;def TEST_CASE_1=True;def NO_SAIL=True;",status-sie)
|
||||
|
||||
INIT_TESTS
|
||||
|
||||
CAUSE_TRAP_TRIGGERS // initialize code that will cause traps for consistent mtval addresses
|
||||
|
@ -24,6 +24,9 @@
|
||||
|
||||
#include "WALLY-TEST-LIB-32.h"
|
||||
|
||||
RVTEST_ISA("RV32I")
|
||||
RVTEST_CASE(0,"//check ISA:=regex(.*32.*);check ISA:=regex(.*I.*); def Drvtest_mtrap_routine=True;def TEST_CASE_1=True;def NO_SAIL=True;", status-tw)
|
||||
|
||||
INIT_TESTS
|
||||
|
||||
TRAP_HANDLER m, EXT_SIGNATURE=1 // turn on recording mtval and status bits on traps
|
||||
|
@ -23,6 +23,9 @@
|
||||
|
||||
#include "WALLY-TEST-LIB-32.h"
|
||||
|
||||
RVTEST_ISA("RV32I")
|
||||
RVTEST_CASE(0,"//check ISA:=regex(.*32.*);check ISA:=regex(.*I.*); def Drvtest_mtrap_routine=True;def TEST_CASE_1=True;def NO_SAIL=True;",stvec)
|
||||
|
||||
INIT_TESTS
|
||||
|
||||
CAUSE_TRAP_TRIGGERS // initialize code that will cause traps for consistent mtval addresses
|
||||
|
@ -23,6 +23,9 @@
|
||||
|
||||
#include "WALLY-TEST-LIB-32.h"
|
||||
|
||||
RVTEST_ISA("RV32I")
|
||||
RVTEST_CASE(0,"//check ISA:=regex(.*32.*);check ISA:=regex(.*I.*); def Drvtest_mtrap_routine=True;def TEST_CASE_1=True;def NO_SAIL=True;",trap)
|
||||
|
||||
INIT_TESTS
|
||||
|
||||
CAUSE_TRAP_TRIGGERS // initialize code that will cause traps for consistent mtval addresses
|
||||
@ -48,7 +51,7 @@ GOTO_S_MODE // Causes U mode ecall
|
||||
GOTO_M_MODE // Causes S mode ecall
|
||||
|
||||
|
||||
jal cause_s_soft_interrupt
|
||||
jal cause_s_soft_from_m_interrupt
|
||||
jal cause_m_soft_interrupt
|
||||
jal cause_s_time_interrupt
|
||||
jal cause_m_time_interrupt
|
||||
@ -70,14 +73,11 @@ jal cause_store_addr_misaligned
|
||||
jal cause_store_acc
|
||||
jal cause_ecall // M mode ecall
|
||||
|
||||
jal cause_s_soft_interrupt // The delegated S mode interrupts should not fire since we're running in M mode.
|
||||
jal cause_s_soft_from_m_interrupt // The delegated S mode interrupts should not fire since we're running in M mode.
|
||||
jal cause_m_soft_interrupt
|
||||
jal cause_s_time_interrupt
|
||||
jal cause_m_time_interrupt
|
||||
li a3, 0x40 // these interrupts involve a time loop waiting for the interrupt to go off.
|
||||
// since interrupts are not always enabled, we need to make it stop after a certain number of loops, which is the number in a3
|
||||
jal cause_s_ext_interrupt_GPIO
|
||||
li a3, 0x40
|
||||
jal cause_m_ext_interrupt
|
||||
|
||||
|
||||
|
@ -23,6 +23,9 @@
|
||||
|
||||
#include "WALLY-TEST-LIB-32.h"
|
||||
|
||||
RVTEST_ISA("RV32I")
|
||||
RVTEST_CASE(0,"//check ISA:=regex(.*32.*);check ISA:=regex(.*I.*); def Drvtest_mtrap_routine=True;def NO_SAIL=True;",trap-s)
|
||||
|
||||
INIT_TESTS
|
||||
|
||||
CAUSE_TRAP_TRIGGERS // initialize code that will cause traps for consistent mtval addresses
|
||||
|
@ -23,6 +23,9 @@
|
||||
|
||||
#include "WALLY-TEST-LIB-32.h"
|
||||
|
||||
RVTEST_ISA("RV32I")
|
||||
RVTEST_CASE(0,"//check ISA:=regex(.*32.*);check ISA:=regex(.*I.*); def Drvtest_mtrap_routine=True;def TEST_CASE_1=True;",trap-sret)
|
||||
|
||||
INIT_TESTS
|
||||
|
||||
TRAP_HANDLER m, EXT_SIGNATURE=1
|
||||
|
@ -23,6 +23,9 @@
|
||||
|
||||
#include "WALLY-TEST-LIB-32.h"
|
||||
|
||||
RVTEST_ISA("RV32I")
|
||||
RVTEST_CASE(0,"//check ISA:=regex(.*32.*);check ISA:=regex(.*I.*); def Drvtest_mtrap_routine=True;def TEST_CASE_1=True;",trap-u)
|
||||
|
||||
INIT_TESTS
|
||||
|
||||
CAUSE_TRAP_TRIGGERS // initialize code that will cause traps for consistent mtval addresses
|
||||
|
@ -23,6 +23,9 @@
|
||||
|
||||
#include "WALLY-TEST-LIB-32.h"
|
||||
|
||||
RVTEST_ISA("RV32I")
|
||||
RVTEST_CASE(0,"//check ISA:=regex(.*32.*);check ISA:=regex(.*I.*); def Drvtest_mtrap_routine=True;def TEST_CASE_1=True;",wfi)
|
||||
|
||||
INIT_TESTS
|
||||
|
||||
TRAP_HANDLER m, EXT_SIGNATURE=1 // turn on recording mtval and status bits on traps
|
||||
|
@ -19,6 +19,7 @@
|
||||
|
||||
#include "model_test.h"
|
||||
#include "arch_test.h"
|
||||
RVTEST_ISA("RV64I")
|
||||
|
||||
.section .text.init
|
||||
.globl rvtest_entry_point
|
||||
@ -28,6 +29,8 @@ RVTEST_CODE_BEGIN
|
||||
|
||||
RVTEST_SIGBASE( x6, wally_signature)
|
||||
|
||||
RVTEST_CASE(0,"//check ISA:=regex(.*64.*);check ISA:=regex(.*I.*);def TEST_CASE_1=True;",add)
|
||||
|
||||
# Testcase 0: rs1:x20(0x0000000000000000), rs2:x22(0x0000000000000000), result rd:x3(0x0000000000000000)
|
||||
li x20, MASK_XLEN(0x0000000000000000)
|
||||
li x22, MASK_XLEN(0x0000000000000000)
|
||||
|
@ -19,6 +19,7 @@
|
||||
|
||||
#include "model_test.h"
|
||||
#include "arch_test.h"
|
||||
RVTEST_ISA("RV64I")
|
||||
|
||||
.section .text.init
|
||||
.globl rvtest_entry_point
|
||||
@ -28,6 +29,8 @@ RVTEST_CODE_BEGIN
|
||||
|
||||
RVTEST_SIGBASE( x6, wally_signature)
|
||||
|
||||
RVTEST_CASE(0,"//check ISA:=regex(.*64.*);check ISA:=regex(.*I.*);def TEST_CASE_1=True;",slt)
|
||||
|
||||
# Testcase 0: rs1:x18(0x0000000000000000), rs2:x9(0x0000000000000000), result rd:x5(0x0000000000000000)
|
||||
li x18, MASK_XLEN(0x0000000000000000)
|
||||
li x9, MASK_XLEN(0x0000000000000000)
|
||||
|
@ -19,6 +19,7 @@
|
||||
|
||||
#include "model_test.h"
|
||||
#include "arch_test.h"
|
||||
RVTEST_ISA("RV64I")
|
||||
|
||||
.section .text.init
|
||||
.globl rvtest_entry_point
|
||||
@ -28,6 +29,8 @@ RVTEST_CODE_BEGIN
|
||||
|
||||
RVTEST_SIGBASE( x6, wally_signature)
|
||||
|
||||
RVTEST_CASE(0,"//check ISA:=regex(.*64.*);check ISA:=regex(.*I.*);def TEST_CASE_1=True;",sltu)
|
||||
|
||||
# Testcase 0: rs1:x22(0x0000000000000000), rs2:x23(0x0000000000000000), result rd:x2(0x0000000000000000)
|
||||
li x22, MASK_XLEN(0x0000000000000000)
|
||||
li x23, MASK_XLEN(0x0000000000000000)
|
||||
|
@ -19,6 +19,7 @@
|
||||
|
||||
#include "model_test.h"
|
||||
#include "arch_test.h"
|
||||
RVTEST_ISA("RV64I")
|
||||
|
||||
.section .text.init
|
||||
.globl rvtest_entry_point
|
||||
@ -28,6 +29,8 @@ RVTEST_CODE_BEGIN
|
||||
|
||||
RVTEST_SIGBASE( x6, wally_signature)
|
||||
|
||||
RVTEST_CASE(0,"//check ISA:=regex(.*64.*);check ISA:=regex(.*I.*);def TEST_CASE_1=True;",sub)
|
||||
|
||||
# Testcase 0: rs1:x4(0x0000000000000000), rs2:x23(0x0000000000000000), result rd:x13(0x0000000000000000)
|
||||
li x4, MASK_XLEN(0x0000000000000000)
|
||||
li x23, MASK_XLEN(0x0000000000000000)
|
||||
|
@ -19,6 +19,7 @@
|
||||
|
||||
#include "model_test.h"
|
||||
#include "arch_test.h"
|
||||
RVTEST_ISA("RV64I")
|
||||
|
||||
.section .text.init
|
||||
.globl rvtest_entry_point
|
||||
@ -28,6 +29,8 @@ RVTEST_CODE_BEGIN
|
||||
|
||||
RVTEST_SIGBASE( x6, wally_signature)
|
||||
|
||||
RVTEST_CASE(0,"//check ISA:=regex(.*64.*);check ISA:=regex(.*I.*);def TEST_CASE_1=True;",xor)
|
||||
|
||||
# Testcase 0: rs1:x27(0x0000000000000000), rs2:x22(0x0000000000000000), result rd:x17(0x0000000000000000)
|
||||
li x27, MASK_XLEN(0x0000000000000000)
|
||||
li x22, MASK_XLEN(0x0000000000000000)
|
||||
|
@ -26,7 +26,7 @@
|
||||
|
||||
.macro INIT_TESTS
|
||||
|
||||
RVTEST_ISA("RV64I")
|
||||
// RVTEST_ISA("RV64I")
|
||||
|
||||
.section .text.init
|
||||
.globl rvtest_entry_point
|
||||
@ -156,6 +156,7 @@ cause_s_soft_interrupt:
|
||||
|
||||
cause_m_ext_interrupt:
|
||||
// ========== Configure PLIC ==========
|
||||
li a3, 0x40
|
||||
// m priority threshold = 0
|
||||
li t3, 0xC200000
|
||||
li t4, 0
|
||||
@ -192,6 +193,7 @@ m_ext_loop:
|
||||
|
||||
cause_s_ext_interrupt_GPIO:
|
||||
// ========== Configure PLIC ==========
|
||||
li a3, 0x40
|
||||
// s priority threshold = 0
|
||||
li t3, 0xC201000
|
||||
li t4, 0
|
||||
|
@ -24,7 +24,8 @@
|
||||
#include "model_test.h"
|
||||
#include "arch_test.h"
|
||||
|
||||
RVTEST_ISA("RV64I")
|
||||
RVTEST_ISA("RV64IAF")
|
||||
RVTEST_CASE(0,"//check ISA:=regex(.*64.*);check ISA:=regex(.*I.A*.F*.*);def TEST_CASE_1=True;",amo)
|
||||
|
||||
.section .text.init
|
||||
.globl rvtest_entry_point
|
||||
|
@ -23,6 +23,9 @@
|
||||
|
||||
#include "WALLY-TEST-LIB-64.h"
|
||||
|
||||
RVTEST_ISA("RV64I")
|
||||
RVTEST_CASE(0,"//check ISA:=regex(.*64.*);check ISA:=regex(.*I.*);def TEST_CASE_1=True;",csr-permission-s)
|
||||
|
||||
INIT_TESTS
|
||||
|
||||
TRAP_HANDLER m
|
||||
|
@ -23,6 +23,9 @@
|
||||
|
||||
#include "WALLY-TEST-LIB-64.h"
|
||||
|
||||
RVTEST_ISA("RV64I")
|
||||
RVTEST_CASE(0,"//check ISA:=regex(.*64.*);check ISA:=regex(.*I.*);def TEST_CASE_1=True;",csr-permission-u)
|
||||
|
||||
INIT_TESTS
|
||||
|
||||
TRAP_HANDLER m
|
||||
|
@ -24,7 +24,8 @@
|
||||
#include "model_test.h"
|
||||
#include "arch_test.h"
|
||||
|
||||
RVTEST_ISA("RV64I")
|
||||
RVTEST_ISA("RV64IAF")
|
||||
RVTEST_CASE(0,"//check ISA:=regex(.*64.*);check ISA:=regex(.*I.A*.F*.*);def TEST_CASE_1=True",lrsc)
|
||||
|
||||
.section .text.init
|
||||
.globl rvtest_entry_point
|
||||
|
@ -22,7 +22,8 @@
|
||||
///////////////////////////////////////////
|
||||
|
||||
#include "WALLY-TEST-LIB-64.h"
|
||||
|
||||
RVTEST_ISA("RV64I")
|
||||
RVTEST_CASE(0,"//check ISA:=regex(.*64.*);check ISA:=regex(.*I.*);def TEST_CASE_1=True;def NO_SAIL=True;",mie)
|
||||
INIT_TESTS
|
||||
|
||||
CAUSE_TRAP_TRIGGERS // initialize code that will cause traps for consistent mtval addresses
|
||||
|
@ -22,6 +22,8 @@
|
||||
///////////////////////////////////////////
|
||||
|
||||
#include "WALLY-TEST-LIB-64.h"
|
||||
RVTEST_ISA("RV64I")
|
||||
RVTEST_CASE(0,"//check ISA:=regex(.*64.*);check ISA:=regex(.*I.*);def TEST_CASE_1=True;",minfo)
|
||||
|
||||
INIT_TESTS
|
||||
|
||||
|
@ -22,6 +22,8 @@
|
||||
///////////////////////////////////////////
|
||||
|
||||
#include "WALLY-TEST-LIB-64.h"
|
||||
RVTEST_ISA("RV64I")
|
||||
RVTEST_CASE(0,"//check ISA:=regex(.*64.*);check ISA:=regex(.*I.*);def TEST_CASE_1=True;",misa)
|
||||
|
||||
INIT_TESTS
|
||||
|
||||
|
@ -22,6 +22,8 @@
|
||||
///////////////////////////////////////////
|
||||
|
||||
#include "WALLY-TEST-LIB-64.h"
|
||||
RVTEST_ISA("RV64I")
|
||||
RVTEST_CASE(0,"//check ISA:=regex(.*64.*);check ISA:=regex(.*I.*);def TEST_CASE_1=True;",mmu-sv39)
|
||||
|
||||
INIT_TESTS
|
||||
|
||||
|
@ -22,6 +22,8 @@
|
||||
///////////////////////////////////////////
|
||||
|
||||
#include "WALLY-TEST-LIB-64.h"
|
||||
RVTEST_ISA("RV64I")
|
||||
RVTEST_CASE(0,"//check ISA:=regex(.*64.*);check ISA:=regex(.*I.*);def TEST_CASE_1=True;",sv48)
|
||||
|
||||
INIT_TESTS
|
||||
|
||||
|
@ -22,6 +22,8 @@
|
||||
///////////////////////////////////////////
|
||||
|
||||
#include "WALLY-TEST-LIB-64.h"
|
||||
RVTEST_ISA("RV64I")
|
||||
RVTEST_CASE(0,"//check ISA:=regex(.*64.*);check ISA:=regex(.*I.*);def TEST_CASE_1=True; def NO_SAIL=True;",mtvec)
|
||||
|
||||
INIT_TESTS
|
||||
|
||||
|
@ -24,6 +24,8 @@
|
||||
#include "arch_test.h"
|
||||
|
||||
RVTEST_ISA("RV64I")
|
||||
// this test is blocked, it won't build or run. To unblock it remove the check ISA:=regex(BLOCKED);
|
||||
RVTEST_CASE(0,"//check ISA:=regex(.*64.*);check ISA:=regex(.*I.*);def TEST_CASE_1=True;def NO_SAIL=True",periph)
|
||||
|
||||
.section .text.init
|
||||
.globl rvtest_entry_point
|
||||
|
@ -35,6 +35,8 @@
|
||||
#define PLIC_RANGE 0x03FFFFFF
|
||||
|
||||
#include "WALLY-TEST-LIB-64.h"
|
||||
RVTEST_ISA("RV64I")
|
||||
RVTEST_CASE(0,"//check ISA:=regex(.*64.*);check ISA:=regex(.*I.*);def TEST_CASE_1=True;def NO_SAIL=True;",pma)
|
||||
|
||||
INIT_TESTS
|
||||
|
||||
|
@ -22,6 +22,8 @@
|
||||
///////////////////////////////////////////
|
||||
|
||||
#include "WALLY-TEST-LIB-64.h"
|
||||
RVTEST_ISA("RV64I")
|
||||
RVTEST_CASE(0,"//check ISA:=regex(.*64.*);check ISA:=regex(.*I.*);def TEST_CASE_1=True;",pmp)
|
||||
|
||||
INIT_TESTS
|
||||
|
||||
|
@ -22,6 +22,8 @@
|
||||
///////////////////////////////////////////
|
||||
|
||||
#include "WALLY-TEST-LIB-64.h"
|
||||
RVTEST_ISA("RV64I")
|
||||
RVTEST_CASE(0,"//check ISA:=regex(.*64.*);check ISA:=regex(.*I.*);def TEST_CASE_1=True;def NO_SAIL=True;",sie)
|
||||
|
||||
INIT_TESTS
|
||||
|
||||
|
@ -22,9 +22,15 @@
|
||||
///////////////////////////////////////////
|
||||
|
||||
#include "WALLY-TEST-LIB-64.h"
|
||||
RVTEST_ISA("RV64IAF")
|
||||
RVTEST_CASE(0,"//check ISA:=regex(.*64.*);check ISA:=regex(.*I.*A.*F.*);def TEST_CASE_1=True;def NO_SAIL=True;",status-fp-enabled)
|
||||
|
||||
INIT_TESTS
|
||||
|
||||
// Set the FS bits to 01, This makes sure SAILs mstatus matches wally in the signature
|
||||
li x29, 0x00002000
|
||||
csrw mstatus, x29
|
||||
|
||||
TRAP_HANDLER m
|
||||
|
||||
// Misa.F is already 1 in this config, making floating point enabled
|
||||
|
@ -22,6 +22,8 @@
|
||||
///////////////////////////////////////////
|
||||
|
||||
#include "WALLY-TEST-LIB-64.h"
|
||||
RVTEST_ISA("RV64I")
|
||||
RVTEST_CASE(0,"//check ISA:=regex(.*64.*);check ISA:=regex(.*I.*);def TEST_CASE_1=True;",status-mie)
|
||||
|
||||
INIT_TESTS
|
||||
|
||||
|
@ -22,6 +22,8 @@
|
||||
///////////////////////////////////////////
|
||||
|
||||
#include "WALLY-TEST-LIB-64.h"
|
||||
RVTEST_ISA("RV64I")
|
||||
RVTEST_CASE(0,"//check ISA:=regex(.*64.*);check ISA:=regex(.*I.*);def TEST_CASE_1=True;",status-sie)
|
||||
|
||||
INIT_TESTS
|
||||
|
||||
|
@ -23,6 +23,8 @@
|
||||
|
||||
|
||||
#include "WALLY-TEST-LIB-64.h"
|
||||
RVTEST_ISA("RV64I")
|
||||
RVTEST_CASE(0,"//check ISA:=regex(.*64.*);check ISA:=regex(.*I.*);def TEST_CASE_1=True;",status-tw)
|
||||
|
||||
INIT_TESTS
|
||||
|
||||
|
@ -22,6 +22,8 @@
|
||||
///////////////////////////////////////////
|
||||
|
||||
#include "WALLY-TEST-LIB-64.h"
|
||||
RVTEST_ISA("RV64I")
|
||||
RVTEST_CASE(0,"//check ISA:=regex(.*64.*);check ISA:=regex(.*I.*);def TEST_CASE_1=True; def NO_SAIL=True;",stvec)
|
||||
|
||||
INIT_TESTS
|
||||
|
||||
|
@ -22,6 +22,8 @@
|
||||
///////////////////////////////////////////
|
||||
|
||||
#include "WALLY-TEST-LIB-64.h"
|
||||
RVTEST_ISA("RV64I")
|
||||
RVTEST_CASE(0,"//check ISA:=regex(.*64.*);check ISA:=regex(.*I.*);def TEST_CASE_1=True;def NO_SAIL=True;",trap)
|
||||
|
||||
INIT_TESTS
|
||||
|
||||
@ -77,7 +79,6 @@ jal cause_m_time_interrupt
|
||||
li a3, 0x40 // these interrupts involve a time loop waiting for the interrupt to go off.
|
||||
// since interrupts are not always enabled, we need to make it stop after a certain number of loops, which is the number in a3
|
||||
jal cause_s_ext_interrupt_GPIO
|
||||
li a3, 0x40
|
||||
jal cause_m_ext_interrupt
|
||||
|
||||
|
||||
|
@ -22,6 +22,8 @@
|
||||
///////////////////////////////////////////
|
||||
|
||||
#include "WALLY-TEST-LIB-64.h"
|
||||
RVTEST_ISA("RV64I")
|
||||
RVTEST_CASE(0,"//check ISA:=regex(.*64.*);check ISA:=regex(.*I.*);def TEST_CASE_1=True;def NO_SAIL=True;",trap-s)
|
||||
|
||||
INIT_TESTS
|
||||
|
||||
|
@ -22,6 +22,8 @@
|
||||
///////////////////////////////////////////
|
||||
|
||||
#include "WALLY-TEST-LIB-64.h"
|
||||
RVTEST_ISA("RV64I")
|
||||
RVTEST_CASE(0,"//check ISA:=regex(.*64.*);check ISA:=regex(.*I.*);def TEST_CASE_1=True;def NO_SAIL=True;",trap-sret)
|
||||
|
||||
INIT_TESTS
|
||||
|
||||
|
@ -22,6 +22,8 @@
|
||||
///////////////////////////////////////////
|
||||
|
||||
#include "WALLY-TEST-LIB-64.h"
|
||||
RVTEST_ISA("RV64I")
|
||||
RVTEST_CASE(0,"//check ISA:=regex(.*64.*);check ISA:=regex(.*I.*);def TEST_CASE_1=True;def NO_SAIL=True;",trap-u)
|
||||
|
||||
INIT_TESTS
|
||||
|
||||
|
@ -22,6 +22,8 @@
|
||||
///////////////////////////////////////////
|
||||
|
||||
#include "WALLY-TEST-LIB-64.h"
|
||||
RVTEST_ISA("RV64I")
|
||||
RVTEST_CASE(0,"//check ISA:=regex(.*64.*);check ISA:=regex(.*I.*);def TEST_CASE_1=True;def NO_SAIL=True;",wfi)
|
||||
|
||||
INIT_TESTS
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user