From 4591ed7a1d2a2d4957d2f84ae3c698e06f18c1d8 Mon Sep 17 00:00:00 2001
From: Reinier van der Walle <walle@astron.nl>
Date: Tue, 23 Aug 2022 10:05:56 +0200
Subject: [PATCH] fixed compile error

---
 .../base/dp/src/vhdl/dp_bsn_source_reg_v2.vhd      | 14 +++++++-------
 1 file changed, 7 insertions(+), 7 deletions(-)

diff --git a/libraries/base/dp/src/vhdl/dp_bsn_source_reg_v2.vhd b/libraries/base/dp/src/vhdl/dp_bsn_source_reg_v2.vhd
index ead48b48a7..37e704250c 100644
--- a/libraries/base/dp/src/vhdl/dp_bsn_source_reg_v2.vhd
+++ b/libraries/base/dp/src/vhdl/dp_bsn_source_reg_v2.vhd
@@ -167,21 +167,21 @@ BEGIN
         CASE TO_UINT(sla_in.address(c_mm_reg.adr_w-1 DOWNTO 0)) IS
           -- Read Block Sync
           WHEN 0 =>
-            sla_out.rddata(0)           <= mm_on_status;
-            sla_out.rddata(1)           <= mm_on_pps;                         
+            sla_out.rddata(0) <= mm_on_status;
+            sla_out.rddata(1) <= mm_on_pps;                         
           WHEN 1 =>
-            sla_out.rddata(31 DOWNTO 0) <= mm_nof_clk_per_sync;
+            sla_out.rddata(c_word_w - 1 DOWNTO 0) <= mm_nof_clk_per_sync;
             
           -- Read current BSN
           WHEN 2 =>
-            sla_out.rddata(31 DOWNTO 0) <= mm_current_bsn(31 DOWNTO  0);
-            mm_current_bsn_hi           <= mm_current_bsn(63 DOWNTO 32);  -- first read low part and preserve high part
+            sla_out.rddata(c_word_w - 1 DOWNTO 0) <= mm_current_bsn(31 DOWNTO  0);
+            mm_current_bsn_hi                     <= mm_current_bsn(63 DOWNTO 32);  -- first read low part and preserve high part
           WHEN 3 =>
-            sla_out.rddata(31 DOWNTO 0) <= mm_current_bsn_hi;  -- then read preserved high part
+            sla_out.rddata(c_word_w - 1 DOWNTO 0) <= mm_current_bsn_hi;  -- then read preserved high part
           
           -- Read current bsn_time_offset
           WHEN 4 =>
-            sla_out.rddata <= RESIZE_UVEC(mm_bsn_time_offset, c_word_w);
+            sla_out.rddata(c_word_w - 1 DOWNTO 0) <= RESIZE_UVEC(mm_bsn_time_offset, c_word_w);
           
           WHEN OTHERS => NULL;  -- not used MM addresses
         END CASE;
-- 
GitLab