From ba91dd79d7cee74a239bf6e6821b8b65e09ab60d Mon Sep 17 00:00:00 2001
From: Eric Kooistra <kooistra@astron.nl>
Date: Fri, 14 Jan 2022 16:46:28 +0100
Subject: [PATCH] Added multi tb for tb_dp_offload_tx_v3.vhd.

---
 libraries/base/dp/hdllib.cfg                  |  2 +
 .../dp/tb/vhdl/tb_tb_dp_offload_tx_v3.vhd     | 60 +++++++++++++++++++
 2 files changed, 62 insertions(+)
 create mode 100644 libraries/base/dp/tb/vhdl/tb_tb_dp_offload_tx_v3.vhd

diff --git a/libraries/base/dp/hdllib.cfg b/libraries/base/dp/hdllib.cfg
index 3b1bff1f02..34a2c49f89 100644
--- a/libraries/base/dp/hdllib.cfg
+++ b/libraries/base/dp/hdllib.cfg
@@ -347,6 +347,7 @@ test_bench_files =
     
     tb/vhdl/tb_tb_tb_dp_backpressure.vhd
     tb/vhdl/tb_dp_offload_tx_v3.vhd
+    tb/vhdl/tb_tb_dp_offload_tx_v3.vhd
     tb/vhdl/tb_dp_offload_rx_filter.vhd
     tb/vhdl/tb_dp_selector_arr.vhd
     tb/vhdl/tb_mms_dp_scale.vhd
@@ -416,6 +417,7 @@ regression_test_vhdl =
     tb/vhdl/tb_tb_dp_xonoff.vhd
     tb/vhdl/tb_dp_selector_arr.vhd
     tb/vhdl/tb_mms_dp_scale.vhd
+    tb/vhdl/tb_tb_dp_offload_tx_v3.vhd
 
 [modelsim_project_file]
 
diff --git a/libraries/base/dp/tb/vhdl/tb_tb_dp_offload_tx_v3.vhd b/libraries/base/dp/tb/vhdl/tb_tb_dp_offload_tx_v3.vhd
new file mode 100644
index 0000000000..f55d74d658
--- /dev/null
+++ b/libraries/base/dp/tb/vhdl/tb_tb_dp_offload_tx_v3.vhd
@@ -0,0 +1,60 @@
+-- --------------------------------------------------------------------------
+-- Copyright 2021
+-- ASTRON (Netherlands Institute for Radio Astronomy) <http://www.astron.nl/>
+-- P.O.Box 2, 7990 AA Dwingeloo, The Netherlands
+--
+-- Licensed under the Apache License, Version 2.0 (the "License");
+-- you may not use this file except in compliance with the License.
+-- You may obtain a copy of the License at
+--
+-- http://www.apache.org/licenses/LICENSE-2.0
+--
+-- Unless required by applicable law or agreed to in writing, software
+-- distributed under the License is distributed on an "AS IS" BASIS,
+-- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+-- See the License for the specific language governing permissions and
+-- limitations under the License.
+-- --------------------------------------------------------------------------
+--
+-- Author: E. Kooistra, Jan 2022
+-- Purpose: Regression multi tb for dp_offload_tx_v3 and dp_offload_rx
+-- Description:
+-- Usage:
+-- > as 5
+-- > run -all
+
+LIBRARY IEEE;
+USE IEEE.std_logic_1164.ALL;
+USE work.tb_dp_pkg.ALL;   -- for t_dp_flow_control_enum
+
+ENTITY tb_tb_dp_offload_tx_v3 IS
+END tb_tb_dp_offload_tx_v3;
+
+
+ARCHITECTURE tb OF tb_tb_dp_offload_tx_v3 IS
+
+  SIGNAL tb_end : STD_LOGIC := '0';  -- declare tb_end to avoid 'No objects found' error on 'when -label tb_end'
+
+BEGIN
+
+  -- -- general
+  -- g_flow_control_stimuli   : t_dp_flow_control_enum := e_pulse;  -- always e_active, e_random or e_pulse flow control
+  -- g_flow_control_verify    : t_dp_flow_control_enum := e_active;  -- always e_active, e_random or e_pulse flow control
+  -- g_print_en               : BOOLEAN := TRUE;
+  -- -- specific
+  -- g_data_w                 : NATURAL := 64;
+  -- g_symbol_w               : NATURAL := 16;
+  -- g_pkt_len                : NATURAL := 240;
+  -- g_pkt_gap                : NATURAL := 16
+
+  u_pls_act_data_w_64            : ENTITY work.tb_dp_offload_tx_v3 GENERIC MAP (e_pulse,  e_active, FALSE, 64, 64, 240, 16);
+  u_pls_act_data_w_64_no_gap     : ENTITY work.tb_dp_offload_tx_v3 GENERIC MAP (e_pulse,  e_active, FALSE, 64, 64, 240,  0);
+  u_rnd_act_data_w_64            : ENTITY work.tb_dp_offload_tx_v3 GENERIC MAP (e_random, e_active, FALSE, 64, 64, 240, 16);
+  u_rnd_act_data_w_32            : ENTITY work.tb_dp_offload_tx_v3 GENERIC MAP (e_random, e_active, FALSE, 32, 32, 240, 16);
+  --u_act_rnd_data_w               : ENTITY work.tb_dp_offload_tx_v3 GENERIC MAP (e_active, e_random, FALSE, 64, 64, 240, 16);
+  u_rnd_act_data_64_symbol_16    : ENTITY work.tb_dp_offload_tx_v3 GENERIC MAP (e_random, e_active, FALSE, 64, 16, 240, 16);
+  u_rnd_act_data_64_symbol_32    : ENTITY work.tb_dp_offload_tx_v3 GENERIC MAP (e_random, e_active, FALSE, 64, 32, 240, 16);
+  u_rnd_act_data_32_symbol_8     : ENTITY work.tb_dp_offload_tx_v3 GENERIC MAP (e_random, e_active, FALSE, 32,  8, 240, 16);
+  u_rnd_act_data_32_symbol_16    : ENTITY work.tb_dp_offload_tx_v3 GENERIC MAP (e_random, e_active, FALSE, 32, 16, 240, 16);
+
+END tb;
-- 
GitLab