fix control complexity
This commit is contained in:
parent
17b1b5f923
commit
434032f4ba
@ -27,4 +27,4 @@ module ALU #(parameter W=8)(
|
|||||||
endcase
|
endcase
|
||||||
Zero = Out == 0;
|
Zero = Out == 0;
|
||||||
end
|
end
|
||||||
endmodule
|
endmodule
|
10
RTL/Ctrl.sv
10
RTL/Ctrl.sv
@ -88,19 +88,19 @@ module Ctrl #(
|
|||||||
end
|
end
|
||||||
'b0_0100_?: begin // ADD
|
'b0_0100_?: begin // ADD
|
||||||
ALU_OP = ADD;
|
ALU_OP = ADD;
|
||||||
RaddrB = A_operand;
|
RaddrA = A_operand;
|
||||||
end
|
end
|
||||||
'b0_0101_?: begin // SUB
|
'b0_0101_?: begin // SUB
|
||||||
ALU_OP = SUB;
|
ALU_OP = SUB;
|
||||||
RaddrB = A_operand;
|
RaddrA = A_operand;
|
||||||
end
|
end
|
||||||
'b0_0110_?: begin // ORR
|
'b0_0110_?: begin // ORR
|
||||||
ALU_OP = ORR;
|
ALU_OP = ORR;
|
||||||
RaddrB = A_operand;
|
RaddrA = A_operand;
|
||||||
end
|
end
|
||||||
'b0_0111_?: begin // AND
|
'b0_0111_?: begin // AND
|
||||||
ALU_OP = AND;
|
ALU_OP = AND;
|
||||||
RaddrB = A_operand;
|
RaddrA = A_operand;
|
||||||
end
|
end
|
||||||
'b0_1000_0: begin // LSH
|
'b0_1000_0: begin // LSH
|
||||||
ALU_OP = LSH;
|
ALU_OP = LSH;
|
||||||
@ -116,7 +116,7 @@ module Ctrl #(
|
|||||||
end
|
end
|
||||||
'b0_1010_?: begin // XOR
|
'b0_1010_?: begin // XOR
|
||||||
ALU_OP = XOR;
|
ALU_OP = XOR;
|
||||||
RaddrB = A_operand;
|
RaddrA = A_operand;
|
||||||
end
|
end
|
||||||
'b0_1011_?: begin // DNE
|
'b0_1011_?: begin // DNE
|
||||||
Done_in = 'b1;
|
Done_in = 'b1;
|
||||||
|
Reference in New Issue
Block a user