print("=== alignment error ===")
addr = 0xFF100e0FF
ld_data = yield from pi_ld(pi, addr, 8, msr_pr=1)
- yield #wait one cycle
+ alignment = yield pi.exc_o.alignment
+ happened = yield pi.exc_o.happened
dar = yield pi.dar_o
- #assert(reason==alignment)
+ assert(happened==1)
+ assert(alignment==1)
assert(dar==addr)
print("=== alignment error test passed ===")
# a request when MMU_LOOKUP completes.
m.d.comb += self.d_validblip.eq(rising_edge(m, self.d_valid))
ldst_r = LDSTRequest("ldst_r")
-
comb += Display("MMUTEST: LoadStore1 d_in.error=%i",d_in.error)
# fsm skeleton
# instruction lookup fault: store address in DAR
comb += exc.happened.eq(1) # reason = MMU_LOOKUP
# mark dar as updated ?
- sync += self.pi.dar_o.eq(self.addr)
+ comb += self.pi.dar_o.eq(self.addr)
with m.If(m_in.err):
# MMU RADIX exception thrown
with m.If(self.align_intr):
comb += exc.happened.eq(1) # reason = alignment
sync += Display("alignment error: store addr in DAR %x", self.addr)
- sync += self.pi.dar_o.eq(self.addr)
- # TODO report reason
+ comb += self.pi.dar_o.eq(self.addr)
# happened, alignment, instr_fault, invalid.
# note that all of these flow through - eventually to the TRAP