]> Joshua Wise's Git repositories - fpgaboy.git/blame_incremental - insn_alu_a.v
Rework it all to use the new macros.
[fpgaboy.git] / insn_alu_a.v
... / ...
CommitLineData
1`ifdef EXECUTE
2 `INSN_ALU_A: begin
3 `EXEC_NEWCYCLE
4 `EXEC_INC_PC
5 end
6`endif
7
8`ifdef WRITEBACK
9 `INSN_ALU_A: begin
10 case(opcode[5:3])
11 `INSN_alu_RLCA: begin
12 `_A <= {`_A[6:0],`_A[7]};
13 `_F <= {`_F[7:5],`_A[7],`_F[3:0]};
14 end
15 `INSN_alu_RRCA: begin
16 `_A <= {`_A[0],`_A[7:1]};
17 `_F <= {`_F[7:5],`_A[0],`_F[3:0]};
18 end
19 `INSN_alu_RLA: begin
20 `_A <= {`_A[6:0],`_F[4]};
21 `_F <= {`_F[7:5],`_A[7],`_F[3:0]};
22 end
23 `INSN_alu_RRA: begin
24 `_A <= {`_A[4],`_A[7:1]};
25 `_F <= {`_F[7:5],`_A[0],`_F[3:0]};
26 end
27 `INSN_alu_CPL: begin
28 `_A <= ~`_A;
29 `_F <= {`_F[7],1'b1,1'b1,`_F[4:0]};
30 end
31 `INSN_alu_SCF: begin
32 `_F <= {`_F[7:5],1'b1,`_F[3:0]};
33 end
34 `INSN_alu_CCF: begin
35 `_F <= {`_F[7:5],~`_F[4],`_F[3:0]};
36 end
37 endcase
38 end
39`endif
This page took 0.025001 seconds and 4 git commands to generate.