+ # check for updating DAR
+ with m.If(exception):
+ sync += Display("exception %x", self.addr)
+ # alignment error: store address in DAR
+ with m.If(self.align_intr):
+ sync += Display("alignment error: addr in DAR %x", self.addr)
+ sync += self.dar.eq(self.addr)
+ with m.Elif(~self.instr_fault):
+ sync += Display("not instr fault, addr in DAR %x", self.addr)
+ sync += self.dar.eq(self.addr)
+
+ # when done or exception, return to idle state
+ with m.If(self.done | exception):
+ sync += self.state.eq(State.IDLE)
+ comb += self.busy.eq(0)