mirror of https://github.com/YosysHQ/yosys.git
Fix equiv_opt indenting
Signed-off-by: Clifford Wolf <clifford@clifford.at>
This commit is contained in:
parent
2a681909df
commit
f53e19cc71
|
@ -22,7 +22,7 @@
|
|||
USING_YOSYS_NAMESPACE
|
||||
PRIVATE_NAMESPACE_BEGIN
|
||||
|
||||
struct EquivOptPass : public ScriptPass
|
||||
struct EquivOptPass:public ScriptPass
|
||||
{
|
||||
EquivOptPass() : ScriptPass("equiv_opt", "prove equivalence for optimized circuit") { }
|
||||
|
||||
|
@ -61,23 +61,22 @@ struct EquivOptPass : public ScriptPass
|
|||
assert = false;
|
||||
}
|
||||
|
||||
void execute(std::vector<std::string> args, RTLIL::Design *design) YS_OVERRIDE
|
||||
void execute(std::vector < std::string > args, RTLIL::Design * design) YS_OVERRIDE
|
||||
{
|
||||
string run_from, run_to;
|
||||
clear_flags();
|
||||
|
||||
size_t argidx;
|
||||
for (argidx = 1; argidx < args.size(); argidx++)
|
||||
{
|
||||
if (args[argidx] == "-run" && argidx+1 < args.size()) {
|
||||
size_t pos = args[argidx+1].find(':');
|
||||
for (argidx = 1; argidx < args.size(); argidx++) {
|
||||
if (args[argidx] == "-run" && argidx + 1 < args.size()) {
|
||||
size_t pos = args[argidx + 1].find(':');
|
||||
if (pos == std::string::npos)
|
||||
break;
|
||||
run_from = args[++argidx].substr(0, pos);
|
||||
run_to = args[argidx].substr(pos+1);
|
||||
run_to = args[argidx].substr(pos + 1);
|
||||
continue;
|
||||
}
|
||||
if (args[argidx] == "-map" && argidx+1 < args.size()) {
|
||||
if (args[argidx] == "-map" && argidx + 1 < args.size()) {
|
||||
techmap_opts += " -map " + args[++argidx];
|
||||
continue;
|
||||
}
|
||||
|
@ -88,15 +87,11 @@ struct EquivOptPass : public ScriptPass
|
|||
break;
|
||||
}
|
||||
|
||||
for (; argidx < args.size(); argidx++)
|
||||
{
|
||||
if (command.empty())
|
||||
{
|
||||
for (; argidx < args.size(); argidx++) {
|
||||
if (command.empty()) {
|
||||
if (args[argidx].substr(0, 1) == "-")
|
||||
cmd_error(args, argidx, "Unknown option.");
|
||||
}
|
||||
else
|
||||
{
|
||||
} else {
|
||||
command += " ";
|
||||
}
|
||||
command += args[argidx];
|
||||
|
@ -118,8 +113,7 @@ struct EquivOptPass : public ScriptPass
|
|||
|
||||
void script() YS_OVERRIDE
|
||||
{
|
||||
if (check_label("run_pass"))
|
||||
{
|
||||
if (check_label("run_pass")) {
|
||||
run("hierarchy -auto-top");
|
||||
run("design -save preopt");
|
||||
if (help_mode)
|
||||
|
@ -129,14 +123,12 @@ struct EquivOptPass : public ScriptPass
|
|||
run("design -stash postopt");
|
||||
}
|
||||
|
||||
if (check_label("prepare"))
|
||||
{
|
||||
if (check_label("prepare")) {
|
||||
run("design -copy-from preopt -as gold A:top");
|
||||
run("design -copy-from postopt -as gate A:top");
|
||||
}
|
||||
|
||||
if ((!techmap_opts.empty() || help_mode) && check_label("techmap", "(only with -map)"))
|
||||
{
|
||||
if ((!techmap_opts.empty() || help_mode) && check_label("techmap", "(only with -map)")) {
|
||||
string opts;
|
||||
if (help_mode)
|
||||
opts = " -map <filename> ...";
|
||||
|
@ -145,20 +137,18 @@ struct EquivOptPass : public ScriptPass
|
|||
run("techmap -D EQUIV -autoproc" + opts);
|
||||
}
|
||||
|
||||
if (check_label("prove"))
|
||||
{
|
||||
if (check_label("prove")) {
|
||||
run("equiv_make gold gate equiv");
|
||||
run("equiv_induct equiv");
|
||||
if (help_mode)
|
||||
run("equiv_status [-assert] equiv");
|
||||
else if(assert)
|
||||
else if (assert)
|
||||
run("equiv_status -assert equiv");
|
||||
else
|
||||
run("equiv_status equiv");
|
||||
}
|
||||
|
||||
if (check_label("restore"))
|
||||
{
|
||||
if (check_label("restore")) {
|
||||
run("design -load preopt");
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue