Fix equiv_opt indenting

Signed-off-by: Clifford Wolf <clifford@clifford.at>
This commit is contained in:
Clifford Wolf 2018-12-16 15:57:28 +01:00
parent 2a681909df
commit f53e19cc71
1 changed files with 113 additions and 123 deletions

View File

@ -67,8 +67,7 @@ struct EquivOptPass : public ScriptPass
clear_flags(); clear_flags();
size_t argidx; size_t argidx;
for (argidx = 1; argidx < args.size(); argidx++) for (argidx = 1; argidx < args.size(); argidx++) {
{
if (args[argidx] == "-run" && argidx + 1 < args.size()) { if (args[argidx] == "-run" && argidx + 1 < args.size()) {
size_t pos = args[argidx + 1].find(':'); size_t pos = args[argidx + 1].find(':');
if (pos == std::string::npos) if (pos == std::string::npos)
@ -88,15 +87,11 @@ struct EquivOptPass : public ScriptPass
break; break;
} }
for (; argidx < args.size(); argidx++) for (; argidx < args.size(); argidx++) {
{ if (command.empty()) {
if (command.empty())
{
if (args[argidx].substr(0, 1) == "-") if (args[argidx].substr(0, 1) == "-")
cmd_error(args, argidx, "Unknown option."); cmd_error(args, argidx, "Unknown option.");
} } else {
else
{
command += " "; command += " ";
} }
command += args[argidx]; command += args[argidx];
@ -118,8 +113,7 @@ struct EquivOptPass : public ScriptPass
void script() YS_OVERRIDE void script() YS_OVERRIDE
{ {
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 (help_mode) if (help_mode)
@ -129,14 +123,12 @@ struct EquivOptPass : public ScriptPass
run("design -stash postopt"); 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 preopt -as gold A:top");
run("design -copy-from postopt -as gate 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; string opts;
if (help_mode) if (help_mode)
opts = " -map <filename> ..."; opts = " -map <filename> ...";
@ -145,8 +137,7 @@ struct EquivOptPass : public ScriptPass
run("techmap -D EQUIV -autoproc" + opts); run("techmap -D EQUIV -autoproc" + opts);
} }
if (check_label("prove")) if (check_label("prove")) {
{
run("equiv_make gold gate equiv"); run("equiv_make gold gate equiv");
run("equiv_induct equiv"); run("equiv_induct equiv");
if (help_mode) if (help_mode)
@ -157,8 +148,7 @@ struct EquivOptPass : public ScriptPass
run("equiv_status equiv"); run("equiv_status equiv");
} }
if (check_label("restore")) if (check_label("restore")) {
{
run("design -load preopt"); run("design -load preopt");
} }
} }