From ce7506eae7d29d5886d0cf6fec6a84e0e0daab30 Mon Sep 17 00:00:00 2001
From: Erik Kooistra <kooistra@astron.nl>
Date: Fri, 21 Dec 2018 12:11:45 +0000
Subject: [PATCH] Added g_wait_last_evt to allow for more latency in DUT.

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

diff --git a/libraries/base/dp/tb/vhdl/dp_stream_stimuli.vhd b/libraries/base/dp/tb/vhdl/dp_stream_stimuli.vhd
index 859e272b34..5598324d73 100644
--- a/libraries/base/dp/tb/vhdl/dp_stream_stimuli.vhd
+++ b/libraries/base/dp/tb/vhdl/dp_stream_stimuli.vhd
@@ -62,7 +62,8 @@ ENTITY dp_stream_stimuli IS
     g_in_dat_w       : NATURAL := 32;
     g_nof_repeat     : NATURAL := 5;
     g_pkt_len        : NATURAL := 16;
-    g_pkt_gap        : NATURAL := 4
+    g_pkt_gap        : NATURAL := 4;
+    g_wait_last_evt  : NATURAL := 100   -- number of clk cycles to wait with last_snk_in_evt after finishing the stimuli
   );
   PORT (
     rst               : IN  STD_LOGIC;
@@ -168,7 +169,7 @@ BEGIN
     last_snk_in <= v_last;
     
     -- Signal end of stimuli
-    proc_common_wait_some_cycles(clk, 100);  -- latency from stimuli to verify depends on the flow control, so wait sufficiently long for last packet to have passed through
+    proc_common_wait_some_cycles(clk, g_wait_last_evt);  -- latency from stimuli to verify depends on the flow control, so wait sufficiently long for last packet to have passed through
     proc_common_gen_pulse(clk, last_snk_in_evt);
     proc_common_wait_some_cycles(clk, 50);
     tb_end <= '1';
-- 
GitLab