mirror of
https://github.com/verilator/verilator.git
synced 2025-01-01 04:07:34 +00:00
Fix $finish twice to no longer exit (#4757).
This commit is contained in:
parent
9882c4c761
commit
1a43afe6f7
1
Changes
1
Changes
@ -50,6 +50,7 @@ Verilator 5.019 devel
|
||||
* Fix power operator with wide numbers and constants (#4721) (#4763). [Flavien Solt]
|
||||
* Fix parameter passing to ports (#4723). [Ryszard Rozak, Antmicro Ltd.]
|
||||
* Fix block names of nested do..while loops (#4728). [Ryszard Rozak, Antmicro Ltd.]
|
||||
* Fix $finish twice to no longer exit (#4757). [Tim Hutt]
|
||||
|
||||
|
||||
Verilator 5.018 2023-10-30
|
||||
|
@ -107,16 +107,9 @@ thread_local Verilated::ThreadLocal Verilated::t_s;
|
||||
|
||||
#ifndef VL_USER_FINISH ///< Define this to override the vl_finish function
|
||||
void vl_finish(const char* filename, int linenum, const char* hier) VL_MT_UNSAFE {
|
||||
if (false && hier) {}
|
||||
if (false && hier) {} // Unused argument
|
||||
VL_PRINTF( // Not VL_PRINTF_MT, already on main thread
|
||||
"- %s:%d: Verilog $finish\n", filename, linenum);
|
||||
if (Verilated::threadContextp()->gotFinish()) {
|
||||
VL_PRINTF( // Not VL_PRINTF_MT, already on main thread
|
||||
"- %s:%d: Second verilog $finish, exiting\n", filename, linenum);
|
||||
Verilated::runFlushCallbacks();
|
||||
Verilated::runExitCallbacks();
|
||||
std::exit(0);
|
||||
}
|
||||
Verilated::threadContextp()->gotFinish(true);
|
||||
}
|
||||
#endif
|
||||
|
@ -26,12 +26,8 @@ module t (/*AUTOARG*/);
|
||||
end
|
||||
if (times != 10) $stop;
|
||||
//
|
||||
// verilator lint_off INFINITELOOP
|
||||
forever begin
|
||||
// verilator lint_on INFINITELOOP
|
||||
$write("*-* All Finished *-*\n");
|
||||
$finish;
|
||||
end
|
||||
$write("*-* All Finished *-*\n");
|
||||
$finish;
|
||||
end
|
||||
|
||||
endmodule
|
||||
|
Loading…
Reference in New Issue
Block a user