abc9: Add wire delays to synth_ice40
authorDavid Shah <dave@ds0.me>
Wed, 26 Jun 2019 10:39:44 +0000 (11:39 +0100)
committerDavid Shah <dave@ds0.me>
Wed, 26 Jun 2019 10:39:44 +0000 (11:39 +0100)
Signed-off-by: David Shah <dave@ds0.me>
techlibs/ice40/synth_ice40.cc

index d8e9786c55361bc0a7339e6d6f37db4ab12a28d6..a782f00b9c7599f98af92a95729e57cc78504b69 100644 (file)
@@ -331,8 +331,16 @@ struct SynthIce40Pass : public ScriptPass
                                run("techmap -map +/gate2lut.v -D LUT_WIDTH=4", "(only if -noabc)");
                        }
                        if (!noabc) {
-                               if (abc == "abc9")
-                                       run(abc + stringf(" -lut +/ice40/abc_%s.lut -box +/ice40/abc_%s.box", device_opt.c_str(), device_opt.c_str()), "(skip if -noabc)");
+                               if (abc == "abc9") {
+                                       int wire_delay;
+                                       if (device_opt == "lp")
+                                               wire_delay = 400;
+                                       else if (device_opt == "u")
+                                               wire_delay = 750;
+                                       else
+                                               wire_delay = 250;
+                                       run(abc + stringf(" -W %d -lut +/ice40/abc_%s.lut -box +/ice40/abc_%s.box", wire_delay, device_opt.c_str(), device_opt.c_str()), "(skip if -noabc)");
+                               }
                                else
                                        run(abc + " -dress -lut 4", "(skip if -noabc)");
                        }