comment explaining why not to call self.trap in PowerDecode2
authorLuke Kenneth Casson Leighton <lkcl@lkcl.net>
Fri, 17 Jul 2020 20:50:36 +0000 (21:50 +0100)
committerLuke Kenneth Casson Leighton <lkcl@lkcl.net>
Fri, 17 Jul 2020 20:50:36 +0000 (21:50 +0100)
src/soc/decoder/power_decoder2.py

index 5abf8314d3b2a803a01d6dc40641a00e3d1232b8..323e49a7ac93dbdb06916b14f24f5413434adcad 100644 (file)
@@ -669,6 +669,8 @@ class PowerDecode2(Elaboratable):
 
         # set the trapaddr to 0x700 for a td/tw/tdi/twi operation
         with m.If(op.internal_op == MicrOp.OP_TRAP):
+            # *DO NOT* call self.trap here.  that would reset absolutely
+            # rverything including destroying read of RA and RB.
             comb += do.trapaddr.eq(0x70)    # addr=0x700 (strip first nibble)
 
         # TODO: get msr, then can do privileged instruction