From d3618ab4a0986a8b70511a338ba93f81ee173e4d Mon Sep 17 00:00:00 2001
From: Eric Kooistra <kooistra@astron.nl>
Date: Thu, 20 Oct 2022 18:55:21 +0200
Subject: [PATCH] Use reg range constants from dp_components_pkg.vhd

---
 libraries/base/dp/tb/vhdl/tb_dp_strobe_total_count.vhd | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/libraries/base/dp/tb/vhdl/tb_dp_strobe_total_count.vhd b/libraries/base/dp/tb/vhdl/tb_dp_strobe_total_count.vhd
index 24f22387fd..0b9f2f66bd 100644
--- a/libraries/base/dp/tb/vhdl/tb_dp_strobe_total_count.vhd
+++ b/libraries/base/dp/tb/vhdl/tb_dp_strobe_total_count.vhd
@@ -40,6 +40,7 @@ USE common_lib.tb_common_mem_pkg.ALL;
 USE common_lib.common_str_pkg.ALL;
 USE common_lib.tb_common_pkg.ALL;
 USE work.dp_stream_pkg.ALL;
+USE work.dp_components_pkg.ALL;
 
 ENTITY tb_dp_strobe_total_count IS
   GENERIC (
@@ -66,7 +67,7 @@ ARCHITECTURE tb OF tb_dp_strobe_total_count IS
   CONSTANT c_clip                  : BOOLEAN := TRUE;
 
   -- dut
-  CONSTANT c_nof_counts_max        : NATURAL := 15;
+  CONSTANT c_nof_counts_max        : NATURAL := c_dp_strobe_total_count_nof_counts_max;  -- fixed by REGMAP
   CONSTANT c_nof_counts            : NATURAL := 3;  -- count stimuli.sync, sop, valid
   CONSTANT c_count_max             : NATURAL := 2**g_count_w - 1;
   CONSTANT c_mm_addr_clear         : NATURAL := c_nof_counts_max*2;
@@ -140,7 +141,6 @@ BEGIN
   u_dut : ENTITY work.dp_strobe_total_count
   GENERIC MAP (
     g_mm_w           => g_mm_w,
-    g_nof_counts_max => c_nof_counts_max,
     g_nof_counts     => c_nof_counts,
     g_count_w        => g_count_w,
     g_clip           => c_clip
-- 
GitLab