* Added some testbench documentation

This commit is contained in:
Greek 2020-11-28 13:19:05 +01:00
parent 472af656b3
commit c411cab887
3 changed files with 58 additions and 1 deletions

View File

@ -10,6 +10,16 @@ use work.user_config.all;
use work.rtps_config_package.all; use work.rtps_config_package.all;
use work.rtps_test_package.all; use work.rtps_test_package.all;
-- This testbench tests the matching of remote participants. Due to the fact, that participant matching does not have an immediate effect visible to the outside,
-- this testbench is using external names to access the memory of the rtps_builtin_endpoint directly and check the contents at the supposed participant locations.
-- This testbench covers following:
-- * Mathing compatible Participants
-- * Ignoring incompatible Participants
-- * Unmatching previously matched Participants (Due to incompatibility)
-- * Update data of previously matched Participant
-- * Big/Little Endian Participant Data
entity rtps_builtin_endpoint_test1 is entity rtps_builtin_endpoint_test1 is
end entity; end entity;

View File

@ -10,6 +10,9 @@ use work.user_config.all;
use work.rtps_config_package.all; use work.rtps_config_package.all;
use work.rtps_test_package.all; use work.rtps_test_package.all;
-- This testbench tests the matching of remote endpoints. This is done by checking the Match/Unmatch Frame sent to the local endpoints.
-- The local participant is configured with following endpoints (called "fixed" endpoints):
-- NOTE: All Endpoints are configured with topic "TOPIC_1" and type "TYPE_1", except is explicitly stated otherwise.
-- WRITER 0 -- WRITER 0
-- * DEFAULT -- * DEFAULT
-- WRITER 1 -- WRITER 1
@ -48,7 +51,6 @@ use work.rtps_test_package.all;
-- * USER_DATA "USER_DATA" -- * USER_DATA "USER_DATA"
-- * TOPIC_DATA "TOPIC_DATA" -- * TOPIC_DATA "TOPIC_DATA"
-- * GROUP_DATA "GROUP_DATA" -- * GROUP_DATA "GROUP_DATA"
-- READER 0 -- READER 0
-- * DEFAULT -- * DEFAULT
-- READER 1 -- READER 1
@ -90,6 +92,9 @@ use work.rtps_test_package.all;
-- READER 16 -- READER 16
-- * DESTINATION_ORDER BY_SOURCE_TIMESTAMP -- * DESTINATION_ORDER BY_SOURCE_TIMESTAMP
-- The testbench announces 3 remote Participants. Participant 0 and 1 contain the same endpoints as our local Participant, but Participant 1 announces everything in Little Endian format.
-- Participant 2 announces extra endpoints to test matching for Readers/Writers with unsupported/ignored QoS
entity rtps_builtin_endpoint_test2 is entity rtps_builtin_endpoint_test2 is
end entity; end entity;

View File

@ -10,6 +10,35 @@ use work.user_config.all;
use work.rtps_config_package.all; use work.rtps_config_package.all;
use work.rtps_test_package.all; use work.rtps_test_package.all;
-- This testbench tests the input handling of parameter lists. We issue one parameter list with invalid parameter length (less than expected)
-- and one with valid larger parameter length (extra Bytes after expected parameter end) for each of the parameters that are handled by the built-in endpoint.
-- We also issue a parameter list that is missing its sentinel.
-- The PIDs handled are:
-- * PID_PARTICIPANT_GUID
-- * PID_DOMAIN_ID
-- * PID_DOMAIN_TAG
-- * PID_PROTOCOL_VERSION
-- * PID_PARTICIPANT_LEASE_DURATION
-- * PID_BUILTIN_ENDPOINT_SET
-- * PID_DEFAULT_UNICAST_LOCATOR
-- * PID_DEFAULT_MULTICAST_LOCATOR
-- * PID_METATRAFFIC_UNICAST_LOCATOR
-- * PID_METATRAFFIC_MULTICAST_LOCATOR
-- * PID_TOPIC_NAME
-- * PID_TYPE_NAME
-- * PID_DURABILITY
-- * PID_DEADLINE
-- * PID_LIVELINESS
-- * PID_RELIABILITY
-- * PID_DESTINATION_ORDER
-- * PID_OWNERSHIP
-- * PID_PRESENTATION
-- * PID_LATENCY_BUDGET
-- * PID_ENDPOINT_GUID
-- * PID_EXPECTS_INLINE_QOS
-- * PID_DATA_MAX_SIZE_SERIALIZED
-- * PID_UNICAST_LOCATOR
-- * PID_MULTICAST_LOCATOR
entity rtps_builtin_endpoint_test3 is entity rtps_builtin_endpoint_test3 is
end entity; end entity;
@ -591,6 +620,19 @@ begin
sub.data := EMPTY_TEST_PACKET; sub.data := EMPTY_TEST_PACKET;
p0_sn := p0_sn + 1; p0_sn := p0_sn + 1;
-- *PID_SENTINEL*
Log("Ignore Endpoint [No PID_SENTINEL]", INFO);
sub_p.writerSN := p0_snp;
endpoint := e0;
endpoint.entityId := gen_rand_entityid_2(FALSE);
gen_endpoint_data(endpoint, sub_p.data);
gen_rtps_handler_out(sub_p, endpoint, stimulus);
start_test;
wait_on_complete;
stimulus := EMPTY_TEST_PACKET;
reference := EMPTY_TEST_PACKET;
sub_p.data := EMPTY_TEST_PACKET;
-- *PID_TOPIC_NAME* -- *PID_TOPIC_NAME*
Log("Ignore Endpoint [Invalid PID_TOPIC_NAME]", INFO); Log("Ignore Endpoint [Invalid PID_TOPIC_NAME]", INFO);
sub_p.writerSN := p0_snp; sub_p.writerSN := p0_snp;