mirror of
https://github.com/verilator/verilator.git
synced 2026-09-07 10:01:11 +02:00
Allow assert disable (#2168)
* Add +verilator+noassert flag This allows to disable the assert check per simulation argument. * Add AssertOn check for assert Insert the check AssertOn to allow disabling of asserts. Asserts can be disabled by not using the `--assert` flag or by calling `AssertOn(false)`, or passing the "+verilator+noassert" runtime flag. Add tests for this behavior. Bad tests check that the assert still causes a stop. Non bad tests check that asserts are properly disabled and cause no stop of the simulation. Fixes #2162. Signed-off-by: Tobias Wölfel <[email protected]> * Correct file location Signed-off-by: Tobias Wölfel <[email protected]> * Add description for single test execution Without this description it is not obvious how to run a single test from the regression test suite. Signed-off-by: Tobias Wölfel <[email protected]>
This commit is contained in:
@@ -2199,6 +2199,9 @@ void VerilatedImp::commandArgVl(const std::string& arg) {
|
||||
else if (commandArgVlValue(arg, "+verilator+seed+", value/*ref*/)) {
|
||||
Verilated::randSeed(atoi(value.c_str()));
|
||||
}
|
||||
else if (arg == "+verilator+noassert") {
|
||||
Verilated::assertOn(false);
|
||||
}
|
||||
else if (arg == "+verilator+V") {
|
||||
versionDump(); // Someday more info too
|
||||
VL_FATAL_MT("COMMAND_LINE", 0, "",
|
||||
|
||||
Reference in New Issue
Block a user