add sc back in
authorLuke Kenneth Casson Leighton <lkcl@lkcl.net>
Sat, 4 Jul 2020 21:35:19 +0000 (22:35 +0100)
committerLuke Kenneth Casson Leighton <lkcl@lkcl.net>
Sat, 4 Jul 2020 21:35:19 +0000 (22:35 +0100)
src/soc/fu/trap/main_stage.py

index fa29c94d77167a3cb2a31362c2e1eeb0f71b5ebc..0737ced8f2621813de59b934cb2b4bbda323c2e8 100644 (file)
@@ -193,13 +193,13 @@ class TrapMainStage(PipeModBase):
                 msr_check_pr(m, msr_o.data)
                 comb += msr_o.ok.eq(1)
 
-            # TODO (later) - add OP_SC
-            #with m.Case(InternalOp.OP_SC):
-            #    # TODO: scv must generate illegal instruction.  this is
-            #    # the decoder's job, not ours, here.
-            #
-            #    # jump to the trap address, return at cia+4
-            #    self.trap(m, 0xc00, cia_i+4)
+            # OP_SC
+            with m.Case(InternalOp.OP_SC):
+                # TODO: scv must generate illegal instruction.  this is
+                # the decoder's job, not ours, here.
+
+                # jump to the trap address, return at cia+4
+                self.trap(m, 0xc00, cia_i+4)
 
             # TODO (later)
             #with m.Case(InternalOp.OP_ADDPCIS):