1 //-----------------------------------------------------
2 // Design Name : mux_using_if
3 // File Name : mux_using_if.v
4 // Function : 2:1 Mux using If
5 // Coder : Deepak Kumar Tala
6 //-----------------------------------------------------
8 din_0 , // Mux first input
9 din_1 , // Mux Second input
13 //-----------Input Ports---------------
14 input din_0, din_1, sel ;
15 //-----------Output Ports---------------
17 //------------Internal Variables--------
19 //-------------Code Starts Here---------
20 always @ (sel or din_0 or din_1)
22 if (sel == 1'b0) begin
29 endmodule //End Of Module mux