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_wr_data_fifo_16.vhd,v $ *
00015 --* $Revision: 1.3.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_wr_data_fifo_16.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: Instantiates the block RAM based FIFO to store the user interface
00037 -- data into it and read after a specified amount in already written. The reading
00038 -- starts when the almost full signal is generated whose offset is programmable.
00039 -------------------------------------------------------------------------------
00040
00041
00042 library ieee;
00043
00044 use ieee.std_logic_1164.all;
00045
00046 use ieee.std_logic_unsigned.all;
00047 -- pragma translate_off
00048
00049 library unisim;
00050
00051 use unisim.vcomponents.all;
00052 -- pragma translate_on
00053
00054 entity mem_interface_top_wr_data_fifo_16 is
00055 port(
00056 clk0 : in ;
00057 clk90 : in ;
00058 rst : in ;
00059 --Write data fifo signals
00060 app_Wdf_data : in (31 downto 0);
00061 app_mask_data : in (3 downto 0);
00062 app_Wdf_WrEn : in ;
00063 ctrl_Wdf_RdEn : in ;
00064 Wdf_data : out (31 downto 0);
00065 mask_data : out (3 downto 0);
00066 wr_df_almost_full : out
00067 );
00068 end mem_interface_top_wr_data_fifo_16;
00069
00070 architecture arch of mem_interface_top_wr_data_fifo_16 is
00071
00072 component FIFO16
00073 generic( ALMOST_FULL_OFFSET : bit_vector;
00074 ALMOST_EMPTY_OFFSET : bit_vector;
00075 DATA_WIDTH : := 36;
00076 FIRST_WORD_Fall_THROUGH :
00077 );
00078 port(
00079 ALMOSTEMPTY : out ;
00080 ALMOSTFULL : out ;
00081 DO : out (31 downto 0);
00082 DOP : out (3 downto 0);
00083 EMPTY : out ;
00084 FULL : out ;
00085 RDCOUNT : out (11 downto 0);
00086 RDERR : out ;
00087 WRCOUNT : out (11 downto 0);
00088 WRERR : out ;
00089 DI : in (31 downto 0);
00090 DIP : in (3 downto 0);
00091 RDCLK : in ;
00092 RDEN : in ;
00093 RST : in ;
00094 WRCLK : in ;
00095 WREN : in
00096 );
00097 end component;
00098
00099
00100
00101
00102 signal ctrl_Wdf_RdEn_270 : ;
00103 signal ctrl_Wdf_RdEn_90 : ;
00104
00105
00106 begin
00107
00108 process(clk90)
00109 begin
00110 if clk90'event and clk90 = '0' then
00111 ctrl_Wdf_RdEn_270 <= ctrl_Wdf_RdEn;
00112 end if;
00113 end process;
00114
00115
00116 process(clk90)
00117 begin
00118 if clk90'event and clk90 = '1' then
00119 ctrl_Wdf_RdEn_90 <= ctrl_Wdf_RdEn_270;
00120 end if;
00121 end process;
00122
00123
00124 Wdf_1 : FIFO16
00125 generic map
00126 ( ALMOST_FULL_OFFSET => X"00F",
00127 ALMOST_EMPTY_OFFSET => X"007",
00128 DATA_WIDTH => 36,
00129 FIRST_WORD_Fall_THROUGH => FALSE
00130 )
00131 port map (
00132 ALMOSTEMPTY =>open,
00133 ALMOSTFULL => wr_df_almost_full,
00134 DO => Wdf_data(31 downto 0),
00135 DOP => mask_data (3 downto 0),
00136 EMPTY => open,
00137 FULL => open,
00138 RDCOUNT => open,
00139 RDERR => open,
00140 WRCOUNT => open,
00141 WRERR => open,
00142 DI => app_Wdf_data(31 downto 0),
00143 DIP => app_mask_data(3 downto 0),
00144 RDCLK => clk90,
00145 RDEN => ctrl_Wdf_RdEn_90 ,
00146 RST => rst,
00147 WRCLK => clk0,
00148 WREN => app_Wdf_WrEn
00149 );
00150
00151
00152
00153
00154
00155 end arch;