1 |
2 |
danv |
-------------------------------------------------------------------------------
|
2 |
|
|
--
|
3 |
|
|
-- Copyright (C) 2014
|
4 |
|
|
-- ASTRON (Netherlands Institute for Radio Astronomy) <http://www.astron.nl/>
|
5 |
|
|
-- P.O.Box 2, 7990 AA Dwingeloo, The Netherlands
|
6 |
|
|
--
|
7 |
|
|
-- This program is free software: you can redistribute it and/or modify
|
8 |
|
|
-- it under the terms of the GNU General Public License as published by
|
9 |
|
|
-- the Free Software Foundation, either version 3 of the License, or
|
10 |
|
|
-- (at your option) any later version.
|
11 |
|
|
--
|
12 |
|
|
-- This program is distributed in the hope that it will be useful,
|
13 |
|
|
-- but WITHOUT ANY WARRANTY; without even the implied warranty of
|
14 |
|
|
-- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
15 |
|
|
-- GNU General Public License for more details.
|
16 |
|
|
--
|
17 |
|
|
-- You should have received a copy of the GNU General Public License
|
18 |
|
|
-- along with this program. If not, see <http://www.gnu.org/licenses/>.
|
19 |
|
|
--
|
20 |
|
|
-------------------------------------------------------------------------------
|
21 |
|
|
|
22 |
|
|
LIBRARY ieee, technology_lib;
|
23 |
|
|
USE ieee.std_logic_1164.all;
|
24 |
|
|
USE work.tech_fifo_component_pkg.ALL;
|
25 |
|
|
USE technology_lib.technology_pkg.ALL;
|
26 |
|
|
USE technology_lib.technology_select_pkg.ALL;
|
27 |
|
|
|
28 |
|
|
-- Declare IP libraries to ensure default binding in simulation. The IP library clause is ignored by synthesis.
|
29 |
|
|
LIBRARY ip_stratixiv_fifo_lib;
|
30 |
|
|
--LIBRARY ip_arria10_fifo_lib;
|
31 |
|
|
--LIBRARY ip_arria10_e3sge3_fifo_lib;
|
32 |
|
|
--LIBRARY ip_arria10_e1sg_fifo_lib;
|
33 |
|
|
|
34 |
|
|
ENTITY tech_fifo_sc IS
|
35 |
|
|
GENERIC (
|
36 |
|
|
g_technology : NATURAL := c_tech_select_default;
|
37 |
|
|
g_use_eab : STRING := "ON";
|
38 |
|
|
g_dat_w : NATURAL;
|
39 |
|
|
g_nof_words : NATURAL
|
40 |
|
|
);
|
41 |
|
|
PORT (
|
42 |
|
|
aclr : IN STD_LOGIC;
|
43 |
|
|
clock : IN STD_LOGIC;
|
44 |
|
|
data : IN STD_LOGIC_VECTOR (g_dat_w-1 DOWNTO 0);
|
45 |
|
|
rdreq : IN STD_LOGIC;
|
46 |
|
|
wrreq : IN STD_LOGIC;
|
47 |
|
|
empty : OUT STD_LOGIC;
|
48 |
|
|
full : OUT STD_LOGIC;
|
49 |
|
|
q : OUT STD_LOGIC_VECTOR (g_dat_w-1 DOWNTO 0);
|
50 |
|
|
usedw : OUT STD_LOGIC_VECTOR (tech_ceil_log2(g_nof_words)-1 DOWNTO 0)
|
51 |
|
|
);
|
52 |
|
|
END tech_fifo_sc;
|
53 |
|
|
|
54 |
|
|
|
55 |
|
|
ARCHITECTURE str OF tech_fifo_sc IS
|
56 |
|
|
|
57 |
|
|
BEGIN
|
58 |
|
|
|
59 |
|
|
gen_ip_stratixiv : IF g_technology=c_tech_stratixiv GENERATE
|
60 |
|
|
u0 : ip_stratixiv_fifo_sc
|
61 |
|
|
GENERIC MAP (g_use_eab, g_dat_w, g_nof_words)
|
62 |
|
|
PORT MAP (aclr, clock, data, rdreq, wrreq, empty, full, q, usedw);
|
63 |
|
|
END GENERATE;
|
64 |
|
|
|
65 |
|
|
-- gen_ip_arria10 : IF g_technology=c_tech_arria10 GENERATE
|
66 |
|
|
-- u0 : ip_arria10_fifo_sc
|
67 |
|
|
-- GENERIC MAP (g_use_eab, g_dat_w, g_nof_words)
|
68 |
|
|
-- PORT MAP (aclr, clock, data, rdreq, wrreq, empty, full, q, usedw);
|
69 |
|
|
-- END GENERATE;
|
70 |
|
|
--
|
71 |
|
|
-- gen_ip_arria10_e3sge3 : IF g_technology=c_tech_arria10_e3sge3 GENERATE
|
72 |
|
|
-- u0 : ip_arria10_e3sge3_fifo_sc
|
73 |
|
|
-- GENERIC MAP (g_use_eab, g_dat_w, g_nof_words)
|
74 |
|
|
-- PORT MAP (aclr, clock, data, rdreq, wrreq, empty, full, q, usedw);
|
75 |
|
|
-- END GENERATE;
|
76 |
|
|
--
|
77 |
|
|
-- gen_ip_arria10_e1sg : IF g_technology=c_tech_arria10_e1sg GENERATE
|
78 |
|
|
-- u0 : ip_arria10_e1sg_fifo_sc
|
79 |
|
|
-- GENERIC MAP (g_use_eab, g_dat_w, g_nof_words)
|
80 |
|
|
-- PORT MAP (aclr, clock, data, rdreq, wrreq, empty, full, q, usedw);
|
81 |
|
|
-- END GENERATE;
|
82 |
|
|
|
83 |
|
|
END ARCHITECTURE;
|