Instance SPBlock512W64B8W). 512 rows, 64-bit, QTY 8 write-enable lines
"""
- def __init__(self, bus=None, features=None):
+ def __init__(self, bus=None, features=None, name=None):
if features is None:
features = frozenset()
if bus is None:
granularity=8, # at 8-bit granularity
features=features,
alignment=0,
- name=None)
+ name=name)
self.bus = bus
self.granularity = bus.granularity
from soc.config.state import CoreState
from soc.interrupts.xics import XICS_ICP, XICS_ICS
from soc.bus.simple_gpio import SimpleGPIO
+from soc.bus.SPBlock512W64B8W import SPBlock512W64B8W
from soc.clock.select import ClockSelect
from soc.clock.dummypll import DummyPLL
from soc.sv.svstate import SVSTATERec
pspec.wb_icache_en = self.jtag.wb_icache_en
pspec.wb_dcache_en = self.jtag.wb_dcache_en
+ # add 4k sram blocks?
+ self.sram4x4k = (hasattr(pspec, "sram4x4kblock") and
+ pspec.sram4x4kblock == True)
+ if self.sram4x4k:
+ self.sram4k = []
+ for i in range(4):
+ self.sram4k.append(SPBlock512W64B8W(name="sram4k_%d" % i))
+
# add interrupt controller?
self.xics = hasattr(pspec, "xics") and pspec.xics == True
if self.xics:
cur_state = self.cur_state
+ # 4x 4k SRAM blocks. these simply "exist", they get routed in litex
+ if self.sram4x4k:
+ for i, sram in enumerate(self.sram4k):
+ m.submodules["sram4k_%d" % i] = sram
+
# XICS interrupt handler
if self.xics:
m.submodules.xics_icp = icp = self.xics_icp
ports += list(self.imem.ibus.fields.values())
ports += list(self.core.l0.cmpi.lsmem.lsi.slavebus.fields.values())
+ if self.sram4x4k:
+ for sram in self.sram4k:
+ ports += list(sram.bus.fields.values())
+
if self.xics:
ports += list(self.xics_icp.bus.fields.values())
ports += list(self.xics_ics.bus.fields.values())