OpenCores
URL https://opencores.org/ocsvn/or1k/or1k/trunk

Subversion Repositories or1k

[/] [or1k/] [branches/] [mp3_stable/] [mp3/] [lib/] [xilinx/] [unisims/] [BUFGMUX_1.v] - Blame information for rev 1765

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 266 lampret
// $Header: /home/marcus/revision_ctrl_test/oc_cvs/cvs/or1k/mp3/lib/xilinx/unisims/BUFGMUX_1.v,v 1.1.1.1 2001-11-04 18:59:46 lampret Exp $
2
 
3
/*
4
 
5
FUNCTION        : Global Clock Mux Buffer
6
 
7
*/
8
 
9
`timescale  100 ps / 10 ps
10
 
11
module BUFGMUX_1 (O, I0, I1, S);
12
 
13
    parameter cds_action = "ignore";
14
 
15
    output O;
16
 
17
    input  I0, I1, S;
18
 
19
    reg q0, q1;
20
    reg q0_enable, q1_enable;
21
 
22
    tri0 GSR = glbl.GSR;
23
 
24
    bufif1 B0 (O, I0, q0);
25
    bufif1 B1 (O, I1, q1);
26
    pullup P1 (O);
27
 
28
        always @(GSR or I0 or S or q0_enable)
29
            if (GSR)
30
                q0 <= 1;
31
            else if (I0)
32
                q0 <= !S && q0_enable;
33
 
34
        always @(GSR or I1 or S or q1_enable)
35
            if (GSR)
36
                q1 <= 0;
37
            else if (I1)
38
                q1 <= S && q1_enable;
39
 
40
        always @(GSR)
41
            if (GSR) begin
42
                assign q0_enable = 1;
43
                assign q1_enable = 0;
44
            end
45
            else begin
46
                deassign q0_enable;
47
                deassign q1_enable;
48
            end
49
 
50
        always @(posedge q1 or posedge I0)
51
            if (q1)
52
                q0_enable <= 0;
53
            else
54
                q0_enable <= !q1;
55
 
56
        always @(posedge q0 or posedge I1)
57
            if (q0)
58
                q1_enable <= 0;
59
            else
60
                q1_enable <= !q0;
61
 
62
    specify
63
    endspecify
64
 
65
endmodule

powered by: WebSVN 2.1.0

© copyright 1999-2024 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.