From 59b177beac982097afd36de8c6a5f1a67f157cd5 Mon Sep 17 00:00:00 2001 From: Ben Bracker Date: Fri, 2 Jul 2021 17:22:09 -0500 Subject: [PATCH] stop busybear from hanging --- wally-pipelined/regression/wally-busybear-batch.do | 1 + wally-pipelined/regression/wally-busybear.do | 3 ++- wally-pipelined/testbench/testbench-linux.sv | 7 +++++-- 3 files changed, 8 insertions(+), 3 deletions(-) diff --git a/wally-pipelined/regression/wally-busybear-batch.do b/wally-pipelined/regression/wally-busybear-batch.do index a4a80eb7..e2817dfa 100644 --- a/wally-pipelined/regression/wally-busybear-batch.do +++ b/wally-pipelined/regression/wally-busybear-batch.do @@ -35,5 +35,6 @@ vopt work_busybear.testbench -o workopt_busybear vsim workopt_busybear -suppress 8852,12070 +run -all run -all quit diff --git a/wally-pipelined/regression/wally-busybear.do b/wally-pipelined/regression/wally-busybear.do index 11876dde..204d1c4e 100644 --- a/wally-pipelined/regression/wally-busybear.do +++ b/wally-pipelined/regression/wally-busybear.do @@ -35,9 +35,10 @@ vopt +acc work.testbench -o workopt vsim workopt -suppress 8852,12070 -do ./wave-dos/linux-waves.do #-- Run the Simulation run -all +do ./wave-dos/linux-waves.do +run -all ##quit diff --git a/wally-pipelined/testbench/testbench-linux.sv b/wally-pipelined/testbench/testbench-linux.sv index 6676d1a7..8f8a5d44 100644 --- a/wally-pipelined/testbench/testbench-linux.sv +++ b/wally-pipelined/testbench/testbench-linux.sv @@ -27,8 +27,8 @@ module testbench(); - parameter waveOnICount = 2657000; // # of instructions at which to turn on waves in graphical sim - + parameter waveOnICount = `BUSYBEAR*140000 + `BUILDROOT*2400000; // # of instructions at which to turn on waves in graphical sim + parameter stopICount = `BUSYBEAR*143898 + `BUILDROOT*0000000; // # instructions at which to halt sim completely (set to 0 to let it run as far as it can) /////////////////////////////////////////////////////////////////////////////// ///////////////////////////////////// DUT ///////////////////////////////////// @@ -248,6 +248,9 @@ module testbench(); if (instrs == waveOnICount) begin $display("turning on waves at %0d instructions", instrs); $stop; + end else if (instrs == stopICount && stopICount != 0) begin + $display("Ending sim at %0d instructions (set stopICount to 0 to let the sim go on)", instrs); + $stop; end // Check if PCD is going to be flushed due to a branch or jump