Commit 9c7640bc authored by Noémie Fong's avatar Noémie Fong
Browse files

Simplify some branches of mux tree

parent 77d01ef8
......@@ -19,16 +19,9 @@ ALU(input1:[32], input2:[32], alu_control:[4], alu_op:[3], use_shamt,
), (*TODO*)
mux(alu_control[1], (* Case logical shift *) (*TODO : optimiser use_shamt ?*)
mux(alu_control[3], (* If 1 then arith shift right, else shift right*)
mux(use_shamt,
shift_by_shamt_ALU(input1, shamt, 1, 1),
shift:_by_reg_ALU(input1, input2, 1, 1)
),
mux(use_shamt,
shift_by_shamt_ALU(input1, shamt, 1, 0),
shift_by_reg_ALU(input1, input2, 1, 0)
)
mux(use_shamt,
shift_by_shamt_ALU(input1, shamt, 1, alu_control[3]),
shift:_by_reg_ALU(input1, input2, 1, alu_control[3])
),
mux(use_shamt, (* Case logical shift left *)
......@@ -38,7 +31,7 @@ ALU(input1:[32], input2:[32], alu_control:[4], alu_op:[3], use_shamt,
)
),
mux(alu_control[1], (*if 1 then logical else airhtmetical *)
mux(alu_control[1], (*if 1 then logical else arihtmetical *)
mux(alu_control[2],
mux(alu_control[3],
xor_ALU(input1, input2),
......@@ -58,16 +51,13 @@ ALU(input1:[32], input2:[32], alu_control:[4], alu_op:[3], use_shamt,
zero_n<32>()
),
mux(alu_control[3],
add_ALU(input1, input2, 1),
add_ALU(input1, input2, 0)
)
add_ALU(input1, input2, alu_control[3]),
)
)
)
),
),
(*TODO : opérations pas format R *)
zero_n<32>()
);
);
alu_zero = equal_zero_n<32>(result);
end where
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