2023-10-21 13:57:58 +00:00
|
|
|
module mux4_1 #(parameter BUS_SIZE = 32)
|
2023-10-23 05:15:21 +00:00
|
|
|
(input [BUS_SIZE - 1:0] in_1, in_2, in_3, in_4,
|
|
|
|
input [1:0] sel,
|
|
|
|
output [BUS_SIZE - 1:0] out);
|
2023-10-20 09:48:18 +00:00
|
|
|
|
2023-10-23 05:15:21 +00:00
|
|
|
assign out = sel[1] ? (sel[0] ? in_4 : in_3)
|
|
|
|
: (sel[0] ? in_2 : in_1);
|
2023-10-20 09:48:18 +00:00
|
|
|
|
|
|
|
endmodule
|