Skip to content
Snippets Groups Projects
Commit b986ac99 authored by Eric Kooistra's avatar Eric Kooistra
Browse files

Corrected c_block_size_w, by using +1 to ensure that g_block_size that is...

Corrected c_block_size_w, by using +1 to ensure that g_block_size that is power of 2 (e.g. 16) also fits in c_block_size_slv.
parent 6f8cfef7
No related branches found
No related tags found
1 merge request!254Corrected c_block_size_w, by using +1 to ensure that g_block_size that is...
......@@ -105,7 +105,8 @@ ARCHITECTURE rtl OF dp_bsn_align_v2 IS
nof_dat => c_ram_size,
init_sl => '0');
CONSTANT c_block_size_w : NATURAL := ceil_log2(g_block_size);
-- Use +1 to ensure that g_block_size that is power of 2 also fits in c_block_size_slv
CONSTANT c_block_size_w : NATURAL := ceil_log2(g_block_size + 1);
CONSTANT c_block_size_slv : STD_LOGIC_VECTOR(c_block_size_w-1 DOWNTO 0) := TO_UVEC(g_block_size, c_block_size_w);
CONSTANT c_blk_pointer_w : NATURAL := ceil_log2(c_buffer_nof_blocks);
......
......@@ -67,9 +67,11 @@ BEGIN
-- g_tb_nof_blocks : NATURAL := 10 -- number of input blocks per restart
u_mm_output : ENTITY work.tb_dp_bsn_align_v2 GENERIC MAP (2, 1, 1, c_block, c_period, 32, 16, 17, 0, 0, 0, 3, TRUE, 0, 0, 1, 0, 2, c_nof_blk);
u_mm_output_pow2 : ENTITY work.tb_dp_bsn_align_v2 GENERIC MAP (2, 1, 1, 16, c_period, 32, 16, 17, 0, 0, 0, 3, TRUE, 0, 0, 1, 0, 2, c_nof_blk); -- g_block_size = 2**4 = 16
u_mm_output_large_bsn : ENTITY work.tb_dp_bsn_align_v2 GENERIC MAP (2, 1, 1, c_block, c_period, 32, 16, 17, 0, 0, 0, 3000, TRUE, 0, 0, 1, 0, 2, c_nof_blk); -- test where bsn * g_block_size > 2^10 to test address resizing
u_mm_output_single : ENTITY work.tb_dp_bsn_align_v2 GENERIC MAP (1, 1, 1, c_block, c_period, 32, 16, 17, 0, 0, 0, 3, TRUE, 0, 0, 1, 0, 2, c_nof_blk);
u_dp_output : ENTITY work.tb_dp_bsn_align_v2 GENERIC MAP (2, 1, 1, c_block, c_period, 32, 16, 17, 0, 0, 0, 3, FALSE, 0, 0, 1, 0, 2, c_nof_blk);
u_dp_output_pow2 : ENTITY work.tb_dp_bsn_align_v2 GENERIC MAP (2, 1, 1, 16, c_period, 32, 16, 17, 0, 0, 0, 3, FALSE, 0, 0, 1, 0, 2, c_nof_blk); -- g_block_size = 2**4 = 16
u_dp_output_large_bsn : ENTITY work.tb_dp_bsn_align_v2 GENERIC MAP (2, 1, 1, c_block, c_period, 32, 16, 17, 0, 0, 0, 3000, FALSE, 0, 0, 1, 0, 2, c_nof_blk); -- test where bsn * g_block_size > 2^10 to test address resizing
u_dp_output_single : ENTITY work.tb_dp_bsn_align_v2 GENERIC MAP (1, 1, 1, c_block, c_period, 32, 16, 17, 0, 0, 0, 3, FALSE, 0, 0, 1, 0, 2, c_nof_blk);
u_dp_output_p1 : ENTITY work.tb_dp_bsn_align_v2 GENERIC MAP (2, 1, 1, c_block, c_period, 32, 16, 17, 0, 0, 0, 3, FALSE, 1, 1, 1, 0, 2, c_nof_blk);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment