Fix granularity and sel in UARTBridge
authorJean THOMAS <git0@pub.jeanthomas.me>
Wed, 22 Jul 2020 14:43:46 +0000 (16:43 +0200)
committerJean THOMAS <git0@pub.jeanthomas.me>
Wed, 22 Jul 2020 14:43:46 +0000 (16:43 +0200)
examples/uartbridge.py
gram/simulation/uartbridge.py

index b211a4c2f03e1088bc1593ccf2d2e1a3678a1026..d5a886eabc44c81a641440cea421b232a4db8224 100644 (file)
@@ -11,7 +11,7 @@ __ALL__ = ["UARTBridge"]
 class UARTBridge(Elaboratable):
     def __init__(self, divisor, pins):
         self.bus = wishbone.Interface(addr_width=30,
-                                      data_width=32, granularity=32)
+                                      data_width=32, granularity=8)
         self._pins = pins
         self._divisor = divisor
 
index 747f63f6fd5ab41d6dfd0c9c8d092fc4bb1d7cd5..d5a886eabc44c81a641440cea421b232a4db8224 100644 (file)
@@ -11,7 +11,7 @@ __ALL__ = ["UARTBridge"]
 class UARTBridge(Elaboratable):
     def __init__(self, divisor, pins):
         self.bus = wishbone.Interface(addr_width=30,
-                                      data_width=32, granularity=32)
+                                      data_width=32, granularity=8)
         self._pins = pins
         self._divisor = divisor
 
@@ -102,6 +102,7 @@ class UARTBridge(Elaboratable):
                     self.bus.stb.eq(1),
                     self.bus.we.eq(0),
                     self.bus.cyc.eq(1),
+                    self.bus.sel.eq(0xF),
                 ]
 
                 with m.If(self.bus.ack):