bus/wishbone2csr: truncate WB data
authorSebastien Bourdeauducq <sebastien@milkymist.org>
Mon, 6 Feb 2012 17:43:34 +0000 (18:43 +0100)
committerSebastien Bourdeauducq <sebastien@milkymist.org>
Mon, 6 Feb 2012 17:43:34 +0000 (18:43 +0100)
migen/bus/wishbone2csr.py

index 362cce4931f0049e0eb594d7219711c9ede804ed..56568618106280a3fce4f37a00e057ae97c6bfa1 100644 (file)
@@ -15,7 +15,7 @@ class WB2CSR():
        def get_fragment(self):
                sync = [
                        self.csr.we_o.eq(0),
-                       self.csr.d_o.eq(self.wishbone.dat_i),
+                       self.csr.d_o.eq(self.wishbone.dat_i[:8]),
                        self.csr.a_o.eq(self.wishbone.adr_i[:14]),
                        self.wishbone.dat_o.eq(self.csr.d_i)
                ]