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, 2008 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_s3_dq_iob.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 instantiate DDR IOB output flip-flops, an
|
52 |
|
|
-- output buffer with registered tri-state, and an input buffer
|
53 |
|
|
-- for a single data/dq bit. The DDR IOB output flip-flops
|
54 |
|
|
-- are used to forward data to memory during a write.
|
55 |
|
|
--*****************************************************************************
|
56 |
|
|
|
57 |
|
|
library ieee;
|
58 |
|
|
library UNISIM;
|
59 |
|
|
use ieee.std_logic_1164.all;
|
60 |
|
|
use ieee.std_logic_arith.all;
|
61 |
|
|
use UNISIM.VCOMPONENTS.all;
|
62 |
|
|
|
63 |
|
|
entity DDR2_Ram_Core_s3_dq_iob is
|
64 |
|
|
port (
|
65 |
|
|
ddr_dq_inout : inout std_logic; --Bi-directional SDRAM data bus
|
66 |
|
|
write_data_falling : in std_logic; --Transmit data, output on falling edge
|
67 |
|
|
write_data_rising : in std_logic; --Transmit data, output on rising edge
|
68 |
|
|
read_data_in : out std_logic; -- Received data
|
69 |
|
|
clk90 : in std_logic; --Clock 90
|
70 |
|
|
write_en_val : in std_logic
|
71 |
|
|
);
|
72 |
|
|
end DDR2_Ram_Core_s3_dq_iob;
|
73 |
|
|
|
74 |
|
|
architecture arc of DDR2_Ram_Core_s3_dq_iob is
|
75 |
|
|
|
76 |
|
|
--***********************************************************************\
|
77 |
|
|
-- Internal signal declaration
|
78 |
|
|
--***********************************************************************/
|
79 |
|
|
signal ddr_en : std_logic; -- Tri-state enable signal
|
80 |
|
|
signal ddr_dq_q : std_logic; -- Data output intermediate signal
|
81 |
|
|
signal gnd : std_logic;
|
82 |
|
|
signal clock_en : std_logic;
|
83 |
|
|
signal enable_b : std_logic;
|
84 |
|
|
signal clk270 : std_logic;
|
85 |
|
|
|
86 |
|
|
attribute iob : string;
|
87 |
|
|
attribute syn_useioff : boolean;
|
88 |
|
|
|
89 |
|
|
attribute iob of DQ_T : label is "FORCE";
|
90 |
|
|
attribute syn_useioff of DQ_T : label is true;
|
91 |
|
|
|
92 |
|
|
begin
|
93 |
|
|
|
94 |
|
|
clk270 <= not clk90;
|
95 |
|
|
gnd <= '0';
|
96 |
|
|
enable_b <= not write_en_val;
|
97 |
|
|
clock_en <= '1';
|
98 |
|
|
|
99 |
|
|
-- Transmission data path
|
100 |
|
|
|
101 |
|
|
DDR_OUT : FDDRRSE
|
102 |
|
|
port map (
|
103 |
|
|
Q => ddr_dq_q,
|
104 |
|
|
C0 => clk270,
|
105 |
|
|
C1 => clk90,
|
106 |
|
|
CE => clock_en,
|
107 |
|
|
D0 => write_data_rising,
|
108 |
|
|
D1 => write_data_falling,
|
109 |
|
|
R => gnd,
|
110 |
|
|
S => gnd
|
111 |
|
|
);
|
112 |
|
|
|
113 |
|
|
DQ_T : FD
|
114 |
|
|
port map (
|
115 |
|
|
D => enable_b,
|
116 |
|
|
C => clk270,
|
117 |
|
|
Q => ddr_en
|
118 |
|
|
);
|
119 |
|
|
|
120 |
|
|
DQ_OBUFT : OBUFT
|
121 |
|
|
port map (
|
122 |
|
|
I => ddr_dq_q,
|
123 |
|
|
T => ddr_en,
|
124 |
|
|
O => ddr_dq_inout
|
125 |
|
|
);
|
126 |
|
|
|
127 |
|
|
-- Receive data path
|
128 |
|
|
|
129 |
|
|
DQ_IBUF : IBUF
|
130 |
|
|
port map(
|
131 |
|
|
I => ddr_dq_inout,
|
132 |
|
|
O => read_data_in
|
133 |
|
|
);
|
134 |
|
|
|
135 |
|
|
end arc;
|