vendor.lattice_ecp5: don't leave LUT inputs disconnected.
authorwhitequark <cz@m-labs.hk>
Sun, 7 Jul 2019 02:30:56 +0000 (02:30 +0000)
committerwhitequark <cz@m-labs.hk>
Sun, 7 Jul 2019 02:34:22 +0000 (02:34 +0000)
This causes YosysHQ/nextpnr#301.

Fixes #136.

nmigen/vendor/lattice_ecp5.py

index b65a62831b7c99dda158a8e7894074923c24e7fa..843f8483b43cbf27c44d3bf1f30bef819a266617 100644 (file)
@@ -192,6 +192,9 @@ class LatticeECP5Platform(TemplatedPlatform):
                     m.submodules += Instance("LUT4",
                         p_INIT=0x5555 if invert else 0xaaaa,
                         i_A=a[bit],
+                        i_B=Const(0),
+                        i_C=Const(0),
+                        i_D=Const(0),
                         o_Z=z[bit]
                     )
                 return a
@@ -205,6 +208,9 @@ class LatticeECP5Platform(TemplatedPlatform):
                     m.submodules += Instance("LUT4",
                         p_INIT=0x5555 if invert else 0xaaaa,
                         i_A=a[bit],
+                        i_B=Const(0),
+                        i_C=Const(0),
+                        i_D=Const(0),
                         o_Z=z[bit]
                     )
                 return z