Page 1 of 1

Behavioral modelling of 2-1 line Multiplexer in Verilog

Posted: Sat Nov 14, 2009 9:02 pm
by Magneto
//Behavioral description of 2-to-1-line multiplexer
module mux2x1_bh(A,B,select,OUT);
input A,B,select;
output OUT;
reg OUT;
always @ (select or A or B)
if (select == 1) OUT = A;
else OUT = B;
endmodule