* Re-design rtps_handler
- Input format is now a decoded UDP Packet (Documented in REF.txt) This allows the whole RTPS system to use universal input and output.
This commit is contained in:
parent
533b50f0f9
commit
c1bb9a7bd2
21
src/REF.txt
21
src/REF.txt
@ -61,14 +61,31 @@ Optional features may not be supported by all RTPS implementations.
|
|||||||
ENTITYID_UKNOWN also for Built-In?
|
ENTITYID_UKNOWN also for Built-In?
|
||||||
Ignore Participant/Topic/Publication/Subscription (handle argument of Sampleinfo)
|
Ignore Participant/Topic/Publication/Subscription (handle argument of Sampleinfo)
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
ENDIANNESS
|
ENDIANNESS
|
||||||
==========
|
==========
|
||||||
You have to see what datatypes PSM maps to each element.
|
You have to see what datatypes PSM maps to each element.
|
||||||
If the datatype is bigger than a byte, byte swaping has to occur.
|
If the datatype is bigger than a byte, byte swaping has to occur.
|
||||||
The elements of an array are in order (but the elements themselves may need to be swapped if bigger than a Byte)
|
The elements of an array are in order (but the elements themselves may need to be swapped if bigger than a Byte)
|
||||||
|
|
||||||
|
RTPS IN/OUT FORMAT
|
||||||
|
==================
|
||||||
|
|
||||||
|
31............24..............16..............8...............0
|
||||||
|
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|
||||||
|
+-------------------------------------------------------------+
|
||||||
|
| SRC_IPv4_ADDR |
|
||||||
|
+-------------------------------------------------------------+
|
||||||
|
| DEST_IPv4_ADDR |
|
||||||
|
+-----------------------------+-------------------------------+
|
||||||
|
| SRC_UDP_PORT | DEST_UDP_PORT |
|
||||||
|
+-----------------------------+-------------------------------+
|
||||||
|
| PACKET_LENGTH |
|
||||||
|
+-------------------------------------------------------------+
|
||||||
|
| |
|
||||||
|
~ PACKET ~
|
||||||
|
| |
|
||||||
|
+-------------------------------------------------------------+
|
||||||
|
|
||||||
ENDPOINT FIFO PACKET FORMAT
|
ENDPOINT FIFO PACKET FORMAT
|
||||||
===========================
|
===========================
|
||||||
|
|
||||||
|
|||||||
@ -150,8 +150,8 @@ begin
|
|||||||
variable check_cnt : natural := 0;
|
variable check_cnt : natural := 0;
|
||||||
variable RV : RandomPType;
|
variable RV : RandomPType;
|
||||||
variable RAND_DATA : TEST_PACKET_TYPE := EMPTY_TEST_PACKET;
|
variable RAND_DATA : TEST_PACKET_TYPE := EMPTY_TEST_PACKET;
|
||||||
variable UDP_META : UDP_HEADER_TYPE;
|
variable UDP_META : OUTPUT_HEADER_TYPE;
|
||||||
variable UDP_USER : UDP_HEADER_TYPE;
|
variable UDP_USER : OUTPUT_HEADER_TYPE;
|
||||||
|
|
||||||
-- Wrapper to use procedure as function
|
-- Wrapper to use procedure as function
|
||||||
impure function gen_rand_loc_2 return LOCATOR_TYPE is
|
impure function gen_rand_loc_2 return LOCATOR_TYPE is
|
||||||
@ -205,13 +205,13 @@ begin
|
|||||||
-- *RTPS HEADER*
|
-- *RTPS HEADER*
|
||||||
Log("Sending invalid RTPS Header [Packet Size to small]", INFO);
|
Log("Sending invalid RTPS Header [Packet Size to small]", INFO);
|
||||||
-- UDP Header
|
-- UDP Header
|
||||||
gen_udp_header(UDP_META, stimulus);
|
gen_output_header(UDP_META, stimulus);
|
||||||
-- RTPS Header [RTPS Header Length > PacketSize]
|
-- RTPS Header [RTPS Header Length > PacketSize]
|
||||||
rtps_header := DEFAULT_RTPS_HEADER;
|
rtps_header := DEFAULT_RTPS_HEADER;
|
||||||
gen_rtps_header(rtps_header, stimulus);
|
gen_rtps_header(rtps_header, stimulus);
|
||||||
stimulus.length := stimulus.length-1;
|
stimulus.length := stimulus.length-1;
|
||||||
-- Finalize Packet
|
-- Finalize Packet
|
||||||
fix_udp_packet(stimulus);
|
fix_output_packet(stimulus);
|
||||||
start_test;
|
start_test;
|
||||||
wait_on_complete;
|
wait_on_complete;
|
||||||
check_cnt := check_cnt + reference.length;
|
check_cnt := check_cnt + reference.length;
|
||||||
@ -220,7 +220,7 @@ begin
|
|||||||
|
|
||||||
Log("Sending invalid RTPS Header [Protocol Missmatch]", INFO);
|
Log("Sending invalid RTPS Header [Protocol Missmatch]", INFO);
|
||||||
-- UDP Header
|
-- UDP Header
|
||||||
gen_udp_header(UDP_META, stimulus);
|
gen_output_header(UDP_META, stimulus);
|
||||||
-- RTPS Header [Incompatible Protocol]
|
-- RTPS Header [Incompatible Protocol]
|
||||||
rtps_header := DEFAULT_RTPS_HEADER;
|
rtps_header := DEFAULT_RTPS_HEADER;
|
||||||
rtps_header.protocol := RV.RandSlv(PROTOCOL_WIDTH);
|
rtps_header.protocol := RV.RandSlv(PROTOCOL_WIDTH);
|
||||||
@ -229,7 +229,7 @@ begin
|
|||||||
gen_rtps_submessage(rtps_data, stimulus);
|
gen_rtps_submessage(rtps_data, stimulus);
|
||||||
rtps_data.writerSN := rtps_data.writerSN + 1;
|
rtps_data.writerSN := rtps_data.writerSN + 1;
|
||||||
-- Finalize Packet
|
-- Finalize Packet
|
||||||
fix_udp_packet(stimulus);
|
fix_output_packet(stimulus);
|
||||||
start_test;
|
start_test;
|
||||||
wait_on_complete;
|
wait_on_complete;
|
||||||
check_cnt := check_cnt + reference.length;
|
check_cnt := check_cnt + reference.length;
|
||||||
@ -238,7 +238,7 @@ begin
|
|||||||
|
|
||||||
Log("Sending invalid RTPS Header [Protocol Major Version Missmatch]", INFO);
|
Log("Sending invalid RTPS Header [Protocol Major Version Missmatch]", INFO);
|
||||||
-- UDP Header
|
-- UDP Header
|
||||||
gen_udp_header(UDP_META, stimulus);
|
gen_output_header(UDP_META, stimulus);
|
||||||
-- RTPS Header [Incompatible Version]
|
-- RTPS Header [Incompatible Version]
|
||||||
rtps_header := DEFAULT_RTPS_HEADER;
|
rtps_header := DEFAULT_RTPS_HEADER;
|
||||||
rtps_header.version := PROTOCOLVERSION_1_0;
|
rtps_header.version := PROTOCOLVERSION_1_0;
|
||||||
@ -247,7 +247,7 @@ begin
|
|||||||
gen_rtps_submessage(rtps_data, stimulus);
|
gen_rtps_submessage(rtps_data, stimulus);
|
||||||
rtps_data.writerSN := rtps_data.writerSN + 1;
|
rtps_data.writerSN := rtps_data.writerSN + 1;
|
||||||
-- Finalize Packet
|
-- Finalize Packet
|
||||||
fix_udp_packet(stimulus);
|
fix_output_packet(stimulus);
|
||||||
start_test;
|
start_test;
|
||||||
wait_on_complete;
|
wait_on_complete;
|
||||||
check_cnt := check_cnt + reference.length;
|
check_cnt := check_cnt + reference.length;
|
||||||
@ -260,7 +260,7 @@ begin
|
|||||||
-- *DATA SUBMESSAGE*
|
-- *DATA SUBMESSAGE*
|
||||||
Log("Sending valid DATA [Empty Submessage]", INFO);
|
Log("Sending valid DATA [Empty Submessage]", INFO);
|
||||||
-- UDP Header
|
-- UDP Header
|
||||||
gen_udp_header(UDP_META, stimulus);
|
gen_output_header(UDP_META, stimulus);
|
||||||
-- RTPS Header
|
-- RTPS Header
|
||||||
gen_rtps_header(rtps_header, stimulus);
|
gen_rtps_header(rtps_header, stimulus);
|
||||||
-- Valid DATA [Empty DATA] (Dropped)
|
-- Valid DATA [Empty DATA] (Dropped)
|
||||||
@ -269,7 +269,7 @@ begin
|
|||||||
rtps_sub.writerId := DEFAULT_ENTITYID;
|
rtps_sub.writerId := DEFAULT_ENTITYID;
|
||||||
gen_rtps_submessage(rtps_sub, stimulus);
|
gen_rtps_submessage(rtps_sub, stimulus);
|
||||||
-- Finalize Packet
|
-- Finalize Packet
|
||||||
fix_udp_packet(stimulus);
|
fix_output_packet(stimulus);
|
||||||
start_test;
|
start_test;
|
||||||
wait_on_complete;
|
wait_on_complete;
|
||||||
check_cnt := check_cnt + reference.length;
|
check_cnt := check_cnt + reference.length;
|
||||||
@ -278,7 +278,7 @@ begin
|
|||||||
|
|
||||||
Log("Sending valid DATA [Meta Traffic, Both Endianness]", INFO);
|
Log("Sending valid DATA [Meta Traffic, Both Endianness]", INFO);
|
||||||
-- UDP Header
|
-- UDP Header
|
||||||
gen_udp_header(UDP_META, stimulus);
|
gen_output_header(UDP_META, stimulus);
|
||||||
-- RTPS Header
|
-- RTPS Header
|
||||||
gen_rtps_header(rtps_header, stimulus);
|
gen_rtps_header(rtps_header, stimulus);
|
||||||
-- Valid DATA [META Traffic, Big Endian] (Expected)
|
-- Valid DATA [META Traffic, Big Endian] (Expected)
|
||||||
@ -294,7 +294,7 @@ begin
|
|||||||
gen_rtps_submessage(rtps_sub, stimulus);
|
gen_rtps_submessage(rtps_sub, stimulus);
|
||||||
gen_rtps_handler_out(rtps_sub, UDP_META.src, TRUE, TIME_INVALID, rtps_header.guidPrefix, reference);
|
gen_rtps_handler_out(rtps_sub, UDP_META.src, TRUE, TIME_INVALID, rtps_header.guidPrefix, reference);
|
||||||
-- Finalize Packet
|
-- Finalize Packet
|
||||||
fix_udp_packet(stimulus);
|
fix_output_packet(stimulus);
|
||||||
start_test;
|
start_test;
|
||||||
wait_on_complete;
|
wait_on_complete;
|
||||||
check_cnt := check_cnt + reference.length;
|
check_cnt := check_cnt + reference.length;
|
||||||
@ -303,7 +303,7 @@ begin
|
|||||||
|
|
||||||
Log("Sending valid DATA [User Traffic]", INFO);
|
Log("Sending valid DATA [User Traffic]", INFO);
|
||||||
-- UDP Header
|
-- UDP Header
|
||||||
gen_udp_header(UDP_USER, stimulus);
|
gen_output_header(UDP_USER, stimulus);
|
||||||
-- RTPS Header
|
-- RTPS Header
|
||||||
gen_rtps_header(rtps_header, stimulus);
|
gen_rtps_header(rtps_header, stimulus);
|
||||||
-- Valid DATA [USER Traffic, Big Endian] (Expected)
|
-- Valid DATA [USER Traffic, Big Endian] (Expected)
|
||||||
@ -315,7 +315,7 @@ begin
|
|||||||
gen_rtps_submessage(rtps_sub, stimulus);
|
gen_rtps_submessage(rtps_sub, stimulus);
|
||||||
gen_rtps_handler_out(rtps_sub, UDP_USER.src, FALSE, TIME_INVALID, rtps_header.guidPrefix, reference);
|
gen_rtps_handler_out(rtps_sub, UDP_USER.src, FALSE, TIME_INVALID, rtps_header.guidPrefix, reference);
|
||||||
-- Finalize Packet
|
-- Finalize Packet
|
||||||
fix_udp_packet(stimulus);
|
fix_output_packet(stimulus);
|
||||||
start_test;
|
start_test;
|
||||||
wait_on_complete;
|
wait_on_complete;
|
||||||
check_cnt := check_cnt + reference.length;
|
check_cnt := check_cnt + reference.length;
|
||||||
@ -324,7 +324,7 @@ begin
|
|||||||
|
|
||||||
Log("Sending valid DATA [Extra Header Bytes]", INFO);
|
Log("Sending valid DATA [Extra Header Bytes]", INFO);
|
||||||
-- UDP Header
|
-- UDP Header
|
||||||
gen_udp_header(UDP_META, stimulus);
|
gen_output_header(UDP_META, stimulus);
|
||||||
-- RTPS Header
|
-- RTPS Header
|
||||||
gen_rtps_header(rtps_header, stimulus);
|
gen_rtps_header(rtps_header, stimulus);
|
||||||
-- Valid DATA [+7 Unknown Header Bytes] (Expected)
|
-- Valid DATA [+7 Unknown Header Bytes] (Expected)
|
||||||
@ -337,7 +337,7 @@ begin
|
|||||||
gen_rtps_submessage(rtps_sub, stimulus);
|
gen_rtps_submessage(rtps_sub, stimulus);
|
||||||
gen_rtps_handler_out(rtps_sub, UDP_META.src, TRUE, TIME_INVALID, rtps_header.guidPrefix, reference);
|
gen_rtps_handler_out(rtps_sub, UDP_META.src, TRUE, TIME_INVALID, rtps_header.guidPrefix, reference);
|
||||||
-- Finalize Packet
|
-- Finalize Packet
|
||||||
fix_udp_packet(stimulus);
|
fix_output_packet(stimulus);
|
||||||
start_test;
|
start_test;
|
||||||
wait_on_complete;
|
wait_on_complete;
|
||||||
check_cnt := check_cnt + reference.length;
|
check_cnt := check_cnt + reference.length;
|
||||||
@ -346,7 +346,7 @@ begin
|
|||||||
|
|
||||||
Log("Sending invalid DATA [DATA and KEY Flag set]", INFO);
|
Log("Sending invalid DATA [DATA and KEY Flag set]", INFO);
|
||||||
-- UDP Header
|
-- UDP Header
|
||||||
gen_udp_header(UDP_META, stimulus);
|
gen_output_header(UDP_META, stimulus);
|
||||||
-- RTPS Header
|
-- RTPS Header
|
||||||
gen_rtps_header(rtps_header, stimulus);
|
gen_rtps_header(rtps_header, stimulus);
|
||||||
-- Valid DATA [Invalid Flags] (Dropped)
|
-- Valid DATA [Invalid Flags] (Dropped)
|
||||||
@ -362,7 +362,7 @@ begin
|
|||||||
gen_rtps_handler_out(rtps_data, UDP_META.src, TRUE, TIME_INVALID, rtps_header.guidPrefix, reference);
|
gen_rtps_handler_out(rtps_data, UDP_META.src, TRUE, TIME_INVALID, rtps_header.guidPrefix, reference);
|
||||||
rtps_data.writerSN := rtps_data.writerSN + 1;
|
rtps_data.writerSN := rtps_data.writerSN + 1;
|
||||||
-- Finalize Packet
|
-- Finalize Packet
|
||||||
fix_udp_packet(stimulus);
|
fix_output_packet(stimulus);
|
||||||
start_test;
|
start_test;
|
||||||
wait_on_complete;
|
wait_on_complete;
|
||||||
check_cnt := check_cnt + reference.length;
|
check_cnt := check_cnt + reference.length;
|
||||||
@ -371,7 +371,7 @@ begin
|
|||||||
|
|
||||||
Log("Sending invalid DATA [Packet Size too small]", INFO);
|
Log("Sending invalid DATA [Packet Size too small]", INFO);
|
||||||
-- UDP Header
|
-- UDP Header
|
||||||
gen_udp_header(UDP_META, stimulus);
|
gen_output_header(UDP_META, stimulus);
|
||||||
-- RTPS Header
|
-- RTPS Header
|
||||||
gen_rtps_header(rtps_header, stimulus);
|
gen_rtps_header(rtps_header, stimulus);
|
||||||
-- Valid DATA [SubLength > PackeSize] (Dropped)
|
-- Valid DATA [SubLength > PackeSize] (Dropped)
|
||||||
@ -383,7 +383,7 @@ begin
|
|||||||
gen_rtps_submessage(rtps_sub, stimulus);
|
gen_rtps_submessage(rtps_sub, stimulus);
|
||||||
stimulus.length := stimulus.length-1;
|
stimulus.length := stimulus.length-1;
|
||||||
-- Finalize Packet
|
-- Finalize Packet
|
||||||
fix_udp_packet(stimulus);
|
fix_output_packet(stimulus);
|
||||||
start_test;
|
start_test;
|
||||||
wait_on_complete;
|
wait_on_complete;
|
||||||
check_cnt := check_cnt + reference.length;
|
check_cnt := check_cnt + reference.length;
|
||||||
@ -392,7 +392,7 @@ begin
|
|||||||
|
|
||||||
Log("Sending invalid DATA [Submessage Length too small]", INFO);
|
Log("Sending invalid DATA [Submessage Length too small]", INFO);
|
||||||
-- UDP Header
|
-- UDP Header
|
||||||
gen_udp_header(UDP_META, stimulus);
|
gen_output_header(UDP_META, stimulus);
|
||||||
-- RTPS Header
|
-- RTPS Header
|
||||||
gen_rtps_header(rtps_header, stimulus);
|
gen_rtps_header(rtps_header, stimulus);
|
||||||
-- Valid DATA [SubLength invalid] (Dropped)
|
-- Valid DATA [SubLength invalid] (Dropped)
|
||||||
@ -407,7 +407,7 @@ begin
|
|||||||
gen_rtps_submessage(rtps_data, stimulus);
|
gen_rtps_submessage(rtps_data, stimulus);
|
||||||
rtps_data.writerSN := rtps_data.writerSN + 1;
|
rtps_data.writerSN := rtps_data.writerSN + 1;
|
||||||
-- Finalize Packet
|
-- Finalize Packet
|
||||||
fix_udp_packet(stimulus);
|
fix_output_packet(stimulus);
|
||||||
start_test;
|
start_test;
|
||||||
wait_on_complete;
|
wait_on_complete;
|
||||||
check_cnt := check_cnt + reference.length;
|
check_cnt := check_cnt + reference.length;
|
||||||
@ -416,7 +416,7 @@ begin
|
|||||||
|
|
||||||
Log("Sending invalid DATA [Invalid writerSN]", INFO);
|
Log("Sending invalid DATA [Invalid writerSN]", INFO);
|
||||||
-- UDP Header
|
-- UDP Header
|
||||||
gen_udp_header(UDP_META, stimulus);
|
gen_output_header(UDP_META, stimulus);
|
||||||
-- RTPS Header
|
-- RTPS Header
|
||||||
gen_rtps_header(rtps_header, stimulus);
|
gen_rtps_header(rtps_header, stimulus);
|
||||||
-- Valid DATA [Invalid writerSN] (Dropped)
|
-- Valid DATA [Invalid writerSN] (Dropped)
|
||||||
@ -431,7 +431,7 @@ begin
|
|||||||
gen_rtps_submessage(rtps_data, stimulus);
|
gen_rtps_submessage(rtps_data, stimulus);
|
||||||
rtps_data.writerSN := rtps_data.writerSN + 1;
|
rtps_data.writerSN := rtps_data.writerSN + 1;
|
||||||
-- Finalize Packet
|
-- Finalize Packet
|
||||||
fix_udp_packet(stimulus);
|
fix_output_packet(stimulus);
|
||||||
start_test;
|
start_test;
|
||||||
wait_on_complete;
|
wait_on_complete;
|
||||||
check_cnt := check_cnt + reference.length;
|
check_cnt := check_cnt + reference.length;
|
||||||
@ -442,7 +442,7 @@ begin
|
|||||||
-- *ACKNACK SUBMESSAGE*
|
-- *ACKNACK SUBMESSAGE*
|
||||||
Log("Sending valid ACKNACK [Meta Traffic, Both Endianness]", INFO);
|
Log("Sending valid ACKNACK [Meta Traffic, Both Endianness]", INFO);
|
||||||
-- UDP Header
|
-- UDP Header
|
||||||
gen_udp_header(UDP_META, stimulus);
|
gen_output_header(UDP_META, stimulus);
|
||||||
-- RTPS Header
|
-- RTPS Header
|
||||||
gen_rtps_header(rtps_header, stimulus);
|
gen_rtps_header(rtps_header, stimulus);
|
||||||
-- Valid ACKNACK [META Traffic, Big Endian] (Expected)
|
-- Valid ACKNACK [META Traffic, Big Endian] (Expected)
|
||||||
@ -456,7 +456,7 @@ begin
|
|||||||
gen_rtps_submessage(rtps_sub, stimulus);
|
gen_rtps_submessage(rtps_sub, stimulus);
|
||||||
gen_rtps_handler_out(rtps_sub, UDP_META.src, TRUE, TIME_INVALID, rtps_header.guidPrefix, reference);
|
gen_rtps_handler_out(rtps_sub, UDP_META.src, TRUE, TIME_INVALID, rtps_header.guidPrefix, reference);
|
||||||
-- Finalize Packet
|
-- Finalize Packet
|
||||||
fix_udp_packet(stimulus);
|
fix_output_packet(stimulus);
|
||||||
start_test;
|
start_test;
|
||||||
wait_on_complete;
|
wait_on_complete;
|
||||||
check_cnt := check_cnt + reference.length;
|
check_cnt := check_cnt + reference.length;
|
||||||
@ -465,7 +465,7 @@ begin
|
|||||||
|
|
||||||
Log("Sending valid ACKNACK [User Traffic]", INFO);
|
Log("Sending valid ACKNACK [User Traffic]", INFO);
|
||||||
-- UDP Header
|
-- UDP Header
|
||||||
gen_udp_header(UDP_USER, stimulus);
|
gen_output_header(UDP_USER, stimulus);
|
||||||
-- RTPS Header
|
-- RTPS Header
|
||||||
gen_rtps_header(rtps_header, stimulus);
|
gen_rtps_header(rtps_header, stimulus);
|
||||||
-- Valid ACKNACK [USER Traffic, Big Endian] (Expected)
|
-- Valid ACKNACK [USER Traffic, Big Endian] (Expected)
|
||||||
@ -475,7 +475,7 @@ begin
|
|||||||
gen_rtps_submessage(rtps_sub, stimulus);
|
gen_rtps_submessage(rtps_sub, stimulus);
|
||||||
gen_rtps_handler_out(rtps_sub, UDP_USER.src, FALSE, TIME_INVALID, rtps_header.guidPrefix, reference);
|
gen_rtps_handler_out(rtps_sub, UDP_USER.src, FALSE, TIME_INVALID, rtps_header.guidPrefix, reference);
|
||||||
-- Finalize Packet
|
-- Finalize Packet
|
||||||
fix_udp_packet(stimulus);
|
fix_output_packet(stimulus);
|
||||||
start_test;
|
start_test;
|
||||||
wait_on_complete;
|
wait_on_complete;
|
||||||
check_cnt := check_cnt + reference.length;
|
check_cnt := check_cnt + reference.length;
|
||||||
@ -484,7 +484,7 @@ begin
|
|||||||
|
|
||||||
Log("Sending invalid ACKNACK [Packet Size too small]", INFO);
|
Log("Sending invalid ACKNACK [Packet Size too small]", INFO);
|
||||||
-- UDP Header
|
-- UDP Header
|
||||||
gen_udp_header(UDP_META, stimulus);
|
gen_output_header(UDP_META, stimulus);
|
||||||
-- RTPS Header
|
-- RTPS Header
|
||||||
gen_rtps_header(rtps_header, stimulus);
|
gen_rtps_header(rtps_header, stimulus);
|
||||||
-- Invalid ACKNACK [SubLength > PacketSize] (Dropped)
|
-- Invalid ACKNACK [SubLength > PacketSize] (Dropped)
|
||||||
@ -494,7 +494,7 @@ begin
|
|||||||
gen_rtps_submessage(rtps_sub, stimulus);
|
gen_rtps_submessage(rtps_sub, stimulus);
|
||||||
stimulus.length := stimulus.length-1;
|
stimulus.length := stimulus.length-1;
|
||||||
-- Finalize Packet
|
-- Finalize Packet
|
||||||
fix_udp_packet(stimulus);
|
fix_output_packet(stimulus);
|
||||||
start_test;
|
start_test;
|
||||||
wait_on_complete;
|
wait_on_complete;
|
||||||
check_cnt := check_cnt + reference.length;
|
check_cnt := check_cnt + reference.length;
|
||||||
@ -503,7 +503,7 @@ begin
|
|||||||
|
|
||||||
Log("Sending invalid ACKNACK [Submessage Length too small]", INFO);
|
Log("Sending invalid ACKNACK [Submessage Length too small]", INFO);
|
||||||
-- UDP Header
|
-- UDP Header
|
||||||
gen_udp_header(UDP_META, stimulus);
|
gen_output_header(UDP_META, stimulus);
|
||||||
-- RTPS Header
|
-- RTPS Header
|
||||||
gen_rtps_header(rtps_header, stimulus);
|
gen_rtps_header(rtps_header, stimulus);
|
||||||
-- Invalid ACKNACK [SubLength invalid] (Dropped)
|
-- Invalid ACKNACK [SubLength invalid] (Dropped)
|
||||||
@ -516,7 +516,7 @@ begin
|
|||||||
gen_rtps_submessage(rtps_data, stimulus);
|
gen_rtps_submessage(rtps_data, stimulus);
|
||||||
rtps_data.writerSN := rtps_data.writerSN + 1;
|
rtps_data.writerSN := rtps_data.writerSN + 1;
|
||||||
-- Finalize Packet
|
-- Finalize Packet
|
||||||
fix_udp_packet(stimulus);
|
fix_output_packet(stimulus);
|
||||||
start_test;
|
start_test;
|
||||||
wait_on_complete;
|
wait_on_complete;
|
||||||
check_cnt := check_cnt + reference.length;
|
check_cnt := check_cnt + reference.length;
|
||||||
@ -525,7 +525,7 @@ begin
|
|||||||
|
|
||||||
Log("Sending invalid ACKNACK [ReaderSNState invalid (Base invalid)]", INFO);
|
Log("Sending invalid ACKNACK [ReaderSNState invalid (Base invalid)]", INFO);
|
||||||
-- UDP Header
|
-- UDP Header
|
||||||
gen_udp_header(UDP_META, stimulus);
|
gen_output_header(UDP_META, stimulus);
|
||||||
-- RTPS Header
|
-- RTPS Header
|
||||||
gen_rtps_header(rtps_header, stimulus);
|
gen_rtps_header(rtps_header, stimulus);
|
||||||
-- Invalid ACKNACK [readerSNState invalid (Base Invalid)] (Dropped)
|
-- Invalid ACKNACK [readerSNState invalid (Base Invalid)] (Dropped)
|
||||||
@ -538,7 +538,7 @@ begin
|
|||||||
gen_rtps_submessage(rtps_data, stimulus);
|
gen_rtps_submessage(rtps_data, stimulus);
|
||||||
rtps_data.writerSN := rtps_data.writerSN + 1;
|
rtps_data.writerSN := rtps_data.writerSN + 1;
|
||||||
-- Finalize Packet
|
-- Finalize Packet
|
||||||
fix_udp_packet(stimulus);
|
fix_output_packet(stimulus);
|
||||||
start_test;
|
start_test;
|
||||||
wait_on_complete;
|
wait_on_complete;
|
||||||
check_cnt := check_cnt + reference.length;
|
check_cnt := check_cnt + reference.length;
|
||||||
@ -547,7 +547,7 @@ begin
|
|||||||
|
|
||||||
Log("Sending invalid ACKNACK [ReaderSNState invalid (NumBits invalid)]", INFO);
|
Log("Sending invalid ACKNACK [ReaderSNState invalid (NumBits invalid)]", INFO);
|
||||||
-- UDP Header
|
-- UDP Header
|
||||||
gen_udp_header(UDP_META, stimulus);
|
gen_output_header(UDP_META, stimulus);
|
||||||
-- RTPS Header
|
-- RTPS Header
|
||||||
gen_rtps_header(rtps_header, stimulus);
|
gen_rtps_header(rtps_header, stimulus);
|
||||||
-- Invalid ACKNACK [readerSNState invalid (NumBits Invalid)] (Dropped)
|
-- Invalid ACKNACK [readerSNState invalid (NumBits Invalid)] (Dropped)
|
||||||
@ -560,7 +560,7 @@ begin
|
|||||||
gen_rtps_submessage(rtps_data, stimulus);
|
gen_rtps_submessage(rtps_data, stimulus);
|
||||||
rtps_data.writerSN := rtps_data.writerSN + 1;
|
rtps_data.writerSN := rtps_data.writerSN + 1;
|
||||||
-- Finalize Packet
|
-- Finalize Packet
|
||||||
fix_udp_packet(stimulus);
|
fix_output_packet(stimulus);
|
||||||
start_test;
|
start_test;
|
||||||
wait_on_complete;
|
wait_on_complete;
|
||||||
check_cnt := check_cnt + reference.length;
|
check_cnt := check_cnt + reference.length;
|
||||||
@ -570,7 +570,7 @@ begin
|
|||||||
-- *GAP SUBMESSAGE*
|
-- *GAP SUBMESSAGE*
|
||||||
Log("Sending valid GAP [Meta Traffic, Both Endianness]", INFO);
|
Log("Sending valid GAP [Meta Traffic, Both Endianness]", INFO);
|
||||||
-- UDP Header
|
-- UDP Header
|
||||||
gen_udp_header(UDP_META, stimulus);
|
gen_output_header(UDP_META, stimulus);
|
||||||
-- RTPS Header
|
-- RTPS Header
|
||||||
gen_rtps_header(rtps_header, stimulus);
|
gen_rtps_header(rtps_header, stimulus);
|
||||||
-- Valid GAP [META Traffic, Big Endian]
|
-- Valid GAP [META Traffic, Big Endian]
|
||||||
@ -584,7 +584,7 @@ begin
|
|||||||
gen_rtps_submessage(rtps_sub, stimulus);
|
gen_rtps_submessage(rtps_sub, stimulus);
|
||||||
gen_rtps_handler_out(rtps_sub, UDP_META.src, TRUE, TIME_INVALID, rtps_header.guidPrefix, reference);
|
gen_rtps_handler_out(rtps_sub, UDP_META.src, TRUE, TIME_INVALID, rtps_header.guidPrefix, reference);
|
||||||
-- Finalize Packet
|
-- Finalize Packet
|
||||||
fix_udp_packet(stimulus);
|
fix_output_packet(stimulus);
|
||||||
start_test;
|
start_test;
|
||||||
wait_on_complete;
|
wait_on_complete;
|
||||||
check_cnt := check_cnt + reference.length;
|
check_cnt := check_cnt + reference.length;
|
||||||
@ -593,7 +593,7 @@ begin
|
|||||||
|
|
||||||
Log("Sending valid GAP [User Traffic]", INFO);
|
Log("Sending valid GAP [User Traffic]", INFO);
|
||||||
-- UDP Header
|
-- UDP Header
|
||||||
gen_udp_header(UDP_USER, stimulus);
|
gen_output_header(UDP_USER, stimulus);
|
||||||
-- RTPS Header
|
-- RTPS Header
|
||||||
gen_rtps_header(rtps_header, stimulus);
|
gen_rtps_header(rtps_header, stimulus);
|
||||||
-- Valid GAP [User Traffic, Big Endian]
|
-- Valid GAP [User Traffic, Big Endian]
|
||||||
@ -603,7 +603,7 @@ begin
|
|||||||
gen_rtps_submessage(rtps_sub, stimulus);
|
gen_rtps_submessage(rtps_sub, stimulus);
|
||||||
gen_rtps_handler_out(rtps_sub, UDP_USER.src, FALSE, TIME_INVALID, rtps_header.guidPrefix, reference);
|
gen_rtps_handler_out(rtps_sub, UDP_USER.src, FALSE, TIME_INVALID, rtps_header.guidPrefix, reference);
|
||||||
-- Finalize Packet
|
-- Finalize Packet
|
||||||
fix_udp_packet(stimulus);
|
fix_output_packet(stimulus);
|
||||||
start_test;
|
start_test;
|
||||||
wait_on_complete;
|
wait_on_complete;
|
||||||
check_cnt := check_cnt + reference.length;
|
check_cnt := check_cnt + reference.length;
|
||||||
@ -612,7 +612,7 @@ begin
|
|||||||
|
|
||||||
Log("Sending invalid GAP [Packet Size too small]", INFO);
|
Log("Sending invalid GAP [Packet Size too small]", INFO);
|
||||||
-- UDP Header
|
-- UDP Header
|
||||||
gen_udp_header(UDP_META, stimulus);
|
gen_output_header(UDP_META, stimulus);
|
||||||
-- RTPS Header
|
-- RTPS Header
|
||||||
gen_rtps_header(rtps_header, stimulus);
|
gen_rtps_header(rtps_header, stimulus);
|
||||||
-- Invalid GAP [SubLength > PacketSize] (Dropped)
|
-- Invalid GAP [SubLength > PacketSize] (Dropped)
|
||||||
@ -622,7 +622,7 @@ begin
|
|||||||
gen_rtps_submessage(rtps_sub, stimulus);
|
gen_rtps_submessage(rtps_sub, stimulus);
|
||||||
stimulus.length := stimulus.length-1;
|
stimulus.length := stimulus.length-1;
|
||||||
-- Finalize Packet
|
-- Finalize Packet
|
||||||
fix_udp_packet(stimulus);
|
fix_output_packet(stimulus);
|
||||||
start_test;
|
start_test;
|
||||||
wait_on_complete;
|
wait_on_complete;
|
||||||
check_cnt := check_cnt + reference.length;
|
check_cnt := check_cnt + reference.length;
|
||||||
@ -631,7 +631,7 @@ begin
|
|||||||
|
|
||||||
Log("Sending invalid GAP [Submessage Length too small]", INFO);
|
Log("Sending invalid GAP [Submessage Length too small]", INFO);
|
||||||
-- UDP Header
|
-- UDP Header
|
||||||
gen_udp_header(UDP_META, stimulus);
|
gen_output_header(UDP_META, stimulus);
|
||||||
-- RTPS Header
|
-- RTPS Header
|
||||||
gen_rtps_header(rtps_header, stimulus);
|
gen_rtps_header(rtps_header, stimulus);
|
||||||
-- Invalid GAP [SubLength invalid] (Dropped)
|
-- Invalid GAP [SubLength invalid] (Dropped)
|
||||||
@ -644,7 +644,7 @@ begin
|
|||||||
gen_rtps_submessage(rtps_data, stimulus);
|
gen_rtps_submessage(rtps_data, stimulus);
|
||||||
rtps_data.writerSN := rtps_data.writerSN + 1;
|
rtps_data.writerSN := rtps_data.writerSN + 1;
|
||||||
-- Finalize Packet
|
-- Finalize Packet
|
||||||
fix_udp_packet(stimulus);
|
fix_output_packet(stimulus);
|
||||||
start_test;
|
start_test;
|
||||||
wait_on_complete;
|
wait_on_complete;
|
||||||
check_cnt := check_cnt + reference.length;
|
check_cnt := check_cnt + reference.length;
|
||||||
@ -653,7 +653,7 @@ begin
|
|||||||
|
|
||||||
Log("Sending invalid GAP [GapStart invalid]", INFO);
|
Log("Sending invalid GAP [GapStart invalid]", INFO);
|
||||||
-- UDP Header
|
-- UDP Header
|
||||||
gen_udp_header(UDP_META, stimulus);
|
gen_output_header(UDP_META, stimulus);
|
||||||
-- RTPS Header
|
-- RTPS Header
|
||||||
gen_rtps_header(rtps_header, stimulus);
|
gen_rtps_header(rtps_header, stimulus);
|
||||||
-- Invalid GAP [GapStart invalid] (Dropped)
|
-- Invalid GAP [GapStart invalid] (Dropped)
|
||||||
@ -666,7 +666,7 @@ begin
|
|||||||
gen_rtps_submessage(rtps_data, stimulus);
|
gen_rtps_submessage(rtps_data, stimulus);
|
||||||
rtps_data.writerSN := rtps_data.writerSN + 1;
|
rtps_data.writerSN := rtps_data.writerSN + 1;
|
||||||
-- Finalize Packet
|
-- Finalize Packet
|
||||||
fix_udp_packet(stimulus);
|
fix_output_packet(stimulus);
|
||||||
start_test;
|
start_test;
|
||||||
wait_on_complete;
|
wait_on_complete;
|
||||||
check_cnt := check_cnt + reference.length;
|
check_cnt := check_cnt + reference.length;
|
||||||
@ -675,7 +675,7 @@ begin
|
|||||||
|
|
||||||
Log("Sending invalid GAP [GapList invalid (Base invalid)]", INFO);
|
Log("Sending invalid GAP [GapList invalid (Base invalid)]", INFO);
|
||||||
-- UDP Header
|
-- UDP Header
|
||||||
gen_udp_header(UDP_META, stimulus);
|
gen_output_header(UDP_META, stimulus);
|
||||||
-- RTPS Header
|
-- RTPS Header
|
||||||
gen_rtps_header(rtps_header, stimulus);
|
gen_rtps_header(rtps_header, stimulus);
|
||||||
-- Invalid GAP [GapList invalid (Base invalid)] (Dropped)
|
-- Invalid GAP [GapList invalid (Base invalid)] (Dropped)
|
||||||
@ -688,7 +688,7 @@ begin
|
|||||||
gen_rtps_submessage(rtps_data, stimulus);
|
gen_rtps_submessage(rtps_data, stimulus);
|
||||||
rtps_data.writerSN := rtps_data.writerSN + 1;
|
rtps_data.writerSN := rtps_data.writerSN + 1;
|
||||||
-- Finalize Packet
|
-- Finalize Packet
|
||||||
fix_udp_packet(stimulus);
|
fix_output_packet(stimulus);
|
||||||
start_test;
|
start_test;
|
||||||
wait_on_complete;
|
wait_on_complete;
|
||||||
check_cnt := check_cnt + reference.length;
|
check_cnt := check_cnt + reference.length;
|
||||||
@ -697,7 +697,7 @@ begin
|
|||||||
|
|
||||||
Log("Sending invalid GAP [GapList invalid (NumBits invalid)]", INFO);
|
Log("Sending invalid GAP [GapList invalid (NumBits invalid)]", INFO);
|
||||||
-- UDP Header
|
-- UDP Header
|
||||||
gen_udp_header(UDP_META, stimulus);
|
gen_output_header(UDP_META, stimulus);
|
||||||
-- RTPS Header
|
-- RTPS Header
|
||||||
gen_rtps_header(rtps_header, stimulus);
|
gen_rtps_header(rtps_header, stimulus);
|
||||||
-- Invalid GAP [GapList invalid (NumBits invalid)] (Dropped)
|
-- Invalid GAP [GapList invalid (NumBits invalid)] (Dropped)
|
||||||
@ -710,7 +710,7 @@ begin
|
|||||||
gen_rtps_submessage(rtps_data, stimulus);
|
gen_rtps_submessage(rtps_data, stimulus);
|
||||||
rtps_data.writerSN := rtps_data.writerSN + 1;
|
rtps_data.writerSN := rtps_data.writerSN + 1;
|
||||||
-- Finalize Packet
|
-- Finalize Packet
|
||||||
fix_udp_packet(stimulus);
|
fix_output_packet(stimulus);
|
||||||
start_test;
|
start_test;
|
||||||
wait_on_complete;
|
wait_on_complete;
|
||||||
check_cnt := check_cnt + reference.length;
|
check_cnt := check_cnt + reference.length;
|
||||||
@ -721,7 +721,7 @@ begin
|
|||||||
-- *HEARTBEAT SUBMESSAGE*
|
-- *HEARTBEAT SUBMESSAGE*
|
||||||
Log("Sending valid HEARTBEAT [Meta Traffic, Both Endianness]", INFO);
|
Log("Sending valid HEARTBEAT [Meta Traffic, Both Endianness]", INFO);
|
||||||
-- UDP Header
|
-- UDP Header
|
||||||
gen_udp_header(UDP_META, stimulus);
|
gen_output_header(UDP_META, stimulus);
|
||||||
-- RTPS Header
|
-- RTPS Header
|
||||||
gen_rtps_header(rtps_header, stimulus);
|
gen_rtps_header(rtps_header, stimulus);
|
||||||
-- Valid HEARTBEAT [META Traffic, Big Endian] (Expected)
|
-- Valid HEARTBEAT [META Traffic, Big Endian] (Expected)
|
||||||
@ -735,7 +735,7 @@ begin
|
|||||||
gen_rtps_submessage(rtps_sub, stimulus);
|
gen_rtps_submessage(rtps_sub, stimulus);
|
||||||
gen_rtps_handler_out(rtps_sub, UDP_META.src, TRUE, TIME_INVALID, rtps_header.guidPrefix, reference);
|
gen_rtps_handler_out(rtps_sub, UDP_META.src, TRUE, TIME_INVALID, rtps_header.guidPrefix, reference);
|
||||||
-- Finalize Packet
|
-- Finalize Packet
|
||||||
fix_udp_packet(stimulus);
|
fix_output_packet(stimulus);
|
||||||
start_test;
|
start_test;
|
||||||
wait_on_complete;
|
wait_on_complete;
|
||||||
check_cnt := check_cnt + reference.length;
|
check_cnt := check_cnt + reference.length;
|
||||||
@ -744,7 +744,7 @@ begin
|
|||||||
|
|
||||||
Log("Sending valid HEARTBEAT [User Traffic]", INFO);
|
Log("Sending valid HEARTBEAT [User Traffic]", INFO);
|
||||||
-- UDP Header
|
-- UDP Header
|
||||||
gen_udp_header(UDP_USER, stimulus);
|
gen_output_header(UDP_USER, stimulus);
|
||||||
-- RTPS Header
|
-- RTPS Header
|
||||||
gen_rtps_header(rtps_header, stimulus);
|
gen_rtps_header(rtps_header, stimulus);
|
||||||
-- Valid HEARTBEAT [USER Traffic, Big Endian] (Expected)
|
-- Valid HEARTBEAT [USER Traffic, Big Endian] (Expected)
|
||||||
@ -754,7 +754,7 @@ begin
|
|||||||
gen_rtps_submessage(rtps_sub, stimulus);
|
gen_rtps_submessage(rtps_sub, stimulus);
|
||||||
gen_rtps_handler_out(rtps_sub, UDP_USER.src, FALSE, TIME_INVALID, rtps_header.guidPrefix, reference);
|
gen_rtps_handler_out(rtps_sub, UDP_USER.src, FALSE, TIME_INVALID, rtps_header.guidPrefix, reference);
|
||||||
-- Finalize Packet
|
-- Finalize Packet
|
||||||
fix_udp_packet(stimulus);
|
fix_output_packet(stimulus);
|
||||||
start_test;
|
start_test;
|
||||||
wait_on_complete;
|
wait_on_complete;
|
||||||
check_cnt := check_cnt + reference.length;
|
check_cnt := check_cnt + reference.length;
|
||||||
@ -763,7 +763,7 @@ begin
|
|||||||
|
|
||||||
Log("Sending invalid HEARTBEAT [Packet Size too small]", INFO);
|
Log("Sending invalid HEARTBEAT [Packet Size too small]", INFO);
|
||||||
-- UDP Header
|
-- UDP Header
|
||||||
gen_udp_header(UDP_META, stimulus);
|
gen_output_header(UDP_META, stimulus);
|
||||||
-- RTPS Header
|
-- RTPS Header
|
||||||
gen_rtps_header(rtps_header, stimulus);
|
gen_rtps_header(rtps_header, stimulus);
|
||||||
-- Invalid HEARTBEAT [SubLength > PackeSize] (Dropped)
|
-- Invalid HEARTBEAT [SubLength > PackeSize] (Dropped)
|
||||||
@ -773,7 +773,7 @@ begin
|
|||||||
gen_rtps_submessage(rtps_sub, stimulus);
|
gen_rtps_submessage(rtps_sub, stimulus);
|
||||||
stimulus.length := stimulus.length-1;
|
stimulus.length := stimulus.length-1;
|
||||||
-- Finalize Packet
|
-- Finalize Packet
|
||||||
fix_udp_packet(stimulus);
|
fix_output_packet(stimulus);
|
||||||
start_test;
|
start_test;
|
||||||
wait_on_complete;
|
wait_on_complete;
|
||||||
check_cnt := check_cnt + reference.length;
|
check_cnt := check_cnt + reference.length;
|
||||||
@ -782,7 +782,7 @@ begin
|
|||||||
|
|
||||||
Log("Sending invalid HEARTBEAT [Submessage Length too small]", INFO);
|
Log("Sending invalid HEARTBEAT [Submessage Length too small]", INFO);
|
||||||
-- UDP Header
|
-- UDP Header
|
||||||
gen_udp_header(UDP_META, stimulus);
|
gen_output_header(UDP_META, stimulus);
|
||||||
-- RTPS Header
|
-- RTPS Header
|
||||||
gen_rtps_header(rtps_header, stimulus);
|
gen_rtps_header(rtps_header, stimulus);
|
||||||
-- Invalid HEARTBEAT [SubLength invalid] (Dropped)
|
-- Invalid HEARTBEAT [SubLength invalid] (Dropped)
|
||||||
@ -795,7 +795,7 @@ begin
|
|||||||
gen_rtps_submessage(rtps_data, stimulus);
|
gen_rtps_submessage(rtps_data, stimulus);
|
||||||
rtps_data.writerSN := rtps_data.writerSN + 1;
|
rtps_data.writerSN := rtps_data.writerSN + 1;
|
||||||
-- Finalize Packet
|
-- Finalize Packet
|
||||||
fix_udp_packet(stimulus);
|
fix_output_packet(stimulus);
|
||||||
start_test;
|
start_test;
|
||||||
wait_on_complete;
|
wait_on_complete;
|
||||||
check_cnt := check_cnt + reference.length;
|
check_cnt := check_cnt + reference.length;
|
||||||
@ -804,7 +804,7 @@ begin
|
|||||||
|
|
||||||
Log("Sending invalid HEARTBEAT [FirstSN invalid]", INFO);
|
Log("Sending invalid HEARTBEAT [FirstSN invalid]", INFO);
|
||||||
-- UDP Header
|
-- UDP Header
|
||||||
gen_udp_header(UDP_META, stimulus);
|
gen_output_header(UDP_META, stimulus);
|
||||||
-- RTPS Header
|
-- RTPS Header
|
||||||
gen_rtps_header(rtps_header, stimulus);
|
gen_rtps_header(rtps_header, stimulus);
|
||||||
-- Invalid HEARTBEAT [FirstSN invalid] (Dropped)
|
-- Invalid HEARTBEAT [FirstSN invalid] (Dropped)
|
||||||
@ -817,7 +817,7 @@ begin
|
|||||||
gen_rtps_submessage(rtps_data, stimulus);
|
gen_rtps_submessage(rtps_data, stimulus);
|
||||||
rtps_data.writerSN := rtps_data.writerSN + 1;
|
rtps_data.writerSN := rtps_data.writerSN + 1;
|
||||||
-- Finalize Packet
|
-- Finalize Packet
|
||||||
fix_udp_packet(stimulus);
|
fix_output_packet(stimulus);
|
||||||
start_test;
|
start_test;
|
||||||
wait_on_complete;
|
wait_on_complete;
|
||||||
check_cnt := check_cnt + reference.length;
|
check_cnt := check_cnt + reference.length;
|
||||||
@ -826,7 +826,7 @@ begin
|
|||||||
|
|
||||||
Log("Sending invalid HEARTBEAT [LastSN invalid]", INFO);
|
Log("Sending invalid HEARTBEAT [LastSN invalid]", INFO);
|
||||||
-- UDP Header
|
-- UDP Header
|
||||||
gen_udp_header(UDP_META, stimulus);
|
gen_output_header(UDP_META, stimulus);
|
||||||
-- RTPS Header
|
-- RTPS Header
|
||||||
gen_rtps_header(rtps_header, stimulus);
|
gen_rtps_header(rtps_header, stimulus);
|
||||||
-- Invalid HEARTBEAT [LastSN invalid] (Dropped)
|
-- Invalid HEARTBEAT [LastSN invalid] (Dropped)
|
||||||
@ -839,7 +839,7 @@ begin
|
|||||||
gen_rtps_submessage(rtps_data, stimulus);
|
gen_rtps_submessage(rtps_data, stimulus);
|
||||||
rtps_data.writerSN := rtps_data.writerSN + 1;
|
rtps_data.writerSN := rtps_data.writerSN + 1;
|
||||||
-- Finalize Packet
|
-- Finalize Packet
|
||||||
fix_udp_packet(stimulus);
|
fix_output_packet(stimulus);
|
||||||
start_test;
|
start_test;
|
||||||
wait_on_complete;
|
wait_on_complete;
|
||||||
check_cnt := check_cnt + reference.length;
|
check_cnt := check_cnt + reference.length;
|
||||||
@ -848,7 +848,7 @@ begin
|
|||||||
|
|
||||||
Log("Sending invalid HEARTBEAT [LastSN < FirstSN - 1]", INFO);
|
Log("Sending invalid HEARTBEAT [LastSN < FirstSN - 1]", INFO);
|
||||||
-- UDP Header
|
-- UDP Header
|
||||||
gen_udp_header(UDP_META, stimulus);
|
gen_output_header(UDP_META, stimulus);
|
||||||
-- RTPS Header
|
-- RTPS Header
|
||||||
gen_rtps_header(rtps_header, stimulus);
|
gen_rtps_header(rtps_header, stimulus);
|
||||||
-- Invalid HEARTBEAT [LastSN invalid] (Dropped)
|
-- Invalid HEARTBEAT [LastSN invalid] (Dropped)
|
||||||
@ -862,7 +862,7 @@ begin
|
|||||||
gen_rtps_submessage(rtps_data, stimulus);
|
gen_rtps_submessage(rtps_data, stimulus);
|
||||||
rtps_data.writerSN := rtps_data.writerSN + 1;
|
rtps_data.writerSN := rtps_data.writerSN + 1;
|
||||||
-- Finalize Packet
|
-- Finalize Packet
|
||||||
fix_udp_packet(stimulus);
|
fix_output_packet(stimulus);
|
||||||
start_test;
|
start_test;
|
||||||
wait_on_complete;
|
wait_on_complete;
|
||||||
check_cnt := check_cnt + reference.length;
|
check_cnt := check_cnt + reference.length;
|
||||||
@ -872,7 +872,7 @@ begin
|
|||||||
-- *INFO_SOURCE SUBMESSAGE*
|
-- *INFO_SOURCE SUBMESSAGE*
|
||||||
Log("Testing INFO_SOURCE interpretation", INFO);
|
Log("Testing INFO_SOURCE interpretation", INFO);
|
||||||
-- UDP Header
|
-- UDP Header
|
||||||
gen_udp_header(UDP_META, stimulus);
|
gen_output_header(UDP_META, stimulus);
|
||||||
-- RTPS Header
|
-- RTPS Header
|
||||||
gen_rtps_header(rtps_header, stimulus);
|
gen_rtps_header(rtps_header, stimulus);
|
||||||
-- Valid Data (Expected)
|
-- Valid Data (Expected)
|
||||||
@ -905,7 +905,7 @@ begin
|
|||||||
gen_rtps_submessage(rtps_data, stimulus);
|
gen_rtps_submessage(rtps_data, stimulus);
|
||||||
rtps_data.writerSN := rtps_data.writerSN + 1;
|
rtps_data.writerSN := rtps_data.writerSN + 1;
|
||||||
-- Finalize Packet
|
-- Finalize Packet
|
||||||
fix_udp_packet(stimulus);
|
fix_output_packet(stimulus);
|
||||||
start_test;
|
start_test;
|
||||||
wait_on_complete;
|
wait_on_complete;
|
||||||
check_cnt := check_cnt + reference.length;
|
check_cnt := check_cnt + reference.length;
|
||||||
@ -914,7 +914,7 @@ begin
|
|||||||
|
|
||||||
Log("Sending invalid INFO_SOURCE [Submessage Length too small]", INFO);
|
Log("Sending invalid INFO_SOURCE [Submessage Length too small]", INFO);
|
||||||
-- UDP Header
|
-- UDP Header
|
||||||
gen_udp_header(UDP_META, stimulus);
|
gen_output_header(UDP_META, stimulus);
|
||||||
-- RTPS Header
|
-- RTPS Header
|
||||||
gen_rtps_header(rtps_header, stimulus);
|
gen_rtps_header(rtps_header, stimulus);
|
||||||
-- Invalid INFO_SOURCE [SubLength invalid] (Dropped)
|
-- Invalid INFO_SOURCE [SubLength invalid] (Dropped)
|
||||||
@ -926,7 +926,7 @@ begin
|
|||||||
gen_rtps_submessage(rtps_data, stimulus);
|
gen_rtps_submessage(rtps_data, stimulus);
|
||||||
rtps_data.writerSN := rtps_data.writerSN + 1;
|
rtps_data.writerSN := rtps_data.writerSN + 1;
|
||||||
-- Finalize Packet
|
-- Finalize Packet
|
||||||
fix_udp_packet(stimulus);
|
fix_output_packet(stimulus);
|
||||||
start_test;
|
start_test;
|
||||||
wait_on_complete;
|
wait_on_complete;
|
||||||
check_cnt := check_cnt + reference.length;
|
check_cnt := check_cnt + reference.length;
|
||||||
@ -937,7 +937,7 @@ begin
|
|||||||
-- *INFO_DESTINATION SUBMESSAGE*
|
-- *INFO_DESTINATION SUBMESSAGE*
|
||||||
Log("Testing INFO_DESTINATION interpretation", INFO);
|
Log("Testing INFO_DESTINATION interpretation", INFO);
|
||||||
-- UDP Header
|
-- UDP Header
|
||||||
gen_udp_header(UDP_META, stimulus);
|
gen_output_header(UDP_META, stimulus);
|
||||||
-- RTPS Header
|
-- RTPS Header
|
||||||
gen_rtps_header(rtps_header, stimulus);
|
gen_rtps_header(rtps_header, stimulus);
|
||||||
-- Valid Data (Expected)
|
-- Valid Data (Expected)
|
||||||
@ -969,7 +969,7 @@ begin
|
|||||||
gen_rtps_submessage(rtps_data, stimulus);
|
gen_rtps_submessage(rtps_data, stimulus);
|
||||||
rtps_data.writerSN := rtps_data.writerSN + 1;
|
rtps_data.writerSN := rtps_data.writerSN + 1;
|
||||||
-- Finalize Packet
|
-- Finalize Packet
|
||||||
fix_udp_packet(stimulus);
|
fix_output_packet(stimulus);
|
||||||
start_test;
|
start_test;
|
||||||
wait_on_complete;
|
wait_on_complete;
|
||||||
check_cnt := check_cnt + reference.length;
|
check_cnt := check_cnt + reference.length;
|
||||||
@ -978,7 +978,7 @@ begin
|
|||||||
|
|
||||||
Log("Sending invalid INFO_DESTINATION [Submessage Length too small]", INFO);
|
Log("Sending invalid INFO_DESTINATION [Submessage Length too small]", INFO);
|
||||||
-- UDP Header
|
-- UDP Header
|
||||||
gen_udp_header(UDP_META, stimulus);
|
gen_output_header(UDP_META, stimulus);
|
||||||
-- RTPS Header
|
-- RTPS Header
|
||||||
gen_rtps_header(rtps_header, stimulus);
|
gen_rtps_header(rtps_header, stimulus);
|
||||||
-- Invalid INFO_DESTINATION [SubLength invalid] (Dropped)
|
-- Invalid INFO_DESTINATION [SubLength invalid] (Dropped)
|
||||||
@ -990,7 +990,7 @@ begin
|
|||||||
gen_rtps_submessage(rtps_data, stimulus);
|
gen_rtps_submessage(rtps_data, stimulus);
|
||||||
rtps_data.writerSN := rtps_data.writerSN + 1;
|
rtps_data.writerSN := rtps_data.writerSN + 1;
|
||||||
-- Finalize Packet
|
-- Finalize Packet
|
||||||
fix_udp_packet(stimulus);
|
fix_output_packet(stimulus);
|
||||||
start_test;
|
start_test;
|
||||||
wait_on_complete;
|
wait_on_complete;
|
||||||
check_cnt := check_cnt + reference.length;
|
check_cnt := check_cnt + reference.length;
|
||||||
@ -1001,7 +1001,7 @@ begin
|
|||||||
-- *INFO_REPLY SUBMESSAGE*
|
-- *INFO_REPLY SUBMESSAGE*
|
||||||
Log("Testing INFO_REPLY interpretation", INFO);
|
Log("Testing INFO_REPLY interpretation", INFO);
|
||||||
-- UDP Header
|
-- UDP Header
|
||||||
gen_udp_header(UDP_META, stimulus);
|
gen_output_header(UDP_META, stimulus);
|
||||||
-- RTPS Header
|
-- RTPS Header
|
||||||
gen_rtps_header(rtps_header, stimulus);
|
gen_rtps_header(rtps_header, stimulus);
|
||||||
-- Valid Data (Expected)
|
-- Valid Data (Expected)
|
||||||
@ -1050,7 +1050,7 @@ begin
|
|||||||
gen_rtps_handler_out(rtps_data, tmp_loc, TRUE, TIME_INVALID, rtps_header.guidPrefix, reference);
|
gen_rtps_handler_out(rtps_data, tmp_loc, TRUE, TIME_INVALID, rtps_header.guidPrefix, reference);
|
||||||
rtps_data.writerSN := rtps_data.writerSN + 1;
|
rtps_data.writerSN := rtps_data.writerSN + 1;
|
||||||
-- Finalize Packet
|
-- Finalize Packet
|
||||||
fix_udp_packet(stimulus);
|
fix_output_packet(stimulus);
|
||||||
start_test;
|
start_test;
|
||||||
wait_on_complete;
|
wait_on_complete;
|
||||||
check_cnt := check_cnt + reference.length;
|
check_cnt := check_cnt + reference.length;
|
||||||
@ -1059,7 +1059,7 @@ begin
|
|||||||
|
|
||||||
Log("Sending invalid INFO_REPLY [Submessage Length too small]", INFO);
|
Log("Sending invalid INFO_REPLY [Submessage Length too small]", INFO);
|
||||||
-- UDP Header
|
-- UDP Header
|
||||||
gen_udp_header(UDP_META, stimulus);
|
gen_output_header(UDP_META, stimulus);
|
||||||
-- RTPS Header
|
-- RTPS Header
|
||||||
gen_rtps_header(rtps_header, stimulus);
|
gen_rtps_header(rtps_header, stimulus);
|
||||||
-- Invalid INFO_REPLY [SubLength invalid] (Dropped)
|
-- Invalid INFO_REPLY [SubLength invalid] (Dropped)
|
||||||
@ -1074,7 +1074,7 @@ begin
|
|||||||
gen_rtps_submessage(rtps_data, stimulus);
|
gen_rtps_submessage(rtps_data, stimulus);
|
||||||
rtps_data.writerSN := rtps_data.writerSN + 1;
|
rtps_data.writerSN := rtps_data.writerSN + 1;
|
||||||
-- Finalize Packet
|
-- Finalize Packet
|
||||||
fix_udp_packet(stimulus);
|
fix_output_packet(stimulus);
|
||||||
start_test;
|
start_test;
|
||||||
wait_on_complete;
|
wait_on_complete;
|
||||||
check_cnt := check_cnt + reference.length;
|
check_cnt := check_cnt + reference.length;
|
||||||
@ -1085,7 +1085,7 @@ begin
|
|||||||
-- *INFO_REPLY_IP4 SUBMESSAGE*
|
-- *INFO_REPLY_IP4 SUBMESSAGE*
|
||||||
Log("Testing INFO_REPLY_IP4 interpretation", INFO);
|
Log("Testing INFO_REPLY_IP4 interpretation", INFO);
|
||||||
-- UDP Header
|
-- UDP Header
|
||||||
gen_udp_header(UDP_META, stimulus);
|
gen_output_header(UDP_META, stimulus);
|
||||||
-- RTPS Header
|
-- RTPS Header
|
||||||
gen_rtps_header(rtps_header, stimulus);
|
gen_rtps_header(rtps_header, stimulus);
|
||||||
-- Valid Data (Expected)
|
-- Valid Data (Expected)
|
||||||
@ -1122,7 +1122,7 @@ begin
|
|||||||
gen_rtps_handler_out(rtps_data, tmp_loc, TRUE, TIME_INVALID, rtps_header.guidPrefix, reference);
|
gen_rtps_handler_out(rtps_data, tmp_loc, TRUE, TIME_INVALID, rtps_header.guidPrefix, reference);
|
||||||
rtps_data.writerSN := rtps_data.writerSN + 1;
|
rtps_data.writerSN := rtps_data.writerSN + 1;
|
||||||
-- Finalize Packet
|
-- Finalize Packet
|
||||||
fix_udp_packet(stimulus);
|
fix_output_packet(stimulus);
|
||||||
start_test;
|
start_test;
|
||||||
wait_on_complete;
|
wait_on_complete;
|
||||||
check_cnt := check_cnt + reference.length;
|
check_cnt := check_cnt + reference.length;
|
||||||
@ -1131,7 +1131,7 @@ begin
|
|||||||
|
|
||||||
Log("Sending invalid INFO_REPLY_IP4 [Submessage Length too small]", INFO);
|
Log("Sending invalid INFO_REPLY_IP4 [Submessage Length too small]", INFO);
|
||||||
-- UDP Header
|
-- UDP Header
|
||||||
gen_udp_header(UDP_META, stimulus);
|
gen_output_header(UDP_META, stimulus);
|
||||||
-- RTPS Header
|
-- RTPS Header
|
||||||
gen_rtps_header(rtps_header, stimulus);
|
gen_rtps_header(rtps_header, stimulus);
|
||||||
-- Invalid INFO_REPLY_IP4 [SubLength invalid] (Dropped)
|
-- Invalid INFO_REPLY_IP4 [SubLength invalid] (Dropped)
|
||||||
@ -1143,7 +1143,7 @@ begin
|
|||||||
gen_rtps_submessage(rtps_data, stimulus);
|
gen_rtps_submessage(rtps_data, stimulus);
|
||||||
rtps_data.writerSN := rtps_data.writerSN + 1;
|
rtps_data.writerSN := rtps_data.writerSN + 1;
|
||||||
-- Finalize Packet
|
-- Finalize Packet
|
||||||
fix_udp_packet(stimulus);
|
fix_output_packet(stimulus);
|
||||||
start_test;
|
start_test;
|
||||||
wait_on_complete;
|
wait_on_complete;
|
||||||
check_cnt := check_cnt + reference.length;
|
check_cnt := check_cnt + reference.length;
|
||||||
@ -1153,7 +1153,7 @@ begin
|
|||||||
-- *INFO TS*
|
-- *INFO TS*
|
||||||
Log("Testing INFO_TIMESTAMP interpretation", INFO);
|
Log("Testing INFO_TIMESTAMP interpretation", INFO);
|
||||||
-- UDP Header
|
-- UDP Header
|
||||||
gen_udp_header(UDP_META, stimulus);
|
gen_output_header(UDP_META, stimulus);
|
||||||
-- RTPS Header
|
-- RTPS Header
|
||||||
gen_rtps_header(rtps_header, stimulus);
|
gen_rtps_header(rtps_header, stimulus);
|
||||||
-- Valid Data (Expected)
|
-- Valid Data (Expected)
|
||||||
@ -1189,7 +1189,7 @@ begin
|
|||||||
gen_rtps_handler_out(rtps_data, UDP_META.src, TRUE, ts, rtps_header.guidPrefix, reference);
|
gen_rtps_handler_out(rtps_data, UDP_META.src, TRUE, ts, rtps_header.guidPrefix, reference);
|
||||||
rtps_data.writerSN := rtps_data.writerSN + 1;
|
rtps_data.writerSN := rtps_data.writerSN + 1;
|
||||||
-- Finalize Packet
|
-- Finalize Packet
|
||||||
fix_udp_packet(stimulus);
|
fix_output_packet(stimulus);
|
||||||
start_test;
|
start_test;
|
||||||
wait_on_complete;
|
wait_on_complete;
|
||||||
check_cnt := check_cnt + reference.length;
|
check_cnt := check_cnt + reference.length;
|
||||||
@ -1198,7 +1198,7 @@ begin
|
|||||||
|
|
||||||
Log("Sending invalid INFO_TMESTAMP [Submessage Length too small]", INFO);
|
Log("Sending invalid INFO_TMESTAMP [Submessage Length too small]", INFO);
|
||||||
-- UDP Header
|
-- UDP Header
|
||||||
gen_udp_header(UDP_META, stimulus);
|
gen_output_header(UDP_META, stimulus);
|
||||||
-- RTPS Header
|
-- RTPS Header
|
||||||
gen_rtps_header(rtps_header, stimulus);
|
gen_rtps_header(rtps_header, stimulus);
|
||||||
-- Invalid INFO_TIMESTAMP [SubLength invalid] (Dropped)
|
-- Invalid INFO_TIMESTAMP [SubLength invalid] (Dropped)
|
||||||
@ -1210,7 +1210,7 @@ begin
|
|||||||
gen_rtps_submessage(rtps_data, stimulus);
|
gen_rtps_submessage(rtps_data, stimulus);
|
||||||
rtps_data.writerSN := rtps_data.writerSN + 1;
|
rtps_data.writerSN := rtps_data.writerSN + 1;
|
||||||
-- Finalize Packet
|
-- Finalize Packet
|
||||||
fix_udp_packet(stimulus);
|
fix_output_packet(stimulus);
|
||||||
start_test;
|
start_test;
|
||||||
wait_on_complete;
|
wait_on_complete;
|
||||||
check_cnt := check_cnt + reference.length;
|
check_cnt := check_cnt + reference.length;
|
||||||
@ -1221,7 +1221,7 @@ begin
|
|||||||
-- *PAD*
|
-- *PAD*
|
||||||
Log("Testing PAD interpretation", INFO);
|
Log("Testing PAD interpretation", INFO);
|
||||||
-- UDP Header
|
-- UDP Header
|
||||||
gen_udp_header(UDP_META, stimulus);
|
gen_output_header(UDP_META, stimulus);
|
||||||
-- RTPS Header
|
-- RTPS Header
|
||||||
gen_rtps_header(rtps_header, stimulus);
|
gen_rtps_header(rtps_header, stimulus);
|
||||||
-- Valid Data (Expected)
|
-- Valid Data (Expected)
|
||||||
@ -1238,7 +1238,7 @@ begin
|
|||||||
gen_rtps_handler_out(rtps_data, UDP_META.src, TRUE, TIME_INVALID, rtps_header.guidPrefix, reference);
|
gen_rtps_handler_out(rtps_data, UDP_META.src, TRUE, TIME_INVALID, rtps_header.guidPrefix, reference);
|
||||||
rtps_data.writerSN := rtps_data.writerSN + 1;
|
rtps_data.writerSN := rtps_data.writerSN + 1;
|
||||||
-- Finalize Packet
|
-- Finalize Packet
|
||||||
fix_udp_packet(stimulus);
|
fix_output_packet(stimulus);
|
||||||
start_test;
|
start_test;
|
||||||
wait_on_complete;
|
wait_on_complete;
|
||||||
check_cnt := check_cnt + reference.length;
|
check_cnt := check_cnt + reference.length;
|
||||||
@ -1249,7 +1249,7 @@ begin
|
|||||||
-- *UNKNOWN*
|
-- *UNKNOWN*
|
||||||
Log("Testing unknown Submessage handling", INFO);
|
Log("Testing unknown Submessage handling", INFO);
|
||||||
-- UDP Header
|
-- UDP Header
|
||||||
gen_udp_header(UDP_META, stimulus);
|
gen_output_header(UDP_META, stimulus);
|
||||||
-- RTPS Header
|
-- RTPS Header
|
||||||
gen_rtps_header(rtps_header, stimulus);
|
gen_rtps_header(rtps_header, stimulus);
|
||||||
-- Valid Data (Expected)
|
-- Valid Data (Expected)
|
||||||
@ -1293,7 +1293,7 @@ begin
|
|||||||
gen_rtps_handler_out(rtps_data, UDP_META.src, TRUE, TIME_INVALID, rtps_header.guidPrefix, reference);
|
gen_rtps_handler_out(rtps_data, UDP_META.src, TRUE, TIME_INVALID, rtps_header.guidPrefix, reference);
|
||||||
rtps_data.writerSN := rtps_data.writerSN + 1;
|
rtps_data.writerSN := rtps_data.writerSN + 1;
|
||||||
-- Finalize Packet
|
-- Finalize Packet
|
||||||
fix_udp_packet(stimulus);
|
fix_output_packet(stimulus);
|
||||||
start_test;
|
start_test;
|
||||||
wait_on_complete;
|
wait_on_complete;
|
||||||
check_cnt := check_cnt + reference.length;
|
check_cnt := check_cnt + reference.length;
|
||||||
|
|||||||
@ -85,7 +85,7 @@ begin
|
|||||||
variable rtps_data : RTPS_SUBMESSAGE_TYPE := DEFAULT_RTPS_SUBMESSAGE;
|
variable rtps_data : RTPS_SUBMESSAGE_TYPE := DEFAULT_RTPS_SUBMESSAGE;
|
||||||
variable check_cnt : natural := 0;
|
variable check_cnt : natural := 0;
|
||||||
variable RV : RandomPType;
|
variable RV : RandomPType;
|
||||||
variable UDP : UDP_HEADER_TYPE;
|
variable UDP : OUTPUT_HEADER_TYPE;
|
||||||
variable tmp_loc_list : LOCATOR_LIST_TYPE;
|
variable tmp_loc_list : LOCATOR_LIST_TYPE;
|
||||||
variable ref1, ref2, ref3 : std_logic_vector(0 to NUM_ENDPOINTS);
|
variable ref1, ref2, ref3 : std_logic_vector(0 to NUM_ENDPOINTS);
|
||||||
variable tmp_id : std_logic_vector(ENTITYID_WIDTH-1 downto 0);
|
variable tmp_id : std_logic_vector(ENTITYID_WIDTH-1 downto 0);
|
||||||
@ -217,7 +217,7 @@ begin
|
|||||||
--report "ref2: " & to_string(ref2);
|
--report "ref2: " & to_string(ref2);
|
||||||
--report "ref3: " & to_string(ref3);
|
--report "ref3: " & to_string(ref3);
|
||||||
-- UDP Header
|
-- UDP Header
|
||||||
gen_udp_header(UDP, stimulus);
|
gen_output_header(UDP, stimulus);
|
||||||
-- RTPS Header
|
-- RTPS Header
|
||||||
gen_rtps_header(rtps_header, stimulus);
|
gen_rtps_header(rtps_header, stimulus);
|
||||||
-- Valid Data
|
-- Valid Data
|
||||||
@ -226,7 +226,7 @@ begin
|
|||||||
gen_rtps_handler_out(rtps_data, UDP.src, is_meta, TIME_INVALID, rtps_header.guidPrefix, dummy);
|
gen_rtps_handler_out(rtps_data, UDP.src, is_meta, TIME_INVALID, rtps_header.guidPrefix, dummy);
|
||||||
end if;
|
end if;
|
||||||
-- Finalize Packet
|
-- Finalize Packet
|
||||||
fix_udp_packet(stimulus);
|
fix_output_packet(stimulus);
|
||||||
reference <= ref1 and ref2 and ref3;
|
reference <= ref1 and ref2 and ref3;
|
||||||
start_test;
|
start_test;
|
||||||
wait_on_complete;
|
wait_on_complete;
|
||||||
|
|||||||
@ -22,9 +22,9 @@ analyze Level_0/rtps_builtin_endpoint_test4.vhd
|
|||||||
analyze Level_0/rtps_builtin_endpoint_test5.vhd
|
analyze Level_0/rtps_builtin_endpoint_test5.vhd
|
||||||
|
|
||||||
#simulate rtps_handler_test1
|
#simulate rtps_handler_test1
|
||||||
#simulate rtps_handler_test2
|
simulate rtps_handler_test2
|
||||||
#simulate rtps_builtin_endpoint_test1
|
#simulate rtps_builtin_endpoint_test1
|
||||||
#simulate rtps_builtin_endpoint_test2
|
#simulate rtps_builtin_endpoint_test2
|
||||||
#simulate rtps_builtin_endpoint_test3
|
#simulate rtps_builtin_endpoint_test3
|
||||||
#simulate rtps_builtin_endpoint_test4
|
#simulate rtps_builtin_endpoint_test4
|
||||||
simulate rtps_builtin_endpoint_test5
|
#simulate rtps_builtin_endpoint_test5
|
||||||
@ -33,7 +33,7 @@ architecture arch of rtps_handler is
|
|||||||
|
|
||||||
--*****TYPE DECLARATION*****
|
--*****TYPE DECLARATION*****
|
||||||
-- FSM states. Explained below in detail
|
-- FSM states. Explained below in detail
|
||||||
type STAGE_TYPE is (SRC_ADDR_HEADER, DEST_ADDR_HEADER, LEN_HEADER, UDP_HEADER_1, UDP_HEADER_2, RTPS_HEADER_1, RTPS_HEADER_2,
|
type STAGE_TYPE is (SRC_ADDR_HEADER, DEST_ADDR_HEADER, UDP_PORT_HEADER, LEN_HEADER, RTPS_HEADER_1, RTPS_HEADER_2,
|
||||||
RTPS_HEADER_3, RTPS_SUB_HEADER, PARSE_INFO_DST, PARSE_INFO_SRC, PARSE_INFO_TS, PARSE_INFO_REPLY, EXTRACT_LOCATOR,
|
RTPS_HEADER_3, RTPS_SUB_HEADER, PARSE_INFO_DST, PARSE_INFO_SRC, PARSE_INFO_TS, PARSE_INFO_REPLY, EXTRACT_LOCATOR,
|
||||||
PARSE_INFO_REPLY_IP4, PARSE_HEARTBEAT, PARSE_ACKNACK, PARSE_GAP, PARSE_DATA, SKIP_DATA_HEADER, MATCH_DST_ENDPOINT,
|
PARSE_INFO_REPLY_IP4, PARSE_HEARTBEAT, PARSE_ACKNACK, PARSE_GAP, PARSE_DATA, SKIP_DATA_HEADER, MATCH_DST_ENDPOINT,
|
||||||
PUSH_PAYLOAD_HEADER, PUSH_PAYLOAD, SKIP_SUB, SKIP_PACKET);
|
PUSH_PAYLOAD_HEADER, PUSH_PAYLOAD, SKIP_SUB, SKIP_PACKET);
|
||||||
@ -127,10 +127,8 @@ architecture arch of rtps_handler is
|
|||||||
|
|
||||||
--*****ALIAS DEFINATION*****
|
--*****ALIAS DEFINATION*****
|
||||||
-- UDP HEADER
|
-- UDP HEADER
|
||||||
alias udp_src_port : std_logic_vector(15 downto 0) is data_in(31 downto 16);
|
alias udp_src_port : std_logic_vector(15 downto 0) is long_latch(31 downto 16);
|
||||||
alias udp_dest_port : std_logic_vector(15 downto 0) is data_in(15 downto 0);
|
alias udp_dest_port : std_logic_vector(15 downto 0) is long_latch(15 downto 0);
|
||||||
alias udp_length : std_logic_vector(15 downto 0) is data_in(31 downto 16);
|
|
||||||
alias udp_checksum : std_logic_vector(15 downto 0) is data_in(15 downto 0);
|
|
||||||
-- RTPS HEADER
|
-- RTPS HEADER
|
||||||
alias rtps_version : std_logic_vector(15 downto 0) is data_in(31 downto 16);
|
alias rtps_version : std_logic_vector(15 downto 0) is data_in(31 downto 16);
|
||||||
alias rtps_vendorid : std_logic_vector(15 downto 0) is data_in(15 downto 0);
|
alias rtps_vendorid : std_logic_vector(15 downto 0) is data_in(15 downto 0);
|
||||||
@ -197,9 +195,8 @@ begin
|
|||||||
-- STATE DESCRIPTION
|
-- STATE DESCRIPTION
|
||||||
-- SRC_ADDR_HEADER Initial and Idle state. Read IPv4 Source Address
|
-- SRC_ADDR_HEADER Initial and Idle state. Read IPv4 Source Address
|
||||||
-- DEST_ADDR_HEADER Read IPv4 Destination Address
|
-- DEST_ADDR_HEADER Read IPv4 Destination Address
|
||||||
-- LEN_HEADER Read UDP Packet Length
|
-- UDP_PORT_HEADER Read UDP Source and Destination Ports
|
||||||
-- UDP_HEADER_1 Parse first word of UDP Header
|
-- LEN_HEADER Read Packet Length (And check UDP Ports of previous stage)
|
||||||
-- UDP_HEADER_2 Parse second word of UDP Header
|
|
||||||
-- RTPS_HEADER_1 Parse first word of RTPS Header
|
-- RTPS_HEADER_1 Parse first word of RTPS Header
|
||||||
-- RTPS_HEADER_2 Parse second word of RTPS Header
|
-- RTPS_HEADER_2 Parse second word of RTPS Header
|
||||||
-- RTPS_HEADER_3 Parse GUID Prefix of RTPS Header (3rd-5th Word)
|
-- RTPS_HEADER_3 Parse GUID Prefix of RTPS Header (3rd-5th Word)
|
||||||
@ -296,9 +293,20 @@ begin
|
|||||||
ip_addr_type_next <= INVALID;
|
ip_addr_type_next <= INVALID;
|
||||||
end case;
|
end case;
|
||||||
|
|
||||||
stage_next <= LEN_HEADER;
|
stage_next <= UDP_PORT_HEADER;
|
||||||
end if;
|
end if;
|
||||||
-- UDP Packet Length
|
-- UDP Src & Dest Ports
|
||||||
|
when UDP_PORT_HEADER =>
|
||||||
|
-- Input FIFO Guard
|
||||||
|
if (empty = '0') then
|
||||||
|
rd_guard := '1';
|
||||||
|
|
||||||
|
-- NOTE: Ports are latched for later checking, because we cannot yet skip the packet (Need to latch the packet length first)
|
||||||
|
long_latch_next <= data_in;
|
||||||
|
|
||||||
|
stage_next <= LEN_HEADER;
|
||||||
|
end if;
|
||||||
|
-- Packet Length
|
||||||
when LEN_HEADER =>
|
when LEN_HEADER =>
|
||||||
-- Input FIFO Guard
|
-- Input FIFO Guard
|
||||||
if (empty = '0') then
|
if (empty = '0') then
|
||||||
@ -307,21 +315,11 @@ begin
|
|||||||
reset_read_cnt <= '1';
|
reset_read_cnt <= '1';
|
||||||
|
|
||||||
packet_length_next <= unsigned(data_in(packet_length'length-1 downto 0));
|
packet_length_next <= unsigned(data_in(packet_length'length-1 downto 0));
|
||||||
|
src_port_next <= udp_src_port;
|
||||||
-- DEFAULT
|
|
||||||
stage_next <= UDP_HEADER_1;
|
|
||||||
end if;
|
|
||||||
-- First UDP Header word (Fields: Src Port, Dest Port)
|
|
||||||
when UDP_HEADER_1 =>
|
|
||||||
-- Input FIFO Guard
|
|
||||||
if (empty = '0') then
|
|
||||||
rd_guard := '1';
|
|
||||||
|
|
||||||
-- DEFAULT
|
-- DEFAULT
|
||||||
is_metatraffic_next <= '0';
|
is_metatraffic_next <= '0';
|
||||||
stage_next <= SKIP_PACKET;
|
stage_next <= RTPS_HEADER_1;
|
||||||
|
|
||||||
src_port_next <= udp_src_port;
|
|
||||||
|
|
||||||
-- Check Address and Port Destination for validity
|
-- Check Address and Port Destination for validity
|
||||||
case (ip_addr_type) is
|
case (ip_addr_type) is
|
||||||
@ -330,50 +328,33 @@ begin
|
|||||||
is_metatraffic_next <= '1';
|
is_metatraffic_next <= '1';
|
||||||
case (udp_dest_port) is
|
case (udp_dest_port) is
|
||||||
when META_IPv4_MULTICAST_PORT =>
|
when META_IPv4_MULTICAST_PORT =>
|
||||||
stage_next <= UDP_HEADER_2;
|
null;
|
||||||
when META_IPv4_UNICAST_PORT =>
|
when META_IPv4_UNICAST_PORT =>
|
||||||
stage_next <= UDP_HEADER_2;
|
null;
|
||||||
when others =>
|
when others =>
|
||||||
-- Ignore
|
-- Ignore
|
||||||
null;
|
stage_next <= SKIP_PACKET;
|
||||||
end case;
|
end case;
|
||||||
when DEFAULT_ADDR =>
|
when DEFAULT_ADDR =>
|
||||||
case (udp_dest_port) is
|
case (udp_dest_port) is
|
||||||
when META_IPv4_MULTICAST_PORT =>
|
when META_IPv4_MULTICAST_PORT =>
|
||||||
is_metatraffic_next <= '1';
|
is_metatraffic_next <= '1';
|
||||||
stage_next <= UDP_HEADER_2;
|
|
||||||
when META_IPv4_UNICAST_PORT =>
|
when META_IPv4_UNICAST_PORT =>
|
||||||
is_metatraffic_next <= '1';
|
is_metatraffic_next <= '1';
|
||||||
stage_next <= UDP_HEADER_2;
|
|
||||||
when USER_IPv4_MULTICAST_PORT =>
|
when USER_IPv4_MULTICAST_PORT =>
|
||||||
stage_next <= UDP_HEADER_2;
|
null;
|
||||||
when USER_IPv4_UNICAST_PORT =>
|
when USER_IPv4_UNICAST_PORT =>
|
||||||
stage_next <= UDP_HEADER_2;
|
null;
|
||||||
when others =>
|
when others =>
|
||||||
-- Ignore
|
-- Ignore
|
||||||
null;
|
stage_next <= SKIP_PACKET;
|
||||||
end case;
|
end case;
|
||||||
-- Packet not destined for us
|
-- Packet not destined for us
|
||||||
when others =>
|
when others =>
|
||||||
-- Ignore
|
-- Ignore
|
||||||
null;
|
stage_next <= SKIP_PACKET;
|
||||||
end case;
|
end case;
|
||||||
end if;
|
end if;
|
||||||
-- Second UDP Header Word (Fields: Length, Checksum)
|
|
||||||
when UDP_HEADER_2 =>
|
|
||||||
-- Input FIFO Guard
|
|
||||||
if (empty = '0') then
|
|
||||||
rd_guard := '1';
|
|
||||||
-- NOTE: The UDP checksum has to be validated before, because we passthrough the input to the output FIFOs before we reach the end of the UDP Packet.
|
|
||||||
|
|
||||||
-- SANITY CHECK: Check if UPD header length matches actual packet length
|
|
||||||
if (round_slv(udp_length, packet_length'length) /= std_logic_vector(packet_length)) then
|
|
||||||
-- Ignore
|
|
||||||
stage_next <= SKIP_PACKET;
|
|
||||||
else
|
|
||||||
stage_next <= RTPS_HEADER_1;
|
|
||||||
end if;
|
|
||||||
end if;
|
|
||||||
-- First RTPS Header word (Fields: Protocolld)
|
-- First RTPS Header word (Fields: Protocolld)
|
||||||
when RTPS_HEADER_1 =>
|
when RTPS_HEADER_1 =>
|
||||||
-- Input FIFO Guard
|
-- Input FIFO Guard
|
||||||
|
|||||||
30
src/rtps_out.vhd
Normal file
30
src/rtps_out.vhd
Normal file
@ -0,0 +1,30 @@
|
|||||||
|
library ieee;
|
||||||
|
use ieee.std_logic_1164.all;
|
||||||
|
use ieee.numeric_std.all;
|
||||||
|
|
||||||
|
|
||||||
|
entity rtps_out is
|
||||||
|
generic (
|
||||||
|
PIPELINE_STAGES : integer := 1;
|
||||||
|
DATA_WIDTH : integer := 16
|
||||||
|
);
|
||||||
|
port (
|
||||||
|
clk : in std_logic;
|
||||||
|
reset : in std_logic;
|
||||||
|
mode : in std_logic;
|
||||||
|
cap : in std_logic;
|
||||||
|
A : in std_logic_vector(DATA_WIDTH-1 downto 0);
|
||||||
|
B : in std_logic_vector(DATA_WIDTH-1 downto 0);
|
||||||
|
RES : out std_logic_vector(DATA_WIDTH-1 downto 0)
|
||||||
|
);
|
||||||
|
end entity;
|
||||||
|
|
||||||
|
architecture arch of rtps_out is
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
begin
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
end architecture;
|
||||||
@ -84,13 +84,13 @@ package rtps_test_package is
|
|||||||
|
|
||||||
constant DEST_LOC : DEST_LOCATOR_LIST_TYPE; -- Deferred to Package Body
|
constant DEST_LOC : DEST_LOCATOR_LIST_TYPE; -- Deferred to Package Body
|
||||||
|
|
||||||
-- *UDP HEADER*
|
-- *OUTPUT HEADER*
|
||||||
type UDP_HEADER_TYPE is record
|
type OUTPUT_HEADER_TYPE is record
|
||||||
src : LOCATOR_TYPE;
|
src : LOCATOR_TYPE;
|
||||||
dest : LOCATOR_TYPE;
|
dest : LOCATOR_TYPE;
|
||||||
end record;
|
end record;
|
||||||
|
|
||||||
constant DEFAULT_UDP_HEADER : UDP_HEADER_TYPE; -- Deferred to Package Body
|
constant DEFAULT_UDP_HEADER : OUTPUT_HEADER_TYPE; -- Deferred to Package Body
|
||||||
|
|
||||||
-- *RTPS HEADER*
|
-- *RTPS HEADER*
|
||||||
type RTPS_HEADER_TYPE is record
|
type RTPS_HEADER_TYPE is record
|
||||||
@ -206,8 +206,8 @@ package rtps_test_package is
|
|||||||
function test_memory_match (A,B : TEST_MEMORY_TYPE) return boolean;
|
function test_memory_match (A,B : TEST_MEMORY_TYPE) return boolean;
|
||||||
function to_string (input : TEST_MEMORY_TYPE) return string;
|
function to_string (input : TEST_MEMORY_TYPE) return string;
|
||||||
|
|
||||||
procedure gen_udp_header(ref : in UDP_HEADER_TYPE; output : inout TEST_PACKET_TYPE);
|
procedure gen_output_header(ref : in OUTPUT_HEADER_TYPE; output : inout TEST_PACKET_TYPE);
|
||||||
procedure fix_udp_packet(output : inout TEST_PACKET_TYPE);
|
procedure fix_output_packet(output : inout TEST_PACKET_TYPE);
|
||||||
|
|
||||||
procedure gen_rtps_header( ref : in RTPS_HEADER_TYPE; output : inout TEST_PACKET_TYPE);
|
procedure gen_rtps_header( ref : in RTPS_HEADER_TYPE; output : inout TEST_PACKET_TYPE);
|
||||||
|
|
||||||
@ -339,7 +339,7 @@ package body rtps_test_package is
|
|||||||
)
|
)
|
||||||
);
|
);
|
||||||
|
|
||||||
constant DEFAULT_UDP_HEADER : UDP_HEADER_TYPE := (
|
constant DEFAULT_UDP_HEADER : OUTPUT_HEADER_TYPE := (
|
||||||
src => EMPTY_LOCATOR,
|
src => EMPTY_LOCATOR,
|
||||||
dest => EMPTY_LOCATOR
|
dest => EMPTY_LOCATOR
|
||||||
);
|
);
|
||||||
@ -450,7 +450,7 @@ package body rtps_test_package is
|
|||||||
output.data(output.length)((BYTE_WIDTH*out_off)+BYTE_WIDTH-1 downto (BYTE_WIDTH*out_off)) := input((BYTE_WIDTH*in_off)+BYTE_WIDTH-1 downto (BYTE_WIDTH*in_off));
|
output.data(output.length)((BYTE_WIDTH*out_off)+BYTE_WIDTH-1 downto (BYTE_WIDTH*out_off)) := input((BYTE_WIDTH*in_off)+BYTE_WIDTH-1 downto (BYTE_WIDTH*in_off));
|
||||||
end procedure;
|
end procedure;
|
||||||
|
|
||||||
procedure gen_udp_header(ref : in UDP_HEADER_TYPE; output : inout TEST_PACKET_TYPE) is
|
procedure gen_output_header(ref : in OUTPUT_HEADER_TYPE; output : inout TEST_PACKET_TYPE) is
|
||||||
begin
|
begin
|
||||||
-- IPv4 Source Address
|
-- IPv4 Source Address
|
||||||
output.data(output.length) := ref.src.addr(IPv4_ADDRESS_WIDTH-1 downto 0);
|
output.data(output.length) := ref.src.addr(IPv4_ADDRESS_WIDTH-1 downto 0);
|
||||||
@ -458,25 +458,19 @@ package body rtps_test_package is
|
|||||||
-- IPv4 Destination Address
|
-- IPv4 Destination Address
|
||||||
output.data(output.length) := ref.dest.addr(IPv4_ADDRESS_WIDTH-1 downto 0);
|
output.data(output.length) := ref.dest.addr(IPv4_ADDRESS_WIDTH-1 downto 0);
|
||||||
output.length := output.length + 1;
|
output.length := output.length + 1;
|
||||||
-- Packet Length
|
|
||||||
output.data(output.length) := (others => '0');
|
|
||||||
output.length := output.length + 1;
|
|
||||||
-- Source Port & Destination Port
|
-- Source Port & Destination Port
|
||||||
output.data(output.length) := ref.src.portn(UDP_PORT_WIDTH-1 downto 0) & ref.dest.portn(UDP_PORT_WIDTH-1 downto 0);
|
output.data(output.length) := ref.src.portn(UDP_PORT_WIDTH-1 downto 0) & ref.dest.portn(UDP_PORT_WIDTH-1 downto 0);
|
||||||
output.length := output.length + 1;
|
output.length := output.length + 1;
|
||||||
-- Length & Checksum
|
-- Packet Length
|
||||||
output.data(output.length) := (others => '0');
|
output.data(output.length) := (others => '0');
|
||||||
output.length := output.length + 1;
|
output.length := output.length + 1;
|
||||||
end procedure;
|
end procedure;
|
||||||
|
|
||||||
procedure fix_udp_packet(output : inout TEST_PACKET_TYPE) is
|
procedure fix_output_packet(output : inout TEST_PACKET_TYPE) is
|
||||||
begin
|
begin
|
||||||
assert (output.length < 2**UDP_PORT_WIDTH) report "Exceeded maximum UDP Packet Size" severity error;
|
assert (output.length < 2**UDP_PORT_WIDTH) report "Exceeded maximum UDP Packet Size" severity error;
|
||||||
-- Fix Packet Length
|
-- Fix Packet Length
|
||||||
output.data(2) := int(output.length-3, WORD_WIDTH);
|
output.data(3) := int(output.length-4, WORD_WIDTH);
|
||||||
-- Fix UDP Length
|
|
||||||
output.data(4)(31 downto 16) := int((output.length-3)*4, UDP_HEADER_LENGTH_WIDTH);
|
|
||||||
-- TODO: Calculate Checksum
|
|
||||||
end procedure;
|
end procedure;
|
||||||
|
|
||||||
procedure gen_rtps_header( ref : in RTPS_HEADER_TYPE; output : inout TEST_PACKET_TYPE) is
|
procedure gen_rtps_header( ref : in RTPS_HEADER_TYPE; output : inout TEST_PACKET_TYPE) is
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user