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

Add merged payload error bit support in design and in tb.

parent e4ea44b8
No related branches found
No related tags found
1 merge request!336Resolve L2SDP-958
Pipeline #55470 passed
...@@ -105,6 +105,9 @@ ...@@ -105,6 +105,9 @@
-- * The c_wg_phase_offset and c_subband_phase_offset are used to tune the WG -- * The c_wg_phase_offset and c_subband_phase_offset are used to tune the WG
-- phase reference to 0.0 degrees at the start (sop) -- phase reference to 0.0 degrees at the start (sop)
-- * Use g_beamlet_scale = 2**10, for full scale WG and N_ant = 1, see [1] -- * Use g_beamlet_scale = 2**10, for full scale WG and N_ant = 1, see [1]
-- * A simulation only section in sdp_beamformer_output.vhd disturbs the BSN,
-- to cause a merged payload error, so that sdp_source_info_payload_error
-- can be verified here.
-- --
-- Usage: -- Usage:
-- > as 7 # default -- > as 7 # default
...@@ -1372,15 +1375,39 @@ begin ...@@ -1372,15 +1375,39 @@ begin
rx_sdp_cep_header <= func_sdp_map_cep_header(rx_hdr_fields_raw); rx_sdp_cep_header <= func_sdp_map_cep_header(rx_hdr_fields_raw);
p_verify_cep_header : process p_verify_cep_header : process
variable v_bool : boolean; variable v_pkt_cnt : natural;
variable v_new_pkt : boolean;
variable v_error : std_logic := '0';
variable v_bsn : natural := 0;
variable v_bool : boolean;
begin begin
wait until rising_edge(ext_clk); wait until rising_edge(ext_clk);
-- Count packets per beamset
v_pkt_cnt := rx_beamlet_sop_cnt / c_sdp_N_beamsets;
v_new_pkt := rx_beamlet_sop_cnt mod c_sdp_N_beamsets = 0;
-- Prepare exp_sdp_cep_header at sop, so that it can be verified at eop -- Prepare exp_sdp_cep_header at sop, so that it can be verified at eop
if rx_beamlet_sosi.sop = '1' then if rx_beamlet_sosi.sop = '1' then
-- Expected BSN increments by c_sdp_cep_nof_blocks_per_packet = 4 blocks per packet -- Expected BSN increments by c_sdp_cep_nof_blocks_per_packet = 4 blocks per packet,
if rx_beamlet_sop_cnt mod c_sdp_N_beamsets = 0 then -- both beamsets are outputting packets.
exp_dp_bsn <= c_init_bsn + (rx_beamlet_sop_cnt / c_sdp_N_beamsets) * c_sdp_cep_nof_blocks_per_packet; if v_new_pkt then
-- Default expected
v_error := '0';
v_bsn := c_init_bsn + v_pkt_cnt * c_sdp_cep_nof_blocks_per_packet;
-- Expected due to bsn and payload_error stimuli in sdp_beamformer_output.vhd.
if v_pkt_cnt = 1 then
v_error := '1';
elsif v_pkt_cnt = 2 or v_pkt_cnt = 3 then
v_bsn := v_bsn + 1;
elsif v_pkt_cnt = 4 then
v_bsn := v_bsn + 1;
v_error := '1';
end if;
-- Apply expected values
exp_payload_error <= v_error;
exp_dp_bsn <= v_bsn;
end if; end if;
end if; end if;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment