Oops. Actually use nocarry flag as spotted by @koriakin
authorEddie Hung <eddie@fpgeh.com>
Wed, 26 Jun 2019 17:06:33 +0000 (10:06 -0700)
committerEddie Hung <eddie@fpgeh.com>
Wed, 26 Jun 2019 17:06:33 +0000 (10:06 -0700)
techlibs/xilinx/synth_xilinx.cc

index 27125d56cfbccae295faa6af2c2f36cf0168a545..dc2b4f2ac5269237428b0ec208cf2295ce10bd4e 100644 (file)
@@ -254,11 +254,13 @@ struct SynthXilinxPass : public ScriptPass
                        }
 
                        if (help_mode)
-                               run("techmap -map +/techmap.v -map +/xilinx/arith_map.v", "(skip if '-nocarry')");
-                       else if (!vpr)
-                               run("techmap -map +/techmap.v -map +/xilinx/arith_map.v");
-                       else
-                               run("techmap -map +/techmap.v -map +/xilinx/arith_map.v -D _EXPLICIT_CARRY");
+                               run("techmap -map +/techmap.v [-map +/xilinx/arith_map.v]", "(skip if '-nocarry')");
+                       else if (!nocarry) {
+                                if (!vpr)
+                                        run("techmap -map +/techmap.v -map +/xilinx/arith_map.v");
+                                else
+                                        run("techmap -map +/techmap.v -map +/xilinx/arith_map.v -D _EXPLICIT_CARRY");
+                        }
 
                        run("opt -fast");
                }