Skip to content

Commit

Permalink
soc/integration/soc: when adding a CSR Bridge bus_bridge must keep bu…
Browse files Browse the repository at this point in the history
…s.address_width instead of the default value
  • Loading branch information
trabucayre committed Dec 8, 2023
1 parent 1a8fd2e commit 2134c0d
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions litex/soc/integration/soc.py
Original file line number Diff line number Diff line change
Expand Up @@ -1039,9 +1039,17 @@ def add_csr_bridge(self, name="csr", origin=None, register=False):
"axi-lite": axi.AXILite2CSR,
"axi" : axi.AXILite2CSR, # Note: CSR is a slow bus so using AXI-Lite is fine.
}[self.bus.standard]
bus_bridge_cls = {
"wishbone": wishbone.Interface,
"axi-lite": axi.AXILiteInterface,
"axi" : axi.AXILiteInterface,
}[self.bus.standard]
csr_bridge_name = f"{name}_bridge"
self.check_if_exists(csr_bridge_name)
csr_bridge = csr_bridge_cls(
bus_bridge_cls(
address_width = self.bus.address_width,
data_width = self.bus.data_width),
bus_csr = csr_bus.Interface(
address_width = self.csr.address_width,
data_width = self.csr.data_width),
Expand Down

0 comments on commit 2134c0d

Please sign in to comment.