synth_xilinx: fix help when no active_design; fixes #1664
authorEddie Hung <eddie@fpgeh.com>
Wed, 29 Jan 2020 01:41:57 +0000 (17:41 -0800)
committerEddie Hung <eddie@fpgeh.com>
Wed, 29 Jan 2020 01:41:57 +0000 (17:41 -0800)
techlibs/xilinx/synth_xilinx.cc

index 3c5599e4e523837ca6ecf81c16b97342b011ab86..9b4b1f71a78300611f8775d39479d3ef93105857 100644 (file)
@@ -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");