summaryrefslogtreecommitdiff
path: root/decoder.v
diff options
context:
space:
mode:
Diffstat (limited to 'decoder.v')
-rw-r--r--decoder.v3
1 files changed, 3 insertions, 0 deletions
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 :