mirror of
https://github.com/openhwgroup/cvw
synced 2025-02-11 06:05:49 +00:00
minfo test working again with mconfigptr for RV64
This commit is contained in:
parent
2f6e39defc
commit
b8a17afd5d
@ -49,6 +49,7 @@ clean:
|
|||||||
riscoftests:
|
riscoftests:
|
||||||
# Builds riscv-arch-test 64 and 32-bit versions and builds wally-riscv-arch-test 64 and 32-bit versions
|
# Builds riscv-arch-test 64 and 32-bit versions and builds wally-riscv-arch-test 64 and 32-bit versions
|
||||||
make -C ../tests/riscof/
|
make -C ../tests/riscof/
|
||||||
|
|
||||||
memfiles:
|
memfiles:
|
||||||
make -f makefile-memfile wally-sim-files --jobs
|
make -f makefile-memfile wally-sim-files --jobs
|
||||||
|
|
||||||
|
@ -14,8 +14,14 @@
|
|||||||
--override cpu/add_implicit_Extensions=B
|
--override cpu/add_implicit_Extensions=B
|
||||||
--override cpu/bitmanip_version=1.0.0
|
--override cpu/bitmanip_version=1.0.0
|
||||||
|
|
||||||
# ????
|
# More extensions
|
||||||
--override cpu/Zicbom=T
|
--override cpu/Zicbom=T
|
||||||
|
--override cpu/Zicbop=T
|
||||||
|
--override cpu/Zicboz=T
|
||||||
|
--override cpu/Svpbmt=T
|
||||||
|
# 64 KiB continuous huge pages supported
|
||||||
|
--override cpu/Svnapot_page_mask=1<<16
|
||||||
|
|
||||||
|
|
||||||
# clarify
|
# clarify
|
||||||
#--override refRoot/cpu/mtvec_sext=F
|
#--override refRoot/cpu/mtvec_sext=F
|
||||||
|
@ -1,2 +1,2 @@
|
|||||||
vsim -do "do wally.do rv64gc arch64d"
|
vsim -do "do wally.do rv64gc wally64priv"
|
||||||
|
|
||||||
|
@ -51,6 +51,8 @@ module alu import cvw::*; #(parameter cvw_t P, parameter WIDTH) (
|
|||||||
logic Asign, Bsign; // Sign bits of A, B
|
logic Asign, Bsign; // Sign bits of A, B
|
||||||
|
|
||||||
// Addition
|
// Addition
|
||||||
|
// CondMaskB is B for add/sub, or a masked version of B for certain bit manipulation instructions
|
||||||
|
// CondShiftA is A for add/sub or a shifted version of A for shift-and-add BMU instructions
|
||||||
assign CondMaskInvB = SubArith ? ~CondMaskB : CondMaskB;
|
assign CondMaskInvB = SubArith ? ~CondMaskB : CondMaskB;
|
||||||
assign {Carry, Sum} = CondShiftA + CondMaskInvB + {{(WIDTH-1){1'b0}}, SubArith};
|
assign {Carry, Sum} = CondShiftA + CondMaskInvB + {{(WIDTH-1){1'b0}}, SubArith};
|
||||||
|
|
||||||
|
@ -145,7 +145,7 @@ module csrm import cvw::*; #(parameter cvw_t P) (
|
|||||||
assign WriteMCOUNTERENM = CSRMWriteM & (CSRAdrM == MCOUNTEREN);
|
assign WriteMCOUNTERENM = CSRMWriteM & (CSRAdrM == MCOUNTEREN);
|
||||||
assign WriteMCOUNTINHIBITM = CSRMWriteM & (CSRAdrM == MCOUNTINHIBIT);
|
assign WriteMCOUNTINHIBITM = CSRMWriteM & (CSRAdrM == MCOUNTINHIBIT);
|
||||||
|
|
||||||
assign IllegalCSRMWriteReadonlyM = UngatedCSRMWriteM & (CSRAdrM == MVENDORID | CSRAdrM == MARCHID | CSRAdrM == MIMPID | CSRAdrM == MHARTID);
|
assign IllegalCSRMWriteReadonlyM = UngatedCSRMWriteM & (CSRAdrM == MVENDORID | CSRAdrM == MARCHID | CSRAdrM == MIMPID | CSRAdrM == MHARTID | CSRAdrM == MCONFIGPTR);
|
||||||
|
|
||||||
// CSRs
|
// CSRs
|
||||||
flopenr #(P.XLEN) MTVECreg(clk, reset, WriteMTVECM, {CSRWriteValM[P.XLEN-1:2], 1'b0, CSRWriteValM[0]}, MTVEC_REGW);
|
flopenr #(P.XLEN) MTVECreg(clk, reset, WriteMTVECM, {CSRWriteValM[P.XLEN-1:2], 1'b0, CSRWriteValM[0]}, MTVEC_REGW);
|
||||||
|
@ -57,6 +57,8 @@ class sail_cSim(pluginTemplate):
|
|||||||
self.isa += 'i'
|
self.isa += 'i'
|
||||||
if "M" in ispec["ISA"]:
|
if "M" in ispec["ISA"]:
|
||||||
self.isa += 'm'
|
self.isa += 'm'
|
||||||
|
if "A" in ispec["ISA"]:
|
||||||
|
self.isa += 'a'
|
||||||
if "C" in ispec["ISA"]:
|
if "C" in ispec["ISA"]:
|
||||||
self.isa += 'c'
|
self.isa += 'c'
|
||||||
if "F" in ispec["ISA"]:
|
if "F" in ispec["ISA"]:
|
||||||
|
@ -99,6 +99,8 @@ class spike(pluginTemplate):
|
|||||||
self.isa += 'i'
|
self.isa += 'i'
|
||||||
if "M" in ispec["ISA"]:
|
if "M" in ispec["ISA"]:
|
||||||
self.isa += 'm'
|
self.isa += 'm'
|
||||||
|
if "A" in ispec["ISA"]:
|
||||||
|
self.isa += 'a'
|
||||||
if "F" in ispec["ISA"]:
|
if "F" in ispec["ISA"]:
|
||||||
self.isa += 'f'
|
self.isa += 'f'
|
||||||
if "D" in ispec["ISA"]:
|
if "D" in ispec["ISA"]:
|
||||||
|
@ -14,5 +14,9 @@
|
|||||||
00000000
|
00000000
|
||||||
00000011 # confirm read-only permissions of mhartid
|
00000011 # confirm read-only permissions of mhartid
|
||||||
00000000
|
00000000
|
||||||
|
00000002 # write to read-only CSR failed with illegal instruction
|
||||||
|
00000000
|
||||||
|
00000011 # confirm read-only permissions of mconfigptr
|
||||||
|
00000000
|
||||||
0000000b # ecall from terminating tests in M mode
|
0000000b # ecall from terminating tests in M mode
|
||||||
00000000
|
00000000
|
||||||
|
@ -23,7 +23,7 @@
|
|||||||
|
|
||||||
#include "WALLY-TEST-LIB-64.h"
|
#include "WALLY-TEST-LIB-64.h"
|
||||||
RVTEST_ISA("RV64I_Zicsr")
|
RVTEST_ISA("RV64I_Zicsr")
|
||||||
RVTEST_CASE(0,"//check ISA:=regex(.*64.*);check ISA:=regex(.*I.*);def TEST_CASE_1=True;",minfo)
|
RVTEST_CASE(0,"//check ISA:=regex(.*64.*);check ISA:=regex(.*I.*);def TEST_CASE_1=True;def NO_SAIL=True;",minfo)
|
||||||
|
|
||||||
INIT_TESTS
|
INIT_TESTS
|
||||||
|
|
||||||
@ -34,7 +34,7 @@ CSR_R_ACCESS mvendorid
|
|||||||
CSR_R_ACCESS marchid
|
CSR_R_ACCESS marchid
|
||||||
CSR_R_ACCESS mimpid
|
CSR_R_ACCESS mimpid
|
||||||
CSR_R_ACCESS mhartid
|
CSR_R_ACCESS mhartid
|
||||||
# CSR_R_ACCESS mconfigptr # Unimplemented in spike as of 31 Jan 22
|
CSR_R_ACCESS mconfigptr
|
||||||
|
|
||||||
END_TESTS
|
END_TESTS
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user