uart: minor cleanup and fix
authorSebastien Bourdeauducq <sb@m-labs.hk>
Fri, 10 Oct 2014 07:33:27 +0000 (15:33 +0800)
committerSebastien Bourdeauducq <sb@m-labs.hk>
Fri, 10 Oct 2014 07:33:27 +0000 (15:33 +0800)
misoclib/uart/__init__.py

index 126be9d120665d7d1b80a2c3b143c4d1eb48a013..f728cd1f0c60c98ad2109d46592cc483c23935a3 100644 (file)
@@ -125,7 +125,7 @@ class UART(Module, AutoCSR):
                                self.tx.sink.stb.eq(0)
                        ),
                        If(self.rx.source.stb,
-                               self._r_rxtx.w.eq(self.rx.source.d)
+                               self._r_rxtx.w.eq(self.rx.source.payload.d)
                        )
                ]
                self.comb += [
@@ -135,9 +135,8 @@ class UART(Module, AutoCSR):
 
 class UARTTB(Module):
        def __init__(self):
-               MHz=1000000
                self.clk_freq = 83333333
-               self.baud = 3*MHz
+               self.baud = 3000000
                self.pads = Record([("rx", 1), ("tx", 1)])
                self.submodules.slave = UART(self.pads, self.clk_freq, self.baud)