1 //*****************************************************************************
2 // DISCLAIMER OF LIABILITY
4 // This text/file contains proprietary, confidential
5 // information of Xilinx, Inc., is distributed under license
6 // from Xilinx, Inc., and may be used, copied and/or
7 // disclosed only pursuant to the terms of a valid license
8 // agreement with Xilinx, Inc. Xilinx hereby grants you a
9 // license to use this text/file solely for design, simulation,
10 // implementation and creation of design files limited
11 // to Xilinx devices or technologies. Use with non-Xilinx
12 // devices or technologies is expressly prohibited and
13 // immediately terminates your license unless covered by
14 // a separate agreement.
16 // Xilinx is providing this design, code, or information
17 // "as-is" solely for use in developing programs and
18 // solutions for Xilinx devices, with no obligation on the
19 // part of Xilinx to provide support. By providing this design,
20 // code, or information as one possible implementation of
21 // this feature, application or standard, Xilinx is making no
22 // representation that this implementation is free from any
23 // claims of infringement. You are responsible for
24 // obtaining any rights you may require for your implementation.
25 // Xilinx expressly disclaims any warranty whatsoever with
26 // respect to the adequacy of the implementation, including
27 // but not limited to any warranties or representations that this
28 // implementation is free from claims of infringement, implied
29 // warranties of merchantability or fitness for a particular
32 // Xilinx products are not intended for use in life support
33 // appliances, devices, or systems. Use in such applications is
34 // expressly prohibited.
36 // Any modifications that are made to the Source Code are
37 // done at the user�s sole risk and will be unsupported.
39 // Copyright (c) 2006-2007 Xilinx, Inc. All rights reserved.
41 // This copyright and support notice must be retained as part
42 // of this text at all times.
43 //*****************************************************************************
46 // /___/ \ / Vendor: Xilinx
47 // \ \ \/ Version: 2.3
48 // \ \ Application: MIG
49 // / / Filename: ddr2_usr_top.v
50 // /___/ /\ Date Last Modified: $Date: 2008/05/08 15:20:47 $
51 // \ \ / \ Date Created: Mon Aug 28 2006
57 // This module interfaces with the user. The user should provide the data
58 // and various commands.
61 //*****************************************************************************
67 // Following parameters are for 72-bit RDIMM design (for ML561 Reference
68 // board design). Actual values may be different. Actual parameters values
69 // are passed from design top module ddr2_sdram module. Please refer to
70 // the ddr2_sdram module for actual values.
71 parameter BANK_WIDTH = 2,
72 parameter CS_BITS = 0,
73 parameter COL_WIDTH = 10,
74 parameter DQ_WIDTH = 72,
75 parameter DQ_PER_DQS = 8,
76 parameter APPDATA_WIDTH = 144,
77 parameter APPDATA_BURST_LEN = 2,
78 parameter APPDATA_BURST_BITS = 1,
79 parameter ECC_ENABLE = 0,
80 parameter DQS_WIDTH = 9,
81 parameter ROW_WIDTH = 14,
82 parameter EN_SYN = "FALSE"
89 input af_clk, //address fifo clk
90 input rb_clk, //read buffer clk
91 input wb_clk, //write buffer clk
92 input af_rst, //address fifo rst
93 input rb_rst, //read buffer rst
94 input wb_rst, //write buffer rst
95 output rb_full, //read buffer is full
97 input [DQ_WIDTH-1:0] rd_data_in_rise,
98 input [DQ_WIDTH-1:0] rd_data_in_fall,
99 input [DQS_WIDTH-1:0] phy_calib_rden,
100 input [DQS_WIDTH-1:0] phy_calib_rden_sel,
101 output rd_data_valid,
103 output [APPDATA_WIDTH-1:0] rd_data_fifo_out,
104 input [2:0] app_af_cmd,
105 input [30:0] app_af_addr,
109 output [30:0] af_addr,
112 output [1:0] rd_ecc_error,
114 input [APPDATA_WIDTH-1:0] app_wdf_data,
115 input [(APPDATA_WIDTH/8)-1:0] app_wdf_mask_data,
117 output app_wdf_afull,
118 output [(2*DQ_WIDTH)-1:0] wdf_data,
119 output [((2*DQ_WIDTH)/8)-1:0] wdf_mask_data,
120 output wr_fifo_clear,
125 wire [(APPDATA_WIDTH/2)-1:0] i_rd_data_fifo_out_fall;
126 wire [(APPDATA_WIDTH/2)-1:0] i_rd_data_fifo_out_rise;
128 //***************************************************************************
130 assign rd_data_fifo_out = {i_rd_data_fifo_out_fall,
131 i_rd_data_fifo_out_rise};
133 // read data de-skew and ECC calculation
136 .DQ_PER_DQS (DQ_PER_DQS),
137 .ECC_ENABLE (ECC_ENABLE),
138 .APPDATA_WIDTH (APPDATA_WIDTH),
139 .APPDATA_BURST_LEN( APPDATA_BURST_LEN),
140 .APPDATA_BURST_BITS(APPDATA_BURST_BITS),
141 .DQS_WIDTH (DQS_WIDTH),
151 .rd_data_in_rise (rd_data_in_rise),
152 .rd_data_in_fall (rd_data_in_fall),
153 .rd_ecc_error (rd_ecc_error),
154 .ctrl_rden (phy_calib_rden),
155 .ctrl_rden_sel (phy_calib_rden_sel),
156 .rd_data_valid (rd_data_valid),
157 .rd_data_rden (rd_data_rden),
158 .rd_data_out_rise (i_rd_data_fifo_out_rise),
159 .rd_data_out_fall (i_rd_data_fifo_out_fall),
160 .rd_fifo_clear (rd_fifo_clear)
163 // Command/Addres FIFO
166 .BANK_WIDTH (BANK_WIDTH),
167 .COL_WIDTH (COL_WIDTH),
169 .ROW_WIDTH (ROW_WIDTH),
178 .app_af_cmd (app_af_cmd),
179 .app_af_addr (app_af_addr),
180 .app_af_wren (app_af_wren),
181 .ctrl_af_rden (ctrl_af_rden),
184 .af_empty (af_empty),
185 .app_af_afull (app_af_afull)
190 .BANK_WIDTH (BANK_WIDTH),
191 .COL_WIDTH (COL_WIDTH),
193 .DQ_WIDTH (DQ_WIDTH),
194 .APPDATA_WIDTH (APPDATA_WIDTH),
195 .APPDATA_BURST_LEN(APPDATA_BURST_LEN),
196 .APPDATA_BURST_BITS(APPDATA_BURST_BITS),
197 .ECC_ENABLE (ECC_ENABLE),
198 .ROW_WIDTH (ROW_WIDTH)
207 .app_wdf_wren (app_wdf_wren),
208 .app_wdf_data (app_wdf_data),
209 .app_wdf_mask_data (app_wdf_mask_data),
210 .wdf_rden (wdf_rden),
211 .app_wdf_afull (app_wdf_afull),
212 .wdf_data (wdf_data),
213 .wdf_mask_data (wdf_mask_data),
214 .wr_fifo_clear (wr_fifo_clear),
215 .wr_fifo_burst (wr_fifo_burst)