From 48e0200b35493d8ac63df555f1458416d9217a37 Mon Sep 17 00:00:00 2001 From: Luke Kenneth Casson Leighton Date: Fri, 17 Jul 2020 21:50:36 +0100 Subject: [PATCH] comment explaining why not to call self.trap in PowerDecode2 --- src/soc/decoder/power_decoder2.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/soc/decoder/power_decoder2.py b/src/soc/decoder/power_decoder2.py index 5abf8314..323e49a7 100644 --- a/src/soc/decoder/power_decoder2.py +++ b/src/soc/decoder/power_decoder2.py @@ -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 -- 2.30.2