diff --git a/libraries/base/dp/hdllib.cfg b/libraries/base/dp/hdllib.cfg index e55c5959379c1b139d421533c69b27027b9e304c..12f9c56edd7f921d5751fab385dcaca33cfa8365 100644 --- a/libraries/base/dp/hdllib.cfg +++ b/libraries/base/dp/hdllib.cfg @@ -307,6 +307,7 @@ test_bench_files = tb/vhdl/tb_tb_dp_block_gen_valid_arr.vhd tb/vhdl/tb_tb_dp_block_from_mm.vhd tb/vhdl/tb_tb_dp_block_validate_channel.vhd + tb/vhdl/tb_tb_dp_calculate_crc.vhd tb/vhdl/tb_tb_dp_bsn_align.vhd tb/vhdl/tb_tb_dp_bsn_align_v2.vhd tb/vhdl/tb_tb_mmp_dp_bsn_align_v2.vhd @@ -373,7 +374,7 @@ regression_test_vhdl = tb/vhdl/tb_mms_dp_bsn_source.vhd tb/vhdl/tb_mms_dp_bsn_source_v2.vhd tb/vhdl/tb_mmp_dp_bsn_sync_scheduler.vhd - tb/vhdl/tb_dp_calculate_crc.vhd + tb/vhdl/tb_tb_dp_calculate_crc.vhd tb/vhdl/tb_tb_dp_block_select.vhd tb/vhdl/tb_tb_dp_block_validate_length.vhd tb/vhdl/tb_tb_dp_block_validate_err.vhd diff --git a/libraries/base/dp/tb/vhdl/tb_tb_dp_calculate_crc.vhd b/libraries/base/dp/tb/vhdl/tb_tb_dp_calculate_crc.vhd new file mode 100644 index 0000000000000000000000000000000000000000..17713141fe5edf7b711c05a65ab6d92772e7344a --- /dev/null +++ b/libraries/base/dp/tb/vhdl/tb_tb_dp_calculate_crc.vhd @@ -0,0 +1,57 @@ +------------------------------------------------------------------------------- +-- +-- Copyright 2023 +-- 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: Eric Kooistra +-- Date: 17 Apr 2023 +-- Purpose: +-- . Multi test bench for dp_calculate_crc. +-- Description: +-- Usage: +-- . as 5 +-- . run -all + +LIBRARY IEEE, common_lib; +USE IEEE.std_logic_1164.ALL; +USE IEEE.numeric_std.ALL; +USE common_lib.common_pkg.ALL; +USE common_lib.common_str_pkg.ALL; +USE common_lib.common_lfsr_sequences_pkg.ALL; +USE common_lib.tb_common_pkg.ALL; +USE work.dp_stream_pkg.ALL; +USE work.tb_dp_pkg.ALL; + +ENTITY tb_tb_dp_calculate_crc IS +END tb_tb_dp_calculate_crc; + + +ARCHITECTURE tb OF tb_tb_dp_calculate_crc IS + + SIGNAL tb_end : STD_LOGIC := '0'; -- declare tb_end to avoid 'No objects found' error on 'when -label tb_end' + +BEGIN + + -- g_data_w : NATURAL := 28; + -- g_crc_w : NATURAL := 28; + -- g_gap_size : NATURAL := 10 + + u_no_gap : ENTITY work.tb_dp_calculate_crc GENERIC MAP (28, 28, 0); + u_gap : ENTITY work.tb_dp_calculate_crc GENERIC MAP (28, 28, 10); + +END tb;