From 0dde289ce0a3895f289b83b059acffa1e0d99ecd Mon Sep 17 00:00:00 2001 From: Eric Kooistra <kooistra@astron.nl> Date: Mon, 27 Mar 2023 08:33:58 +0200 Subject: [PATCH] Correct bsn and block_size_cnt. --- libraries/base/dp/src/vhdl/dp_rsn_source.vhd | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/libraries/base/dp/src/vhdl/dp_rsn_source.vhd b/libraries/base/dp/src/vhdl/dp_rsn_source.vhd index 612ce72f19..2fe9e62030 100644 --- a/libraries/base/dp/src/vhdl/dp_rsn_source.vhd +++ b/libraries/base/dp/src/vhdl/dp_rsn_source.vhd @@ -111,9 +111,9 @@ BEGIN rs_restart <= i_rs_restart; rs_new_interval <= i_rs_new_interval; - rsn <= MULT_UVEC(bs_sosi.bsn, TO_UVEC(g_block_size, c_block_size_cnt_w)); + rsn <= MULT_UVEC(bs_sosi.bsn(g_bsn_w-1 DOWNTO 0), TO_UVEC(g_block_size, c_block_size_cnt_w)); - p_state : PROCESS(sync, sync_size_cnt, nof_clk_per_sync, + p_state : PROCESS(bs_sosi, sync, sync_size_cnt, nof_clk_per_sync, state, prev_state, i_rs_sosi, block_size_cnt, rsn) BEGIN @@ -144,9 +144,10 @@ BEGIN CASE state IS WHEN s_off => nxt_rs_sosi <= c_dp_sosi_rst; - nxt_rs_sosi.bsn <= rsn(g_bsn_w-1 DOWNTO 0); -- RSN fits in g_bsn_w + nxt_rs_sosi.bsn <= RESIZE_DP_BSN(rsn); -- RSN fits in g_bsn_w nxt_sync <= '0'; nxt_sync_size_cnt <= (OTHERS=>'0'); + nxt_block_size_cnt <= (OTHERS=>'0'); IF bs_sosi.sync = '1' THEN nxt_rs_sosi.sync <= '1'; nxt_rs_sosi.sop <= '1'; -- GitLab