From 275afe65441d311d6a5bcd512eeec0cb914c42cc Mon Sep 17 00:00:00 2001
From: Erik Kooistra <kooistra@astron.nl>
Date: Sun, 8 May 2016 11:27:54 +0000
Subject: [PATCH] Added regression_test_vhdl for common, reorder, uth.

---
 libraries/base/common/hdllib.cfg              | 21 +++++++++++++++++++
 .../base/common/tb/vhdl/tb_common_add_sub.vhd |  7 +++++--
 .../common/tb/vhdl/tb_tb_common_add_sub.vhd   |  1 +
 .../tb/vhdl/tb_tb_common_adder_tree.vhd       |  1 +
 .../tb/vhdl/tb_tb_common_fanout_tree.vhd      |  1 +
 .../tb/vhdl/tb_tb_common_multiplexer.vhd      |  1 +
 .../tb/vhdl/tb_tb_common_operation_tree.vhd   |  1 +
 .../tb/vhdl/tb_tb_common_paged_ram_ww_rr.vhd  |  1 +
 .../tb/vhdl/tb_tb_common_reorder_symbol.vhd   |  1 +
 .../base/common/tb/vhdl/tb_tb_common_rl.vhd   |  1 +
 .../tb/vhdl/tb_tb_common_rl_register.vhd      |  3 ++-
 .../common/tb/vhdl/tb_tb_common_transpose.vhd |  2 +-
 libraries/base/common_mult/hdllib.cfg         |  6 ++++++
 libraries/base/reorder/hdllib.cfg             |  3 +++
 .../reorder/tb/vhdl/tb_tb_reorder_col.vhd     |  1 +
 libraries/base/uth/hdllib.cfg                 |  5 +++++
 libraries/base/uth/tb/vhdl/tb_tb_uth.vhd      |  3 ++-
 .../base/uth/tb/vhdl/tb_tb_uth_dp_packet.vhd  |  1 +
 .../base/uth/tb/vhdl/tb_tb_uth_terminals.vhd  |  3 ++-
 19 files changed, 57 insertions(+), 6 deletions(-)

diff --git a/libraries/base/common/hdllib.cfg b/libraries/base/common/hdllib.cfg
index bb6293abc4..5bcc3b8f9e 100644
--- a/libraries/base/common/hdllib.cfg
+++ b/libraries/base/common/hdllib.cfg
@@ -194,7 +194,28 @@ test_bench_files =
     tb/vhdl/tb_tb_common_rl_register.vhd
     tb/vhdl/tb_tb_common_transpose.vhd
 
+regression_test_vhdl = 
+    tb/vhdl/tb_common_fifo_rd.vhd
+    tb/vhdl/tb_common_mem_mux.vhd
+    tb/vhdl/tb_common_paged_ram_crw_crw.vhd
+    tb/vhdl/tb_common_pulser_us_ms_s.vhd
+    tb/vhdl/tb_common_select_m_symbols.vhd
+    tb/vhdl/tb_common_shiftram.vhd
+    tb/vhdl/tb_common_shiftreg.vhd
+    tb/vhdl/tb_common_transpose_symbol.vhd
+    tb/vhdl/tb_resize.vhd
 
+    tb/vhdl/tb_tb_common_adder_tree.vhd
+    tb/vhdl/tb_tb_common_add_sub.vhd
+    tb/vhdl/tb_tb_common_fanout_tree.vhd
+    tb/vhdl/tb_tb_common_multiplexer.vhd
+    tb/vhdl/tb_tb_common_operation_tree.vhd
+    tb/vhdl/tb_tb_common_paged_ram_ww_rr.vhd
+    tb/vhdl/tb_tb_common_reorder_symbol.vhd
+    tb/vhdl/tb_tb_common_rl.vhd
+    tb/vhdl/tb_tb_common_rl_register.vhd
+    tb/vhdl/tb_tb_common_transpose.vhd
+    
 [modelsim_project_file]
 
 
