summaryrefslogtreecommitdiff
path: root/ctrl_encode.v
diff options
context:
space:
mode:
authorBobby Bingham <koorogi@koorogi.info>2017-01-08 21:58:16 -0600
committerBobby Bingham <koorogi@koorogi.info>2017-01-08 23:18:31 -0600
commit17f5cbe781ae761d86d55fec7d46ba3172167894 (patch)
treeb02d0dc075eb94a56cccd49a471e852a6799c266 /ctrl_encode.v
parent47cfb7ba2df247310e2160e4e53d1843d4e4d1c8 (diff)
Add carry input to ALU
Diffstat (limited to 'ctrl_encode.v')
-rw-r--r--ctrl_encode.v4
1 files changed, 3 insertions, 1 deletions
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,