mirror of https://github.com/YosysHQ/yosys.git
Added "check -assert"
This commit is contained in:
parent
39d25b212c
commit
e8307cefd9
|
@ -49,6 +49,7 @@ struct CheckPass : public Pass {
|
|||
{
|
||||
int counter = 0;
|
||||
bool noinit = false;
|
||||
bool assert_mode = false;
|
||||
|
||||
size_t argidx;
|
||||
for (argidx = 1; argidx < args.size(); argidx++) {
|
||||
|
@ -56,6 +57,10 @@ struct CheckPass : public Pass {
|
|||
noinit = true;
|
||||
continue;
|
||||
}
|
||||
if (args[argidx] == "-assert") {
|
||||
assert_mode = true;
|
||||
continue;
|
||||
}
|
||||
break;
|
||||
}
|
||||
extra_args(args, argidx, design);
|
||||
|
@ -137,6 +142,9 @@ struct CheckPass : public Pass {
|
|||
}
|
||||
|
||||
log("found and reported %d problems.\n", counter);
|
||||
|
||||
if (assert_mode)
|
||||
log_error("Found %d problems in 'check -assert'.\n", counter);
|
||||
}
|
||||
} CheckPass;
|
||||
|
||||
|
|
Loading…
Reference in New Issue