WB2CSR: Use CSR address_width for the wishbone bus
Currently, we create a wishbone interface with the default address width (30 bits) for the bridge. Instead, create an interface that has the same number of address bits as the CSR bus. Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
This commit is contained in:
parent
520c17e96d
commit
f628ff6b47
|
@ -10,12 +10,12 @@ from litex.soc.interconnect import csr_bus, wishbone
|
|||
|
||||
class WB2CSR(Module):
|
||||
def __init__(self, bus_wishbone=None, bus_csr=None):
|
||||
if bus_wishbone is None:
|
||||
bus_wishbone = wishbone.Interface()
|
||||
self.wishbone = bus_wishbone
|
||||
if bus_csr is None:
|
||||
bus_csr = csr_bus.Interface()
|
||||
self.csr = bus_csr
|
||||
if bus_wishbone is None:
|
||||
bus_wishbone = wishbone.Interface(adr_width=bus_csr.address_width)
|
||||
self.wishbone = bus_wishbone
|
||||
|
||||
# # #
|
||||
|
||||
|
|
Loading…
Reference in New Issue