soc/interconnect/axi/AXILite2CSR: add register parameter for genericity.

Not yet used, but simplify SoC integration.
This commit is contained in:
Florent Kermarrec 2020-08-24 09:03:04 +02:00
parent 42d8fc226a
commit 9e37b16ec0
2 changed files with 3 additions and 2 deletions

View File

@ -815,7 +815,7 @@ class SoC(Module):
bus_csr = csr_bus.Interface( bus_csr = csr_bus.Interface(
address_width = self.csr.address_width, address_width = self.csr.address_width,
data_width = self.csr.data_width), data_width = self.csr.data_width),
register = register) register = register)
csr_size = 2**(self.csr.address_width + 2) csr_size = 2**(self.csr.address_width + 2)
csr_region = SoCRegion(origin=origin, size=csr_size, cached=False) csr_region = SoCRegion(origin=origin, size=csr_size, cached=False)
bus = getattr(self.csr_bridge, self.bus.standard.replace('-', '_')) bus = getattr(self.csr_bridge, self.bus.standard.replace('-', '_'))

View File

@ -732,7 +732,8 @@ def axi_lite_to_simple(axi_lite, port_adr, port_dat_r, port_dat_w=None, port_we=
return fsm, comb return fsm, comb
class AXILite2CSR(Module): class AXILite2CSR(Module):
def __init__(self, axi_lite=None, bus_csr=None): def __init__(self, axi_lite=None, bus_csr=None, register=False):
# TODO: unused register argument
if axi_lite is None: if axi_lite is None:
axi_lite = AXILiteInterface() axi_lite = AXILiteInterface()
if bus_csr is None: if bus_csr is None: