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_cal_to.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 cal_ctl and tap_dly.
|
52 |
|
|
--*****************************************************************************
|
53 |
|
|
|
54 |
|
|
library ieee;
|
55 |
|
|
library UNISIM;
|
56 |
|
|
use ieee.std_logic_1164.all;
|
57 |
|
|
use ieee.std_logic_unsigned.all;
|
58 |
|
|
use UNISIM.VCOMPONENTS.all;
|
59 |
|
|
|
60 |
|
|
entity DDR2_Ram_Core_cal_top is
|
61 |
|
|
port(
|
62 |
|
|
clk : in std_logic;
|
63 |
|
|
clk0dcmlock : in std_logic;
|
64 |
|
|
reset : in std_logic;
|
65 |
|
|
tapfordqs : out std_logic_vector(4 downto 0);
|
66 |
|
|
-- debug signals
|
67 |
|
|
dbg_phase_cnt : out std_logic_vector(4 downto 0);
|
68 |
|
|
dbg_cnt : out std_logic_vector(5 downto 0);
|
69 |
|
|
dbg_trans_onedtct : out std_logic;
|
70 |
|
|
dbg_trans_twodtct : out std_logic;
|
71 |
|
|
dbg_enb_trans_two_dtct : out std_logic
|
72 |
|
|
);
|
73 |
|
|
end DDR2_Ram_Core_cal_top;
|
74 |
|
|
|
75 |
|
|
architecture arc of DDR2_Ram_Core_cal_top is
|
76 |
|
|
|
77 |
|
|
ATTRIBUTE X_CORE_INFO : STRING;
|
78 |
|
|
ATTRIBUTE CORE_GENERATION_INFO : STRING;
|
79 |
|
|
|
80 |
|
|
ATTRIBUTE X_CORE_INFO of arc : ARCHITECTURE IS "mig_v3_61_ddr2_sp3, Coregen 12.4";
|
81 |
|
|
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}";
|
82 |
|
|
|
83 |
|
|
component DDR2_Ram_Core_cal_ctl
|
84 |
|
|
port (
|
85 |
|
|
clk : in std_logic;
|
86 |
|
|
reset : in std_logic;
|
87 |
|
|
flop2 : in std_logic_vector(31 downto 0);
|
88 |
|
|
tapfordqs : out std_logic_vector(4 downto 0);
|
89 |
|
|
dbg_phase_cnt : out std_logic_vector(4 downto 0);
|
90 |
|
|
dbg_cnt : out std_logic_vector(5 downto 0);
|
91 |
|
|
dbg_trans_onedtct : out std_logic;
|
92 |
|
|
dbg_trans_twodtct : out std_logic;
|
93 |
|
|
dbg_enb_trans_two_dtct : out std_logic
|
94 |
|
|
);
|
95 |
|
|
end component;
|
96 |
|
|
|
97 |
|
|
component DDR2_Ram_Core_tap_dly
|
98 |
|
|
port (
|
99 |
|
|
clk : in std_logic;
|
100 |
|
|
reset : in std_logic;
|
101 |
|
|
tapin : in std_logic;
|
102 |
|
|
flop2 : out std_logic_vector(31 downto 0)
|
103 |
|
|
);
|
104 |
|
|
end component;
|
105 |
|
|
|
106 |
|
|
signal fpga_rst : std_logic;
|
107 |
|
|
signal flop2_val : std_logic_vector(31 downto 0);
|
108 |
|
|
|
109 |
|
|
begin
|
110 |
|
|
|
111 |
|
|
fpga_rst <= (not reset) or (not clk0dcmlock);
|
112 |
|
|
|
113 |
|
|
cal_ctl0 : DDR2_Ram_Core_cal_ctl
|
114 |
|
|
port map(
|
115 |
|
|
clk => clk,
|
116 |
|
|
reset => fpga_rst,
|
117 |
|
|
flop2 => flop2_val,
|
118 |
|
|
tapfordqs => tapfordqs,
|
119 |
|
|
dbg_phase_cnt => dbg_phase_cnt,
|
120 |
|
|
dbg_cnt => dbg_cnt,
|
121 |
|
|
dbg_trans_onedtct => dbg_trans_onedtct,
|
122 |
|
|
dbg_trans_twodtct => dbg_trans_twodtct,
|
123 |
|
|
dbg_enb_trans_two_dtct => dbg_enb_trans_two_dtct
|
124 |
|
|
);
|
125 |
|
|
|
126 |
|
|
tap_dly0 : DDR2_Ram_Core_tap_dly
|
127 |
|
|
port map (
|
128 |
|
|
clk => clk,
|
129 |
|
|
reset => fpga_rst,
|
130 |
|
|
tapin => clk,
|
131 |
|
|
flop2 => flop2_val
|
132 |
|
|
);
|
133 |
|
|
|
134 |
|
|
end arc;
|