source: XOpenSparcT1/trunk/Xilinx/ddr2_usr_addr_fifo.v @ 10

Revision 10, 4.6 KB checked in by pntsvt00, 14 years ago (diff)

versione sintetizzabile

Line 
1//*****************************************************************************
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.6
44//  \   \         Application: MIG
45//  /   /         Filename: ddr2_usr_addr_fifo.v
46// /___/   /\     Date Last Modified: $Date: 2010/06/29 12:03:43 $
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
62module 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 dram module. Please refer to
67   // the dram 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 [2:0]    app_af_cmd,
77   input [30:0]   app_af_addr,
78   input          app_af_wren,
79   input          ctrl_af_rden,
80   output [2:0]   af_cmd,
81   output [30:0]  af_addr,
82   output         af_empty,
83   output         app_af_afull
84   );
85
86  wire [35:0]     fifo_data_out;
87   reg            rst_r;
88
89
90  always @(posedge clk0)
91     rst_r <= rst0;
92
93
94  //***************************************************************************
95
96  assign af_cmd      = fifo_data_out[33:31];
97  assign af_addr     = fifo_data_out[30:0];
98
99  //***************************************************************************
100
101  FIFO36 #
102    (
103     .ALMOST_EMPTY_OFFSET     (13'h0007),
104     .ALMOST_FULL_OFFSET      (13'h000F),
105     .DATA_WIDTH              (36),
106     .DO_REG                  (1),
107     .EN_SYN                  ("TRUE"),
108     .FIRST_WORD_FALL_THROUGH ("FALSE")
109     )
110    u_af
111      (
112       .ALMOSTEMPTY (),
113       .ALMOSTFULL  (app_af_afull),
114       .DO          (fifo_data_out[31:0]),
115       .DOP         (fifo_data_out[35:32]),
116       .EMPTY       (af_empty),
117       .FULL        (),
118       .RDCOUNT     (),
119       .RDERR       (),
120       .WRCOUNT     (),
121       .WRERR       (),
122       .DI          ({app_af_cmd[0],app_af_addr}),
123       .DIP         ({2'b00,app_af_cmd[2:1]}),
124       .RDCLK       (clk0),
125       .RDEN        (ctrl_af_rden),
126       .RST         (rst_r),
127       .WRCLK       (clk0),
128       .WREN        (app_af_wren)
129       );
130
131endmodule
Note: See TracBrowser for help on using the repository browser.