From a542f2426d067dc402f405158828b683523a38bf Mon Sep 17 00:00:00 2001 From: Erik Kooistra <kooistra@astron.nl> Date: Thu, 27 Jul 2017 09:08:28 +0000 Subject: [PATCH] corrected c_delay_len dependency on c_period_len using ceil_div(). --- .../base/common/src/vhdl/common_clock_phase_detector.vhd | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/libraries/base/common/src/vhdl/common_clock_phase_detector.vhd b/libraries/base/common/src/vhdl/common_clock_phase_detector.vhd index e0c5d02a0d..3ef74ed4aa 100644 --- a/libraries/base/common/src/vhdl/common_clock_phase_detector.vhd +++ b/libraries/base/common/src/vhdl/common_clock_phase_detector.vhd @@ -117,7 +117,11 @@ END common_clock_phase_detector; ARCHITECTURE str OF common_clock_phase_detector IS CONSTANT c_period_len : NATURAL := 2*g_clk_factor; - CONSTANT c_delay_len : NATURAL := ceil_value(g_meta_delay_len, c_period_len)+1 + g_offset_delay_len; -- detect clock phase relation independent of g_meta_delay_len + CONSTANT c_delay_len : NATURAL := ceil_div(g_meta_delay_len, c_period_len)*c_period_len+1 + g_offset_delay_len; -- detect clock phase relation independent of g_meta_delay_len + + SIGNAL dbg_g_meta_delay_len : NATURAL := g_meta_delay_len; -- to view it in the wave window + SIGNAL dbg_c_period_len : NATURAL := c_period_len; -- to view it in the wave window + SIGNAL dbg_c_delay_len : NATURAL := c_delay_len; -- to view it in the wave window SIGNAL in_phs_cap : STD_LOGIC; SIGNAL in_phs : STD_LOGIC; -- GitLab