Line 18... |
Line 18... |
--
|
--
|
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
|
|
-- Purpose: Single clock FIFO
|
-- Purpose: Single clock FIFO
|
|
|
LIBRARY IEEE, common_pkg_lib, common_components_lib, technology_lib, tech_fifo_lib;
|
LIBRARY IEEE, common_pkg_lib, common_components_lib;
|
USE IEEE.STD_LOGIC_1164.ALL;
|
USE IEEE.STD_LOGIC_1164.ALL;
|
USE common_pkg_lib.common_pkg.ALL;
|
USE common_pkg_lib.common_pkg.ALL;
|
USE technology_lib.technology_select_pkg.ALL;
|
--USE technology_lib.technology_select_pkg.ALL;
|
|
|
ENTITY common_fifo_sc IS
|
ENTITY common_fifo_sc IS
|
GENERIC (
|
GENERIC (
|
g_technology : NATURAL := c_tech_select_default;
|
g_technology : NATURAL := 0; --c_tech_select_default;
|
g_note_is_ful : BOOLEAN := TRUE; -- when TRUE report NOTE when FIFO goes full, fifo overflow is always reported as FAILURE
|
g_note_is_ful : BOOLEAN := TRUE; -- when TRUE report NOTE when FIFO goes full, fifo overflow is always reported as FAILURE
|
g_fail_rd_emp : BOOLEAN := FALSE; -- when TRUE report FAILURE when read from an empty FIFO
|
g_fail_rd_emp : BOOLEAN := FALSE; -- when TRUE report FAILURE when read from an empty FIFO
|
g_use_lut : BOOLEAN := FALSE; -- when TRUE then force using LUTs via Altera eab="OFF",
|
g_use_lut : BOOLEAN := FALSE; -- when TRUE then force using LUTs via Altera eab="OFF",
|
-- else use default eab="ON" and ram_block_type="AUTO", default ram_block_type="AUTO" is sufficient, because
|
-- else use default eab="ON" and ram_block_type="AUTO", default ram_block_type="AUTO" is sufficient, because
|
-- there seems no need to force using RAM and there are two types of Stratix IV RAM (M9K and M144K)
|
-- there seems no need to force using RAM and there are two types of Stratix IV RAM (M9K and M144K)
|
Line 150... |
Line 150... |
END IF;
|
END IF;
|
END PROCESS;
|
END PROCESS;
|
|
|
-- 0 < some threshold < usedw < g_nof_words can be used as FIFO almost_full
|
-- 0 < some threshold < usedw < g_nof_words can be used as FIFO almost_full
|
-- 0 < usedw < some threshold < g_nof_words can be used as FIFO almost_empty
|
-- 0 < usedw < some threshold < g_nof_words can be used as FIFO almost_empty
|
u_fifo : ENTITY tech_fifo_lib.tech_fifo_sc
|
u_fifo : ENTITY work.tech_fifo_sc
|
GENERIC MAP (
|
GENERIC MAP (
|
g_technology => g_technology,
|
g_technology => g_technology,
|
g_use_eab => c_use_eab,
|
g_use_eab => c_use_eab,
|
g_dat_w => g_dat_w,
|
g_dat_w => g_dat_w,
|
g_nof_words => g_nof_words
|
g_nof_words => g_nof_words
|