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

Subversion Repositories or1k

[/] [or1k/] [tags/] [stable/] [mp3/] [lib/] [xilinx/] [unisims/] [LDPE_1.v] - Blame information for rev 392

Go to most recent revision | 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/LDPE_1.v,v 1.1.1.1 2001-11-04 18:59:48 lampret Exp $
2
 
3
/*
4
 
5
FUNCTION        : D-LATCH with async preset and gate enable
6
 
7
*/
8
 
9
`timescale  100 ps / 10 ps
10
 
11
`celldefine
12
 
13
module LDPE_1 (Q, D, G, GE, PRE);
14
 
15
    parameter cds_action = "ignore";
16
    parameter INIT = 1'b1;
17
 
18
    output Q;
19
    reg    q_out;
20
 
21
    input  D, G, GE, PRE;
22
 
23
    tri0 GSR = glbl.GSR;
24
 
25
    buf B1 (Q, q_out);
26
 
27
        always @(GSR or PRE or D or G or GE)
28
            if (GSR)
29
                q_out <= INIT;
30
            else if (PRE)
31
                q_out <= 1;
32
            else if (!G && GE)
33
                q_out <= D;
34
 
35
    specify
36
        if (!PRE && !G && GE)
37
            (D +=> Q) = (1, 1);
38
        if (!PRE && GE)
39
            (negedge G => (Q +: D)) = (1, 1);
40
        if (!PRE && !G)
41
            (posedge GE => (Q +: D)) = (1, 1);
42
        (posedge PRE => (Q +: 1'b1)) = (1, 1);
43
    endspecify
44
 
45
endmodule
46
 
47
`endcelldefine

powered by: WebSVN 2.1.0

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