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 --- ctrl_encode.v | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'ctrl_encode.v') diff --git a/ctrl_encode.v b/ctrl_encode.v index d76f34f..92ad3c6 100644 --- a/ctrl_encode.v +++ b/ctrl_encode.v @@ -5,6 +5,7 @@ module ctrl_encode ( input [1:0] aluOpSource1, // ALU first operand: 0 = reg, 1 = memory read, 2 = imm8, 3 = PC input [1:0] aluOpSource2, // ALU second operand: 0 = reg, 1 = ~reg, 2 = PC, 3 = ??? input aluDest, // 0 = reg, 1 = PC + input [1:0] aluCarrySource, // ALU carry flag input source input [2:0] regDest, input regSetH, @@ -18,7 +19,7 @@ module ctrl_encode ( input [5:0] setRegCond, // {should set when condition is true, Z doesn't matter, S doesn't matter, Z must be this, S must be this} - output [32:0] control_signals + output [34:0] control_signals ); assign control_signals = { @@ -28,6 +29,7 @@ module ctrl_encode ( aluOpSource1, aluOpSource2, aluDest, + aluCarrySource, regDest, regSetH, regSetL, -- cgit v1.2.3