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

Make code for v.rd_blk_pointer more clear.

parent 8235dc62
No related branches found
No related tags found
1 merge request!389Resolve L2SDP-1013
This commit is part of merge request !389. Comments created here will be created in the context of that merge request.
......@@ -275,12 +275,16 @@ begin
v.bsn_arr(v.wr_blk_pointer) := w.ref_sosi.bsn(g_bsn_w - 1 downto 0);
-- . update read block pointer at g_bsn_latency_max blocks behind the
-- reference write pointer, dependent on the node_index. For
-- g_bsn_latency_max = 1 the node_index = 0 fixed. For
-- g_bsn_latency_max > 1, node_index is the first BSN aligner in a
-- chain. Each subsequent node in the chain then has to account for
-- g_bsn_latency_max additional block latency.
v.rd_blk_pointer := v.wr_blk_pointer - g_bsn_latency_max * (1 + node_index);
-- reference write pointer, dependent on the node_index:
-- - for g_nof_aligners_max = 1 the node_index = 0 fixed
-- - for g_nof_aligners_max > 1, node_index is the first BSN aligner in
-- a chain. Each subsequent node in the chain then has to account
-- for g_bsn_latency_max additional block latency.
if g_nof_aligners_max = 1 then
v.rd_blk_pointer := v.wr_blk_pointer - g_bsn_latency_max;
else
v.rd_blk_pointer := v.wr_blk_pointer - g_bsn_latency_max * (1 + node_index);
end if;
if v.rd_blk_pointer < 0 then
v.rd_blk_pointer := v.rd_blk_pointer + c_buffer_nof_blocks;
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