# Add CPU buses as Wisbone masters
for bus in self.cpu.buses:
+ assert bus.data_width in [32, 64, 128]
+ # Down Convert CPU buses to 32-bit if needed
+ if bus.data_width != 32:
+ dc_bus = wishbone.Interface()
+ self.submodules += wishbone.Converter(bus, dc_bus)
+ bus = dc_bus
self.add_wb_master(bus)
# Add CPU CSR (dynamic)
class Interface(Record):
def __init__(self, data_width=32, adr_width=30):
+ self.data_width = data_width
+ self.adr_width = adr_width
Record.__init__(self, set_layout_parameters(_layout,
adr_width=adr_width,
data_width=data_width,