From a58a49d1f5e8b5fabfd070f6d7c9c6cbf09de8cf Mon Sep 17 00:00:00 2001
From: David Gabriel Monk <david.gabriel.monk@cern.ch>
Date: Tue, 25 Jun 2024 10:54:27 +0200
Subject: [PATCH] Solve: FEC counter missing from LPGBT links

---
 dependencies.yml                       | 2 +-
 top/charm/firmware/hdl/emp_payload.vhd | 3 ++-
 2 files changed, 3 insertions(+), 2 deletions(-)

diff --git a/dependencies.yml b/dependencies.yml
index ef253d77..670f80fb 100644
--- a/dependencies.yml
+++ b/dependencies.yml
@@ -1,7 +1,7 @@
 ---
 sources:
     emp-fwk:
-        branch: v0.9.0-alpha2
+        branch: feature/v0.9.0-alpha2-w-lpgbt-fec-cntr
         url: https://gitlab.cern.ch/p2-xware/firmware/emp-fwk.git
 
     ttc_legacy:
diff --git a/top/charm/firmware/hdl/emp_payload.vhd b/top/charm/firmware/hdl/emp_payload.vhd
index ac9e6403..5b581845 100644
--- a/top/charm/firmware/hdl/emp_payload.vhd
+++ b/top/charm/firmware/hdl/emp_payload.vhd
@@ -211,7 +211,8 @@ begin
         generic map (
             module_type => cDTCInputLinkMap(i).module_type,
             bandwidth   => cDTCInputLinkMap(i).bandwidth,
-            cic_type    => cDTCInputLinkMap(i).cic_type
+            cic_type    => cDTCInputLinkMap(i).cic_type,
+            emp_channel => cDTCInputLinkMap(i).index
         )
         port map (
             --- Input Ports ---
-- 
GitLab