// File name : mux // OUT = A if select==1; OUT=B if select==0. module mux(select,A,B,OUT) ; // multiplexer parameter LENGTH=5; //length of the multiplexer input select; input [LENGTH:1] A,B; output [LENGTH:1] OUT; //DISPLAY = {G,F,E,D,C,B,A} of a 7-segment display; assign OUT = (select)?A:B; endmodule