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

Clarified c_min_nof_pps_interval.

parent d02dbbd4
No related branches found
No related tags found
1 merge request!272L2SDP-801 Verify bsn time offset in dp_bsn_source_v2.vhd
Pipeline #34725 passed
......@@ -59,15 +59,27 @@ END tb_dp_bsn_source_v2;
ARCHITECTURE tb OF tb_dp_bsn_source_v2 IS
CONSTANT c_gcd : NATURAL := gcd(g_pps_interval, g_block_size);
CONSTANT c_min_nof_interval : NATURAL := g_block_size / c_gcd;
-- choose c_nof_pps and c_nof_repeat > c_min_nof_interval, because the
-- fractional sync pattern will repeat every c_min_nof_interval number
-- The nof block per sync interval will be the same after every
-- c_min_nof_pps_interval. The c_gcd is the greatest common divider of
-- g_pps_interval and g_block_size, so g_block_size / c_gcd yields an
-- integer. When g_pps_interval and g_block_size are relative prime,
-- then c_gcd = 1, and then it takes g_block_size nof g_pps_interval
-- for the pattern of c_nof_block_per_sync_lo and c_nof_block_per_sync_hi
-- to repeat. If c_gcd = g_block_size, then c_nof_block_per_sync_lo =
-- c_nof_block_per_sync_hi, so then the nof block per sync interval is
-- the same in every pps interval.
CONSTANT c_gcd : NATURAL := gcd(g_pps_interval, g_block_size);
CONSTANT c_min_nof_pps_interval : NATURAL := g_block_size / c_gcd;
CONSTANT c_nof_block_per_sync_lo : NATURAL := g_pps_interval / g_block_size;
CONSTANT c_nof_block_per_sync_hi : NATURAL := ceil_div(g_pps_interval, g_block_size);
-- choose c_nof_pps and c_nof_repeat > c_min_nof_pps_interval, because the
-- fractional sync pattern will repeat every c_min_nof_pps_interval number
-- of g_pps_intervals.
CONSTANT c_factor : NATURAL := 3;
CONSTANT c_nof_pps : NATURAL := c_min_nof_interval * c_factor;
CONSTANT c_nof_repeat : NATURAL := c_min_nof_interval * c_factor;
CONSTANT c_nof_pps : NATURAL := c_min_nof_pps_interval * c_factor;
CONSTANT c_nof_repeat : NATURAL := c_min_nof_pps_interval * c_factor;
CONSTANT c_clk_period : TIME := 10 ns;
CONSTANT c_bsn_w : NATURAL := 31;
......
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