| 1 |
14 |
nussgipfel |
-- GECKO3COM IP Core
|
| 2 |
|
|
--
|
| 3 |
|
|
-- Copyright (C) 2009 by
|
| 4 |
|
|
-- ___ ___ _ _
|
| 5 |
|
|
-- ( _ \ ( __)( ) ( )
|
| 6 |
|
|
-- | (_) )| ( | |_| | Bern University of Applied Sciences
|
| 7 |
|
|
-- | _ < | _) | _ | School of Engineering and
|
| 8 |
|
|
-- | (_) )| | | | | | Information Technology
|
| 9 |
|
|
-- (____/ (_) (_) (_)
|
| 10 |
|
|
--
|
| 11 |
|
|
-- This program is free software: you can redistribute it and/or modify
|
| 12 |
|
|
-- it under the terms of the GNU General Public License as published by
|
| 13 |
|
|
-- the Free Software Foundation, either version 3 of the License, or
|
| 14 |
|
|
-- (at your option) any later version.
|
| 15 |
|
|
--
|
| 16 |
|
|
-- This program is distributed in the hope that it will be useful,
|
| 17 |
|
|
-- but WITHOUT ANY WARRANTY; without even the implied warranty of
|
| 18 |
|
|
-- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
| 19 |
|
|
-- GNU General Public License for more details.
|
| 20 |
|
|
-- You should have received a copy of the GNU General Public License
|
| 21 |
|
|
-- along with this program. If not, see <http://www.gnu.org/licenses/>.
|
| 22 |
|
|
--
|
| 23 |
|
|
-- URL to the project description:
|
| 24 |
|
|
-- http://labs.ti.bfh.ch/gecko/wiki/systems/gecko3com/start
|
| 25 |
|
|
----------------------------------------------------------------------------------
|
| 26 |
|
|
--
|
| 27 |
|
|
-- Author: Christoph Zimmermann
|
| 28 |
|
|
-- Date of creation: 17. December 2009
|
| 29 |
|
|
-- Description:
|
| 30 |
|
|
-- This is a wrapper for a FIFO that was generated with the Xilinx Coregenerator
|
| 31 |
|
|
-- to hide the vendor specific stuff and match our naming conventions.
|
| 32 |
|
|
--
|
| 33 |
|
|
-- Target Devices: Xilinx FPGA's due to use of Coregenerator IP cores
|
| 34 |
|
|
-- Tool versions: 11.1
|
| 35 |
|
|
-- Dependencies:
|
| 36 |
|
|
--
|
| 37 |
|
|
----------------------------------------------------------------------------------
|
| 38 |
|
|
|
| 39 |
|
|
library ieee;
|
| 40 |
|
|
use ieee.std_logic_1164.all;
|
| 41 |
|
|
|
| 42 |
|
|
Library UNISIM;
|
| 43 |
|
|
use UNISIM.vcomponents.all;
|
| 44 |
|
|
|
| 45 |
|
|
Library UNIMACRO;
|
| 46 |
|
|
use UNIMACRO.vcomponents.all;
|
| 47 |
|
|
|
| 48 |
|
|
library work;
|
| 49 |
|
|
use work.GECKO3COM_defines.all;
|
| 50 |
|
|
|
| 51 |
|
|
entity fifo_dualclock is
|
| 52 |
|
|
port (
|
| 53 |
|
|
i_din : IN std_logic_vector(SIZE_DBUS_GPIF-1 downto 0);
|
| 54 |
|
|
i_rd_clk : IN std_logic;
|
| 55 |
|
|
i_rd_en : IN std_logic;
|
| 56 |
|
|
i_rst : IN std_logic;
|
| 57 |
|
|
i_wr_clk : IN std_logic;
|
| 58 |
|
|
i_wr_en : IN std_logic;
|
| 59 |
|
|
o_almost_empty : OUT std_logic;
|
| 60 |
|
|
o_almost_full : OUT std_logic;
|
| 61 |
|
|
o_dout : OUT std_logic_vector(SIZE_DBUS_GPIF-1 downto 0);
|
| 62 |
|
|
o_empty : OUT std_logic;
|
| 63 |
|
|
o_full : OUT std_logic);
|
| 64 |
|
|
end fifo_dualclock;
|
| 65 |
|
|
|
| 66 |
|
|
architecture wrapper of fifo_dualclock is
|
| 67 |
|
|
|
| 68 |
|
|
-- interconection signals
|
| 69 |
|
|
|
| 70 |
|
|
|
| 71 |
|
|
|
| 72 |
|
|
-----------------------------------------------------------------------------
|
| 73 |
|
|
-- COMPONENTS
|
| 74 |
|
|
-----------------------------------------------------------------------------
|
| 75 |
|
|
|
| 76 |
|
|
component coregenerator_fifo_dualclock
|
| 77 |
|
|
port (
|
| 78 |
|
|
din : IN std_logic_vector(SIZE_DBUS_GPIF-1 downto 0);
|
| 79 |
|
|
rd_clk : IN std_logic;
|
| 80 |
|
|
rd_en : IN std_logic;
|
| 81 |
|
|
rst : IN std_logic;
|
| 82 |
|
|
wr_clk : IN std_logic;
|
| 83 |
|
|
wr_en : IN std_logic;
|
| 84 |
|
|
almost_empty : OUT std_logic;
|
| 85 |
|
|
almost_full : OUT std_logic;
|
| 86 |
|
|
dout : OUT std_logic_vector(SIZE_DBUS_GPIF-1 downto 0);
|
| 87 |
|
|
empty : OUT std_logic;
|
| 88 |
18 |
nussgipfel |
full : OUT std_logic);
|
| 89 |
|
|
--PROG_EMPTY_THRESH : IN std_logic;
|
| 90 |
|
|
--PROG_EMPTY_THRESH_ASSERT : IN std_logic;
|
| 91 |
|
|
--PROG_EMPTY_THRESH_NEGATE : IN std_logic);
|
| 92 |
14 |
nussgipfel |
end component;
|
| 93 |
|
|
attribute box_type of coregenerator_fifo_dualclock : component is "black_box";
|
| 94 |
|
|
|
| 95 |
|
|
begin
|
| 96 |
|
|
|
| 97 |
|
|
-----------------------------------------------------------------------------
|
| 98 |
|
|
-- Port map
|
| 99 |
|
|
-----------------------------------------------------------------------------
|
| 100 |
|
|
|
| 101 |
|
|
FIFO : coregenerator_fifo_dualclock
|
| 102 |
|
|
port map (
|
| 103 |
|
|
din => i_din,
|
| 104 |
|
|
rd_clk => i_rd_clk,
|
| 105 |
|
|
rd_en => i_rd_en,
|
| 106 |
|
|
rst => i_rst,
|
| 107 |
|
|
wr_clk => i_wr_clk ,
|
| 108 |
|
|
wr_en => i_wr_en,
|
| 109 |
|
|
almost_empty => o_almost_empty,
|
| 110 |
|
|
almost_full => o_almost_full,
|
| 111 |
|
|
dout => o_dout,
|
| 112 |
|
|
empty => o_empty,
|
| 113 |
18 |
nussgipfel |
full => o_full
|
| 114 |
|
|
--PROG_EMPTY_THRESH => '0',
|
| 115 |
|
|
--PROG_EMPTY_THRESH_ASSERT => '0',
|
| 116 |
|
|
--PROG_EMPTY_THRESH_NEGATE => '0'
|
| 117 |
14 |
nussgipfel |
);
|
| 118 |
|
|
|
| 119 |
18 |
nussgipfel |
end wrapper;
|