Commit d1a4ea4f authored by Daru13's avatar Daru13
Browse files

Finished ALU_control 4th bit output computation

parent 53594745
......@@ -103,9 +103,16 @@ ALU_control(funct:[6], op:[3]) = (alu_op:[4], use_shamt) where
or (funct[0] and funct[3] and funct[4]) (* xor, nor *)
or (op[1] and op[2]); (* xori *)
(* Bit 4 à 1 si => TODO *)
alu_op_4 = 0;
(* Bit 4 à 1 si => sub, div, or, xor, slt, srav, sra, mfhi,
ori (op = 010), xori (op = 011),
slti (op = 101), beq et bne (op = 101) *)
alu_op_4 = (funct[0] and funct[4] and (not funct[5])) (* sub, xor, slt *)
or ((not funct[0]) and funct[4 and funct[5]]) (* srav, sra *)
or (funct[1] and (not funct[2] or funct[4])) (* mfhi *)
or equal_n<6>(instruction, 0.1.1.0.1.0) (* div *)
or equal_n<6>(instruction, 1.0.0.1.0.1) (* or *)
or (op[0] and op[2]) (* op forcée : slti, beq, bne (101) *)
or (not(op[0]) and op[1]); (* op forcée : ori, xori (01x) *)
alu_op = alu_op_1 . alu_op_2 . alu_op_3 . alu_op_4;
......
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