wishbone2csr: wait for WB deack
authorSebastien Bourdeauducq <sebastien@milkymist.org>
Tue, 13 Dec 2011 16:38:59 +0000 (17:38 +0100)
committerSebastien Bourdeauducq <sebastien@milkymist.org>
Tue, 13 Dec 2011 16:38:59 +0000 (17:38 +0100)
migen/bus/wishbone2csr.py

index b6d72ed5b704642a8dd5a238209e894491be6b11..3244dd05f68e8299e26c1f1313f6202389a22fd8 100644 (file)
@@ -9,14 +9,14 @@ class Inst():
                self.csr = csr.Master("from_wishbone")
                self.timeline = timeline.Inst(self.wishbone.cyc_i & self.wishbone.stb_i,
                        [(1, [f.Assign(self.csr.we_o, self.wishbone.we_i)]),
-                       (2, [f.Assign(self.wishbone.ack_o, 1)])])
+                       (2, [f.Assign(self.wishbone.ack_o, 1)]),
+                       (3, [f.Assign(self.wishbone.ack_o, 0)])])
        
        def GetFragment(self):
                sync = [
                        f.Assign(self.csr.we_o, 0),
                        f.Assign(self.csr.d_o, self.wishbone.dat_i),
                        f.Assign(self.csr.a_o, self.wishbone.adr_i[2:16]),
-                       f.Assign(self.wishbone.ack_o, 0),
                        f.Assign(self.wishbone.dat_o, self.csr.d_i)
                ]
                return f.Fragment(sync=sync) + self.timeline.GetFragment()