cores/uart/UARTInterface: remove connect method
authorFlorent Kermarrec <florent@enjoy-digital.fr>
Mon, 13 Jan 2020 15:58:00 +0000 (16:58 +0100)
committerFlorent Kermarrec <florent@enjoy-digital.fr>
Mon, 13 Jan 2020 15:58:00 +0000 (16:58 +0100)
litex/soc/cores/uart.py

index a3d7122dd4c91a30c81fed3f2511b41c7d793af6..f8654c3b63cec3ff2bf650a843a9f649658f3e44 100644 (file)
@@ -23,12 +23,6 @@ class UARTInterface:
         self.sink   = stream.Endpoint([("data", 8)])
         self.source = stream.Endpoint([("data", 8)])
 
-    def connect(self, other):
-        return [
-            other.source.connect(self.sink),
-            self.source.connect(other.sink)
-        ]
-
 # RS232 PHY ----------------------------------------------------------------------------------------
 
 class RS232PHYInterface(UARTInterface):
@@ -278,4 +272,7 @@ class UARTCrossover(UART):
         assert kwargs.get("phy", None) == None
         UART.__init__(self, **kwargs)
         self.submodules.xover = UART(tx_fifo_depth=2, rx_fifo_depth=2)
-        self.comb += self.connect(self.xover)
+        self.comb += [
+            self.source.connect(self.xover.sink),
+            self.xover.source.connect(self.sink)
+        ]