Commit 7152b51e authored by Daru13's avatar Daru13
Browse files

Fixed use_shamt flag for bitshift operations using only registers

parent c79a36ff
......@@ -140,9 +140,10 @@ ALU_control(funct:[6], op:[3]) = (alu_op:[4], use_shamt) where
alu_op = alu_op_1 . alu_op_2 . alu_op_3 . alu_op_4;
(* use_shamt à 1 => seconde entrée de l'ALU égale aux bits de shamt décalés
Vrai pour toute opération de décalage (toujours au format R) *)
use_shamt = equal_zero_n<3>(funct[0..2])
and ( (equal_zero_n<3>(funct[3..5]) and equal_zero_n<3>(op))
or (funct[3] or funct[4] or funct[5]));
Vrai pour trois opérations de décalage (toujours au format R) *)
use_shamt = equal_zero_n<3>(op)
and equal_zero_n<4>(funct[0..3]);
(*) and ( (equal_zero_n<3>(funct[3..5]) and equal_zero_n<3>(op))
or (funct[3] or funct[4] or funct[5])); *)
end where
......@@ -27,15 +27,15 @@
0001
0
1000
1
0
1000
1
1100
1
0
1100
1
1101
1
0
1101
1
0000
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment