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

Pass on the other snk_in_arr fields as well, so e.g. preserve sync field also...

Pass on the other snk_in_arr fields as well, so e.g. preserve sync field also with the packetized data. Fixed potential bug in case the header fits in a single word, by assigning valid = sop = eop.
parent 48110f98
No related branches found
No related tags found
No related merge requests found
......@@ -106,8 +106,18 @@ BEGIN
p_wire_valid : PROCESS(snk_in_arr, hdr_fields_in_arr)
BEGIN
FOR i IN 0 TO g_nof_streams-1 LOOP
dp_field_blk_snk_in_arr(i).data(field_slv_len(g_hdr_field_arr)-1 DOWNTO 0) <= hdr_fields_in_arr(i)(field_slv_len(g_hdr_field_arr)-1 DOWNTO 0);
dp_field_blk_snk_in_arr(i).valid <= snk_in_arr(i).sop;
-- default pass on the other snk_in_arr fields as well, especially the sync, bsn and channel can
-- be useful to preserve for the packetized output, even though only the sosi.data of the
-- packetized output will get transmitted.
dp_field_blk_snk_in_arr(i) <= snk_in_arr(i);
-- Prepare packet header as a data block with only one data word, so valid = sop = eop. If
-- c_dp_field_blk_snk_data_w > c_dp_field_blk_src_data_w then dp_repack_data in dp_field_blk will
-- repack this data word into a multi word header block, else dp_field_blk will pass on the
-- dp_field_blk_snk_in_arr as a single word header block.
dp_field_blk_snk_in_arr(i).data <= RESIZE_DP_DATA(hdr_fields_in_arr(i)(field_slv_len(g_hdr_field_arr)-1 DOWNTO 0));
dp_field_blk_snk_in_arr(i).valid <= snk_in_arr(i).sop;
dp_field_blk_snk_in_arr(i).sop <= snk_in_arr(i).sop; -- necessary for single word header block
dp_field_blk_snk_in_arr(i).eop <= snk_in_arr(i).sop; -- necessary for single word header block
END LOOP;
END PROCESS;
......@@ -146,6 +156,7 @@ BEGIN
END GENERATE;
-- Prepend the header block to the input block
gen_dp_concat : FOR i IN 0 TO g_nof_streams-1 GENERATE
dp_concat_snk_in_2arr(i)(0) <= snk_in_arr(i);
......
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