whoops got Function.NONE test wrong in PowerDecode2
authorLuke Kenneth Casson Leighton <lkcl@lkcl.net>
Tue, 7 Jul 2020 15:11:40 +0000 (16:11 +0100)
committerLuke Kenneth Casson Leighton <lkcl@lkcl.net>
Tue, 7 Jul 2020 15:11:40 +0000 (16:11 +0100)
src/soc/decoder/power_decoder2.py

index 4f814cf7caa00daf11c13f941a5c69ac7014ed3d..612a44d83cbd44ec0b8d4f4f1c851ea91d52cc05 100644 (file)
@@ -588,11 +588,11 @@ class PowerDecode2(Elaboratable):
         # set up instruction, pick fn unit
         comb += e.nia.eq(0)    # XXX TODO (or remove? not sure yet)
         fu = op.function_unit
-        with m.If((fu == Function.NONE) |
-                   (op.internal_op == InternalOp.OP_ATTN)):
-            comb += do.insn_type.eq(op.internal_op)
-        with m.Else():
+        with m.If((fu == Function.NONE) &
+                   (op.internal_op != InternalOp.OP_ATTN)):
             comb += do.insn_type.eq(InternalOp.OP_ILLEGAL)
+        with m.Else():
+            comb += do.insn_type.eq(op.internal_op)
         comb += do.fn_unit.eq(fu)
 
         # registers a, b, c and out and out2 (LD/ST EA)