# address: use sync to avoid long latency
sync += pi.addr.data.eq(addr_r) # EA from adder
with m.If(op_is_dcbz):
- sync += Display("DCBZ: EA from adder %i",addr_r)
+ sync += Display("MMUTEST.DCBZ: EA from adder %i",addr_r)
sync += pi.addr.ok.eq(alu_ok & lsd_l.q) # "do address stuff" (once)
comb += self.exc_o.eq(pi.exc_o) # exception occurred
with m.Switch(op.insn_type):
with m.Case(MicrOp.OP_MTSPR):
+ comb += Display("MMUTEST: OP_MTSPR: spr=%i",spr);
# despite redirection this FU **MUST** behave exactly
# like the SPR FU. this **INCLUDES** updating the SPR
# regfile because the CSV file entry for OP_MTSPR
comb += done.eq(1) # FIXME l_out.done
with m.Case(MicrOp.OP_MFSPR):
+ comb += Display("MMUTEST: OP_MFSPR: spr=%i",spr);
comb += o.data.eq(spr1_i)
comb += o.ok.eq(1)
comb += done.eq(1)
with m.Case(MicrOp.OP_TLBIE):
+ comb += Display("MMUTEST: OP_TLBIE: insn_bits=%i",spr);
# pass TLBIE request to MMU (spec: v3.0B p1034)
# note that the spr is *not* an actual spr number, it's
# just that those bits happen to match with field bits
# step and comparison.
from soc.simple.test.test_runner import TestRunner
+#@platen:bookmarks
+#src/openpower/test/runner.py:class TestRunnerBase(FHDLTestCase):
+
# test with MMU
from openpower.test.mmu.mmu_cases import MMUTestCase
from openpower.test.mmu.mmu_rom_cases import MMUTestCaseROM, default_mem
class MMUTestCase(TestAccumulatorBase):
+ # now working correctly
def case_1_dcbz(self):
- lst = ["dcbz 1, 2",
- "dcbz 1, 3"]
+ lst = ["dcbz 1, 2", # MMUTEST.DCBZ: EA from adder 12
+ "dcbz 1, 3"] # MMUTEST.DCBZ: EA from adder 11
initial_regs = [0] * 32
initial_regs[1] = 0x0004
initial_regs[2] = 0x0008
self.add_case(Program(lst, bigendian), initial_regs,
initial_mem=initial_mem)
+ # MMUTEST: OP_TLBIE: insn_bits=39
def case_2_tlbie(self):
lst = ["tlbie 1,1,1,1,1"] # tlbie RB,RS,RIC,PRS,R
initial_regs = [0] * 32
self.add_case(Program(lst, bigendian), initial_regs,
initial_mem=initial_mem)
+ # BROKEN - missing expected Display output
def case_3_mtspr(self):
lst = ["mtspr 720,1"] # mtspr PRTBL,r1
initial_regs = [0] * 32
self.add_case(Program(lst, bigendian), initial_regs,
initial_mem=initial_mem)
+ # BROKEN - missing expected Display output
def case_4_mfspr(self):
lst = ["mfspr 1,18", # mtspr r1,DSISR
"mfspr 2,19"] # mtspr r2,DAR
# MMU/DCache integration tests
suite.addTest(TestRunner(MMUTestCase().test_data, svp64=svp64,
- microwatt_mmu=False))
+ microwatt_mmu=True))
runner = unittest.TextTestRunner()
runner.run(suite)