"""
- def __init__(self, pspec, pilist=None, div_fsm=True,microwatt_mmu = False):
+ def __init__(self, pspec, pilist=None, div_fsm=True):
addrwid = pspec.addr_wid
units = pspec.units
+ microwatt_mmu = hasattr(pspec, "mmu") and pspec.mmu == True
+ print("AllFunctionUnits.microwatt_mmu="+str(microwatt_mmu))
if not isinstance(units, dict):
units = {'alu': 1, 'cr': 1, 'branch': 1, 'trap': 1,
'spr': 1,
if __name__ == "__main__":
unittest.main(exit=False)
suite = unittest.TestSuite()
- suite.addTest(TestRunner(MMUDataPathTestCase().test_data))
+ suite.addTest(TestRunner(MMUDataPathTestCase().test_data,microwatt_mmu=True))
runner = unittest.TextTestRunner()
runner.run(suite)
class NonProductionCore(Elaboratable):
- def __init__(self, pspec, microwatt_mmu = False):
+ def __init__(self, pspec):
self.pspec = pspec
# single LD/ST funnel for memory access
pi = self.l0.l0.dports[0]
# function units (only one each)
- self.microwatt_mmu = microwatt_mmu
- self.fus = AllFunctionUnits(pspec, pilist=[pi], microwatt_mmu = self.microwatt_mmu)
+ # only include mmu if enabled in pspec
+ self.fus = AllFunctionUnits(pspec, pilist=[pi])
# register files (yes plural)
self.regs = RegFiles()
class TestRunner(FHDLTestCase):
- def __init__(self, tst_data):
+ def __init__(self, tst_data, microwatt_mmu=False):
super().__init__("run_all")
self.test_data = tst_data
+ self.microwatt_mmu = microwatt_mmu
def run_all(self):
m = Module()
nocore=False,
xics=False,
gpio=False,
+ mmu=self.microwatt_mmu,
reg_wid=64)
m.submodules.issuer = issuer = TestIssuerInternal(pspec)
imem = issuer.imem._get_memory()
(test.name, int_reg, value))
sim.add_sync_process(process)
- with sim.write_vcd("issuer_simulator.vcd",
+ with sim.write_vcd("issuer_simulator.vcd","issuer_simulator.gtkw",
traces=[]):
sim.run()