synth_*: call 'opt -fast' after 'techmap'
authorEddie Hung <eddie@fpgeh.com>
Thu, 6 Feb 2020 02:39:01 +0000 (18:39 -0800)
committerEddie Hung <eddie@fpgeh.com>
Thu, 6 Feb 2020 02:39:01 +0000 (18:39 -0800)
techlibs/anlogic/synth_anlogic.cc
techlibs/coolrunner2/synth_coolrunner2.cc
techlibs/ecp5/synth_ecp5.cc
techlibs/efinix/synth_efinix.cc
techlibs/gowin/synth_gowin.cc
techlibs/greenpak4/synth_greenpak4.cc
techlibs/ice40/synth_ice40.cc
techlibs/sf2/synth_sf2.cc

index aaa6bda4a0b5e87431385f6ce2c388afb65c033f..96a23128628e60b486ede5b113989f0548eaea7b 100644 (file)
@@ -175,6 +175,7 @@ struct SynthAnlogicPass : public ScriptPass
                if (check_label("map_gates"))
                {
                        run("techmap -map +/techmap.v -map +/anlogic/arith_map.v");
+                       run("opt -fast");
                        if (retime || help_mode)
                                run("abc -dff -D 1", "(only if -retime)");
                }
index 388e2b792df42c01b8e55d4a0d09253232d908de..3bac8623d184e8dbf6f394c5c91991a5235cfb8d 100644 (file)
@@ -144,8 +144,8 @@ struct SynthCoolrunner2Pass : public ScriptPass
                if (check_label("fine"))
                {
                        run("opt -fast -full");
-                       run("techmap");
-                       run("techmap -map +/coolrunner2/cells_latch.v");
+                       run("techmap -map +/techmap.v -map +/coolrunner2/cells_latch.v");
+                       run("opt -fast");
                        run("dfflibmap -prepare -liberty +/coolrunner2/xc2_dff.lib");
                }
 
index bce20f60403dbd871aef43bb3e3342d8f348e5b8..d47b2bed4c76f9686449b4832eed58fc8faf7eb1 100644 (file)
@@ -289,6 +289,7 @@ struct SynthEcp5Pass : public ScriptPass
                                run("techmap");
                        else
                                run("techmap -map +/techmap.v -map +/ecp5/arith_map.v");
+                       run("opt -fast");
                        if (retime || help_mode)
                                run("abc -dff -D 1", "(only if -retime)");
                }
index 0efd917089e824e0566f13d5593f18273045359a..637d7c00d92794add4404cfec0d4e59d73daa034 100644 (file)
@@ -175,6 +175,7 @@ struct SynthEfinixPass : public ScriptPass
                if (check_label("map_gates"))
                {
                        run("techmap -map +/techmap.v -map +/efinix/arith_map.v");
+                       run("opt -fast");
                        if (retime || help_mode)
                                run("abc -dff -D 1", "(only if -retime)");
                }
index 99dd3834bac7ebecb7f3a6fdad004ee0a63d2bed..d8d8397b6898c7dfc6dd4849114bd21f9e725989 100644 (file)
@@ -211,7 +211,7 @@ struct SynthGowinPass : public ScriptPass
                if (check_label("map_gates"))
                {
                        run("techmap -map +/techmap.v -map +/gowin/arith_map.v");
-                       run("techmap -map +/techmap.v");
+                       run("opt -fast");
                        if (retime || help_mode)
                                run("abc -dff -D 1", "(only if -retime)");
                        run("splitnets");
index e1fbe6b69fe166c5b6299b88d6dddb088d9dcba1..bfbb56d15d129f2a4aec0ebd4eacc778ff118ba3 100644 (file)
@@ -160,8 +160,7 @@ struct SynthGreenPAK4Pass : public ScriptPass
                        run("opt -fast -mux_undef -undriven -fine");
                        run("memory_map");
                        run("opt -undriven -fine");
-                       run("techmap");
-                       run("techmap -map +/greenpak4/cells_latch.v");
+                       run("techmap -map +/techmap.v -map +/greenpak4/cells_latch.v");
                        run("dfflibmap -prepare -liberty +/greenpak4/gp_dff.lib");
                        run("opt -fast");
                        if (retime || help_mode)
index d92e407262e76c1eba194b78ee8d80ec697bf25e..fdb203dcb6dd069b75a89993045c30dcb8a55302 100644 (file)
@@ -316,6 +316,7 @@ struct SynthIce40Pass : public ScriptPass
                                run("ice40_wrapcarry");
                                run("techmap -map +/techmap.v -map +/ice40/arith_map.v");
                        }
+                       run("opt -fast");
                        if (retime || help_mode)
                                run("abc -dff -D 1", "(only if -retime)");
                        run("ice40_opt");
index 543dfdb9ed374d22f969bef506a27345a832aaf3..5efa005c85350f91a626a42374adf94922631422 100644 (file)
@@ -180,6 +180,7 @@ struct SynthSf2Pass : public ScriptPass
                        run("memory_map");
                        run("opt -undriven -fine");
                        run("techmap -map +/techmap.v -map +/sf2/arith_map.v");
+                       run("opt -fast");
                        if (retime || help_mode)
                                run("abc -dff -D 1", "(only if -retime)");
                }