Skip to content

Commit

Permalink
abc_new: Fix help crash
Browse files Browse the repository at this point in the history
  • Loading branch information
povik committed Nov 13, 2024
1 parent 2b50048 commit f1857c9
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions passes/techmap/abc_new.cc
Original file line number Diff line number Diff line change
Expand Up @@ -161,7 +161,7 @@ struct AbcNewPass : public ScriptPass {
}

std::string script_save;
if (mod->has_attribute(ID(abc9_script))) {
if (!help_mode && mod->has_attribute(ID(abc9_script))) {
script_save = active_design->scratchpad_get_string("abc9.script");
active_design->scratchpad_set_string("abc9.script",
mod->get_string_attribute(ID(abc9_script)));
Expand All @@ -173,7 +173,7 @@ struct AbcNewPass : public ScriptPass {
run(stringf(" read_xaiger2 -sc_mapping -module_name %s -map2 %s/input.map2 %s/output.aig",
modname.c_str(), tmpdir.c_str(), tmpdir.c_str()));

if (mod->has_attribute(ID(abc9_script))) {
if (!help_mode && mod->has_attribute(ID(abc9_script))) {
if (script_save.empty())
active_design->scratchpad_unset("abc9.script");
else
Expand Down

0 comments on commit f1857c9

Please sign in to comment.