mirror of
https://github.com/YosysHQ/yosys
synced 2025-06-15 02:16:17 +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(" -nocheck\n");
|
||||||
log(" disable running check before and after the command under test.\n");
|
log(" disable running check before and after the command under test.\n");
|
||||||
log("\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");
|
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, nocheck;
|
bool assert, undef, multiclock, async2sync, nocheck, post;
|
||||||
|
|
||||||
void clear_flags() override
|
void clear_flags() override
|
||||||
{
|
{
|
||||||
|
@ -84,6 +87,7 @@ struct EquivOptPass:public ScriptPass
|
||||||
multiclock = false;
|
multiclock = false;
|
||||||
async2sync = false;
|
async2sync = false;
|
||||||
nocheck = false;
|
nocheck = false;
|
||||||
|
post = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
void execute(std::vector < std::string > args, RTLIL::Design * design) override
|
void execute(std::vector < std::string > args, RTLIL::Design * design) override
|
||||||
|
@ -121,6 +125,10 @@ struct EquivOptPass:public ScriptPass
|
||||||
nocheck = true;
|
nocheck = true;
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
if (args[argidx] == "-post") {
|
||||||
|
post = true;
|
||||||
|
continue;
|
||||||
|
}
|
||||||
if (args[argidx] == "-multiclock") {
|
if (args[argidx] == "-multiclock") {
|
||||||
multiclock = true;
|
multiclock = true;
|
||||||
continue;
|
continue;
|
||||||
|
@ -219,7 +227,10 @@ struct EquivOptPass:public ScriptPass
|
||||||
}
|
}
|
||||||
|
|
||||||
if (check_label("restore")) {
|
if (check_label("restore")) {
|
||||||
run("design -load preopt");
|
if (post)
|
||||||
|
run("design -load postopt");
|
||||||
|
else
|
||||||
|
run("design -load preopt");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
} EquivOptPass;
|
} EquivOptPass;
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue