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

Subversion Repositories usb_fpga_2_14

[/] [usb_fpga_2_14/] [trunk/] [examples/] [memfifo/] [fpga-2.14/] [memfifo.srcs/] [sources_1/] [ip/] [mig_7series_0/] [mig_7series_0/] [user_design/] [rtl/] [phy/] [mig_7series_v2_3_poc_pd.v] - Blame information for rev 2

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 2 ZTEX
//*****************************************************************************
2
// (c) Copyright 2009 - 2012 Xilinx, Inc. All rights reserved.
3
//
4
// This file contains confidential and proprietary information
5
// of Xilinx, Inc. and is protected under U.S. and
6
// international copyright and other intellectual property
7
// laws.
8
//
9
// DISCLAIMER
10
// This disclaimer is not a license and does not grant any
11
// rights to the materials distributed herewith. Except as
12
// otherwise provided in a valid license issued to you by
13
// Xilinx, and to the maximum extent permitted by applicable
14
// law: (1) THESE MATERIALS ARE MADE AVAILABLE "AS IS" AND
15
// WITH ALL FAULTS, AND XILINX HEREBY DISCLAIMS ALL WARRANTIES
16
// AND CONDITIONS, EXPRESS, IMPLIED, OR STATUTORY, INCLUDING
17
// BUT NOT LIMITED TO WARRANTIES OF MERCHANTABILITY, NON-
18
// INFRINGEMENT, OR FITNESS FOR ANY PARTICULAR PURPOSE; and
19
// (2) Xilinx shall not be liable (whether in contract or tort,
20
// including negligence, or under any other theory of
21
// liability) for any loss or damage of any kind or nature
22
// related to, arising under or in connection with these
23
// materials, including for any direct, or any indirect,
24
// special, incidental, or consequential loss or damage
25
// (including loss of data, profits, goodwill, or any type of
26
// loss or damage suffered as a result of any action brought
27
// by a third party) even if such damage or loss was
28
// reasonably foreseeable or Xilinx had been advised of the
29
// possibility of the same.
30
//
31
// CRITICAL APPLICATIONS
32
// Xilinx products are not designed or intended to be fail-
33
// safe, or for use in any application requiring fail-safe
34
// performance, such as life-support or safety devices or
35
// systems, Class III medical devices, nuclear facilities,
36
// applications related to the deployment of airbags, or any
37
// other applications that could lead to death, personal
38
// injury, or severe property or environmental damage
39
// (individually and collectively, "Critical
40
// Applications"). Customer assumes the sole risk and
41
// liability of any use of Xilinx products in Critical
42
// Applications, subject only to applicable laws and
43
// regulations governing limitations on product liability.
44
//
45
// THIS COPYRIGHT NOTICE AND DISCLAIMER MUST BE RETAINED AS
46
// PART OF THIS FILE AT ALL TIMES.
47
//
48
//*****************************************************************************
49
//   ____  ____
50
//  /   /\/   /
51
// /___/  \  /    Vendor: Xilinx
52
// \   \   \/     Version:%version
53
//  \   \         Application: MIG
54
//  /   /         Filename: mig_7series_v2_3_poc_pd.v
55
// /___/   /\     Date Last Modified: $$
56
// \   \  /  \    Date Created:Tue 15 Jan 2014
57
//  \___\/\___\
58
//
59
//Device: Virtex-7
60
//Design Name: DDR3 SDRAM
61
//Purpose: IDDR used as phase detector.  The pos_edge and neg_edge stuff
62
//         prevents any noise that could happen when the phase shift clock is very
63
//         nearly aligned to the fabric clock.
64
//Reference:
65
//Revision History:
66
//*****************************************************************************
67
 
68
`timescale 1 ps / 1 ps
69
 
70
module mig_7series_v2_3_poc_pd #
71
  (parameter POC_USE_METASTABLE_SAMP    = "FALSE",
72
   parameter SIM_CAL_OPTION             = "NONE",
73
   parameter TCQ                        = 100)
74
  (/*AUTOARG*/
75
  // Outputs
76
  pd_out,
77
  // Inputs
78
  iddr_rst, clk, kclk, mmcm_ps_clk
79
  );
80
 
81
  input iddr_rst;
82
  input clk;
83
  input kclk;
84
  input mmcm_ps_clk;
85
 
86
  wire q1;
87
  IDDR #
88
    (.DDR_CLK_EDGE    ("OPPOSITE_EDGE"),
89
     .INIT_Q1         (1'b0),
90
     .INIT_Q2         (1'b0),
91
     .SRTYPE          ("SYNC"))
92
  u_phase_detector
93
    (.Q1              (q1),
94
     .Q2              (),
95
     .C               (mmcm_ps_clk),
96
     .CE              (1'b1),
97
     .D               (kclk),
98
     .R               (iddr_rst),
99
     .S               (1'b0));
100
 
101
  // Path from q1 to xxx_edge_samp must be constrained to be less than 1/4 cycle.  FIXME
102
 
103
  reg pos_edge_samp;
104
 
105
  generate if (SIM_CAL_OPTION == "NONE" || POC_USE_METASTABLE_SAMP == "TRUE") begin : no_eXes
106
    always @(posedge clk) pos_edge_samp <= #TCQ q1;
107
  end else begin : eXes
108
    reg q1_delayed;
109
    reg rising_clk_seen;
110
    always @(posedge mmcm_ps_clk) begin
111
      rising_clk_seen <= 1'b0;
112
      q1_delayed <= 1'bx;
113
    end
114
    always @(posedge clk) begin
115
      rising_clk_seen = 1'b1;
116
      if (rising_clk_seen) q1_delayed <= q1;
117
    end
118
    always @(posedge clk) begin
119
      pos_edge_samp <= q1_delayed;
120
    end
121
  end endgenerate
122
 
123
  reg pd_out_r;
124
  always @(posedge clk) pd_out_r <= #TCQ pos_edge_samp;
125
 
126
  output pd_out;
127
  assign pd_out = pd_out_r;
128
 
129
 
130
endmodule // mic_7series_v2_3_poc_pd
131
 

powered by: WebSVN 2.1.0

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