from soc.simple.core import NonProductionCore
from soc.experiment.compalu_multi import find_ok # hack
-from soc.fu.compunits.test.test_compunit import (setup_test_memory,
+from soc.fu.compunits.test.test_compunit import (setup_tst_memory,
check_sim_memory)
# test with ALU data and Logical data
mmu_sprs = ["PRTBL", "DSISR", "DAR", "PIDR"]
def set_mmu_spr(name, i, val, core): #important keep pep8 formatting
- fsm = core.fus.fus["mmu0"].alu
+ fsm = core.fus.get_fu("mmu0").alu
yield fsm.mmu.l_in.mtspr.eq(1)
yield fsm.mmu.l_in.sprn.eq(i)
yield fsm.mmu.l_in.rs.eq(val)
m = Module()
comb = m.d.comb
instruction = Signal(32)
- ivalid_i = Signal()
+ ii_valid = Signal()
pspec = TestMemPspec(ldst_ifacetype='testpi',
imem_ifacetype='',
l0 = core.l0
comb += core.raw_opcode_i.eq(instruction)
- comb += core.ivalid_i.eq(ivalid_i)
+ comb += core.ii_valid.eq(ii_valid)
# temporary hack: says "go" immediately for both address gen and ST
ldst = core.fus.fus['ldst0']
gen = program.generate_instructions()
instructions = list(zip(gen, program.assembly.splitlines()))
- yield from setup_test_memory(l0, sim)
+ yield from setup_tst_memory(l0, sim)
yield from setup_regs(core, test)
index = sim.pc.CIA.value//4
# ask the decoder to decode this binary data (endian'd)
yield core.bigendian_i.eq(bigendian) # little / big?
yield instruction.eq(ins) # raw binary instr.
- yield ivalid_i.eq(1)
+ yield ii_valid.eq(1)
yield Settle()
# fn_unit = yield pdecode2.e.fn_unit
#fuval = self.funit.value
yield Settle()
yield from wait_for_busy_clear(core)
- yield ivalid_i.eq(0)
+ yield ii_valid.eq(0)
yield
print("sim", code)