for each unit test case in test_issuer_mmu_data_path.py initialise memory
[soc.git] / src / soc / simple / issuer.py
index 4629c4ed5f0bb896977c22e08e4c1ee28509b6b9..15642018b0e459836ae809e24ed1edc96a189af8 100644 (file)
@@ -800,7 +800,11 @@ class FetchFSM(ControlBase):
                     comb += self.imem.f_i_valid.eq(1)
                 with m.Else():
                     # not busy: instruction fetched
-                    insn = get_insn(self.imem.f_instr_o, cur_state.pc+4)
+                    if hasattr(core, "icache"):
+                        # blech, icache returns actual instruction
+                        insn = self.imem.f_instr_o
+                    else:
+                        insn = get_insn(self.imem.f_instr_o, cur_state.pc+4)
                     sync += dec_opcode_o.eq(insn)
                     m.next = "INSN_READY"
                     # TODO: probably can start looking at pdecode2.rm_dec