// Howdy 👋.
//
// If you are new to writing code in Flux make sure to check out our get started docs: https://docs.flux.ai/reference/introduction
//
// We also have a Flux Slack Community in case you need help: https://join.slack.com/t/fluxcommunity/shared_invite/zt-p48n941f-wzQ06kGmuFJ2HXnGYT1JkA
//
// To infinity and beyond 🚀
module mux4to1 (
input wire[3: 0]D, // Entradas de datos
input wire[1: 0]S, // Líneas de selección
output reg Y // Salida
);
always @(*) begin
case (S)
2'b00: Y = D[0];
2'b01: Y = D[1];
2'b10: Y = D[2];
2'b11: Y = D[3];
default: Y = 1'b0;
endcase
end
endmodule