From 326a499fb5f0df81b42635acbb1d212f79556608 Mon Sep 17 00:00:00 2001
From: Eric Kooistra <kooistra@astron.nl>
Date: Mon, 7 Mar 2022 11:46:46 +0100
Subject: [PATCH] Added missing rising_edge(dp_clk) in p_parameters process.

---
 .../sdp/src/vhdl/sdp_statistics_offload.vhd   | 28 ++++++++++---------
 1 file changed, 15 insertions(+), 13 deletions(-)

diff --git a/applications/lofar2/libraries/sdp/src/vhdl/sdp_statistics_offload.vhd b/applications/lofar2/libraries/sdp/src/vhdl/sdp_statistics_offload.vhd
index 2ae5dad0a3..73441a6193 100644
--- a/applications/lofar2/libraries/sdp/src/vhdl/sdp_statistics_offload.vhd
+++ b/applications/lofar2/libraries/sdp/src/vhdl/sdp_statistics_offload.vhd
@@ -309,19 +309,21 @@ BEGIN
   -- Derive and pipeline dynamic parameters
   p_parameters : PROCESS(dp_clk)
   BEGIN
-    gn_index_reg     <= gn_index;
-    pn_index         <= func_sdp_gn_index_to_pn_index(gn_index_reg);
-    offset_rn        <= TO_UINT(ring_info.O_rn);
-    rn_index         <= gn_index_reg - offset_rn;
-    local_si_offset  <= pn_index * c_sdp_S_pn;
-    nof_cycles_dly   <= gn_index_reg * g_offload_time;
-    nof_rn           <= TO_UINT(ring_info.N_rn);
-    nof_used_P_sq    <= smallest(nof_rn / 2 + 1, g_P_sq);
-    nof_packets      <= func_sdp_get_stat_nof_packets(g_statistics_type, c_sdp_S_pn, nof_used_P_sq, r.nof_crosslets);
-    remote_rn        <= func_ring_nof_hops_to_source_rn(r.instance_count, rn_index, nof_rn, g_crosslets_direction);
-    remote_gn        <= offset_rn + remote_rn;
-    remote_pn        <= func_sdp_gn_index_to_pn_index(remote_gn);
-    remote_si_offset <= remote_pn * c_sdp_S_pn;
+    IF rising_edge(dp_clk) THEN
+      gn_index_reg     <= gn_index;
+      pn_index         <= func_sdp_gn_index_to_pn_index(gn_index_reg);
+      offset_rn        <= TO_UINT(ring_info.O_rn);
+      rn_index         <= gn_index_reg - offset_rn;
+      local_si_offset  <= pn_index * c_sdp_S_pn;
+      nof_cycles_dly   <= gn_index_reg * g_offload_time;
+      nof_rn           <= TO_UINT(ring_info.N_rn);
+      nof_used_P_sq    <= smallest(nof_rn / 2 + 1, g_P_sq);
+      nof_packets      <= func_sdp_get_stat_nof_packets(g_statistics_type, c_sdp_S_pn, nof_used_P_sq, r.nof_crosslets);
+      remote_rn        <= func_ring_nof_hops_to_source_rn(r.instance_count, rn_index, nof_rn, g_crosslets_direction);
+      remote_gn        <= offset_rn + remote_rn;
+      remote_pn        <= func_sdp_gn_index_to_pn_index(remote_gn);
+      remote_si_offset <= remote_pn * c_sdp_S_pn;
+    END IF;
   END PROCESS;
 
   -- Assign application header data_id for different statistic types, use
-- 
GitLab