lattice/common: Fix tristate buses with Trellis
authorDavid Shah <dave@ds0.me>
Mon, 4 Mar 2019 10:50:56 +0000 (10:50 +0000)
committerDavid Shah <dave@ds0.me>
Mon, 4 Mar 2019 10:50:56 +0000 (10:50 +0000)
Signed-off-by: David Shah <dave@ds0.me>
litex/build/lattice/common.py

index d1e7e82e55c800aebd520ab5589761a0511a5e24..6875b693337044a4dcc1e8f21079b8312e0e82a9 100644 (file)
@@ -57,13 +57,14 @@ class LatticeECPXTrellisTristateImpl(Module):
                 )
         else:
             for bit in range(nbits):
-                Instance("TRELLIS_IO",
-                    p_DIR="BIDIR",
-                    i_B=io[bit],
-                    i_I=o[bit],
-                    o_O=i[bit],
-                    i_T=~oe,
-                )
+                self.specials += \
+                    Instance("TRELLIS_IO",
+                        p_DIR="BIDIR",
+                        i_B=io[bit],
+                        i_I=o[bit],
+                        o_O=i[bit],
+                        i_T=~oe,
+                    )
 
 
 class LatticeECPXTrellisTristate(Module):