1 |
2 |
ZTEX |
//*****************************************************************************
|
2 |
|
|
// (c) Copyright 2009 - 2014 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 : 3.6
|
53 |
|
|
// \ \ Application : MIG
|
54 |
|
|
// / / Filename : memc_ui_top_std.v
|
55 |
|
|
// /___/ /\ Date Last Modified : $Date: 2011/06/17 11:11:25 $
|
56 |
|
|
// \ \ / \ Date Created : Fri Oct 08 2010
|
57 |
|
|
// \___\/\___\
|
58 |
|
|
//
|
59 |
|
|
// Device : 7 Series
|
60 |
|
|
// Design Name : DDR2 SDRAM & DDR3 SDRAM
|
61 |
|
|
// Purpose :
|
62 |
|
|
// Top level memory interface block. Instantiates a clock and
|
63 |
|
|
// reset generator, the memory controller, the phy and the
|
64 |
|
|
// user interface blocks.
|
65 |
|
|
// Reference :
|
66 |
|
|
// Revision History :
|
67 |
|
|
//*****************************************************************************
|
68 |
|
|
|
69 |
|
|
`timescale 1 ps / 1 ps
|
70 |
|
|
|
71 |
|
|
(* X_CORE_INFO = "mig_7series_v2_3_ddr3_7Series, 2013.4" , CORE_GENERATION_INFO = "ddr3_7Series,mig_7series_v2_3,{LANGUAGE=Verilog, SYNTHESIS_TOOL=Vivado, LEVEL=CONTROLLER, AXI_ENABLE=0, NO_OF_CONTROLLERS=1, INTERFACE_TYPE=DDR3, AXI_ENABLE=0, CLK_PERIOD=2500, PHY_RATIO=4, CLKIN_PERIOD=2500, VCCAUX_IO=1.8V, MEMORY_TYPE=COMP, MEMORY_PART=mt41j128m16xx-125, DQ_WIDTH=16, ECC=OFF, DATA_MASK=1, ORDERING=NORM, BURST_MODE=8, BURST_TYPE=SEQ, CA_MIRROR=OFF, OUTPUT_DRV=HIGH, USE_CS_PORT=0, USE_ODT_PORT=1, RTT_NOM=40, MEMORY_ADDRESS_MAP=BANK_ROW_COLUMN, REFCLK_FREQ=200, DEBUG_PORT=OFF, INTERNAL_VREF=0, SYSCLK_TYPE=NO_BUFFER, REFCLK_TYPE=NO_BUFFER}" *)
|
72 |
|
|
module mig_7series_v2_3_memc_ui_top_std #
|
73 |
|
|
(
|
74 |
|
|
parameter TCQ = 100,
|
75 |
|
|
parameter DDR3_VDD_OP_VOLT = "135", // Voltage mode used for DDR3
|
76 |
|
|
parameter PAYLOAD_WIDTH = 64,
|
77 |
|
|
parameter ADDR_CMD_MODE = "UNBUF",
|
78 |
|
|
parameter AL = "0", // Additive Latency option
|
79 |
|
|
parameter BANK_WIDTH = 3, // # of bank bits
|
80 |
|
|
parameter BM_CNT_WIDTH = 2, // Bank machine counter width
|
81 |
|
|
parameter BURST_MODE = "8", // Burst length
|
82 |
|
|
parameter BURST_TYPE = "SEQ", // Burst type
|
83 |
|
|
parameter CA_MIRROR = "OFF", // C/A mirror opt for DDR3 dual rank
|
84 |
|
|
parameter CK_WIDTH = 1, // # of CK/CK# outputs to memory
|
85 |
|
|
parameter CL = 5,
|
86 |
|
|
parameter COL_WIDTH = 12, // column address width
|
87 |
|
|
parameter CMD_PIPE_PLUS1 = "ON", // add pipeline stage between MC and PHY
|
88 |
|
|
parameter CS_WIDTH = 1, // # of unique CS outputs
|
89 |
|
|
parameter CKE_WIDTH = 1, // # of cke outputs
|
90 |
|
|
parameter CWL = 5,
|
91 |
|
|
parameter DATA_WIDTH = 64,
|
92 |
|
|
parameter DATA_BUF_ADDR_WIDTH = 5,
|
93 |
|
|
parameter DATA_BUF_OFFSET_WIDTH = 1,
|
94 |
|
|
parameter DDR2_DQSN_ENABLE = "YES", // Enable differential DQS for DDR2
|
95 |
|
|
parameter DM_WIDTH = 8, // # of DM (data mask)
|
96 |
|
|
parameter DQ_CNT_WIDTH = 6, // = ceil(log2(DQ_WIDTH))
|
97 |
|
|
parameter DQ_WIDTH = 64, // # of DQ (data)
|
98 |
|
|
parameter DQS_CNT_WIDTH = 3, // = ceil(log2(DQS_WIDTH))
|
99 |
|
|
parameter DQS_WIDTH = 8, // # of DQS (strobe)
|
100 |
|
|
parameter DRAM_TYPE = "DDR3",
|
101 |
|
|
parameter DRAM_WIDTH = 8, // # of DQ per DQS
|
102 |
|
|
parameter ECC = "OFF",
|
103 |
|
|
parameter ECC_WIDTH = 8,
|
104 |
|
|
parameter ECC_TEST = "OFF",
|
105 |
|
|
parameter MC_ERR_ADDR_WIDTH = 31,
|
106 |
|
|
parameter MASTER_PHY_CTL = 0, // The bank number where master PHY_CONTROL resides
|
107 |
|
|
parameter nAL = 0, // Additive latency (in clk cyc)
|
108 |
|
|
parameter nBANK_MACHS = 4,
|
109 |
|
|
parameter nCK_PER_CLK = 2, // # of memory CKs per fabric CLK
|
110 |
|
|
parameter nCS_PER_RANK = 1, // # of unique CS outputs per rank
|
111 |
|
|
parameter ORDERING = "NORM",
|
112 |
|
|
parameter IBUF_LPWR_MODE = "OFF",
|
113 |
|
|
parameter BANK_TYPE = "HP_IO", // # = "HP_IO", "HPL_IO", "HR_IO", "HRL_IO"
|
114 |
|
|
parameter DATA_IO_PRIM_TYPE = "DEFAULT", // # = "HP_LP", "HR_LP", "DEFAULT"
|
115 |
|
|
parameter DATA_IO_IDLE_PWRDWN = "ON", // "ON" or "OFF"
|
116 |
|
|
parameter IODELAY_GRP0 = "IODELAY_MIG0",
|
117 |
|
|
parameter IODELAY_GRP1 = "IODELAY_MIG1",
|
118 |
|
|
parameter FPGA_SPEED_GRADE = 1,
|
119 |
|
|
parameter OUTPUT_DRV = "HIGH",
|
120 |
|
|
parameter REG_CTRL = "OFF",
|
121 |
|
|
parameter RTT_NOM = "60",
|
122 |
|
|
parameter RTT_WR = "120",
|
123 |
|
|
parameter STARVE_LIMIT = 2,
|
124 |
|
|
parameter tCK = 2500, // pS
|
125 |
|
|
parameter tCKE = 10000, // pS
|
126 |
|
|
parameter tFAW = 40000, // pS
|
127 |
|
|
parameter tPRDI = 1_000_000, // pS
|
128 |
|
|
parameter tRAS = 37500, // pS
|
129 |
|
|
parameter tRCD = 12500, // pS
|
130 |
|
|
parameter tREFI = 7800000, // pS
|
131 |
|
|
parameter tRFC = 110000, // pS
|
132 |
|
|
parameter tRP = 12500, // pS
|
133 |
|
|
parameter tRRD = 10000, // pS
|
134 |
|
|
parameter tRTP = 7500, // pS
|
135 |
|
|
parameter tWTR = 7500, // pS
|
136 |
|
|
parameter tZQI = 128_000_000, // nS
|
137 |
|
|
parameter tZQCS = 64, // CKs
|
138 |
|
|
parameter USER_REFRESH = "OFF", // Whether user manages REF
|
139 |
|
|
parameter TEMP_MON_EN = "ON", // Enable/Disable tempmon
|
140 |
|
|
parameter WRLVL = "OFF",
|
141 |
|
|
parameter DEBUG_PORT = "OFF",
|
142 |
|
|
parameter CAL_WIDTH = "HALF",
|
143 |
|
|
parameter RANK_WIDTH = 1,
|
144 |
|
|
parameter RANKS = 4,
|
145 |
|
|
parameter ODT_WIDTH = 1,
|
146 |
|
|
parameter ROW_WIDTH = 16, // DRAM address bus width
|
147 |
|
|
parameter ADDR_WIDTH = 32,
|
148 |
|
|
parameter APP_MASK_WIDTH = 8,
|
149 |
|
|
parameter APP_DATA_WIDTH = 64,
|
150 |
|
|
parameter [3:0] BYTE_LANES_B0 = 4'b1111,
|
151 |
|
|
parameter [3:0] BYTE_LANES_B1 = 4'b1111,
|
152 |
|
|
parameter [3:0] BYTE_LANES_B2 = 4'b1111,
|
153 |
|
|
parameter [3:0] BYTE_LANES_B3 = 4'b1111,
|
154 |
|
|
parameter [3:0] BYTE_LANES_B4 = 4'b1111,
|
155 |
|
|
parameter [3:0] DATA_CTL_B0 = 4'hc,
|
156 |
|
|
parameter [3:0] DATA_CTL_B1 = 4'hf,
|
157 |
|
|
parameter [3:0] DATA_CTL_B2 = 4'hf,
|
158 |
|
|
parameter [3:0] DATA_CTL_B3 = 4'h0,
|
159 |
|
|
parameter [3:0] DATA_CTL_B4 = 4'h0,
|
160 |
|
|
parameter [47:0] PHY_0_BITLANES = 48'h0000_0000_0000,
|
161 |
|
|
parameter [47:0] PHY_1_BITLANES = 48'h0000_0000_0000,
|
162 |
|
|
parameter [47:0] PHY_2_BITLANES = 48'h0000_0000_0000,
|
163 |
|
|
|
164 |
|
|
// control/address/data pin mapping parameters
|
165 |
|
|
parameter [143:0] CK_BYTE_MAP
|
166 |
|
|
= 144'h00_00_00_00_00_00_00_00_00_00_00_00_00_00_00_00_00_00,
|
167 |
|
|
parameter [191:0] ADDR_MAP
|
168 |
|
|
= 192'h000_000_000_000_000_000_000_000_000_000_000_000_000_000_000_000,
|
169 |
|
|
parameter [35:0] BANK_MAP = 36'h000_000_000,
|
170 |
|
|
parameter [11:0] CAS_MAP = 12'h000,
|
171 |
|
|
parameter [7:0] CKE_ODT_BYTE_MAP = 8'h00,
|
172 |
|
|
parameter [95:0] CKE_MAP = 96'h000_000_000_000_000_000_000_000,
|
173 |
|
|
parameter [95:0] ODT_MAP = 96'h000_000_000_000_000_000_000_000,
|
174 |
|
|
parameter CKE_ODT_AUX = "FALSE",
|
175 |
|
|
parameter [119:0] CS_MAP = 120'h000_000_000_000_000_000_000_000_000_000,
|
176 |
|
|
parameter [11:0] PARITY_MAP = 12'h000,
|
177 |
|
|
parameter [11:0] RAS_MAP = 12'h000,
|
178 |
|
|
parameter [11:0] WE_MAP = 12'h000,
|
179 |
|
|
parameter [143:0] DQS_BYTE_MAP
|
180 |
|
|
= 144'h00_00_00_00_00_00_00_00_00_00_00_00_00_00_00_00_00_00,
|
181 |
|
|
parameter [95:0] DATA0_MAP = 96'h000_000_000_000_000_000_000_000,
|
182 |
|
|
parameter [95:0] DATA1_MAP = 96'h000_000_000_000_000_000_000_000,
|
183 |
|
|
parameter [95:0] DATA2_MAP = 96'h000_000_000_000_000_000_000_000,
|
184 |
|
|
parameter [95:0] DATA3_MAP = 96'h000_000_000_000_000_000_000_000,
|
185 |
|
|
parameter [95:0] DATA4_MAP = 96'h000_000_000_000_000_000_000_000,
|
186 |
|
|
parameter [95:0] DATA5_MAP = 96'h000_000_000_000_000_000_000_000,
|
187 |
|
|
parameter [95:0] DATA6_MAP = 96'h000_000_000_000_000_000_000_000,
|
188 |
|
|
parameter [95:0] DATA7_MAP = 96'h000_000_000_000_000_000_000_000,
|
189 |
|
|
parameter [95:0] DATA8_MAP = 96'h000_000_000_000_000_000_000_000,
|
190 |
|
|
parameter [95:0] DATA9_MAP = 96'h000_000_000_000_000_000_000_000,
|
191 |
|
|
parameter [95:0] DATA10_MAP = 96'h000_000_000_000_000_000_000_000,
|
192 |
|
|
parameter [95:0] DATA11_MAP = 96'h000_000_000_000_000_000_000_000,
|
193 |
|
|
parameter [95:0] DATA12_MAP = 96'h000_000_000_000_000_000_000_000,
|
194 |
|
|
parameter [95:0] DATA13_MAP = 96'h000_000_000_000_000_000_000_000,
|
195 |
|
|
parameter [95:0] DATA14_MAP = 96'h000_000_000_000_000_000_000_000,
|
196 |
|
|
parameter [95:0] DATA15_MAP = 96'h000_000_000_000_000_000_000_000,
|
197 |
|
|
parameter [95:0] DATA16_MAP = 96'h000_000_000_000_000_000_000_000,
|
198 |
|
|
parameter [95:0] DATA17_MAP = 96'h000_000_000_000_000_000_000_000,
|
199 |
|
|
parameter [107:0] MASK0_MAP = 108'h000_000_000_000_000_000_000_000_000,
|
200 |
|
|
parameter [107:0] MASK1_MAP = 108'h000_000_000_000_000_000_000_000_000,
|
201 |
|
|
|
202 |
|
|
parameter [7:0] SLOT_0_CONFIG = 8'b0000_0001,
|
203 |
|
|
parameter [7:0] SLOT_1_CONFIG = 8'b0000_0000,
|
204 |
|
|
parameter MEM_ADDR_ORDER = "BANK_ROW_COLUMN",
|
205 |
|
|
// calibration Address. The address given below will be used for calibration
|
206 |
|
|
// read and write operations.
|
207 |
|
|
parameter [15:0] CALIB_ROW_ADD = 16'h0000, // Calibration row address
|
208 |
|
|
parameter [11:0] CALIB_COL_ADD = 12'h000, // Calibration column address
|
209 |
|
|
parameter [2:0] CALIB_BA_ADD = 3'h0, // Calibration bank address
|
210 |
|
|
parameter SIM_BYPASS_INIT_CAL = "OFF",
|
211 |
|
|
parameter REFCLK_FREQ = 300.0,
|
212 |
|
|
parameter USE_CS_PORT = 1, // Support chip select output
|
213 |
|
|
parameter USE_DM_PORT = 1, // Support data mask output
|
214 |
|
|
parameter USE_ODT_PORT = 1, // Support ODT output
|
215 |
|
|
parameter IDELAY_ADJ = "ON", //ON : IDELAY-1, OFF: No change
|
216 |
|
|
parameter FINE_PER_BIT = "ON", //ON : Use per bit calib for complex rdlvl
|
217 |
|
|
parameter CENTER_COMP_MODE = "ON", //ON: use PI stg2 tap compensation
|
218 |
|
|
parameter PI_VAL_ADJ = "ON", //ON: PI stg2 tap -1 for centering
|
219 |
|
|
parameter TAPSPERKCLK = 56
|
220 |
|
|
)
|
221 |
|
|
(
|
222 |
|
|
// Clock and reset ports
|
223 |
|
|
input clk,
|
224 |
|
|
input [1:0] clk_ref,
|
225 |
|
|
input mem_refclk ,
|
226 |
|
|
input freq_refclk ,
|
227 |
|
|
input pll_lock,
|
228 |
|
|
input sync_pulse ,
|
229 |
|
|
input mmcm_ps_clk,
|
230 |
|
|
input poc_sample_pd,
|
231 |
|
|
|
232 |
|
|
input rst,
|
233 |
|
|
|
234 |
|
|
// memory interface ports
|
235 |
|
|
inout [DQ_WIDTH-1:0] ddr_dq,
|
236 |
|
|
inout [DQS_WIDTH-1:0] ddr_dqs_n,
|
237 |
|
|
inout [DQS_WIDTH-1:0] ddr_dqs,
|
238 |
|
|
output [ROW_WIDTH-1:0] ddr_addr,
|
239 |
|
|
output [BANK_WIDTH-1:0] ddr_ba,
|
240 |
|
|
output ddr_cas_n,
|
241 |
|
|
output [CK_WIDTH-1:0] ddr_ck_n,
|
242 |
|
|
output [CK_WIDTH-1:0] ddr_ck,
|
243 |
|
|
output [CKE_WIDTH-1:0] ddr_cke,
|
244 |
|
|
output [CS_WIDTH*nCS_PER_RANK-1:0] ddr_cs_n,
|
245 |
|
|
output [DM_WIDTH-1:0] ddr_dm,
|
246 |
|
|
output [ODT_WIDTH-1:0] ddr_odt,
|
247 |
|
|
output ddr_ras_n,
|
248 |
|
|
output ddr_reset_n,
|
249 |
|
|
output ddr_parity,
|
250 |
|
|
output ddr_we_n,
|
251 |
|
|
|
252 |
|
|
output [BM_CNT_WIDTH-1:0] bank_mach_next,
|
253 |
|
|
|
254 |
|
|
// user interface ports
|
255 |
|
|
input [ADDR_WIDTH-1:0] app_addr,
|
256 |
|
|
input [2:0] app_cmd,
|
257 |
|
|
input app_en,
|
258 |
|
|
input app_hi_pri,
|
259 |
|
|
input [APP_DATA_WIDTH-1:0] app_wdf_data,
|
260 |
|
|
input app_wdf_end,
|
261 |
|
|
input [APP_MASK_WIDTH-1:0] app_wdf_mask,
|
262 |
|
|
input app_wdf_wren,
|
263 |
|
|
input app_correct_en_i,
|
264 |
|
|
input [2*nCK_PER_CLK-1:0] app_raw_not_ecc,
|
265 |
|
|
output [2*nCK_PER_CLK-1:0] app_ecc_multiple_err,
|
266 |
|
|
output [APP_DATA_WIDTH-1:0] app_rd_data,
|
267 |
|
|
output app_rd_data_end,
|
268 |
|
|
output app_rd_data_valid,
|
269 |
|
|
output app_rdy,
|
270 |
|
|
output app_wdf_rdy,
|
271 |
|
|
|
272 |
|
|
input app_sr_req,
|
273 |
|
|
output app_sr_active,
|
274 |
|
|
input app_ref_req,
|
275 |
|
|
output app_ref_ack,
|
276 |
|
|
input app_zq_req,
|
277 |
|
|
output app_zq_ack,
|
278 |
|
|
|
279 |
|
|
// temperature monitor ports
|
280 |
|
|
input [11:0] device_temp,
|
281 |
|
|
//phase shift clock control
|
282 |
|
|
output psen,
|
283 |
|
|
output psincdec,
|
284 |
|
|
input psdone,
|
285 |
|
|
// debug logic ports
|
286 |
|
|
input dbg_idel_down_all,
|
287 |
|
|
input dbg_idel_down_cpt,
|
288 |
|
|
input dbg_idel_up_all,
|
289 |
|
|
input dbg_idel_up_cpt,
|
290 |
|
|
input dbg_sel_all_idel_cpt,
|
291 |
|
|
input [DQS_CNT_WIDTH-1:0] dbg_sel_idel_cpt,
|
292 |
|
|
output [6*DQS_WIDTH*RANKS-1:0] dbg_cpt_first_edge_cnt,
|
293 |
|
|
output [6*DQS_WIDTH*RANKS-1:0] dbg_cpt_second_edge_cnt,
|
294 |
|
|
output [DQS_WIDTH-1:0] dbg_rd_data_edge_detect,
|
295 |
|
|
output [2*nCK_PER_CLK*DQ_WIDTH-1:0] dbg_rddata,
|
296 |
|
|
output [1:0] dbg_rdlvl_done,
|
297 |
|
|
output [1:0] dbg_rdlvl_err,
|
298 |
|
|
output [1:0] dbg_rdlvl_start,
|
299 |
|
|
output [5:0] dbg_tap_cnt_during_wrlvl,
|
300 |
|
|
output dbg_wl_edge_detect_valid,
|
301 |
|
|
output dbg_wrlvl_done,
|
302 |
|
|
output dbg_wrlvl_err,
|
303 |
|
|
output dbg_wrlvl_start,
|
304 |
|
|
output [6*DQS_WIDTH-1:0] dbg_final_po_fine_tap_cnt,
|
305 |
|
|
output [3*DQS_WIDTH-1:0] dbg_final_po_coarse_tap_cnt,
|
306 |
|
|
|
307 |
|
|
output init_calib_complete,
|
308 |
|
|
input dbg_sel_pi_incdec,
|
309 |
|
|
input dbg_sel_po_incdec,
|
310 |
|
|
input [DQS_CNT_WIDTH:0] dbg_byte_sel,
|
311 |
|
|
input dbg_pi_f_inc,
|
312 |
|
|
input dbg_pi_f_dec,
|
313 |
|
|
input dbg_po_f_inc,
|
314 |
|
|
input dbg_po_f_stg23_sel,
|
315 |
|
|
input dbg_po_f_dec,
|
316 |
|
|
output [6*DQS_WIDTH*RANKS-1:0] dbg_cpt_tap_cnt,
|
317 |
|
|
output [5*DQS_WIDTH*RANKS-1:0] dbg_dq_idelay_tap_cnt,
|
318 |
|
|
output dbg_rddata_valid,
|
319 |
|
|
output [6*DQS_WIDTH-1:0] dbg_wrlvl_fine_tap_cnt,
|
320 |
|
|
output [3*DQS_WIDTH-1:0] dbg_wrlvl_coarse_tap_cnt,
|
321 |
|
|
output ref_dll_lock,
|
322 |
|
|
input rst_phaser_ref,
|
323 |
|
|
input iddr_rst,
|
324 |
|
|
output [6*RANKS-1:0] dbg_rd_data_offset,
|
325 |
|
|
output [255:0] dbg_calib_top,
|
326 |
|
|
output [255:0] dbg_phy_wrlvl,
|
327 |
|
|
output [255:0] dbg_phy_rdlvl,
|
328 |
|
|
output [99:0] dbg_phy_wrcal,
|
329 |
|
|
output [255:0] dbg_phy_init,
|
330 |
|
|
output [255:0] dbg_prbs_rdlvl,
|
331 |
|
|
output [255:0] dbg_dqs_found_cal,
|
332 |
|
|
output [5:0] dbg_pi_counter_read_val,
|
333 |
|
|
output [8:0] dbg_po_counter_read_val,
|
334 |
|
|
output dbg_pi_phaselock_start,
|
335 |
|
|
output dbg_pi_phaselocked_done,
|
336 |
|
|
output dbg_pi_phaselock_err,
|
337 |
|
|
output dbg_pi_dqsfound_start,
|
338 |
|
|
output dbg_pi_dqsfound_done,
|
339 |
|
|
output dbg_pi_dqsfound_err,
|
340 |
|
|
output dbg_wrcal_start,
|
341 |
|
|
output dbg_wrcal_done,
|
342 |
|
|
output dbg_wrcal_err,
|
343 |
|
|
output [11:0] dbg_pi_dqs_found_lanes_phy4lanes,
|
344 |
|
|
output [11:0] dbg_pi_phase_locked_phy4lanes,
|
345 |
|
|
output [6*RANKS-1:0] dbg_calib_rd_data_offset_1,
|
346 |
|
|
output [6*RANKS-1:0] dbg_calib_rd_data_offset_2,
|
347 |
|
|
output [5:0] dbg_data_offset,
|
348 |
|
|
output [5:0] dbg_data_offset_1,
|
349 |
|
|
output [5:0] dbg_data_offset_2,
|
350 |
|
|
output dbg_oclkdelay_calib_start,
|
351 |
|
|
output dbg_oclkdelay_calib_done,
|
352 |
|
|
output [255:0] dbg_phy_oclkdelay_cal,
|
353 |
|
|
output [DRAM_WIDTH*16 -1:0] dbg_oclkdelay_rd_data,
|
354 |
|
|
output [6*DQS_WIDTH*RANKS-1:0] dbg_prbs_final_dqs_tap_cnt_r,
|
355 |
|
|
output [6*DQS_WIDTH*RANKS-1:0] dbg_prbs_first_edge_taps,
|
356 |
|
|
output [6*DQS_WIDTH*RANKS-1:0] dbg_prbs_second_edge_taps
|
357 |
|
|
|
358 |
|
|
);
|
359 |
|
|
|
360 |
|
|
localparam IODELAY_GRP = (tCK <= 1500)? IODELAY_GRP1 : IODELAY_GRP0;
|
361 |
|
|
|
362 |
|
|
// wire [6*DQS_WIDTH*RANKS-1:0] prbs_final_dqs_tap_cnt_r;
|
363 |
|
|
// wire [6*DQS_WIDTH*RANKS-1:0] dbg_prbs_first_edge_taps;
|
364 |
|
|
// wire [6*DQS_WIDTH*RANKS-1:0] dbg_prbs_second_edge_taps;
|
365 |
|
|
|
366 |
|
|
wire correct_en;
|
367 |
|
|
wire [2*nCK_PER_CLK-1:0] raw_not_ecc;
|
368 |
|
|
wire [2*nCK_PER_CLK-1:0] ecc_single;
|
369 |
|
|
wire [2*nCK_PER_CLK-1:0] ecc_multiple;
|
370 |
|
|
wire [MC_ERR_ADDR_WIDTH-1:0] ecc_err_addr;
|
371 |
|
|
wire [DQ_WIDTH/8-1:0] fi_xor_we;
|
372 |
|
|
wire [DQ_WIDTH-1:0] fi_xor_wrdata;
|
373 |
|
|
|
374 |
|
|
wire [DATA_BUF_OFFSET_WIDTH-1:0] wr_data_offset;
|
375 |
|
|
wire wr_data_en;
|
376 |
|
|
wire [DATA_BUF_ADDR_WIDTH-1:0] wr_data_addr;
|
377 |
|
|
wire [DATA_BUF_OFFSET_WIDTH-1:0] rd_data_offset;
|
378 |
|
|
wire rd_data_en;
|
379 |
|
|
wire [DATA_BUF_ADDR_WIDTH-1:0] rd_data_addr;
|
380 |
|
|
wire accept;
|
381 |
|
|
wire accept_ns;
|
382 |
|
|
wire [2*nCK_PER_CLK*PAYLOAD_WIDTH-1:0] rd_data;
|
383 |
|
|
wire rd_data_end;
|
384 |
|
|
wire use_addr;
|
385 |
|
|
wire size;
|
386 |
|
|
wire [ROW_WIDTH-1:0] row;
|
387 |
|
|
wire [RANK_WIDTH-1:0] rank;
|
388 |
|
|
wire hi_priority;
|
389 |
|
|
wire [DATA_BUF_ADDR_WIDTH-1:0] data_buf_addr;
|
390 |
|
|
wire [COL_WIDTH-1:0] col;
|
391 |
|
|
wire [2:0] cmd;
|
392 |
|
|
wire [BANK_WIDTH-1:0] bank;
|
393 |
|
|
wire [2*nCK_PER_CLK*PAYLOAD_WIDTH-1:0] wr_data;
|
394 |
|
|
wire [2*nCK_PER_CLK*PAYLOAD_WIDTH/8-1:0] wr_data_mask;
|
395 |
|
|
|
396 |
|
|
wire app_sr_req_i;
|
397 |
|
|
wire app_sr_active_i;
|
398 |
|
|
wire app_ref_req_i;
|
399 |
|
|
wire app_ref_ack_i;
|
400 |
|
|
wire app_zq_req_i;
|
401 |
|
|
wire app_zq_ack_i;
|
402 |
|
|
|
403 |
|
|
wire rst_tg_mc;
|
404 |
|
|
wire error;
|
405 |
|
|
wire init_wrcal_complete;
|
406 |
|
|
reg reset /* synthesis syn_maxfan = 10 */;
|
407 |
|
|
|
408 |
|
|
//***************************************************************************
|
409 |
|
|
|
410 |
|
|
always @(posedge clk)
|
411 |
|
|
reset <= #TCQ (rst | rst_tg_mc);
|
412 |
|
|
|
413 |
|
|
|
414 |
|
|
assign fi_xor_we = {DQ_WIDTH/8{1'b0}} ;
|
415 |
|
|
assign fi_xor_wrdata = {DQ_WIDTH{1'b0}} ;
|
416 |
|
|
|
417 |
|
|
mig_7series_v2_3_mem_intfc #
|
418 |
|
|
(
|
419 |
|
|
.TCQ (TCQ),
|
420 |
|
|
.DDR3_VDD_OP_VOLT (DDR3_VDD_OP_VOLT),
|
421 |
|
|
.PAYLOAD_WIDTH (PAYLOAD_WIDTH),
|
422 |
|
|
.ADDR_CMD_MODE (ADDR_CMD_MODE),
|
423 |
|
|
.AL (AL),
|
424 |
|
|
.BANK_WIDTH (BANK_WIDTH),
|
425 |
|
|
.BM_CNT_WIDTH (BM_CNT_WIDTH),
|
426 |
|
|
.BURST_MODE (BURST_MODE),
|
427 |
|
|
.BURST_TYPE (BURST_TYPE),
|
428 |
|
|
.CA_MIRROR (CA_MIRROR),
|
429 |
|
|
.CK_WIDTH (CK_WIDTH),
|
430 |
|
|
.COL_WIDTH (COL_WIDTH),
|
431 |
|
|
.CMD_PIPE_PLUS1 (CMD_PIPE_PLUS1),
|
432 |
|
|
.CS_WIDTH (CS_WIDTH),
|
433 |
|
|
.nCS_PER_RANK (nCS_PER_RANK),
|
434 |
|
|
.CKE_WIDTH (CKE_WIDTH),
|
435 |
|
|
.DATA_WIDTH (DATA_WIDTH),
|
436 |
|
|
.DATA_BUF_ADDR_WIDTH (DATA_BUF_ADDR_WIDTH),
|
437 |
|
|
.MASTER_PHY_CTL (MASTER_PHY_CTL),
|
438 |
|
|
.DATA_BUF_OFFSET_WIDTH (DATA_BUF_OFFSET_WIDTH),
|
439 |
|
|
.DDR2_DQSN_ENABLE (DDR2_DQSN_ENABLE),
|
440 |
|
|
.DM_WIDTH (DM_WIDTH),
|
441 |
|
|
.DQ_CNT_WIDTH (DQ_CNT_WIDTH),
|
442 |
|
|
.DQ_WIDTH (DQ_WIDTH),
|
443 |
|
|
.DQS_CNT_WIDTH (DQS_CNT_WIDTH),
|
444 |
|
|
.DQS_WIDTH (DQS_WIDTH),
|
445 |
|
|
.DRAM_TYPE (DRAM_TYPE),
|
446 |
|
|
.DRAM_WIDTH (DRAM_WIDTH),
|
447 |
|
|
.ECC (ECC),
|
448 |
|
|
.ECC_WIDTH (ECC_WIDTH),
|
449 |
|
|
.MC_ERR_ADDR_WIDTH (MC_ERR_ADDR_WIDTH),
|
450 |
|
|
.REFCLK_FREQ (REFCLK_FREQ),
|
451 |
|
|
.nAL (nAL),
|
452 |
|
|
.nBANK_MACHS (nBANK_MACHS),
|
453 |
|
|
.nCK_PER_CLK (nCK_PER_CLK),
|
454 |
|
|
.ORDERING (ORDERING),
|
455 |
|
|
.OUTPUT_DRV (OUTPUT_DRV),
|
456 |
|
|
.IBUF_LPWR_MODE (IBUF_LPWR_MODE),
|
457 |
|
|
.BANK_TYPE (BANK_TYPE),
|
458 |
|
|
.DATA_IO_PRIM_TYPE (DATA_IO_PRIM_TYPE),
|
459 |
|
|
.DATA_IO_IDLE_PWRDWN (DATA_IO_IDLE_PWRDWN),
|
460 |
|
|
.IODELAY_GRP (IODELAY_GRP),
|
461 |
|
|
.FPGA_SPEED_GRADE (FPGA_SPEED_GRADE),
|
462 |
|
|
.REG_CTRL (REG_CTRL),
|
463 |
|
|
.RTT_NOM (RTT_NOM),
|
464 |
|
|
.RTT_WR (RTT_WR),
|
465 |
|
|
.CL (CL),
|
466 |
|
|
.CWL (CWL),
|
467 |
|
|
.tCK (tCK),
|
468 |
|
|
.tCKE (tCKE),
|
469 |
|
|
.tFAW (tFAW),
|
470 |
|
|
.tPRDI (tPRDI),
|
471 |
|
|
.tRAS (tRAS),
|
472 |
|
|
.tRCD (tRCD),
|
473 |
|
|
.tREFI (tREFI),
|
474 |
|
|
.tRFC (tRFC),
|
475 |
|
|
.tRP (tRP),
|
476 |
|
|
.tRRD (tRRD),
|
477 |
|
|
.tRTP (tRTP),
|
478 |
|
|
.tWTR (tWTR),
|
479 |
|
|
.tZQI (tZQI),
|
480 |
|
|
.tZQCS (tZQCS),
|
481 |
|
|
.USER_REFRESH (USER_REFRESH),
|
482 |
|
|
.TEMP_MON_EN (TEMP_MON_EN),
|
483 |
|
|
.WRLVL (WRLVL),
|
484 |
|
|
.DEBUG_PORT (DEBUG_PORT),
|
485 |
|
|
.CAL_WIDTH (CAL_WIDTH),
|
486 |
|
|
.RANK_WIDTH (RANK_WIDTH),
|
487 |
|
|
.RANKS (RANKS),
|
488 |
|
|
.ODT_WIDTH (ODT_WIDTH),
|
489 |
|
|
.ROW_WIDTH (ROW_WIDTH),
|
490 |
|
|
.SIM_BYPASS_INIT_CAL (SIM_BYPASS_INIT_CAL),
|
491 |
|
|
.BYTE_LANES_B0 (BYTE_LANES_B0),
|
492 |
|
|
.BYTE_LANES_B1 (BYTE_LANES_B1),
|
493 |
|
|
.BYTE_LANES_B2 (BYTE_LANES_B2),
|
494 |
|
|
.BYTE_LANES_B3 (BYTE_LANES_B3),
|
495 |
|
|
.BYTE_LANES_B4 (BYTE_LANES_B4),
|
496 |
|
|
.DATA_CTL_B0 (DATA_CTL_B0),
|
497 |
|
|
.DATA_CTL_B1 (DATA_CTL_B1),
|
498 |
|
|
.DATA_CTL_B2 (DATA_CTL_B2),
|
499 |
|
|
.DATA_CTL_B3 (DATA_CTL_B3),
|
500 |
|
|
.DATA_CTL_B4 (DATA_CTL_B4),
|
501 |
|
|
.PHY_0_BITLANES (PHY_0_BITLANES),
|
502 |
|
|
.PHY_1_BITLANES (PHY_1_BITLANES),
|
503 |
|
|
.PHY_2_BITLANES (PHY_2_BITLANES),
|
504 |
|
|
.CK_BYTE_MAP (CK_BYTE_MAP),
|
505 |
|
|
.ADDR_MAP (ADDR_MAP),
|
506 |
|
|
.BANK_MAP (BANK_MAP),
|
507 |
|
|
.CAS_MAP (CAS_MAP),
|
508 |
|
|
.CKE_ODT_BYTE_MAP (CKE_ODT_BYTE_MAP),
|
509 |
|
|
.CKE_MAP (CKE_MAP),
|
510 |
|
|
.ODT_MAP (ODT_MAP),
|
511 |
|
|
.CKE_ODT_AUX (CKE_ODT_AUX),
|
512 |
|
|
.CS_MAP (CS_MAP),
|
513 |
|
|
.PARITY_MAP (PARITY_MAP),
|
514 |
|
|
.RAS_MAP (RAS_MAP),
|
515 |
|
|
.WE_MAP (WE_MAP),
|
516 |
|
|
.DQS_BYTE_MAP (DQS_BYTE_MAP),
|
517 |
|
|
.DATA0_MAP (DATA0_MAP),
|
518 |
|
|
.DATA1_MAP (DATA1_MAP),
|
519 |
|
|
.DATA2_MAP (DATA2_MAP),
|
520 |
|
|
.DATA3_MAP (DATA3_MAP),
|
521 |
|
|
.DATA4_MAP (DATA4_MAP),
|
522 |
|
|
.DATA5_MAP (DATA5_MAP),
|
523 |
|
|
.DATA6_MAP (DATA6_MAP),
|
524 |
|
|
.DATA7_MAP (DATA7_MAP),
|
525 |
|
|
.DATA8_MAP (DATA8_MAP),
|
526 |
|
|
.DATA9_MAP (DATA9_MAP),
|
527 |
|
|
.DATA10_MAP (DATA10_MAP),
|
528 |
|
|
.DATA11_MAP (DATA11_MAP),
|
529 |
|
|
.DATA12_MAP (DATA12_MAP),
|
530 |
|
|
.DATA13_MAP (DATA13_MAP),
|
531 |
|
|
.DATA14_MAP (DATA14_MAP),
|
532 |
|
|
.DATA15_MAP (DATA15_MAP),
|
533 |
|
|
.DATA16_MAP (DATA16_MAP),
|
534 |
|
|
.DATA17_MAP (DATA17_MAP),
|
535 |
|
|
.MASK0_MAP (MASK0_MAP),
|
536 |
|
|
.MASK1_MAP (MASK1_MAP),
|
537 |
|
|
.SLOT_0_CONFIG (SLOT_0_CONFIG),
|
538 |
|
|
.SLOT_1_CONFIG (SLOT_1_CONFIG),
|
539 |
|
|
.CALIB_ROW_ADD (CALIB_ROW_ADD),
|
540 |
|
|
.CALIB_COL_ADD (CALIB_COL_ADD),
|
541 |
|
|
.CALIB_BA_ADD (CALIB_BA_ADD),
|
542 |
|
|
.STARVE_LIMIT (STARVE_LIMIT),
|
543 |
|
|
.USE_CS_PORT (USE_CS_PORT),
|
544 |
|
|
.USE_DM_PORT (USE_DM_PORT),
|
545 |
|
|
.USE_ODT_PORT (USE_ODT_PORT),
|
546 |
|
|
.IDELAY_ADJ (IDELAY_ADJ),
|
547 |
|
|
.FINE_PER_BIT (FINE_PER_BIT),
|
548 |
|
|
.CENTER_COMP_MODE (CENTER_COMP_MODE),
|
549 |
|
|
.PI_VAL_ADJ (PI_VAL_ADJ),
|
550 |
|
|
.TAPSPERKCLK (TAPSPERKCLK)
|
551 |
|
|
)
|
552 |
|
|
mem_intfc0
|
553 |
|
|
(
|
554 |
|
|
.clk (clk),
|
555 |
|
|
.clk_ref (tCK <= 1500 ? clk_ref[1] : clk_ref[0]),
|
556 |
|
|
.mem_refclk (mem_refclk), //memory clock
|
557 |
|
|
.freq_refclk (freq_refclk),
|
558 |
|
|
.pll_lock (pll_lock),
|
559 |
|
|
.sync_pulse (sync_pulse),
|
560 |
|
|
.mmcm_ps_clk (mmcm_ps_clk),
|
561 |
|
|
.poc_sample_pd (poc_sample_pd),
|
562 |
|
|
.rst (rst),
|
563 |
|
|
.error (error),
|
564 |
|
|
.reset (reset),
|
565 |
|
|
.rst_tg_mc (rst_tg_mc),
|
566 |
|
|
|
567 |
|
|
.ddr_dq (ddr_dq),
|
568 |
|
|
.ddr_dqs_n (ddr_dqs_n),
|
569 |
|
|
.ddr_dqs (ddr_dqs),
|
570 |
|
|
.ddr_addr (ddr_addr),
|
571 |
|
|
.ddr_ba (ddr_ba),
|
572 |
|
|
.ddr_cas_n (ddr_cas_n),
|
573 |
|
|
.ddr_ck_n (ddr_ck_n),
|
574 |
|
|
.ddr_ck (ddr_ck),
|
575 |
|
|
.ddr_cke (ddr_cke),
|
576 |
|
|
.ddr_cs_n (ddr_cs_n),
|
577 |
|
|
.ddr_dm (ddr_dm),
|
578 |
|
|
.ddr_odt (ddr_odt),
|
579 |
|
|
.ddr_ras_n (ddr_ras_n),
|
580 |
|
|
.ddr_reset_n (ddr_reset_n),
|
581 |
|
|
.ddr_parity (ddr_parity),
|
582 |
|
|
.ddr_we_n (ddr_we_n),
|
583 |
|
|
|
584 |
|
|
.slot_0_present (SLOT_0_CONFIG),
|
585 |
|
|
.slot_1_present (SLOT_1_CONFIG),
|
586 |
|
|
|
587 |
|
|
.correct_en (correct_en),
|
588 |
|
|
.bank (bank),
|
589 |
|
|
.cmd (cmd),
|
590 |
|
|
.col (col),
|
591 |
|
|
.data_buf_addr (data_buf_addr),
|
592 |
|
|
.wr_data (wr_data),
|
593 |
|
|
.wr_data_mask (wr_data_mask),
|
594 |
|
|
.rank (rank),
|
595 |
|
|
.raw_not_ecc (raw_not_ecc),
|
596 |
|
|
.row (row),
|
597 |
|
|
.hi_priority (hi_priority),
|
598 |
|
|
.size (size),
|
599 |
|
|
.use_addr (use_addr),
|
600 |
|
|
.accept (accept),
|
601 |
|
|
.accept_ns (accept_ns),
|
602 |
|
|
.ecc_single (ecc_single),
|
603 |
|
|
.ecc_multiple (ecc_multiple),
|
604 |
|
|
.ecc_err_addr (ecc_err_addr),
|
605 |
|
|
.rd_data (rd_data),
|
606 |
|
|
.rd_data_addr (rd_data_addr),
|
607 |
|
|
.rd_data_en (rd_data_en),
|
608 |
|
|
.rd_data_end (rd_data_end),
|
609 |
|
|
.rd_data_offset (rd_data_offset),
|
610 |
|
|
.wr_data_addr (wr_data_addr),
|
611 |
|
|
.wr_data_en (wr_data_en),
|
612 |
|
|
.wr_data_offset (wr_data_offset),
|
613 |
|
|
.bank_mach_next (bank_mach_next),
|
614 |
|
|
.init_calib_complete (init_calib_complete),
|
615 |
|
|
.init_wrcal_complete (init_wrcal_complete),
|
616 |
|
|
.app_sr_req (app_sr_req_i),
|
617 |
|
|
.app_sr_active (app_sr_active_i),
|
618 |
|
|
.app_ref_req (app_ref_req_i),
|
619 |
|
|
.app_ref_ack (app_ref_ack_i),
|
620 |
|
|
.app_zq_req (app_zq_req_i),
|
621 |
|
|
.app_zq_ack (app_zq_ack_i),
|
622 |
|
|
|
623 |
|
|
.device_temp (device_temp),
|
624 |
|
|
.psen (psen),
|
625 |
|
|
.psincdec (psincdec),
|
626 |
|
|
.psdone (psdone),
|
627 |
|
|
.fi_xor_we (fi_xor_we),
|
628 |
|
|
.fi_xor_wrdata (fi_xor_wrdata),
|
629 |
|
|
|
630 |
|
|
|
631 |
|
|
|
632 |
|
|
.dbg_idel_up_all (dbg_idel_up_all),
|
633 |
|
|
.dbg_idel_down_all (dbg_idel_down_all),
|
634 |
|
|
.dbg_idel_up_cpt (dbg_idel_up_cpt),
|
635 |
|
|
.dbg_idel_down_cpt (dbg_idel_down_cpt),
|
636 |
|
|
.dbg_sel_idel_cpt (dbg_sel_idel_cpt),
|
637 |
|
|
.dbg_sel_all_idel_cpt (dbg_sel_all_idel_cpt),
|
638 |
|
|
.dbg_calib_top (dbg_calib_top),
|
639 |
|
|
.dbg_cpt_first_edge_cnt (dbg_cpt_first_edge_cnt),
|
640 |
|
|
.dbg_cpt_second_edge_cnt (dbg_cpt_second_edge_cnt),
|
641 |
|
|
.dbg_phy_rdlvl (dbg_phy_rdlvl),
|
642 |
|
|
.dbg_phy_wrcal (dbg_phy_wrcal),
|
643 |
|
|
.dbg_final_po_fine_tap_cnt (dbg_final_po_fine_tap_cnt),
|
644 |
|
|
.dbg_final_po_coarse_tap_cnt (dbg_final_po_coarse_tap_cnt),
|
645 |
|
|
.dbg_rd_data_edge_detect (dbg_rd_data_edge_detect),
|
646 |
|
|
.dbg_rddata (dbg_rddata),
|
647 |
|
|
.dbg_rdlvl_done (dbg_rdlvl_done),
|
648 |
|
|
.dbg_rdlvl_err (dbg_rdlvl_err),
|
649 |
|
|
.dbg_rdlvl_start (dbg_rdlvl_start),
|
650 |
|
|
.dbg_tap_cnt_during_wrlvl (dbg_tap_cnt_during_wrlvl),
|
651 |
|
|
.dbg_wl_edge_detect_valid (dbg_wl_edge_detect_valid),
|
652 |
|
|
.dbg_wrlvl_done (dbg_wrlvl_done),
|
653 |
|
|
.dbg_wrlvl_err (dbg_wrlvl_err),
|
654 |
|
|
.dbg_wrlvl_start (dbg_wrlvl_start),
|
655 |
|
|
|
656 |
|
|
.dbg_sel_pi_incdec (dbg_sel_pi_incdec),
|
657 |
|
|
.dbg_sel_po_incdec (dbg_sel_po_incdec),
|
658 |
|
|
.dbg_byte_sel (dbg_byte_sel),
|
659 |
|
|
.dbg_pi_f_inc (dbg_pi_f_inc),
|
660 |
|
|
.dbg_pi_f_dec (dbg_pi_f_dec),
|
661 |
|
|
.dbg_po_f_inc (dbg_po_f_inc),
|
662 |
|
|
.dbg_po_f_stg23_sel (dbg_po_f_stg23_sel),
|
663 |
|
|
.dbg_po_f_dec (dbg_po_f_dec),
|
664 |
|
|
.dbg_cpt_tap_cnt (dbg_cpt_tap_cnt),
|
665 |
|
|
.dbg_dq_idelay_tap_cnt (dbg_dq_idelay_tap_cnt),
|
666 |
|
|
.dbg_rddata_valid (dbg_rddata_valid),
|
667 |
|
|
.dbg_wrlvl_fine_tap_cnt (dbg_wrlvl_fine_tap_cnt),
|
668 |
|
|
.dbg_wrlvl_coarse_tap_cnt (dbg_wrlvl_coarse_tap_cnt),
|
669 |
|
|
.dbg_phy_wrlvl (dbg_phy_wrlvl),
|
670 |
|
|
.dbg_pi_counter_read_val (dbg_pi_counter_read_val),
|
671 |
|
|
.dbg_po_counter_read_val (dbg_po_counter_read_val),
|
672 |
|
|
.ref_dll_lock (ref_dll_lock),
|
673 |
|
|
.rst_phaser_ref (rst_phaser_ref),
|
674 |
|
|
.iddr_rst (iddr_rst),
|
675 |
|
|
.dbg_rd_data_offset (dbg_rd_data_offset),
|
676 |
|
|
.dbg_phy_init (dbg_phy_init),
|
677 |
|
|
.dbg_prbs_rdlvl (dbg_prbs_rdlvl),
|
678 |
|
|
.dbg_dqs_found_cal (dbg_dqs_found_cal),
|
679 |
|
|
.dbg_pi_phaselock_start (dbg_pi_phaselock_start),
|
680 |
|
|
.dbg_pi_phaselocked_done (dbg_pi_phaselocked_done),
|
681 |
|
|
.dbg_pi_phaselock_err (dbg_pi_phaselock_err),
|
682 |
|
|
.dbg_pi_dqsfound_start (dbg_pi_dqsfound_start),
|
683 |
|
|
.dbg_pi_dqsfound_done (dbg_pi_dqsfound_done),
|
684 |
|
|
.dbg_pi_dqsfound_err (dbg_pi_dqsfound_err),
|
685 |
|
|
.dbg_wrcal_start (dbg_wrcal_start),
|
686 |
|
|
.dbg_wrcal_done (dbg_wrcal_done),
|
687 |
|
|
.dbg_wrcal_err (dbg_wrcal_err),
|
688 |
|
|
.dbg_pi_dqs_found_lanes_phy4lanes (dbg_pi_dqs_found_lanes_phy4lanes),
|
689 |
|
|
.dbg_pi_phase_locked_phy4lanes (dbg_pi_phase_locked_phy4lanes),
|
690 |
|
|
.dbg_calib_rd_data_offset_1 (dbg_calib_rd_data_offset_1),
|
691 |
|
|
.dbg_calib_rd_data_offset_2 (dbg_calib_rd_data_offset_2),
|
692 |
|
|
.dbg_data_offset (dbg_data_offset),
|
693 |
|
|
.dbg_data_offset_1 (dbg_data_offset_1),
|
694 |
|
|
.dbg_data_offset_2 (dbg_data_offset_2),
|
695 |
|
|
.dbg_phy_oclkdelay_cal (dbg_phy_oclkdelay_cal),
|
696 |
|
|
.dbg_oclkdelay_rd_data (dbg_oclkdelay_rd_data),
|
697 |
|
|
.dbg_oclkdelay_calib_start (dbg_oclkdelay_calib_start),
|
698 |
|
|
.dbg_oclkdelay_calib_done (dbg_oclkdelay_calib_done),
|
699 |
|
|
.prbs_final_dqs_tap_cnt_r (dbg_prbs_final_dqs_tap_cnt_r),
|
700 |
|
|
.dbg_prbs_first_edge_taps (dbg_prbs_first_edge_taps),
|
701 |
|
|
.dbg_prbs_second_edge_taps (dbg_prbs_second_edge_taps)
|
702 |
|
|
);
|
703 |
|
|
|
704 |
|
|
mig_7series_v2_3_ui_top #
|
705 |
|
|
(
|
706 |
|
|
.TCQ (TCQ),
|
707 |
|
|
.APP_DATA_WIDTH (APP_DATA_WIDTH),
|
708 |
|
|
.APP_MASK_WIDTH (APP_MASK_WIDTH),
|
709 |
|
|
.BANK_WIDTH (BANK_WIDTH),
|
710 |
|
|
.COL_WIDTH (COL_WIDTH),
|
711 |
|
|
.CWL (CWL),
|
712 |
|
|
.DATA_BUF_ADDR_WIDTH (DATA_BUF_ADDR_WIDTH),
|
713 |
|
|
.ECC (ECC),
|
714 |
|
|
.ECC_TEST (ECC_TEST),
|
715 |
|
|
.nCK_PER_CLK (nCK_PER_CLK),
|
716 |
|
|
.ORDERING (ORDERING),
|
717 |
|
|
.RANKS (RANKS),
|
718 |
|
|
.RANK_WIDTH (RANK_WIDTH),
|
719 |
|
|
.ROW_WIDTH (ROW_WIDTH),
|
720 |
|
|
.MEM_ADDR_ORDER (MEM_ADDR_ORDER)
|
721 |
|
|
)
|
722 |
|
|
u_ui_top
|
723 |
|
|
(
|
724 |
|
|
.wr_data_mask (wr_data_mask[APP_MASK_WIDTH-1:0]),
|
725 |
|
|
.wr_data (wr_data[APP_DATA_WIDTH-1:0]),
|
726 |
|
|
.use_addr (use_addr),
|
727 |
|
|
.size (size),
|
728 |
|
|
.row (row),
|
729 |
|
|
.raw_not_ecc (raw_not_ecc),
|
730 |
|
|
.rank (rank),
|
731 |
|
|
.hi_priority (hi_priority),
|
732 |
|
|
.data_buf_addr (data_buf_addr),
|
733 |
|
|
.col (col),
|
734 |
|
|
.cmd (cmd),
|
735 |
|
|
.bank (bank),
|
736 |
|
|
.app_wdf_rdy (app_wdf_rdy),
|
737 |
|
|
.app_rdy (app_rdy),
|
738 |
|
|
.app_rd_data_valid (app_rd_data_valid),
|
739 |
|
|
.app_rd_data_end (app_rd_data_end),
|
740 |
|
|
.app_rd_data (app_rd_data),
|
741 |
|
|
.app_ecc_multiple_err (app_ecc_multiple_err),
|
742 |
|
|
.correct_en (correct_en),
|
743 |
|
|
.wr_data_offset (wr_data_offset),
|
744 |
|
|
.wr_data_en (wr_data_en),
|
745 |
|
|
.wr_data_addr (wr_data_addr),
|
746 |
|
|
.rst (reset),
|
747 |
|
|
.rd_data_offset (rd_data_offset),
|
748 |
|
|
.rd_data_end (rd_data_end),
|
749 |
|
|
.rd_data_en (rd_data_en),
|
750 |
|
|
.rd_data_addr (rd_data_addr),
|
751 |
|
|
.rd_data (rd_data[APP_DATA_WIDTH-1:0]),
|
752 |
|
|
.ecc_multiple (ecc_multiple),
|
753 |
|
|
.clk (clk),
|
754 |
|
|
.app_wdf_wren (app_wdf_wren),
|
755 |
|
|
.app_wdf_mask (app_wdf_mask),
|
756 |
|
|
.app_wdf_end (app_wdf_end),
|
757 |
|
|
.app_wdf_data (app_wdf_data),
|
758 |
|
|
.app_sz (1'b1),
|
759 |
|
|
.app_raw_not_ecc (app_raw_not_ecc),
|
760 |
|
|
.app_hi_pri (app_hi_pri),
|
761 |
|
|
.app_en (app_en),
|
762 |
|
|
.app_cmd (app_cmd),
|
763 |
|
|
.app_addr (app_addr),
|
764 |
|
|
.accept_ns (accept_ns),
|
765 |
|
|
.accept (accept),
|
766 |
|
|
.app_correct_en (app_correct_en_i),
|
767 |
|
|
.app_sr_req (app_sr_req),
|
768 |
|
|
.sr_req (app_sr_req_i),
|
769 |
|
|
.sr_active (app_sr_active_i),
|
770 |
|
|
.app_sr_active (app_sr_active),
|
771 |
|
|
.app_ref_req (app_ref_req),
|
772 |
|
|
.ref_req (app_ref_req_i),
|
773 |
|
|
.ref_ack (app_ref_ack_i),
|
774 |
|
|
.app_ref_ack (app_ref_ack),
|
775 |
|
|
.app_zq_req (app_zq_req),
|
776 |
|
|
.zq_req (app_zq_req_i),
|
777 |
|
|
.zq_ack (app_zq_ack_i),
|
778 |
|
|
.app_zq_ack (app_zq_ack)
|
779 |
|
|
);
|
780 |
|
|
|
781 |
|
|
endmodule
|