X-Git-Url: http://git.joshuawise.com/fpgaboy.git/blobdiff_plain/5509558d05f30339f3393f02f67e8854cbe25a00..77ab69d7bb0902e6ebf0994159ed2205f8413e34:/insn_vop_intr.v diff --git a/insn_vop_intr.v b/insn_vop_intr.v index 06218f4..ce0bcf8 100644 --- a/insn_vop_intr.v +++ b/insn_vop_intr.v @@ -1,9 +1,12 @@ `ifdef EXECUTE `INSN_VOP_INTR: begin case (cycle) - 0: `EXEC_WRITE(`_SP - 1, `_PCH); - 1: `EXEC_WRITE(`_SP - 2, `_PCL); - 2: `EXEC_NEWCYCLE; + 0: `EXEC_WRITE(`_SP - 1, `_PCH) + 1: `EXEC_WRITE(`_SP - 2, `_PCL) + 2: begin + irqack <= 1; + `EXEC_NEWCYCLE + end endcase end `endif @@ -16,6 +19,7 @@ 2: begin ie <= 0; `_PC <= {8'b0, jaddr}; + irqack <= 0; // Must be at the same time as we latch jaddr, or we race! `_SP <= `_SP - 2; end endcase