From 02b4f9c30462f58618e495b20a09c628bcc8df96 Mon Sep 17 00:00:00 2001 From: eroom1966 Date: Mon, 6 Feb 2023 13:43:12 +0000 Subject: [PATCH 1/3] remerge changes --- sim/imperas.ic | 18 ++++++++++++++---- sim/wally-imperas.do | 6 ++++-- testbench/testbench_imperas.sv | 7 ++++--- 3 files changed, 22 insertions(+), 9 deletions(-) diff --git a/sim/imperas.ic b/sim/imperas.ic index 164cec22..2f400b24 100644 --- a/sim/imperas.ic +++ b/sim/imperas.ic @@ -1,20 +1,23 @@ -#--showoverrides --override cpu/show_c_prefix=T --override cpu/unaligned=F --override cpu/mstatus_FS=1 # Enable the Imperas instruction coverage --extlib refRoot/cpu/cv=imperas.com/intercept/riscvInstructionCoverage/1.0 --override refRoot/cpu/cv/cover=basic --override refRoot/cpu/cv/extensions=RV32I +#-extlib refRoot/cpu/cv=imperas.com/intercept/riscvInstructionCoverage/1.0 +#-override refRoot/cpu/cv/cover=basic +#-override refRoot/cpu/cv/extensions=RV32I # Add Imperas simulator application instruction tracing --trace --tracechange --traceshowicount --tracemode +--tracemem ASX --monitornetschange +# Exceptions and pagetables debug +--override cpu/debugflags=6 + # Turn on verbose output for Imperas simulator --verbose @@ -24,3 +27,10 @@ # Store simulator output to logfile --output imperas.log +--override cpu/PMP_registers=0 +#--showoverrides +#--mpdconsole + +# ignore settings of bits DAU for non leaf page table walks +--override cpu/ignore_non_leaf_DAU=1 + diff --git a/sim/wally-imperas.do b/sim/wally-imperas.do index d08361e8..4164b7bd 100644 --- a/sim/wally-imperas.do +++ b/sim/wally-imperas.do @@ -46,10 +46,12 @@ vsim workopt +nowarn3829 -fatal 7 \ +testDir=$env(TESTDIR) $env(OTHERFLAGS) view wave #-- display input and output signals as hexidecimal values -add log -recursive /* -do wave.do +# add log -recursive /* +# do wave.do run -all noview ../testbench/testbench_imperas.sv view wave + +quit -f diff --git a/testbench/testbench_imperas.sv b/testbench/testbench_imperas.sv index ce4b16de..75978729 100644 --- a/testbench/testbench_imperas.sv +++ b/testbench/testbench_imperas.sv @@ -142,9 +142,10 @@ module testbench; if (!rvviVersionCheck(RVVI_API_VERSION)) begin msgfatal($sformatf("%m @ t=%0t: Expecting RVVI API version %0d.", $time, RVVI_API_VERSION)); end - void'(rvviRefConfigSetString(IDV_CONFIG_MODEL_VENDOR, "riscv.ovpworld.org")); - void'(rvviRefConfigSetString(IDV_CONFIG_MODEL_NAME, "riscv")); - void'(rvviRefConfigSetString(IDV_CONFIG_MODEL_VARIANT, "RV64GC")); + void'(rvviRefConfigSetString(IDV_CONFIG_MODEL_VENDOR, "riscv.ovpworld.org")); + void'(rvviRefConfigSetString(IDV_CONFIG_MODEL_NAME, "riscv")); + void'(rvviRefConfigSetString(IDV_CONFIG_MODEL_VARIANT, "RV64GC")); + void'(rvviRefConfigSetInt(IDV_CONFIG_MODEL_ADDRESS_BUS_WIDTH, 39)); if (!rvviRefInit(elffilename)) begin msgfatal($sformatf("%m @ t=%0t: rvviRefInit failed", $time)); end From 8705df11360c3853d6df6369438c44b10310d698 Mon Sep 17 00:00:00 2001 From: eroom1966 Date: Mon, 6 Feb 2023 14:01:05 +0000 Subject: [PATCH 2/3] remove leading space --- sim/imperas.ic | 1 - 1 file changed, 1 deletion(-) diff --git a/sim/imperas.ic b/sim/imperas.ic index 2f400b24..016fdf50 100644 --- a/sim/imperas.ic +++ b/sim/imperas.ic @@ -33,4 +33,3 @@ # ignore settings of bits DAU for non leaf page table walks --override cpu/ignore_non_leaf_DAU=1 - From 3910e90b5416ea3dc29b4eb93027e79af4e23fed Mon Sep 17 00:00:00 2001 From: eroom1966 Date: Mon, 6 Feb 2023 15:53:29 +0000 Subject: [PATCH 3/3] remove dead code for ignoring fflags/fcsr --- testbench/testbench_imperas.sv | 5 ----- 1 file changed, 5 deletions(-) diff --git a/testbench/testbench_imperas.sv b/testbench/testbench_imperas.sv index 75978729..e52a79c2 100644 --- a/testbench/testbench_imperas.sv +++ b/testbench/testbench_imperas.sv @@ -164,11 +164,6 @@ module testbench; void'(rvviRefCsrSetVolatile(0, 32'hB82)); // MINSTRETH end - // // Temporary fix for inexact difference -// void'(rvviRefCsrSetVolatile(0, 32'h001)); // fflags -// void'(rvviRefCsrSetVolatile(0, 32'h003)); // fcsr - - // Enable the trace2log module if ($value$plusargs("TRACE2LOG_ENABLE=%d", TRACE2LOG_ENABLE)) begin msgnote($sformatf("%m @ t=%0t: TRACE2LOG_ENABLE is %0d", $time, TRACE2LOG_ENABLE));