forked from DinaMMF/Graduation-Project
-
Notifications
You must be signed in to change notification settings - Fork 0
/
operands_mux.v
34 lines (30 loc) · 959 Bytes
/
operands_mux.v
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
`default_nettype none
module operands_mux(
input wire fpu_simd ,
input wire [31:0] simd_operand_a ,
input wire [31:0] simd_operand_b ,
input wire [31:0] simd_operand_c ,
input wire [31:0] fpu_operand_a_hci ,
input wire [31:0] fpu_operand_b_hci ,
input wire [31:0] fpu_operand_c_hci ,
output reg [31:0] fpu_operand_a ,
output reg [31:0] fpu_operand_b ,
output reg [31:0] fpu_operand_c
);
always @ (*)
begin
case(fpu_simd)
1'b1 : begin
fpu_operand_a = simd_operand_a ;
fpu_operand_b = simd_operand_b ;
fpu_operand_c = simd_operand_c ;
end
1'b0 : begin
fpu_operand_a = fpu_operand_a_hci ;
fpu_operand_b = fpu_operand_b_hci ;
fpu_operand_c = fpu_operand_c_hci ;
end
endcase
end
endmodule
`resetall