1 | //***************************************************************************** |
---|
2 | // DISCLAIMER OF LIABILITY |
---|
3 | // |
---|
4 | // This file contains proprietary and confidential information of |
---|
5 | // Xilinx, Inc. ("Xilinx"), that is distributed under a license |
---|
6 | // from Xilinx, and may be used, copied and/or disclosed only |
---|
7 | // pursuant to the terms of a valid license agreement with Xilinx. |
---|
8 | // |
---|
9 | // XILINX IS PROVIDING THIS DESIGN, CODE, OR INFORMATION |
---|
10 | // ("MATERIALS") "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER |
---|
11 | // EXPRESSED, IMPLIED, OR STATUTORY, INCLUDING WITHOUT |
---|
12 | // LIMITATION, ANY WARRANTY WITH RESPECT TO NONINFRINGEMENT, |
---|
13 | // MERCHANTABILITY OR FITNESS FOR ANY PARTICULAR PURPOSE. Xilinx |
---|
14 | // does not warrant that functions included in the Materials will |
---|
15 | // meet the requirements of Licensee, or that the operation of the |
---|
16 | // Materials will be uninterrupted or error-free, or that defects |
---|
17 | // in the Materials will be corrected. Furthermore, Xilinx does |
---|
18 | // not warrant or make any representations regarding use, or the |
---|
19 | // results of the use, of the Materials in terms of correctness, |
---|
20 | // accuracy, reliability or otherwise. |
---|
21 | // |
---|
22 | // Xilinx products are not designed or intended to be fail-safe, |
---|
23 | // or for use in any application requiring fail-safe performance, |
---|
24 | // such as life-support or safety devices or systems, Class III |
---|
25 | // medical devices, nuclear facilities, applications related to |
---|
26 | // the deployment of airbags, or any other applications that could |
---|
27 | // lead to death, personal injury or severe property or |
---|
28 | // environmental damage (individually and collectively, "critical |
---|
29 | // applications"). Customer assumes the sole risk and liability |
---|
30 | // of any use of Xilinx products in critical applications, |
---|
31 | // subject only to applicable laws and regulations governing |
---|
32 | // limitations on product liability. |
---|
33 | // |
---|
34 | // Copyright 2007, 2008 Xilinx, Inc. |
---|
35 | // All rights reserved. |
---|
36 | // |
---|
37 | // This disclaimer and copyright notice must be retained as part |
---|
38 | // of this file at all times. |
---|
39 | //***************************************************************************** |
---|
40 | // ____ ____ |
---|
41 | // / /\/ / |
---|
42 | // /___/ \ / Vendor : Xilinx |
---|
43 | // \ \ \/ Version : 3.6 |
---|
44 | // \ \ Application : MIG |
---|
45 | // / / Filename : wiredly.v |
---|
46 | // /___/ /\ Date Last Modified : $Date: 2010/06/29 12:03:42 $ |
---|
47 | // \ \ / \ Date Created : Thu Feb 21 2008 |
---|
48 | // \___\/\___\ |
---|
49 | // |
---|
50 | // Device : Virtex-5 |
---|
51 | // Design Name : DDR2 |
---|
52 | // Description: This module provide |
---|
53 | // the definition of a zero ohm component (A, B). |
---|
54 | // |
---|
55 | // The applications of this component include: |
---|
56 | // . Normal operation of a jumper wire (data flowing in both directions) |
---|
57 | // |
---|
58 | // The component consists of 2 ports: |
---|
59 | // . Port A: One side of the pass-through switch |
---|
60 | // . Port B: The other side of the pass-through switch |
---|
61 | |
---|
62 | // The model is sensitive to transactions on all ports. Once a |
---|
63 | // transaction is detected, all other transactions are ignored |
---|
64 | // for that simulation time (i.e. further transactions in that |
---|
65 | // delta time are ignored). |
---|
66 | // |
---|
67 | // Model Limitations and Restrictions: |
---|
68 | // Signals asserted on the ports of the error injector should not have |
---|
69 | // transactions occuring in multiple delta times because the model |
---|
70 | // is sensitive to transactions on port A, B ONLY ONCE during |
---|
71 | // a simulation time. Thus, once fired, a process will |
---|
72 | // not refire if there are multiple transactions occuring in delta times. |
---|
73 | // This condition may occur in gate level simulations with |
---|
74 | // ZERO delays because transactions may occur in multiple delta times. |
---|
75 | //***************************************************************************** |
---|
76 | |
---|
77 | `timescale 1ns / 1ps |
---|
78 | |
---|
79 | module WireDelay # ( |
---|
80 | parameter Delay_g = 0, |
---|
81 | parameter Delay_rd = 0 |
---|
82 | ) |
---|
83 | ( |
---|
84 | inout A, |
---|
85 | inout B, |
---|
86 | input reset |
---|
87 | ); |
---|
88 | |
---|
89 | reg A_r; |
---|
90 | reg B_r; |
---|
91 | reg line_en; |
---|
92 | |
---|
93 | assign A = A_r; |
---|
94 | assign B = B_r; |
---|
95 | |
---|
96 | always @(*) begin |
---|
97 | if (!reset) begin |
---|
98 | A_r <= 1'bz; |
---|
99 | B_r <= 1'bz; |
---|
100 | line_en <= 1'b0; |
---|
101 | end else begin |
---|
102 | if (line_en) begin |
---|
103 | A_r <= #Delay_rd B; |
---|
104 | B_r <= 1'bz; |
---|
105 | end else begin |
---|
106 | B_r <= #Delay_g A; |
---|
107 | A_r <= 1'bz; |
---|
108 | end |
---|
109 | end |
---|
110 | end |
---|
111 | |
---|
112 | always @(A or B) begin |
---|
113 | if (!reset) begin |
---|
114 | line_en <= 1'b0; |
---|
115 | end else if (A !== A_r) begin |
---|
116 | line_en <= 1'b0; |
---|
117 | end else if (B_r !== B) begin |
---|
118 | line_en <= 1'b1; |
---|
119 | end else begin |
---|
120 | line_en <= line_en; |
---|
121 | end |
---|
122 | end |
---|
123 | endmodule |
---|