From 3a69f5e11f89f356457c1d4b5ce07972aee0488a Mon Sep 17 00:00:00 2001
From: Erik Kooistra <kooistra@astron.nl>
Date: Tue, 25 Oct 2016 11:52:13 +0000
Subject: [PATCH] Improved proc_dp_verify_sync() to be able to handle
 c_sync_period=1.

---
 libraries/base/dp/tb/vhdl/tb_dp_pkg.vhd | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/libraries/base/dp/tb/vhdl/tb_dp_pkg.vhd b/libraries/base/dp/tb/vhdl/tb_dp_pkg.vhd
index 6bcfc2aef4..96d73b43ae 100644
--- a/libraries/base/dp/tb/vhdl/tb_dp_pkg.vhd
+++ b/libraries/base/dp/tb/vhdl/tb_dp_pkg.vhd
@@ -2044,7 +2044,7 @@ PACKAGE BODY tb_dp_pkg IS
   BEGIN
     IF rising_edge(clk) THEN
       IF verify_en='1' THEN
-        v_expected_sync := TO_UINT(bsn(c_bsn_w-1 DOWNTO 0)) MOD c_sync_period = c_sync_offset;
+        v_expected_sync := (TO_UINT(bsn(c_bsn_w-1 DOWNTO 0))-c_sync_offset) MOD c_sync_period = 0;
         -- Check for unexpected sync
         IF sync='1' THEN
           ASSERT v_expected_sync = TRUE
-- 
GitLab