diff --git a/libraries/base/common/tb/vhdl/tb_common_add_sub.vhd b/libraries/base/common/tb/vhdl/tb_common_add_sub.vhd
index eb8356bfb8..e55dfab103 100644
--- a/libraries/base/common/tb/vhdl/tb_common_add_sub.vhd
+++ b/libraries/base/common/tb/vhdl/tb_common_add_sub.vhd
@@ -58,6 +58,7 @@ ARCHITECTURE tb OF tb_common_add_sub IS
     RETURN TO_SVEC(v_result, g_out_dat_w);
   END;
 
+  SIGNAL tb_end          : STD_LOGIC := '0';
   SIGNAL rst             : STD_LOGIC;
   SIGNAL clk             : STD_LOGIC := '0';
   SIGNAL in_a            : STD_LOGIC_VECTOR(g_in_dat_w-1 DOWNTO 0);
@@ -68,9 +69,9 @@ ARCHITECTURE tb OF tb_common_add_sub IS
 
 BEGIN
 
-  clk  <= NOT clk  AFTER clk_period/2;
+  clk  <= NOT clk OR tb_end AFTER clk_period/2;
   
-  -- run 1 us
+  -- run 1 us or -all
   p_in_stimuli : PROCESS
   BEGIN
     rst <= '1';
@@ -123,6 +124,8 @@ BEGIN
         WAIT UNTIL rising_edge(clk);
       END LOOP;
     END LOOP;
+    WAIT UNTIL rising_edge(clk);
+    tb_end <= '1';
     WAIT;
   END PROCESS;
   
diff --git a/libraries/base/common/tb/vhdl/tb_tb_common_add_sub.vhd b/libraries/base/common/tb/vhdl/tb_tb_common_add_sub.vhd
index 8c59518204..2c8123d7ec 100644
--- a/libraries/base/common/tb/vhdl/tb_tb_common_add_sub.vhd
+++ b/libraries/base/common/tb/vhdl/tb_tb_common_add_sub.vhd
@@ -26,6 +26,7 @@ ENTITY tb_tb_common_add_sub IS
 END tb_tb_common_add_sub;
 
 ARCHITECTURE tb OF tb_tb_common_add_sub IS
+  SIGNAL tb_end : STD_LOGIC := '0';  -- declare tb_end to avoid 'No objects found' error on 'when -label tb_end'
 BEGIN
   -- g_direction    : STRING := "SUB";  -- "SUB" or "ADD"
   -- g_sel_add      : STD_LOGIC :='1';  -- '0' = sub, '1' = add, only valid for g_direction = "BOTH"
diff --git a/libraries/base/common/tb/vhdl/tb_tb_common_adder_tree.vhd b/libraries/base/common/tb/vhdl/tb_tb_common_adder_tree.vhd
index f17c0be30a..3651a2acc8 100644
--- a/libraries/base/common/tb/vhdl/tb_tb_common_adder_tree.vhd
+++ b/libraries/base/common/tb/vhdl/tb_tb_common_adder_tree.vhd
@@ -27,6 +27,7 @@ ENTITY tb_tb_common_adder_tree IS
 END tb_tb_common_adder_tree;
 
 ARCHITECTURE tb OF tb_tb_common_adder_tree IS
+  SIGNAL tb_end : STD_LOGIC := '0';  -- declare tb_end to avoid 'No objects found' error on 'when -label tb_end'
 BEGIN
   -- Usage:
   -- > as 4
diff --git a/libraries/base/common/tb/vhdl/tb_tb_common_fanout_tree.vhd b/libraries/base/common/tb/vhdl/tb_tb_common_fanout_tree.vhd
index 0c0806c89f..624c3046ae 100644
--- a/libraries/base/common/tb/vhdl/tb_tb_common_fanout_tree.vhd
+++ b/libraries/base/common/tb/vhdl/tb_tb_common_fanout_tree.vhd
@@ -27,6 +27,7 @@ ENTITY tb_tb_common_fanout_tree IS
 END tb_tb_common_fanout_tree;
 
 ARCHITECTURE tb OF tb_tb_common_fanout_tree IS
+  SIGNAL tb_end : STD_LOGIC := '0';  -- declare tb_end to avoid 'No objects found' error on 'when -label tb_end'
 BEGIN
   -- Usage:
   -- > as 3
