from litex.soc.interconnect import csr
from litex.soc.interconnect.csr import CSRStorage
+# CSR Definition -----------------------------------------------------------------------------------
_layout = [
("adr", "address_width", DIR_M_TO_S),
yield
return (yield self.dat_r)
+# CSR Interconnect ---------------------------------------------------------------------------------
class Interconnect(Module):
def __init__(self, master, slaves):
self.comb += masters[i].dat_r.eq(intermediate.dat_r)
self.comb += intermediate.connect(*slaves)
+# CSR SRAM -----------------------------------------------------------------------------------------
class SRAM(Module):
def __init__(self, mem_or_size, address, read_only=None, init=None, bus=None, paging=0x800, soc_bus_data_width=32):
else:
return [self._page]
+# CSR Bank -----------------------------------------------------------------------------------------
class CSRBank(csr.GenericBank):
def __init__(self, description, address=0, bus=None, paging=0x800, soc_bus_data_width=32):