]> Joshua Wise's Git repositories - fpgaboy.git/blobdiff - core/insn_add_sp_imm8.v
Ethernet TX support
[fpgaboy.git] / core / insn_add_sp_imm8.v
index 3350bdc5f18c3bb07f082f934799e5dd9dd651d3..ff5da37c3d760b9a7c9fe101f3bf78edca6e3561 100644 (file)
 `ifdef WRITEBACK
        `INSN_ADD_SP_IMM8: begin
                case (cycle)
-               2:      `_SP <= `_SP + {rdata[7] ? 8'hFF : 8'h00, rdata};
+               2:      begin
+                               `_SP <= `_SP + {rdata[7] ? 8'hFF : 8'h00, rdata};
+                               `_F <= {
+                                       2'b00,
+                                       (({1'b0,`_SPL[3:0]} + {1'b0,rdata[3:0]}) & 5'h10) ? 1'b1 : 1'b0,
+                                       (({1'b0,`_SPL} + {1'b0,rdata}) & 9'h100) ? 1'b1 : 1'b0,
+                                       `_F[3:0]
+                                       };
+                       end
                endcase
        end
 `endif
This page took 0.027642 seconds and 4 git commands to generate.