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

Update FIFO size for payload error. Capture destination index (DI) from channel field at sop.

parent 95eaf110
No related branches found
No related tags found
1 merge request!359Clarify g_nof_destinations_max design revision parameter and package constants...
...@@ -319,34 +319,36 @@ begin ...@@ -319,34 +319,36 @@ begin
----------------------------------------------------------------------------- -----------------------------------------------------------------------------
-- Register output info dependent on DN and DI to ease timing closure -- Register output info dependent on DN and DI to ease timing closure
p_reg : process(dp_clk) p_reg : process(dp_clk)
variable v_DN : natural; -- number of destinations
variable v_DI : natural; -- destination index variable v_DI : natural; -- destination index
begin begin
if rising_edge(dp_clk) then if rising_edge(dp_clk) then
v_DN := multi_destinations_info.nof_destinations_act; -- Register number of destinations (DN)
v_DI := to_uint(dp_fifo_data_src_out.channel); s_DN <= multi_destinations_info.nof_destinations_act;
s_DN <= v_DN; -- Capture destination index (DI) from channel field, valid at sop
s_DI <= v_DI; if dp_fifo_data_src_out.sop = '1' then
v_DI := to_uint(dp_fifo_data_src_out.channel);
-- Variable values that depend on DN set via MM and/or on current DI s_DI <= v_DI; -- for view in Wave window
-- from dp_packet_unmerged that is passed on via
-- dp_fifo_data_src_out.channel. -- Variable values that depend on DN set via MM and/or on current DI
-- . Use s_DN to ease timing closure. Use v_DI to ensure that the mdi -- from dp_packet_unmerged that is passed on via
-- values are valid at dp_pipeline_data_src_out.sop -- dp_fifo_data_src_out.channel.
mdi_eth_dst_mac <= multi_destinations_info.eth_destination_mac_arr(v_DI); -- . Use s_DN to ease timing closure. Use v_DI to ensure that the mdi
mdi_ip_dst_addr <= multi_destinations_info.ip_destination_address_arr(v_DI); -- values are valid at dp_pipeline_data_src_out.sop
mdi_udp_dst_port <= multi_destinations_info.udp_destination_port_arr(v_DI); mdi_eth_dst_mac <= multi_destinations_info.eth_destination_mac_arr(v_DI);
mdi_ip_dst_addr <= multi_destinations_info.ip_destination_address_arr(v_DI);
-- . Account for beamset offset in beamlet index mdi_udp_dst_port <= multi_destinations_info.udp_destination_port_arr(v_DI);
mdi_beamlet_index_per_destination <= c_beamset_beamlet_index + c_beamlet_index_per_destination_mat(s_DN, v_DI);
-- . In total there are S_sub_bf = 488 beamlets for nof_destinations. -- . Account for beamset offset in beamlet index
-- The packet for last destination contains the same number of mdi_beamlet_index_per_destination <= c_beamset_beamlet_index + c_beamlet_index_per_destination_mat(s_DN, v_DI);
-- beamlets as the first destinations, or less beamlets. -- . In total there are S_sub_bf = 488 beamlets for nof_destinations.
if v_DI < s_DN - 1 then -- The packet for last destination contains the same number of
mdi_nof_beamlets_per_block_per_destination <= mdi_nof_beamlets_per_block_first_destinations; -- beamlets as the first destinations, or less beamlets.
else if v_DI < s_DN - 1 then
mdi_nof_beamlets_per_block_per_destination <= mdi_nof_beamlets_per_block_last_destination; mdi_nof_beamlets_per_block_per_destination <= mdi_nof_beamlets_per_block_first_destinations;
else
mdi_nof_beamlets_per_block_per_destination <= mdi_nof_beamlets_per_block_last_destination;
end if;
end if; end if;
end if; end if;
end process; end process;
...@@ -408,15 +410,25 @@ begin ...@@ -408,15 +410,25 @@ begin
); );
-- FIFO: to store and align payload error bit from eop to sop -- FIFO: to store and align payload error bit from eop to sop
-- Simple fifo to store the payload error bit at eop of FIFO input to be used -- . The payload error bit is set when dp_packet_merge detects an BSN
-- at sop of FIFO output, so that payload_err can then be used in the packet -- increment error. The dual page mechanism in reorder_col_select makes
-- header. Typically the u_dp_fifo_data will store between 0 and -- that the sosi.err bit will be valid during the entire output packet,
-- c_sdp_N_beamsets = 2 packets. Choose g_nof_words > c_sdp_N_beamsets to -- so that it can be passed on at the sop via the application header.
-- have some margin compared to c_fifo_size of the data FIFO. -- For g_nof_destinations > 1 each destination packet will have its
-- payload error bit set as well, because dp_packet_unmerge applies the
-- input sosi.err at the sop to all unmerged output packets.
-- . Simple fifo to store the payload error bit at eop of FIFO input to be
-- used at sop of FIFO output, so that payload_err can then be used in
-- the packet header. Typically the u_dp_fifo_data will store between 0
-- and c_sdp_N_beamsets = 2 packets. Choose g_nof_words > c_sdp_N_beamsets
-- to have some margin compared to c_fifo_size of the data FIFO.
-- . No need to account for g_nof_destinations_max > 1 in FIFO g_nof_words,
-- because the BDO packets are multiplexed round-robin with fair chance
-- per beamset by the dp_mux in sdp_station.vhd
u_common_fifo_err : entity common_lib.common_fifo_sc u_common_fifo_err : entity common_lib.common_fifo_sc
generic map ( generic map (
g_dat_w => 1, g_dat_w => 1,
g_nof_words => g_nof_destinations_max * c_sdp_N_beamsets + 2 g_nof_words => c_sdp_N_beamsets + 2
) )
port map ( port map (
rst => dp_rst, rst => dp_rst,
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment