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 ead48b48a7d79a60e916b27ef1e746237bca17de..37e704250c6f5a32d96f54bcc80a5fa734afee49 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;