diff --git a/libraries/base/common/tb/vhdl/tb_tb_common_multiplexer.vhd b/libraries/base/common/tb/vhdl/tb_tb_common_multiplexer.vhd
index b713d9ab44..124b0559f2 100644
--- a/libraries/base/common/tb/vhdl/tb_tb_common_multiplexer.vhd
+++ b/libraries/base/common/tb/vhdl/tb_tb_common_multiplexer.vhd
@@ -27,6 +27,7 @@ ENTITY tb_tb_common_multiplexer IS
 END tb_tb_common_multiplexer;
 
 ARCHITECTURE tb OF tb_tb_common_multiplexer IS
+  SIGNAL tb_end : STD_LOGIC := '0';  -- declare tb_end to avoid 'No objects found' error on 'when -label tb_end'
 BEGIN
   -- Usage:
   -- > as 3
diff --git a/libraries/base/common/tb/vhdl/tb_tb_common_operation_tree.vhd b/libraries/base/common/tb/vhdl/tb_tb_common_operation_tree.vhd
index 92834eaafa..f6552c5466 100644
--- a/libraries/base/common/tb/vhdl/tb_tb_common_operation_tree.vhd
+++ b/libraries/base/common/tb/vhdl/tb_tb_common_operation_tree.vhd
@@ -26,6 +26,7 @@ ENTITY tb_tb_common_operation_tree IS
 END tb_tb_common_operation_tree;
 
 ARCHITECTURE tb OF tb_tb_common_operation_tree IS
+  SIGNAL tb_end : STD_LOGIC := '0';  -- declare tb_end to avoid 'No objects found' error on 'when -label tb_end'
 BEGIN
   -- Usage:
   -- > as 2
diff --git a/libraries/base/common/tb/vhdl/tb_tb_common_paged_ram_ww_rr.vhd b/libraries/base/common/tb/vhdl/tb_tb_common_paged_ram_ww_rr.vhd
index 940f2478ac..2eb9463f43 100644
--- a/libraries/base/common/tb/vhdl/tb_tb_common_paged_ram_ww_rr.vhd
+++ b/libraries/base/common/tb/vhdl/tb_tb_common_paged_ram_ww_rr.vhd
@@ -27,6 +27,7 @@ ENTITY tb_tb_common_paged_ram_ww_rr IS
 END tb_tb_common_paged_ram_ww_rr;
 
 ARCHITECTURE tb OF tb_tb_common_paged_ram_ww_rr IS
+  SIGNAL tb_end : STD_LOGIC := '0';  -- declare tb_end to avoid 'No objects found' error on 'when -label tb_end'
 BEGIN
   -- Usage:
   -- > as 3
diff --git a/libraries/base/common/tb/vhdl/tb_tb_common_reorder_symbol.vhd b/libraries/base/common/tb/vhdl/tb_tb_common_reorder_symbol.vhd
index 4310dc13d5..27e95a1e9c 100644
--- a/libraries/base/common/tb/vhdl/tb_tb_common_reorder_symbol.vhd
+++ b/libraries/base/common/tb/vhdl/tb_tb_common_reorder_symbol.vhd
@@ -26,6 +26,7 @@ ENTITY tb_tb_common_reorder_symbol IS
 END tb_tb_common_reorder_symbol;
 
 ARCHITECTURE tb OF tb_tb_common_reorder_symbol IS
+  SIGNAL tb_end : STD_LOGIC := '0';  -- declare tb_end to avoid 'No objects found' error on 'when -label tb_end'
 BEGIN
   -- Usage:
   -- > as 3
diff --git a/libraries/base/common/tb/vhdl/tb_tb_common_rl.vhd b/libraries/base/common/tb/vhdl/tb_tb_common_rl.vhd
index d589f9c8ef..86f22d7ee0 100644
--- a/libraries/base/common/tb/vhdl/tb_tb_common_rl.vhd
+++ b/libraries/base/common/tb/vhdl/tb_tb_common_rl.vhd
@@ -30,6 +30,7 @@ ARCHITECTURE tb OF tb_tb_common_rl IS
 
   CONSTANT c_nof_blocks  : NATURAL := 1000;
   CONSTANT c_fifo_size   : NATURAL := 64;
