Resolve L2SDP-271
Closes L2SDP-271
Merge request reports
Activity
requested review from @kooistra
23 -- Purpose: 24 -- The dp_block_validate_bsn_at_sync.vhd checks whether the remote block 25 -- sequence number (BSN) at the start of an in_sosi.sync interval is equal to 26 -- the local BSN at start of the local bs_sosi.sync interval. 27 -- Description: 28 -- The dp_block_validate_bsn_at_sync.vhd holds the local BSN that it gets at 29 -- each bs_sosi.sync and uses that when it receives the remote BSN at the 30 -- in_sosi.sync. The dp_validate_bsn_at_sync.vhd compares the entire 31 -- g_bsn_w bit BSN. If the remote BSN at in_sosi.sync and the local BSN at 32 -- bs_sosi.sync are: 33 -- . Not equal, then discard all subsequent in_sosi blocks until the next 34 -- in_sosi .sync 35 -- . Equal, then pass on all subsequent in_sosi blocks until the next 36 -- in_sosi.sync 37 -- Only packets with channel = g_check_channel are checked. Other packets are 38 -- just passed on. 98 99 SIGNAL out_valid : STD_LOGIC; 100 SIGNAL bsn_ok : STD_LOGIC; 101 SIGNAL bsn_ok_reg : STD_LOGIC; 102 SIGNAL bsn_at_sync : STD_LOGIC_VECTOR(g_bsn_w-1 DOWNTO 0); 103 SIGNAL bsn_at_sync_reg : STD_LOGIC_VECTOR(g_bsn_w-1 DOWNTO 0); 104 105 SIGNAL block_sosi : t_dp_sosi; 106 107 BEGIN 108 109 u_common_spulse_cnt_clr : ENTITY common_lib.common_spulse 110 PORT MAP ( 111 in_rst => mm_rst, 112 in_clk => mm_clk, 113 in_pulse => reg_mosi.rd, changed this line in version 3 of the diff
53 -- g_nof_err_counts [31..0] RO total_block_count 0x0 54 -- ==================================================================================== 55 ------------------------------------------------------------------------------- 56 LIBRARY IEEE, common_lib; 57 USE IEEE.std_logic_1164.all; 58 USE IEEE.numeric_std.all; 59 USE work.dp_stream_pkg.ALL; 60 USE common_lib.common_pkg.ALL; 61 USE common_lib.common_mem_pkg.ALL; 62 63 ENTITY dp_block_validate_err IS 64 GENERIC ( 65 g_cnt_w : NATURAL := c_word_w; -- max is c_word_w due to mm word width 66 g_max_block_size : POSITIVE := 250; 67 g_min_block_size : POSITIVE := 1; 68 g_nof_err_counts : NATURAL := 8; Zou het handiger zijn als we g_nof_err_counts niet hadden. Dan telden we alleen +1 als .err > 0. Laten we hetr maar zo laten als het nu is, want zo staat het ook in het ring doc.
Edited by Eric Kooistra
124 SIGNAL fifo_err_ok : STD_LOGIC; 125 SIGNAL fifo_err_ok_val : STD_LOGIC; 126 SIGNAL out_valid : STD_LOGIC; 127 SIGNAL out_valid_reg : STD_LOGIC; 128 129 SIGNAL block_sosi : t_dp_sosi; 130 SIGNAL block_siso : t_dp_siso; 131 SIGNAL block_sosi_piped : t_dp_sosi; 132 133 BEGIN 134 135 u_common_spulse_cnt_clr : ENTITY common_lib.common_spulse 136 PORT MAP ( 137 in_rst => mm_rst, 138 in_clk => mm_clk, 139 in_pulse => reg_mosi.rd, changed this line in version 3 of the diff
131 140 SIGNAL block_sosi_piped : t_dp_sosi; 132 141 133 142 BEGIN 143 144 mm_cnt_clr_reg <= (OTHERS => '0') WHEN mm_rst = '1' ELSE mm_cnt_clr WHEN rising_edge(mm_clk) ELSE mm_cnt_clr_reg; 145 gen_err_cnt_clr : FOR I IN 0 TO c_nof_regs-1 GENERATE 146 mm_cnt_clr(I) <= '1' WHEN reg_mosi.rd = '1' AND TO_UINT(reg_mosi.address(c_mm_reg.adr_w-1 DOWNTO 0)) = I ELSE changed this line in version 4 of the diff
150 u_common_reg_cross_cnt_clr : ENTITY common_lib.common_reg_cross_domain 136 151 PORT MAP ( 137 152 in_rst => mm_rst, 138 153 in_clk => mm_clk, 139 in_pulse => reg_mosi.rd, 140 in_busy => OPEN, 154 in_new => reg_mosi.rd, 155 in_dat => mm_cnt_clr, 156 in_done => mm_cnt_clr_done, 141 157 out_rst => dp_rst, 142 158 out_clk => dp_clk, 143 out_pulse => cnt_clr 159 out_dat => cnt_clr_dat, 160 out_new => cnt_clr_en 144 161 ); 162 cnt_clr <= cnt_clr_dat WHEN cnt_clr_en = '1' ELSE (OTHERS => '0'); Omdat in_dat een pulse rd pulse is (zie mijn comment eerder) is out_dat dan ook een pulse, maar in het dp_clk domain. Daarom heb je dan denk ik cnt_clr_en niet nodig. Je krijgt dan:
out_dat => cnt_clr,
Je kan dus out_new OPEN laten.
Het is ok dat je common_reg_cross_domain gebruikt, maar netter is denk ik om c_nof_regs instanties van common_spulse kunnen gebruiken, omdat het onafhankelijke bits zijn. Het is dus zeker niet nodig om een fifo te genruiken.
changed this line in version 4 of the diff
mentioned in commit 2f12fd87
unassigned @walle