From 3a8cd8f3df87fe577a466073c1b8de2f759dbebe Mon Sep 17 00:00:00 2001
From: Erik Kooistra <kooistra@astron.nl>
Date: Wed, 18 May 2016 12:58:59 +0000
Subject: [PATCH] Use p_dummy process to avoid reaching report failure when
 running tb for unb1 which has no 10gbase_r.

---
 .../technology/10gbase_r/tb_tech_10gbase_r.vhd | 18 +++++++++++-------
 1 file changed, 11 insertions(+), 7 deletions(-)

diff --git a/libraries/technology/10gbase_r/tb_tech_10gbase_r.vhd b/libraries/technology/10gbase_r/tb_tech_10gbase_r.vhd
index aff446ead1..b2862660f5 100644
--- a/libraries/technology/10gbase_r/tb_tech_10gbase_r.vhd
+++ b/libraries/technology/10gbase_r/tb_tech_10gbase_r.vhd
@@ -91,19 +91,23 @@ BEGIN
     link_fault <= '0';
     WAIT FOR 10 us;
     tb_end <= '1';
-    
-    WAIT FOR 10 us;  -- this line seems necessary to ensure that -label will stop the simulation
-                     -- before the FAILURE when p_tb_end is the only process that is still active,
-                     -- which is the case for g_technology that do not support the pll and dut.
-                     -- Only using 1 us >> tech_pll_clk_644_period in p_tb_end, instead of 1 ns does
-                     -- not help to avoid the FAILURE.
     WAIT;
   END PROCESS;
   
+  -- This extra p_dummy process seems necessary to ensure that -label will stop
+  -- the simulation before the FAILURE when p_tb_end is the only process that
+  -- is still active, which is the case for g_technology that do not support
+  -- the pll and dut. Only using 1 us >> tech_pll_clk_644_period in p_tb_end,
+  -- instead of 1 ns does not help to avoid the FAILURE.
+  p_dummy : PROCESS
+  BEGIN
+    WAIT FOR 1 ns;
+  END PROCESS;
+  
   p_tb_end : PROCESS
   BEGIN
     WAIT UNTIL tb_end='1';
-    WAIT FOR 1 us;
+    WAIT FOR 1 ns;
     REPORT "Tb simulation finished." SEVERITY FAILURE;
     WAIT;
   END PROCESS;
-- 
GitLab