diff --git a/examples/make_protect_lib/sim_main.cpp b/examples/make_protect_lib/sim_main.cpp index 8c0933f37..06e5acb4d 100644 --- a/examples/make_protect_lib/sim_main.cpp +++ b/examples/make_protect_lib/sim_main.cpp @@ -47,12 +47,12 @@ int main(int argc, char** argv) { // Simulate until $finish while (!contextp->gotFinish()) { - contextp->timeInc(1); top->clk = ~top->clk & 0x1; top->eval(); #if VM_TRACE if (tfp) tfp->dump(contextp->time()); #endif + contextp->timeInc(1); } // Final model cleanup diff --git a/include/verilated.cpp b/include/verilated.cpp index b6917aaf5..619b29425 100644 --- a/include/verilated.cpp +++ b/include/verilated.cpp @@ -2669,7 +2669,7 @@ void VerilatedContext::addModel(VerilatedModel* modelp) { // models might get added inside initial blocks. if (VL_UNLIKELY(time())) VL_FATAL_MT( - __FILE__, __LINE__, "", + "", 0, "", "Adding model when time is non-zero. ... Suggest check time(), or for restarting" " model use a new VerilatedContext"); diff --git a/test_regress/driver.pl b/test_regress/driver.pl index 3357b5091..74f1d4e58 100755 --- a/test_regress/driver.pl +++ b/test_regress/driver.pl @@ -2375,7 +2375,7 @@ sub files_identical { $l1[$l] =~ s/CPU Time: +[0-9.]+ seconds[^\n]+/CPU Time: ###/mig; $l1[$l] =~ s/\?v=[0-9.]+/?v=latest/mig; # warning URL $l1[$l] =~ s/_h[0-9a-f]{8}_/_h########_/mg; - $l1[$l] =~ s!%Error: \./!%Error: !mg; # clang gives ./ while GCC does not + $l1[$l] =~ s!%Error: /[^: ]+/([^/:])!%Error: .../$1!mg; # avoid absolute paths $l1[$l] =~ s/ \/[^ ]+\/verilated_std.sv/ verilated_std.sv/mg; if ($l1[$l] =~ s/Exiting due to.*/Exiting due to/mig) { splice @l1, $l+1; # Trunc rest diff --git a/test_regress/t/t_wrapper_reuse_context_bad.out b/test_regress/t/t_wrapper_reuse_context_bad.out index b27e39add..66e87adb9 100644 --- a/test_regress/t/t_wrapper_reuse_context_bad.out +++ b/test_regress/t/t_wrapper_reuse_context_bad.out @@ -1,2 +1,2 @@ -%Error: /svaha/wsnyder/SandBox/homecvs/v4/verilator/include/verilated.cpp:2672: Adding model when time is non-zero. ... Suggest check time(), or for restarting model use a new VerilatedContext +%Error: Adding model when time is non-zero. ... Suggest check time(), or for restarting model use a new VerilatedContext Aborting...