mirror of https://github.com/YosysHQ/yosys.git
Add "check -assert" to equiv_opt
Signed-off-by: Claire Xenia Wolf <claire@clairexen.net>
This commit is contained in:
parent
f0478c520d
commit
0516307637
|
@ -60,13 +60,16 @@ struct EquivOptPass:public ScriptPass
|
||||||
log(" -undef\n");
|
log(" -undef\n");
|
||||||
log(" enable modelling of undef states during equiv_induct.\n");
|
log(" enable modelling of undef states during equiv_induct.\n");
|
||||||
log("\n");
|
log("\n");
|
||||||
|
log(" -nocheck\n");
|
||||||
|
log(" disable running check before and after the command under test.\n");
|
||||||
|
log("\n");
|
||||||
log("The following commands are executed by this verification command:\n");
|
log("The following commands are executed by this verification command:\n");
|
||||||
help_script();
|
help_script();
|
||||||
log("\n");
|
log("\n");
|
||||||
}
|
}
|
||||||
|
|
||||||
std::string command, techmap_opts, make_opts;
|
std::string command, techmap_opts, make_opts;
|
||||||
bool assert, undef, multiclock, async2sync;
|
bool assert, undef, multiclock, async2sync, nocheck;
|
||||||
|
|
||||||
void clear_flags() override
|
void clear_flags() override
|
||||||
{
|
{
|
||||||
|
@ -77,6 +80,7 @@ struct EquivOptPass:public ScriptPass
|
||||||
undef = false;
|
undef = false;
|
||||||
multiclock = false;
|
multiclock = false;
|
||||||
async2sync = false;
|
async2sync = false;
|
||||||
|
nocheck = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
void execute(std::vector < std::string > args, RTLIL::Design * design) override
|
void execute(std::vector < std::string > args, RTLIL::Design * design) override
|
||||||
|
@ -110,6 +114,10 @@ struct EquivOptPass:public ScriptPass
|
||||||
undef = true;
|
undef = true;
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
if (args[argidx] == "-nocheck") {
|
||||||
|
nocheck = true;
|
||||||
|
continue;
|
||||||
|
}
|
||||||
if (args[argidx] == "-multiclock") {
|
if (args[argidx] == "-multiclock") {
|
||||||
multiclock = true;
|
multiclock = true;
|
||||||
continue;
|
continue;
|
||||||
|
@ -153,10 +161,14 @@ struct EquivOptPass:public ScriptPass
|
||||||
if (check_label("run_pass")) {
|
if (check_label("run_pass")) {
|
||||||
run("hierarchy -auto-top");
|
run("hierarchy -auto-top");
|
||||||
run("design -save preopt");
|
run("design -save preopt");
|
||||||
|
if (!nocheck)
|
||||||
|
run("check -assert", "(unless -nocheck)");
|
||||||
if (help_mode)
|
if (help_mode)
|
||||||
run("[command]");
|
run("[command]");
|
||||||
else
|
else
|
||||||
run(command);
|
run(command);
|
||||||
|
if (!nocheck)
|
||||||
|
run("check -assert", "(unless -nocheck)");
|
||||||
run("design -stash postopt");
|
run("design -stash postopt");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue