AMC13
Firmwares for the different applications of the AMC13 uTCA board made at Boston University
 All Classes Variables
mig_7series_v1_9_ddr_phy_4lanes.v
1  /**********************************************************
2 -- (c) Copyright 2011 - 2013 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"). A 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 // THIS NOTICE MUST BE RETAINED AS PART OF THIS FILE AT ALL TIMES.
50 //
51 //
52 // Owner: Gary Martin
53 // Revision: $Id: //depot/icm/proj/common/head/rtl/v32_cmt/rtl/phy/phy_4lanes.v#6 $
54 // $Author: gary $
55 // $DateTime: 2010/05/11 18:05:17 $
56 // $Change: 490882 $
57 // Description:
58 // This verilog file is the parameterizable 4-byte lane phy primitive top
59 // This module may be ganged to create an N-lane phy.
60 //
61 // History:
62 // Date Engineer Description
63 // 04/01/2010 G. Martin Initial Checkin.
64 //
65 ///////////////////////////////////////////////////////////
66 ***********************************************************/
67 
68 `timescale 1ps/1ps
69 
70 `define PC_DATA_OFFSET_RANGE 22:17
71 
73 parameter GENERATE_IDELAYCTRL = "TRUE",
74 parameter IODELAY_GRP = "IODELAY_MIG",
75 parameter BANK_TYPE = "HP_IO", // # = "HP_IO", "HPL_IO", "HR_IO", "HRL_IO"
76 parameter BYTELANES_DDR_CK = 24'b0010_0010_0010_0010_0010_0010,
77 parameter NUM_DDR_CK = 1,
78 // next three parameter fields correspond to byte lanes for lane order DCBA
79 parameter BYTE_LANES = 4'b1111, // lane existence, one per lane
80 parameter DATA_CTL_N = 4'b1111, // data or control, per lane
81 parameter BITLANES = 48'hffff_ffff_ffff,
82 parameter BITLANES_OUTONLY = 48'h0000_0000_0000,
83 parameter LANE_REMAP = 16'h3210,// 4-bit index
84  // used to rewire to one of four
85  // input/output buss lanes
86  // example: 0321 remaps lanes as:
87  // D->A
88  // C->D
89  // B->C
90  // A->B
91 parameter LAST_BANK = "FALSE",
92 parameter USE_PRE_POST_FIFO = "FALSE",
93 parameter RCLK_SELECT_LANE = "B",
94 parameter real TCK = 0.00,
95 parameter SYNTHESIS = "FALSE",
96 parameter PO_CTL_COARSE_BYPASS = "FALSE",
97 parameter PO_FINE_DELAY = 0,
98 parameter PI_SEL_CLK_OFFSET = 0,
99 
100 // phy_control paramter used in other paramsters
101 parameter PC_CLK_RATIO = 4,
102 
103 //phaser_in parameters
104 parameter A_PI_FREQ_REF_DIV = "NONE",
105 parameter A_PI_CLKOUT_DIV = 2,
106 parameter A_PI_BURST_MODE = "TRUE",
107 parameter A_PI_OUTPUT_CLK_SRC = "DELAYED_REF" , //"DELAYED_REF",
108 parameter A_PI_FINE_DELAY = 60,
109 parameter A_PI_SYNC_IN_DIV_RST = "TRUE",
110 
111 parameter B_PI_FREQ_REF_DIV = A_PI_FREQ_REF_DIV,
112 parameter B_PI_CLKOUT_DIV = A_PI_CLKOUT_DIV,
113 parameter B_PI_BURST_MODE = A_PI_BURST_MODE,
114 parameter B_PI_OUTPUT_CLK_SRC = A_PI_OUTPUT_CLK_SRC,
115 parameter B_PI_FINE_DELAY = A_PI_FINE_DELAY,
116 parameter B_PI_SYNC_IN_DIV_RST = A_PI_SYNC_IN_DIV_RST,
117 
118 parameter C_PI_FREQ_REF_DIV = A_PI_FREQ_REF_DIV,
119 parameter C_PI_CLKOUT_DIV = A_PI_CLKOUT_DIV,
120 parameter C_PI_BURST_MODE = A_PI_BURST_MODE,
121 parameter C_PI_OUTPUT_CLK_SRC = A_PI_OUTPUT_CLK_SRC,
122 parameter C_PI_FINE_DELAY = 0,
123 parameter C_PI_SYNC_IN_DIV_RST = A_PI_SYNC_IN_DIV_RST,
124 
125 parameter D_PI_FREQ_REF_DIV = A_PI_FREQ_REF_DIV,
126 parameter D_PI_CLKOUT_DIV = A_PI_CLKOUT_DIV,
127 parameter D_PI_BURST_MODE = A_PI_BURST_MODE,
128 parameter D_PI_OUTPUT_CLK_SRC = A_PI_OUTPUT_CLK_SRC,
129 parameter D_PI_FINE_DELAY = 0,
130 parameter D_PI_SYNC_IN_DIV_RST = A_PI_SYNC_IN_DIV_RST,
131 
132 //phaser_out parameters
133 parameter A_PO_CLKOUT_DIV = (DATA_CTL_N[0] == 0) ?