X-Git-Url: http://git.joshuawise.com/fpgaboy.git/blobdiff_plain/b057a5d6e6db6db06ae33703ca72cd235eec91d6..refs/heads/master:/core/insn_alu8.v?ds=sidebyside diff --git a/core/insn_alu8.v b/core/insn_alu8.v index 2921b18..26fc77e 100644 --- a/core/insn_alu8.v +++ b/core/insn_alu8.v @@ -1,3 +1,6 @@ +`define INSN_ALU8 9'b010xxxxxx // 10 xxx yyy +`define INSN_ALU8IMM 9'b011xxx110 + `ifdef EXECUTE `INSN_ALU8,`INSN_ALU8IMM: begin if ((opcode[7:6] == 2'b11) && (cycle == 0)) begin // alu8imm @@ -66,21 +69,21 @@ end `INSN_alu_AND: begin `_A <= `_A & tmp; - `_F <= { /* Z */ ((`_A & tmp) == 0) ? 1'b1 : 1'b0, + `_F <= { /* Z */ ((`_A & tmp) == 8'b0) ? 1'b1 : 1'b0, 3'b010, `_F[3:0] }; end `INSN_alu_OR: begin `_A <= `_A | tmp; - `_F <= { /* Z */ ((`_A | tmp) == 0) ? 1'b1 : 1'b0, + `_F <= { /* Z */ ((`_A | tmp) == 8'b0) ? 1'b1 : 1'b0, 3'b000, `_F[3:0] }; end `INSN_alu_XOR: begin `_A <= `_A ^ tmp; - `_F <= { /* Z */ ((`_A ^ tmp) == 0) ? 1'b1 : 1'b0, + `_F <= { /* Z */ ((`_A ^ tmp) == 8'b0) ? 1'b1 : 1'b0, 3'b000, `_F[3:0] };