From 17f5cbe781ae761d86d55fec7d46ba3172167894 Mon Sep 17 00:00:00 2001 From: Bobby Bingham Date: Sun, 8 Jan 2017 21:58:16 -0600 Subject: Add carry input to ALU --- decoder.v | 3 +++ 1 file changed, 3 insertions(+) (limited to 'decoder.v') diff --git a/decoder.v b/decoder.v index d6a1e02..3e08df3 100644 --- a/decoder.v +++ b/decoder.v @@ -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 : -- cgit v1.2.3