mirror of
https://github.com/verilator/verilator.git
synced 2025-01-01 04:07:34 +00:00
Fix earlier +verilated+error+count to do all .
This commit is contained in:
parent
c726ad0142
commit
2ff22d9050
@ -1717,7 +1717,8 @@ Enable simulation runtime debugging at the provided level.
|
||||
=item +verilator+error+limit+I<value>
|
||||
|
||||
Set number of non-fatal errors (e.g. assertion failures) before exiting
|
||||
simulation. Defaults to 1.
|
||||
simulation runtime. Also affects number of $stop calls needed before
|
||||
exit. Defaults to 1.
|
||||
|
||||
=item +verilator+help
|
||||
|
||||
|
@ -111,15 +111,17 @@ void vl_fatal(const char* filename, int linenum, const char* hier, const char* m
|
||||
}
|
||||
#endif
|
||||
|
||||
//===========================================================================
|
||||
// Error handline
|
||||
|
||||
#ifndef VL_USER_STOP_MAYBE ///< Define this to override this function
|
||||
void vl_stop_maybe(const char* filename, int linenum, const char* hier, bool maybe) VL_MT_UNSAFE {
|
||||
Verilated::errorCountInc();
|
||||
if (!maybe || Verilated::errorCount() >= Verilated::errorLimit()) {
|
||||
if (maybe && Verilated::errorCount() < Verilated::errorLimit()) {
|
||||
VL_PRINTF( // Not VL_PRINTF_MT, already on main thread
|
||||
"-Info: %s:%d: %s\n", filename, linenum, "Verilog $stop, ignored due to +verilator+error+limit");
|
||||
} else {
|
||||
vl_stop(filename, linenum, hier);
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
//===========================================================================
|
||||
// Wrapper to call certain functions via messages when multithreaded
|
||||
|
@ -575,7 +575,7 @@ extern void vl_fatal(const char* filename, int linenum, const char* hier,
|
||||
extern void VL_FINISH_MT(const char* filename, int linenum, const char* hier) VL_MT_SAFE;
|
||||
/// Multithread safe wrapper for calls to $stop
|
||||
extern void VL_STOP_MT(const char* filename, int linenum, const char* hier,
|
||||
bool maybe = false) VL_MT_SAFE;
|
||||
bool maybe = true) VL_MT_SAFE;
|
||||
/// Multithread safe wrapper to call for a couple of fatal messages
|
||||
extern void VL_FATAL_MT(const char* filename, int linenum, const char* hier,
|
||||
const char* msg) VL_MT_SAFE;
|
||||
|
@ -3587,8 +3587,7 @@ class AstStop : public AstNodeStmt {
|
||||
bool m_maybe; // Maybe stop, maybe not based on error count
|
||||
public:
|
||||
explicit AstStop(FileLine* fl, bool maybe)
|
||||
: AstNodeStmt(fl)
|
||||
, m_maybe(maybe) {}
|
||||
: AstNodeStmt(fl) {}
|
||||
ASTNODE_NODE_FUNCS(Stop)
|
||||
virtual bool isGateOptimizable() const { return false; }
|
||||
virtual bool isPredictOptimizable() const { return false; }
|
||||
@ -3599,7 +3598,6 @@ public:
|
||||
virtual V3Hash sameHash() const { return V3Hash(fileline()->lineno()); }
|
||||
virtual bool same(const AstNode* samep) const {
|
||||
return fileline() == samep->fileline(); }
|
||||
bool maybe() const { return m_maybe; }
|
||||
};
|
||||
|
||||
class AstFinish : public AstNodeStmt {
|
||||
|
@ -533,7 +533,6 @@ public:
|
||||
puts(", ");
|
||||
puts(cvtToStr(nodep->fileline()->lineno()));
|
||||
puts(", \"\"");
|
||||
if (nodep->maybe()) puts(", true");
|
||||
puts(");\n");
|
||||
}
|
||||
virtual void visit(AstFinish* nodep) {
|
||||
|
@ -1,5 +0,0 @@
|
||||
[0] %Error: t_runflag_errlimit.v:8: Assertion failed in top.t: One
|
||||
[0] %Error: t_runflag_errlimit.v:9: Assertion failed in top.t: Two
|
||||
[0] %Error: t_runflag_errlimit.v:10: Assertion failed in top.t: Three
|
||||
%Error: t/t_runflag_errlimit.v:10: Verilog $stop
|
||||
Aborting...
|
7
test_regress/t/t_runflag_errorlimit.out
Normal file
7
test_regress/t/t_runflag_errorlimit.out
Normal file
@ -0,0 +1,7 @@
|
||||
[0] %Error: t_runflag_errorlimit.v:8: Assertion failed in top.t: One
|
||||
-Info: t/t_runflag_errorlimit.v:8: Verilog $stop, ignored due to +verilator+error+limit
|
||||
[0] %Error: t_runflag_errorlimit.v:9: Assertion failed in top.t: Two
|
||||
-Info: t/t_runflag_errorlimit.v:9: Verilog $stop, ignored due to +verilator+error+limit
|
||||
[0] %Error: t_runflag_errorlimit.v:10: Assertion failed in top.t: Three
|
||||
%Error: t/t_runflag_errorlimit.v:10: Verilog $stop
|
||||
Aborting...
|
Loading…
Reference in New Issue
Block a user