OpenCores
URL https://opencores.org/ocsvn/astron_fifo/astron_fifo/trunk

Subversion Repositories astron_fifo

[/] [astron_fifo/] [trunk/] [tech_fifo_dc_mixed_widths.vhd] - Blame information for rev 4

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 2 danv
-------------------------------------------------------------------------------
2
--
3 3 danv
-- Copyright 2020
4 2 danv
-- ASTRON (Netherlands Institute for Radio Astronomy) <http://www.astron.nl/>
5
-- P.O.Box 2, 7990 AA Dwingeloo, The Netherlands
6 3 danv
-- 
7
-- Licensed under the Apache License, Version 2.0 (the "License");
8
-- you may not use this file except in compliance with the License.
9
-- You may obtain a copy of the License at
10
-- 
11
--     http://www.apache.org/licenses/LICENSE-2.0
12
-- 
13
-- Unless required by applicable law or agreed to in writing, software
14
-- distributed under the License is distributed on an "AS IS" BASIS,
15
-- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
16
-- See the License for the specific language governing permissions and
17
-- limitations under the License.
18 2 danv
--
19
-------------------------------------------------------------------------------
20
 
21 4 danv
LIBRARY ieee, common_pkg_lib;
22 2 danv
USE ieee.std_logic_1164.all;
23
USE work.tech_fifo_component_pkg.ALL;
24 4 danv
USE common_pkg_lib.common_pkg.ALL;
25 2 danv
 
26 4 danv
--USE technology_lib.technology_pkg.ALL;
27
--USE technology_lib.technology_select_pkg.ALL;
28
 
29 2 danv
-- Declare IP libraries to ensure default binding in simulation. The IP library clause is ignored by synthesis.
30 4 danv
--LIBRARY ip_stratixiv_fifo_lib;
31 2 danv
--LIBRARY ip_arria10_fifo_lib;
32
--LIBRARY ip_arria10_e3sge3_fifo_lib;
33
--LIBRARY ip_arria10_e1sg_fifo_lib;
34
 
35
ENTITY tech_fifo_dc_mixed_widths IS
36
  GENERIC (
37 4 danv
    g_technology : NATURAL := 0; --c_tech_select_default;
38 2 danv
    g_nof_words  : NATURAL;  -- FIFO size in nof wr_dat words
39
    g_wrdat_w    : NATURAL;
40
    g_rddat_w    : NATURAL
41
  );
42
  PORT (
43
    aclr    : IN STD_LOGIC  := '0';
44
    data    : IN STD_LOGIC_VECTOR (g_wrdat_w-1 DOWNTO 0);
45
    rdclk   : IN STD_LOGIC;
46
    rdreq   : IN STD_LOGIC;
47
    wrclk   : IN STD_LOGIC;
48
    wrreq   : IN STD_LOGIC;
49
    q       : OUT STD_LOGIC_VECTOR (g_rddat_w-1 DOWNTO 0);
50
    rdempty : OUT STD_LOGIC;
51 4 danv
    rdusedw : OUT STD_LOGIC_VECTOR (ceil_log2(g_nof_words*g_wrdat_w/g_rddat_w)-1 DOWNTO 0);
52 2 danv
    wrfull  : OUT STD_LOGIC;
53 4 danv
    wrusedw : OUT STD_LOGIC_VECTOR (ceil_log2(g_nof_words)-1 DOWNTO 0)
54 2 danv
  );
55
END tech_fifo_dc_mixed_widths;
56
 
57
 
58
ARCHITECTURE str OF tech_fifo_dc_mixed_widths IS
59
 
60
BEGIN
61
 
62 4 danv
  gen_ip_stratixiv : IF g_technology=0 GENERATE
63 2 danv
    u0 : ip_stratixiv_fifo_dc_mixed_widths
64
    GENERIC MAP (g_nof_words, g_wrdat_w, g_rddat_w)
65
    PORT MAP (aclr, data, rdclk, rdreq, wrclk, wrreq, q, rdempty, rdusedw, wrfull, wrusedw);
66
  END GENERATE;
67
 
68
--  gen_ip_arria10 : IF g_technology=c_tech_arria10 GENERATE
69
--    u0 : ip_arria10_fifo_dc_mixed_widths
70
--    GENERIC MAP (g_nof_words, g_wrdat_w, g_rddat_w)
71
--    PORT MAP (aclr, data, rdclk, rdreq, wrclk, wrreq, q, rdempty, rdusedw, wrfull, wrusedw);
72
--  END GENERATE;
73
--
74
--  gen_ip_arria10_e3sge3 : IF g_technology=c_tech_arria10_e3sge3 GENERATE
75
--    u0 : ip_arria10_e3sge3_fifo_dc_mixed_widths
76
--    GENERIC MAP (g_nof_words, g_wrdat_w, g_rddat_w)
77
--    PORT MAP (aclr, data, rdclk, rdreq, wrclk, wrreq, q, rdempty, rdusedw, wrfull, wrusedw);
78
--  END GENERATE;
79
--  
80
--  gen_ip_arria10_e1sg : IF g_technology=c_tech_arria10_e1sg GENERATE
81
--    u0 : ip_arria10_e1sg_fifo_dc_mixed_widths
82
--    GENERIC MAP (g_nof_words, g_wrdat_w, g_rddat_w)
83
--    PORT MAP (aclr, data, rdclk, rdreq, wrclk, wrreq, q, rdempty, rdusedw, wrfull, wrusedw);
84
--  END GENERATE;
85
 
86
END ARCHITECTURE;

powered by: WebSVN 2.1.0

© copyright 1999-2024 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.