compat.fhdl.specials: fix Tristate.
authorAlain Péteut <alain.peteut@yahoo.com>
Mon, 22 Apr 2019 08:37:06 +0000 (10:37 +0200)
committerwhitequark <cz@m-labs.hk>
Mon, 22 Apr 2019 08:49:08 +0000 (08:49 +0000)
nmigen/compat/fhdl/specials.py

index 053f21380523ef9f8000c99b08b5e5eb8ede85ae..b11999090c47975d12d9641596c51c78406d997b 100644 (file)
@@ -41,12 +41,12 @@ class Tristate:
 
     def elaborate(self, platform):
         if hasattr(platform, "get_tristate"):
-            return platform.get_tristate(self.triple, self.io)
+            return platform.get_tristate(self.triple, self.target)
 
         m = Module()
-        m.d.comb += self.triple.i.eq(self.io)
+        m.d.comb += self.triple.i.eq(self.target)
         m.submodules += Instance("$tribuf",
-            p_WIDTH=len(self.io),
+            p_WIDTH=len(self.target),
             i_EN=self.triple.oe,
             i_A=self.triple.o,
             o_Y=self.io,