From d5751c0725aa7a88f9006c22daabe6410fc823b0 Mon Sep 17 00:00:00 2001
From: Kirika Uchida <kirika.uchida@cern.ch>
Date: Wed, 2 Oct 2024 16:35:50 +0100
Subject: [PATCH] added trigger to ecal prescale

---
 ecal/firmware/hdl/EcalDataProcessor.vhd | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/ecal/firmware/hdl/EcalDataProcessor.vhd b/ecal/firmware/hdl/EcalDataProcessor.vhd
index cbb73c8c..cbe1c48b 100644
--- a/ecal/firmware/hdl/EcalDataProcessor.vhd
+++ b/ecal/firmware/hdl/EcalDataProcessor.vhd
@@ -158,7 +158,7 @@ begin
   n_pre              <= ctrl_regs(0)(20 downto 17);
   n_post             <= ctrl_regs(0)(24 downto 21);
   n_data_out         <= to_integer(unsigned(n_pre) + unsigned(n_post)) + 1;
-  n_trig_prescale    <= ctrl_regs(0)(31 downto 25);
+  n_trig_prescale    <= to_integer(unsigned(ctrl_regs(0)(31 downto 25)));
 
   stat_regs(0)(8 downto 0) <= std_logic_vector(ttrig_block_lat_s);
   stat_regs(0)(9) <= data_ram_ena;
-- 
GitLab