00001 --**************************************************************
00002 --* *
00003 --* The source code for the ATLAS BCM "AAA" FPGA is made *
00004 --* available via the GNU General Public License (GPL) *
00005 --* unless otherwise stated below. *
00006 --* *
00007 --* In case of problems/questions/bug reports etc. please *
00008 --* contact michael.niegl@cern.ch *
00009 --* *
00010 --**************************************************************
00011
00012 --**************************************************************
00013 --* *
00014 --* $Source: /local/reps/bcmfpga/bcm_aaa/bcm_aaa/ddr/mem_interface_top_user_interface_0.vhd,v $ *
00015 --* $Revision: 1.2.2.3 $ *
00016 --* $Name: dev $ *
00017 --* $Author: mniegl $ *
00018 --* $Date: 2008/11/03 17:57:44 $ *
00019 --* *
00020 --**************************************************************
00021 -------------------------------------------------------------------------------
00022 -- Copyright (c) 2005 Xilinx, Inc.
00023 -- This design is confidential and proprietary of Xilinx, All Rights Reserved.
00024 -------------------------------------------------------------------------------
00025 -- ____ ____
00026 -- / /\/ /
00027 -- /___/ \ / Vendor: Xilinx
00028 -- \ \ \/ Version: 1.6
00029 -- \ \ Application : MIG
00030 -- / / Filename: mem_interface_top_user_interface_0.vhd
00031 -- /___/ /\ Date Last Modified: Wed Jun 1 2005
00032 -- \ \ / \Date Created: Mon May 2 2005
00033 -- \___\/\___\
00034 -- Device: Virtex-4
00035 -- Design Name: DDR1_SDRAM
00036 -- Description: Interfaces with the user. The user should provide the data and
00037 -- various commands.
00038 -------------------------------------------------------------------------------
00039
00040
00041 library ieee;
00042
00043 use ieee.std_logic_1164.all;
00044
00045 library unisim;
00046
00047 use unisim.vcomponents.all;
00048 use work.mem_interface_top_parameters_0.all;
00049
00050 entity mem_interface_top_user_interface_0 is
00051 port( CLK : in ;
00052 clk90 : in ;
00053 RESET : in ;
00054 ctrl_rden : in ;
00055 READ_DATA_RISE : in ((data_width -1) downto 0);
00056 READ_DATA_Fall : in ((data_width -1) downto 0);
00057 READ_DATA_FIFO_OUT : out ((data_width*2 -1) downto 0);
00058 comp_done : out ;
00059 READ_DATA_VALID : out ;
00060 AF_EMPTY : out ;
00061 AF_ALMOST_FULL : out ;
00062 APP_AF_ADDR : in (35 downto 0);
00063 APP_AF_WREN : in ;
00064 CTRL_AF_RDEN : in ;
00065 AF_ADDR : out (35 downto 0);
00066 APP_WDF_DATA : in ((data_width*2 -1) downto 0);
00067 APP_MASK_DATA : in ((data_mask_width*2 -1) downto 0);
00068 APP_WDF_WREN : in ;
00069 CTRL_WDF_RDEN : in ;
00070 WDF_DATA : out ((data_width*2 -1) downto 0);
00071 MASK_DATA : out ((data_mask_width*2 -1) downto 0);
00072 WDF_ALMOST_FULL : out
00073 );
00074 end mem_interface_top_user_interface_0;
00075
00076 architecture arch of mem_interface_top_user_interface_0 is
00077
00078 component mem_interface_top_rd_data_0
00079 port( CLK : in ;
00080 RESET : in ;
00081 ctrl_rden : in ;
00082 READ_DATA_RISE : in (data_width-1 downto 0);
00083 READ_DATA_Fall : in (data_width-1 downto 0);
00084 READ_DATA_FIFO_RISE : out (data_width-1 downto 0);
00085 READ_DATA_FIFO_Fall : out (data_width-1 downto 0);
00086 comp_done : out ;
00087 READ_DATA_VALID : out
00088 );
00089 end component;
00090
00091 component mem_interface_top_backend_fifos_0
00092 port( clk0 : in ;
00093 clk90 : in ;
00094 rst : in ;
00095 app_af_addr : in (35 downto 0);
00096 app_af_WrEn : in ;
00097 ctrl_af_RdEn : in ;
00098 af_addr : out (35 downto 0);
00099 af_Empty : out ;
00100 af_Almost_Full : out ;
00101 app_Wdf_data : in ((data_width*2 - 1) downto 0);
00102 app_mask_data : in ((data_mask_width*2 - 1) downto 0);
00103 app_Wdf_WrEn : in ;
00104 ctrl_Wdf_RdEn : in ;
00105 Wdf_data : out ((data_width*2 - 1) downto 0);
00106 mask_data : out ((data_mask_width*2 - 1) downto 0);
00107 Wdf_Almost_Full : out
00108 );
00109 end component;
00110
00111 signal read_data_fifo_rise_i : ((data_width -1) downto 0);
00112 signal read_data_fifo_fall_i : ((data_width -1) downto 0);
00113
00114 begin
00115
00116 READ_DATA_FIFO_OUT <= read_data_fifo_rise_i & read_data_fifo_fall_i;
00117
00118 rd_data_00: mem_interface_top_rd_data_0 port map
00119 ( CLK => CLK,
00120 RESET => RESET,
00121 ctrl_rden => ctrl_rden,
00122 READ_DATA_RISE => READ_DATA_RISE,
00123 READ_DATA_Fall => READ_DATA_Fall,
00124 READ_DATA_FIFO_RISE => read_data_fifo_rise_i,
00125 READ_DATA_FIFO_Fall => read_data_fifo_fall_i,
00126 comp_done => comp_done,
00127 READ_DATA_VALID => READ_DATA_VALID
00128 );
00129
00130 backend_fifos_00: mem_interface_top_backend_fifos_0 port map
00131 ( clk0 => CLK,
00132 clk90 => clk90,
00133 rst => RESET,
00134 app_af_addr => APP_AF_ADDR,
00135 app_af_WrEn => APP_AF_WREN,
00136 ctrl_af_RdEn => CTRL_AF_RDEN,
00137 af_addr => AF_ADDR,
00138 af_Empty => AF_EMPTY,
00139 af_Almost_Full => AF_ALMOST_FULL,
00140 app_Wdf_data => APP_WDF_DATA,
00141 app_mask_data => APP_MASK_DATA,
00142 app_Wdf_WrEn => APP_WDF_WREN,
00143 ctrl_Wdf_RdEn => CTRL_WDF_RDEN,
00144 Wdf_data => WDF_DATA,
00145 mask_data => MASK_DATA,
00146 Wdf_Almost_Full => WDF_ALMOST_FULL
00147 );
00148
00149 end arch;
00150
00151
00152
00153
00154