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_stage.v | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'decoder_stage.v') 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), -- cgit v1.2.3