mirror of
https://github.com/openhwgroup/cvw
synced 2025-02-11 06:05:49 +00:00
Watchdog timeout on buildroot boot is a halting criteria
This commit is contained in:
parent
a0729d074b
commit
e72c8b8e09
@ -26,7 +26,8 @@
|
|||||||
|
|
||||||
module watchdog #(parameter XLEN, WatchDogTimerThreshold)
|
module watchdog #(parameter XLEN, WatchDogTimerThreshold)
|
||||||
(input clk,
|
(input clk,
|
||||||
input reset
|
input reset,
|
||||||
|
string TEST
|
||||||
);
|
);
|
||||||
|
|
||||||
// check for hang up.
|
// check for hang up.
|
||||||
@ -46,9 +47,14 @@ module watchdog #(parameter XLEN, WatchDogTimerThreshold)
|
|||||||
always_comb begin
|
always_comb begin
|
||||||
WatchDogTimeOut = WatchDogTimerCount >= WatchDogTimerThreshold;
|
WatchDogTimeOut = WatchDogTimerCount >= WatchDogTimerThreshold;
|
||||||
if(WatchDogTimeOut) begin
|
if(WatchDogTimeOut) begin
|
||||||
$display("FAILURE: Watch Dog Time Out triggered. PCW stuck at %x for more than %d cycles", PCW, WatchDogTimerCount);
|
if (TEST == "buildroot") $display("Watch Dog Time Out triggered. This is a normal termination for a full buildroot boot. Check sim/<simulator>/logs/buildroot_uart.log to check if the boot printed the login prompt.");
|
||||||
$stop;
|
else $display("FAILURE: Watch Dog Time Out triggered. PCW stuck at %x for more than %d cycles", PCW, WatchDogTimerCount);
|
||||||
end
|
`ifdef QUESTA
|
||||||
|
$stop; // if this is changed to $finish for Questa, wally-batch.do does not go to the next step to run coverage, and wally.do terminates without allowing GUI debug
|
||||||
|
`else
|
||||||
|
$finish;
|
||||||
|
`endif
|
||||||
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
endmodule
|
endmodule
|
||||||
|
@ -118,10 +118,9 @@ module testbench;
|
|||||||
TEST = "none";
|
TEST = "none";
|
||||||
if (!$value$plusargs("ElfFile=%s", ElfFile))
|
if (!$value$plusargs("ElfFile=%s", ElfFile))
|
||||||
ElfFile = "none";
|
ElfFile = "none";
|
||||||
else begin
|
|
||||||
end
|
|
||||||
if (!$value$plusargs("INSTR_LIMIT=%d", INSTR_LIMIT))
|
if (!$value$plusargs("INSTR_LIMIT=%d", INSTR_LIMIT))
|
||||||
INSTR_LIMIT = 0;
|
INSTR_LIMIT = 0;
|
||||||
|
//$display("TEST = %s ElfFile = %s", TEST, ElfFile);
|
||||||
|
|
||||||
// pick tests based on modes supported
|
// pick tests based on modes supported
|
||||||
//tests = '{};
|
//tests = '{};
|
||||||
@ -613,7 +612,7 @@ module testbench;
|
|||||||
InstrFName, InstrDName, InstrEName, InstrMName, InstrWName);
|
InstrFName, InstrDName, InstrEName, InstrMName, InstrWName);
|
||||||
|
|
||||||
// watch for problems such as lockup, reading unitialized memory, bad configs
|
// watch for problems such as lockup, reading unitialized memory, bad configs
|
||||||
watchdog #(P.XLEN, 1000000) watchdog(.clk, .reset); // check if PCW is stuck
|
watchdog #(P.XLEN, 1000000) watchdog(.clk, .reset, .TEST); // check if PCW is stuck
|
||||||
ramxdetector #(P.XLEN, P.LLEN) ramxdetector(clk, dut.core.lsu.MemRWM[1], dut.core.lsu.LSULoadAccessFaultM, dut.core.lsu.ReadDataM,
|
ramxdetector #(P.XLEN, P.LLEN) ramxdetector(clk, dut.core.lsu.MemRWM[1], dut.core.lsu.LSULoadAccessFaultM, dut.core.lsu.ReadDataM,
|
||||||
dut.core.ifu.PCM, InstrM, dut.core.lsu.IEUAdrM, InstrMName);
|
dut.core.ifu.PCM, InstrM, dut.core.lsu.IEUAdrM, InstrMName);
|
||||||
riscvassertions #(P) riscvassertions(); // check assertions for a legal configuration
|
riscvassertions #(P) riscvassertions(); // check assertions for a legal configuration
|
||||||
|
Loading…
Reference in New Issue
Block a user