diff options
author | Bobby Bingham <koorogi@koorogi.info> | 2017-01-08 21:58:16 -0600 |
---|---|---|
committer | Bobby Bingham <koorogi@koorogi.info> | 2017-01-08 23:18:31 -0600 |
commit | 17f5cbe781ae761d86d55fec7d46ba3172167894 (patch) | |
tree | b02d0dc075eb94a56cccd49a471e852a6799c266 /decoder.v | |
parent | 47cfb7ba2df247310e2160e4e53d1843d4e4d1c8 (diff) |
Add carry input to ALU
Diffstat (limited to 'decoder.v')
-rw-r--r-- | decoder.v | 3 |
1 files changed, 3 insertions, 0 deletions
@@ -7,6 +7,7 @@ module decoder ( output [1:0] aluOpSource1, // ALU first operand: 0 = reg, 1 = memory read, 2 = imm8, 3 = PC output [1:0] aluOpSource2, // ALU second operand: 0 = reg, 1 = ~reg, 2 = PC, 3 = ??? output aluDest, // 0 = reg, 1 = PC + output [1:0] aluCarrySource, // ALU carry input source: 0 = zero, 1 = one, 2 = carry, 3 = ~carry output [2:0] regDest, output regSetH, @@ -216,6 +217,8 @@ module decoder ( assign regDest = reg0; + assign aluCarrySource = 2'h0; + assign regSetH = instr_mov ? (mov_word | mov_dest_byte_high) : instr_movimm ? movimm_high : |