1 |
32 |
redbear |
// (C) 2001-2017 Intel Corporation. All rights reserved.
|
2 |
|
|
// Your use of Intel Corporation's design tools, logic functions and other
|
3 |
|
|
// software and tools, and its AMPP partner logic functions, and any output
|
4 |
40 |
redbear |
// files from any of the foregoing (including device programming or simulation
|
5 |
32 |
redbear |
// files), and any associated documentation or information are expressly subject
|
6 |
|
|
// to the terms and conditions of the Intel Program License Subscription
|
7 |
40 |
redbear |
// Agreement, Intel FPGA IP License Agreement, or other applicable
|
8 |
32 |
redbear |
// license agreement, including, without limitation, that your use is for the
|
9 |
|
|
// sole purpose of programming logic devices manufactured by Intel and sold by
|
10 |
|
|
// Intel or its authorized distributors. Please refer to the applicable
|
11 |
|
|
// agreement for further details.
|
12 |
|
|
|
13 |
|
|
|
14 |
|
|
|
15 |
|
|
`timescale 1 ps / 1 ps
|
16 |
|
|
|
17 |
40 |
redbear |
(* altera_attribute = "-name IP_TOOL_NAME altera_mem_if_ddr3_hard_phy_core; -name IP_TOOL_VERSION 17.1; -name FITTER_ADJUST_HC_SHORT_PATH_GUARDBAND 100" *)
|
18 |
32 |
redbear |
module hps_sdram_p0 (
|
19 |
|
|
global_reset_n,
|
20 |
|
|
soft_reset_n,
|
21 |
|
|
csr_soft_reset_req,
|
22 |
|
|
parallelterminationcontrol,
|
23 |
|
|
seriesterminationcontrol,
|
24 |
|
|
pll_mem_clk,
|
25 |
|
|
pll_write_clk,
|
26 |
|
|
pll_write_clk_pre_phy_clk,
|
27 |
|
|
pll_addr_cmd_clk,
|
28 |
|
|
pll_avl_clk,
|
29 |
|
|
pll_config_clk,
|
30 |
|
|
pll_mem_phy_clk,
|
31 |
|
|
afi_phy_clk,
|
32 |
|
|
pll_avl_phy_clk,
|
33 |
|
|
pll_locked,
|
34 |
|
|
dll_pll_locked,
|
35 |
|
|
dll_delayctrl,
|
36 |
|
|
dll_clk,
|
37 |
|
|
ctl_reset_n,
|
38 |
|
|
afi_reset_n,
|
39 |
|
|
afi_reset_export_n,
|
40 |
|
|
afi_clk,
|
41 |
|
|
afi_half_clk,
|
42 |
|
|
afi_addr,
|
43 |
|
|
afi_ba,
|
44 |
|
|
afi_cke,
|
45 |
|
|
afi_cs_n,
|
46 |
|
|
afi_ras_n,
|
47 |
|
|
afi_we_n,
|
48 |
|
|
afi_cas_n,
|
49 |
|
|
afi_rst_n,
|
50 |
|
|
afi_odt,
|
51 |
|
|
afi_mem_clk_disable,
|
52 |
|
|
afi_dqs_burst,
|
53 |
|
|
afi_wdata,
|
54 |
|
|
afi_wdata_valid,
|
55 |
|
|
afi_dm,
|
56 |
|
|
afi_rdata,
|
57 |
|
|
afi_rdata_en,
|
58 |
|
|
afi_rdata_en_full,
|
59 |
|
|
afi_rdata_valid,
|
60 |
|
|
afi_cal_success,
|
61 |
|
|
afi_cal_fail,
|
62 |
|
|
afi_wlat,
|
63 |
|
|
afi_rlat,
|
64 |
|
|
avl_read,
|
65 |
|
|
avl_write,
|
66 |
|
|
avl_address,
|
67 |
|
|
avl_writedata,
|
68 |
|
|
avl_waitrequest,
|
69 |
|
|
avl_readdata,
|
70 |
|
|
cfg_addlat,
|
71 |
|
|
cfg_bankaddrwidth,
|
72 |
|
|
cfg_caswrlat,
|
73 |
|
|
cfg_coladdrwidth,
|
74 |
|
|
cfg_csaddrwidth,
|
75 |
|
|
cfg_devicewidth,
|
76 |
|
|
cfg_dramconfig,
|
77 |
|
|
cfg_interfacewidth,
|
78 |
|
|
cfg_rowaddrwidth,
|
79 |
|
|
cfg_tcl,
|
80 |
|
|
cfg_tmrd,
|
81 |
|
|
cfg_trefi,
|
82 |
|
|
cfg_trfc,
|
83 |
|
|
cfg_twr,
|
84 |
|
|
io_intaddrdout,
|
85 |
|
|
io_intbadout,
|
86 |
|
|
io_intcasndout,
|
87 |
|
|
io_intckdout,
|
88 |
|
|
io_intckedout,
|
89 |
|
|
io_intckndout,
|
90 |
|
|
io_intcsndout,
|
91 |
|
|
io_intdmdout,
|
92 |
|
|
io_intdqdin,
|
93 |
|
|
io_intdqdout,
|
94 |
|
|
io_intdqoe,
|
95 |
|
|
io_intdqsbdout,
|
96 |
|
|
io_intdqsboe,
|
97 |
|
|
io_intdqsdout,
|
98 |
|
|
io_intdqslogicdqsena,
|
99 |
|
|
io_intdqslogicfiforeset,
|
100 |
|
|
io_intdqslogicincrdataen,
|
101 |
|
|
io_intdqslogicincwrptr,
|
102 |
|
|
io_intdqslogicoct,
|
103 |
|
|
io_intdqslogicrdatavalid,
|
104 |
|
|
io_intdqslogicreadlatency,
|
105 |
|
|
io_intdqsoe,
|
106 |
|
|
io_intodtdout,
|
107 |
|
|
io_intrasndout,
|
108 |
|
|
io_intresetndout,
|
109 |
|
|
io_intwendout,
|
110 |
|
|
io_intafirlat,
|
111 |
|
|
io_intafiwlat,
|
112 |
|
|
io_intaficalfail,
|
113 |
|
|
io_intaficalsuccess,
|
114 |
|
|
mem_a,
|
115 |
|
|
mem_ba,
|
116 |
|
|
mem_ck,
|
117 |
|
|
mem_ck_n,
|
118 |
|
|
mem_cke,
|
119 |
|
|
mem_cs_n,
|
120 |
|
|
mem_dm,
|
121 |
|
|
mem_ras_n,
|
122 |
|
|
mem_cas_n,
|
123 |
|
|
mem_we_n,
|
124 |
|
|
mem_dq,
|
125 |
|
|
mem_dqs,
|
126 |
|
|
mem_dqs_n,
|
127 |
|
|
mem_reset_n,
|
128 |
|
|
mem_odt,
|
129 |
|
|
avl_clk,
|
130 |
|
|
scc_clk,
|
131 |
|
|
avl_reset_n,
|
132 |
|
|
scc_reset_n,
|
133 |
|
|
scc_data,
|
134 |
|
|
scc_dqs_ena,
|
135 |
|
|
scc_dqs_io_ena,
|
136 |
|
|
scc_dq_ena,
|
137 |
|
|
scc_dm_ena,
|
138 |
|
|
scc_upd,
|
139 |
|
|
capture_strobe_tracking,
|
140 |
|
|
phy_clk,
|
141 |
|
|
ctl_clk,
|
142 |
|
|
phy_reset_n
|
143 |
|
|
);
|
144 |
|
|
|
145 |
|
|
|
146 |
|
|
// ********************************************************************************************************************************
|
147 |
|
|
// BEGIN PARAMETER SECTION
|
148 |
|
|
// All parameters default to "" will have their values passed in from higher level wrapper with the controller and driver.
|
149 |
|
|
parameter DEVICE_FAMILY = "Cyclone V";
|
150 |
|
|
parameter IS_HHP_HPS = "true";
|
151 |
|
|
|
152 |
|
|
// choose between abstract (fast) and regular model
|
153 |
|
|
`ifndef ALTERA_ALT_MEM_IF_PHY_FAST_SIM_MODEL
|
154 |
|
|
`define ALTERA_ALT_MEM_IF_PHY_FAST_SIM_MODEL 0
|
155 |
|
|
`endif
|
156 |
|
|
|
157 |
|
|
parameter ALTERA_ALT_MEM_IF_PHY_FAST_SIM_MODEL = `ALTERA_ALT_MEM_IF_PHY_FAST_SIM_MODEL;
|
158 |
|
|
|
159 |
|
|
localparam FAST_SIM_MODEL = ALTERA_ALT_MEM_IF_PHY_FAST_SIM_MODEL;
|
160 |
|
|
|
161 |
|
|
|
162 |
|
|
// On-chip termination
|
163 |
|
|
parameter OCT_TERM_CONTROL_WIDTH = 16;
|
164 |
|
|
|
165 |
|
|
// PHY-Memory Interface
|
166 |
|
|
// Memory device specific parameters, they are set according to the memory spec.
|
167 |
|
|
parameter MEM_IF_ADDR_WIDTH = 13;
|
168 |
|
|
parameter MEM_IF_BANKADDR_WIDTH = 3;
|
169 |
|
|
parameter MEM_IF_CK_WIDTH = 1;
|
170 |
|
|
parameter MEM_IF_CLK_EN_WIDTH = 1;
|
171 |
|
|
parameter MEM_IF_CS_WIDTH = 1;
|
172 |
|
|
parameter MEM_IF_DM_WIDTH = 1;
|
173 |
|
|
parameter MEM_IF_CONTROL_WIDTH = 1;
|
174 |
|
|
parameter MEM_IF_DQ_WIDTH = 8;
|
175 |
|
|
parameter MEM_IF_DQS_WIDTH = 1;
|
176 |
|
|
parameter MEM_IF_READ_DQS_WIDTH = 1;
|
177 |
|
|
parameter MEM_IF_WRITE_DQS_WIDTH = 1;
|
178 |
|
|
parameter MEM_IF_ODT_WIDTH = 1;
|
179 |
|
|
|
180 |
|
|
|
181 |
|
|
// DLL Interface
|
182 |
|
|
parameter DLL_DELAY_CTRL_WIDTH = 7;
|
183 |
|
|
|
184 |
|
|
parameter SCC_DATA_WIDTH = 1;
|
185 |
|
|
|
186 |
|
|
// Read Datapath parameters, the values should not be changed unless the intention is to change the architecture.
|
187 |
|
|
// Read valid prediction FIFO
|
188 |
|
|
parameter READ_VALID_FIFO_SIZE = 16;
|
189 |
|
|
|
190 |
|
|
// Data resynchronization FIFO
|
191 |
|
|
parameter READ_FIFO_SIZE = 8;
|
192 |
|
|
|
193 |
|
|
parameter MR1_ODS = 0;
|
194 |
|
|
parameter MR1_RTT = 0;
|
195 |
|
|
parameter MR2_RTT_WR = 0;
|
196 |
|
|
|
197 |
|
|
|
198 |
|
|
// The DLL offset control width
|
199 |
|
|
parameter DLL_OFFSET_CTRL_WIDTH = 6;
|
200 |
|
|
|
201 |
|
|
parameter CALIB_REG_WIDTH = 8;
|
202 |
|
|
|
203 |
|
|
|
204 |
|
|
parameter TB_PROTOCOL = "DDR3";
|
205 |
|
|
parameter TB_MEM_CLK_FREQ = "300.0";
|
206 |
|
|
parameter TB_RATE = "FULL";
|
207 |
|
|
parameter TB_MEM_DQ_WIDTH = "8";
|
208 |
|
|
parameter TB_MEM_DQS_WIDTH = "1";
|
209 |
|
|
parameter TB_PLL_DLL_MASTER = "true";
|
210 |
|
|
|
211 |
|
|
parameter FAST_SIM_CALIBRATION = "false";
|
212 |
|
|
|
213 |
|
|
|
214 |
|
|
parameter AC_ROM_INIT_FILE_NAME = "hps_AC_ROM.hex";
|
215 |
|
|
parameter INST_ROM_INIT_FILE_NAME = "hps_inst_ROM.hex";
|
216 |
|
|
|
217 |
|
|
localparam SIM_FILESET = ("false" == "true");
|
218 |
|
|
|
219 |
|
|
|
220 |
|
|
// END PARAMETER SECTION
|
221 |
|
|
// ********************************************************************************************************************************
|
222 |
|
|
|
223 |
|
|
|
224 |
|
|
// ********************************************************************************************************************************
|
225 |
|
|
// BEGIN PORT SECTION
|
226 |
|
|
|
227 |
|
|
|
228 |
|
|
// When the PHY is selected to be a PLL/DLL SLAVE, the PLL and DLL are instantied at the top level of the example design
|
229 |
|
|
input pll_mem_clk;
|
230 |
|
|
input pll_write_clk;
|
231 |
|
|
input pll_write_clk_pre_phy_clk;
|
232 |
|
|
input pll_addr_cmd_clk;
|
233 |
|
|
input pll_avl_clk;
|
234 |
|
|
input pll_config_clk;
|
235 |
|
|
input pll_locked;
|
236 |
|
|
input pll_mem_phy_clk;
|
237 |
|
|
input afi_phy_clk;
|
238 |
|
|
input pll_avl_phy_clk;
|
239 |
|
|
|
240 |
|
|
|
241 |
|
|
|
242 |
|
|
|
243 |
|
|
input [DLL_DELAY_CTRL_WIDTH-1:0] dll_delayctrl;
|
244 |
|
|
output dll_pll_locked;
|
245 |
|
|
output dll_clk;
|
246 |
|
|
|
247 |
|
|
|
248 |
|
|
|
249 |
|
|
// Reset Interface, AFI 2.0
|
250 |
|
|
input global_reset_n; // Resets (active-low) the whole system (all PHY logic + PLL)
|
251 |
|
|
input soft_reset_n; // Resets (active-low) PHY logic only, PLL is NOT reset
|
252 |
|
|
output afi_reset_n; // Asynchronously asserted and synchronously de-asserted on afi_clk domain
|
253 |
|
|
output afi_reset_export_n; // Asynchronously asserted and synchronously de-asserted on afi_clk domain
|
254 |
|
|
// should be used to reset system level afi_clk domain logic
|
255 |
|
|
output ctl_reset_n; // Asynchronously asserted and synchronously de-asserted on ctl_clk domain
|
256 |
|
|
// should be used by hard controller only
|
257 |
|
|
input csr_soft_reset_req; // Reset request (active_high) being driven by external debug master
|
258 |
|
|
|
259 |
|
|
// OCT termination control signals
|
260 |
|
|
input [OCT_TERM_CONTROL_WIDTH-1:0] parallelterminationcontrol;
|
261 |
|
|
input [OCT_TERM_CONTROL_WIDTH-1:0] seriesterminationcontrol;
|
262 |
|
|
|
263 |
|
|
|
264 |
|
|
// PHY-Controller Interface, AFI 2.0
|
265 |
|
|
// Control Interface
|
266 |
|
|
input [19:0] afi_addr; // address
|
267 |
|
|
input [2:0] afi_ba; // bank
|
268 |
|
|
input [1:0] afi_cke; // clock enable
|
269 |
|
|
input [1:0] afi_cs_n; // chip select
|
270 |
|
|
input [0:0] afi_ras_n;
|
271 |
|
|
input [0:0] afi_we_n;
|
272 |
|
|
input [0:0] afi_cas_n;
|
273 |
|
|
input [1:0] afi_odt;
|
274 |
|
|
input [0:0] afi_rst_n;
|
275 |
|
|
input [0:0] afi_mem_clk_disable;
|
276 |
|
|
|
277 |
|
|
|
278 |
|
|
// Write data interface
|
279 |
|
|
input [4:0] afi_dqs_burst;
|
280 |
|
|
input [79:0] afi_wdata; // write data
|
281 |
|
|
input [4:0] afi_wdata_valid; // write data valid, used to maintain write latency required by protocol spec
|
282 |
|
|
input [9:0] afi_dm; // write data mask
|
283 |
|
|
|
284 |
|
|
// Read data interface
|
285 |
|
|
output [79:0] afi_rdata; // read data
|
286 |
|
|
input [4:0] afi_rdata_en; // read enable, used to maintain the read latency calibrated by PHY
|
287 |
|
|
input [4:0] afi_rdata_en_full; // read enable full burst, used to create DQS enable
|
288 |
|
|
output [0:0] afi_rdata_valid; // read data valid
|
289 |
|
|
|
290 |
|
|
// Status interface
|
291 |
|
|
output afi_cal_success; // calibration success
|
292 |
|
|
output afi_cal_fail; // calibration failure
|
293 |
|
|
|
294 |
|
|
output [3:0] afi_wlat;
|
295 |
|
|
output [4:0] afi_rlat;
|
296 |
|
|
|
297 |
|
|
|
298 |
|
|
// Avalon interface to the sequencer
|
299 |
|
|
input [15:0] avl_address;
|
300 |
|
|
input avl_read;
|
301 |
|
|
output [31:0] avl_readdata;
|
302 |
|
|
output avl_waitrequest;
|
303 |
|
|
input avl_write;
|
304 |
|
|
input [31:0] avl_writedata;
|
305 |
|
|
|
306 |
|
|
|
307 |
|
|
// Configuration interface to the memory controller
|
308 |
|
|
input [7:0] cfg_addlat;
|
309 |
|
|
input [7:0] cfg_bankaddrwidth;
|
310 |
|
|
input [7:0] cfg_caswrlat;
|
311 |
|
|
input [7:0] cfg_coladdrwidth;
|
312 |
|
|
input [7:0] cfg_csaddrwidth;
|
313 |
|
|
input [7:0] cfg_devicewidth;
|
314 |
|
|
input [23:0] cfg_dramconfig;
|
315 |
|
|
input [7:0] cfg_interfacewidth;
|
316 |
|
|
input [7:0] cfg_rowaddrwidth;
|
317 |
|
|
input [7:0] cfg_tcl;
|
318 |
|
|
input [7:0] cfg_tmrd;
|
319 |
|
|
input [15:0] cfg_trefi;
|
320 |
|
|
input [7:0] cfg_trfc;
|
321 |
|
|
input [7:0] cfg_twr;
|
322 |
|
|
|
323 |
|
|
|
324 |
|
|
// IO/bypass interface to the core (or soft controller)
|
325 |
|
|
input [63:0] io_intaddrdout;
|
326 |
|
|
input [11:0] io_intbadout;
|
327 |
|
|
input [3:0] io_intcasndout;
|
328 |
|
|
input [3:0] io_intckdout;
|
329 |
|
|
input [7:0] io_intckedout;
|
330 |
|
|
input [3:0] io_intckndout;
|
331 |
|
|
input [7:0] io_intcsndout;
|
332 |
|
|
input [19:0] io_intdmdout;
|
333 |
|
|
output [179:0] io_intdqdin;
|
334 |
|
|
input [179:0] io_intdqdout;
|
335 |
|
|
input [89:0] io_intdqoe;
|
336 |
|
|
input [19:0] io_intdqsbdout;
|
337 |
|
|
input [9:0] io_intdqsboe;
|
338 |
|
|
input [19:0] io_intdqsdout;
|
339 |
|
|
input [9:0] io_intdqslogicdqsena;
|
340 |
|
|
input [4:0] io_intdqslogicfiforeset;
|
341 |
|
|
input [9:0] io_intdqslogicincrdataen;
|
342 |
|
|
input [9:0] io_intdqslogicincwrptr;
|
343 |
|
|
input [9:0] io_intdqslogicoct;
|
344 |
|
|
output [4:0] io_intdqslogicrdatavalid;
|
345 |
|
|
input [24:0] io_intdqslogicreadlatency;
|
346 |
|
|
input [9:0] io_intdqsoe;
|
347 |
|
|
input [7:0] io_intodtdout;
|
348 |
|
|
input [3:0] io_intrasndout;
|
349 |
|
|
input [3:0] io_intresetndout;
|
350 |
|
|
input [3:0] io_intwendout;
|
351 |
|
|
output [4:0] io_intafirlat;
|
352 |
|
|
output [3:0] io_intafiwlat;
|
353 |
|
|
output io_intaficalfail;
|
354 |
|
|
output io_intaficalsuccess;
|
355 |
|
|
|
356 |
|
|
|
357 |
|
|
// PHY-Memory Interface
|
358 |
|
|
|
359 |
|
|
output [MEM_IF_ADDR_WIDTH-1:0] mem_a; // address
|
360 |
|
|
output [MEM_IF_BANKADDR_WIDTH-1:0] mem_ba; // bank
|
361 |
|
|
output [MEM_IF_CK_WIDTH-1:0] mem_ck; // differential address and command clock
|
362 |
|
|
output [MEM_IF_CK_WIDTH-1:0] mem_ck_n;
|
363 |
|
|
output [MEM_IF_CLK_EN_WIDTH-1:0] mem_cke; // clock enable
|
364 |
|
|
output [MEM_IF_CS_WIDTH-1:0] mem_cs_n; // chip select
|
365 |
|
|
output [MEM_IF_DM_WIDTH-1:0] mem_dm; // data mask
|
366 |
|
|
output [MEM_IF_CONTROL_WIDTH-1:0] mem_ras_n;
|
367 |
|
|
output [MEM_IF_CONTROL_WIDTH-1:0] mem_cas_n;
|
368 |
|
|
output [MEM_IF_CONTROL_WIDTH-1:0] mem_we_n;
|
369 |
|
|
inout [MEM_IF_DQ_WIDTH-1:0] mem_dq; // bidirectional data bus
|
370 |
|
|
inout [MEM_IF_DQS_WIDTH-1:0] mem_dqs; // bidirectional data strobe
|
371 |
|
|
inout [MEM_IF_DQS_WIDTH-1:0] mem_dqs_n; // differential bidirectional data strobe
|
372 |
|
|
output [MEM_IF_ODT_WIDTH-1:0] mem_odt;
|
373 |
|
|
output mem_reset_n;
|
374 |
|
|
|
375 |
|
|
|
376 |
|
|
// PLL Interface
|
377 |
|
|
input afi_clk;
|
378 |
|
|
input afi_half_clk;
|
379 |
|
|
|
380 |
|
|
wire pll_dqs_ena_clk;
|
381 |
|
|
|
382 |
|
|
|
383 |
|
|
|
384 |
|
|
output avl_clk;
|
385 |
|
|
output scc_clk;
|
386 |
|
|
output avl_reset_n;
|
387 |
|
|
output scc_reset_n;
|
388 |
|
|
|
389 |
|
|
input [SCC_DATA_WIDTH-1:0] scc_data;
|
390 |
|
|
input [MEM_IF_READ_DQS_WIDTH-1:0] scc_dqs_ena;
|
391 |
|
|
input [MEM_IF_READ_DQS_WIDTH-1:0] scc_dqs_io_ena;
|
392 |
|
|
input [MEM_IF_DQ_WIDTH-1:0] scc_dq_ena;
|
393 |
|
|
input [MEM_IF_DM_WIDTH-1:0] scc_dm_ena;
|
394 |
|
|
input [0:0] scc_upd;
|
395 |
|
|
output [MEM_IF_READ_DQS_WIDTH-1:0] capture_strobe_tracking;
|
396 |
|
|
|
397 |
|
|
output phy_clk;
|
398 |
|
|
output ctl_clk;
|
399 |
|
|
output phy_reset_n;
|
400 |
|
|
|
401 |
|
|
|
402 |
|
|
// END PORT SECTION
|
403 |
|
|
|
404 |
|
|
|
405 |
|
|
initial $display("Using %0s core emif simulation models", FAST_SIM_MODEL ? "Fast" : "Regular");
|
406 |
|
|
|
407 |
|
|
|
408 |
|
|
|
409 |
|
|
|
410 |
|
|
assign avl_clk = pll_avl_clk;
|
411 |
|
|
assign scc_clk = pll_config_clk;
|
412 |
|
|
|
413 |
|
|
|
414 |
|
|
|
415 |
|
|
assign pll_dqs_ena_clk = pll_write_clk;
|
416 |
|
|
|
417 |
|
|
hps_sdram_p0_acv_hard_memphy #(
|
418 |
|
|
.DEVICE_FAMILY(DEVICE_FAMILY),
|
419 |
|
|
.IS_HHP_HPS(IS_HHP_HPS),
|
420 |
|
|
.OCT_SERIES_TERM_CONTROL_WIDTH(OCT_TERM_CONTROL_WIDTH),
|
421 |
|
|
.OCT_PARALLEL_TERM_CONTROL_WIDTH(OCT_TERM_CONTROL_WIDTH),
|
422 |
|
|
.MEM_ADDRESS_WIDTH(MEM_IF_ADDR_WIDTH),
|
423 |
|
|
.MEM_BANK_WIDTH(MEM_IF_BANKADDR_WIDTH),
|
424 |
|
|
.MEM_CLK_EN_WIDTH(MEM_IF_CLK_EN_WIDTH),
|
425 |
|
|
.MEM_CK_WIDTH(MEM_IF_CK_WIDTH),
|
426 |
|
|
.MEM_ODT_WIDTH(MEM_IF_ODT_WIDTH),
|
427 |
|
|
.MEM_DQS_WIDTH(MEM_IF_DQS_WIDTH),
|
428 |
|
|
.MEM_IF_CS_WIDTH(MEM_IF_CS_WIDTH),
|
429 |
|
|
.MEM_DM_WIDTH(MEM_IF_DM_WIDTH),
|
430 |
|
|
.MEM_CONTROL_WIDTH(MEM_IF_CONTROL_WIDTH),
|
431 |
|
|
.MEM_DQ_WIDTH(MEM_IF_DQ_WIDTH),
|
432 |
|
|
.MEM_READ_DQS_WIDTH(MEM_IF_READ_DQS_WIDTH),
|
433 |
|
|
.MEM_WRITE_DQS_WIDTH(MEM_IF_WRITE_DQS_WIDTH),
|
434 |
|
|
.DLL_DELAY_CTRL_WIDTH(DLL_DELAY_CTRL_WIDTH),
|
435 |
|
|
.MR1_ODS(MR1_ODS),
|
436 |
|
|
.MR1_RTT(MR1_RTT),
|
437 |
|
|
.MR2_RTT_WR(MR2_RTT_WR),
|
438 |
|
|
.CALIB_REG_WIDTH(CALIB_REG_WIDTH),
|
439 |
|
|
.TB_PROTOCOL(TB_PROTOCOL),
|
440 |
|
|
.TB_MEM_CLK_FREQ(TB_MEM_CLK_FREQ),
|
441 |
|
|
.TB_RATE(TB_RATE),
|
442 |
|
|
.TB_MEM_DQ_WIDTH(TB_MEM_DQ_WIDTH),
|
443 |
|
|
.TB_MEM_DQS_WIDTH(TB_MEM_DQS_WIDTH),
|
444 |
|
|
.TB_PLL_DLL_MASTER(TB_PLL_DLL_MASTER),
|
445 |
|
|
.FAST_SIM_MODEL(FAST_SIM_MODEL),
|
446 |
|
|
.FAST_SIM_CALIBRATION(FAST_SIM_CALIBRATION),
|
447 |
|
|
.AC_ROM_INIT_FILE_NAME(AC_ROM_INIT_FILE_NAME),
|
448 |
|
|
.INST_ROM_INIT_FILE_NAME(INST_ROM_INIT_FILE_NAME)
|
449 |
|
|
) umemphy (
|
450 |
|
|
.global_reset_n(global_reset_n),
|
451 |
|
|
.soft_reset_n(soft_reset_n & ~csr_soft_reset_req),
|
452 |
|
|
.ctl_reset_n(ctl_reset_n),
|
453 |
|
|
.ctl_reset_export_n(afi_reset_export_n),
|
454 |
|
|
.afi_reset_n(afi_reset_n),
|
455 |
|
|
.pll_locked(pll_locked),
|
456 |
|
|
.oct_ctl_rt_value(parallelterminationcontrol),
|
457 |
|
|
.oct_ctl_rs_value(seriesterminationcontrol),
|
458 |
|
|
.afi_addr(afi_addr),
|
459 |
|
|
.afi_ba(afi_ba),
|
460 |
|
|
.afi_cke(afi_cke),
|
461 |
|
|
.afi_cs_n(afi_cs_n),
|
462 |
|
|
.afi_ras_n(afi_ras_n),
|
463 |
|
|
.afi_we_n(afi_we_n),
|
464 |
|
|
.afi_cas_n(afi_cas_n),
|
465 |
|
|
.afi_rst_n(afi_rst_n),
|
466 |
|
|
.afi_odt(afi_odt),
|
467 |
|
|
.afi_mem_clk_disable(afi_mem_clk_disable),
|
468 |
|
|
.afi_dqs_burst(afi_dqs_burst),
|
469 |
|
|
.afi_wdata(afi_wdata),
|
470 |
|
|
.afi_wdata_valid(afi_wdata_valid),
|
471 |
|
|
.afi_dm(afi_dm),
|
472 |
|
|
.afi_rdata(afi_rdata),
|
473 |
|
|
.afi_rdata_en(afi_rdata_en),
|
474 |
|
|
.afi_rdata_en_full(afi_rdata_en_full),
|
475 |
|
|
.afi_rdata_valid(afi_rdata_valid),
|
476 |
|
|
.afi_wlat(afi_wlat),
|
477 |
|
|
.afi_rlat(afi_rlat),
|
478 |
|
|
.afi_cal_success(afi_cal_success),
|
479 |
|
|
.afi_cal_fail(afi_cal_fail),
|
480 |
|
|
.avl_read(avl_read),
|
481 |
|
|
.avl_write(avl_write),
|
482 |
|
|
.avl_address(avl_address),
|
483 |
|
|
.avl_writedata(avl_writedata),
|
484 |
|
|
.avl_waitrequest(avl_waitrequest),
|
485 |
|
|
.avl_readdata(avl_readdata),
|
486 |
|
|
.cfg_addlat(cfg_addlat),
|
487 |
|
|
.cfg_bankaddrwidth(cfg_bankaddrwidth),
|
488 |
|
|
.cfg_caswrlat(cfg_caswrlat),
|
489 |
|
|
.cfg_coladdrwidth(cfg_coladdrwidth),
|
490 |
|
|
.cfg_csaddrwidth(cfg_csaddrwidth),
|
491 |
|
|
.cfg_devicewidth(cfg_devicewidth),
|
492 |
|
|
.cfg_dramconfig(cfg_dramconfig),
|
493 |
|
|
.cfg_interfacewidth(cfg_interfacewidth),
|
494 |
|
|
.cfg_rowaddrwidth(cfg_rowaddrwidth),
|
495 |
|
|
.cfg_tcl(cfg_tcl),
|
496 |
|
|
.cfg_tmrd(cfg_tmrd),
|
497 |
|
|
.cfg_trefi(cfg_trefi),
|
498 |
|
|
.cfg_trfc(cfg_trfc),
|
499 |
|
|
.cfg_twr(cfg_twr),
|
500 |
|
|
.io_intaddrdout(io_intaddrdout),
|
501 |
|
|
.io_intbadout(io_intbadout),
|
502 |
|
|
.io_intcasndout(io_intcasndout),
|
503 |
|
|
.io_intckdout(io_intckdout),
|
504 |
|
|
.io_intckedout(io_intckedout),
|
505 |
|
|
.io_intckndout(io_intckndout),
|
506 |
|
|
.io_intcsndout(io_intcsndout),
|
507 |
|
|
.io_intdmdout(io_intdmdout),
|
508 |
|
|
.io_intdqdin(io_intdqdin),
|
509 |
|
|
.io_intdqdout(io_intdqdout),
|
510 |
|
|
.io_intdqoe(io_intdqoe),
|
511 |
|
|
.io_intdqsbdout(io_intdqsbdout),
|
512 |
|
|
.io_intdqsboe(io_intdqsboe),
|
513 |
|
|
.io_intdqsdout(io_intdqsdout),
|
514 |
|
|
.io_intdqslogicdqsena(io_intdqslogicdqsena),
|
515 |
|
|
.io_intdqslogicfiforeset(io_intdqslogicfiforeset),
|
516 |
|
|
.io_intdqslogicincrdataen(io_intdqslogicincrdataen),
|
517 |
|
|
.io_intdqslogicincwrptr(io_intdqslogicincwrptr),
|
518 |
|
|
.io_intdqslogicoct(io_intdqslogicoct),
|
519 |
|
|
.io_intdqslogicrdatavalid(io_intdqslogicrdatavalid),
|
520 |
|
|
.io_intdqslogicreadlatency(io_intdqslogicreadlatency),
|
521 |
|
|
.io_intdqsoe(io_intdqsoe),
|
522 |
|
|
.io_intodtdout(io_intodtdout),
|
523 |
|
|
.io_intrasndout(io_intrasndout),
|
524 |
|
|
.io_intresetndout(io_intresetndout),
|
525 |
|
|
.io_intwendout(io_intwendout),
|
526 |
|
|
.io_intafirlat(io_intafirlat),
|
527 |
|
|
.io_intafiwlat(io_intafiwlat),
|
528 |
|
|
.io_intaficalfail(io_intaficalfail),
|
529 |
|
|
.io_intaficalsuccess(io_intaficalsuccess),
|
530 |
|
|
.mem_a(mem_a),
|
531 |
|
|
.mem_ba(mem_ba),
|
532 |
|
|
.mem_ck(mem_ck),
|
533 |
|
|
.mem_ck_n(mem_ck_n),
|
534 |
|
|
.mem_cke(mem_cke),
|
535 |
|
|
.mem_cs_n(mem_cs_n),
|
536 |
|
|
.mem_dm(mem_dm),
|
537 |
|
|
.mem_ras_n(mem_ras_n),
|
538 |
|
|
.mem_cas_n(mem_cas_n),
|
539 |
|
|
.mem_we_n(mem_we_n),
|
540 |
|
|
.mem_reset_n(mem_reset_n),
|
541 |
|
|
.mem_dq(mem_dq),
|
542 |
|
|
.mem_dqs(mem_dqs),
|
543 |
|
|
.mem_dqs_n(mem_dqs_n),
|
544 |
|
|
.mem_odt(mem_odt),
|
545 |
|
|
.pll_afi_clk(afi_clk),
|
546 |
|
|
.pll_mem_clk(pll_mem_clk),
|
547 |
|
|
.pll_mem_phy_clk(pll_mem_phy_clk),
|
548 |
|
|
.pll_afi_phy_clk(afi_phy_clk),
|
549 |
|
|
.pll_avl_phy_clk(pll_avl_phy_clk),
|
550 |
|
|
.pll_write_clk(pll_write_clk),
|
551 |
|
|
.pll_write_clk_pre_phy_clk(pll_write_clk_pre_phy_clk),
|
552 |
|
|
.pll_addr_cmd_clk(pll_addr_cmd_clk),
|
553 |
|
|
.pll_afi_half_clk(afi_half_clk),
|
554 |
|
|
.pll_dqs_ena_clk(pll_dqs_ena_clk),
|
555 |
|
|
.seq_clk(afi_clk),
|
556 |
|
|
.reset_n_avl_clk(avl_reset_n),
|
557 |
|
|
.reset_n_scc_clk(scc_reset_n),
|
558 |
|
|
.scc_data(scc_data),
|
559 |
|
|
.scc_dqs_ena(scc_dqs_ena),
|
560 |
|
|
.scc_dqs_io_ena(scc_dqs_io_ena),
|
561 |
|
|
.scc_dq_ena(scc_dq_ena),
|
562 |
|
|
.scc_dm_ena(scc_dm_ena),
|
563 |
|
|
.scc_upd(scc_upd),
|
564 |
|
|
.capture_strobe_tracking(capture_strobe_tracking),
|
565 |
|
|
.phy_clk(phy_clk),
|
566 |
|
|
.ctl_clk(ctl_clk),
|
567 |
|
|
.phy_reset_n(phy_reset_n),
|
568 |
|
|
.pll_avl_clk(pll_avl_clk),
|
569 |
|
|
.pll_config_clk(pll_config_clk),
|
570 |
|
|
.dll_clk(dll_clk),
|
571 |
|
|
.dll_pll_locked(dll_pll_locked),
|
572 |
|
|
.dll_phy_delayctrl(dll_delayctrl)
|
573 |
|
|
);
|
574 |
|
|
|
575 |
|
|
|
576 |
|
|
endmodule
|
577 |
|
|
|