mirror of
https://github.com/YosysHQ/yosys
synced 2025-04-22 08:35:32 +00:00
Add equiv_opt -post
This commit is contained in:
parent
20c358bce2
commit
be77aad820
1 changed files with 13 additions and 2 deletions
|
@ -66,13 +66,16 @@ struct EquivOptPass:public ScriptPass
|
|||
log(" -nocheck\n");
|
||||
log(" disable running check before and after the command under test.\n");
|
||||
log("\n");
|
||||
log(" -post\n");
|
||||
log(" keep post-opt design instead of pre-opt design during restore.\n");
|
||||
log("\n");
|
||||
log("The following commands are executed by this verification command:\n");
|
||||
help_script();
|
||||
log("\n");
|
||||
}
|
||||
|
||||
std::string command, techmap_opts, make_opts;
|
||||
bool assert, undef, multiclock, async2sync, nocheck;
|
||||
bool assert, undef, multiclock, async2sync, nocheck, post;
|
||||
|
||||
void clear_flags() override
|
||||
{
|
||||
|
@ -84,6 +87,7 @@ struct EquivOptPass:public ScriptPass
|
|||
multiclock = false;
|
||||
async2sync = false;
|
||||
nocheck = false;
|
||||
post = false;
|
||||
}
|
||||
|
||||
void execute(std::vector < std::string > args, RTLIL::Design * design) override
|
||||
|
@ -121,6 +125,10 @@ struct EquivOptPass:public ScriptPass
|
|||
nocheck = true;
|
||||
continue;
|
||||
}
|
||||
if (args[argidx] == "-post") {
|
||||
post = true;
|
||||
continue;
|
||||
}
|
||||
if (args[argidx] == "-multiclock") {
|
||||
multiclock = true;
|
||||
continue;
|
||||
|
@ -219,7 +227,10 @@ struct EquivOptPass:public ScriptPass
|
|||
}
|
||||
|
||||
if (check_label("restore")) {
|
||||
run("design -load preopt");
|
||||
if (post)
|
||||
run("design -load postopt");
|
||||
else
|
||||
run("design -load preopt");
|
||||
}
|
||||
}
|
||||
} EquivOptPass;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue