forked from oliverbunting/verilator-unisims
-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathLDC.v
54 lines (43 loc) · 1.42 KB
/
LDC.v
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
// $Header: /devl/xcs/repo/env/Databases/CAEInterfaces/verunilibs/data/unisims/LDC.v,v 1.12 2006/04/10 20:46:00 yanx Exp $
///////////////////////////////////////////////////////////////////////////////
// Copyright (c) 1995/2004 Xilinx, Inc.
// All Right Reserved.
///////////////////////////////////////////////////////////////////////////////
// ____ ____
// / /\/ /
// /___/ \ / Vendor : Xilinx
// \ \ \/ Version : 10.1
// \ \ Description : Xilinx Functional Simulation Library Component
// / / Transparent Data Latch with Asynchronous Clear
// /___/ /\ Filename : LDC.v
// \ \ / \ Timestamp : Thu Mar 25 16:42:52 PST 2004
// \___\/\___\
//
// Revision:
// 03/23/04 - Initial version.
// 02/04/05 - Rev 0.0.1 Remove input/output bufs; Seperate GSR from clock block.
// 08/09/05 - Add GSR to main block (CR 215196).
// 03/31/06 - Add specify block for 100ps delay. (CR 228298)
// End Revision
`timescale 1 ps / 1 ps
module LDC (Q, CLR, D, G);
parameter INIT = 1'b0;
output Q;
wire Q;
input CLR, D, G;
reg q_out;
initial q_out = INIT;
assign Q = q_out;
always @(CLR or D or G)
if (CLR)
q_out = 0;
else if (G)
q_out = D;
specify
if (!CLR && G)
(D +=> Q) = (100, 100);
if (!CLR)
(posedge G => (Q +: D)) = (100, 100);
(posedge CLR => (Q +: 1'b0)) = (0, 0);
endspecify
endmodule