comb += e.input_cr.eq(op.cr_in) # condition reg comes in
comb += e.output_cr.eq(op.cr_out) # condition reg goes in
+ # set the trapaddr to 0x700 for a td/tw/tdi/twi operation
+ with m.If(op.internal_op == InternalOp.OP_TRAP):
+ comb += e.trapaddr.eq(0x70) # addr=0x700 (strip first nibble)
+
return m
# privileged instruction