run("proc");
if (flatten || help_mode)
run("flatten", "(with '-flatten')");
- active_design->scratchpad_unset("tribuf.added_something");
+ if (active_design)
+ active_design->scratchpad_unset("tribuf.added_something");
run("tribuf -logic");
- if (noiopad && active_design->scratchpad_get_bool("tribuf.added_something"))
+ if (noiopad && active_design && active_design->scratchpad_get_bool("tribuf.added_something"))
log_error("Tristate buffers are unsupported without the '-iopad' option.\n");
run("deminout");
run("opt_expr");