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

Pass on lost flag via channel bit 0.

parent 6818d615
No related branches found
No related tags found
1 merge request!156Added first version of dp_bsn_align_v2.vhd with mmp and tb. This was...
......@@ -270,10 +270,10 @@ BEGIN
FOR I IN 0 TO g_nof_streams-1 LOOP
d.lost_data_flag := NOT v.filled_arr(I)(v.rd_pointer);
IF stream_en_arr(I) = '1' THEN -- use MM bit at sop
v.use_replacement_data(I) := d.lost_data_flag; -- enabled stream, so replace if data was lost
v.mm_sosi.channel(I) := d.lost_data_flag;
v.use_replacement_data(I) := d.lost_data_flag; -- enabled stream, so replace the data if the data was lost
v.mm_sosi.channel(I) := d.lost_data_flag; -- enabled stream, so flag the data if the data was lost
ELSE
v.use_replacement_data(I) := '1'; -- disabled stream, so replace data
v.use_replacement_data(I) := '1'; -- disabled stream, so replace the data, but do not flag the data as lost
END IF;
END LOOP;
END IF;
......@@ -309,6 +309,9 @@ BEGIN
-- . output via MM interface
mm_cipo_arr <= v.fill_cipo_arr;
-- . no output via DP streaming interface
out_sosi_arr <= (OTHERS => c_dp_sosi_rst);
ELSE
--------------------------------------------------------------------------
-- Do the output via the DP streaming interface
......@@ -318,20 +321,27 @@ BEGIN
v.rd_copi := dp_copi;
v.rd_copi.address := RESIZE_MEM_ADDRESS(ADD_UVEC(r.rd_offset, dp_copi.address));
-- . hold mm_sosi.sync, bsn
-- . hold mm_sosi.sync, bsn, channel
IF r.mm_sosi.sop = '1' THEN
v.dp_sosi := r.mm_sosi;
END IF;
-- apply mm_sosi.sync and bsn at sop to all streams in out_sosi_arr
-- . pass on input data from the buffer
d.out_sosi_arr := rd_sosi_arr; -- = v.fill_cipo_arr in streaming format, contains the
-- input data from the buffer or replacement data
IF rd_sosi_arr(0).sop = '1' THEN
-- . at sop pass on input info from r.dp_sosi to all streams in out_sosi_arr
d.out_sosi_arr := func_dp_stream_arr_set(d.out_sosi_arr, r.dp_sosi.sync, "SYNC");
d.out_sosi_arr := func_dp_stream_arr_set(d.out_sosi_arr, r.dp_sosi.bsn, "BSN");
v.out_bsn := r.dp_sosi.bsn(g_bsn_w-1 DOWNTO 0); -- hold BSN until next sop, to ease view in wave window
FOR I IN 0 TO g_nof_streams-1 LOOP
-- . pass on the lost flag per stream
d.out_sosi_arr(I).channel := RESIZE_DP_CHANNEL(slv(r.dp_sosi.channel(I)));
END LOOP;
-- . hold BSN until next sop, to ease view in wave window
v.out_bsn := r.dp_sosi.bsn(g_bsn_w-1 DOWNTO 0);
ELSE
-- hold BSN until next sop, to ease view in wave window
-- . until next sop pass on BSN, to ease view in wave window
d.out_sosi_arr := func_dp_stream_arr_set(d.out_sosi_arr, r.out_bsn, "BSN");
END IF;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment