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

Subversion Repositories pcie_sg_dma

[/] [pcie_sg_dma/] [branches/] [Virtex6/] [ML605_ISE13.3/] [ipcore_dir_ISE13.3/] [v6_pcie_v1_6/] [source/] [pcie_reset_delay_v6.v] - Blame information for rev 13

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 13 barabba
//-----------------------------------------------------------------------------
2
//
3
// (c) Copyright 2009-2011 Xilinx, Inc. All rights reserved.
4
//
5
// This file contains confidential and proprietary information
6
// of Xilinx, Inc. and is protected under U.S. and
7
// international copyright and other intellectual property
8
// laws.
9
//
10
// DISCLAIMER
11
// This disclaimer is not a license and does not grant any
12
// rights to the materials distributed herewith. Except as
13
// otherwise provided in a valid license issued to you by
14
// Xilinx, and to the maximum extent permitted by applicable
15
// law: (1) THESE MATERIALS ARE MADE AVAILABLE "AS IS" AND
16
// WITH ALL FAULTS, AND XILINX HEREBY DISCLAIMS ALL WARRANTIES
17
// AND CONDITIONS, EXPRESS, IMPLIED, OR STATUTORY, INCLUDING
18
// BUT NOT LIMITED TO WARRANTIES OF MERCHANTABILITY, NON-
19
// INFRINGEMENT, OR FITNESS FOR ANY PARTICULAR PURPOSE; and
20
// (2) Xilinx shall not be liable (whether in contract or tort,
21
// including negligence, or under any other theory of
22
// liability) for any loss or damage of any kind or nature
23
// related to, arising under or in connection with these
24
// materials, including for any direct, or any indirect,
25
// special, incidental, or consequential loss or damage
26
// (including loss of data, profits, goodwill, or any type of
27
// loss or damage suffered as a result of any action brought
28
// by a third party) even if such damage or loss was
29
// reasonably foreseeable or Xilinx had been advised of the
30
// possibility of the same.
31
//
32
// CRITICAL APPLICATIONS
33
// Xilinx products are not designed or intended to be fail-
34
// safe, or for use in any application requiring fail-safe
35
// performance, such as life-support or safety devices or
36
// systems, Class III medical devices, nuclear facilities,
37
// applications related to the deployment of airbags, or any
38
// other applications that could lead to death, personal
39
// injury, or severe property or environmental damage
40
// (individually and collectively, "Critical
41
// Applications"). Customer assumes the sole risk and
42
// liability of any use of Xilinx products in Critical
43
// Applications, subject only to applicable laws and
44
// regulations governing limitations on product liability.
45
//
46
// THIS COPYRIGHT NOTICE AND DISCLAIMER MUST BE RETAINED AS
47
// PART OF THIS FILE AT ALL TIMES.
48
//
49
//-----------------------------------------------------------------------------
50
// Project    : Virtex-6 Integrated Block for PCI Express
51
// File       : pcie_reset_delay_v6.v
52
// Version    : 1.7
53
//--
54
//-- Description: sys_reset_n delay (20ms) for Virtex6 PCIe Block
55
//--
56
//--
57
//--
58
//--------------------------------------------------------------------------------
59
 
60
`timescale 1ns/1ns
61
 
62
module pcie_reset_delay_v6 # (
63
 
64
  parameter PL_FAST_TRAIN = "FALSE",
65
  parameter REF_CLK_FREQ = 0   // 0 - 100 MHz, 1 - 125 MHz, 2 - 250 MHz
66
 
67
)
68
(
69
 
70
  input  wire        ref_clk,
71
  input  wire        sys_reset_n,
72
  output             delayed_sys_reset_n
73
 
74
);
75
 
76
  parameter TCQ = 1;
77
 
78
  localparam         TBIT =  (PL_FAST_TRAIN == "FALSE") ?  ((REF_CLK_FREQ == 1) ? 20: (REF_CLK_FREQ == 0) ? 20 : 21) : 2;
79
 
80
  reg [7:0]          reg_count_7_0;
81
  reg [7:0]          reg_count_15_8;
82
  reg [7:0]          reg_count_23_16;
83
  wire [23:0]        concat_count;
84
 
85
  assign concat_count = {reg_count_23_16, reg_count_15_8, reg_count_7_0};
86
 
87
  always @(posedge ref_clk or negedge sys_reset_n) begin
88
 
89
    if (!sys_reset_n) begin
90
 
91
      reg_count_7_0 <= #TCQ 8'h0;
92
      reg_count_15_8 <= #TCQ 8'h0;
93
      reg_count_23_16 <= #TCQ 8'h0;
94
 
95
    end else begin
96
 
97
      if (delayed_sys_reset_n != 1'b1) begin
98
 
99
        reg_count_7_0   <= #TCQ reg_count_7_0 + 1'b1;
100
        reg_count_15_8  <= #TCQ (reg_count_7_0 == 8'hff)? reg_count_15_8  + 1'b1 : reg_count_15_8 ;
101
        reg_count_23_16 <= #TCQ ((reg_count_15_8 == 8'hff) & (reg_count_7_0 == 8'hff)) ? reg_count_23_16 + 1'b1 : reg_count_23_16;
102
 
103
      end
104
 
105
    end
106
 
107
  end
108
 
109
  assign delayed_sys_reset_n = concat_count[TBIT];
110
 
111
endmodule
112
 

powered by: WebSVN 2.1.0

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