From 0fd64aab25787e2591080cf71192ee16fcf2ae9f Mon Sep 17 00:00:00 2001 From: Eddie Hung Date: Tue, 28 Jan 2020 17:41:57 -0800 Subject: synth_xilinx: fix help when no active_design; fixes #1664 --- techlibs/xilinx/synth_xilinx.cc | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'techlibs') diff --git a/techlibs/xilinx/synth_xilinx.cc b/techlibs/xilinx/synth_xilinx.cc index 3c5599e4e..9b4b1f71a 100644 --- a/techlibs/xilinx/synth_xilinx.cc +++ b/techlibs/xilinx/synth_xilinx.cc @@ -316,9 +316,10 @@ struct SynthXilinxPass : public ScriptPass 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"); -- cgit v1.2.3