wishbone2csr: fix double-write bug
This commit is contained in:
parent
923fc52e68
commit
0ea7a9b2e6
|
@ -8,11 +8,12 @@ class Inst():
|
||||||
self.wishbone = wishbone.Slave("to_csr")
|
self.wishbone = wishbone.Slave("to_csr")
|
||||||
self.csr = csr.Master("from_wishbone")
|
self.csr = csr.Master("from_wishbone")
|
||||||
self.timeline = timeline.Inst(self.wishbone.cyc_i & self.wishbone.stb_i,
|
self.timeline = timeline.Inst(self.wishbone.cyc_i & self.wishbone.stb_i,
|
||||||
[(2, [f.Assign(self.wishbone.ack_o, 1)])])
|
[(1, [f.Assign(self.csr.we_o, self.wishbone.we_i)]),
|
||||||
|
(2, [f.Assign(self.wishbone.ack_o, 1)])])
|
||||||
|
|
||||||
def GetFragment(self):
|
def GetFragment(self):
|
||||||
sync = [
|
sync = [
|
||||||
f.Assign(self.csr.we_o, self.wishbone.we_i),
|
f.Assign(self.csr.we_o, 0),
|
||||||
f.Assign(self.csr.d_o, self.wishbone.dat_i),
|
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.csr.a_o, self.wishbone.adr_i[2:16]),
|
||||||
f.Assign(self.wishbone.ack_o, 0),
|
f.Assign(self.wishbone.ack_o, 0),
|
||||||
|
|
Loading…
Reference in New Issue