Line 36... |
Line 36... |
-- memory data word width.
|
-- memory data word width.
|
-- . The FIFO makes that the src_in.ready and snk_out.ready are not
|
-- . The FIFO makes that the src_in.ready and snk_out.ready are not
|
-- combinatorially connected, so this can ease the timing closure for the
|
-- combinatorially connected, so this can ease the timing closure for the
|
-- ready signal.
|
-- ready signal.
|
|
|
LIBRARY IEEE, common_pkg_lib, dp_components_lib, common_fifo_lib, dp_pkg_lib, technology_lib;
|
LIBRARY IEEE, common_pkg_lib, dp_components_lib, dp_pkg_lib;
|
USE IEEE.STD_LOGIC_1164.ALL;
|
USE IEEE.STD_LOGIC_1164.ALL;
|
USE IEEE.numeric_std.ALL;
|
USE IEEE.numeric_std.ALL;
|
USE common_pkg_lib.common_pkg.ALL;
|
USE common_pkg_lib.common_pkg.ALL;
|
USE dp_pkg_lib.dp_stream_pkg.ALL;
|
USE dp_pkg_lib.dp_stream_pkg.ALL;
|
USE technology_lib.technology_select_pkg.ALL;
|
--USE technology_lib.technology_select_pkg.ALL;
|
|
|
ENTITY dp_fifo_core IS
|
ENTITY dp_fifo_core IS
|
GENERIC (
|
GENERIC (
|
g_technology : NATURAL := c_tech_select_default;
|
g_technology : NATURAL := 0;
|
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_use_dual_clock : BOOLEAN := FALSE;
|
g_use_dual_clock : BOOLEAN := FALSE;
|
g_use_lut_sc : BOOLEAN := FALSE; -- when TRUE then force using LUTs instead of block RAM for single clock FIFO (bot available for dual clock FIFO)
|
g_use_lut_sc : BOOLEAN := FALSE; -- when TRUE then force using LUTs instead of block RAM for single clock FIFO (bot available for dual clock FIFO)
|
g_data_w : NATURAL := 16; -- Should be 2 times the c_complex_w if g_use_complex = TRUE
|
g_data_w : NATURAL := 16; -- Should be 2 times the c_complex_w if g_use_complex = TRUE
|
g_data_signed : BOOLEAN := FALSE; -- TRUE extends g_data_w bits with the sign bit, FALSE pads g_data_w bits with zeros.
|
g_data_signed : BOOLEAN := FALSE; -- TRUE extends g_data_w bits with the sign bit, FALSE pads g_data_w bits with zeros.
|
Line 166... |
Line 166... |
|
|
-- up stream use fifo almost full to control snk_out.ready
|
-- up stream use fifo almost full to control snk_out.ready
|
nxt_snk_out.ready <= '1' WHEN UNSIGNED(fifo_wr_usedw)<c_fifo_almost_full ELSE '0';
|
nxt_snk_out.ready <= '1' WHEN UNSIGNED(fifo_wr_usedw)<c_fifo_almost_full ELSE '0';
|
|
|
gen_common_fifo_sc : IF g_use_dual_clock=FALSE GENERATE
|
gen_common_fifo_sc : IF g_use_dual_clock=FALSE GENERATE
|
u_common_fifo_sc : ENTITY common_fifo_lib.common_fifo_sc
|
u_common_fifo_sc : ENTITY work.common_fifo_sc
|
GENERIC MAP (
|
GENERIC MAP (
|
g_technology => g_technology,
|
g_technology => g_technology,
|
g_note_is_ful => g_note_is_ful,
|
g_note_is_ful => g_note_is_ful,
|
g_use_lut => g_use_lut_sc,
|
g_use_lut => g_use_lut_sc,
|
g_dat_w => c_fifo_dat_w,
|
g_dat_w => c_fifo_dat_w,
|
Line 191... |
Line 191... |
|
|
fifo_wr_usedw <= fifo_rd_usedw;
|
fifo_wr_usedw <= fifo_rd_usedw;
|
END GENERATE;
|
END GENERATE;
|
|
|
gen_common_fifo_dc : IF g_use_dual_clock=TRUE GENERATE
|
gen_common_fifo_dc : IF g_use_dual_clock=TRUE GENERATE
|
u_common_fifo_dc : ENTITY common_fifo_lib.common_fifo_dc
|
u_common_fifo_dc : ENTITY work.common_fifo_dc
|
GENERIC MAP (
|
GENERIC MAP (
|
g_technology => g_technology,
|
g_technology => g_technology,
|
g_dat_w => c_fifo_dat_w,
|
g_dat_w => c_fifo_dat_w,
|
g_nof_words => g_fifo_size
|
g_nof_words => g_fifo_size
|
)
|
)
|