From 3bd623bb05c0be74b024f5635e754e794bd6316c Mon Sep 17 00:00:00 2001 From: Eddie Hung Date: Thu, 12 Dec 2019 14:33:33 -0800 Subject: synth_xilinx: error out if tristate without '-iopad' --- techlibs/xilinx/synth_xilinx.cc | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'techlibs/xilinx/synth_xilinx.cc') diff --git a/techlibs/xilinx/synth_xilinx.cc b/techlibs/xilinx/synth_xilinx.cc index 2c5686a35..6dd769055 100644 --- a/techlibs/xilinx/synth_xilinx.cc +++ b/techlibs/xilinx/synth_xilinx.cc @@ -306,6 +306,10 @@ struct SynthXilinxPass : public ScriptPass run("proc"); if (flatten || help_mode) run("flatten", "(with '-flatten')"); + active_design->scratchpad_unset("tribuf.added_something"); + run("tribuf -logic"); + if (!do_iopad && active_design->scratchpad_get_bool("tribuf.added_something")) + log_error("Tristate buffers are unsupported without the '-iopad' option.\n"); run("tribuf -logic"); run("deminout"); run("opt_expr"); -- cgit v1.2.3 From dd7d2d8db615f7d54d9bbee257fad9fb11bdc9f8 Mon Sep 17 00:00:00 2001 From: Eddie Hung Date: Fri, 13 Dec 2019 08:51:05 -0800 Subject: Duplicate tribuf call, credit to @mwkmwkmwk --- techlibs/xilinx/synth_xilinx.cc | 1 - 1 file changed, 1 deletion(-) (limited to 'techlibs/xilinx/synth_xilinx.cc') diff --git a/techlibs/xilinx/synth_xilinx.cc b/techlibs/xilinx/synth_xilinx.cc index 6dd769055..640659ad6 100644 --- a/techlibs/xilinx/synth_xilinx.cc +++ b/techlibs/xilinx/synth_xilinx.cc @@ -310,7 +310,6 @@ struct SynthXilinxPass : public ScriptPass run("tribuf -logic"); if (!do_iopad && active_design->scratchpad_get_bool("tribuf.added_something")) log_error("Tristate buffers are unsupported without the '-iopad' option.\n"); - run("tribuf -logic"); run("deminout"); run("opt_expr"); run("opt_clean"); -- cgit v1.2.3 From 245b8c4ab64c5c3bd7b9f71f94316a76a2576fd1 Mon Sep 17 00:00:00 2001 From: Eddie Hung Date: Tue, 28 Jan 2020 10:17:47 -0800 Subject: Fix unresolved conflict from #1573 --- techlibs/xilinx/synth_xilinx.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'techlibs/xilinx/synth_xilinx.cc') diff --git a/techlibs/xilinx/synth_xilinx.cc b/techlibs/xilinx/synth_xilinx.cc index 5ba8c0e10..3c5599e4e 100644 --- a/techlibs/xilinx/synth_xilinx.cc +++ b/techlibs/xilinx/synth_xilinx.cc @@ -318,7 +318,7 @@ struct SynthXilinxPass : public ScriptPass run("flatten", "(with '-flatten')"); active_design->scratchpad_unset("tribuf.added_something"); run("tribuf -logic"); - if (!do_iopad && active_design->scratchpad_get_bool("tribuf.added_something")) + if (noiopad && 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 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/xilinx/synth_xilinx.cc') 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 From c5971cb16cdc934b9d2c615e37d0eed4cc3b5c8d Mon Sep 17 00:00:00 2001 From: Eddie Hung Date: Tue, 28 Jan 2020 17:48:43 -0800 Subject: synth_xilinx: cleanup help --- techlibs/xilinx/synth_xilinx.cc | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) (limited to 'techlibs/xilinx/synth_xilinx.cc') diff --git a/techlibs/xilinx/synth_xilinx.cc b/techlibs/xilinx/synth_xilinx.cc index 9b4b1f71a..8119d307c 100644 --- a/techlibs/xilinx/synth_xilinx.cc +++ b/techlibs/xilinx/synth_xilinx.cc @@ -530,7 +530,7 @@ struct SynthXilinxPass : public ScriptPass if (check_label("map_cells")) { // Needs to be done before logic optimization, so that inverters (OE vs T) are handled. if (help_mode || !noiopad) - run("iopadmap -bits -outpad OBUF I:O -inpad IBUF O:I -toutpad $__XILINX_TOUTPAD OE:I:O -tinoutpad $__XILINX_TINOUTPAD OE:O:I:IO A:top", "(only if not '-noiopad')"); + run("iopadmap -bits -outpad OBUF I:O -inpad IBUF O:I -toutpad $__XILINX_TOUTPAD OE:I:O -tinoutpad $__XILINX_TINOUTPAD OE:O:I:IO A:top", "(skip if '-noiopad')"); std::string techmap_args = "-map +/techmap.v -map +/xilinx/cells_map.v"; if (widemux > 0) techmap_args += stringf(" -D MIN_MUX_INPUTS=%d", widemux); @@ -593,17 +593,15 @@ struct SynthXilinxPass : public ScriptPass if (!nosrl || help_mode) run("xilinx_srl -fixed -minlen 3", "(skip if '-nosrl')"); std::string techmap_args = "-map +/xilinx/lut_map.v -map +/xilinx/cells_map.v"; - if (help_mode) - techmap_args += stringf("[-map %s]", ff_map_file.c_str()); - else if (!abc9) + if (help_mode || !abc9) techmap_args += stringf(" -map %s", ff_map_file.c_str()); - run("techmap " + techmap_args, "(only if '-abc9')"); + run("techmap " + techmap_args); run("xilinx_dffopt"); } if (check_label("finalize")) { if (help_mode || !noclkbuf) - run("clkbufmap -buf BUFG O:I ", "(skip if '-noclkbuf')"); + run("clkbufmap -buf BUFG O:I", "(skip if '-noclkbuf')"); if (help_mode || ise) run("extractinv -inv INV O:I", "(only if '-ise')"); run("clean"); -- cgit v1.2.3 From 34d2fbd2f96a8789aa7eb655318308e11949eb7a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marcelina=20Ko=C5=9Bcielnicka?= Date: Mon, 3 Feb 2020 14:57:17 +0100 Subject: Add opt_lut_ins pass. (#1673) --- techlibs/xilinx/synth_xilinx.cc | 1 + 1 file changed, 1 insertion(+) (limited to 'techlibs/xilinx/synth_xilinx.cc') diff --git a/techlibs/xilinx/synth_xilinx.cc b/techlibs/xilinx/synth_xilinx.cc index 8119d307c..5a28bb139 100644 --- a/techlibs/xilinx/synth_xilinx.cc +++ b/techlibs/xilinx/synth_xilinx.cc @@ -597,6 +597,7 @@ struct SynthXilinxPass : public ScriptPass techmap_args += stringf(" -map %s", ff_map_file.c_str()); run("techmap " + techmap_args); run("xilinx_dffopt"); + run("opt_lut_ins -tech xilinx"); } if (check_label("finalize")) { -- cgit v1.2.3