+  SIGNAL tb_end : STD_LOGIC := '0';  -- declare tb_end to avoid 'No objects found' error on 'when -label tb_end'
   
 BEGIN
   -- Usage:
diff --git a/libraries/base/common/tb/vhdl/tb_tb_common_rl_register.vhd b/libraries/base/common/tb/vhdl/tb_tb_common_rl_register.vhd
index 19668f2fc9..c1635b099d 100644
--- a/libraries/base/common/tb/vhdl/tb_tb_common_rl_register.vhd
+++ b/libraries/base/common/tb/vhdl/tb_tb_common_rl_register.vhd
@@ -30,7 +30,8 @@ ARCHITECTURE tb OF tb_tb_common_rl_register IS
 
   CONSTANT c_nof_blocks  : NATURAL := 1000;
   CONSTANT c_fifo_size   : NATURAL := 64;
-  
+  SIGNAL tb_end : STD_LOGIC := '0';  -- declare tb_end to avoid 'No objects found' error on 'when -label tb_end'
+
 BEGIN
   -- Usage:
   -- > as 2
diff --git a/libraries/base/common/tb/vhdl/tb_tb_common_transpose.vhd b/libraries/base/common/tb/vhdl/tb_tb_common_transpose.vhd
index 5756a4cc92..5f12b23f08 100644
--- a/libraries/base/common/tb/vhdl/tb_tb_common_transpose.vhd
+++ b/libraries/base/common/tb/vhdl/tb_tb_common_transpose.vhd
@@ -31,7 +31,7 @@ ENTITY tb_tb_common_transpose IS
 END tb_tb_common_transpose;
 
 ARCHITECTURE tb OF tb_tb_common_transpose IS
-
+  SIGNAL tb_end : STD_LOGIC := '0';  -- declare tb_end to avoid 'No objects found' error on 'when -label tb_end'
 BEGIN
 
 --                                                            g_pipeline_shiftreg  : NATURAL := 0;
diff --git a/libraries/base/common_mult/hdllib.cfg b/libraries/base/common_mult/hdllib.cfg
index df4cdb0d9d..dc273fac62 100644
--- a/libraries/base/common_mult/hdllib.cfg
+++ b/libraries/base/common_mult/hdllib.cfg
@@ -18,7 +18,13 @@ test_bench_files =
 
     tb/vhdl/tb_tb_common_mult.vhd
 
+regression_test_vhdl = 
+    tb/vhdl/tb_common_mult_add2.vhd
+    tb/vhdl/tb_common_complex_mult.vhd
+
+    tb/vhdl/tb_tb_common_mult.vhd
 
+    
 [modelsim_project_file]
 
 
diff --git a/libraries/base/reorder/hdllib.cfg b/libraries/base/reorder/hdllib.cfg
index 36f998ac3c..e87ec65d34 100644
--- a/libraries/base/reorder/hdllib.cfg
+++ b/libraries/base/reorder/hdllib.cfg
@@ -32,6 +32,9 @@ test_bench_files =
     tb/vhdl/tb_mmf_reorder_matrix.vhd     
     tb/vhdl/tb_mmf_reorder_row.vhd     
 
+regression_test_vhdl = 
+    tb/vhdl/tb_tb_reorder_col.vhd    
+
 
 [modelsim_project_file]
 modelsim_compile_ip_files =
diff --git a/libraries/base/reorder/tb/vhdl/tb_tb_reorder_col.vhd b/libraries/base/reorder/tb/vhdl/tb_tb_reorder_col.vhd
index d11a9c4f27..6d64aa87cb 100644
--- a/libraries/base/reorder/tb/vhdl/tb_tb_reorder_col.vhd
+++ b/libraries/base/reorder/tb/vhdl/tb_tb_reorder_col.vhd
@@ -29,6 +29,7 @@ ARCHITECTURE tb OF tb_tb_reorder_col IS
 
   CONSTANT c_nof_sync       : NATURAL := 20;
   CONSTANT c_reverse_ss_map : BOOLEAN := TRUE;
