diff --git a/litex/soc/interconnect/wishbone2csr.py b/litex/soc/interconnect/wishbone2csr.py index b9544aad6..c9e307790 100644 --- a/litex/soc/interconnect/wishbone2csr.py +++ b/litex/soc/interconnect/wishbone2csr.py @@ -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 # # #