Skip to content

Commit

Permalink
wishbone/wishbone2csr: use wishbone.sel on CSR write.
Browse files Browse the repository at this point in the history
CSR write is only done if wishbone.sel != 0. This should avoid the need for 64-bit
CSR alignment on 64-bit CPUs since a 64-bit Wishbone write access targeting only the
32-bit LSB or MSB will be splitted in 2x32-bit accesses: one with sel=0xf, one with sel=0.
  • Loading branch information
enjoy-digital committed May 30, 2020
1 parent b1ec092 commit 7593677
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion litex/soc/interconnect/wishbone.py
Original file line number Diff line number Diff line change
Expand Up @@ -387,7 +387,7 @@ def __init__(self, bus_wishbone=None, bus_csr=None):
fsm.act("WRITE-READ",
If(self.wishbone.cyc & self.wishbone.stb,
self.csr.adr.eq(self.wishbone.adr),
self.csr.we.eq(self.wishbone.we),
self.csr.we.eq(self.wishbone.we & (self.wishbone.sel != 0)),
NextState("ACK")
)
)
Expand Down

0 comments on commit 7593677

Please sign in to comment.