]> git.gag.com Git - debian/gnuradio/blob - usrp2/fpga/eth/rtl/verilog/TECH/xilinx/BUFGMUX.v
Copied wb_1master back from quad radio
[debian/gnuradio] / usrp2 / fpga / eth / rtl / verilog / TECH / xilinx / BUFGMUX.v
1 // $Header: /devl/xcs/repo/env/Databases/CAEInterfaces/verunilibs/data/unisims/BUFGMUX.v,v 1.9.34.2 2005/10/21 20:45:30 wloo Exp $
2 ///////////////////////////////////////////////////////////////////////////////
3 // Copyright (c) 1995/2004 Xilinx, Inc.
4 // All Right Reserved.
5 ///////////////////////////////////////////////////////////////////////////////
6 //   ____  ____
7 //  /   /\/   /
8 // /___/  \  /    Vendor : Xilinx
9 // \   \   \/     Version : 7.1i (H.19)
10 //  \   \         Description : Xilinx Functional Simulation Library Component
11 //  /   /                  Global Clock Mux Buffer with Output State 0
12 // /___/   /\     Filename : BUFGMUX.v
13 // \   \  /  \    Timestamp : Thu Mar 25 16:42:14 PST 2004
14 //  \___\/\___\
15 //
16 // Revision:
17 //    03/23/04 - Initial version.
18
19 `timescale  100 ps / 10 ps
20
21 module BUFGMUX (O, I0, I1, S);
22
23     output O;
24
25     input  I0, I1, S;
26
27     reg q0, q1;
28     reg q0_enable, q1_enable;
29
30     tri0 GSR = glbl.GSR;
31
32     bufif1 B0 (O, I0, q0);
33     bufif1 B1 (O, I1, q1);
34     pulldown P1 (O);
35
36         always @(GSR or I0 or S or q0_enable)
37             if (GSR)
38                 q0 <= 1;
39             else if (!I0)
40                 q0 <= !S && q0_enable;
41
42         always @(GSR or I1 or S or q1_enable)
43             if (GSR)
44                 q1 <= 0;
45             else if (!I1)
46                 q1 <= S && q1_enable;
47
48         always @(GSR or q1 or I0)
49             if (GSR)
50                 q0_enable <= 1;
51             else if (q1)
52                 q0_enable <= 0;
53             else if (I0)
54                 q0_enable <= !q1;
55
56         always @(GSR or q0 or I1)
57             if (GSR)
58                 q1_enable <= 0;
59             else if (q0)
60                 q1_enable <= 0;
61             else if (I1)
62                 q1_enable <= !q0;
63
64 endmodule