RISC-V_Verilog/rtl/mux4_1.v

10 lines
311 B
Coq
Raw Permalink Normal View History

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-23 05:15:21 +00:00
assign out = sel[1] ? (sel[0] ? in_4 : in_3)
: (sel[0] ? in_2 : in_1);
endmodule