3
0
Fork 0
mirror of https://github.com/YosysHQ/yosys synced 2025-04-13 04:28:18 +00:00

Added "check -assert"

This commit is contained in:
Clifford Wolf 2015-02-22 13:00:41 +01:00
parent 39d25b212c
commit e8307cefd9

View file

@ -49,6 +49,7 @@ struct CheckPass : public Pass {
{ {
int counter = 0; int counter = 0;
bool noinit = false; bool noinit = false;
bool assert_mode = false;
size_t argidx; size_t argidx;
for (argidx = 1; argidx < args.size(); argidx++) { for (argidx = 1; argidx < args.size(); argidx++) {
@ -56,6 +57,10 @@ struct CheckPass : public Pass {
noinit = true; noinit = true;
continue; continue;
} }
if (args[argidx] == "-assert") {
assert_mode = true;
continue;
}
break; break;
} }
extra_args(args, argidx, design); extra_args(args, argidx, design);
@ -137,6 +142,9 @@ struct CheckPass : public Pass {
} }
log("found and reported %d problems.\n", counter); log("found and reported %d problems.\n", counter);
if (assert_mode)
log_error("Found %d problems in 'check -assert'.\n", counter);
} }
} CheckPass; } CheckPass;