+  SIGNAL tb_end : STD_LOGIC := '0';  -- declare tb_end to avoid 'No objects found' error on 'when -label tb_end'
   
 BEGIN
 
diff --git a/libraries/base/uth/hdllib.cfg b/libraries/base/uth/hdllib.cfg
index 3a67124dbb..4a0c5ca15c 100644
--- a/libraries/base/uth/hdllib.cfg
+++ b/libraries/base/uth/hdllib.cfg
@@ -22,7 +22,12 @@ test_bench_files =
     tb/vhdl/tb_tb_uth_terminals.vhd
     tb/vhdl/tb_tb_tb_uth_regression.vhd
 
+regression_test_vhdl = 
+    tb/vhdl/tb_tb_uth.vhd
+    tb/vhdl/tb_tb_uth_dp_packet.vhd
+    tb/vhdl/tb_tb_uth_terminals.vhd
 
+    
 [modelsim_project_file]
 
 
diff --git a/libraries/base/uth/tb/vhdl/tb_tb_uth.vhd b/libraries/base/uth/tb/vhdl/tb_tb_uth.vhd
index a9376d0f0e..62f4b81a50 100644
--- a/libraries/base/uth/tb/vhdl/tb_tb_uth.vhd
+++ b/libraries/base/uth/tb/vhdl/tb_tb_uth.vhd
@@ -35,7 +35,8 @@ ARCHITECTURE tb OF tb_tb_uth IS
 
   CONSTANT c_phy_link_valid_support : BOOLEAN := TRUE;
   CONSTANT c_nof_repeat             : NATURAL := 10;
-  
+  SIGNAL tb_end : STD_LOGIC := '0';  -- declare tb_end to avoid 'No objects found' error on 'when -label tb_end'
+
 BEGIN
 
   -- in_en = active, src_in.ready = active
diff --git a/libraries/base/uth/tb/vhdl/tb_tb_uth_dp_packet.vhd b/libraries/base/uth/tb/vhdl/tb_tb_uth_dp_packet.vhd
index 96d636765e..2279260aad 100644
--- a/libraries/base/uth/tb/vhdl/tb_tb_uth_dp_packet.vhd
+++ b/libraries/base/uth/tb/vhdl/tb_tb_uth_dp_packet.vhd
@@ -35,6 +35,7 @@ ARCHITECTURE tb OF tb_tb_uth_dp_packet IS
 
   CONSTANT c_phy_link_valid_support : BOOLEAN := TRUE;
   CONSTANT c_nof_repeat             : NATURAL := 10;
+  SIGNAL tb_end : STD_LOGIC := '0';  -- declare tb_end to avoid 'No objects found' error on 'when -label tb_end'
   
 BEGIN
 
diff --git a/libraries/base/uth/tb/vhdl/tb_tb_uth_terminals.vhd b/libraries/base/uth/tb/vhdl/tb_tb_uth_terminals.vhd
index 0455c58af6..c09018d338 100644
--- a/libraries/base/uth/tb/vhdl/tb_tb_uth_terminals.vhd
+++ b/libraries/base/uth/tb/vhdl/tb_tb_uth_terminals.vhd
@@ -35,7 +35,8 @@ ARCHITECTURE tb OF tb_tb_uth_terminals IS
 
   CONSTANT c_phy_link_valid_support : BOOLEAN := TRUE;
   CONSTANT c_nof_repeat             : NATURAL := 100;
-  
+  SIGNAL tb_end : STD_LOGIC := '0';  -- declare tb_end to avoid 'No objects found' error on 'when -label tb_end'
+
 BEGIN
 
   --                                                                   in_en,    out_ready, nof_repeat,   phy_fifo_size, uth_rx_timeout_w, tx_use_fifo, tx_fifo_fill, rx_use_fifo, rx_fifo_fill, fifo_use_sync, fifo_use_bsn, nof_input, nof_serial
-- 
GitLab