summaryrefslogtreecommitdiff
path: root/decoder_stage.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 /decoder_stage.v
parent47cfb7ba2df247310e2160e4e53d1843d4e4d1c8 (diff)
Add carry input to ALU
Diffstat (limited to 'decoder_stage.v')
-rw-r--r--decoder_stage.v7
1 files changed, 5 insertions, 2 deletions
diff --git a/decoder_stage.v b/decoder_stage.v
index fcc7d60..fa2721e 100644
--- a/decoder_stage.v
+++ b/decoder_stage.v
@@ -5,7 +5,7 @@ module decoder_stage (
input [15:0] instr_in,
input [15:0] pc_in,
- output reg [32:0] control_signals_out,
+ output reg [34:0] control_signals_out,
output reg [15:0] imm_out,
output reg [15:0] pc_out
);
@@ -16,6 +16,7 @@ module decoder_stage (
wire [1:0] aluOpSource1_next;
wire [1:0] aluOpSource2_next;
wire aluDest_next;
+ wire [1:0] aluCarrySource_next;
wire [2:0] regDest_next;
wire regSetH_next;
wire regSetL_next;
@@ -35,6 +36,7 @@ module decoder_stage (
.aluOpSource1(aluOpSource1_next),
.aluOpSource2(aluOpSource2_next),
.aluDest(aluDest_next),
+ .aluCarrySource(aluCarrySource_next),
.regDest(regDest_next),
.regSetH(regSetH_next),
.regSetL(regSetL_next),
@@ -47,7 +49,7 @@ module decoder_stage (
.imm(imm_next)
);
- wire [32:0] control_signals_next;
+ wire [34:0] control_signals_next;
ctrl_encode encode_inst (
.aluOp(aluOp_next),
@@ -56,6 +58,7 @@ module decoder_stage (
.aluOpSource1(aluOpSource1_next),
.aluOpSource2(aluOpSource2_next),
.aluDest(aluDest_next),
+ .aluCarrySource(aluCarrySource_next),
.regDest(regDest_next),
.regSetH(regSetH_next),
.regSetL(regSetL_next),