summaryrefslogtreecommitdiff
path: root/tests/asicworld/code_hdl_models_mux_2to1_gates.v
blob: fc762159d52be6db450cc082fd09c06c5a189382 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
//-----------------------------------------------------
// Design Name : mux_2to1_gates
// File Name   : mux_2to1_gates.v
// Function    : 2:1 Mux using Gate Primitives
// Coder       : Deepak Kumar Tala
//-----------------------------------------------------
module mux_2to1_gates(a,b,sel,y);
input a,b,sel;
output y;

wire sel,a_sel,b_sel;

not U_inv (inv_sel,sel);
and U_anda (asel,a,inv_sel),
    U_andb (bsel,b,sel);
or U_or (y,asel,bsel);

endmodule