From 29df90a79e978d9c6ea9a86440fae3cf701c3b53 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Franti=C5=A1ek=20Boh=C3=A1=C4=8Dek?= Date: Sun, 2 Apr 2023 17:49:35 +0200 Subject: [PATCH] fix: offset lmfc counter to align with sysref by default --- src/lmfc_counter.vhd | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/lmfc_counter.vhd b/src/lmfc_counter.vhd index 37357c4..e624aea 100644 --- a/src/lmfc_counter.vhd +++ b/src/lmfc_counter.vhd @@ -33,7 +33,7 @@ begin -- architecture a1 elsif ci_device_clk'event and ci_device_clk = '1' then -- rising clock edge count <= (count + 1) mod COUNT_TO; if prev_sysref = '0' and ci_sysref = '1' and ci_enable_sync = '1' then - count <= (-PHASE_ADJUST) mod COUNT_TO; + count <= (-PHASE_ADJUST + 1) mod COUNT_TO; end if; prev_sysref <= ci_sysref; end if; -- 2.48.1