1 |
2 |
john_fpga |
--*****************************************************************************
|
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 : DDR2_Ram_Core_iobs_0.vhd
|
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 infrastructure_iobs,
|
52 |
|
|
-- data_path_iobs and controller_iobs modules.
|
53 |
|
|
--*****************************************************************************
|
54 |
|
|
|
55 |
|
|
library ieee;
|
56 |
|
|
use ieee.std_logic_1164.all;
|
57 |
|
|
use ieee.std_logic_unsigned.all;
|
58 |
|
|
use work.DDR2_Ram_Core_parameters_0.all;
|
59 |
|
|
|
60 |
|
|
|
61 |
|
|
library UNISIM;
|
62 |
|
|
use UNISIM.VCOMPONENTS.all;
|
63 |
|
|
|
64 |
|
|
|
65 |
|
|
entity DDR2_Ram_Core_iobs_0 is
|
66 |
|
|
port(
|
67 |
|
|
clk : in std_logic;
|
68 |
|
|
clk90 : in std_logic;
|
69 |
|
|
ddr_rasb_cntrl : in std_logic;
|
70 |
|
|
ddr_casb_cntrl : in std_logic;
|
71 |
|
|
ddr_web_cntrl : in std_logic;
|
72 |
|
|
ddr_cke_cntrl : in std_logic;
|
73 |
|
|
ddr_csb_cntrl : in std_logic;
|
74 |
|
|
ddr_address_cntrl : in std_logic_vector((ROW_ADDRESS -1) downto 0);
|
75 |
|
|
ddr_ba_cntrl : in std_logic_vector((BANK_ADDRESS -1) downto 0);
|
76 |
|
|
ddr_odt_cntrl : in std_logic;
|
77 |
|
|
rst_dqs_div_int : in std_logic;
|
78 |
|
|
dqs_reset : in std_logic;
|
79 |
|
|
dqs_enable : in std_logic;
|
80 |
|
|
ddr_dqs : inout std_logic_vector((DATA_STROBE_WIDTH-1) downto 0);
|
81 |
|
|
ddr_dqs_n : inout std_logic_vector((DATA_STROBE_WIDTH-1) downto 0);
|
82 |
|
|
|
83 |
|
|
ddr_dq : inout std_logic_vector((DATA_WIDTH-1) downto 0);
|
84 |
|
|
write_data_falling : in std_logic_vector((DATA_WIDTH-1) downto 0);
|
85 |
|
|
write_data_rising : in std_logic_vector((DATA_WIDTH-1) downto 0);
|
86 |
|
|
write_en_val : in std_logic;
|
87 |
|
|
data_mask_f : in std_logic_vector((DATA_MASK_WIDTH-1) downto 0);
|
88 |
|
|
data_mask_r : in std_logic_vector((DATA_MASK_WIDTH-1) downto 0);
|
89 |
|
|
ddr_odt : out std_logic;
|
90 |
|
|
ddr2_ck : out std_logic_vector((CLK_WIDTH-1) downto 0);
|
91 |
|
|
ddr2_ck_n : out std_logic_vector((CLK_WIDTH-1) downto 0);
|
92 |
|
|
ddr_rasb : out std_logic;
|
93 |
|
|
ddr_casb : out std_logic;
|
94 |
|
|
ddr_web : out std_logic;
|
95 |
|
|
ddr_ba : out std_logic_vector((BANK_ADDRESS -1) downto 0);
|
96 |
|
|
ddr_address : out std_logic_vector((ROW_ADDRESS -1) downto 0);
|
97 |
|
|
ddr_cke : out std_logic;
|
98 |
|
|
ddr_csb : out std_logic;
|
99 |
|
|
rst_dqs_div : out std_logic;
|
100 |
|
|
rst_dqs_div_in : in std_logic;
|
101 |
|
|
rst_dqs_div_out : out std_logic;
|
102 |
|
|
dqs_int_delay_in : out std_logic_vector((DATA_STROBE_WIDTH-1) downto 0);
|
103 |
|
|
ddr_dm : out std_logic_vector((DATA_MASK_WIDTH-1) downto 0);
|
104 |
|
|
dq : out std_logic_vector((DATA_WIDTH-1) downto 0)
|
105 |
|
|
);
|
106 |
|
|
end DDR2_Ram_Core_iobs_0;
|
107 |
|
|
|
108 |
|
|
|
109 |
|
|
architecture arc of DDR2_Ram_Core_iobs_0 is
|
110 |
|
|
|
111 |
|
|
ATTRIBUTE X_CORE_INFO : STRING;
|
112 |
|
|
ATTRIBUTE CORE_GENERATION_INFO : STRING;
|
113 |
|
|
|
114 |
|
|
ATTRIBUTE X_CORE_INFO of arc : ARCHITECTURE IS "mig_v3_61_ddr2_sp3, Coregen 12.4";
|
115 |
|
|
ATTRIBUTE CORE_GENERATION_INFO of arc : ARCHITECTURE IS "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=0010100110010, ext_load_mode_register=0000000000000, language=VHDL, synthesis_tool=ISE, interface_type=DDR2_SDRAM, no_of_controllers=1}";
|
116 |
|
|
|
117 |
|
|
component DDR2_Ram_Core_infrastructure_iobs_0
|
118 |
|
|
port(
|
119 |
|
|
ddr2_ck : out std_logic_vector((CLK_WIDTH-1) downto 0);
|
120 |
|
|
ddr2_ck_n : out std_logic_vector((CLK_WIDTH-1) downto 0);
|
121 |
|
|
clk0 : in std_logic
|
122 |
|
|
);
|
123 |
|
|
end component;
|
124 |
|
|
|
125 |
|
|
component DDR2_Ram_Core_controller_iobs_0
|
126 |
|
|
port(
|
127 |
|
|
clk0 : in std_logic;
|
128 |
|
|
ddr_rasb_cntrl : in std_logic;
|
129 |
|
|
ddr_casb_cntrl : in std_logic;
|
130 |
|
|
ddr_web_cntrl : in std_logic;
|
131 |
|
|
ddr_cke_cntrl : in std_logic;
|
132 |
|
|
ddr_csb_cntrl : in std_logic;
|
133 |
|
|
ddr_address_cntrl : in std_logic_vector((ROW_ADDRESS -1) downto 0);
|
134 |
|
|
ddr_ba_cntrl : in std_logic_vector((BANK_ADDRESS -1) downto 0);
|
135 |
|
|
ddr_odt_cntrl : in std_logic;
|
136 |
|
|
rst_dqs_div_int : in std_logic;
|
137 |
|
|
ddr_rasb : out std_logic;
|
138 |
|
|
ddr_casb : out std_logic;
|
139 |
|
|
ddr_web : out std_logic;
|
140 |
|
|
ddr_ba : out std_logic_vector((BANK_ADDRESS -1) downto 0);
|
141 |
|
|
ddr_address : out std_logic_vector((ROW_ADDRESS -1) downto 0);
|
142 |
|
|
ddr_cke : out std_logic;
|
143 |
|
|
ddr_csb : out std_logic;
|
144 |
|
|
ddr_ODT : out std_logic;
|
145 |
|
|
rst_dqs_div : out std_logic;
|
146 |
|
|
rst_dqs_div_in : in std_logic;
|
147 |
|
|
rst_dqs_div_out : out std_logic
|
148 |
|
|
);
|
149 |
|
|
end component;
|
150 |
|
|
|
151 |
|
|
component DDR2_Ram_Core_data_path_iobs_0
|
152 |
|
|
port(
|
153 |
|
|
clk : in std_logic;
|
154 |
|
|
clk90 : in std_logic;
|
155 |
|
|
dqs_reset : in std_logic;
|
156 |
|
|
dqs_enable : in std_logic;
|
157 |
|
|
ddr_dq : inout std_logic_vector((DATA_WIDTH-1) downto 0);
|
158 |
|
|
ddr_dqs : inout std_logic_vector((DATA_STROBE_WIDTH-1) downto 0);
|
159 |
|
|
ddr_dqs_n : inout std_logic_vector((DATA_STROBE_WIDTH-1) downto 0);
|
160 |
|
|
|
161 |
|
|
write_data_falling : in std_logic_vector((DATA_WIDTH-1) downto 0);
|
162 |
|
|
write_data_rising : in std_logic_vector((DATA_WIDTH-1) downto 0);
|
163 |
|
|
write_en_val : in std_logic;
|
164 |
|
|
data_mask_f : in std_logic_vector((DATA_MASK_WIDTH-1) downto 0);
|
165 |
|
|
data_mask_r : in std_logic_vector((DATA_MASK_WIDTH-1) downto 0);
|
166 |
|
|
dqs_int_delay_in : out std_logic_vector((DATA_STROBE_WIDTH-1) downto 0);
|
167 |
|
|
ddr_dm : out std_logic_vector((DATA_MASK_WIDTH-1) downto 0);
|
168 |
|
|
ddr_dq_val : out std_logic_vector((DATA_WIDTH-1) downto 0)
|
169 |
|
|
);
|
170 |
|
|
end component;
|
171 |
|
|
|
172 |
|
|
begin
|
173 |
|
|
|
174 |
|
|
infrastructure_iobs0 : DDR2_Ram_Core_infrastructure_iobs_0
|
175 |
|
|
port map (
|
176 |
|
|
clk0 => clk,
|
177 |
|
|
ddr2_ck => ddr2_ck,
|
178 |
|
|
ddr2_ck_n => ddr2_ck_n
|
179 |
|
|
);
|
180 |
|
|
|
181 |
|
|
controller_iobs0 : DDR2_Ram_Core_controller_iobs_0
|
182 |
|
|
port map (
|
183 |
|
|
clk0 => clk,
|
184 |
|
|
ddr_rasb_cntrl => ddr_rasb_cntrl,
|
185 |
|
|
ddr_casb_cntrl => ddr_casb_cntrl,
|
186 |
|
|
ddr_web_cntrl => ddr_web_cntrl,
|
187 |
|
|
ddr_cke_cntrl => ddr_cke_cntrl,
|
188 |
|
|
ddr_csb_cntrl => ddr_csb_cntrl,
|
189 |
|
|
ddr_odt_cntrl => ddr_odt_cntrl,
|
190 |
|
|
ddr_address_cntrl => ddr_address_cntrl((ROW_ADDRESS -1) downto 0),
|
191 |
|
|
ddr_ba_cntrl => ddr_ba_cntrl((BANK_ADDRESS -1) downto 0),
|
192 |
|
|
rst_dqs_div_int => rst_dqs_div_int,
|
193 |
|
|
ddr_rasb => ddr_rasb,
|
194 |
|
|
ddr_casb => ddr_casb,
|
195 |
|
|
ddr_web => ddr_web,
|
196 |
|
|
ddr_ba => ddr_ba((BANK_ADDRESS -1) downto 0),
|
197 |
|
|
ddr_address => ddr_address((ROW_ADDRESS -1) downto 0),
|
198 |
|
|
ddr_cke => ddr_cke,
|
199 |
|
|
ddr_csb => ddr_csb,
|
200 |
|
|
ddr_odt => ddr_odt,
|
201 |
|
|
rst_dqs_div => rst_dqs_div,
|
202 |
|
|
rst_dqs_div_in => rst_dqs_div_in,
|
203 |
|
|
rst_dqs_div_out => rst_dqs_div_out
|
204 |
|
|
);
|
205 |
|
|
|
206 |
|
|
datapath_iobs0 : DDR2_Ram_Core_data_path_iobs_0
|
207 |
|
|
port map (
|
208 |
|
|
clk => clk,
|
209 |
|
|
clk90 => clk90,
|
210 |
|
|
dqs_reset => dqs_reset,
|
211 |
|
|
dqs_enable => dqs_enable,
|
212 |
|
|
ddr_dqs => ddr_dqs,
|
213 |
|
|
ddr_dqs_n => ddr_dqs_n,
|
214 |
|
|
ddr_dq => ddr_dq,
|
215 |
|
|
write_data_falling => write_data_falling,
|
216 |
|
|
write_data_rising => write_data_rising,
|
217 |
|
|
write_en_val => write_en_val,
|
218 |
|
|
data_mask_f => data_mask_f,
|
219 |
|
|
data_mask_r => data_mask_r,
|
220 |
|
|
dqs_int_delay_in => dqs_int_delay_in,
|
221 |
|
|
ddr_dm => ddr_dm,
|
222 |
|
|
ddr_dq_val => dq
|
223 |
|
|
);
|
224 |
|
|
|
225 |
|
|
end arc;
|