OpenCores
URL https://opencores.org/ocsvn/usb_fpga_2_14/usb_fpga_2_14/trunk

Subversion Repositories usb_fpga_2_14

[/] [usb_fpga_2_14/] [trunk/] [examples/] [memfifo/] [fpga-2.18/] [memfifo.srcs/] [sources_1/] [ip/] [mig_7series_0/] [mig_7series_0/] [user_design/] [rtl/] [ui/] [mig_7series_v2_3_ui_top.v] - Blame information for rev 2

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 2 ZTEX
//*****************************************************************************
2
// (c) Copyright 2008 - 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"). 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               : %version
53
//  \   \         Application           : MIG
54
//  /   /         Filename              : ui_top.v
55
// /___/   /\     Date Last Modified    : $date$
56
// \   \  /  \    Date Created          : Tue Jun 30 2009
57
//  \___\/\___\
58
//
59
//Device            : 7-Series
60
//Design Name       : DDR3 SDRAM
61
//Purpose           :
62
//Reference         :
63
//Revision History  :
64
//*****************************************************************************
65
 
66
// Top level of simple user interface.
67
 
68
 
69
`timescale 1 ps / 1 ps
70
 
71
module mig_7series_v2_3_ui_top #
72
  (
73
   parameter TCQ = 100,
74
   parameter APP_DATA_WIDTH       = 256,
75
   parameter APP_MASK_WIDTH       = 32,
76
   parameter BANK_WIDTH           = 3,
77
   parameter COL_WIDTH            = 12,
78
   parameter CWL                  = 5,
79
   parameter DATA_BUF_ADDR_WIDTH  = 5,
80
   parameter ECC                  = "OFF",
81
   parameter ECC_TEST             = "OFF",
82
   parameter ORDERING             = "NORM",
83
   parameter nCK_PER_CLK          = 2,
84
   parameter RANKS                = 4,
85
   parameter REG_CTRL             = "ON", // "ON" for registered DIMM
86
   parameter RANK_WIDTH           = 2,
87
   parameter ROW_WIDTH            = 16,
88
   parameter MEM_ADDR_ORDER       = "BANK_ROW_COLUMN"
89
  )
90
  (/*AUTOARG*/
91
  // Outputs
92
  wr_data_mask, wr_data, use_addr, size, row, raw_not_ecc, rank,
93
  hi_priority, data_buf_addr, col, cmd, bank, app_wdf_rdy, app_rdy,
94
  app_rd_data_valid, app_rd_data_end, app_rd_data,
95
  app_ecc_multiple_err, correct_en, sr_req, app_sr_active, ref_req, app_ref_ack,
96
  zq_req, app_zq_ack,
97
  // Inputs
98
  wr_data_offset, wr_data_en, wr_data_addr, rst, rd_data_offset,
99
  rd_data_end, rd_data_en, rd_data_addr, rd_data, ecc_multiple, clk,
100
  app_wdf_wren, app_wdf_mask, app_wdf_end, app_wdf_data, app_sz,
101
  app_raw_not_ecc, app_hi_pri, app_en, app_cmd, app_addr, accept_ns,
102
  accept, app_correct_en, app_sr_req, sr_active, app_ref_req, ref_ack,
103
  app_zq_req, zq_ack
104
  );
105
 
106
  input accept;
107
  localparam ADDR_WIDTH = RANK_WIDTH + BANK_WIDTH + ROW_WIDTH + COL_WIDTH;
108
 
109
  // Add a cycle to CWL for the register in RDIMM devices
110
  localparam CWL_M = (REG_CTRL == "ON") ? CWL + 1 : CWL;
111
 
112
  input app_correct_en;
113
  output wire correct_en;
114
  assign correct_en = app_correct_en;
115
 
116
  input app_sr_req;
117
  output wire sr_req;
118
  assign sr_req = app_sr_req;
119
 
120
  input sr_active;
121
  output wire app_sr_active;
122
  assign app_sr_active = sr_active;
123
 
124
  input app_ref_req;
125
  output wire ref_req;
126
  assign ref_req = app_ref_req;
127
 
128
  input ref_ack;
129
  output wire app_ref_ack;
130
  assign app_ref_ack = ref_ack;
131
 
132
  input app_zq_req;
133
  output wire zq_req;
134
  assign zq_req = app_zq_req;
135
 
136
  input zq_ack;
137
  output wire app_zq_ack;
138
  assign app_zq_ack = zq_ack;
139
 
140
  /*AUTOINPUT*/
141
  // Beginning of automatic inputs (from unused autoinst inputs)
142
  input                 accept_ns;              // To ui_cmd0 of ui_cmd.v
143
  input [ADDR_WIDTH-1:0] app_addr;              // To ui_cmd0 of ui_cmd.v
144
  input [2:0]           app_cmd;                // To ui_cmd0 of ui_cmd.v
145
  input                 app_en;                 // To ui_cmd0 of ui_cmd.v
146
  input                 app_hi_pri;             // To ui_cmd0 of ui_cmd.v
147
  input [2*nCK_PER_CLK-1:0]           app_raw_not_ecc;        // To ui_wr_data0 of ui_wr_data.v
148
  input                 app_sz;                 // To ui_cmd0 of ui_cmd.v
149
  input [APP_DATA_WIDTH-1:0] app_wdf_data;      // To ui_wr_data0 of ui_wr_data.v
150
  input                 app_wdf_end;            // To ui_wr_data0 of ui_wr_data.v
151
  input [APP_MASK_WIDTH-1:0] app_wdf_mask;      // To ui_wr_data0 of ui_wr_data.v
152
  input                 app_wdf_wren;           // To ui_wr_data0 of ui_wr_data.v
153
  input                 clk;                    // To ui_cmd0 of ui_cmd.v, ...
154
  input [2*nCK_PER_CLK-1:0]           ecc_multiple;           // To ui_rd_data0 of ui_rd_data.v
155
  input [APP_DATA_WIDTH-1:0] rd_data;           // To ui_rd_data0 of ui_rd_data.v
156
  input [DATA_BUF_ADDR_WIDTH-1:0] rd_data_addr; // To ui_rd_data0 of ui_rd_data.v
157
  input                 rd_data_en;             // To ui_rd_data0 of ui_rd_data.v
158
  input                 rd_data_end;            // To ui_rd_data0 of ui_rd_data.v
159
  input                 rd_data_offset;         // To ui_rd_data0 of ui_rd_data.v
160
  input                 rst;                    // To ui_cmd0 of ui_cmd.v, ...
161
  input [DATA_BUF_ADDR_WIDTH-1:0] wr_data_addr; // To ui_wr_data0 of ui_wr_data.v
162
  input                 wr_data_en;             // To ui_wr_data0 of ui_wr_data.v
163
  input                 wr_data_offset;         // To ui_wr_data0 of ui_wr_data.v
164
  // End of automatics
165
 
166
  /*AUTOOUTPUT*/
167
  // Beginning of automatic outputs (from unused autoinst outputs)
168
  output [2*nCK_PER_CLK-1:0]          app_ecc_multiple_err;   // From ui_rd_data0 of ui_rd_data.v
169
  output [APP_DATA_WIDTH-1:0] app_rd_data;      // From ui_rd_data0 of ui_rd_data.v
170
  output                app_rd_data_end;        // From ui_rd_data0 of ui_rd_data.v
171
  output                app_rd_data_valid;      // From ui_rd_data0 of ui_rd_data.v
172
  output                app_rdy;                // From ui_cmd0 of ui_cmd.v
173
  output                app_wdf_rdy;            // From ui_wr_data0 of ui_wr_data.v
174
  output [BANK_WIDTH-1:0] bank;                 // From ui_cmd0 of ui_cmd.v
175
  output [2:0]          cmd;                    // From ui_cmd0 of ui_cmd.v
176
  output [COL_WIDTH-1:0] col;                   // From ui_cmd0 of ui_cmd.v
177
  output [DATA_BUF_ADDR_WIDTH-1:0]data_buf_addr;// From ui_cmd0 of ui_cmd.v
178
  output                hi_priority;            // From ui_cmd0 of ui_cmd.v
179
  output [RANK_WIDTH-1:0] rank;                 // From ui_cmd0 of ui_cmd.v
180
  output [2*nCK_PER_CLK-1:0]          raw_not_ecc;            // From ui_wr_data0 of ui_wr_data.v
181
  output [ROW_WIDTH-1:0] row;                   // From ui_cmd0 of ui_cmd.v
182
  output                size;                   // From ui_cmd0 of ui_cmd.v
183
  output                use_addr;               // From ui_cmd0 of ui_cmd.v
184
  output [APP_DATA_WIDTH-1:0] wr_data;          // From ui_wr_data0 of ui_wr_data.v
185
  output [APP_MASK_WIDTH-1:0] wr_data_mask;     // From ui_wr_data0 of ui_wr_data.v
186
  // End of automatics
187
 
188
  /*AUTOWIRE*/
189
  // Beginning of automatic wires (for undeclared instantiated-module outputs)
190
  wire [3:0] ram_init_addr;                     // From ui_rd_data0 of ui_rd_data.v
191
  wire                  ram_init_done_r;        // From ui_rd_data0 of ui_rd_data.v
192
  wire                  rd_accepted;            // From ui_cmd0 of ui_cmd.v
193
  wire                  rd_buf_full;            // From ui_rd_data0 of ui_rd_data.v
194
  wire [DATA_BUF_ADDR_WIDTH-1:0]rd_data_buf_addr_r;// From ui_rd_data0 of ui_rd_data.v
195
  wire                  wr_accepted;            // From ui_cmd0 of ui_cmd.v
196
  wire [DATA_BUF_ADDR_WIDTH-1:0] wr_data_buf_addr;// From ui_wr_data0 of ui_wr_data.v
197
  wire                  wr_req_16;              // From ui_wr_data0 of ui_wr_data.v
198
  // End of automatics
199
 
200
  // In the UI, the read and write buffers are allowed to be asymmetric to
201
  // to maximize read performance, but the MC's native interface requires
202
  // symmetry, so we zero-fill the write pointer
203
  generate
204
    if(DATA_BUF_ADDR_WIDTH > 4) begin
205
      assign wr_data_buf_addr[DATA_BUF_ADDR_WIDTH-1:4] = 0;
206
    end
207
  endgenerate
208
 
209
  mig_7series_v2_3_ui_cmd #
210
    (/*AUTOINSTPARAM*/
211
     // Parameters
212
     .TCQ                               (TCQ),
213
     .ADDR_WIDTH                        (ADDR_WIDTH),
214
     .BANK_WIDTH                        (BANK_WIDTH),
215
     .COL_WIDTH                         (COL_WIDTH),
216
     .DATA_BUF_ADDR_WIDTH               (DATA_BUF_ADDR_WIDTH),
217
     .RANK_WIDTH                        (RANK_WIDTH),
218
     .ROW_WIDTH                         (ROW_WIDTH),
219
     .RANKS                             (RANKS),
220
     .MEM_ADDR_ORDER                    (MEM_ADDR_ORDER))
221
    ui_cmd0
222
      (/*AUTOINST*/
223
       // Outputs
224
       .app_rdy                         (app_rdy),
225
       .use_addr                        (use_addr),
226
       .rank                            (rank[RANK_WIDTH-1:0]),
227
       .bank                            (bank[BANK_WIDTH-1:0]),
228
       .row                             (row[ROW_WIDTH-1:0]),
229
       .col                             (col[COL_WIDTH-1:0]),
230
       .size                            (size),
231
       .cmd                             (cmd[2:0]),
232
       .hi_priority                     (hi_priority),
233
       .rd_accepted                     (rd_accepted),
234
       .wr_accepted                     (wr_accepted),
235
       .data_buf_addr                   (data_buf_addr),
236
       // Inputs
237
       .rst                             (rst),
238
       .clk                             (clk),
239
       .accept_ns                       (accept_ns),
240
       .rd_buf_full                     (rd_buf_full),
241
       .wr_req_16                       (wr_req_16),
242
       .app_addr                        (app_addr[ADDR_WIDTH-1:0]),
243
       .app_cmd                         (app_cmd[2:0]),
244
       .app_sz                          (app_sz),
245
       .app_hi_pri                      (app_hi_pri),
246
       .app_en                          (app_en),
247
       .wr_data_buf_addr                (wr_data_buf_addr),
248
       .rd_data_buf_addr_r              (rd_data_buf_addr_r));
249
 
250
  mig_7series_v2_3_ui_wr_data #
251
    (/*AUTOINSTPARAM*/
252
     // Parameters
253
     .TCQ                               (TCQ),
254
     .APP_DATA_WIDTH                    (APP_DATA_WIDTH),
255
     .APP_MASK_WIDTH                    (APP_MASK_WIDTH),
256
     .nCK_PER_CLK                       (nCK_PER_CLK),
257
     .ECC                               (ECC),
258
     .ECC_TEST                          (ECC_TEST),
259
     .CWL                               (CWL_M))
260
    ui_wr_data0
261
      (/*AUTOINST*/
262
       // Outputs
263
       .app_wdf_rdy                     (app_wdf_rdy),
264
       .wr_req_16                       (wr_req_16),
265
       .wr_data_buf_addr                (wr_data_buf_addr[3:0]),
266
       .wr_data                         (wr_data[APP_DATA_WIDTH-1:0]),
267
       .wr_data_mask                    (wr_data_mask[APP_MASK_WIDTH-1:0]),
268
       .raw_not_ecc                     (raw_not_ecc[2*nCK_PER_CLK-1:0]),
269
       // Inputs
270
       .rst                             (rst),
271
       .clk                             (clk),
272
       .app_wdf_data                    (app_wdf_data[APP_DATA_WIDTH-1:0]),
273
       .app_wdf_mask                    (app_wdf_mask[APP_MASK_WIDTH-1:0]),
274
       .app_raw_not_ecc                 (app_raw_not_ecc[2*nCK_PER_CLK-1:0]),
275
       .app_wdf_wren                    (app_wdf_wren),
276
       .app_wdf_end                     (app_wdf_end),
277
       .wr_data_offset                  (wr_data_offset),
278
       .wr_data_addr                    (wr_data_addr[3:0]),
279
       .wr_data_en                      (wr_data_en),
280
       .wr_accepted                     (wr_accepted),
281
       .ram_init_done_r                 (ram_init_done_r),
282
       .ram_init_addr                   (ram_init_addr));
283
 
284
  mig_7series_v2_3_ui_rd_data #
285
    (/*AUTOINSTPARAM*/
286
     // Parameters
287
     .TCQ                               (TCQ),
288
     .APP_DATA_WIDTH                    (APP_DATA_WIDTH),
289
     .DATA_BUF_ADDR_WIDTH               (DATA_BUF_ADDR_WIDTH),
290
     .nCK_PER_CLK                       (nCK_PER_CLK),
291
     .ECC                               (ECC),
292
     .ORDERING                          (ORDERING))
293
    ui_rd_data0
294
      (/*AUTOINST*/
295
       // Outputs
296
       .ram_init_done_r                 (ram_init_done_r),
297
       .ram_init_addr                   (ram_init_addr),
298
       .app_rd_data_valid               (app_rd_data_valid),
299
       .app_rd_data_end                 (app_rd_data_end),
300
       .app_rd_data                     (app_rd_data[APP_DATA_WIDTH-1:0]),
301
       .app_ecc_multiple_err            (app_ecc_multiple_err[2*nCK_PER_CLK-1:0]),
302
       .rd_buf_full                     (rd_buf_full),
303
       .rd_data_buf_addr_r              (rd_data_buf_addr_r),
304
       // Inputs
305
       .rst                             (rst),
306
       .clk                             (clk),
307
       .rd_data_en                      (rd_data_en),
308
       .rd_data_addr                    (rd_data_addr),
309
       .rd_data_offset                  (rd_data_offset),
310
       .rd_data_end                     (rd_data_end),
311
       .rd_data                         (rd_data[APP_DATA_WIDTH-1:0]),
312
       .ecc_multiple                    (ecc_multiple[3:0]),
313
       .rd_accepted                     (rd_accepted));
314
 
315
 
316
endmodule // ui_top
317
 
318
// Local Variables:
319
// verilog-library-directories:("." "../mc")
320
// End:

powered by: WebSVN 2.1.0

© copyright 1999-2024 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.