From 114bba8370b4512164e58ad822f7e108e03921c8 Mon Sep 17 00:00:00 2001 From: bbracker Date: Wed, 19 May 2021 20:18:00 -0400 Subject: [PATCH] small bit of busybear debug progress --- wally-pipelined/regression/wally-busybear.do | 4 +- .../wave-dos/bens-busybear-waves.do | 64 +++++++++++++++++++ .../regression/wave-dos/default-waves.do | 3 - .../testbench/testbench-busybear.sv | 14 ++-- 4 files changed, 75 insertions(+), 10 deletions(-) create mode 100644 wally-pipelined/regression/wave-dos/bens-busybear-waves.do diff --git a/wally-pipelined/regression/wally-busybear.do b/wally-pipelined/regression/wally-busybear.do index ac570b873..928cde262 100644 --- a/wally-pipelined/regression/wally-busybear.do +++ b/wally-pipelined/regression/wally-busybear.do @@ -35,10 +35,8 @@ vopt +acc work.testbench -o workopt vsim workopt -suppress 8852,12070 -#do ./wave-dos/peripheral-waves.do -do ./wave-dos/default-waves.do +do ./wave-dos/bens-busybear-waves.do -#do busy-mmu.do #-- Run the Simulation run -all diff --git a/wally-pipelined/regression/wave-dos/bens-busybear-waves.do b/wally-pipelined/regression/wave-dos/bens-busybear-waves.do new file mode 100644 index 000000000..0d672167c --- /dev/null +++ b/wally-pipelined/regression/wave-dos/bens-busybear-waves.do @@ -0,0 +1,64 @@ +# busybear-waves.do +restart -f +delete wave /* +view wave + +add wave /testbench/dut/hart/DataStall +add wave /testbench/dut/hart/ICacheStallF +add wave /testbench/dut/hart/StallF +add wave /testbench/dut/hart/StallD +add wave /testbench/dut/hart/StallE +add wave /testbench/dut/hart/StallM +add wave /testbench/dut/hart/StallW +add wave /testbench/dut/hart/FlushD +add wave /testbench/dut/hart/FlushE +add wave /testbench/dut/hart/FlushM +add wave /testbench/dut/hart/FlushW +add wave -divider + +add wave /testbench/clk +add wave /testbench/reset +add wave -divider + +add wave -hex /testbench/dut/hart/ifu/PCF +add wave -hex /testbench/PCtext +add wave -hex /testbench/pcExpected +add wave -hex /testbench/dut/hart/ifu/PCD +add wave -hex /testbench/dut/hart/ifu/InstrD +add wave /testbench/InstrDName +add wave -divider +add wave -hex /testbench/dut/hart/ifu/PCE +add wave -hex /testbench/dut/hart/ifu/InstrE +add wave /testbench/InstrEName +add wave -hex /testbench/dut/hart/ieu/dp/SrcAE +add wave -hex /testbench/dut/hart/ieu/dp/SrcBE +add wave -hex /testbench/dut/hart/ieu/dp/ALUResultE +#add wave /testbench/dut/hart/ieu/dp/PCSrcE +add wave -divider +add wave -hex /testbench/dut/hart/ifu/PCM +add wave -hex /testbench/dut/hart/ifu/InstrM +add wave /testbench/InstrMName +add wave /testbench/dut/uncore/dtim/memwrite +add wave -hex /testbench/dut/uncore/HADDR +add wave -hex /testbench/dut/uncore/HWDATA +add wave -divider +add wave -hex /testbench/PCW +add wave -hex /testbench/InstrW +add wave /testbench/InstrWName +add wave /testbench/dut/hart/ieu/dp/RegWriteW +add wave -hex /testbench/dut/hart/ieu/dp/ResultW +add wave -hex /testbench/dut/hart/ieu/dp/RdW +add wave -divider + +# appearance +TreeUpdate [SetDefaultTree] +WaveRestoreZoom {0 ps} {100 ps} +configure wave -namecolwidth 250 +configure wave -valuecolwidth 150 +configure wave -justifyvalue left +configure wave -signalnamewidth 0 +configure wave -snapdistance 10 +configure wave -datasetprefix 0 +configure wave -rowmargin 4 +configure wave -childrowmargin 2 +set DefaultRadix hexadecimal \ No newline at end of file diff --git a/wally-pipelined/regression/wave-dos/default-waves.do b/wally-pipelined/regression/wave-dos/default-waves.do index 85ded9316..a1aa2cd60 100644 --- a/wally-pipelined/regression/wave-dos/default-waves.do +++ b/wally-pipelined/regression/wave-dos/default-waves.do @@ -1,5 +1,4 @@ # default-waves.do - restart -f delete wave /* view wave @@ -49,8 +48,6 @@ add wave /testbench/dut/hart/ieu/dp/RegWriteW add wave -hex /testbench/dut/hart/ieu/dp/ResultW add wave -hex /testbench/dut/hart/ieu/dp/RdW add wave -divider -#add ww -add wave -hex -r /testbench/* # appearance TreeUpdate [SetDefaultTree] diff --git a/wally-pipelined/testbench/testbench-busybear.sv b/wally-pipelined/testbench/testbench-busybear.sv index 87ee82330..9d150731e 100644 --- a/wally-pipelined/testbench/testbench-busybear.sv +++ b/wally-pipelined/testbench/testbench-busybear.sv @@ -312,11 +312,11 @@ module testbench(); scan_file_memW = $fscanf(data_file_memW, "%x\n", writeAdrExpected); assign writeAdrTranslated = adrTranslator(writeAdrExpected); - if (writeDataExpected != HWDATA) begin + if (writeDataExpected != HWDATA && ~dut.uncore.HSELPLICD) begin $display("%0t ps, instr %0d: HWDATA does not equal writeDataExpected: %x, %x", $time, instrs, HWDATA, writeDataExpected); `ERROR end - if (~equal(writeAdrTranslated,HADDR,1)) begin + if (~equal(writeAdrTranslated,HADDR,1) && ~dut.uncore.HSELPLICD) begin $display("%0t ps, instr %0d: HADDR does not equal writeAdrExpected: %x, %x", $time, instrs, HADDR, writeAdrTranslated); `ERROR end @@ -467,7 +467,10 @@ module testbench(); if (speculative && (lastPC != pcExpected)) begin speculative = ~equal(dut.hart.ifu.PCD,pcExpected,3); if(dut.hart.ifu.PCD===pcExpected) begin - if(dut.hart.ifu.InstrRawD[6:0] == 7'b1010011) begin // for now, NOP out any float instrs + if((dut.hart.ifu.InstrRawD[6:0] == 7'b1010011) || // for now, NOP out any float instrs + (dut.hart.ifu.PCD == 32'h80001dc6) || // as well as stores to PLIC + (dut.hart.ifu.PCD == 32'h80001de0) || + (dut.hart.ifu.PCD == 32'h80001de2)) begin $display("warning: NOPing out %s at PC=%0x, instr %0d, time %0t", PCtext, dut.hart.ifu.PCD, instrs, $time); force CheckInstrD = 32'b0010011; force dut.hart.ifu.InstrRawD = 32'b0010011; @@ -496,7 +499,10 @@ module testbench(); end scan_file_PC = $fscanf(data_file_PC, "%x\n", CheckInstrD); if(dut.hart.ifu.PCD === pcExpected) begin - if(dut.hart.ifu.InstrRawD[6:0] == 7'b1010011) begin // for now, NOP out any float instrs + if((dut.hart.ifu.InstrRawD[6:0] == 7'b1010011) || // for now, NOP out any float instrs + (dut.hart.ifu.PCD == 32'h80001dc6) || // as well as stores to PLIC + (dut.hart.ifu.PCD == 32'h80001de0) || + (dut.hart.ifu.PCD == 32'h80001de2)) begin $display("warning: NOPing out %s at PC=%0x, instr %0d, time %0t", PCtext, dut.hart.ifu.PCD, instrs, $time); force CheckInstrD = 32'b0010011; force dut.hart.ifu.InstrRawD = 32'b0010011;