1 |
412 |
julius |
//*****************************************************************************
|
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 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.0
|
44 |
|
|
// \ \ Application: MIG
|
45 |
|
|
// / / Filename: ddr2_usr_addr_fifo.v
|
46 |
|
|
// /___/ /\ Date Last Modified: $Date: 2008/12/23 14:26:01 $
|
47 |
|
|
// \ \ / \ Date Created: Mon Aug 28 2006
|
48 |
|
|
// \___\/\___\
|
49 |
|
|
//
|
50 |
|
|
//Device: Virtex-5
|
51 |
|
|
//Design Name: DDR2
|
52 |
|
|
//Purpose:
|
53 |
|
|
// This module instantiates the block RAM based FIFO to store the user
|
54 |
|
|
// address and the command information. Also calculates potential bank/row
|
55 |
|
|
// conflicts by comparing the new address with last address issued.
|
56 |
|
|
//Reference:
|
57 |
|
|
//Revision History:
|
58 |
|
|
//*****************************************************************************
|
59 |
|
|
|
60 |
|
|
`timescale 1ns/1ps
|
61 |
|
|
|
62 |
|
|
module ddr2_usr_addr_fifo #
|
63 |
|
|
(
|
64 |
|
|
// Following parameters are for 72-bit RDIMM design (for ML561 Reference
|
65 |
|
|
// board design). Actual values may be different. Actual parameters values
|
66 |
|
|
// are passed from design top module ddr2_mig module. Please refer to
|
67 |
|
|
// the ddr2_mig module for actual values.
|
68 |
|
|
parameter BANK_WIDTH = 2,
|
69 |
|
|
parameter COL_WIDTH = 10,
|
70 |
|
|
parameter CS_BITS = 0,
|
71 |
|
|
parameter ROW_WIDTH = 14
|
72 |
|
|
)
|
73 |
|
|
(
|
74 |
|
|
input clk0,
|
75 |
|
|
input rst0,
|
76 |
|
|
input usr_clk,
|
77 |
|
|
input [2:0] app_af_cmd,
|
78 |
|
|
input [30:0] app_af_addr,
|
79 |
|
|
input app_af_wren,
|
80 |
|
|
input ctrl_af_rden,
|
81 |
|
|
output [2:0] af_cmd,
|
82 |
|
|
output [30:0] af_addr,
|
83 |
|
|
output af_empty,
|
84 |
|
|
output app_af_afull
|
85 |
|
|
);
|
86 |
|
|
|
87 |
|
|
wire [35:0] fifo_data_out;
|
88 |
|
|
reg rst_r;
|
89 |
|
|
|
90 |
|
|
|
91 |
|
|
always @(posedge clk0)
|
92 |
|
|
rst_r <= rst0;
|
93 |
|
|
|
94 |
|
|
|
95 |
|
|
//***************************************************************************
|
96 |
|
|
|
97 |
|
|
assign af_cmd = fifo_data_out[33:31];
|
98 |
|
|
assign af_addr = fifo_data_out[30:0];
|
99 |
|
|
|
100 |
|
|
//***************************************************************************
|
101 |
|
|
|
102 |
|
|
FIFO36 #
|
103 |
|
|
(
|
104 |
|
|
.ALMOST_EMPTY_OFFSET (13'h0007),
|
105 |
|
|
.ALMOST_FULL_OFFSET (13'h000F),
|
106 |
|
|
.DATA_WIDTH (36),
|
107 |
|
|
.DO_REG (1),
|
108 |
|
|
.EN_SYN ("FALSE"), // changed to FALSE - jb
|
109 |
|
|
.FIRST_WORD_FALL_THROUGH ("FALSE")
|
110 |
|
|
)
|
111 |
|
|
u_af
|
112 |
|
|
(
|
113 |
|
|
.ALMOSTEMPTY (),
|
114 |
|
|
.ALMOSTFULL (app_af_afull),
|
115 |
|
|
.DO (fifo_data_out[31:0]),
|
116 |
|
|
.DOP (fifo_data_out[35:32]),
|
117 |
|
|
.EMPTY (af_empty),
|
118 |
|
|
.FULL (),
|
119 |
|
|
.RDCOUNT (),
|
120 |
|
|
.RDERR (),
|
121 |
|
|
.WRCOUNT (),
|
122 |
|
|
.WRERR (),
|
123 |
|
|
.DI ({app_af_cmd[0],app_af_addr}),
|
124 |
|
|
.DIP ({2'b00,app_af_cmd[2:1]}),
|
125 |
|
|
.RDCLK (clk0),
|
126 |
|
|
.RDEN (ctrl_af_rden),
|
127 |
|
|
.RST (rst_r),
|
128 |
|
|
//.WRCLK (clk0),
|
129 |
|
|
.WRCLK (usr_clk),
|
130 |
|
|
.WREN (app_af_wren)
|
131 |
|
|
);
|
132 |
|
|
|
133 |
|
|
endmodule
|