1 |
2 |
ndumitrach |
//*****************************************************************************
|
2 |
|
|
// DISCLAIMER OF LIABILITY
|
3 |
|
|
//
|
4 |
|
|
// This file contains proprietary and confidential information of
|
5 |
|
|
// Xilinx, Inc. ("Xilinx"), that is distributed under a license
|
6 |
|
|
// from Xilinx, and may be used, copied and/or disclosed only
|
7 |
|
|
// pursuant to the terms of a valid license agreement with Xilinx.
|
8 |
|
|
//
|
9 |
|
|
// XILINX IS PROVIDING THIS DESIGN, CODE, OR INFORMATION
|
10 |
|
|
// ("MATERIALS") "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER
|
11 |
|
|
// EXPRESSED, IMPLIED, OR STATUTORY, INCLUDING WITHOUT
|
12 |
|
|
// LIMITATION, ANY WARRANTY WITH RESPECT TO NONINFRINGEMENT,
|
13 |
|
|
// MERCHANTABILITY OR FITNESS FOR ANY PARTICULAR PURPOSE. Xilinx
|
14 |
|
|
// does not warrant that functions included in the Materials will
|
15 |
|
|
// meet the requirements of Licensee, or that the operation of the
|
16 |
|
|
// Materials will be uninterrupted or error-free, or that defects
|
17 |
|
|
// in the Materials will be corrected. Furthermore, Xilinx does
|
18 |
|
|
// not warrant or make any representations regarding use, or the
|
19 |
|
|
// results of the use, of the Materials in terms of correctness,
|
20 |
|
|
// accuracy, reliability or otherwise.
|
21 |
|
|
//
|
22 |
|
|
// Xilinx products are not designed or intended to be fail-safe,
|
23 |
|
|
// or for use in any application requiring fail-safe performance,
|
24 |
|
|
// such as life-support or safety devices or systems, Class III
|
25 |
|
|
// medical devices, nuclear facilities, applications related to
|
26 |
|
|
// the deployment of airbags, or any other applications that could
|
27 |
|
|
// lead to death, personal injury or severe property or
|
28 |
|
|
// environmental damage (individually and collectively, "critical
|
29 |
|
|
// applications"). Customer assumes the sole risk and liability
|
30 |
|
|
// of any use of Xilinx products in critical applications,
|
31 |
|
|
// subject only to applicable laws and regulations governing
|
32 |
|
|
// limitations on product liability.
|
33 |
|
|
//
|
34 |
|
|
// Copyright 2005, 2006, 2007 Xilinx, Inc.
|
35 |
|
|
// All rights reserved.
|
36 |
|
|
//
|
37 |
|
|
// This disclaimer and copyright notice must be retained as part
|
38 |
|
|
// of this file at all times.
|
39 |
|
|
//*****************************************************************************
|
40 |
|
|
// ____ ____
|
41 |
|
|
// / /\/ /
|
42 |
|
|
// /___/ \ / Vendor : Xilinx
|
43 |
|
|
// \ \ \/ Version : 3.6.1
|
44 |
|
|
// \ \ Application : MIG
|
45 |
|
|
// / / Filename : ddr.v
|
46 |
|
|
// /___/ /\ Date Last Modified : $Date: 2010/11/26 18:25:42 $
|
47 |
|
|
// \ \ / \ Date Created : Mon May 2 2005
|
48 |
|
|
// \___\/\___\
|
49 |
|
|
// Device : Spartan-3/3A/3A-DSP
|
50 |
|
|
// Design Name : DDR2 SDRAM
|
51 |
|
|
// Purpose : This module has the instantiations main and infrastructure_top
|
52 |
|
|
// modules
|
53 |
|
|
//*****************************************************************************
|
54 |
|
|
|
55 |
|
|
`timescale 1ns/100ps
|
56 |
|
|
|
57 |
|
|
(* X_CORE_INFO = "mig_v3_61_ddr2_sp3, Coregen 12.4" ,
|
58 |
|
|
CORE_GENERATION_INFO = "ddr2_sp3,mig_v3_61,{component_name=ddr2_sp3, data_width=16, memory_width=8, clk_width=1, bank_address=2, row_address=13, column_address=10, no_of_cs=1, cke_width=1, registered=0, data_mask=1, mask_enable=1, load_mode_register=13'b0010100110010, ext_load_mode_register=13'b0000000000000, language=Verilog, synthesis_tool=ISE, interface_type=DDR2_SDRAM, no_of_controllers=1}" *)
|
59 |
|
|
module ddr
|
60 |
|
|
(
|
61 |
|
|
inout [15:0] cntrl0_ddr2_dq,
|
62 |
|
|
output [12:0] cntrl0_ddr2_a,
|
63 |
|
|
output [1:0] cntrl0_ddr2_ba,
|
64 |
|
|
output cntrl0_ddr2_cke,
|
65 |
|
|
output cntrl0_ddr2_cs_n,
|
66 |
|
|
output cntrl0_ddr2_ras_n,
|
67 |
|
|
output cntrl0_ddr2_cas_n,
|
68 |
|
|
output cntrl0_ddr2_we_n,
|
69 |
|
|
output cntrl0_ddr2_odt,
|
70 |
|
|
output [1:0] cntrl0_ddr2_dm,
|
71 |
|
|
input cntrl0_rst_dqs_div_in,
|
72 |
|
|
output cntrl0_rst_dqs_div_out,
|
73 |
|
|
input reset_in_n,
|
74 |
|
|
input cntrl0_burst_done,
|
75 |
|
|
output cntrl0_init_done,
|
76 |
|
|
output cntrl0_ar_done,
|
77 |
|
|
output cntrl0_user_data_valid,
|
78 |
|
|
output cntrl0_auto_ref_req,
|
79 |
|
|
output cntrl0_user_cmd_ack,
|
80 |
|
|
input [2:0] cntrl0_user_command_register,
|
81 |
|
|
output cntrl0_clk_tb,
|
82 |
|
|
output cntrl0_clk90_tb,
|
83 |
|
|
output cntrl0_sys_rst_tb,
|
84 |
|
|
output cntrl0_sys_rst90_tb,
|
85 |
|
|
output cntrl0_sys_rst180_tb,
|
86 |
|
|
output [31:0] cntrl0_user_output_data,
|
87 |
|
|
input [31:0] cntrl0_user_input_data,
|
88 |
|
|
input [3:0] cntrl0_user_data_mask,
|
89 |
|
|
input [24:0] cntrl0_user_input_address,
|
90 |
|
|
input clk_int,
|
91 |
|
|
input clk90_int,
|
92 |
|
|
input dcm_lock,
|
93 |
|
|
inout [1:0] cntrl0_ddr2_dqs,
|
94 |
|
|
inout [1:0] cntrl0_ddr2_dqs_n,
|
95 |
|
|
output [0:0] cntrl0_ddr2_ck,
|
96 |
|
|
output [0:0] cntrl0_ddr2_ck_n
|
97 |
|
|
);
|
98 |
|
|
|
99 |
|
|
wire wait_200us;
|
100 |
|
|
wire sys_rst;
|
101 |
|
|
wire sys_rst90;
|
102 |
|
|
wire sys_rst180;
|
103 |
|
|
wire [4:0] delay_sel_val;
|
104 |
|
|
|
105 |
|
|
// debug signals declarations
|
106 |
|
|
wire [4:0] dbg_delay_sel;
|
107 |
|
|
wire [4:0] dbg_phase_cnt;
|
108 |
|
|
wire [5:0] dbg_cnt;
|
109 |
|
|
wire dbg_trans_onedtct;
|
110 |
|
|
wire dbg_trans_twodtct;
|
111 |
|
|
wire dbg_enb_trans_two_dtct;
|
112 |
|
|
wire dbg_rst_calib;
|
113 |
|
|
// chipscope signals
|
114 |
|
|
wire [19:0] dbg_data;
|
115 |
|
|
wire [3:0] dbg_trig;
|
116 |
|
|
wire [35:0] control0;
|
117 |
|
|
wire [35:0] control1;
|
118 |
|
|
wire [11:0] vio_out;
|
119 |
|
|
wire [4:0] vio_out_dqs;
|
120 |
|
|
wire vio_out_dqs_en;
|
121 |
|
|
wire [4:0] vio_out_rst_dqs_div;
|
122 |
|
|
wire vio_out_rst_dqs_div_en;
|
123 |
|
|
|
124 |
|
|
|
125 |
|
|
ddr_top_0 top_00
|
126 |
|
|
(
|
127 |
|
|
.ddr2_dq (cntrl0_ddr2_dq),
|
128 |
|
|
.ddr2_a (cntrl0_ddr2_a),
|
129 |
|
|
.ddr2_ba (cntrl0_ddr2_ba),
|
130 |
|
|
.ddr2_cke (cntrl0_ddr2_cke),
|
131 |
|
|
.ddr2_cs_n (cntrl0_ddr2_cs_n),
|
132 |
|
|
.ddr2_ras_n (cntrl0_ddr2_ras_n),
|
133 |
|
|
.ddr2_cas_n (cntrl0_ddr2_cas_n),
|
134 |
|
|
.ddr2_we_n (cntrl0_ddr2_we_n),
|
135 |
|
|
.ddr2_odt (cntrl0_ddr2_odt),
|
136 |
|
|
.ddr2_dm (cntrl0_ddr2_dm),
|
137 |
|
|
.rst_dqs_div_in (cntrl0_rst_dqs_div_in),
|
138 |
|
|
.rst_dqs_div_out (cntrl0_rst_dqs_div_out),
|
139 |
|
|
.burst_done (cntrl0_burst_done),
|
140 |
|
|
.init_done (cntrl0_init_done),
|
141 |
|
|
.ar_done (cntrl0_ar_done),
|
142 |
|
|
.user_data_valid (cntrl0_user_data_valid),
|
143 |
|
|
.auto_ref_req (cntrl0_auto_ref_req),
|
144 |
|
|
.user_cmd_ack (cntrl0_user_cmd_ack),
|
145 |
|
|
.user_command_register (cntrl0_user_command_register),
|
146 |
|
|
.clk_tb (cntrl0_clk_tb),
|
147 |
|
|
.clk90_tb (cntrl0_clk90_tb),
|
148 |
|
|
.sys_rst_tb (cntrl0_sys_rst_tb),
|
149 |
|
|
.sys_rst90_tb (cntrl0_sys_rst90_tb),
|
150 |
|
|
.sys_rst180_tb (cntrl0_sys_rst180_tb),
|
151 |
|
|
.user_output_data (cntrl0_user_output_data),
|
152 |
|
|
.user_input_data (cntrl0_user_input_data),
|
153 |
|
|
.user_data_mask (cntrl0_user_data_mask),
|
154 |
|
|
.user_input_address (cntrl0_user_input_address),
|
155 |
|
|
.ddr2_dqs (cntrl0_ddr2_dqs),
|
156 |
|
|
.ddr2_dqs_n (cntrl0_ddr2_dqs_n),
|
157 |
|
|
.ddr2_ck (cntrl0_ddr2_ck),
|
158 |
|
|
.ddr2_ck_n (cntrl0_ddr2_ck_n),
|
159 |
|
|
.clk_int (clk_int),
|
160 |
|
|
.clk90_int (clk90_int),
|
161 |
|
|
.wait_200us (wait_200us),
|
162 |
|
|
.sys_rst (sys_rst),
|
163 |
|
|
.sys_rst90 (sys_rst90),
|
164 |
|
|
.sys_rst180 (sys_rst180),
|
165 |
|
|
.delay_sel_val (delay_sel_val),
|
166 |
|
|
|
167 |
|
|
//Debug signals
|
168 |
|
|
|
169 |
|
|
.dbg_delay_sel (dbg_delay_sel),
|
170 |
|
|
.dbg_rst_calib (dbg_rst_calib),
|
171 |
|
|
.vio_out_dqs (vio_out_dqs),
|
172 |
|
|
.vio_out_dqs_en (vio_out_dqs_en),
|
173 |
|
|
.vio_out_rst_dqs_div (vio_out_rst_dqs_div),
|
174 |
|
|
.vio_out_rst_dqs_div_en (vio_out_rst_dqs_div_en)
|
175 |
|
|
);
|
176 |
|
|
|
177 |
|
|
ddr_infrastructure_top0 infrastructure_top0
|
178 |
|
|
(
|
179 |
|
|
.reset_in_n (reset_in_n),
|
180 |
|
|
.clk_int (clk_int),
|
181 |
|
|
.clk90_int (clk90_int),
|
182 |
|
|
.dcm_lock (dcm_lock),
|
183 |
|
|
.wait_200us_rout (wait_200us),
|
184 |
|
|
.delay_sel_val1_val (delay_sel_val),
|
185 |
|
|
.sys_rst_val (sys_rst),
|
186 |
|
|
.sys_rst90_val (sys_rst90),
|
187 |
|
|
.sys_rst180_val (sys_rst180),
|
188 |
|
|
.dbg_phase_cnt (dbg_phase_cnt),
|
189 |
|
|
.dbg_cnt (dbg_cnt),
|
190 |
|
|
.dbg_trans_onedtct (dbg_trans_onedtct),
|
191 |
|
|
.dbg_trans_twodtct (dbg_trans_twodtct),
|
192 |
|
|
.dbg_enb_trans_two_dtct (dbg_enb_trans_two_dtct)
|
193 |
|
|
);
|
194 |
|
|
|
195 |
|
|
|
196 |
|
|
|
197 |
|
|
endmodule
|
198 |
|
|
|
199 |
|
|
|