From 4b81cf94847a087d49b66043df02199a23cd9439 Mon Sep 17 00:00:00 2001 From: Greek Date: Wed, 22 Dec 2021 15:44:19 +0100 Subject: [PATCH] Propagate LIFESPAN through ENDPOINT_MATCH_FRAME instead of inline QoS Since we disabled the 'expectsInlineQoS' Flag due to Cyclone DDS compatibility, we no longer have access to the lifespan of the remote writers. The Endpoint Match Format was changed to also send the Lifespan Duration from the rtps_builtin_endpoint. --- sim/L0_rtps_reader_test1_vbk.do | 64 +++ sim/L0_rtps_reader_test2_tbk.do | 82 ++++ src/REF.txt | 13 +- .../L0_rtps_builtin_endpoint_test3.vhd | 37 ++ .../Level_0/L0_rtps_reader_test1_vbk.vhd | 4 + .../Level_0/L0_rtps_reader_test1_vrk.vhd | 6 +- .../Level_0/L0_rtps_reader_test2_tbk.vhd | 240 ++++------ .../Level_0/L0_rtps_reader_test2_trk.vhd | 232 ++++------ .../Level_0/L0_rtps_reader_test2_vbk.vhd | 232 ++++------ .../Level_0/L0_rtps_reader_test2_vrk.vhd | 232 ++++------ .../Level_0/L0_rtps_reader_test2_vrn.vhd | 197 +++------ src/rtps_builtin_endpoint.vhd | 52 ++- src/rtps_reader.vhd | 413 ++++++++++++------ src/rtps_test_package.vhd | 53 ++- 14 files changed, 954 insertions(+), 903 deletions(-) create mode 100644 sim/L0_rtps_reader_test1_vbk.do create mode 100644 sim/L0_rtps_reader_test2_tbk.do diff --git a/sim/L0_rtps_reader_test1_vbk.do b/sim/L0_rtps_reader_test1_vbk.do new file mode 100644 index 0000000..d8fe6b7 --- /dev/null +++ b/sim/L0_rtps_reader_test1_vbk.do @@ -0,0 +1,64 @@ +onerror {resume} +quietly WaveActivateNextPane {} 0 +add wave -noupdate -divider SYSTEM +add wave -noupdate /l0_rtps_reader_test1_vbk/uut/clk +add wave -noupdate /l0_rtps_reader_test1_vbk/uut/reset +add wave -noupdate -divider INPUT +add wave -noupdate /l0_rtps_reader_test1_vbk/uut/empty_meta +add wave -noupdate /l0_rtps_reader_test1_vbk/uut/rd_meta +add wave -noupdate /l0_rtps_reader_test1_vbk/uut/last_word_in_meta +add wave -noupdate -radix hexadecimal /l0_rtps_reader_test1_vbk/uut/data_in_meta +add wave -noupdate -divider OUTPUT +add wave -noupdate /l0_rtps_reader_test1_vbk/uut/start_hc +add wave -noupdate /l0_rtps_reader_test1_vbk/uut/opcode_hc +add wave -noupdate /l0_rtps_reader_test1_vbk/uut/ack_hc +add wave -noupdate /l0_rtps_reader_test1_vbk/uut/done_hc +add wave -noupdate -radix hexadecimal /l0_rtps_reader_test1_vbk/uut/data_out_hc +add wave -noupdate -divider {MAIN FSM} +add wave -noupdate /l0_rtps_reader_test1_vbk/uut/stage +add wave -noupdate /l0_rtps_reader_test1_vbk/uut/stage_next +add wave -noupdate /l0_rtps_reader_test1_vbk/uut/cnt +add wave -noupdate -divider {MEMORY FSM} +add wave -noupdate /l0_rtps_reader_test1_vbk/uut/mem_op_done +add wave -noupdate /l0_rtps_reader_test1_vbk/uut/mem_op_start +add wave -noupdate /l0_rtps_reader_test1_vbk/uut/mem_opcode +add wave -noupdate /l0_rtps_reader_test1_vbk/uut/mem_stage +add wave -noupdate /l0_rtps_reader_test1_vbk/uut/mem_stage_next +add wave -noupdate /l0_rtps_reader_test1_vbk/uut/mem_cnt +add wave -noupdate /l0_rtps_reader_test1_vbk/uut/mem_pos +add wave -noupdate -radix unsigned /l0_rtps_reader_test1_vbk/uut/mem_addr_base +add wave -noupdate -expand -group MEM_CTRL -radix unsigned /l0_rtps_reader_test1_vbk/uut/mem_addr +add wave -noupdate -expand -group MEM_CTRL /l0_rtps_reader_test1_vbk/uut/mem_valid_in +add wave -noupdate -expand -group MEM_CTRL /l0_rtps_reader_test1_vbk/uut/mem_ready_in +add wave -noupdate -expand -group MEM_CTRL /l0_rtps_reader_test1_vbk/uut/mem_read +add wave -noupdate -expand -group MEM_CTRL -radix hexadecimal /l0_rtps_reader_test1_vbk/uut/mem_write_data +add wave -noupdate -expand -group MEM_CTRL /l0_rtps_reader_test1_vbk/uut/abort_read +add wave -noupdate -expand -group MEM_CTRL /l0_rtps_reader_test1_vbk/uut/mem_valid_out +add wave -noupdate -expand -group MEM_CTRL /l0_rtps_reader_test1_vbk/uut/mem_ready_out +add wave -noupdate -expand -group MEM_CTRL -radix hexadecimal /l0_rtps_reader_test1_vbk/uut/mem_read_data +add wave -noupdate -divider TESTBENCH +add wave -noupdate -group TESTBENCH /l0_rtps_reader_test1_vbk/start +add wave -noupdate -group TESTBENCH /l0_rtps_reader_test1_vbk/cnt_stim +add wave -noupdate -group TESTBENCH /l0_rtps_reader_test1_vbk/packet_sent +add wave -noupdate -group TESTBENCH /l0_rtps_reader_test1_vbk/mem_check_done +add wave -noupdate -group TESTBENCH /l0_rtps_reader_test1_vbk/stim_done +add wave -noupdate -group TESTBENCH /l0_rtps_reader_test1_vbk/test_done +add wave -noupdate -group TESTBENCH /l0_rtps_reader_test1_vbk/uut/idle_sig +TreeUpdate [SetDefaultTree] +WaveRestoreCursors {Begin {8325000 ps} 1} {Error {9725000 ps} 1} {Cursor {9175000 ps} 0} +quietly wave cursor active 3 +configure wave -namecolwidth 150 +configure wave -valuecolwidth 100 +configure wave -justifyvalue left +configure wave -signalnamewidth 1 +configure wave -snapdistance 10 +configure wave -datasetprefix 0 +configure wave -rowmargin 4 +configure wave -childrowmargin 2 +configure wave -gridoffset 0 +configure wave -gridperiod 1 +configure wave -griddelta 40 +configure wave -timeline 0 +configure wave -timelineunits ns +update +WaveRestoreZoom {8888200 ps} {9912200 ps} diff --git a/sim/L0_rtps_reader_test2_tbk.do b/sim/L0_rtps_reader_test2_tbk.do new file mode 100644 index 0000000..029eb14 --- /dev/null +++ b/sim/L0_rtps_reader_test2_tbk.do @@ -0,0 +1,82 @@ +onerror {resume} +quietly WaveActivateNextPane {} 0 +add wave -noupdate -divider SYSTEM +add wave -noupdate /l0_rtps_reader_test2_tbk/uut/clk +add wave -noupdate /l0_rtps_reader_test2_tbk/uut/reset +add wave -noupdate -divider INPUT +add wave -noupdate -group META /l0_rtps_reader_test2_tbk/uut/empty_meta +add wave -noupdate -group META /l0_rtps_reader_test2_tbk/uut/rd_meta +add wave -noupdate -group META /l0_rtps_reader_test2_tbk/uut/last_word_in_meta +add wave -noupdate -group META -radix hexadecimal /l0_rtps_reader_test2_tbk/uut/data_in_meta +add wave -noupdate -expand -group USER /l0_rtps_reader_test2_tbk/uut/empty_user +add wave -noupdate -expand -group USER /l0_rtps_reader_test2_tbk/uut/rd_user +add wave -noupdate -expand -group USER -radix hexadecimal /l0_rtps_reader_test2_tbk/uut/data_in_user +add wave -noupdate -expand -group USER /l0_rtps_reader_test2_tbk/uut/last_word_in_user +add wave -noupdate -divider HC +add wave -noupdate /l0_rtps_reader_test2_tbk/uut/start_hc +add wave -noupdate /l0_rtps_reader_test2_tbk/uut/opcode_hc +add wave -noupdate /l0_rtps_reader_test2_tbk/uut/ack_hc +add wave -noupdate /l0_rtps_reader_test2_tbk/uut/valid_out_hc +add wave -noupdate /l0_rtps_reader_test2_tbk/uut/ready_out_hc +add wave -noupdate -radix hexadecimal /l0_rtps_reader_test2_tbk/uut/data_out_hc +add wave -noupdate /l0_rtps_reader_test2_tbk/uut/last_word_out_hc +add wave -noupdate /l0_rtps_reader_test2_tbk/uut/done_hc +add wave -noupdate /l0_rtps_reader_test2_tbk/uut/ret_hc +add wave -noupdate -divider {MAIN FSM} +add wave -noupdate /l0_rtps_reader_test2_tbk/uut/stage +add wave -noupdate /l0_rtps_reader_test2_tbk/uut/stage_next +add wave -noupdate /l0_rtps_reader_test2_tbk/uut/cnt +add wave -noupdate -divider {MEMORY FSM} +add wave -noupdate /l0_rtps_reader_test2_tbk/uut/mem_op_done +add wave -noupdate /l0_rtps_reader_test2_tbk/uut/mem_op_start +add wave -noupdate /l0_rtps_reader_test2_tbk/uut/mem_opcode +add wave -noupdate /l0_rtps_reader_test2_tbk/uut/mem_stage +add wave -noupdate /l0_rtps_reader_test2_tbk/uut/mem_stage_next +add wave -noupdate /l0_rtps_reader_test2_tbk/uut/mem_cnt +add wave -noupdate /l0_rtps_reader_test2_tbk/uut/mem_pos +add wave -noupdate -radix unsigned /l0_rtps_reader_test2_tbk/uut/mem_addr_base +add wave -noupdate -childformat {{/l0_rtps_reader_test2_tbk/uut/mem_endpoint_data.guid -radix hexadecimal} {/l0_rtps_reader_test2_tbk/uut/mem_endpoint_data.addr -radix hexadecimal} {/l0_rtps_reader_test2_tbk/uut/mem_endpoint_data.portn -radix hexadecimal} {/l0_rtps_reader_test2_tbk/uut/mem_endpoint_data.next_seq_nr -radix unsigned -childformat {{/l0_rtps_reader_test2_tbk/uut/mem_endpoint_data.next_seq_nr(0) -radix unsigned} {/l0_rtps_reader_test2_tbk/uut/mem_endpoint_data.next_seq_nr(1) -radix unsigned}}} {/l0_rtps_reader_test2_tbk/uut/mem_endpoint_data.lease_deadline -radix hexadecimal} {/l0_rtps_reader_test2_tbk/uut/mem_endpoint_data.res_time -radix hexadecimal}} -subitemconfig {/l0_rtps_reader_test2_tbk/uut/mem_endpoint_data.guid {-height 15 -radix hexadecimal} /l0_rtps_reader_test2_tbk/uut/mem_endpoint_data.addr {-height 15 -radix hexadecimal} /l0_rtps_reader_test2_tbk/uut/mem_endpoint_data.portn {-height 15 -radix hexadecimal} /l0_rtps_reader_test2_tbk/uut/mem_endpoint_data.next_seq_nr {-height 15 -radix unsigned -childformat {{/l0_rtps_reader_test2_tbk/uut/mem_endpoint_data.next_seq_nr(0) -radix unsigned} {/l0_rtps_reader_test2_tbk/uut/mem_endpoint_data.next_seq_nr(1) -radix unsigned}}} /l0_rtps_reader_test2_tbk/uut/mem_endpoint_data.next_seq_nr(0) {-height 15 -radix unsigned} /l0_rtps_reader_test2_tbk/uut/mem_endpoint_data.next_seq_nr(1) {-height 15 -radix unsigned} /l0_rtps_reader_test2_tbk/uut/mem_endpoint_data.lease_deadline {-height 15 -radix hexadecimal} /l0_rtps_reader_test2_tbk/uut/mem_endpoint_data.res_time {-height 15 -radix hexadecimal}} /l0_rtps_reader_test2_tbk/uut/mem_endpoint_data +add wave -noupdate -group MEM_CTRL -radix unsigned /l0_rtps_reader_test2_tbk/uut/mem_addr +add wave -noupdate -group MEM_CTRL /l0_rtps_reader_test2_tbk/uut/mem_valid_in +add wave -noupdate -group MEM_CTRL /l0_rtps_reader_test2_tbk/uut/mem_ready_in +add wave -noupdate -group MEM_CTRL /l0_rtps_reader_test2_tbk/uut/mem_read +add wave -noupdate -group MEM_CTRL -radix hexadecimal /l0_rtps_reader_test2_tbk/uut/mem_write_data +add wave -noupdate -group MEM_CTRL /l0_rtps_reader_test2_tbk/uut/abort_read +add wave -noupdate -group MEM_CTRL /l0_rtps_reader_test2_tbk/uut/mem_valid_out +add wave -noupdate -group MEM_CTRL /l0_rtps_reader_test2_tbk/uut/mem_ready_out +add wave -noupdate -group MEM_CTRL -radix hexadecimal /l0_rtps_reader_test2_tbk/uut/mem_read_data +add wave -noupdate -divider TESTBENCH +add wave -noupdate -group TESTBENCH /l0_rtps_reader_test2_tbk/start_meta +add wave -noupdate -group TESTBENCH /l0_rtps_reader_test2_tbk/packet_sent_meta +add wave -noupdate -group TESTBENCH /l0_rtps_reader_test2_tbk/start_user +add wave -noupdate -group TESTBENCH /l0_rtps_reader_test2_tbk/packet_sent_user +add wave -noupdate -group TESTBENCH /l0_rtps_reader_test2_tbk/check_stage +add wave -noupdate -group TESTBENCH /l0_rtps_reader_test2_tbk/out_check_done +add wave -noupdate -group TESTBENCH /l0_rtps_reader_test2_tbk/stim_done +add wave -noupdate -group TESTBENCH /l0_rtps_reader_test2_tbk/test_done +add wave -noupdate -divider GAP +add wave -noupdate -radix unsigned /l0_rtps_reader_test2_tbk/uut/gap_start +add wave -noupdate -radix unsigned /l0_rtps_reader_test2_tbk/uut/gap_list_base +add wave -noupdate -radix unsigned /l0_rtps_reader_test2_tbk/uut/gap_list_end +add wave -noupdate /l0_rtps_reader_test2_tbk/uut/bitmap_latch +add wave -noupdate /l0_rtps_reader_test2_tbk/uut/bitmap_pos +add wave -noupdate -radix unsigned /l0_rtps_reader_test2_tbk/uut/next_seq_nr +add wave -noupdate -radix unsigned /l0_rtps_reader_test2_tbk/uut/bitmap_cnt +TreeUpdate [SetDefaultTree] +WaveRestoreCursors {Begin {49575000 ps} 1} {Error {53225000 ps} 1} {Cursor {50275000 ps} 0} +quietly wave cursor active 3 +configure wave -namecolwidth 150 +configure wave -valuecolwidth 100 +configure wave -justifyvalue left +configure wave -signalnamewidth 1 +configure wave -snapdistance 10 +configure wave -datasetprefix 0 +configure wave -rowmargin 4 +configure wave -childrowmargin 2 +configure wave -gridoffset 0 +configure wave -gridperiod 1 +configure wave -griddelta 40 +configure wave -timeline 0 +configure wave -timelineunits ns +update +WaveRestoreZoom {49779800 ps} {50803800 ps} diff --git a/src/REF.txt b/src/REF.txt index c10cff9..dd84d1e 100644 --- a/src/REF.txt +++ b/src/REF.txt @@ -269,6 +269,11 @@ ENDPOINT MATCH FRAME +-------------------------------+-------------------------------+ 06| UDP_PORT | READER_FLAGS | +-------------------------------+-------------------------------+ +07| | + + LIFESPAN_DURATION + +08| [only for Reader Endpoints] | + +-------------------------------+-------------------------------+ + READER_FLAGS ------------ @@ -358,10 +363,14 @@ READER + LEASE_DEADLINE + 09| | +---------------------------------------------------------------+ -10| | - + RES_TIME + [Reliable Only] +10| | + + LIFESPAN_DURATION + 11| | +---------------------------------------------------------------+ +12| | + + RES_TIME + [Reliable Only] +13| | + +---------------------------------------------------------------+ WRITER ------ diff --git a/src/Tests/Level_0/L0_rtps_builtin_endpoint_test3.vhd b/src/Tests/Level_0/L0_rtps_builtin_endpoint_test3.vhd index 0f8c026..2f68a28 100644 --- a/src/Tests/Level_0/L0_rtps_builtin_endpoint_test3.vhd +++ b/src/Tests/Level_0/L0_rtps_builtin_endpoint_test3.vhd @@ -238,6 +238,7 @@ begin e0.participant := p0; e0.topic_name := ENDPOINT_TOPIC(0); e0.type_name := ENDPOINT_TYPE(0); + e0.lifespan := gen_duration(3,0); Log("Initiating Test", INFO); stim_done <= '0'; @@ -790,6 +791,42 @@ begin sub_p.data := EMPTY_TEST_PACKET; p_snp := p_snp + 1; + -- *PID_LIFESPAN* + Log("Ignore Endpoint [Invalid PID_LIFESPAN]", INFO); + sub_p.writerSN := p_snp; + endpoint := e0; + endpoint.reader := FALSE; + endpoint.reliability := DEFAULT_RELIABILITY_QOS_W; + endpoint.entityId := gen_rand_entityid_2(FALSE); + gen_endpoint_data(endpoint, sub_p.data, PID_LIFESPAN, -1); + gen_sentinel(sub_p.data); + gen_rtps_handler_out(sub_p, endpoint, stimulus); + start_test; + wait_on_sent; + wait_on_mem_check; + stimulus := EMPTY_TEST_PACKET; + reference := EMPTY_TEST_PACKET; + sub_p.data := EMPTY_TEST_PACKET; + + Log("Match Endpoint [Extra Bytes in PID_LIFESPAN]", INFO); + sub_p.writerSN := p_snp; + endpoint := e0; + endpoint.reader := FALSE; + endpoint.reliability := DEFAULT_RELIABILITY_QOS_W; + endpoint.entityId := gen_rand_entityid_2(FALSE); + gen_endpoint_data(endpoint, sub_p.data, PID_LIFESPAN, +1); + gen_sentinel(sub_p.data); + gen_rtps_handler_out(sub_p, endpoint, stimulus); + wr_sig := (0 => '1', 9 => '1', 10 => '1', 15 => '1', others => '0'); + push_endpoint_reference; + start_test; + wait_on_sent; + wait_on_mem_check; + stimulus := EMPTY_TEST_PACKET; + reference := EMPTY_TEST_PACKET; + sub_p.data := EMPTY_TEST_PACKET; + p_snp := p_snp + 1; + -- *PID_LIVELINESS* Log("Ignore Endpoint [Invalid PID_LIVELINESS]", INFO); sub_p.writerSN := p_snp; diff --git a/src/Tests/Level_0/L0_rtps_reader_test1_vbk.vhd b/src/Tests/Level_0/L0_rtps_reader_test1_vbk.vhd index 3c8d1ca..0cf4ce6 100644 --- a/src/Tests/Level_0/L0_rtps_reader_test1_vbk.vhd +++ b/src/Tests/Level_0/L0_rtps_reader_test1_vbk.vhd @@ -166,18 +166,21 @@ begin e1.participant := p0; e1.entityid := RV.RandSlv(ENTITYID_WIDTH); e1.unicastLocatorList := (numLocators => int(1,CDR_LONG_WIDTH), locator => (0 => gen_rand_loc_2, others => EMPTY_LOCATOR)); + e1.lifespan := gen_duration(1,0); -- Endpoint 3 e2 := DEFAULT_ENDPOINT_DATA; e2.reader := FALSE; e2.participant := p1; e2.entityid := RV.RandSlv(ENTITYID_WIDTH); e2.unicastLocatorList := (numLocators => int(1,CDR_LONG_WIDTH), locator => (0 => gen_rand_loc_2, others => EMPTY_LOCATOR)); + e2.lifespan := gen_duration(2,0); -- Endpoint 4 e3 := DEFAULT_ENDPOINT_DATA; e3.reader := FALSE; e3.participant := p1; e3.entityid := RV.RandSlv(ENTITYID_WIDTH); e3.unicastLocatorList := (numLocators => int(1,CDR_LONG_WIDTH), locator => (0 => gen_rand_loc_2, others => EMPTY_LOCATOR)); + e3.lifespan := gen_duration(3,0); Log("Initiating Test", INFO); stim_done <= '0'; @@ -340,6 +343,7 @@ begin endpoint.nr := 0; endpoint.match := MATCH; endpoint.unicastLocatorList := (numLocators => int(1,CDR_LONG_WIDTH), locator => (0 => gen_rand_loc_2, others => EMPTY_LOCATOR)); + endpoint.lifespan := gen_duration(6,0); gen_endpoint_match_frame(endpoint, stimulus); SB_mem.Push(gen_writer_endpoint_mem_frame_b(endpoint)); start_test; diff --git a/src/Tests/Level_0/L0_rtps_reader_test1_vrk.vhd b/src/Tests/Level_0/L0_rtps_reader_test1_vrk.vhd index a0d2f6b..dd98039 100644 --- a/src/Tests/Level_0/L0_rtps_reader_test1_vrk.vhd +++ b/src/Tests/Level_0/L0_rtps_reader_test1_vrk.vhd @@ -166,18 +166,21 @@ begin e1.participant := p0; e1.entityid := RV.RandSlv(ENTITYID_WIDTH); e1.unicastLocatorList := (numLocators => int(1,CDR_LONG_WIDTH), locator => (0 => gen_rand_loc_2, others => EMPTY_LOCATOR)); + e1.lifespan := gen_duration(1,0); -- Endpoint 3 e2 := DEFAULT_ENDPOINT_DATA; e2.reader := FALSE; e2.participant := p1; e2.entityid := RV.RandSlv(ENTITYID_WIDTH); e2.unicastLocatorList := (numLocators => int(1,CDR_LONG_WIDTH), locator => (0 => gen_rand_loc_2, others => EMPTY_LOCATOR)); + e2.lifespan := gen_duration(2,0); -- Endpoint 4 e3 := DEFAULT_ENDPOINT_DATA; e3.reader := FALSE; e3.participant := p1; e3.entityid := RV.RandSlv(ENTITYID_WIDTH); e3.unicastLocatorList := (numLocators => int(1,CDR_LONG_WIDTH), locator => (0 => gen_rand_loc_2, others => EMPTY_LOCATOR)); + e3.lifespan := gen_duration(3,0); Log("Initiating Test", INFO); stim_done <= '0'; @@ -340,6 +343,7 @@ begin endpoint.nr := 0; endpoint.match := MATCH; endpoint.unicastLocatorList := (numLocators => int(1,CDR_LONG_WIDTH), locator => (0 => gen_rand_loc_2, others => EMPTY_LOCATOR)); + endpoint.lifespan := gen_duration(6,0); gen_endpoint_match_frame(endpoint, stimulus); SB_mem.Push(gen_writer_endpoint_mem_frame_a(endpoint)); start_test; @@ -348,8 +352,6 @@ begin wait_on_mem_check; -- MEMORY STATE [p1e2,p0e0,p1e3] - - stim_done <= '1'; wait_on_completion; TranscriptOpen(RESULTS_FILE, APPEND_MODE); diff --git a/src/Tests/Level_0/L0_rtps_reader_test2_tbk.vhd b/src/Tests/Level_0/L0_rtps_reader_test2_tbk.vhd index ada1b82..82bb724 100644 --- a/src/Tests/Level_0/L0_rtps_reader_test2_tbk.vhd +++ b/src/Tests/Level_0/L0_rtps_reader_test2_tbk.vhd @@ -107,7 +107,7 @@ begin variable payload : TEST_PACKET_TYPE := EMPTY_TEST_PACKET; variable sub : RTPS_SUBMESSAGE_TYPE := DEFAULT_RTPS_SUBMESSAGE; variable cc : CACHE_CHANGE_TYPE := DEFAULT_CACHE_CHANGE; - variable src_ts, life_ts : TIME_TYPE := TIME_INVALID; + variable src_ts : TIME_TYPE := TIME_INVALID; -- Wrapper to use procedure as function impure function gen_rand_loc_2 return LOCATOR_TYPE is @@ -207,7 +207,7 @@ begin SetLogEnable(INFO, TRUE); RV.InitSeed(RV'instance_name); - -- Endpoint 1 + -- Endpoint 0 e0 := DEFAULT_ENDPOINT_DATA; e0.reader := FALSE; e0.nr := 0; @@ -215,7 +215,8 @@ begin e0.entityid := RV.RandSlv(ENTITYID_WIDTH); e0.participant.guidPrefix := gen_rand_guid_prefix; e0.unicastLocatorList := (numLocators => int(1,CDR_LONG_WIDTH), locator => (0 => gen_rand_loc_2, others => EMPTY_LOCATOR)); - -- Endpoint 2 + e0.lifespan := gen_duration(2,0); + -- Endpoint 1 e1 := DEFAULT_ENDPOINT_DATA; e1.reader := FALSE; e1.nr := 1; @@ -223,7 +224,7 @@ begin e1.entityid := RV.RandSlv(ENTITYID_WIDTH); e1.participant.guidPrefix := gen_rand_guid_prefix; e1.unicastLocatorList := (numLocators => int(1,CDR_LONG_WIDTH), locator => (0 => gen_rand_loc_2, others => EMPTY_LOCATOR)); - -- Endpoint 3 + -- Endpoint 2 e2 := DEFAULT_ENDPOINT_DATA; e2.reader := FALSE; e2.nr := 2; @@ -242,7 +243,6 @@ begin reset <= '0'; src_ts := TIME_INVALID; - life_ts := TIME_INVALID; -- *GENERAL SEQUENCE NUMBER HANDLING* Log("Test General SequenceNumber Handling", INFO); @@ -281,7 +281,7 @@ begin sub.data := gen_payload; gen_rtps_handler_out(sub, get_loc(endpoint), FALSE, src_ts, endpoint.participant.guidPrefix, stimulus_user); cc := gen_cache_change(sub); - gen_add_cache_change_dds(cc, life_ts, endpoint.nr, reference); + gen_add_cache_change_dds(cc, endpoint.lifespan, endpoint.nr, reference); push_reference(TRUE); start_user_test; wait_on_user_sent; @@ -315,7 +315,7 @@ begin sub.data := gen_payload; gen_rtps_handler_out(sub, get_loc(endpoint), FALSE, src_ts, endpoint.participant.guidPrefix, stimulus_user); cc := gen_cache_change(sub); - gen_add_cache_change_dds(cc, TIME_INVALID, endpoint.nr, reference); + gen_add_cache_change_dds(cc, endpoint.lifespan, endpoint.nr, reference); push_reference(TRUE); start_user_test; wait_on_user_sent; @@ -381,7 +381,7 @@ begin sub.data := gen_payload; gen_rtps_handler_out(sub, get_loc(endpoint), FALSE, src_ts, endpoint.participant.guidPrefix, stimulus_user); cc := gen_cache_change(sub); - gen_add_cache_change_dds(cc, life_ts, endpoint.nr, reference); + gen_add_cache_change_dds(cc, TIME_INVALID, endpoint.nr, reference); push_reference(TRUE); start_user_test; wait_on_user_sent; @@ -400,7 +400,7 @@ begin sub.data := gen_payload; gen_rtps_handler_out(sub, get_loc(endpoint), FALSE, src_ts, endpoint.participant.guidPrefix, stimulus_user); cc := gen_cache_change(sub); - gen_add_cache_change_dds(cc, life_ts, endpoint.nr, reference); + gen_add_cache_change_dds(cc, TIME_INVALID, endpoint.nr, reference); push_reference(TRUE); start_user_test; wait_on_user_sent; @@ -448,7 +448,7 @@ begin sub.data := gen_payload; gen_rtps_handler_out(sub, get_loc(endpoint), FALSE, src_ts, endpoint.participant.guidPrefix, stimulus_user); cc := gen_cache_change(sub); - gen_add_cache_change_dds(cc, life_ts, endpoint.nr, reference); + gen_add_cache_change_dds(cc, TIME_INVALID, endpoint.nr, reference); push_reference(TRUE); start_user_test; wait_on_user_sent; @@ -496,7 +496,7 @@ begin sub.data := gen_payload; gen_rtps_handler_out(sub, get_loc(endpoint), FALSE, src_ts, endpoint.participant.guidPrefix, stimulus_user); cc := gen_cache_change(sub); - gen_add_cache_change_dds(cc, life_ts, endpoint.nr, reference); + gen_add_cache_change_dds(cc, TIME_INVALID, endpoint.nr, reference); push_reference(TRUE); start_user_test; wait_on_user_sent; @@ -544,7 +544,7 @@ begin sub.data := gen_payload; gen_rtps_handler_out(sub, get_loc(endpoint), FALSE, src_ts, endpoint.participant.guidPrefix, stimulus_user); cc := gen_cache_change(sub); - gen_add_cache_change_dds(cc, life_ts, endpoint.nr, reference); + gen_add_cache_change_dds(cc, TIME_INVALID, endpoint.nr, reference); push_reference(TRUE); start_user_test; wait_on_user_sent; @@ -638,7 +638,7 @@ begin sub.data := gen_payload; gen_rtps_handler_out(sub, get_loc(endpoint), FALSE, src_ts, endpoint.participant.guidPrefix, stimulus_user); cc := gen_cache_change(sub); - gen_add_cache_change_dds(cc, life_ts, endpoint.nr, reference); + gen_add_cache_change_dds(cc, TIME_INVALID, endpoint.nr, reference); push_reference(TRUE); start_user_test; wait_on_user_sent; @@ -700,7 +700,7 @@ begin sub.data := gen_payload; gen_rtps_handler_out(sub, get_loc(endpoint), FALSE, src_ts, endpoint.participant.guidPrefix, stimulus_user); cc := gen_cache_change(sub); - gen_add_cache_change_dds(cc, life_ts, endpoint.nr, reference); + gen_add_cache_change_dds(cc, TIME_INVALID, endpoint.nr, reference); push_reference(TRUE); start_user_test; wait_on_user_sent; @@ -748,7 +748,7 @@ begin sub.data := gen_payload; gen_rtps_handler_out(sub, get_loc(endpoint), FALSE, src_ts, endpoint.participant.guidPrefix, stimulus_user); cc := gen_cache_change(sub); - gen_add_cache_change_dds(cc, life_ts, endpoint.nr, reference); + gen_add_cache_change_dds(cc, TIME_INVALID, endpoint.nr, reference); push_reference(TRUE); start_user_test; wait_on_user_sent; @@ -796,7 +796,7 @@ begin sub.data := gen_payload; gen_rtps_handler_out(sub, get_loc(endpoint), FALSE, src_ts, endpoint.participant.guidPrefix, stimulus_user); cc := gen_cache_change(sub); - gen_add_cache_change_dds(cc, life_ts, endpoint.nr, reference); + gen_add_cache_change_dds(cc, TIME_INVALID, endpoint.nr, reference); push_reference(TRUE); start_user_test; wait_on_user_sent; @@ -818,7 +818,7 @@ begin sub.data := gen_payload; gen_rtps_handler_out(sub, get_loc(endpoint), FALSE, src_ts, endpoint.participant.guidPrefix, stimulus_user); cc := gen_cache_change(sub); - gen_add_cache_change_dds(cc, life_ts, endpoint.nr, reference); + gen_add_cache_change_dds(cc, TIME_INVALID, endpoint.nr, reference); push_reference(TRUE); start_user_test; wait_on_user_sent; @@ -826,9 +826,8 @@ begin stimulus_user := EMPTY_TEST_PACKET; reference := EMPTY_TEST_PACKET; - Log("Accept Endpoint 1 sent DATA [SN 11, Inline-QoS (Lifespan, Status Info, Key Hash)]", INFO); + Log("Accept Endpoint 1 sent DATA [SN 11, Inline-QoS (Status Info, Key Hash)]", INFO); src_ts := gen_duration(1,0); - life_ts := gen_duration(2,0); endpoint := e1; sub := DEFAULT_RTPS_SUBMESSAGE; sub.submessageID := SID_DATA; @@ -842,11 +841,10 @@ begin cc.kind := ALIVE_FILTERED; cc.src_timestamp := src_ts; cc.instance := gen_key_hash; - endpoint.lifespan := life_ts; gen_inline_qos(cc, endpoint, TRUE, '0', sub.inlineQos); gen_sentinel(sub.inlineQos); gen_rtps_handler_out(sub, get_loc(endpoint), FALSE, src_ts, endpoint.participant.guidPrefix, stimulus_user); - gen_add_cache_change_dds(cc, life_ts, endpoint.nr, reference); + gen_add_cache_change_dds(cc, TIME_INVALID, endpoint.nr, reference); push_reference(TRUE); start_user_test; wait_on_user_sent; @@ -854,68 +852,14 @@ begin stimulus_user := EMPTY_TEST_PACKET; reference := EMPTY_TEST_PACKET; - Log("Ignore Endpoint 1 sent DATA [SN 12, Inline-QoS (Invalid PID_LIFESPAN)]", INFO); - src_ts := gen_duration(1,100); - life_ts := gen_duration(2,100); - endpoint := e1; - sub := DEFAULT_RTPS_SUBMESSAGE; - sub.submessageID := SID_DATA; - sub.writerId := endpoint.entityid; - sub.readerId := DEFAULT_READER_ENTITYID; - sub.writerSN := gen_sn(12); - sub.flags(SUBMESSAGE_DATA_FLAG_POS) := '1'; - sub.flags(SUBMESSAGE_INLINE_QOS_FLAG_POS) := '1'; - sub.data := gen_payload; - cc := gen_cache_change(sub); - cc.kind := ALIVE_FILTERED; - cc.src_timestamp := src_ts; - cc.instance := gen_key_hash; - endpoint.lifespan := life_ts; - gen_inline_qos(cc, endpoint, TRUE, '0', sub.inlineQos, PID_LIFESPAN, -1); - gen_sentinel(sub.inlineQos); - gen_rtps_handler_out(sub, get_loc(endpoint), FALSE, src_ts, endpoint.participant.guidPrefix, stimulus_user); - start_user_test; - wait_on_user_sent; - stimulus_user := EMPTY_TEST_PACKET; - reference := EMPTY_TEST_PACKET; - - Log("Accept Endpoint 1 sent DATA [SN 12, Inline-QoS (Extra Bytes in PID_LIFESPAN)]", INFO); - src_ts := gen_duration(1,200); - life_ts := gen_duration(2,200); - endpoint := e1; - sub := DEFAULT_RTPS_SUBMESSAGE; - sub.submessageID := SID_DATA; - sub.writerId := endpoint.entityid; - sub.readerId := DEFAULT_READER_ENTITYID; - sub.writerSN := gen_sn(12); - sub.flags(SUBMESSAGE_DATA_FLAG_POS) := '1'; - sub.flags(SUBMESSAGE_INLINE_QOS_FLAG_POS) := '1'; - sub.data := gen_payload; - cc := gen_cache_change(sub); - cc.kind := ALIVE_FILTERED; - cc.src_timestamp := src_ts; - cc.instance := gen_key_hash; - endpoint.lifespan := life_ts; - gen_inline_qos(cc, endpoint, TRUE, '0', sub.inlineQos, PID_LIFESPAN, +1); - gen_sentinel(sub.inlineQos); - gen_rtps_handler_out(sub, get_loc(endpoint), FALSE, src_ts, endpoint.participant.guidPrefix, stimulus_user); - gen_add_cache_change_dds(cc, life_ts, endpoint.nr, reference); - push_reference(TRUE); - start_user_test; - wait_on_user_sent; - wait_on_out_check; - stimulus_user := EMPTY_TEST_PACKET; - reference := EMPTY_TEST_PACKET; - - Log("Ignore Endpoint 1 sent DATA [SN 13, Inline-QoS (Invalid PID_STATUS_INFO)]", INFO); + Log("Ignore Endpoint 1 sent DATA [SN 12, Inline-QoS (Invalid PID_STATUS_INFO)]", INFO); src_ts := gen_duration(1,300); - life_ts := gen_duration(2,300); endpoint := e1; sub := DEFAULT_RTPS_SUBMESSAGE; sub.submessageID := SID_DATA; sub.writerId := endpoint.entityid; sub.readerId := DEFAULT_READER_ENTITYID; - sub.writerSN := gen_sn(13); + sub.writerSN := gen_sn(12); sub.flags(SUBMESSAGE_DATA_FLAG_POS) := '1'; sub.flags(SUBMESSAGE_INLINE_QOS_FLAG_POS) := '1'; sub.data := gen_payload; @@ -923,7 +867,6 @@ begin cc.kind := ALIVE_FILTERED; cc.src_timestamp := src_ts; cc.instance := gen_key_hash; - endpoint.lifespan := life_ts; gen_inline_qos(cc, endpoint, TRUE, '0', sub.inlineQos, PID_STATUS_INFO, -1); gen_sentinel(sub.inlineQos); gen_rtps_handler_out(sub, get_loc(endpoint), FALSE, src_ts, endpoint.participant.guidPrefix, stimulus_user); @@ -932,9 +875,34 @@ begin stimulus_user := EMPTY_TEST_PACKET; reference := EMPTY_TEST_PACKET; - Log("Accept Endpoint 1 sent DATA [SN 13, Inline-QoS (Extra Bytes in PID_STATUS_INFO)]", INFO); + Log("Accept Endpoint 1 sent DATA [SN 12, Inline-QoS (Extra Bytes in PID_STATUS_INFO)]", INFO); src_ts := gen_duration(1,400); - life_ts := gen_duration(2,400); + endpoint := e1; + sub := DEFAULT_RTPS_SUBMESSAGE; + sub.submessageID := SID_DATA; + sub.writerId := endpoint.entityid; + sub.readerId := DEFAULT_READER_ENTITYID; + sub.writerSN := gen_sn(12); + sub.flags(SUBMESSAGE_DATA_FLAG_POS) := '1'; + sub.flags(SUBMESSAGE_INLINE_QOS_FLAG_POS) := '1'; + sub.data := gen_payload; + cc := gen_cache_change(sub); + cc.kind := ALIVE_FILTERED; + cc.src_timestamp := src_ts; + cc.instance := gen_key_hash; + gen_inline_qos(cc, endpoint, TRUE, '0', sub.inlineQos, PID_STATUS_INFO, +1); + gen_sentinel(sub.inlineQos); + gen_rtps_handler_out(sub, get_loc(endpoint), FALSE, src_ts, endpoint.participant.guidPrefix, stimulus_user); + gen_add_cache_change_dds(cc, TIME_INVALID, endpoint.nr, reference); + push_reference(TRUE); + start_user_test; + wait_on_user_sent; + wait_on_out_check; + stimulus_user := EMPTY_TEST_PACKET; + reference := EMPTY_TEST_PACKET; + + Log("Ignore Endpoint 1 sent DATA [SN 13, Inline-QoS (Invalid PID_KEY_HASH)]", INFO); + src_ts := gen_duration(1,500); endpoint := e1; sub := DEFAULT_RTPS_SUBMESSAGE; sub.submessageID := SID_DATA; @@ -948,35 +916,6 @@ begin cc.kind := ALIVE_FILTERED; cc.src_timestamp := src_ts; cc.instance := gen_key_hash; - endpoint.lifespan := life_ts; - gen_inline_qos(cc, endpoint, TRUE, '0', sub.inlineQos, PID_STATUS_INFO, +1); - gen_sentinel(sub.inlineQos); - gen_rtps_handler_out(sub, get_loc(endpoint), FALSE, src_ts, endpoint.participant.guidPrefix, stimulus_user); - gen_add_cache_change_dds(cc, life_ts, endpoint.nr, reference); - push_reference(TRUE); - start_user_test; - wait_on_user_sent; - wait_on_out_check; - stimulus_user := EMPTY_TEST_PACKET; - reference := EMPTY_TEST_PACKET; - - Log("Ignore Endpoint 1 sent DATA [SN 14, Inline-QoS (Invalid PID_KEY_HASH)]", INFO); - src_ts := gen_duration(1,500); - life_ts := gen_duration(2,500); - endpoint := e1; - sub := DEFAULT_RTPS_SUBMESSAGE; - sub.submessageID := SID_DATA; - sub.writerId := endpoint.entityid; - sub.readerId := DEFAULT_READER_ENTITYID; - sub.writerSN := gen_sn(14); - sub.flags(SUBMESSAGE_DATA_FLAG_POS) := '1'; - sub.flags(SUBMESSAGE_INLINE_QOS_FLAG_POS) := '1'; - sub.data := gen_payload; - cc := gen_cache_change(sub); - cc.kind := ALIVE_FILTERED; - cc.src_timestamp := src_ts; - cc.instance := gen_key_hash; - endpoint.lifespan := life_ts; gen_inline_qos(cc, endpoint, TRUE, '0', sub.inlineQos, PID_KEY_HASH, -1); gen_sentinel(sub.inlineQos); gen_rtps_handler_out(sub, get_loc(endpoint), FALSE, src_ts, endpoint.participant.guidPrefix, stimulus_user); @@ -985,15 +924,14 @@ begin stimulus_user := EMPTY_TEST_PACKET; reference := EMPTY_TEST_PACKET; - Log("Accept Endpoint 1 sent DATA [SN 14, Inline-QoS (Extra Bytes in PID_KEY_HASH)]", INFO); + Log("Accept Endpoint 1 sent DATA [SN 13, Inline-QoS (Extra Bytes in PID_KEY_HASH)]", INFO); src_ts := gen_duration(1,600); - life_ts := gen_duration(2,600); endpoint := e1; sub := DEFAULT_RTPS_SUBMESSAGE; sub.submessageID := SID_DATA; sub.writerId := endpoint.entityid; sub.readerId := DEFAULT_READER_ENTITYID; - sub.writerSN := gen_sn(14); + sub.writerSN := gen_sn(13); sub.flags(SUBMESSAGE_DATA_FLAG_POS) := '1'; sub.flags(SUBMESSAGE_INLINE_QOS_FLAG_POS) := '1'; sub.data := gen_payload; @@ -1001,11 +939,10 @@ begin cc.kind := ALIVE_FILTERED; cc.src_timestamp := src_ts; cc.instance := gen_key_hash; - endpoint.lifespan := life_ts; gen_inline_qos(cc, endpoint, TRUE, '0', sub.inlineQos, PID_KEY_HASH, +1); gen_sentinel(sub.inlineQos); gen_rtps_handler_out(sub, get_loc(endpoint), FALSE, src_ts, endpoint.participant.guidPrefix, stimulus_user); - gen_add_cache_change_dds(cc, life_ts, endpoint.nr, reference); + gen_add_cache_change_dds(cc, TIME_INVALID, endpoint.nr, reference); push_reference(TRUE); start_user_test; wait_on_user_sent; @@ -1013,15 +950,14 @@ begin stimulus_user := EMPTY_TEST_PACKET; reference := EMPTY_TEST_PACKET; - Log("Accept Endpoint 1 sent DATA [SN 15, Inline-QoS (Lifespan, Status Info, Key Hash), Little Endian]", INFO); + Log("Accept Endpoint 1 sent DATA [SN 14, Inline-QoS (Status Info, Key Hash), Little Endian]", INFO); src_ts := gen_duration(1,700); - life_ts := gen_duration(2,700); endpoint := e1; sub := DEFAULT_RTPS_SUBMESSAGE; sub.submessageID := SID_DATA; sub.writerId := endpoint.entityid; sub.readerId := DEFAULT_READER_ENTITYID; - sub.writerSN := gen_sn(15); + sub.writerSN := gen_sn(14); sub.flags(SUBMESSAGE_ENDIAN_FLAG_POS) := '1'; sub.flags(SUBMESSAGE_DATA_FLAG_POS) := '1'; sub.flags(SUBMESSAGE_INLINE_QOS_FLAG_POS) := '1'; @@ -1030,11 +966,10 @@ begin cc.kind := ALIVE_FILTERED; cc.src_timestamp := src_ts; cc.instance := gen_key_hash; - endpoint.lifespan := life_ts; gen_inline_qos(cc, endpoint, TRUE, '1', sub.inlineQos); gen_sentinel('1', sub.inlineQos); gen_rtps_handler_out(sub, get_loc(endpoint), FALSE, src_ts, endpoint.participant.guidPrefix, stimulus_user); - gen_add_cache_change_dds(cc, life_ts, endpoint.nr, reference); + gen_add_cache_change_dds(cc, TIME_INVALID, endpoint.nr, reference); push_reference(TRUE); start_user_test; wait_on_user_sent; @@ -1045,52 +980,48 @@ begin -- *NON_PAYLOAD TRAFFIC HANDLING* Log("Test Non-Payload Traffic Handling", INFO); - Log("Accept Endpoint 1 sent DATA [SN 16, No Payload, Inline-QoS (Lifespan, Status Info, Key Hash)]", INFO); + Log("Accept Endpoint 1 sent DATA [SN 15, No Payload, Inline-QoS (Status Info, Key Hash)]", INFO); src_ts := gen_duration(2,0); - life_ts := gen_duration(3,0); + endpoint := e1; + sub := DEFAULT_RTPS_SUBMESSAGE; + sub.submessageID := SID_DATA; + sub.writerId := endpoint.entityid; + sub.readerId := DEFAULT_READER_ENTITYID; + sub.writerSN := gen_sn(15); + sub.flags(SUBMESSAGE_INLINE_QOS_FLAG_POS) := '1'; + cc := gen_cache_change(sub); + cc.kind := NOT_ALIVE_DISPOSED; + cc.src_timestamp := src_ts; + cc.instance := gen_key_hash; + gen_inline_qos(cc, endpoint, TRUE, '0', sub.inlineQos); + gen_sentinel(sub.inlineQos); + gen_rtps_handler_out(sub, get_loc(endpoint), FALSE, src_ts, endpoint.participant.guidPrefix, stimulus_user); + gen_add_cache_change_dds(cc, TIME_INVALID, endpoint.nr, reference); + push_reference(TRUE); + start_user_test; + wait_on_user_sent; + wait_on_out_check; + stimulus_user := EMPTY_TEST_PACKET; + reference := EMPTY_TEST_PACKET; + + Log("Accept Endpoint 1 sent DATA [SN 16, Serialized Key, Inline-QoS (Status Info)]", INFO); + src_ts := gen_duration(2,500); endpoint := e1; sub := DEFAULT_RTPS_SUBMESSAGE; sub.submessageID := SID_DATA; sub.writerId := endpoint.entityid; sub.readerId := DEFAULT_READER_ENTITYID; sub.writerSN := gen_sn(16); - sub.flags(SUBMESSAGE_INLINE_QOS_FLAG_POS) := '1'; - cc := gen_cache_change(sub); - cc.kind := NOT_ALIVE_DISPOSED; - cc.src_timestamp := src_ts; - cc.instance := gen_key_hash; - endpoint.lifespan := life_ts; - gen_inline_qos(cc, endpoint, TRUE, '0', sub.inlineQos); - gen_sentinel(sub.inlineQos); - gen_rtps_handler_out(sub, get_loc(endpoint), FALSE, src_ts, endpoint.participant.guidPrefix, stimulus_user); - gen_add_cache_change_dds(cc, life_ts, endpoint.nr, reference); - push_reference(TRUE); - start_user_test; - wait_on_user_sent; - wait_on_out_check; - stimulus_user := EMPTY_TEST_PACKET; - reference := EMPTY_TEST_PACKET; - - Log("Accept Endpoint 1 sent DATA [SN 17, Serialized Key, Inline-QoS (Lifespan, Status Info)]", INFO); - src_ts := gen_duration(2,500); - life_ts := gen_duration(3,500); - endpoint := e1; - sub := DEFAULT_RTPS_SUBMESSAGE; - sub.submessageID := SID_DATA; - sub.writerId := endpoint.entityid; - sub.readerId := DEFAULT_READER_ENTITYID; - sub.writerSN := gen_sn(17); sub.flags(SUBMESSAGE_KEY_FLAG_POS) := '1'; sub.flags(SUBMESSAGE_INLINE_QOS_FLAG_POS) := '1'; sub.data := gen_payload; cc := gen_cache_change(sub); cc.kind := NOT_ALIVE_UNREGISTERED; cc.src_timestamp := src_ts; - endpoint.lifespan := life_ts; gen_inline_qos(cc, endpoint, TRUE, '0', sub.inlineQos); gen_sentinel(sub.inlineQos); gen_rtps_handler_out(sub, get_loc(endpoint), FALSE, src_ts, endpoint.participant.guidPrefix, stimulus_user); - gen_add_cache_change_dds(cc, life_ts, endpoint.nr, reference); + gen_add_cache_change_dds(cc, TIME_INVALID, endpoint.nr, reference); push_reference(TRUE); start_user_test; wait_on_user_sent; @@ -1098,20 +1029,18 @@ begin stimulus_user := EMPTY_TEST_PACKET; reference := EMPTY_TEST_PACKET; - Log("Ignore Endpoint 1 sent DATA [SN 18, No Payload, Inline-QoS (Lifespan, Status Info)]", INFO); + Log("Ignore Endpoint 1 sent DATA [SN 17, No Payload, Inline-QoS (Status Info)]", INFO); src_ts := gen_duration(2,600); - life_ts := gen_duration(3,600); endpoint := e1; sub := DEFAULT_RTPS_SUBMESSAGE; sub.submessageID := SID_DATA; sub.writerId := endpoint.entityid; sub.readerId := DEFAULT_READER_ENTITYID; - sub.writerSN := gen_sn(18); + sub.writerSN := gen_sn(17); sub.flags(SUBMESSAGE_INLINE_QOS_FLAG_POS) := '1'; cc := gen_cache_change(sub); cc.kind := NOT_ALIVE_DISPOSED; cc.src_timestamp := src_ts; - endpoint.lifespan := life_ts; gen_inline_qos(cc, endpoint, TRUE, '0', sub.inlineQos); gen_sentinel(sub.inlineQos); gen_rtps_handler_out(sub, get_loc(endpoint), FALSE, src_ts, endpoint.participant.guidPrefix, stimulus_user); @@ -1121,7 +1050,6 @@ begin reference := EMPTY_TEST_PACKET; src_ts := TIME_INVALID; - life_ts := TIME_INVALID; -- *HISTORY CACHE RESPONSE HANDLING* Log("Test History Cache Response Handling", INFO); @@ -1137,7 +1065,7 @@ begin sub.data := gen_payload; gen_rtps_handler_out(sub, get_loc(endpoint), FALSE, src_ts, endpoint.participant.guidPrefix, stimulus_user); cc := gen_cache_change(sub); - gen_add_cache_change_dds(cc, TIME_INVALID, endpoint.nr, reference); + gen_add_cache_change_dds(cc, endpoint.lifespan, endpoint.nr, reference); push_reference(FALSE); start_user_test; wait_on_user_sent; @@ -1156,7 +1084,7 @@ begin sub.data := gen_payload; gen_rtps_handler_out(sub, get_loc(endpoint), FALSE, src_ts, endpoint.participant.guidPrefix, stimulus_user); cc := gen_cache_change(sub); - gen_add_cache_change_dds(cc, TIME_INVALID, endpoint.nr, reference); + gen_add_cache_change_dds(cc, endpoint.lifespan, endpoint.nr, reference); push_reference(TRUE); start_user_test; wait_on_user_sent; diff --git a/src/Tests/Level_0/L0_rtps_reader_test2_trk.vhd b/src/Tests/Level_0/L0_rtps_reader_test2_trk.vhd index cc1ae27..be6ceca 100644 --- a/src/Tests/Level_0/L0_rtps_reader_test2_trk.vhd +++ b/src/Tests/Level_0/L0_rtps_reader_test2_trk.vhd @@ -107,7 +107,7 @@ begin variable payload : TEST_PACKET_TYPE := EMPTY_TEST_PACKET; variable sub : RTPS_SUBMESSAGE_TYPE := DEFAULT_RTPS_SUBMESSAGE; variable cc : CACHE_CHANGE_TYPE := DEFAULT_CACHE_CHANGE; - variable src_ts, life_ts : TIME_TYPE := TIME_INVALID; + variable src_ts : TIME_TYPE := TIME_INVALID; -- Wrapper to use procedure as function impure function gen_rand_loc_2 return LOCATOR_TYPE is @@ -215,6 +215,7 @@ begin e0.entityid := RV.RandSlv(ENTITYID_WIDTH); e0.participant.guidPrefix := gen_rand_guid_prefix; e0.unicastLocatorList := (numLocators => int(1,CDR_LONG_WIDTH), locator => (0 => gen_rand_loc_2, others => EMPTY_LOCATOR)); + e0.lifespan := gen_duration(2,0); -- Endpoint 2 e1 := DEFAULT_ENDPOINT_DATA; e1.reader := FALSE; @@ -242,7 +243,6 @@ begin reset <= '0'; src_ts := TIME_INVALID; - life_ts := TIME_INVALID; -- *GENERAL SEQUENCE NUMBER HANDLING* Log("Test General SequenceNumber Handling", INFO); @@ -281,7 +281,7 @@ begin sub.data := gen_payload; gen_rtps_handler_out(sub, get_loc(endpoint), FALSE, src_ts, endpoint.participant.guidPrefix, stimulus_user); cc := gen_cache_change(sub); - gen_add_cache_change_dds(cc, life_ts, endpoint.nr, reference); + gen_add_cache_change_dds(cc, endpoint.lifespan, endpoint.nr, reference); push_reference(TRUE); start_user_test; wait_on_user_sent; @@ -315,7 +315,7 @@ begin sub.data := gen_payload; gen_rtps_handler_out(sub, get_loc(endpoint), FALSE, src_ts, endpoint.participant.guidPrefix, stimulus_user); cc := gen_cache_change(sub); - gen_add_cache_change_dds(cc, TIME_INVALID, endpoint.nr, reference); + gen_add_cache_change_dds(cc, endpoint.lifespan, endpoint.nr, reference); push_reference(TRUE); start_user_test; wait_on_user_sent; @@ -366,7 +366,7 @@ begin sub.data := gen_payload; gen_rtps_handler_out(sub, get_loc(endpoint), FALSE, src_ts, endpoint.participant.guidPrefix, stimulus_user); cc := gen_cache_change(sub); - gen_add_cache_change_dds(cc, life_ts, endpoint.nr, reference); + gen_add_cache_change_dds(cc, TIME_INVALID, endpoint.nr, reference); push_reference(TRUE); start_user_test; wait_on_user_sent; @@ -429,7 +429,7 @@ begin sub.data := gen_payload; gen_rtps_handler_out(sub, get_loc(endpoint), FALSE, src_ts, endpoint.participant.guidPrefix, stimulus_user); cc := gen_cache_change(sub); - gen_add_cache_change_dds(cc, life_ts, endpoint.nr, reference); + gen_add_cache_change_dds(cc, TIME_INVALID, endpoint.nr, reference); push_reference(TRUE); start_user_test; wait_on_user_sent; @@ -492,7 +492,7 @@ begin sub.data := gen_payload; gen_rtps_handler_out(sub, get_loc(endpoint), FALSE, src_ts, endpoint.participant.guidPrefix, stimulus_user); cc := gen_cache_change(sub); - gen_add_cache_change_dds(cc, life_ts, endpoint.nr, reference); + gen_add_cache_change_dds(cc, TIME_INVALID, endpoint.nr, reference); push_reference(TRUE); start_user_test; wait_on_user_sent; @@ -525,7 +525,7 @@ begin sub.data := gen_payload; gen_rtps_handler_out(sub, get_loc(endpoint), FALSE, src_ts, endpoint.participant.guidPrefix, stimulus_user); cc := gen_cache_change(sub); - gen_add_cache_change_dds(cc, life_ts, endpoint.nr, reference); + gen_add_cache_change_dds(cc, TIME_INVALID, endpoint.nr, reference); push_reference(TRUE); start_user_test; wait_on_user_sent; @@ -619,7 +619,7 @@ begin sub.data := gen_payload; gen_rtps_handler_out(sub, get_loc(endpoint), FALSE, src_ts, endpoint.participant.guidPrefix, stimulus_user); cc := gen_cache_change(sub); - gen_add_cache_change_dds(cc, life_ts, endpoint.nr, reference); + gen_add_cache_change_dds(cc, TIME_INVALID, endpoint.nr, reference); push_reference(TRUE); start_user_test; wait_on_user_sent; @@ -681,7 +681,7 @@ begin sub.data := gen_payload; gen_rtps_handler_out(sub, get_loc(endpoint), FALSE, src_ts, endpoint.participant.guidPrefix, stimulus_user); cc := gen_cache_change(sub); - gen_add_cache_change_dds(cc, life_ts, endpoint.nr, reference); + gen_add_cache_change_dds(cc, TIME_INVALID, endpoint.nr, reference); push_reference(TRUE); start_user_test; wait_on_user_sent; @@ -729,7 +729,7 @@ begin sub.data := gen_payload; gen_rtps_handler_out(sub, get_loc(endpoint), FALSE, src_ts, endpoint.participant.guidPrefix, stimulus_user); cc := gen_cache_change(sub); - gen_add_cache_change_dds(cc, life_ts, endpoint.nr, reference); + gen_add_cache_change_dds(cc, TIME_INVALID, endpoint.nr, reference); push_reference(TRUE); start_user_test; wait_on_user_sent; @@ -777,7 +777,7 @@ begin sub.data := gen_payload; gen_rtps_handler_out(sub, get_loc(endpoint), FALSE, src_ts, endpoint.participant.guidPrefix, stimulus_user); cc := gen_cache_change(sub); - gen_add_cache_change_dds(cc, life_ts, endpoint.nr, reference); + gen_add_cache_change_dds(cc, TIME_INVALID, endpoint.nr, reference); push_reference(TRUE); start_user_test; wait_on_user_sent; @@ -828,7 +828,7 @@ begin sub.data := gen_payload; gen_rtps_handler_out(sub, get_loc(endpoint), FALSE, src_ts, endpoint.participant.guidPrefix, stimulus_user); cc := gen_cache_change(sub); - gen_add_cache_change_dds(cc, life_ts, endpoint.nr, reference); + gen_add_cache_change_dds(cc, TIME_INVALID, endpoint.nr, reference); push_reference(TRUE); start_user_test; wait_on_user_sent; @@ -836,9 +836,8 @@ begin stimulus_user := EMPTY_TEST_PACKET; reference := EMPTY_TEST_PACKET; - Log("Accept Endpoint 1 sent DATA [SN 11, Inline-QoS (Lifespan, Status Info, Key Hash)]", INFO); + Log("Accept Endpoint 1 sent DATA [SN 11, Inline-QoS (Status Info, Key Hash)]", INFO); src_ts := gen_duration(1,0); - life_ts := gen_duration(2,0); endpoint := e1; sub := DEFAULT_RTPS_SUBMESSAGE; sub.submessageID := SID_DATA; @@ -852,11 +851,10 @@ begin cc.kind := ALIVE_FILTERED; cc.src_timestamp := src_ts; cc.instance := gen_key_hash; - endpoint.lifespan := life_ts; gen_inline_qos(cc, endpoint, TRUE, '0', sub.inlineQos); gen_sentinel(sub.inlineQos); gen_rtps_handler_out(sub, get_loc(endpoint), FALSE, src_ts, endpoint.participant.guidPrefix, stimulus_user); - gen_add_cache_change_dds(cc, life_ts, endpoint.nr, reference); + gen_add_cache_change_dds(cc, TIME_INVALID, endpoint.nr, reference); push_reference(TRUE); start_user_test; wait_on_user_sent; @@ -864,68 +862,14 @@ begin stimulus_user := EMPTY_TEST_PACKET; reference := EMPTY_TEST_PACKET; - Log("Ignore Endpoint 1 sent DATA [SN 12, Inline-QoS (Invalid PID_LIFESPAN)]", INFO); - src_ts := gen_duration(1,100); - life_ts := gen_duration(2,100); - endpoint := e1; - sub := DEFAULT_RTPS_SUBMESSAGE; - sub.submessageID := SID_DATA; - sub.writerId := endpoint.entityid; - sub.readerId := DEFAULT_READER_ENTITYID; - sub.writerSN := gen_sn(12); - sub.flags(SUBMESSAGE_DATA_FLAG_POS) := '1'; - sub.flags(SUBMESSAGE_INLINE_QOS_FLAG_POS) := '1'; - sub.data := gen_payload; - cc := gen_cache_change(sub); - cc.kind := ALIVE_FILTERED; - cc.src_timestamp := src_ts; - cc.instance := gen_key_hash; - endpoint.lifespan := life_ts; - gen_inline_qos(cc, endpoint, TRUE, '0', sub.inlineQos, PID_LIFESPAN, -1); - gen_sentinel(sub.inlineQos); - gen_rtps_handler_out(sub, get_loc(endpoint), FALSE, src_ts, endpoint.participant.guidPrefix, stimulus_user); - start_user_test; - wait_on_user_sent; - stimulus_user := EMPTY_TEST_PACKET; - reference := EMPTY_TEST_PACKET; - - Log("Accept Endpoint 1 sent DATA [SN 12, Inline-QoS (Extra Bytes in PID_LIFESPAN)]", INFO); - src_ts := gen_duration(1,200); - life_ts := gen_duration(2,200); - endpoint := e1; - sub := DEFAULT_RTPS_SUBMESSAGE; - sub.submessageID := SID_DATA; - sub.writerId := endpoint.entityid; - sub.readerId := DEFAULT_READER_ENTITYID; - sub.writerSN := gen_sn(12); - sub.flags(SUBMESSAGE_DATA_FLAG_POS) := '1'; - sub.flags(SUBMESSAGE_INLINE_QOS_FLAG_POS) := '1'; - sub.data := gen_payload; - cc := gen_cache_change(sub); - cc.kind := ALIVE_FILTERED; - cc.src_timestamp := src_ts; - cc.instance := gen_key_hash; - endpoint.lifespan := life_ts; - gen_inline_qos(cc, endpoint, TRUE, '0', sub.inlineQos, PID_LIFESPAN, +1); - gen_sentinel(sub.inlineQos); - gen_rtps_handler_out(sub, get_loc(endpoint), FALSE, src_ts, endpoint.participant.guidPrefix, stimulus_user); - gen_add_cache_change_dds(cc, life_ts, endpoint.nr, reference); - push_reference(TRUE); - start_user_test; - wait_on_user_sent; - wait_on_out_check; - stimulus_user := EMPTY_TEST_PACKET; - reference := EMPTY_TEST_PACKET; - - Log("Ignore Endpoint 1 sent DATA [SN 13, Inline-QoS (Invalid PID_STATUS_INFO)]", INFO); + Log("Ignore Endpoint 1 sent DATA [SN 12, Inline-QoS (Invalid PID_STATUS_INFO)]", INFO); src_ts := gen_duration(1,300); - life_ts := gen_duration(2,300); endpoint := e1; sub := DEFAULT_RTPS_SUBMESSAGE; sub.submessageID := SID_DATA; sub.writerId := endpoint.entityid; sub.readerId := DEFAULT_READER_ENTITYID; - sub.writerSN := gen_sn(13); + sub.writerSN := gen_sn(12); sub.flags(SUBMESSAGE_DATA_FLAG_POS) := '1'; sub.flags(SUBMESSAGE_INLINE_QOS_FLAG_POS) := '1'; sub.data := gen_payload; @@ -933,7 +877,6 @@ begin cc.kind := ALIVE_FILTERED; cc.src_timestamp := src_ts; cc.instance := gen_key_hash; - endpoint.lifespan := life_ts; gen_inline_qos(cc, endpoint, TRUE, '0', sub.inlineQos, PID_STATUS_INFO, -1); gen_sentinel(sub.inlineQos); gen_rtps_handler_out(sub, get_loc(endpoint), FALSE, src_ts, endpoint.participant.guidPrefix, stimulus_user); @@ -942,9 +885,34 @@ begin stimulus_user := EMPTY_TEST_PACKET; reference := EMPTY_TEST_PACKET; - Log("Accept Endpoint 1 sent DATA [SN 13, Inline-QoS (Extra Bytes in PID_STATUS_INFO)]", INFO); + Log("Accept Endpoint 1 sent DATA [SN 12, Inline-QoS (Extra Bytes in PID_STATUS_INFO)]", INFO); src_ts := gen_duration(1,400); - life_ts := gen_duration(2,400); + endpoint := e1; + sub := DEFAULT_RTPS_SUBMESSAGE; + sub.submessageID := SID_DATA; + sub.writerId := endpoint.entityid; + sub.readerId := DEFAULT_READER_ENTITYID; + sub.writerSN := gen_sn(12); + sub.flags(SUBMESSAGE_DATA_FLAG_POS) := '1'; + sub.flags(SUBMESSAGE_INLINE_QOS_FLAG_POS) := '1'; + sub.data := gen_payload; + cc := gen_cache_change(sub); + cc.kind := ALIVE_FILTERED; + cc.src_timestamp := src_ts; + cc.instance := gen_key_hash; + gen_inline_qos(cc, endpoint, TRUE, '0', sub.inlineQos, PID_STATUS_INFO, +1); + gen_sentinel(sub.inlineQos); + gen_rtps_handler_out(sub, get_loc(endpoint), FALSE, src_ts, endpoint.participant.guidPrefix, stimulus_user); + gen_add_cache_change_dds(cc, TIME_INVALID, endpoint.nr, reference); + push_reference(TRUE); + start_user_test; + wait_on_user_sent; + wait_on_out_check; + stimulus_user := EMPTY_TEST_PACKET; + reference := EMPTY_TEST_PACKET; + + Log("Ignore Endpoint 1 sent DATA [SN 13, Inline-QoS (Invalid PID_KEY_HASH)]", INFO); + src_ts := gen_duration(1,500); endpoint := e1; sub := DEFAULT_RTPS_SUBMESSAGE; sub.submessageID := SID_DATA; @@ -958,35 +926,6 @@ begin cc.kind := ALIVE_FILTERED; cc.src_timestamp := src_ts; cc.instance := gen_key_hash; - endpoint.lifespan := life_ts; - gen_inline_qos(cc, endpoint, TRUE, '0', sub.inlineQos, PID_STATUS_INFO, +1); - gen_sentinel(sub.inlineQos); - gen_rtps_handler_out(sub, get_loc(endpoint), FALSE, src_ts, endpoint.participant.guidPrefix, stimulus_user); - gen_add_cache_change_dds(cc, life_ts, endpoint.nr, reference); - push_reference(TRUE); - start_user_test; - wait_on_user_sent; - wait_on_out_check; - stimulus_user := EMPTY_TEST_PACKET; - reference := EMPTY_TEST_PACKET; - - Log("Ignore Endpoint 1 sent DATA [SN 14, Inline-QoS (Invalid PID_KEY_HASH)]", INFO); - src_ts := gen_duration(1,500); - life_ts := gen_duration(2,500); - endpoint := e1; - sub := DEFAULT_RTPS_SUBMESSAGE; - sub.submessageID := SID_DATA; - sub.writerId := endpoint.entityid; - sub.readerId := DEFAULT_READER_ENTITYID; - sub.writerSN := gen_sn(14); - sub.flags(SUBMESSAGE_DATA_FLAG_POS) := '1'; - sub.flags(SUBMESSAGE_INLINE_QOS_FLAG_POS) := '1'; - sub.data := gen_payload; - cc := gen_cache_change(sub); - cc.kind := ALIVE_FILTERED; - cc.src_timestamp := src_ts; - cc.instance := gen_key_hash; - endpoint.lifespan := life_ts; gen_inline_qos(cc, endpoint, TRUE, '0', sub.inlineQos, PID_KEY_HASH, -1); gen_sentinel(sub.inlineQos); gen_rtps_handler_out(sub, get_loc(endpoint), FALSE, src_ts, endpoint.participant.guidPrefix, stimulus_user); @@ -995,15 +934,14 @@ begin stimulus_user := EMPTY_TEST_PACKET; reference := EMPTY_TEST_PACKET; - Log("Accept Endpoint 1 sent DATA [SN 14, Inline-QoS (Extra Bytes in PID_KEY_HASH)]", INFO); + Log("Accept Endpoint 1 sent DATA [SN 13, Inline-QoS (Extra Bytes in PID_KEY_HASH)]", INFO); src_ts := gen_duration(1,600); - life_ts := gen_duration(2,600); endpoint := e1; sub := DEFAULT_RTPS_SUBMESSAGE; sub.submessageID := SID_DATA; sub.writerId := endpoint.entityid; sub.readerId := DEFAULT_READER_ENTITYID; - sub.writerSN := gen_sn(14); + sub.writerSN := gen_sn(13); sub.flags(SUBMESSAGE_DATA_FLAG_POS) := '1'; sub.flags(SUBMESSAGE_INLINE_QOS_FLAG_POS) := '1'; sub.data := gen_payload; @@ -1011,11 +949,10 @@ begin cc.kind := ALIVE_FILTERED; cc.src_timestamp := src_ts; cc.instance := gen_key_hash; - endpoint.lifespan := life_ts; gen_inline_qos(cc, endpoint, TRUE, '0', sub.inlineQos, PID_KEY_HASH, +1); gen_sentinel(sub.inlineQos); gen_rtps_handler_out(sub, get_loc(endpoint), FALSE, src_ts, endpoint.participant.guidPrefix, stimulus_user); - gen_add_cache_change_dds(cc, life_ts, endpoint.nr, reference); + gen_add_cache_change_dds(cc, TIME_INVALID, endpoint.nr, reference); push_reference(TRUE); start_user_test; wait_on_user_sent; @@ -1023,15 +960,14 @@ begin stimulus_user := EMPTY_TEST_PACKET; reference := EMPTY_TEST_PACKET; - Log("Accept Endpoint 1 sent DATA [SN 15, Inline-QoS (Lifespan, Status Info, Key Hash), Little Endian]", INFO); + Log("Accept Endpoint 1 sent DATA [SN 14, Inline-QoS (Status Info, Key Hash), Little Endian]", INFO); src_ts := gen_duration(1,700); - life_ts := gen_duration(2,700); endpoint := e1; sub := DEFAULT_RTPS_SUBMESSAGE; sub.submessageID := SID_DATA; sub.writerId := endpoint.entityid; sub.readerId := DEFAULT_READER_ENTITYID; - sub.writerSN := gen_sn(15); + sub.writerSN := gen_sn(14); sub.flags(SUBMESSAGE_ENDIAN_FLAG_POS) := '1'; sub.flags(SUBMESSAGE_DATA_FLAG_POS) := '1'; sub.flags(SUBMESSAGE_INLINE_QOS_FLAG_POS) := '1'; @@ -1040,11 +976,10 @@ begin cc.kind := ALIVE_FILTERED; cc.src_timestamp := src_ts; cc.instance := gen_key_hash; - endpoint.lifespan := life_ts; gen_inline_qos(cc, endpoint, TRUE, '1', sub.inlineQos); gen_sentinel('1', sub.inlineQos); gen_rtps_handler_out(sub, get_loc(endpoint), FALSE, src_ts, endpoint.participant.guidPrefix, stimulus_user); - gen_add_cache_change_dds(cc, life_ts, endpoint.nr, reference); + gen_add_cache_change_dds(cc, TIME_INVALID, endpoint.nr, reference); push_reference(TRUE); start_user_test; wait_on_user_sent; @@ -1055,52 +990,48 @@ begin -- *NON_PAYLOAD TRAFFIC HANDLING* Log("Test Non-Payload Traffic Handling", INFO); - Log("Accept Endpoint 1 sent DATA [SN 16, No Payload, Inline-QoS (Lifespan, Status Info, Key Hash)]", INFO); + Log("Accept Endpoint 1 sent DATA [SN 15, No Payload, Inline-QoS (Status Info, Key Hash)]", INFO); src_ts := gen_duration(2,0); - life_ts := gen_duration(3,0); + endpoint := e1; + sub := DEFAULT_RTPS_SUBMESSAGE; + sub.submessageID := SID_DATA; + sub.writerId := endpoint.entityid; + sub.readerId := DEFAULT_READER_ENTITYID; + sub.writerSN := gen_sn(15); + sub.flags(SUBMESSAGE_INLINE_QOS_FLAG_POS) := '1'; + cc := gen_cache_change(sub); + cc.kind := NOT_ALIVE_DISPOSED; + cc.src_timestamp := src_ts; + cc.instance := gen_key_hash; + gen_inline_qos(cc, endpoint, TRUE, '0', sub.inlineQos); + gen_sentinel(sub.inlineQos); + gen_rtps_handler_out(sub, get_loc(endpoint), FALSE, src_ts, endpoint.participant.guidPrefix, stimulus_user); + gen_add_cache_change_dds(cc, TIME_INVALID, endpoint.nr, reference); + push_reference(TRUE); + start_user_test; + wait_on_user_sent; + wait_on_out_check; + stimulus_user := EMPTY_TEST_PACKET; + reference := EMPTY_TEST_PACKET; + + Log("Accept Endpoint 1 sent DATA [SN 16, Serialized Key, Inline-QoS (Status Info)]", INFO); + src_ts := gen_duration(2,500); endpoint := e1; sub := DEFAULT_RTPS_SUBMESSAGE; sub.submessageID := SID_DATA; sub.writerId := endpoint.entityid; sub.readerId := DEFAULT_READER_ENTITYID; sub.writerSN := gen_sn(16); - sub.flags(SUBMESSAGE_INLINE_QOS_FLAG_POS) := '1'; - cc := gen_cache_change(sub); - cc.kind := NOT_ALIVE_DISPOSED; - cc.src_timestamp := src_ts; - cc.instance := gen_key_hash; - endpoint.lifespan := life_ts; - gen_inline_qos(cc, endpoint, TRUE, '0', sub.inlineQos); - gen_sentinel(sub.inlineQos); - gen_rtps_handler_out(sub, get_loc(endpoint), FALSE, src_ts, endpoint.participant.guidPrefix, stimulus_user); - gen_add_cache_change_dds(cc, life_ts, endpoint.nr, reference); - push_reference(TRUE); - start_user_test; - wait_on_user_sent; - wait_on_out_check; - stimulus_user := EMPTY_TEST_PACKET; - reference := EMPTY_TEST_PACKET; - - Log("Accept Endpoint 1 sent DATA [SN 17, Serialized Key, Inline-QoS (Lifespan, Status Info)]", INFO); - src_ts := gen_duration(2,500); - life_ts := gen_duration(3,500); - endpoint := e1; - sub := DEFAULT_RTPS_SUBMESSAGE; - sub.submessageID := SID_DATA; - sub.writerId := endpoint.entityid; - sub.readerId := DEFAULT_READER_ENTITYID; - sub.writerSN := gen_sn(17); sub.flags(SUBMESSAGE_KEY_FLAG_POS) := '1'; sub.flags(SUBMESSAGE_INLINE_QOS_FLAG_POS) := '1'; sub.data := gen_payload; cc := gen_cache_change(sub); cc.kind := NOT_ALIVE_UNREGISTERED; cc.src_timestamp := src_ts; - endpoint.lifespan := life_ts; gen_inline_qos(cc, endpoint, TRUE, '0', sub.inlineQos); gen_sentinel(sub.inlineQos); gen_rtps_handler_out(sub, get_loc(endpoint), FALSE, src_ts, endpoint.participant.guidPrefix, stimulus_user); - gen_add_cache_change_dds(cc, life_ts, endpoint.nr, reference); + gen_add_cache_change_dds(cc, TIME_INVALID, endpoint.nr, reference); push_reference(TRUE); start_user_test; wait_on_user_sent; @@ -1108,20 +1039,18 @@ begin stimulus_user := EMPTY_TEST_PACKET; reference := EMPTY_TEST_PACKET; - Log("Ignore Endpoint 1 sent DATA [SN 18, No Payload, Inline-QoS (Lifespan, Status Info)]", INFO); + Log("Ignore Endpoint 1 sent DATA [SN 17, No Payload, Inline-QoS (Status Info)]", INFO); src_ts := gen_duration(2,600); - life_ts := gen_duration(3,600); endpoint := e1; sub := DEFAULT_RTPS_SUBMESSAGE; sub.submessageID := SID_DATA; sub.writerId := endpoint.entityid; sub.readerId := DEFAULT_READER_ENTITYID; - sub.writerSN := gen_sn(18); + sub.writerSN := gen_sn(17); sub.flags(SUBMESSAGE_INLINE_QOS_FLAG_POS) := '1'; cc := gen_cache_change(sub); cc.kind := NOT_ALIVE_DISPOSED; cc.src_timestamp := src_ts; - endpoint.lifespan := life_ts; gen_inline_qos(cc, endpoint, TRUE, '0', sub.inlineQos); gen_sentinel(sub.inlineQos); gen_rtps_handler_out(sub, get_loc(endpoint), FALSE, src_ts, endpoint.participant.guidPrefix, stimulus_user); @@ -1131,7 +1060,6 @@ begin reference := EMPTY_TEST_PACKET; src_ts := TIME_INVALID; - life_ts := TIME_INVALID; -- *HISTORY CACHE RESPONSE HANDLING* Log("Test History Cache Response Handling", INFO); @@ -1147,7 +1075,7 @@ begin sub.data := gen_payload; gen_rtps_handler_out(sub, get_loc(endpoint), FALSE, src_ts, endpoint.participant.guidPrefix, stimulus_user); cc := gen_cache_change(sub); - gen_add_cache_change_dds(cc, TIME_INVALID, endpoint.nr, reference); + gen_add_cache_change_dds(cc, endpoint.lifespan, endpoint.nr, reference); push_reference(FALSE); start_user_test; wait_on_user_sent; @@ -1166,7 +1094,7 @@ begin sub.data := gen_payload; gen_rtps_handler_out(sub, get_loc(endpoint), FALSE, src_ts, endpoint.participant.guidPrefix, stimulus_user); cc := gen_cache_change(sub); - gen_add_cache_change_dds(cc, TIME_INVALID, endpoint.nr, reference); + gen_add_cache_change_dds(cc, endpoint.lifespan, endpoint.nr, reference); push_reference(TRUE); start_user_test; wait_on_user_sent; diff --git a/src/Tests/Level_0/L0_rtps_reader_test2_vbk.vhd b/src/Tests/Level_0/L0_rtps_reader_test2_vbk.vhd index 17466f8..07aaafd 100644 --- a/src/Tests/Level_0/L0_rtps_reader_test2_vbk.vhd +++ b/src/Tests/Level_0/L0_rtps_reader_test2_vbk.vhd @@ -107,7 +107,7 @@ begin variable payload : TEST_PACKET_TYPE := EMPTY_TEST_PACKET; variable sub : RTPS_SUBMESSAGE_TYPE := DEFAULT_RTPS_SUBMESSAGE; variable cc : CACHE_CHANGE_TYPE := DEFAULT_CACHE_CHANGE; - variable src_ts, life_ts : TIME_TYPE := TIME_INVALID; + variable src_ts : TIME_TYPE := TIME_INVALID; -- Wrapper to use procedure as function impure function gen_rand_loc_2 return LOCATOR_TYPE is @@ -215,6 +215,7 @@ begin e0.entityid := RV.RandSlv(ENTITYID_WIDTH); e0.participant.guidPrefix := gen_rand_guid_prefix; e0.unicastLocatorList := (numLocators => int(1,CDR_LONG_WIDTH), locator => (0 => gen_rand_loc_2, others => EMPTY_LOCATOR)); + e0.lifespan := gen_duration(2,0); -- Endpoint 2 e1 := DEFAULT_ENDPOINT_DATA; e1.reader := FALSE; @@ -242,7 +243,6 @@ begin reset <= '0'; src_ts := TIME_INVALID; - life_ts := TIME_INVALID; -- *GENERAL SEQUENCE NUMBER HANDLING* Log("Test General SequenceNumber Handling", INFO); @@ -281,7 +281,7 @@ begin sub.data := gen_payload; gen_rtps_handler_out(sub, get_loc(endpoint), FALSE, src_ts, endpoint.participant.guidPrefix, stimulus_user); cc := gen_cache_change(sub); - gen_add_cache_change_dds(cc, life_ts, endpoint.nr, reference); + gen_add_cache_change_dds(cc, endpoint.lifespan, endpoint.nr, reference); push_reference(TRUE); start_user_test; wait_on_user_sent; @@ -315,7 +315,7 @@ begin sub.data := gen_payload; gen_rtps_handler_out(sub, get_loc(endpoint), FALSE, src_ts, endpoint.participant.guidPrefix, stimulus_user); cc := gen_cache_change(sub); - gen_add_cache_change_dds(cc, TIME_INVALID, endpoint.nr, reference); + gen_add_cache_change_dds(cc, endpoint.lifespan, endpoint.nr, reference); push_reference(TRUE); start_user_test; wait_on_user_sent; @@ -381,7 +381,7 @@ begin sub.data := gen_payload; gen_rtps_handler_out(sub, get_loc(endpoint), FALSE, src_ts, endpoint.participant.guidPrefix, stimulus_user); cc := gen_cache_change(sub); - gen_add_cache_change_dds(cc, life_ts, endpoint.nr, reference); + gen_add_cache_change_dds(cc, TIME_INVALID, endpoint.nr, reference); push_reference(TRUE); start_user_test; wait_on_user_sent; @@ -429,7 +429,7 @@ begin sub.data := gen_payload; gen_rtps_handler_out(sub, get_loc(endpoint), FALSE, src_ts, endpoint.participant.guidPrefix, stimulus_user); cc := gen_cache_change(sub); - gen_add_cache_change_dds(cc, life_ts, endpoint.nr, reference); + gen_add_cache_change_dds(cc, TIME_INVALID, endpoint.nr, reference); push_reference(TRUE); start_user_test; wait_on_user_sent; @@ -477,7 +477,7 @@ begin sub.data := gen_payload; gen_rtps_handler_out(sub, get_loc(endpoint), FALSE, src_ts, endpoint.participant.guidPrefix, stimulus_user); cc := gen_cache_change(sub); - gen_add_cache_change_dds(cc, life_ts, endpoint.nr, reference); + gen_add_cache_change_dds(cc, TIME_INVALID, endpoint.nr, reference); push_reference(TRUE); start_user_test; wait_on_user_sent; @@ -525,7 +525,7 @@ begin sub.data := gen_payload; gen_rtps_handler_out(sub, get_loc(endpoint), FALSE, src_ts, endpoint.participant.guidPrefix, stimulus_user); cc := gen_cache_change(sub); - gen_add_cache_change_dds(cc, life_ts, endpoint.nr, reference); + gen_add_cache_change_dds(cc, TIME_INVALID, endpoint.nr, reference); push_reference(TRUE); start_user_test; wait_on_user_sent; @@ -619,7 +619,7 @@ begin sub.data := gen_payload; gen_rtps_handler_out(sub, get_loc(endpoint), FALSE, src_ts, endpoint.participant.guidPrefix, stimulus_user); cc := gen_cache_change(sub); - gen_add_cache_change_dds(cc, life_ts, endpoint.nr, reference); + gen_add_cache_change_dds(cc, TIME_INVALID, endpoint.nr, reference); push_reference(TRUE); start_user_test; wait_on_user_sent; @@ -681,7 +681,7 @@ begin sub.data := gen_payload; gen_rtps_handler_out(sub, get_loc(endpoint), FALSE, src_ts, endpoint.participant.guidPrefix, stimulus_user); cc := gen_cache_change(sub); - gen_add_cache_change_dds(cc, life_ts, endpoint.nr, reference); + gen_add_cache_change_dds(cc, TIME_INVALID, endpoint.nr, reference); push_reference(TRUE); start_user_test; wait_on_user_sent; @@ -729,7 +729,7 @@ begin sub.data := gen_payload; gen_rtps_handler_out(sub, get_loc(endpoint), FALSE, src_ts, endpoint.participant.guidPrefix, stimulus_user); cc := gen_cache_change(sub); - gen_add_cache_change_dds(cc, life_ts, endpoint.nr, reference); + gen_add_cache_change_dds(cc, TIME_INVALID, endpoint.nr, reference); push_reference(TRUE); start_user_test; wait_on_user_sent; @@ -777,7 +777,7 @@ begin sub.data := gen_payload; gen_rtps_handler_out(sub, get_loc(endpoint), FALSE, src_ts, endpoint.participant.guidPrefix, stimulus_user); cc := gen_cache_change(sub); - gen_add_cache_change_dds(cc, life_ts, endpoint.nr, reference); + gen_add_cache_change_dds(cc, TIME_INVALID, endpoint.nr, reference); push_reference(TRUE); start_user_test; wait_on_user_sent; @@ -799,7 +799,7 @@ begin sub.data := gen_payload; gen_rtps_handler_out(sub, get_loc(endpoint), FALSE, src_ts, endpoint.participant.guidPrefix, stimulus_user); cc := gen_cache_change(sub); - gen_add_cache_change_dds(cc, life_ts, endpoint.nr, reference); + gen_add_cache_change_dds(cc, TIME_INVALID, endpoint.nr, reference); push_reference(TRUE); start_user_test; wait_on_user_sent; @@ -807,9 +807,8 @@ begin stimulus_user := EMPTY_TEST_PACKET; reference := EMPTY_TEST_PACKET; - Log("Accept Endpoint 1 sent DATA [SN 11, Inline-QoS (Lifespan, Status Info, Key Hash)]", INFO); + Log("Accept Endpoint 1 sent DATA [SN 11, Inline-QoS (Status Info, Key Hash)]", INFO); src_ts := gen_duration(1,0); - life_ts := gen_duration(2,0); endpoint := e1; sub := DEFAULT_RTPS_SUBMESSAGE; sub.submessageID := SID_DATA; @@ -823,11 +822,10 @@ begin cc.kind := ALIVE_FILTERED; cc.src_timestamp := src_ts; cc.instance := gen_key_hash; - endpoint.lifespan := life_ts; gen_inline_qos(cc, endpoint, TRUE, '0', sub.inlineQos); gen_sentinel(sub.inlineQos); gen_rtps_handler_out(sub, get_loc(endpoint), FALSE, src_ts, endpoint.participant.guidPrefix, stimulus_user); - gen_add_cache_change_dds(cc, life_ts, endpoint.nr, reference); + gen_add_cache_change_dds(cc, TIME_INVALID, endpoint.nr, reference); push_reference(TRUE); start_user_test; wait_on_user_sent; @@ -835,68 +833,14 @@ begin stimulus_user := EMPTY_TEST_PACKET; reference := EMPTY_TEST_PACKET; - Log("Ignore Endpoint 1 sent DATA [SN 12, Inline-QoS (Invalid PID_LIFESPAN)]", INFO); - src_ts := gen_duration(1,100); - life_ts := gen_duration(2,100); - endpoint := e1; - sub := DEFAULT_RTPS_SUBMESSAGE; - sub.submessageID := SID_DATA; - sub.writerId := endpoint.entityid; - sub.readerId := DEFAULT_READER_ENTITYID; - sub.writerSN := gen_sn(12); - sub.flags(SUBMESSAGE_DATA_FLAG_POS) := '1'; - sub.flags(SUBMESSAGE_INLINE_QOS_FLAG_POS) := '1'; - sub.data := gen_payload; - cc := gen_cache_change(sub); - cc.kind := ALIVE_FILTERED; - cc.src_timestamp := src_ts; - cc.instance := gen_key_hash; - endpoint.lifespan := life_ts; - gen_inline_qos(cc, endpoint, TRUE, '0', sub.inlineQos, PID_LIFESPAN, -1); - gen_sentinel(sub.inlineQos); - gen_rtps_handler_out(sub, get_loc(endpoint), FALSE, src_ts, endpoint.participant.guidPrefix, stimulus_user); - start_user_test; - wait_on_user_sent; - stimulus_user := EMPTY_TEST_PACKET; - reference := EMPTY_TEST_PACKET; - - Log("Accept Endpoint 1 sent DATA [SN 12, Inline-QoS (Extra Bytes in PID_LIFESPAN)]", INFO); - src_ts := gen_duration(1,200); - life_ts := gen_duration(2,200); - endpoint := e1; - sub := DEFAULT_RTPS_SUBMESSAGE; - sub.submessageID := SID_DATA; - sub.writerId := endpoint.entityid; - sub.readerId := DEFAULT_READER_ENTITYID; - sub.writerSN := gen_sn(12); - sub.flags(SUBMESSAGE_DATA_FLAG_POS) := '1'; - sub.flags(SUBMESSAGE_INLINE_QOS_FLAG_POS) := '1'; - sub.data := gen_payload; - cc := gen_cache_change(sub); - cc.kind := ALIVE_FILTERED; - cc.src_timestamp := src_ts; - cc.instance := gen_key_hash; - endpoint.lifespan := life_ts; - gen_inline_qos(cc, endpoint, TRUE, '0', sub.inlineQos, PID_LIFESPAN, +1); - gen_sentinel(sub.inlineQos); - gen_rtps_handler_out(sub, get_loc(endpoint), FALSE, src_ts, endpoint.participant.guidPrefix, stimulus_user); - gen_add_cache_change_dds(cc, life_ts, endpoint.nr, reference); - push_reference(TRUE); - start_user_test; - wait_on_user_sent; - wait_on_out_check; - stimulus_user := EMPTY_TEST_PACKET; - reference := EMPTY_TEST_PACKET; - - Log("Ignore Endpoint 1 sent DATA [SN 13, Inline-QoS (Invalid PID_STATUS_INFO)]", INFO); + Log("Ignore Endpoint 1 sent DATA [SN 12, Inline-QoS (Invalid PID_STATUS_INFO)]", INFO); src_ts := gen_duration(1,300); - life_ts := gen_duration(2,300); endpoint := e1; sub := DEFAULT_RTPS_SUBMESSAGE; sub.submessageID := SID_DATA; sub.writerId := endpoint.entityid; sub.readerId := DEFAULT_READER_ENTITYID; - sub.writerSN := gen_sn(13); + sub.writerSN := gen_sn(12); sub.flags(SUBMESSAGE_DATA_FLAG_POS) := '1'; sub.flags(SUBMESSAGE_INLINE_QOS_FLAG_POS) := '1'; sub.data := gen_payload; @@ -904,7 +848,6 @@ begin cc.kind := ALIVE_FILTERED; cc.src_timestamp := src_ts; cc.instance := gen_key_hash; - endpoint.lifespan := life_ts; gen_inline_qos(cc, endpoint, TRUE, '0', sub.inlineQos, PID_STATUS_INFO, -1); gen_sentinel(sub.inlineQos); gen_rtps_handler_out(sub, get_loc(endpoint), FALSE, src_ts, endpoint.participant.guidPrefix, stimulus_user); @@ -913,9 +856,34 @@ begin stimulus_user := EMPTY_TEST_PACKET; reference := EMPTY_TEST_PACKET; - Log("Accept Endpoint 1 sent DATA [SN 13, Inline-QoS (Extra Bytes in PID_STATUS_INFO)]", INFO); + Log("Accept Endpoint 1 sent DATA [SN 12, Inline-QoS (Extra Bytes in PID_STATUS_INFO)]", INFO); src_ts := gen_duration(1,400); - life_ts := gen_duration(2,400); + endpoint := e1; + sub := DEFAULT_RTPS_SUBMESSAGE; + sub.submessageID := SID_DATA; + sub.writerId := endpoint.entityid; + sub.readerId := DEFAULT_READER_ENTITYID; + sub.writerSN := gen_sn(12); + sub.flags(SUBMESSAGE_DATA_FLAG_POS) := '1'; + sub.flags(SUBMESSAGE_INLINE_QOS_FLAG_POS) := '1'; + sub.data := gen_payload; + cc := gen_cache_change(sub); + cc.kind := ALIVE_FILTERED; + cc.src_timestamp := src_ts; + cc.instance := gen_key_hash; + gen_inline_qos(cc, endpoint, TRUE, '0', sub.inlineQos, PID_STATUS_INFO, +1); + gen_sentinel(sub.inlineQos); + gen_rtps_handler_out(sub, get_loc(endpoint), FALSE, src_ts, endpoint.participant.guidPrefix, stimulus_user); + gen_add_cache_change_dds(cc, TIME_INVALID, endpoint.nr, reference); + push_reference(TRUE); + start_user_test; + wait_on_user_sent; + wait_on_out_check; + stimulus_user := EMPTY_TEST_PACKET; + reference := EMPTY_TEST_PACKET; + + Log("Ignore Endpoint 1 sent DATA [SN 13, Inline-QoS (Invalid PID_KEY_HASH)]", INFO); + src_ts := gen_duration(1,500); endpoint := e1; sub := DEFAULT_RTPS_SUBMESSAGE; sub.submessageID := SID_DATA; @@ -929,35 +897,6 @@ begin cc.kind := ALIVE_FILTERED; cc.src_timestamp := src_ts; cc.instance := gen_key_hash; - endpoint.lifespan := life_ts; - gen_inline_qos(cc, endpoint, TRUE, '0', sub.inlineQos, PID_STATUS_INFO, +1); - gen_sentinel(sub.inlineQos); - gen_rtps_handler_out(sub, get_loc(endpoint), FALSE, src_ts, endpoint.participant.guidPrefix, stimulus_user); - gen_add_cache_change_dds(cc, life_ts, endpoint.nr, reference); - push_reference(TRUE); - start_user_test; - wait_on_user_sent; - wait_on_out_check; - stimulus_user := EMPTY_TEST_PACKET; - reference := EMPTY_TEST_PACKET; - - Log("Ignore Endpoint 1 sent DATA [SN 14, Inline-QoS (Invalid PID_KEY_HASH)]", INFO); - src_ts := gen_duration(1,500); - life_ts := gen_duration(2,500); - endpoint := e1; - sub := DEFAULT_RTPS_SUBMESSAGE; - sub.submessageID := SID_DATA; - sub.writerId := endpoint.entityid; - sub.readerId := DEFAULT_READER_ENTITYID; - sub.writerSN := gen_sn(14); - sub.flags(SUBMESSAGE_DATA_FLAG_POS) := '1'; - sub.flags(SUBMESSAGE_INLINE_QOS_FLAG_POS) := '1'; - sub.data := gen_payload; - cc := gen_cache_change(sub); - cc.kind := ALIVE_FILTERED; - cc.src_timestamp := src_ts; - cc.instance := gen_key_hash; - endpoint.lifespan := life_ts; gen_inline_qos(cc, endpoint, TRUE, '0', sub.inlineQos, PID_KEY_HASH, -1); gen_sentinel(sub.inlineQos); gen_rtps_handler_out(sub, get_loc(endpoint), FALSE, src_ts, endpoint.participant.guidPrefix, stimulus_user); @@ -966,15 +905,14 @@ begin stimulus_user := EMPTY_TEST_PACKET; reference := EMPTY_TEST_PACKET; - Log("Accept Endpoint 1 sent DATA [SN 14, Inline-QoS (Extra Bytes in PID_KEY_HASH)]", INFO); + Log("Accept Endpoint 1 sent DATA [SN 13, Inline-QoS (Extra Bytes in PID_KEY_HASH)]", INFO); src_ts := gen_duration(1,600); - life_ts := gen_duration(2,600); endpoint := e1; sub := DEFAULT_RTPS_SUBMESSAGE; sub.submessageID := SID_DATA; sub.writerId := endpoint.entityid; sub.readerId := DEFAULT_READER_ENTITYID; - sub.writerSN := gen_sn(14); + sub.writerSN := gen_sn(13); sub.flags(SUBMESSAGE_DATA_FLAG_POS) := '1'; sub.flags(SUBMESSAGE_INLINE_QOS_FLAG_POS) := '1'; sub.data := gen_payload; @@ -982,11 +920,10 @@ begin cc.kind := ALIVE_FILTERED; cc.src_timestamp := src_ts; cc.instance := gen_key_hash; - endpoint.lifespan := life_ts; gen_inline_qos(cc, endpoint, TRUE, '0', sub.inlineQos, PID_KEY_HASH, +1); gen_sentinel(sub.inlineQos); gen_rtps_handler_out(sub, get_loc(endpoint), FALSE, src_ts, endpoint.participant.guidPrefix, stimulus_user); - gen_add_cache_change_dds(cc, life_ts, endpoint.nr, reference); + gen_add_cache_change_dds(cc, TIME_INVALID, endpoint.nr, reference); push_reference(TRUE); start_user_test; wait_on_user_sent; @@ -994,15 +931,14 @@ begin stimulus_user := EMPTY_TEST_PACKET; reference := EMPTY_TEST_PACKET; - Log("Accept Endpoint 1 sent DATA [SN 15, Inline-QoS (Lifespan, Status Info, Key Hash), Little Endian]", INFO); + Log("Accept Endpoint 1 sent DATA [SN 14, Inline-QoS (Status Info, Key Hash), Little Endian]", INFO); src_ts := gen_duration(1,700); - life_ts := gen_duration(2,700); endpoint := e1; sub := DEFAULT_RTPS_SUBMESSAGE; sub.submessageID := SID_DATA; sub.writerId := endpoint.entityid; sub.readerId := DEFAULT_READER_ENTITYID; - sub.writerSN := gen_sn(15); + sub.writerSN := gen_sn(14); sub.flags(SUBMESSAGE_ENDIAN_FLAG_POS) := '1'; sub.flags(SUBMESSAGE_DATA_FLAG_POS) := '1'; sub.flags(SUBMESSAGE_INLINE_QOS_FLAG_POS) := '1'; @@ -1011,11 +947,10 @@ begin cc.kind := ALIVE_FILTERED; cc.src_timestamp := src_ts; cc.instance := gen_key_hash; - endpoint.lifespan := life_ts; gen_inline_qos(cc, endpoint, TRUE, '1', sub.inlineQos); gen_sentinel('1', sub.inlineQos); gen_rtps_handler_out(sub, get_loc(endpoint), FALSE, src_ts, endpoint.participant.guidPrefix, stimulus_user); - gen_add_cache_change_dds(cc, life_ts, endpoint.nr, reference); + gen_add_cache_change_dds(cc, TIME_INVALID, endpoint.nr, reference); push_reference(TRUE); start_user_test; wait_on_user_sent; @@ -1026,52 +961,48 @@ begin -- *NON_PAYLOAD TRAFFIC HANDLING* Log("Test Non-Payload Traffic Handling", INFO); - Log("Accept Endpoint 1 sent DATA [SN 16, No Payload, Inline-QoS (Lifespan, Status Info, Key Hash)]", INFO); + Log("Accept Endpoint 1 sent DATA [SN 15, No Payload, Inline-QoS (Status Info, Key Hash)]", INFO); src_ts := gen_duration(2,0); - life_ts := gen_duration(3,0); + endpoint := e1; + sub := DEFAULT_RTPS_SUBMESSAGE; + sub.submessageID := SID_DATA; + sub.writerId := endpoint.entityid; + sub.readerId := DEFAULT_READER_ENTITYID; + sub.writerSN := gen_sn(15); + sub.flags(SUBMESSAGE_INLINE_QOS_FLAG_POS) := '1'; + cc := gen_cache_change(sub); + cc.kind := NOT_ALIVE_DISPOSED; + cc.src_timestamp := src_ts; + cc.instance := gen_key_hash; + gen_inline_qos(cc, endpoint, TRUE, '0', sub.inlineQos); + gen_sentinel(sub.inlineQos); + gen_rtps_handler_out(sub, get_loc(endpoint), FALSE, src_ts, endpoint.participant.guidPrefix, stimulus_user); + gen_add_cache_change_dds(cc, TIME_INVALID, endpoint.nr, reference); + push_reference(TRUE); + start_user_test; + wait_on_user_sent; + wait_on_out_check; + stimulus_user := EMPTY_TEST_PACKET; + reference := EMPTY_TEST_PACKET; + + Log("Accept Endpoint 1 sent DATA [SN 16, Serialized Key, Inline-QoS (Status Info)]", INFO); + src_ts := gen_duration(2,500); endpoint := e1; sub := DEFAULT_RTPS_SUBMESSAGE; sub.submessageID := SID_DATA; sub.writerId := endpoint.entityid; sub.readerId := DEFAULT_READER_ENTITYID; sub.writerSN := gen_sn(16); - sub.flags(SUBMESSAGE_INLINE_QOS_FLAG_POS) := '1'; - cc := gen_cache_change(sub); - cc.kind := NOT_ALIVE_DISPOSED; - cc.src_timestamp := src_ts; - cc.instance := gen_key_hash; - endpoint.lifespan := life_ts; - gen_inline_qos(cc, endpoint, TRUE, '0', sub.inlineQos); - gen_sentinel(sub.inlineQos); - gen_rtps_handler_out(sub, get_loc(endpoint), FALSE, src_ts, endpoint.participant.guidPrefix, stimulus_user); - gen_add_cache_change_dds(cc, life_ts, endpoint.nr, reference); - push_reference(TRUE); - start_user_test; - wait_on_user_sent; - wait_on_out_check; - stimulus_user := EMPTY_TEST_PACKET; - reference := EMPTY_TEST_PACKET; - - Log("Accept Endpoint 1 sent DATA [SN 17, Serialized Key, Inline-QoS (Lifespan, Status Info)]", INFO); - src_ts := gen_duration(2,500); - life_ts := gen_duration(3,500); - endpoint := e1; - sub := DEFAULT_RTPS_SUBMESSAGE; - sub.submessageID := SID_DATA; - sub.writerId := endpoint.entityid; - sub.readerId := DEFAULT_READER_ENTITYID; - sub.writerSN := gen_sn(17); sub.flags(SUBMESSAGE_KEY_FLAG_POS) := '1'; sub.flags(SUBMESSAGE_INLINE_QOS_FLAG_POS) := '1'; sub.data := gen_payload; cc := gen_cache_change(sub); cc.kind := NOT_ALIVE_UNREGISTERED; cc.src_timestamp := src_ts; - endpoint.lifespan := life_ts; gen_inline_qos(cc, endpoint, TRUE, '0', sub.inlineQos); gen_sentinel(sub.inlineQos); gen_rtps_handler_out(sub, get_loc(endpoint), FALSE, src_ts, endpoint.participant.guidPrefix, stimulus_user); - gen_add_cache_change_dds(cc, life_ts, endpoint.nr, reference); + gen_add_cache_change_dds(cc, TIME_INVALID, endpoint.nr, reference); push_reference(TRUE); start_user_test; wait_on_user_sent; @@ -1079,20 +1010,18 @@ begin stimulus_user := EMPTY_TEST_PACKET; reference := EMPTY_TEST_PACKET; - Log("Ignore Endpoint 1 sent DATA [SN 18, No Payload, Inline-QoS (Lifespan, Status Info)]", INFO); + Log("Ignore Endpoint 1 sent DATA [SN 17, No Payload, Inline-QoS (Status Info)]", INFO); src_ts := gen_duration(2,600); - life_ts := gen_duration(3,600); endpoint := e1; sub := DEFAULT_RTPS_SUBMESSAGE; sub.submessageID := SID_DATA; sub.writerId := endpoint.entityid; sub.readerId := DEFAULT_READER_ENTITYID; - sub.writerSN := gen_sn(18); + sub.writerSN := gen_sn(17); sub.flags(SUBMESSAGE_INLINE_QOS_FLAG_POS) := '1'; cc := gen_cache_change(sub); cc.kind := NOT_ALIVE_DISPOSED; cc.src_timestamp := src_ts; - endpoint.lifespan := life_ts; gen_inline_qos(cc, endpoint, TRUE, '0', sub.inlineQos); gen_sentinel(sub.inlineQos); gen_rtps_handler_out(sub, get_loc(endpoint), FALSE, src_ts, endpoint.participant.guidPrefix, stimulus_user); @@ -1102,7 +1031,6 @@ begin reference := EMPTY_TEST_PACKET; src_ts := TIME_INVALID; - life_ts := TIME_INVALID; -- *HISTORY CACHE RESPONSE HANDLING* Log("Test History Cache Response Handling", INFO); @@ -1118,7 +1046,7 @@ begin sub.data := gen_payload; gen_rtps_handler_out(sub, get_loc(endpoint), FALSE, src_ts, endpoint.participant.guidPrefix, stimulus_user); cc := gen_cache_change(sub); - gen_add_cache_change_dds(cc, TIME_INVALID, endpoint.nr, reference); + gen_add_cache_change_dds(cc, endpoint.lifespan, endpoint.nr, reference); push_reference(FALSE); start_user_test; wait_on_user_sent; @@ -1137,7 +1065,7 @@ begin sub.data := gen_payload; gen_rtps_handler_out(sub, get_loc(endpoint), FALSE, src_ts, endpoint.participant.guidPrefix, stimulus_user); cc := gen_cache_change(sub); - gen_add_cache_change_dds(cc, TIME_INVALID, endpoint.nr, reference); + gen_add_cache_change_dds(cc, endpoint.lifespan, endpoint.nr, reference); push_reference(TRUE); start_user_test; wait_on_user_sent; diff --git a/src/Tests/Level_0/L0_rtps_reader_test2_vrk.vhd b/src/Tests/Level_0/L0_rtps_reader_test2_vrk.vhd index 94dc9d6..62473ca 100644 --- a/src/Tests/Level_0/L0_rtps_reader_test2_vrk.vhd +++ b/src/Tests/Level_0/L0_rtps_reader_test2_vrk.vhd @@ -107,7 +107,7 @@ begin variable payload : TEST_PACKET_TYPE := EMPTY_TEST_PACKET; variable sub : RTPS_SUBMESSAGE_TYPE := DEFAULT_RTPS_SUBMESSAGE; variable cc : CACHE_CHANGE_TYPE := DEFAULT_CACHE_CHANGE; - variable src_ts, life_ts : TIME_TYPE := TIME_INVALID; + variable src_ts : TIME_TYPE := TIME_INVALID; -- Wrapper to use procedure as function impure function gen_rand_loc_2 return LOCATOR_TYPE is @@ -215,6 +215,7 @@ begin e0.entityid := RV.RandSlv(ENTITYID_WIDTH); e0.participant.guidPrefix := gen_rand_guid_prefix; e0.unicastLocatorList := (numLocators => int(1,CDR_LONG_WIDTH), locator => (0 => gen_rand_loc_2, others => EMPTY_LOCATOR)); + e0.lifespan := gen_duration(2,0); -- Endpoint 2 e1 := DEFAULT_ENDPOINT_DATA; e1.reader := FALSE; @@ -242,7 +243,6 @@ begin reset <= '0'; src_ts := TIME_INVALID; - life_ts := TIME_INVALID; -- *GENERAL SEQUENCE NUMBER HANDLING* Log("Test General SequenceNumber Handling", INFO); @@ -281,7 +281,7 @@ begin sub.data := gen_payload; gen_rtps_handler_out(sub, get_loc(endpoint), FALSE, src_ts, endpoint.participant.guidPrefix, stimulus_user); cc := gen_cache_change(sub); - gen_add_cache_change_dds(cc, life_ts, endpoint.nr, reference); + gen_add_cache_change_dds(cc, endpoint.lifespan, endpoint.nr, reference); push_reference(TRUE); start_user_test; wait_on_user_sent; @@ -330,7 +330,7 @@ begin sub.data := gen_payload; gen_rtps_handler_out(sub, get_loc(endpoint), FALSE, src_ts, endpoint.participant.guidPrefix, stimulus_user); cc := gen_cache_change(sub); - gen_add_cache_change_dds(cc, TIME_INVALID, endpoint.nr, reference); + gen_add_cache_change_dds(cc, endpoint.lifespan, endpoint.nr, reference); push_reference(TRUE); start_user_test; wait_on_user_sent; @@ -381,7 +381,7 @@ begin sub.data := gen_payload; gen_rtps_handler_out(sub, get_loc(endpoint), FALSE, src_ts, endpoint.participant.guidPrefix, stimulus_user); cc := gen_cache_change(sub); - gen_add_cache_change_dds(cc, life_ts, endpoint.nr, reference); + gen_add_cache_change_dds(cc, TIME_INVALID, endpoint.nr, reference); push_reference(TRUE); start_user_test; wait_on_user_sent; @@ -444,7 +444,7 @@ begin sub.data := gen_payload; gen_rtps_handler_out(sub, get_loc(endpoint), FALSE, src_ts, endpoint.participant.guidPrefix, stimulus_user); cc := gen_cache_change(sub); - gen_add_cache_change_dds(cc, life_ts, endpoint.nr, reference); + gen_add_cache_change_dds(cc, TIME_INVALID, endpoint.nr, reference); push_reference(TRUE); start_user_test; wait_on_user_sent; @@ -507,7 +507,7 @@ begin sub.data := gen_payload; gen_rtps_handler_out(sub, get_loc(endpoint), FALSE, src_ts, endpoint.participant.guidPrefix, stimulus_user); cc := gen_cache_change(sub); - gen_add_cache_change_dds(cc, life_ts, endpoint.nr, reference); + gen_add_cache_change_dds(cc, TIME_INVALID, endpoint.nr, reference); push_reference(TRUE); start_user_test; wait_on_user_sent; @@ -540,7 +540,7 @@ begin sub.data := gen_payload; gen_rtps_handler_out(sub, get_loc(endpoint), FALSE, src_ts, endpoint.participant.guidPrefix, stimulus_user); cc := gen_cache_change(sub); - gen_add_cache_change_dds(cc, life_ts, endpoint.nr, reference); + gen_add_cache_change_dds(cc, TIME_INVALID, endpoint.nr, reference); push_reference(TRUE); start_user_test; wait_on_user_sent; @@ -634,7 +634,7 @@ begin sub.data := gen_payload; gen_rtps_handler_out(sub, get_loc(endpoint), FALSE, src_ts, endpoint.participant.guidPrefix, stimulus_user); cc := gen_cache_change(sub); - gen_add_cache_change_dds(cc, life_ts, endpoint.nr, reference); + gen_add_cache_change_dds(cc, TIME_INVALID, endpoint.nr, reference); push_reference(TRUE); start_user_test; wait_on_user_sent; @@ -696,7 +696,7 @@ begin sub.data := gen_payload; gen_rtps_handler_out(sub, get_loc(endpoint), FALSE, src_ts, endpoint.participant.guidPrefix, stimulus_user); cc := gen_cache_change(sub); - gen_add_cache_change_dds(cc, life_ts, endpoint.nr, reference); + gen_add_cache_change_dds(cc, TIME_INVALID, endpoint.nr, reference); push_reference(TRUE); start_user_test; wait_on_user_sent; @@ -744,7 +744,7 @@ begin sub.data := gen_payload; gen_rtps_handler_out(sub, get_loc(endpoint), FALSE, src_ts, endpoint.participant.guidPrefix, stimulus_user); cc := gen_cache_change(sub); - gen_add_cache_change_dds(cc, life_ts, endpoint.nr, reference); + gen_add_cache_change_dds(cc, TIME_INVALID, endpoint.nr, reference); push_reference(TRUE); start_user_test; wait_on_user_sent; @@ -792,7 +792,7 @@ begin sub.data := gen_payload; gen_rtps_handler_out(sub, get_loc(endpoint), FALSE, src_ts, endpoint.participant.guidPrefix, stimulus_user); cc := gen_cache_change(sub); - gen_add_cache_change_dds(cc, life_ts, endpoint.nr, reference); + gen_add_cache_change_dds(cc, TIME_INVALID, endpoint.nr, reference); push_reference(TRUE); start_user_test; wait_on_user_sent; @@ -814,7 +814,7 @@ begin sub.data := gen_payload; gen_rtps_handler_out(sub, get_loc(endpoint), FALSE, src_ts, endpoint.participant.guidPrefix, stimulus_user); cc := gen_cache_change(sub); - gen_add_cache_change_dds(cc, life_ts, endpoint.nr, reference); + gen_add_cache_change_dds(cc, TIME_INVALID, endpoint.nr, reference); push_reference(TRUE); start_user_test; wait_on_user_sent; @@ -822,9 +822,8 @@ begin stimulus_user := EMPTY_TEST_PACKET; reference := EMPTY_TEST_PACKET; - Log("Accept Endpoint 1 sent DATA [SN 11, Inline-QoS (Lifespan, Status Info, Key Hash)]", INFO); + Log("Accept Endpoint 1 sent DATA [SN 11, Inline-QoS (Status Info, Key Hash)]", INFO); src_ts := gen_duration(1,0); - life_ts := gen_duration(2,0); endpoint := e1; sub := DEFAULT_RTPS_SUBMESSAGE; sub.submessageID := SID_DATA; @@ -838,11 +837,10 @@ begin cc.kind := ALIVE_FILTERED; cc.src_timestamp := src_ts; cc.instance := gen_key_hash; - endpoint.lifespan := life_ts; gen_inline_qos(cc, endpoint, TRUE, '0', sub.inlineQos); gen_sentinel(sub.inlineQos); gen_rtps_handler_out(sub, get_loc(endpoint), FALSE, src_ts, endpoint.participant.guidPrefix, stimulus_user); - gen_add_cache_change_dds(cc, life_ts, endpoint.nr, reference); + gen_add_cache_change_dds(cc, TIME_INVALID, endpoint.nr, reference); push_reference(TRUE); start_user_test; wait_on_user_sent; @@ -850,68 +848,14 @@ begin stimulus_user := EMPTY_TEST_PACKET; reference := EMPTY_TEST_PACKET; - Log("Ignore Endpoint 1 sent DATA [SN 12, Inline-QoS (Invalid PID_LIFESPAN)]", INFO); - src_ts := gen_duration(1,100); - life_ts := gen_duration(2,100); - endpoint := e1; - sub := DEFAULT_RTPS_SUBMESSAGE; - sub.submessageID := SID_DATA; - sub.writerId := endpoint.entityid; - sub.readerId := DEFAULT_READER_ENTITYID; - sub.writerSN := gen_sn(12); - sub.flags(SUBMESSAGE_DATA_FLAG_POS) := '1'; - sub.flags(SUBMESSAGE_INLINE_QOS_FLAG_POS) := '1'; - sub.data := gen_payload; - cc := gen_cache_change(sub); - cc.kind := ALIVE_FILTERED; - cc.src_timestamp := src_ts; - cc.instance := gen_key_hash; - endpoint.lifespan := life_ts; - gen_inline_qos(cc, endpoint, TRUE, '0', sub.inlineQos, PID_LIFESPAN, -1); - gen_sentinel(sub.inlineQos); - gen_rtps_handler_out(sub, get_loc(endpoint), FALSE, src_ts, endpoint.participant.guidPrefix, stimulus_user); - start_user_test; - wait_on_user_sent; - stimulus_user := EMPTY_TEST_PACKET; - reference := EMPTY_TEST_PACKET; - - Log("Accept Endpoint 1 sent DATA [SN 12, Inline-QoS (Extra Bytes in PID_LIFESPAN)]", INFO); - src_ts := gen_duration(1,200); - life_ts := gen_duration(2,200); - endpoint := e1; - sub := DEFAULT_RTPS_SUBMESSAGE; - sub.submessageID := SID_DATA; - sub.writerId := endpoint.entityid; - sub.readerId := DEFAULT_READER_ENTITYID; - sub.writerSN := gen_sn(12); - sub.flags(SUBMESSAGE_DATA_FLAG_POS) := '1'; - sub.flags(SUBMESSAGE_INLINE_QOS_FLAG_POS) := '1'; - sub.data := gen_payload; - cc := gen_cache_change(sub); - cc.kind := ALIVE_FILTERED; - cc.src_timestamp := src_ts; - cc.instance := gen_key_hash; - endpoint.lifespan := life_ts; - gen_inline_qos(cc, endpoint, TRUE, '0', sub.inlineQos, PID_LIFESPAN, +1); - gen_sentinel(sub.inlineQos); - gen_rtps_handler_out(sub, get_loc(endpoint), FALSE, src_ts, endpoint.participant.guidPrefix, stimulus_user); - gen_add_cache_change_dds(cc, life_ts, endpoint.nr, reference); - push_reference(TRUE); - start_user_test; - wait_on_user_sent; - wait_on_out_check; - stimulus_user := EMPTY_TEST_PACKET; - reference := EMPTY_TEST_PACKET; - - Log("Ignore Endpoint 1 sent DATA [SN 13, Inline-QoS (Invalid PID_STATUS_INFO)]", INFO); + Log("Ignore Endpoint 1 sent DATA [SN 12, Inline-QoS (Invalid PID_STATUS_INFO)]", INFO); src_ts := gen_duration(1,300); - life_ts := gen_duration(2,300); endpoint := e1; sub := DEFAULT_RTPS_SUBMESSAGE; sub.submessageID := SID_DATA; sub.writerId := endpoint.entityid; sub.readerId := DEFAULT_READER_ENTITYID; - sub.writerSN := gen_sn(13); + sub.writerSN := gen_sn(12); sub.flags(SUBMESSAGE_DATA_FLAG_POS) := '1'; sub.flags(SUBMESSAGE_INLINE_QOS_FLAG_POS) := '1'; sub.data := gen_payload; @@ -919,7 +863,6 @@ begin cc.kind := ALIVE_FILTERED; cc.src_timestamp := src_ts; cc.instance := gen_key_hash; - endpoint.lifespan := life_ts; gen_inline_qos(cc, endpoint, TRUE, '0', sub.inlineQos, PID_STATUS_INFO, -1); gen_sentinel(sub.inlineQos); gen_rtps_handler_out(sub, get_loc(endpoint), FALSE, src_ts, endpoint.participant.guidPrefix, stimulus_user); @@ -928,9 +871,34 @@ begin stimulus_user := EMPTY_TEST_PACKET; reference := EMPTY_TEST_PACKET; - Log("Accept Endpoint 1 sent DATA [SN 13, Inline-QoS (Extra Bytes in PID_STATUS_INFO)]", INFO); + Log("Accept Endpoint 1 sent DATA [SN 12, Inline-QoS (Extra Bytes in PID_STATUS_INFO)]", INFO); src_ts := gen_duration(1,400); - life_ts := gen_duration(2,400); + endpoint := e1; + sub := DEFAULT_RTPS_SUBMESSAGE; + sub.submessageID := SID_DATA; + sub.writerId := endpoint.entityid; + sub.readerId := DEFAULT_READER_ENTITYID; + sub.writerSN := gen_sn(12); + sub.flags(SUBMESSAGE_DATA_FLAG_POS) := '1'; + sub.flags(SUBMESSAGE_INLINE_QOS_FLAG_POS) := '1'; + sub.data := gen_payload; + cc := gen_cache_change(sub); + cc.kind := ALIVE_FILTERED; + cc.src_timestamp := src_ts; + cc.instance := gen_key_hash; + gen_inline_qos(cc, endpoint, TRUE, '0', sub.inlineQos, PID_STATUS_INFO, +1); + gen_sentinel(sub.inlineQos); + gen_rtps_handler_out(sub, get_loc(endpoint), FALSE, src_ts, endpoint.participant.guidPrefix, stimulus_user); + gen_add_cache_change_dds(cc, TIME_INVALID, endpoint.nr, reference); + push_reference(TRUE); + start_user_test; + wait_on_user_sent; + wait_on_out_check; + stimulus_user := EMPTY_TEST_PACKET; + reference := EMPTY_TEST_PACKET; + + Log("Ignore Endpoint 1 sent DATA [SN 13, Inline-QoS (Invalid PID_KEY_HASH)]", INFO); + src_ts := gen_duration(1,500); endpoint := e1; sub := DEFAULT_RTPS_SUBMESSAGE; sub.submessageID := SID_DATA; @@ -944,35 +912,6 @@ begin cc.kind := ALIVE_FILTERED; cc.src_timestamp := src_ts; cc.instance := gen_key_hash; - endpoint.lifespan := life_ts; - gen_inline_qos(cc, endpoint, TRUE, '0', sub.inlineQos, PID_STATUS_INFO, +1); - gen_sentinel(sub.inlineQos); - gen_rtps_handler_out(sub, get_loc(endpoint), FALSE, src_ts, endpoint.participant.guidPrefix, stimulus_user); - gen_add_cache_change_dds(cc, life_ts, endpoint.nr, reference); - push_reference(TRUE); - start_user_test; - wait_on_user_sent; - wait_on_out_check; - stimulus_user := EMPTY_TEST_PACKET; - reference := EMPTY_TEST_PACKET; - - Log("Ignore Endpoint 1 sent DATA [SN 14, Inline-QoS (Invalid PID_KEY_HASH)]", INFO); - src_ts := gen_duration(1,500); - life_ts := gen_duration(2,500); - endpoint := e1; - sub := DEFAULT_RTPS_SUBMESSAGE; - sub.submessageID := SID_DATA; - sub.writerId := endpoint.entityid; - sub.readerId := DEFAULT_READER_ENTITYID; - sub.writerSN := gen_sn(14); - sub.flags(SUBMESSAGE_DATA_FLAG_POS) := '1'; - sub.flags(SUBMESSAGE_INLINE_QOS_FLAG_POS) := '1'; - sub.data := gen_payload; - cc := gen_cache_change(sub); - cc.kind := ALIVE_FILTERED; - cc.src_timestamp := src_ts; - cc.instance := gen_key_hash; - endpoint.lifespan := life_ts; gen_inline_qos(cc, endpoint, TRUE, '0', sub.inlineQos, PID_KEY_HASH, -1); gen_sentinel(sub.inlineQos); gen_rtps_handler_out(sub, get_loc(endpoint), FALSE, src_ts, endpoint.participant.guidPrefix, stimulus_user); @@ -981,15 +920,14 @@ begin stimulus_user := EMPTY_TEST_PACKET; reference := EMPTY_TEST_PACKET; - Log("Accept Endpoint 1 sent DATA [SN 14, Inline-QoS (Extra Bytes in PID_KEY_HASH)]", INFO); + Log("Accept Endpoint 1 sent DATA [SN 13, Inline-QoS (Extra Bytes in PID_KEY_HASH)]", INFO); src_ts := gen_duration(1,600); - life_ts := gen_duration(2,600); endpoint := e1; sub := DEFAULT_RTPS_SUBMESSAGE; sub.submessageID := SID_DATA; sub.writerId := endpoint.entityid; sub.readerId := DEFAULT_READER_ENTITYID; - sub.writerSN := gen_sn(14); + sub.writerSN := gen_sn(13); sub.flags(SUBMESSAGE_DATA_FLAG_POS) := '1'; sub.flags(SUBMESSAGE_INLINE_QOS_FLAG_POS) := '1'; sub.data := gen_payload; @@ -997,11 +935,10 @@ begin cc.kind := ALIVE_FILTERED; cc.src_timestamp := src_ts; cc.instance := gen_key_hash; - endpoint.lifespan := life_ts; gen_inline_qos(cc, endpoint, TRUE, '0', sub.inlineQos, PID_KEY_HASH, +1); gen_sentinel(sub.inlineQos); gen_rtps_handler_out(sub, get_loc(endpoint), FALSE, src_ts, endpoint.participant.guidPrefix, stimulus_user); - gen_add_cache_change_dds(cc, life_ts, endpoint.nr, reference); + gen_add_cache_change_dds(cc, TIME_INVALID, endpoint.nr, reference); push_reference(TRUE); start_user_test; wait_on_user_sent; @@ -1009,15 +946,14 @@ begin stimulus_user := EMPTY_TEST_PACKET; reference := EMPTY_TEST_PACKET; - Log("Accept Endpoint 1 sent DATA [SN 15, Inline-QoS (Lifespan, Status Info, Key Hash), Little Endian]", INFO); + Log("Accept Endpoint 1 sent DATA [SN 14, Inline-QoS (Status Info, Key Hash), Little Endian]", INFO); src_ts := gen_duration(1,700); - life_ts := gen_duration(2,700); endpoint := e1; sub := DEFAULT_RTPS_SUBMESSAGE; sub.submessageID := SID_DATA; sub.writerId := endpoint.entityid; sub.readerId := DEFAULT_READER_ENTITYID; - sub.writerSN := gen_sn(15); + sub.writerSN := gen_sn(14); sub.flags(SUBMESSAGE_ENDIAN_FLAG_POS) := '1'; sub.flags(SUBMESSAGE_DATA_FLAG_POS) := '1'; sub.flags(SUBMESSAGE_INLINE_QOS_FLAG_POS) := '1'; @@ -1026,11 +962,10 @@ begin cc.kind := ALIVE_FILTERED; cc.src_timestamp := src_ts; cc.instance := gen_key_hash; - endpoint.lifespan := life_ts; gen_inline_qos(cc, endpoint, TRUE, '1', sub.inlineQos); gen_sentinel('1', sub.inlineQos); gen_rtps_handler_out(sub, get_loc(endpoint), FALSE, src_ts, endpoint.participant.guidPrefix, stimulus_user); - gen_add_cache_change_dds(cc, life_ts, endpoint.nr, reference); + gen_add_cache_change_dds(cc, TIME_INVALID, endpoint.nr, reference); push_reference(TRUE); start_user_test; wait_on_user_sent; @@ -1041,52 +976,48 @@ begin -- *NON_PAYLOAD TRAFFIC HANDLING* Log("Test Non-Payload Traffic Handling", INFO); - Log("Accept Endpoint 1 sent DATA [SN 16, No Payload, Inline-QoS (Lifespan, Status Info, Key Hash)]", INFO); + Log("Accept Endpoint 1 sent DATA [SN 15, No Payload, Inline-QoS (Status Info, Key Hash)]", INFO); src_ts := gen_duration(2,0); - life_ts := gen_duration(3,0); + endpoint := e1; + sub := DEFAULT_RTPS_SUBMESSAGE; + sub.submessageID := SID_DATA; + sub.writerId := endpoint.entityid; + sub.readerId := DEFAULT_READER_ENTITYID; + sub.writerSN := gen_sn(15); + sub.flags(SUBMESSAGE_INLINE_QOS_FLAG_POS) := '1'; + cc := gen_cache_change(sub); + cc.kind := NOT_ALIVE_DISPOSED; + cc.src_timestamp := src_ts; + cc.instance := gen_key_hash; + gen_inline_qos(cc, endpoint, TRUE, '0', sub.inlineQos); + gen_sentinel(sub.inlineQos); + gen_rtps_handler_out(sub, get_loc(endpoint), FALSE, src_ts, endpoint.participant.guidPrefix, stimulus_user); + gen_add_cache_change_dds(cc, TIME_INVALID, endpoint.nr, reference); + push_reference(TRUE); + start_user_test; + wait_on_user_sent; + wait_on_out_check; + stimulus_user := EMPTY_TEST_PACKET; + reference := EMPTY_TEST_PACKET; + + Log("Accept Endpoint 1 sent DATA [SN 16, Serialized Key, Inline-QoS (Status Info)]", INFO); + src_ts := gen_duration(2,500); endpoint := e1; sub := DEFAULT_RTPS_SUBMESSAGE; sub.submessageID := SID_DATA; sub.writerId := endpoint.entityid; sub.readerId := DEFAULT_READER_ENTITYID; sub.writerSN := gen_sn(16); - sub.flags(SUBMESSAGE_INLINE_QOS_FLAG_POS) := '1'; - cc := gen_cache_change(sub); - cc.kind := NOT_ALIVE_DISPOSED; - cc.src_timestamp := src_ts; - cc.instance := gen_key_hash; - endpoint.lifespan := life_ts; - gen_inline_qos(cc, endpoint, TRUE, '0', sub.inlineQos); - gen_sentinel(sub.inlineQos); - gen_rtps_handler_out(sub, get_loc(endpoint), FALSE, src_ts, endpoint.participant.guidPrefix, stimulus_user); - gen_add_cache_change_dds(cc, life_ts, endpoint.nr, reference); - push_reference(TRUE); - start_user_test; - wait_on_user_sent; - wait_on_out_check; - stimulus_user := EMPTY_TEST_PACKET; - reference := EMPTY_TEST_PACKET; - - Log("Accept Endpoint 1 sent DATA [SN 17, Serialized Key, Inline-QoS (Lifespan, Status Info)]", INFO); - src_ts := gen_duration(2,500); - life_ts := gen_duration(3,500); - endpoint := e1; - sub := DEFAULT_RTPS_SUBMESSAGE; - sub.submessageID := SID_DATA; - sub.writerId := endpoint.entityid; - sub.readerId := DEFAULT_READER_ENTITYID; - sub.writerSN := gen_sn(17); sub.flags(SUBMESSAGE_KEY_FLAG_POS) := '1'; sub.flags(SUBMESSAGE_INLINE_QOS_FLAG_POS) := '1'; sub.data := gen_payload; cc := gen_cache_change(sub); cc.kind := NOT_ALIVE_UNREGISTERED; cc.src_timestamp := src_ts; - endpoint.lifespan := life_ts; gen_inline_qos(cc, endpoint, TRUE, '0', sub.inlineQos); gen_sentinel(sub.inlineQos); gen_rtps_handler_out(sub, get_loc(endpoint), FALSE, src_ts, endpoint.participant.guidPrefix, stimulus_user); - gen_add_cache_change_dds(cc, life_ts, endpoint.nr, reference); + gen_add_cache_change_dds(cc, TIME_INVALID, endpoint.nr, reference); push_reference(TRUE); start_user_test; wait_on_user_sent; @@ -1094,20 +1025,18 @@ begin stimulus_user := EMPTY_TEST_PACKET; reference := EMPTY_TEST_PACKET; - Log("Ignore Endpoint 1 sent DATA [SN 18, No Payload, Inline-QoS (Lifespan, Status Info)]", INFO); + Log("Ignore Endpoint 1 sent DATA [SN 17, No Payload, Inline-QoS (Status Info)]", INFO); src_ts := gen_duration(2,600); - life_ts := gen_duration(3,600); endpoint := e1; sub := DEFAULT_RTPS_SUBMESSAGE; sub.submessageID := SID_DATA; sub.writerId := endpoint.entityid; sub.readerId := DEFAULT_READER_ENTITYID; - sub.writerSN := gen_sn(18); + sub.writerSN := gen_sn(17); sub.flags(SUBMESSAGE_INLINE_QOS_FLAG_POS) := '1'; cc := gen_cache_change(sub); cc.kind := NOT_ALIVE_DISPOSED; cc.src_timestamp := src_ts; - endpoint.lifespan := life_ts; gen_inline_qos(cc, endpoint, TRUE, '0', sub.inlineQos); gen_sentinel(sub.inlineQos); gen_rtps_handler_out(sub, get_loc(endpoint), FALSE, src_ts, endpoint.participant.guidPrefix, stimulus_user); @@ -1117,7 +1046,6 @@ begin reference := EMPTY_TEST_PACKET; src_ts := TIME_INVALID; - life_ts := TIME_INVALID; -- *HISTORY CACHE RESPONSE HANDLING* Log("Test History Cache Response Handling", INFO); @@ -1133,7 +1061,7 @@ begin sub.data := gen_payload; gen_rtps_handler_out(sub, get_loc(endpoint), FALSE, src_ts, endpoint.participant.guidPrefix, stimulus_user); cc := gen_cache_change(sub); - gen_add_cache_change_dds(cc, TIME_INVALID, endpoint.nr, reference); + gen_add_cache_change_dds(cc, endpoint.lifespan, endpoint.nr, reference); push_reference(FALSE); start_user_test; wait_on_user_sent; @@ -1152,7 +1080,7 @@ begin sub.data := gen_payload; gen_rtps_handler_out(sub, get_loc(endpoint), FALSE, src_ts, endpoint.participant.guidPrefix, stimulus_user); cc := gen_cache_change(sub); - gen_add_cache_change_dds(cc, TIME_INVALID, endpoint.nr, reference); + gen_add_cache_change_dds(cc, endpoint.lifespan, endpoint.nr, reference); push_reference(TRUE); start_user_test; wait_on_user_sent; diff --git a/src/Tests/Level_0/L0_rtps_reader_test2_vrn.vhd b/src/Tests/Level_0/L0_rtps_reader_test2_vrn.vhd index 6d04f9f..d23bf85 100644 --- a/src/Tests/Level_0/L0_rtps_reader_test2_vrn.vhd +++ b/src/Tests/Level_0/L0_rtps_reader_test2_vrn.vhd @@ -107,7 +107,7 @@ begin variable payload : TEST_PACKET_TYPE := EMPTY_TEST_PACKET; variable sub : RTPS_SUBMESSAGE_TYPE := DEFAULT_RTPS_SUBMESSAGE; variable cc : CACHE_CHANGE_TYPE := DEFAULT_CACHE_CHANGE; - variable src_ts, life_ts : TIME_TYPE := TIME_INVALID; + variable src_ts : TIME_TYPE := TIME_INVALID; -- Wrapper to use procedure as function impure function gen_rand_loc_2 return LOCATOR_TYPE is @@ -215,6 +215,7 @@ begin e0.entityid := RV.RandSlv(ENTITYID_WIDTH); e0.participant.guidPrefix := gen_rand_guid_prefix; e0.unicastLocatorList := (numLocators => int(1,CDR_LONG_WIDTH), locator => (0 => gen_rand_loc_2, others => EMPTY_LOCATOR)); + e0.lifespan := gen_duration(2,0); -- Endpoint 2 e1 := DEFAULT_ENDPOINT_DATA; e1.reader := FALSE; @@ -242,7 +243,6 @@ begin reset <= '0'; src_ts := TIME_INVALID; - life_ts := TIME_INVALID; -- *GENERAL SEQUENCE NUMBER HANDLING* Log("Test General SequenceNumber Handling", INFO); @@ -281,7 +281,7 @@ begin sub.data := gen_payload; gen_rtps_handler_out(sub, get_loc(endpoint), FALSE, src_ts, endpoint.participant.guidPrefix, stimulus_user); cc := gen_cache_change(sub); - gen_add_cache_change_dds(cc, life_ts, endpoint.nr, reference); + gen_add_cache_change_dds(cc, endpoint.lifespan, endpoint.nr, reference); push_reference(TRUE); start_user_test; wait_on_user_sent; @@ -330,7 +330,7 @@ begin sub.data := gen_payload; gen_rtps_handler_out(sub, get_loc(endpoint), FALSE, src_ts, endpoint.participant.guidPrefix, stimulus_user); cc := gen_cache_change(sub); - gen_add_cache_change_dds(cc, TIME_INVALID, endpoint.nr, reference); + gen_add_cache_change_dds(cc, endpoint.lifespan, endpoint.nr, reference); push_reference(TRUE); start_user_test; wait_on_user_sent; @@ -381,7 +381,7 @@ begin sub.data := gen_payload; gen_rtps_handler_out(sub, get_loc(endpoint), FALSE, src_ts, endpoint.participant.guidPrefix, stimulus_user); cc := gen_cache_change(sub); - gen_add_cache_change_dds(cc, life_ts, endpoint.nr, reference); + gen_add_cache_change_dds(cc, TIME_INVALID, endpoint.nr, reference); push_reference(TRUE); start_user_test; wait_on_user_sent; @@ -444,7 +444,7 @@ begin sub.data := gen_payload; gen_rtps_handler_out(sub, get_loc(endpoint), FALSE, src_ts, endpoint.participant.guidPrefix, stimulus_user); cc := gen_cache_change(sub); - gen_add_cache_change_dds(cc, life_ts, endpoint.nr, reference); + gen_add_cache_change_dds(cc, TIME_INVALID, endpoint.nr, reference); push_reference(TRUE); start_user_test; wait_on_user_sent; @@ -507,7 +507,7 @@ begin sub.data := gen_payload; gen_rtps_handler_out(sub, get_loc(endpoint), FALSE, src_ts, endpoint.participant.guidPrefix, stimulus_user); cc := gen_cache_change(sub); - gen_add_cache_change_dds(cc, life_ts, endpoint.nr, reference); + gen_add_cache_change_dds(cc, TIME_INVALID, endpoint.nr, reference); push_reference(TRUE); start_user_test; wait_on_user_sent; @@ -540,7 +540,7 @@ begin sub.data := gen_payload; gen_rtps_handler_out(sub, get_loc(endpoint), FALSE, src_ts, endpoint.participant.guidPrefix, stimulus_user); cc := gen_cache_change(sub); - gen_add_cache_change_dds(cc, life_ts, endpoint.nr, reference); + gen_add_cache_change_dds(cc, TIME_INVALID, endpoint.nr, reference); push_reference(TRUE); start_user_test; wait_on_user_sent; @@ -634,7 +634,7 @@ begin sub.data := gen_payload; gen_rtps_handler_out(sub, get_loc(endpoint), FALSE, src_ts, endpoint.participant.guidPrefix, stimulus_user); cc := gen_cache_change(sub); - gen_add_cache_change_dds(cc, life_ts, endpoint.nr, reference); + gen_add_cache_change_dds(cc, TIME_INVALID, endpoint.nr, reference); push_reference(TRUE); start_user_test; wait_on_user_sent; @@ -696,7 +696,7 @@ begin sub.data := gen_payload; gen_rtps_handler_out(sub, get_loc(endpoint), FALSE, src_ts, endpoint.participant.guidPrefix, stimulus_user); cc := gen_cache_change(sub); - gen_add_cache_change_dds(cc, life_ts, endpoint.nr, reference); + gen_add_cache_change_dds(cc, TIME_INVALID, endpoint.nr, reference); push_reference(TRUE); start_user_test; wait_on_user_sent; @@ -744,7 +744,7 @@ begin sub.data := gen_payload; gen_rtps_handler_out(sub, get_loc(endpoint), FALSE, src_ts, endpoint.participant.guidPrefix, stimulus_user); cc := gen_cache_change(sub); - gen_add_cache_change_dds(cc, life_ts, endpoint.nr, reference); + gen_add_cache_change_dds(cc, TIME_INVALID, endpoint.nr, reference); push_reference(TRUE); start_user_test; wait_on_user_sent; @@ -792,7 +792,7 @@ begin sub.data := gen_payload; gen_rtps_handler_out(sub, get_loc(endpoint), FALSE, src_ts, endpoint.participant.guidPrefix, stimulus_user); cc := gen_cache_change(sub); - gen_add_cache_change_dds(cc, life_ts, endpoint.nr, reference); + gen_add_cache_change_dds(cc, TIME_INVALID, endpoint.nr, reference); push_reference(TRUE); start_user_test; wait_on_user_sent; @@ -814,7 +814,7 @@ begin sub.data := gen_payload; gen_rtps_handler_out(sub, get_loc(endpoint), FALSE, src_ts, endpoint.participant.guidPrefix, stimulus_user); cc := gen_cache_change(sub); -- No key Hash due to WITH_KEY=FALSE - gen_add_cache_change_dds(cc, life_ts, endpoint.nr, reference); + gen_add_cache_change_dds(cc, TIME_INVALID, endpoint.nr, reference); push_reference(TRUE); start_user_test; wait_on_user_sent; @@ -822,9 +822,8 @@ begin stimulus_user := EMPTY_TEST_PACKET; reference := EMPTY_TEST_PACKET; - Log("Accept Endpoint 1 sent DATA [SN 11, Inline-QoS (Lifespan, Status Info, Key Hash)]", INFO); + Log("Accept Endpoint 1 sent DATA [SN 11, Inline-QoS (Status Info, Key Hash)]", INFO); src_ts := gen_duration(1,0); - life_ts := gen_duration(2,0); endpoint := e1; sub := DEFAULT_RTPS_SUBMESSAGE; sub.submessageID := SID_DATA; @@ -838,12 +837,11 @@ begin cc.kind := ALIVE_FILTERED; cc.src_timestamp := src_ts; cc.instance := gen_key_hash; - endpoint.lifespan := life_ts; gen_inline_qos(cc, endpoint, TRUE, '0', sub.inlineQos); gen_sentinel(sub.inlineQos); gen_rtps_handler_out(sub, get_loc(endpoint), FALSE, src_ts, endpoint.participant.guidPrefix, stimulus_user); cc.instance := HANDLE_NIL; -- No key Hash due to WITH_KEY=FALSE - gen_add_cache_change_dds(cc, life_ts, endpoint.nr, reference); + gen_add_cache_change_dds(cc, TIME_INVALID, endpoint.nr, reference); push_reference(TRUE); start_user_test; wait_on_user_sent; @@ -851,69 +849,14 @@ begin stimulus_user := EMPTY_TEST_PACKET; reference := EMPTY_TEST_PACKET; - Log("Ignore Endpoint 1 sent DATA [SN 12, Inline-QoS (Invalid PID_LIFESPAN)]", INFO); - src_ts := gen_duration(1,100); - life_ts := gen_duration(2,100); - endpoint := e1; - sub := DEFAULT_RTPS_SUBMESSAGE; - sub.submessageID := SID_DATA; - sub.writerId := endpoint.entityid; - sub.readerId := DEFAULT_READER_ENTITYID; - sub.writerSN := gen_sn(12); - sub.flags(SUBMESSAGE_DATA_FLAG_POS) := '1'; - sub.flags(SUBMESSAGE_INLINE_QOS_FLAG_POS) := '1'; - sub.data := gen_payload; - cc := gen_cache_change(sub); - cc.kind := ALIVE_FILTERED; - cc.src_timestamp := src_ts; - cc.instance := gen_key_hash; - endpoint.lifespan := life_ts; - gen_inline_qos(cc, endpoint, TRUE, '0', sub.inlineQos, PID_LIFESPAN, -1); - gen_sentinel(sub.inlineQos); - gen_rtps_handler_out(sub, get_loc(endpoint), FALSE, src_ts, endpoint.participant.guidPrefix, stimulus_user); - start_user_test; - wait_on_user_sent; - stimulus_user := EMPTY_TEST_PACKET; - reference := EMPTY_TEST_PACKET; - - Log("Accept Endpoint 1 sent DATA [SN 12, Inline-QoS (Extra Bytes in PID_LIFESPAN)]", INFO); - src_ts := gen_duration(1,200); - life_ts := gen_duration(2,200); - endpoint := e1; - sub := DEFAULT_RTPS_SUBMESSAGE; - sub.submessageID := SID_DATA; - sub.writerId := endpoint.entityid; - sub.readerId := DEFAULT_READER_ENTITYID; - sub.writerSN := gen_sn(12); - sub.flags(SUBMESSAGE_DATA_FLAG_POS) := '1'; - sub.flags(SUBMESSAGE_INLINE_QOS_FLAG_POS) := '1'; - sub.data := gen_payload; - cc := gen_cache_change(sub); - cc.kind := ALIVE_FILTERED; - cc.src_timestamp := src_ts; - cc.instance := gen_key_hash; - endpoint.lifespan := life_ts; - gen_inline_qos(cc, endpoint, TRUE, '0', sub.inlineQos, PID_LIFESPAN, +1); - gen_sentinel(sub.inlineQos); - gen_rtps_handler_out(sub, get_loc(endpoint), FALSE, src_ts, endpoint.participant.guidPrefix, stimulus_user); - cc.instance := HANDLE_NIL; -- No key Hash due to WITH_KEY=FALSE - gen_add_cache_change_dds(cc, life_ts, endpoint.nr, reference); - push_reference(TRUE); - start_user_test; - wait_on_user_sent; - wait_on_out_check; - stimulus_user := EMPTY_TEST_PACKET; - reference := EMPTY_TEST_PACKET; - - Log("Ignore Endpoint 1 sent DATA [SN 13, Inline-QoS (Invalid PID_STATUS_INFO)]", INFO); + Log("Ignore Endpoint 1 sent DATA [SN 12, Inline-QoS (Invalid PID_STATUS_INFO)]", INFO); src_ts := gen_duration(1,300); - life_ts := gen_duration(2,300); endpoint := e1; sub := DEFAULT_RTPS_SUBMESSAGE; sub.submessageID := SID_DATA; sub.writerId := endpoint.entityid; sub.readerId := DEFAULT_READER_ENTITYID; - sub.writerSN := gen_sn(13); + sub.writerSN := gen_sn(12); sub.flags(SUBMESSAGE_DATA_FLAG_POS) := '1'; sub.flags(SUBMESSAGE_INLINE_QOS_FLAG_POS) := '1'; sub.data := gen_payload; @@ -921,7 +864,6 @@ begin cc.kind := ALIVE_FILTERED; cc.src_timestamp := src_ts; cc.instance := gen_key_hash; - endpoint.lifespan := life_ts; gen_inline_qos(cc, endpoint, TRUE, '0', sub.inlineQos, PID_STATUS_INFO, -1); gen_sentinel(sub.inlineQos); gen_rtps_handler_out(sub, get_loc(endpoint), FALSE, src_ts, endpoint.participant.guidPrefix, stimulus_user); @@ -930,9 +872,35 @@ begin stimulus_user := EMPTY_TEST_PACKET; reference := EMPTY_TEST_PACKET; - Log("Accept Endpoint 1 sent DATA [SN 13, Inline-QoS (Extra Bytes in PID_STATUS_INFO)]", INFO); + Log("Accept Endpoint 1 sent DATA [SN 12, Inline-QoS (Extra Bytes in PID_STATUS_INFO)]", INFO); src_ts := gen_duration(1,400); - life_ts := gen_duration(2,400); + endpoint := e1; + sub := DEFAULT_RTPS_SUBMESSAGE; + sub.submessageID := SID_DATA; + sub.writerId := endpoint.entityid; + sub.readerId := DEFAULT_READER_ENTITYID; + sub.writerSN := gen_sn(12); + sub.flags(SUBMESSAGE_DATA_FLAG_POS) := '1'; + sub.flags(SUBMESSAGE_INLINE_QOS_FLAG_POS) := '1'; + sub.data := gen_payload; + cc := gen_cache_change(sub); + cc.kind := ALIVE_FILTERED; + cc.src_timestamp := src_ts; + cc.instance := gen_key_hash; + gen_inline_qos(cc, endpoint, TRUE, '0', sub.inlineQos, PID_STATUS_INFO, +1); + gen_sentinel(sub.inlineQos); + gen_rtps_handler_out(sub, get_loc(endpoint), FALSE, src_ts, endpoint.participant.guidPrefix, stimulus_user); + cc.instance := HANDLE_NIL; -- No key Hash due to WITH_KEY=FALSE + gen_add_cache_change_dds(cc, TIME_INVALID, endpoint.nr, reference); + push_reference(TRUE); + start_user_test; + wait_on_user_sent; + wait_on_out_check; + stimulus_user := EMPTY_TEST_PACKET; + reference := EMPTY_TEST_PACKET; + + Log("Ignore Endpoint 1 sent DATA [SN 13, Inline-QoS (Invalid PID_KEY_HASH)]", INFO); + src_ts := gen_duration(1,500); endpoint := e1; sub := DEFAULT_RTPS_SUBMESSAGE; sub.submessageID := SID_DATA; @@ -946,36 +914,6 @@ begin cc.kind := ALIVE_FILTERED; cc.src_timestamp := src_ts; cc.instance := gen_key_hash; - endpoint.lifespan := life_ts; - gen_inline_qos(cc, endpoint, TRUE, '0', sub.inlineQos, PID_STATUS_INFO, +1); - gen_sentinel(sub.inlineQos); - gen_rtps_handler_out(sub, get_loc(endpoint), FALSE, src_ts, endpoint.participant.guidPrefix, stimulus_user); - cc.instance := HANDLE_NIL; -- No key Hash due to WITH_KEY=FALSE - gen_add_cache_change_dds(cc, life_ts, endpoint.nr, reference); - push_reference(TRUE); - start_user_test; - wait_on_user_sent; - wait_on_out_check; - stimulus_user := EMPTY_TEST_PACKET; - reference := EMPTY_TEST_PACKET; - - Log("Ignore Endpoint 1 sent DATA [SN 14, Inline-QoS (Invalid PID_KEY_HASH)]", INFO); - src_ts := gen_duration(1,500); - life_ts := gen_duration(2,500); - endpoint := e1; - sub := DEFAULT_RTPS_SUBMESSAGE; - sub.submessageID := SID_DATA; - sub.writerId := endpoint.entityid; - sub.readerId := DEFAULT_READER_ENTITYID; - sub.writerSN := gen_sn(14); - sub.flags(SUBMESSAGE_DATA_FLAG_POS) := '1'; - sub.flags(SUBMESSAGE_INLINE_QOS_FLAG_POS) := '1'; - sub.data := gen_payload; - cc := gen_cache_change(sub); - cc.kind := ALIVE_FILTERED; - cc.src_timestamp := src_ts; - cc.instance := gen_key_hash; - endpoint.lifespan := life_ts; gen_inline_qos(cc, endpoint, TRUE, '0', sub.inlineQos, PID_KEY_HASH, -1); gen_sentinel(sub.inlineQos); gen_rtps_handler_out(sub, get_loc(endpoint), FALSE, src_ts, endpoint.participant.guidPrefix, stimulus_user); @@ -984,15 +922,14 @@ begin stimulus_user := EMPTY_TEST_PACKET; reference := EMPTY_TEST_PACKET; - Log("Accept Endpoint 1 sent DATA [SN 14, Inline-QoS (Extra Bytes in PID_KEY_HASH)]", INFO); + Log("Accept Endpoint 1 sent DATA [SN 13, Inline-QoS (Extra Bytes in PID_KEY_HASH)]", INFO); src_ts := gen_duration(1,600); - life_ts := gen_duration(2,600); endpoint := e1; sub := DEFAULT_RTPS_SUBMESSAGE; sub.submessageID := SID_DATA; sub.writerId := endpoint.entityid; sub.readerId := DEFAULT_READER_ENTITYID; - sub.writerSN := gen_sn(14); + sub.writerSN := gen_sn(13); sub.flags(SUBMESSAGE_DATA_FLAG_POS) := '1'; sub.flags(SUBMESSAGE_INLINE_QOS_FLAG_POS) := '1'; sub.data := gen_payload; @@ -1000,12 +937,11 @@ begin cc.kind := ALIVE_FILTERED; cc.src_timestamp := src_ts; cc.instance := gen_key_hash; - endpoint.lifespan := life_ts; gen_inline_qos(cc, endpoint, TRUE, '0', sub.inlineQos, PID_KEY_HASH, +1); gen_sentinel(sub.inlineQos); gen_rtps_handler_out(sub, get_loc(endpoint), FALSE, src_ts, endpoint.participant.guidPrefix, stimulus_user); cc.instance := HANDLE_NIL; -- No key Hash due to WITH_KEY=FALSE - gen_add_cache_change_dds(cc, life_ts, endpoint.nr, reference); + gen_add_cache_change_dds(cc, TIME_INVALID, endpoint.nr, reference); push_reference(TRUE); start_user_test; wait_on_user_sent; @@ -1013,15 +949,14 @@ begin stimulus_user := EMPTY_TEST_PACKET; reference := EMPTY_TEST_PACKET; - Log("Accept Endpoint 1 sent DATA [SN 15, Inline-QoS (Lifespan, Status Info, Key Hash), Little Endian]", INFO); + Log("Accept Endpoint 1 sent DATA [SN 14, Inline-QoS (Status Info, Key Hash), Little Endian]", INFO); src_ts := gen_duration(1,700); - life_ts := gen_duration(2,700); endpoint := e1; sub := DEFAULT_RTPS_SUBMESSAGE; sub.submessageID := SID_DATA; sub.writerId := endpoint.entityid; sub.readerId := DEFAULT_READER_ENTITYID; - sub.writerSN := gen_sn(15); + sub.writerSN := gen_sn(14); sub.flags(SUBMESSAGE_ENDIAN_FLAG_POS) := '1'; sub.flags(SUBMESSAGE_DATA_FLAG_POS) := '1'; sub.flags(SUBMESSAGE_INLINE_QOS_FLAG_POS) := '1'; @@ -1030,12 +965,11 @@ begin cc.kind := ALIVE_FILTERED; cc.src_timestamp := src_ts; cc.instance := gen_key_hash; - endpoint.lifespan := life_ts; gen_inline_qos(cc, endpoint, TRUE, '1', sub.inlineQos); gen_sentinel('1', sub.inlineQos); gen_rtps_handler_out(sub, get_loc(endpoint), FALSE, src_ts, endpoint.participant.guidPrefix, stimulus_user); cc.instance := HANDLE_NIL; -- No key Hash due to WITH_KEY=FALSE - gen_add_cache_change_dds(cc, life_ts, endpoint.nr, reference); + gen_add_cache_change_dds(cc, TIME_INVALID, endpoint.nr, reference); push_reference(TRUE); start_user_test; wait_on_user_sent; @@ -1046,26 +980,24 @@ begin -- *NON_PAYLOAD TRAFFIC HANDLING* Log("Test Non-Payload Traffic Handling", INFO); - Log("Accept Endpoint 1 sent DATA [SN 16, No Payload, Inline-QoS (Lifespan, Status Info, Key Hash)]", INFO); + Log("Accept Endpoint 1 sent DATA [SN 15, No Payload, Inline-QoS (Status Info, Key Hash)]", INFO); src_ts := gen_duration(2,0); - life_ts := gen_duration(3,0); endpoint := e1; sub := DEFAULT_RTPS_SUBMESSAGE; sub.submessageID := SID_DATA; sub.writerId := endpoint.entityid; sub.readerId := DEFAULT_READER_ENTITYID; - sub.writerSN := gen_sn(16); + sub.writerSN := gen_sn(15); sub.flags(SUBMESSAGE_INLINE_QOS_FLAG_POS) := '1'; cc := gen_cache_change(sub); cc.kind := NOT_ALIVE_DISPOSED; cc.src_timestamp := src_ts; cc.instance := gen_key_hash; - endpoint.lifespan := life_ts; gen_inline_qos(cc, endpoint, TRUE, '0', sub.inlineQos); gen_sentinel(sub.inlineQos); gen_rtps_handler_out(sub, get_loc(endpoint), FALSE, src_ts, endpoint.participant.guidPrefix, stimulus_user); cc.instance := HANDLE_NIL; -- No key Hash due to WITH_KEY=FALSE - gen_add_cache_change_dds(cc, life_ts, endpoint.nr, reference); + gen_add_cache_change_dds(cc, TIME_INVALID, endpoint.nr, reference); push_reference(TRUE); start_user_test; wait_on_user_sent; @@ -1073,27 +1005,25 @@ begin stimulus_user := EMPTY_TEST_PACKET; reference := EMPTY_TEST_PACKET; - Log("Accept Endpoint 1 sent DATA [SN 17, Serialized Key, Inline-QoS (Lifespan, Status Info)]", INFO); + Log("Accept Endpoint 1 sent DATA [SN 16, Serialized Key, Inline-QoS (Status Info)]", INFO); src_ts := gen_duration(2,500); - life_ts := gen_duration(3,500); endpoint := e1; sub := DEFAULT_RTPS_SUBMESSAGE; sub.submessageID := SID_DATA; sub.writerId := endpoint.entityid; sub.readerId := DEFAULT_READER_ENTITYID; - sub.writerSN := gen_sn(17); + sub.writerSN := gen_sn(16); sub.flags(SUBMESSAGE_KEY_FLAG_POS) := '1'; sub.flags(SUBMESSAGE_INLINE_QOS_FLAG_POS) := '1'; sub.data := gen_payload; cc := gen_cache_change(sub); cc.kind := NOT_ALIVE_UNREGISTERED; cc.src_timestamp := src_ts; - endpoint.lifespan := life_ts; gen_inline_qos(cc, endpoint, TRUE, '0', sub.inlineQos); gen_sentinel(sub.inlineQos); gen_rtps_handler_out(sub, get_loc(endpoint), FALSE, src_ts, endpoint.participant.guidPrefix, stimulus_user); cc.payload := EMPTY_TEST_PACKET; -- No payload due to WITH_KEY=FALSE - gen_add_cache_change_dds(cc, life_ts, endpoint.nr, reference); + gen_add_cache_change_dds(cc, TIME_INVALID, endpoint.nr, reference); push_reference(TRUE); start_user_test; wait_on_user_sent; @@ -1101,24 +1031,22 @@ begin stimulus_user := EMPTY_TEST_PACKET; reference := EMPTY_TEST_PACKET; - Log("Accept Endpoint 1 sent DATA [SN 18, No Payload, Inline-QoS (Lifespan, Status Info)]", INFO); + Log("Accept Endpoint 1 sent DATA [SN 17, No Payload, Inline-QoS (Status Info)]", INFO); src_ts := gen_duration(2,600); - life_ts := gen_duration(3,600); endpoint := e1; sub := DEFAULT_RTPS_SUBMESSAGE; sub.submessageID := SID_DATA; sub.writerId := endpoint.entityid; sub.readerId := DEFAULT_READER_ENTITYID; - sub.writerSN := gen_sn(18); + sub.writerSN := gen_sn(17); sub.flags(SUBMESSAGE_INLINE_QOS_FLAG_POS) := '1'; cc := gen_cache_change(sub); cc.kind := NOT_ALIVE_DISPOSED; cc.src_timestamp := src_ts; - endpoint.lifespan := life_ts; gen_inline_qos(cc, endpoint, TRUE, '0', sub.inlineQos); gen_sentinel(sub.inlineQos); gen_rtps_handler_out(sub, get_loc(endpoint), FALSE, src_ts, endpoint.participant.guidPrefix, stimulus_user); - gen_add_cache_change_dds(cc, life_ts, endpoint.nr, reference); + gen_add_cache_change_dds(cc, TIME_INVALID, endpoint.nr, reference); push_reference(TRUE); start_user_test; wait_on_user_sent; @@ -1127,7 +1055,6 @@ begin reference := EMPTY_TEST_PACKET; src_ts := TIME_INVALID; - life_ts := TIME_INVALID; -- *HISTORY CACHE RESPONSE HANDLING* Log("Test History Cache Response Handling", INFO); @@ -1143,7 +1070,7 @@ begin sub.data := gen_payload; gen_rtps_handler_out(sub, get_loc(endpoint), FALSE, src_ts, endpoint.participant.guidPrefix, stimulus_user); cc := gen_cache_change(sub); - gen_add_cache_change_dds(cc, TIME_INVALID, endpoint.nr, reference); + gen_add_cache_change_dds(cc, endpoint.lifespan, endpoint.nr, reference); push_reference(FALSE); start_user_test; wait_on_user_sent; @@ -1162,7 +1089,7 @@ begin sub.data := gen_payload; gen_rtps_handler_out(sub, get_loc(endpoint), FALSE, src_ts, endpoint.participant.guidPrefix, stimulus_user); cc := gen_cache_change(sub); - gen_add_cache_change_dds(cc, TIME_INVALID, endpoint.nr, reference); + gen_add_cache_change_dds(cc, endpoint.lifespan, endpoint.nr, reference); push_reference(TRUE); start_user_test; wait_on_user_sent; diff --git a/src/rtps_builtin_endpoint.vhd b/src/rtps_builtin_endpoint.vhd index e4af0de..17df8ef 100644 --- a/src/rtps_builtin_endpoint.vhd +++ b/src/rtps_builtin_endpoint.vhd @@ -137,7 +137,7 @@ architecture arch of rtps_builtin_endpoint is type STAGE_TYPE is (IDLE, PACKET_HEADER, PACKET_SRC_ADDR, PACKET_SRC_ENTITYID, PACKET_SRC_GUIDPREFIX, PACKET_DEST_ENTITYID, CHECK_SRC_ENTITYID, LATCH_SEQ_NR, PROCESS_DATA, PROCESS_MESSAGE_SEQUENCE_NUMBERS, PROCESS_MESSAGE, PROCESS_GAP, PROCESS_GAP_SEQUENCE_NUMBERS, FIND_NEXT_VALID_IN_BITMAP, PROCESS_PL, CHECK_DEFAULT, SELECT_LOCATOR, LATCH_STRING_LENGTH, COMPARE_STRING, RXO_DURABILITY, RXO_DEADLINE, RXO_LIVELINESS, RXO_LEASE_DURATION, LATCH_LEASE_DURATION, - RXO_RELIABILITY, RXO_DESTINATION_ORDER, RXO_OWNERSHIP, RXO_PRESENTATION, RXO_PARTITION, RXO_LATENCY_BUDGET, CHECK_MAX_SIZE_SERIALIZED, + LATCH_LIFESPAN_DURATION, RXO_RELIABILITY, RXO_DESTINATION_ORDER, RXO_OWNERSHIP, RXO_PRESENTATION, RXO_PARTITION, RXO_LATENCY_BUDGET, CHECK_MAX_SIZE_SERIALIZED, MATCH_DOMAIN_ID, MATCH_PROTOCOL_VERSION, LATCH_LOCATOR, LATCH_EXPECTS_INLINE_QOS, MATCH_GUID, CHECK_REMOTE_BUILTIN_ENDPOINTS, CHECK_STATUS_INFO, PARTICIPANT_MATCH_STAGE, INFORM_ENDPOINTS_MATCH, INFORM_ENDPOINTS_UNMATCH, INFORM_ENDPOINTS_PARTICIPANT_UNMATCH, PARTICIPANT_STALE_CHECK, LATCH_REMOVED_GUIDPREFIX, PROCESS_HEARTBEAT, PROCESS_HEARTBEAT_SEQUENCE_NUMBERS, SEND_ACKNACK, SEND_HEARTBEAT, PROCESS_ACKNACK, @@ -353,6 +353,8 @@ architecture arch of rtps_builtin_endpoint is signal meta_uc_port, meta_uc_port_next : std_logic_vector(UDP_PORT_WIDTH-1 downto 0); -- Participant Lease Duration Latch signal lease_duration, lease_duration_next : DURATION_TYPE; + -- Endpoint Lifespan Duration Latch + signal lifespan_duration, lifespan_duration_next : DURATION_TYPE; -- General Purpose Long latch signal long_latch, long_latch_next : std_logic_vector(CDR_LONG_WIDTH-1 downto 0); -- Contains flags that signify which PIDs where received. This is done in order to use the default value for @@ -595,6 +597,7 @@ begin -- LATCH_LOCATOR Store Locator. NOTE: Only Metatraffic and User Locators are differentiated. Unicast and Multicast are overwriting each other and the last parsed is the one to be used. -- LATCH_EXPECTS_INLINE_QOS Store 'expectsInlineQoS' Flag -- LATCH_LEASE_DURATION Store remote Participant Lease Duration + -- LATCH_LIFESPAN_DURATION Store remote Endpoint Lifespan Duration -- CHECK_REMOTE_BUILTIN_ENDPOINTS Check if the remote Participant has the required built-in Endpoints -- RXO_DURABILITY Check Compatibility of Durability QoS -- RXO_DEADLINE Check Compatibility of Deadline QoS @@ -650,6 +653,7 @@ begin participant_match_next <= participant_match; is_subscriber_next <= is_subscriber; lease_duration_next <= lease_duration; + lifespan_duration_next <= lifespan_duration; def_mc_addr_next <= def_mc_addr; def_uc_addr_next <= def_uc_addr; meta_mc_addr_next <= meta_mc_addr; @@ -803,6 +807,7 @@ begin def_mc_port_next <= UDP_PORT_INVALID; def_uc_port_next <= UDP_PORT_INVALID; lease_duration_next <= DEFAULT_PARTICIPANT_LEASE_DURATION; + lifespan_duration_next <= DURATION_INFINITE; reader_flags_next <= (READER_EXPECTS_INLINE_QOS_FLAG => DEFAULT_EXPECTS_INLINE_QOS, READER_EXPECTS_HISTORICAL_DATA_FLAG => DEFAULT_EXPECTS_HISTORICAL_DATA_FLAG, READER_IS_BEST_EFFORT_FLAG => DEFAULT_IS_BEST_EFFORT_FLAG, others => '0'); rcvd_next <= (others => '0'); ud_status_next <= '0'; @@ -2263,9 +2268,12 @@ begin -- Ignore null; when PID_LIFESPAN => - -- Ignore - -- NOTE: Lifespan is requested via in-line QoS and handled directly by the endpoint - null; + -- Ignore in-line QoS + -- Only relevant for Endpoint Discovery Protocol + if(qos_flag = '0' and message_type = EDP) then + stage_next <= LATCH_LIFESPAN_DURATION; + cnt_next <= 0; + end if; when PID_DURABILITY_SERVICE => -- Ignore null; @@ -2697,6 +2705,24 @@ begin null; end case; end if; + when LATCH_LIFESPAN_DURATION => + -- Input FIFO Guard + if (empty = '0') then + rd_guard := '1'; + + -- Latch Lease Duration + case (cnt) is + when 0 => + lifespan_duration_next(0) <= unsigned(data_in_swapped); + cnt_next <= cnt + 1; + when 1 => + lifespan_duration_next(1) <= unsigned(data_in_swapped); + -- DONE + stage_next <= SKIP_PARAMETER; + when others => + null; + end case; + end if; when CHECK_REMOTE_BUILTIN_ENDPOINTS => -- Input FIFO Guard if (empty = '0') then @@ -3132,7 +3158,6 @@ begin when 6 => -- Default data_out_sig <= (others => '0'); - last_word_out_sig <= '1'; -- If Endpoint did not set Port, use Participant Default if (def_port /= UDP_PORT_INVALID) then @@ -3142,8 +3167,23 @@ begin end if; if (is_subscriber = '1') then + last_word_out_sig <= '1'; data_out_sig(15 downto 0) <= reader_flags; + + -- DONE + stage_next <= INFORM_ENDPOINTS_UNMATCH; + cnt_next <= 0; + else + cnt_next <= cnt + 1; end if; + -- Lifespan Duration 1/2 + when 7 => + data_out_sig <= std_logic_vector(lifespan_duration(0)); + cnt_next <= cnt + 1; + -- Lifespan Duration 2/2 + when 8 => + last_word_out_sig <= '1'; + data_out_sig <= std_logic_vector(lifespan_duration(1)); -- DONE stage_next <= INFORM_ENDPOINTS_UNMATCH; @@ -6107,6 +6147,7 @@ begin live_gap_start <= to_double_word(to_unsigned(2, 64)); live_gap_end <= FIRST_SEQUENCENUMBER; lease_duration <= DURATION_ZERO; + lifespan_duration <= DURATION_ZERO; check_time <= TIME_INVALID; announcement_time <= time + PARTICIPANT_ANNOUNCEMENT_PERIOD; heartbeat_time <= time + HEARTBEAT_PERIOD; @@ -6174,6 +6215,7 @@ begin live_gap_start <= live_gap_start_next; live_gap_end <= live_gap_end_next; lease_duration <= lease_duration_next; + lifespan_duration <= lifespan_duration_next; check_time <= check_time_next; announcement_time <= announcement_time_next; heartbeat_time <= heartbeat_time_next; diff --git a/src/rtps_reader.vhd b/src/rtps_reader.vhd index 54c6359..7fb3466 100644 --- a/src/rtps_reader.vhd +++ b/src/rtps_reader.vhd @@ -69,9 +69,9 @@ architecture arch of rtps_reader is variable ret : natural := 0; begin if (qos = RELIABLE_RELIABILITY_QOS) then - ret := 12; + ret := 14; else - ret := 8; + ret := 10; end if; return ret; end function; @@ -89,14 +89,15 @@ architecture arch of rtps_reader is -- *ENDPOINT MEMORY FRAME FIELD FLAGS* -- Flags mapping to the respective Endpoint Memory Frame Fields - constant EMF_FLAG_WIDTH : natural := 7; + constant EMF_FLAG_WIDTH : natural := 8; constant EMF_ENTITYID_FLAG : std_logic_vector(0 to EMF_FLAG_WIDTH-1) := (0 => '1', others => '0'); constant EMF_GUIDPREFIX_FLAG : std_logic_vector(0 to EMF_FLAG_WIDTH-1) := (1 => '1', others => '0'); constant EMF_IPV4_ADDR_FLAG : std_logic_vector(0 to EMF_FLAG_WIDTH-1) := (2 => '1', others => '0'); constant EMF_UDP_PORT_FLAG : std_logic_vector(0 to EMF_FLAG_WIDTH-1) := (3 => '1', others => '0'); constant EMF_NEXT_SEQ_NR_FLAG : std_logic_vector(0 to EMF_FLAG_WIDTH-1) := (4 => '1', others => '0'); constant EMF_LEASE_DEADLINE_FLAG : std_logic_vector(0 to EMF_FLAG_WIDTH-1) := (5 => '1', others => '0'); - constant EMF_RES_TIME_FLAG : std_logic_vector(0 to EMF_FLAG_WIDTH-1) := (6 => '1', others => '0'); + constant EMF_LIFESPAN_DURATION_FLAG : std_logic_vector(0 to EMF_FLAG_WIDTH-1) := (6 => '1', others => '0'); + constant EMF_RES_TIME_FLAG : std_logic_vector(0 to EMF_FLAG_WIDTH-1) := (7 => '1', others => '0'); -- *ENDPOINT MEMORY FRAME FIELD OFFSETS* -- 4-Byte Word Offsets to Beginning of Respective Fields in the Endpoint Memory Frame @@ -114,15 +115,16 @@ architecture arch of rtps_reader is end if; return ret; end function; - constant EMF_NEXT_SEQ_NR_OFFSET : natural := gen_emf_next_seq_nr_offset(RELIABILITY_QOS); - constant EMF_LEASE_DEADLINE_OFFSET : natural := EMF_NEXT_SEQ_NR_OFFSET + 2; - constant EMF_RES_TIME_OFFSET : natural := EMF_LEASE_DEADLINE_OFFSET + 2; + constant EMF_NEXT_SEQ_NR_OFFSET : natural := gen_emf_next_seq_nr_offset(RELIABILITY_QOS); + constant EMF_LEASE_DEADLINE_OFFSET : natural := EMF_NEXT_SEQ_NR_OFFSET + 2; + constant EMF_LIFESPAN_DURATION_OFFSET : natural := EMF_LEASE_DEADLINE_OFFSET + 2; + constant EMF_RES_TIME_OFFSET : natural := EMF_LIFESPAN_DURATION_OFFSET + 2; --*****TYPE DECLARATION***** -- FSM states. Explained below in detail type STAGE_TYPE is (IDLE, LATCH_GUIDPREFIX, LATCH_ENTITYID, INITIATE_ENDPOINT_SEARCH, LATCH_ENDPOINT_DATA, METATRAFFIC_OPERATION, LATCH_SRC_ADDR, - LATCH_EXTRA_DATA, LATCH_HEARTBEAT, PROCESS_HEARTBEAT, LATCH_GAP, PROCESS_GAP, FIND_NEXT_VALID_IN_BITMAP, PROCESS_INLINE_QOS, LATCH_LIFESPAN, + LATCH_EXTRA_DATA, LATCH_HEARTBEAT, PROCESS_HEARTBEAT, LATCH_GAP, PROCESS_GAP, FIND_NEXT_VALID_IN_BITMAP, PROCESS_INLINE_QOS, LATCH_KEY_HASH, LATCH_STATUS_INFO, INITIATE_ADD_CACHE_CHANGE_REQUEST, ADD_CACHE_CHANGE, PUSH_PAYLOAD, FINALIZE_ADD_CACHE_CHANGE_REQUEST, ENDPOINT_STALE_CHECK, SEND_HEADER, SEND_ACKNACK, SKIP_PARAMETER, SKIP_PACKET, SKIP_META_OPERATION); -- Memory FSM states. Explained below in detail @@ -151,6 +153,7 @@ architecture arch of rtps_reader is portn : std_logic_vector(UDP_PORT_WIDTH-1 downto 0); next_seq_nr : SEQUENCENUMBER_TYPE; lease_deadline : TIME_TYPE; + lifespan : DURATION_TYPE; res_time : TIME_TYPE; end record; -- Zero initialized Endpoint Data @@ -160,6 +163,7 @@ architecture arch of rtps_reader is portn => UDP_PORT_INVALID, next_seq_nr => SEQUENCENUMBER_UNKNOWN, lease_deadline => TIME_INVALID, + lifespan => DURATION_INFINITE, res_time => TIME_INVALID ); -- Endpoint Data Latch used as temporal cache by Memory Process @@ -168,6 +172,7 @@ architecture arch of rtps_reader is addr : std_logic_vector(IPv4_ADDRESS_WIDTH-1 downto 0); portn : std_logic_vector(UDP_PORT_WIDTH-1 downto 0); lease_deadline : TIME_TYPE; + lifespan : DURATION_TYPE; res_time : TIME_TYPE; next_seq_nr : SEQUENCENUMBER_TYPE; field_flag : std_logic_vector(0 to EMF_FLAG_WIDTH-1); @@ -178,6 +183,7 @@ architecture arch of rtps_reader is addr => IPv4_ADDRESS_INVALID, portn => UDP_PORT_INVALID, lease_deadline => TIME_INVALID, + lifespan => DURATION_INFINITE, res_time => TIME_INVALID, next_seq_nr => SEQUENCENUMBER_UNKNOWN, field_flag => (others => '0') @@ -222,7 +228,7 @@ architecture arch of rtps_reader is signal key_hash_rcvd, key_hash_rcvd_next : std_logic; -- Status Info Latch signal status_info, status_info_next : std_logic_vector(STATUS_INFO_WIDTH-1 downto 0); - -- Lifespan Latch + -- Lifespan Latch (Contains Lifespan Duration during meta parsing, and Lifespan Deadline during user parsing) signal lifespan, lifespan_next : TIME_TYPE; -- RTPS Sequence Number Latch signal seq_nr, seq_nr_next : SEQUENCENUMBER_TYPE; @@ -281,7 +287,7 @@ architecture arch of rtps_reader is -- Highest Endpoint Memory Address (Points to first Address of last occupied Endpoint Frame) signal max_endpoint_addr, max_endpoint_addr_next : unsigned(ENDPOINT_MEMORY_ADDR_WIDTH-1 downto 0); -- General Purpose Couter - signal mem_cnt, mem_cnt_next : natural range 0 to 23; + signal mem_cnt, mem_cnt_next : natural range 0 to 27; -- Latch for Endpoint Data from Memory signal mem_endpoint_data, mem_endpoint_data_next : ENDPOINT_DATA_TYPE; -- Latch for Endpoint Data from main process @@ -385,7 +391,6 @@ begin -- PROCESS_GAP Parse RTPS GAP Submsessage. Initiates search for next valid Sequence Number if currently expected Sequence Number is in GAP -- FIND_NEXT_VALID_IN_BITMAP Iterate through Bitmap and find the next valid Sequence Number. -- PROCESS_INLINE_QOS Parse in-line Parameter List QoS - -- LATCH_LIFESPAN Store LIFESPAN_QOS -- LATCH_KEY_HASH Store KEY_HASH -- LATCH_STATUS_INFO Store STATUS_INFO -- INITIATE_ADD_CACHE_CHANGE_REQUEST Initiate an ADD_CACHE_CHANGE Operation @@ -636,7 +641,7 @@ begin case (opcode) is when SID_DATA => stage_next <= LATCH_EXTRA_DATA; - mem_field_flags <= EMF_NEXT_SEQ_NR_FLAG; + mem_field_flags <= EMF_NEXT_SEQ_NR_FLAG or EMF_LIFESPAN_DURATION_FLAG; cnt_next <= 0; when SID_HEARTBEAT => stage_next <= LATCH_HEARTBEAT; @@ -665,8 +670,18 @@ begin when 1 => --assert (last_word_in_meta = '1') report "last_word_in_meta not set" severity FAILURE; + -- NOTE: Reader Flags are ignored, since they are only relevant for Writer Endpoints portn_next <= data_in_meta(WORD_WIDTH-1 downto WORD_WIDTH-UDP_PORT_WIDTH); + cnt_next <= cnt + 1; + -- Lifespan Duration 1/2 + when 2 => + lifespan_next(0) <= unsigned(data_in_meta); + cnt_next <= cnt + 1; + -- Lifespan Duration 2/2 + when 3 => + lifespan_next(1) <= unsigned(data_in_meta); + stage_next <= METATRAFFIC_OPERATION; when others => null; @@ -679,13 +694,15 @@ begin when EMO_ENDPOINT_MATCH => -- Endpoint already in Memory if (mem_addr_base /= ENDPOINT_MEMORY_MAX_ADDRESS) then + -- Update the Endpoint Data + -- NOTE: The Lease Duration is NOT updated in case of an update. That is the responsibility of the Liveliness Update + mem_op_start <= '1'; + mem_opcode <= UPDATE_ENDPOINT; -- Synthesis Guard if (RELIABILITY_QOS = RELIABLE_RELIABILITY_QOS) then - -- Update the Endpoint Data - -- NOTE: The Lease Duration is NOT updated in case of an update. That is the responsibility of the Liveliness Update - mem_op_start <= '1'; - mem_opcode <= UPDATE_ENDPOINT; - mem_field_flags <= EMF_IPV4_ADDR_FLAG or EMF_UDP_PORT_FLAG; + mem_field_flags <= EMF_IPV4_ADDR_FLAG or EMF_UDP_PORT_FLAG or EMF_LIFESPAN_DURATION_FLAG; + else + mem_field_flags <= EMF_LIFESPAN_DURATION_FLAG; end if; -- DONE stage_next <= IDLE; @@ -1135,8 +1152,8 @@ begin -- Ignore null; when PID_LIFESPAN => - stage_next <= LATCH_LIFESPAN; - cnt_next <= 0; + -- Ignore + null; when PID_CONTENT_FILTER_INFO => -- Ignore null; @@ -1185,35 +1202,6 @@ begin end if; end case; end if; - when LATCH_LIFESPAN => - -- Input FIFO Guard - if (empty_user = '0') then - rd_guard := '1'; - - case (cnt) is - -- Lifespan 1/2 - when 0 => - -- NOTE: We are misusing the sn_latch_1 as temporal CDR_LONG storage - sn_latch_1_next(0) <= unsigned(data_in_swapped); - cnt_next <= cnt + 1; - -- Lifespan 2/2 - when 1 => - tmp_dw := (0 => sn_latch_1(0), 1 => unsigned(data_in_swapped)); - - -- TODO: Use source timestamp if clocks with remote synchronized - -- Calculate Sample Lifespan Deadline - if (tmp_dw /= DURATION_INFINITE) then - lifespan_next <= time + tmp_dw; - else - lifespan_next <= TIME_INVALID; - end if; - - -- DONE - stage_next <= SKIP_PARAMETER; - when others => - null; - end case; - end if; when LATCH_KEY_HASH => -- Input FIFO Guard if (empty_user = '0') then @@ -1253,11 +1241,11 @@ begin stage_next <= SKIP_PARAMETER; end if; when INITIATE_ADD_CACHE_CHANGE_REQUEST => - -- Precondition: mem_endpoint_data set (EMF_NEXT_SEQ_NR_FLAG) + -- Precondition: mem_endpoint_data set (EMF_NEXT_SEQ_NR_FLAG, EMF_LIFESPAN_DURATION_FLAG) -- Wait for Endpoint Data if (mem_op_done = '1') then - assert check_mask(current_emf, EMF_NEXT_SEQ_NR_FLAG) severity FAILURE; + assert check_mask(current_emf, EMF_NEXT_SEQ_NR_FLAG or EMF_LIFESPAN_DURATION_FLAG) severity FAILURE; -- Unknown Endpoint if (mem_addr_base = ENDPOINT_MEMORY_MAX_ADDRESS) then @@ -1275,8 +1263,14 @@ begin opcode_hc <= ADD_CACHE_CHANGE; -- Wait until History Cache acknowledges request if (ack_hc = '1') then - stage_next <= ADD_CACHE_CHANGE; - cnt_next <= 0; + -- TODO: Use source timestamp if clocks with remote synchronized + -- Calculate Sample Lifespan Deadline + if (mem_endpoint_data.lifespan /= DURATION_INFINITE) then + lifespan_next <= time + mem_endpoint_data.lifespan; + end if; + + stage_next <= ADD_CACHE_CHANGE; + cnt_next <= 0; end if; end if; else @@ -1808,6 +1802,7 @@ begin addr => addr_next, portn => portn_next, lease_deadline => lease_deadline, + lifespan => lifespan_next, res_time => res_time, next_seq_nr => next_seq_nr_next, field_flag => mem_field_flags @@ -1835,6 +1830,7 @@ begin mem_endpoint_data_next.next_seq_nr <= FIRST_SEQUENCENUMBER; end if; mem_endpoint_data_next.lease_deadline <= lease_deadline; + mem_endpoint_data_next.lifespan <= lifespan_next; mem_endpoint_data_next.res_time <= TIME_INVALID; mem_addr_base_next <= FIRST_ENDPOINT_ADDRESS; @@ -1853,8 +1849,10 @@ begin mem_cnt_next <= 2; elsif check_mask(mem_field_flags,EMF_LEASE_DEADLINE_FLAG) then mem_cnt_next <= 4; - elsif (RELIABILITY_QOS = RELIABLE_RELIABILITY_QOS and check_mask(mem_field_flags,EMF_RES_TIME_FLAG)) then + elsif check_mask(mem_field_flags,EMF_LIFESPAN_DURATION_FLAG) then mem_cnt_next <= 6; + elsif (RELIABILITY_QOS = RELIABLE_RELIABILITY_QOS and check_mask(mem_field_flags,EMF_RES_TIME_FLAG)) then + mem_cnt_next <= 8; else -- DONE mem_stage_next <= IDLE; @@ -1908,8 +1906,10 @@ begin mem_cnt_next <= 6; elsif check_mask(mem_field_flags,EMF_LEASE_DEADLINE_FLAG) then mem_cnt_next <= 8; - elsif (RELIABILITY_QOS = RELIABLE_RELIABILITY_QOS and check_mask(mem_field_flags,EMF_RES_TIME_FLAG)) then + elsif check_mask(mem_field_flags,EMF_LIFESPAN_DURATION_FLAG) then mem_cnt_next <= 10; + elsif (RELIABILITY_QOS = RELIABLE_RELIABILITY_QOS and check_mask(mem_field_flags,EMF_RES_TIME_FLAG)) then + mem_cnt_next <= 12; else -- DONE mem_stage_next <= IDLE; @@ -2061,8 +2061,10 @@ begin mem_cnt_next <= 6; elsif check_mask(mem_endpoint_latch_data.field_flag,EMF_LEASE_DEADLINE_FLAG) then mem_cnt_next <= 8; - elsif (RELIABILITY_QOS = RELIABLE_RELIABILITY_QOS and check_mask(mem_endpoint_latch_data.field_flag,EMF_RES_TIME_FLAG)) then + elsif check_mask(mem_endpoint_latch_data.field_flag,EMF_LIFESPAN_DURATION_FLAG) then mem_cnt_next <= 10; + elsif (RELIABILITY_QOS = RELIABLE_RELIABILITY_QOS and check_mask(mem_endpoint_latch_data.field_flag,EMF_RES_TIME_FLAG)) then + mem_cnt_next <= 12; else -- DONE mem_stage_next <= IDLE; @@ -2092,10 +2094,12 @@ begin mem_cnt_next <= 6; elsif check_mask(mem_endpoint_latch_data.field_flag,EMF_LEASE_DEADLINE_FLAG) then mem_cnt_next <= 8; - elsif (RELIABILITY_QOS = RELIABLE_RELIABILITY_QOS and check_mask(mem_endpoint_latch_data.field_flag,EMF_RES_TIME_FLAG)) then + elsif check_mask(mem_endpoint_latch_data.field_flag,EMF_LIFESPAN_DURATION_FLAG) then mem_cnt_next <= 10; - else + elsif (RELIABILITY_QOS = RELIABLE_RELIABILITY_QOS and check_mask(mem_endpoint_latch_data.field_flag,EMF_RES_TIME_FLAG)) then mem_cnt_next <= 12; + else + mem_cnt_next <= 14; end if; end if; -- GET GUID Prefix 1/3 @@ -2131,13 +2135,15 @@ begin mem_cnt_next <= 6; elsif check_mask(mem_endpoint_latch_data.field_flag,EMF_LEASE_DEADLINE_FLAG) then mem_cnt_next <= 8; - elsif (RELIABILITY_QOS = RELIABLE_RELIABILITY_QOS and check_mask(mem_endpoint_latch_data.field_flag,EMF_RES_TIME_FLAG)) then + elsif check_mask(mem_endpoint_latch_data.field_flag,EMF_LIFESPAN_DURATION_FLAG) then mem_cnt_next <= 10; + elsif (RELIABILITY_QOS = RELIABLE_RELIABILITY_QOS and check_mask(mem_endpoint_latch_data.field_flag,EMF_RES_TIME_FLAG)) then + mem_cnt_next <= 12; else if check_mask(mem_endpoint_latch_data.field_flag,EMF_ENTITYID_FLAG) then - mem_cnt_next <= 12; + mem_cnt_next <= 14; else - mem_cnt_next <= 13; + mem_cnt_next <= 15; end if; end if; end if; @@ -2156,15 +2162,17 @@ begin mem_cnt_next <= 6; elsif check_mask(mem_endpoint_latch_data.field_flag,EMF_LEASE_DEADLINE_FLAG) then mem_cnt_next <= 8; - elsif ((RELIABILITY_QOS = RELIABLE_RELIABILITY_QOS) and check_mask(mem_endpoint_latch_data.field_flag,EMF_RES_TIME_FLAG)) then + elsif check_mask(mem_endpoint_latch_data.field_flag,EMF_LIFESPAN_DURATION_FLAG) then mem_cnt_next <= 10; + elsif ((RELIABILITY_QOS = RELIABLE_RELIABILITY_QOS) and check_mask(mem_endpoint_latch_data.field_flag,EMF_RES_TIME_FLAG)) then + mem_cnt_next <= 12; else if check_mask(mem_endpoint_latch_data.field_flag,EMF_ENTITYID_FLAG) then - mem_cnt_next <= 12; + mem_cnt_next <= 14; elsif check_mask(mem_endpoint_latch_data.field_flag,EMF_GUIDPREFIX_FLAG) then - mem_cnt_next <= 13; + mem_cnt_next <= 15; else - mem_cnt_next <= 16; + mem_cnt_next <= 18; end if; end if; end if; @@ -2182,17 +2190,19 @@ begin mem_cnt_next <= 6; elsif check_mask(mem_endpoint_latch_data.field_flag,EMF_LEASE_DEADLINE_FLAG) then mem_cnt_next <= 8; - elsif (RELIABILITY_QOS = RELIABLE_RELIABILITY_QOS and check_mask(mem_endpoint_latch_data.field_flag,EMF_RES_TIME_FLAG)) then + elsif check_mask(mem_endpoint_latch_data.field_flag,EMF_LIFESPAN_DURATION_FLAG) then mem_cnt_next <= 10; + elsif (RELIABILITY_QOS = RELIABLE_RELIABILITY_QOS and check_mask(mem_endpoint_latch_data.field_flag,EMF_RES_TIME_FLAG)) then + mem_cnt_next <= 12; else if check_mask(mem_endpoint_latch_data.field_flag,EMF_ENTITYID_FLAG) then - mem_cnt_next <= 12; + mem_cnt_next <= 14; elsif check_mask(mem_endpoint_latch_data.field_flag,EMF_GUIDPREFIX_FLAG) then - mem_cnt_next <= 13; + mem_cnt_next <= 15; elsif (RELIABILITY_QOS = RELIABLE_RELIABILITY_QOS and check_mask(mem_endpoint_latch_data.field_flag,EMF_IPV4_ADDR_FLAG)) then - mem_cnt_next <= 16; + mem_cnt_next <= 18; else - mem_cnt_next <= 17; + mem_cnt_next <= 19; end if; end if; end if; @@ -2215,19 +2225,21 @@ begin if (mem_ready_in = '1') then if check_mask(mem_endpoint_latch_data.field_flag,EMF_LEASE_DEADLINE_FLAG) then mem_cnt_next <= 8; - elsif (RELIABILITY_QOS = RELIABLE_RELIABILITY_QOS and check_mask(mem_endpoint_latch_data.field_flag,EMF_RES_TIME_FLAG)) then + elsif check_mask(mem_endpoint_latch_data.field_flag,EMF_LIFESPAN_DURATION_FLAG) then mem_cnt_next <= 10; + elsif (RELIABILITY_QOS = RELIABLE_RELIABILITY_QOS and check_mask(mem_endpoint_latch_data.field_flag,EMF_RES_TIME_FLAG)) then + mem_cnt_next <= 12; else if check_mask(mem_endpoint_latch_data.field_flag,EMF_ENTITYID_FLAG) then - mem_cnt_next <= 12; + mem_cnt_next <= 14; elsif check_mask(mem_endpoint_latch_data.field_flag,EMF_GUIDPREFIX_FLAG) then - mem_cnt_next <= 13; + mem_cnt_next <= 15; elsif (RELIABILITY_QOS = RELIABLE_RELIABILITY_QOS and check_mask(mem_endpoint_latch_data.field_flag,EMF_IPV4_ADDR_FLAG)) then - mem_cnt_next <= 16; - elsif (RELIABILITY_QOS = RELIABLE_RELIABILITY_QOS and check_mask(mem_endpoint_latch_data.field_flag,EMF_UDP_PORT_FLAG)) then - mem_cnt_next <= 17; - else mem_cnt_next <= 18; + elsif (RELIABILITY_QOS = RELIABLE_RELIABILITY_QOS and check_mask(mem_endpoint_latch_data.field_flag,EMF_UDP_PORT_FLAG)) then + mem_cnt_next <= 19; + else + mem_cnt_next <= 20; end if; end if; end if; @@ -2247,26 +2259,64 @@ begin mem_read <= '1'; -- Memory Flow Control Guard if (mem_ready_in = '1') then - if (RELIABILITY_QOS = RELIABLE_RELIABILITY_QOS and check_mask(mem_endpoint_latch_data.field_flag,EMF_RES_TIME_FLAG)) then + if check_mask(mem_endpoint_latch_data.field_flag,EMF_LIFESPAN_DURATION_FLAG) then mem_cnt_next <= 10; + elsif (RELIABILITY_QOS = RELIABLE_RELIABILITY_QOS and check_mask(mem_endpoint_latch_data.field_flag,EMF_RES_TIME_FLAG)) then + mem_cnt_next <= 12; else if check_mask(mem_endpoint_latch_data.field_flag,EMF_ENTITYID_FLAG) then - mem_cnt_next <= 12; + mem_cnt_next <= 14; elsif check_mask(mem_endpoint_latch_data.field_flag,EMF_GUIDPREFIX_FLAG) then - mem_cnt_next <= 13; + mem_cnt_next <= 15; elsif (RELIABILITY_QOS = RELIABLE_RELIABILITY_QOS and check_mask(mem_endpoint_latch_data.field_flag,EMF_IPV4_ADDR_FLAG)) then - mem_cnt_next <= 16; - elsif (RELIABILITY_QOS = RELIABLE_RELIABILITY_QOS and check_mask(mem_endpoint_latch_data.field_flag,EMF_UDP_PORT_FLAG)) then - mem_cnt_next <= 17; - elsif check_mask(mem_endpoint_latch_data.field_flag,EMF_NEXT_SEQ_NR_FLAG) then mem_cnt_next <= 18; - else + elsif (RELIABILITY_QOS = RELIABLE_RELIABILITY_QOS and check_mask(mem_endpoint_latch_data.field_flag,EMF_UDP_PORT_FLAG)) then + mem_cnt_next <= 19; + elsif check_mask(mem_endpoint_latch_data.field_flag,EMF_NEXT_SEQ_NR_FLAG) then mem_cnt_next <= 20; + else + mem_cnt_next <= 22; + end if; + end if; + end if; + -- GET Lifespan Duration 1/2 + when 10 => + mem_valid_in <= '1'; + mem_addr <= mem_addr_base + EMF_LIFESPAN_DURATION_OFFSET; + mem_read <= '1'; + -- Memory Flow Control Guard + if (mem_ready_in = '1') then + mem_cnt_next <= mem_cnt + 1; + end if; + -- GET Lifespan Duration 2/2 + when 11 => + mem_valid_in <= '1'; + mem_addr <= mem_addr_base + EMF_LIFESPAN_DURATION_OFFSET + 1; + mem_read <= '1'; + -- Memory Flow Control Guard + if (mem_ready_in = '1') then + if (RELIABILITY_QOS = RELIABLE_RELIABILITY_QOS and check_mask(mem_endpoint_latch_data.field_flag,EMF_RES_TIME_FLAG)) then + mem_cnt_next <= 12; + else + if check_mask(mem_endpoint_latch_data.field_flag,EMF_ENTITYID_FLAG) then + mem_cnt_next <= 14; + elsif check_mask(mem_endpoint_latch_data.field_flag,EMF_GUIDPREFIX_FLAG) then + mem_cnt_next <= 15; + elsif (RELIABILITY_QOS = RELIABLE_RELIABILITY_QOS and check_mask(mem_endpoint_latch_data.field_flag,EMF_IPV4_ADDR_FLAG)) then + mem_cnt_next <= 18; + elsif (RELIABILITY_QOS = RELIABLE_RELIABILITY_QOS and check_mask(mem_endpoint_latch_data.field_flag,EMF_UDP_PORT_FLAG)) then + mem_cnt_next <= 19; + elsif check_mask(mem_endpoint_latch_data.field_flag,EMF_NEXT_SEQ_NR_FLAG) then + mem_cnt_next <= 20; + elsif check_mask(mem_endpoint_latch_data.field_flag,EMF_LEASE_DEADLINE_FLAG) then + mem_cnt_next <= 22; + else + mem_cnt_next <= 24; end if; end if; end if; -- GET Response Time 1/2 - when 10 => + when 12 => -- Synthesis Guard if (RELIABILITY_QOS = RELIABLE_RELIABILITY_QOS) then mem_valid_in <= '1'; @@ -2278,7 +2328,7 @@ begin end if; end if; -- GET Response Time 2/2 - when 11 => + when 13 => -- Synthesis Guard if (RELIABILITY_QOS = RELIABLE_RELIABILITY_QOS) then mem_valid_in <= '1'; @@ -2287,48 +2337,52 @@ begin -- Memory Flow Control Guard if (mem_ready_in = '1') then if check_mask(mem_endpoint_latch_data.field_flag,EMF_ENTITYID_FLAG) then - mem_cnt_next <= 12; + mem_cnt_next <= 14; elsif check_mask(mem_endpoint_latch_data.field_flag,EMF_GUIDPREFIX_FLAG) then - mem_cnt_next <= 13; + mem_cnt_next <= 15; elsif (RELIABILITY_QOS = RELIABLE_RELIABILITY_QOS and check_mask(mem_endpoint_latch_data.field_flag,EMF_IPV4_ADDR_FLAG)) then - mem_cnt_next <= 16; - elsif (RELIABILITY_QOS = RELIABLE_RELIABILITY_QOS and check_mask(mem_endpoint_latch_data.field_flag,EMF_UDP_PORT_FLAG)) then - mem_cnt_next <= 17; - elsif check_mask(mem_endpoint_latch_data.field_flag,EMF_NEXT_SEQ_NR_FLAG) then mem_cnt_next <= 18; - elsif check_mask(mem_endpoint_latch_data.field_flag,EMF_LEASE_DEADLINE_FLAG) then + elsif (RELIABILITY_QOS = RELIABLE_RELIABILITY_QOS and check_mask(mem_endpoint_latch_data.field_flag,EMF_UDP_PORT_FLAG)) then + mem_cnt_next <= 19; + elsif check_mask(mem_endpoint_latch_data.field_flag,EMF_NEXT_SEQ_NR_FLAG) then mem_cnt_next <= 20; - else + elsif check_mask(mem_endpoint_latch_data.field_flag,EMF_LEASE_DEADLINE_FLAG) then mem_cnt_next <= 22; + elsif check_mask(mem_endpoint_latch_data.field_flag,EMF_LIFESPAN_DURATION_FLAG) then + mem_cnt_next <= 24; + else + mem_cnt_next <= 26; end if; end if; end if; -- READ Entity ID - when 12 => + when 14 => mem_ready_out <= '1'; -- Memory Flow Control Guard if (mem_valid_out = '1') then mem_endpoint_data_next.guid(3) <= mem_read_data; if check_mask(mem_endpoint_latch_data.field_flag,EMF_GUIDPREFIX_FLAG) then - mem_cnt_next <= 13; + mem_cnt_next <= 15; elsif (RELIABILITY_QOS = RELIABLE_RELIABILITY_QOS and check_mask(mem_endpoint_latch_data.field_flag,EMF_IPV4_ADDR_FLAG)) then - mem_cnt_next <= 16; - elsif (RELIABILITY_QOS = RELIABLE_RELIABILITY_QOS and check_mask(mem_endpoint_latch_data.field_flag,EMF_UDP_PORT_FLAG)) then - mem_cnt_next <= 17; - elsif check_mask(mem_endpoint_latch_data.field_flag,EMF_NEXT_SEQ_NR_FLAG) then mem_cnt_next <= 18; - elsif check_mask(mem_endpoint_latch_data.field_flag,EMF_LEASE_DEADLINE_FLAG) then + elsif (RELIABILITY_QOS = RELIABLE_RELIABILITY_QOS and check_mask(mem_endpoint_latch_data.field_flag,EMF_UDP_PORT_FLAG)) then + mem_cnt_next <= 19; + elsif check_mask(mem_endpoint_latch_data.field_flag,EMF_NEXT_SEQ_NR_FLAG) then mem_cnt_next <= 20; - elsif (RELIABILITY_QOS = RELIABLE_RELIABILITY_QOS and check_mask(mem_endpoint_latch_data.field_flag,EMF_RES_TIME_FLAG)) then + elsif check_mask(mem_endpoint_latch_data.field_flag,EMF_LEASE_DEADLINE_FLAG) then mem_cnt_next <= 22; + elsif check_mask(mem_endpoint_latch_data.field_flag,EMF_LIFESPAN_DURATION_FLAG) then + mem_cnt_next <= 24; + elsif (RELIABILITY_QOS = RELIABLE_RELIABILITY_QOS and check_mask(mem_endpoint_latch_data.field_flag,EMF_RES_TIME_FLAG)) then + mem_cnt_next <= 26; else -- DONE mem_stage_next <= IDLE; end if; end if; -- READ GUID Prefix 1/3 - when 13 => + when 15 => mem_ready_out <= '1'; -- Memory Flow Control Guard if (mem_valid_out = '1') then @@ -2337,7 +2391,7 @@ begin mem_cnt_next <= mem_cnt + 1; end if; -- READ GUID Prefix 2/3 - when 14 => + when 16 => mem_ready_out <= '1'; -- Memory Flow Control Guard if (mem_valid_out = '1') then @@ -2346,29 +2400,31 @@ begin mem_cnt_next <= mem_cnt + 1; end if; -- READ GUID Prefix 3/3 - when 15 => + when 17 => mem_ready_out <= '1'; -- Memory Flow Control Guard if (mem_valid_out = '1') then mem_endpoint_data_next.guid(2) <= mem_read_data; if (RELIABILITY_QOS = RELIABLE_RELIABILITY_QOS and check_mask(mem_endpoint_latch_data.field_flag,EMF_IPV4_ADDR_FLAG)) then - mem_cnt_next <= 16; - elsif (RELIABILITY_QOS = RELIABLE_RELIABILITY_QOS and check_mask(mem_endpoint_latch_data.field_flag,EMF_UDP_PORT_FLAG)) then - mem_cnt_next <= 17; - elsif check_mask(mem_endpoint_latch_data.field_flag,EMF_NEXT_SEQ_NR_FLAG) then mem_cnt_next <= 18; - elsif check_mask(mem_endpoint_latch_data.field_flag,EMF_LEASE_DEADLINE_FLAG) then + elsif (RELIABILITY_QOS = RELIABLE_RELIABILITY_QOS and check_mask(mem_endpoint_latch_data.field_flag,EMF_UDP_PORT_FLAG)) then + mem_cnt_next <= 19; + elsif check_mask(mem_endpoint_latch_data.field_flag,EMF_NEXT_SEQ_NR_FLAG) then mem_cnt_next <= 20; - elsif (RELIABILITY_QOS = RELIABLE_RELIABILITY_QOS and check_mask(mem_endpoint_latch_data.field_flag,EMF_RES_TIME_FLAG)) then + elsif check_mask(mem_endpoint_latch_data.field_flag,EMF_LEASE_DEADLINE_FLAG) then mem_cnt_next <= 22; + elsif check_mask(mem_endpoint_latch_data.field_flag,EMF_LIFESPAN_DURATION_FLAG) then + mem_cnt_next <= 24; + elsif (RELIABILITY_QOS = RELIABLE_RELIABILITY_QOS and check_mask(mem_endpoint_latch_data.field_flag,EMF_RES_TIME_FLAG)) then + mem_cnt_next <= 26; else -- DONE mem_stage_next <= IDLE; end if; end if; -- READ IPv4 Address - when 16 => + when 18 => -- Synthesis Guard if (RELIABILITY_QOS = RELIABLE_RELIABILITY_QOS) then mem_ready_out <= '1'; @@ -2377,13 +2433,15 @@ begin mem_endpoint_data_next.addr <= mem_read_data; if (RELIABILITY_QOS = RELIABLE_RELIABILITY_QOS and check_mask(mem_endpoint_latch_data.field_flag,EMF_UDP_PORT_FLAG)) then - mem_cnt_next <= 17; + mem_cnt_next <= 19; elsif check_mask(mem_endpoint_latch_data.field_flag,EMF_NEXT_SEQ_NR_FLAG) then - mem_cnt_next <= 18; - elsif check_mask(mem_endpoint_latch_data.field_flag,EMF_LEASE_DEADLINE_FLAG) then mem_cnt_next <= 20; - elsif (RELIABILITY_QOS = RELIABLE_RELIABILITY_QOS and check_mask(mem_endpoint_latch_data.field_flag,EMF_RES_TIME_FLAG)) then + elsif check_mask(mem_endpoint_latch_data.field_flag,EMF_LEASE_DEADLINE_FLAG) then mem_cnt_next <= 22; + elsif check_mask(mem_endpoint_latch_data.field_flag,EMF_LIFESPAN_DURATION_FLAG) then + mem_cnt_next <= 24; + elsif (RELIABILITY_QOS = RELIABLE_RELIABILITY_QOS and check_mask(mem_endpoint_latch_data.field_flag,EMF_RES_TIME_FLAG)) then + mem_cnt_next <= 26; else -- DONE mem_stage_next <= IDLE; @@ -2391,7 +2449,7 @@ begin end if; end if; -- READ UDP Port - when 17 => + when 19 => -- Synthesis Guard if (RELIABILITY_QOS = RELIABLE_RELIABILITY_QOS) then mem_ready_out <= '1'; @@ -2400,11 +2458,13 @@ begin mem_endpoint_data_next.portn <= mem_read_data(WORD_WIDTH-1 downto WORD_WIDTH-UDP_PORT_WIDTH); if check_mask(mem_endpoint_latch_data.field_flag,EMF_NEXT_SEQ_NR_FLAG) then - mem_cnt_next <= 18; - elsif check_mask(mem_endpoint_latch_data.field_flag,EMF_LEASE_DEADLINE_FLAG) then mem_cnt_next <= 20; - elsif (RELIABILITY_QOS = RELIABLE_RELIABILITY_QOS and check_mask(mem_endpoint_latch_data.field_flag,EMF_RES_TIME_FLAG)) then + elsif check_mask(mem_endpoint_latch_data.field_flag,EMF_LEASE_DEADLINE_FLAG) then mem_cnt_next <= 22; + elsif check_mask(mem_endpoint_latch_data.field_flag,EMF_LIFESPAN_DURATION_FLAG) then + mem_cnt_next <= 24; + elsif (RELIABILITY_QOS = RELIABLE_RELIABILITY_QOS and check_mask(mem_endpoint_latch_data.field_flag,EMF_RES_TIME_FLAG)) then + mem_cnt_next <= 26; else -- DONE mem_stage_next <= IDLE; @@ -2412,7 +2472,7 @@ begin end if; end if; -- READ Next Sequence Number 1/2 - when 18 => + when 20 => mem_ready_out <= '1'; -- Memory Flow Control Guard if (mem_valid_out = '1') then @@ -2421,23 +2481,25 @@ begin mem_cnt_next <= mem_cnt + 1; end if; -- READ Next Sequence Number 2/2 - when 19 => + when 21 => mem_ready_out <= '1'; -- Memory Flow Control Guard if (mem_valid_out = '1') then mem_endpoint_data_next.next_seq_nr(1) <= unsigned(mem_read_data); if check_mask(mem_endpoint_latch_data.field_flag,EMF_LEASE_DEADLINE_FLAG) then - mem_cnt_next <= 20; - elsif (RELIABILITY_QOS = RELIABLE_RELIABILITY_QOS and check_mask(mem_endpoint_latch_data.field_flag,EMF_RES_TIME_FLAG)) then mem_cnt_next <= 22; + elsif check_mask(mem_endpoint_latch_data.field_flag,EMF_LIFESPAN_DURATION_FLAG) then + mem_cnt_next <= 24; + elsif (RELIABILITY_QOS = RELIABLE_RELIABILITY_QOS and check_mask(mem_endpoint_latch_data.field_flag,EMF_RES_TIME_FLAG)) then + mem_cnt_next <= 26; else -- DONE mem_stage_next <= IDLE; end if; end if; -- READ Lease Deadline 1/2 - when 20 => + when 22 => mem_ready_out <= '1'; -- Memory Flow Control Guard if (mem_valid_out = '1') then @@ -2446,21 +2508,46 @@ begin mem_cnt_next <= mem_cnt + 1; end if; -- READ Lease Deadline 2/2 - when 21 => + when 23 => mem_ready_out <= '1'; -- Memory Flow Control Guard if (mem_valid_out = '1') then mem_endpoint_data_next.lease_deadline(1) <= unsigned(mem_read_data); + if check_mask(mem_endpoint_latch_data.field_flag,EMF_LIFESPAN_DURATION_FLAG) then + mem_cnt_next <= 24; + elsif (RELIABILITY_QOS = RELIABLE_RELIABILITY_QOS and check_mask(mem_endpoint_latch_data.field_flag,EMF_RES_TIME_FLAG)) then + mem_cnt_next <= 26; + else + -- DONE + mem_stage_next <= IDLE; + end if; + end if; + -- READ Lifespan Duration 1/2 + when 24 => + mem_ready_out <= '1'; + -- Memory Flow Control Guard + if (mem_valid_out = '1') then + mem_endpoint_data_next.lifespan(0) <= unsigned(mem_read_data); + + mem_cnt_next <= mem_cnt + 1; + end if; + -- READ Lifespan Duration 2/2 + when 25 => + mem_ready_out <= '1'; + -- Memory Flow Control Guard + if (mem_valid_out = '1') then + mem_endpoint_data_next.lifespan(1) <= unsigned(mem_read_data); + if (RELIABILITY_QOS = RELIABLE_RELIABILITY_QOS and check_mask(mem_endpoint_latch_data.field_flag,EMF_RES_TIME_FLAG)) then - mem_cnt_next <= 22; + mem_cnt_next <= 26; else -- DONE mem_stage_next <= IDLE; end if; end if; -- READ Response Time 1/2 - when 22 => + when 26 => -- Synthesis Guard if (RELIABILITY_QOS = RELIABLE_RELIABILITY_QOS) then mem_ready_out <= '1'; @@ -2472,7 +2559,7 @@ begin end if; end if; -- READ Response Time 2/2 - when 23 => + when 27 => -- Synthesis Guard if (RELIABILITY_QOS = RELIABLE_RELIABILITY_QOS) then mem_ready_out <= '1'; @@ -2585,6 +2672,22 @@ begin mem_valid_in <= '1'; mem_addr <= mem_addr_base + EMF_LEASE_DEADLINE_OFFSET + 1; mem_write_data <= std_logic_vector(mem_endpoint_latch_data.lease_deadline(1)); + if (mem_ready_in = '1') then + mem_cnt_next <= mem_cnt + 1; + end if; + -- Lifespan Duration 1/2 + when 10 => + mem_valid_in <= '1'; + mem_addr <= mem_addr_base + EMF_LIFESPAN_DURATION_OFFSET; + mem_write_data <= std_logic_vector(mem_endpoint_latch_data.lifespan(0)); + if (mem_ready_in = '1') then + mem_cnt_next <= mem_cnt + 1; + end if; + -- Lifespan Duration 2/2 + when 11 => + mem_valid_in <= '1'; + mem_addr <= mem_addr_base + EMF_LIFESPAN_DURATION_OFFSET + 1; + mem_write_data <= std_logic_vector(mem_endpoint_latch_data.lifespan(1)); if (mem_ready_in = '1') then if (RELIABILITY_QOS = RELIABLE_RELIABILITY_QOS) then mem_cnt_next <= mem_cnt + 1; @@ -2594,7 +2697,7 @@ begin end if; end if; -- Response Time 1/2 - when 10 => + when 12 => -- Synthesis Guard if (RELIABILITY_QOS = RELIABLE_RELIABILITY_QOS) then mem_valid_in <= '1'; @@ -2605,7 +2708,7 @@ begin end if; end if; -- Response Time 2/2 - when 11 => + when 13 => if (RELIABILITY_QOS = RELIABLE_RELIABILITY_QOS) then mem_valid_in <= '1'; mem_addr <= mem_addr_base + EMF_RES_TIME_OFFSET + 1; @@ -2636,8 +2739,10 @@ begin mem_cnt_next <= 2; elsif check_mask(mem_endpoint_latch_data.field_flag,EMF_LEASE_DEADLINE_FLAG) then mem_cnt_next <= 4; - elsif (RELIABILITY_QOS = RELIABLE_RELIABILITY_QOS and check_mask(mem_endpoint_latch_data.field_flag,EMF_RES_TIME_FLAG)) then + elsif check_mask(mem_endpoint_latch_data.field_flag,EMF_LIFESPAN_DURATION_FLAG) then mem_cnt_next <= 6; + elsif (RELIABILITY_QOS = RELIABLE_RELIABILITY_QOS and check_mask(mem_endpoint_latch_data.field_flag,EMF_RES_TIME_FLAG)) then + mem_cnt_next <= 8; else -- DONE mem_stage_next <= IDLE; @@ -2658,8 +2763,10 @@ begin mem_cnt_next <= 2; elsif check_mask(mem_endpoint_latch_data.field_flag,EMF_LEASE_DEADLINE_FLAG) then mem_cnt_next <= 4; - elsif (RELIABILITY_QOS = RELIABLE_RELIABILITY_QOS and check_mask(mem_endpoint_latch_data.field_flag,EMF_RES_TIME_FLAG)) then + elsif check_mask(mem_endpoint_latch_data.field_flag,EMF_LIFESPAN_DURATION_FLAG) then mem_cnt_next <= 6; + elsif (RELIABILITY_QOS = RELIABLE_RELIABILITY_QOS and check_mask(mem_endpoint_latch_data.field_flag,EMF_RES_TIME_FLAG)) then + mem_cnt_next <= 8; else -- DONE mem_stage_next <= IDLE; @@ -2685,8 +2792,10 @@ begin if (mem_ready_in = '1') then if check_mask(mem_endpoint_latch_data.field_flag,EMF_LEASE_DEADLINE_FLAG) then mem_cnt_next <= 4; - elsif (RELIABILITY_QOS = RELIABLE_RELIABILITY_QOS and check_mask(mem_endpoint_latch_data.field_flag,EMF_RES_TIME_FLAG)) then + elsif check_mask(mem_endpoint_latch_data.field_flag,EMF_LIFESPAN_DURATION_FLAG) then mem_cnt_next <= 6; + elsif (RELIABILITY_QOS = RELIABLE_RELIABILITY_QOS and check_mask(mem_endpoint_latch_data.field_flag,EMF_RES_TIME_FLAG)) then + mem_cnt_next <= 8; else -- DONE mem_stage_next <= IDLE; @@ -2709,15 +2818,41 @@ begin mem_endpoint_data_next.lease_deadline <= mem_endpoint_latch_data.lease_deadline; -- Memory Flow Control Guard if (mem_ready_in = '1') then - if (RELIABILITY_QOS = RELIABLE_RELIABILITY_QOS and check_mask(mem_endpoint_latch_data.field_flag,EMF_RES_TIME_FLAG)) then + if check_mask(mem_endpoint_latch_data.field_flag,EMF_LIFESPAN_DURATION_FLAG) then mem_cnt_next <= 6; + elsif (RELIABILITY_QOS = RELIABLE_RELIABILITY_QOS and check_mask(mem_endpoint_latch_data.field_flag,EMF_RES_TIME_FLAG)) then + mem_cnt_next <= 8; + else + -- DONE + mem_stage_next <= IDLE; + end if; + end if; + -- Lifespan Duration 1/2 + when 6 => + mem_valid_in <= '1'; + mem_addr <= mem_addr_base + EMF_LIFESPAN_DURATION_OFFSET; + mem_write_data <= std_logic_vector(mem_endpoint_latch_data.lifespan(0)); + -- Memory Flow Control Guard + if (mem_ready_in = '1') then + mem_cnt_next <= mem_cnt + 1; + end if; + -- Lifespan Duration 2/2 + when 7 => + mem_valid_in <= '1'; + mem_addr <= mem_addr_base + EMF_LIFESPAN_DURATION_OFFSET + 1; + mem_write_data <= std_logic_vector(mem_endpoint_latch_data.lifespan(1)); + mem_endpoint_data_next.lifespan <= mem_endpoint_latch_data.lifespan; + -- Memory Flow Control Guard + if (mem_ready_in = '1') then + if (RELIABILITY_QOS = RELIABLE_RELIABILITY_QOS and check_mask(mem_endpoint_latch_data.field_flag,EMF_RES_TIME_FLAG)) then + mem_cnt_next <= 8; else -- DONE mem_stage_next <= IDLE; end if; end if; -- Response Time 1/2 - when 6 => + when 8 => -- Synthesis Guard if (RELIABILITY_QOS = RELIABLE_RELIABILITY_QOS) then mem_valid_in <= '1'; @@ -2729,7 +2864,7 @@ begin end if; end if; -- Response Time 2/2 - when 7 => + when 9 => -- Synthesis Guard if (RELIABILITY_QOS = RELIABLE_RELIABILITY_QOS) then mem_valid_in <= '1'; @@ -2906,8 +3041,10 @@ begin mem_cnt_next <= 6; elsif check_mask(mem_endpoint_latch_data.field_flag,EMF_LEASE_DEADLINE_FLAG) then mem_cnt_next <= 8; - elsif (RELIABILITY_QOS = RELIABLE_RELIABILITY_QOS and check_mask(mem_endpoint_latch_data.field_flag,EMF_RES_TIME_FLAG)) then + elsif check_mask(mem_endpoint_latch_data.field_flag,EMF_LIFESPAN_DURATION_FLAG) then mem_cnt_next <= 10; + elsif (RELIABILITY_QOS = RELIABLE_RELIABILITY_QOS and check_mask(mem_endpoint_latch_data.field_flag,EMF_RES_TIME_FLAG)) then + mem_cnt_next <= 12; else -- DONE mem_stage_next <= IDLE; diff --git a/src/rtps_test_package.vhd b/src/rtps_test_package.vhd index 2ab36e6..3b6a12f 100644 --- a/src/rtps_test_package.vhd +++ b/src/rtps_test_package.vhd @@ -24,9 +24,9 @@ package rtps_test_package is -- rtps_builtin_endpoint Participant Frame Size constant PARTICIPANT_FRAME_SIZE : natural := 24; -- rtps_reader Endpoint Frame Size (RELIABLE=TRUE) - constant WRITER_ENDPOINT_FRAME_SIZE_A : natural := 12; + constant WRITER_ENDPOINT_FRAME_SIZE_A : natural := 14; -- rtps_reader Endpoint Frame Size (RELIABLE=FALSE) - constant WRITER_ENDPOINT_FRAME_SIZE_B : natural := 8; + constant WRITER_ENDPOINT_FRAME_SIZE_B : natural := 10; -- rtps_writer Endpoint Frame Size (RELIABLE=TRUE) constant READER_ENDPOINT_FRAME_SIZE_A : natural := 15; -- rtps_writer Endpoint Frame Size (RELIABLE=FALSE) @@ -473,19 +473,19 @@ package rtps_test_package is -- pos ID (Memory Position) of Source Remote Writer -- output Destination of generated output procedure gen_add_cache_change_dds(ref : in CACHE_CHANGE_TYPE; lifespan_deadline : in TIME_TYPE; pos : in natural; output : inout TEST_PACKET_TYPE); - -- Generate a rtps_reader memory Participant Frame based on "ref". (A Version) - function gen_reader_endpoint_mem_frame_a (ref : ENDPOINT_DATA_TYPE) return TEST_READER_ENDPOINT_MEMORY_FRAME_TYPE_A; - -- Generate a rtps_reader memory Participant Frame based on "ref". (B Version) - function gen_reader_endpoint_mem_frame_b (ref : ENDPOINT_DATA_TYPE) return TEST_READER_ENDPOINT_MEMORY_FRAME_TYPE_B; - - - -- *RTPS WRITER* -- Generate a rtps_writer memory Participant Frame based on "ref". (A Version) function gen_writer_endpoint_mem_frame_a (ref : ENDPOINT_DATA_TYPE) return TEST_WRITER_ENDPOINT_MEMORY_FRAME_TYPE_A; -- Generate a rtps_writer memory Participant Frame based on "ref". (B Version) function gen_writer_endpoint_mem_frame_b (ref : ENDPOINT_DATA_TYPE) return TEST_WRITER_ENDPOINT_MEMORY_FRAME_TYPE_B; + -- *RTPS WRITER* + -- Generate a rtps_reader memory Participant Frame based on "ref". (A Version) + function gen_reader_endpoint_mem_frame_a (ref : ENDPOINT_DATA_TYPE) return TEST_READER_ENDPOINT_MEMORY_FRAME_TYPE_A; + -- Generate a rtps_reader memory Participant Frame based on "ref". (B Version) + function gen_reader_endpoint_mem_frame_b (ref : ENDPOINT_DATA_TYPE) return TEST_READER_ENDPOINT_MEMORY_FRAME_TYPE_B; + + -- *RTPS_HANDLER* -- Generates RTPS_HANDLER output -- ref RTPS Submessage @@ -1960,6 +1960,20 @@ package body rtps_test_package is else ret(i).data := (others => '-'); end if; + -- Lifespan Duration 1/2 + when 10 => + if (ref.match = MATCH) then + ret(i).data := std_logic_vector(ref.lifespan(0)); + else + ret(i).data := (others => '-'); + end if; + -- Lifespan Duration 2/2 + when 11 => + if (ref.match = MATCH) then + ret(i).data := std_logic_vector(ref.lifespan(1)); + else + ret(i).data := (others => '-'); + end if; -- Other Fields Ignored when others => ret(i).data := (others => '-'); @@ -2013,6 +2027,20 @@ package body rtps_test_package is else ret(i).data := (others => '-'); end if; + -- Lifespan Duration 1/2 + when 8 => + if (ref.match = MATCH) then + ret(i).data := std_logic_vector(ref.lifespan(0)); + else + ret(i).data := (others => '-'); + end if; + -- Lifespan Duration 2/2 + when 9 => + if (ref.match = MATCH) then + ret(i).data := std_logic_vector(ref.lifespan(1)); + else + ret(i).data := (others => '-'); + end if; -- Other Fields Ignored when others => ret(i).data := (others => '-'); @@ -2655,6 +2683,13 @@ package body rtps_test_package is output.data(output.length)(READER_IS_BEST_EFFORT_FLAG) := '1' when (ref.reliability = BEST_EFFORT_RELIABILITY_QOS) else '0'; end if; output.length := output.length + 1; + -- Lifespan Duration + if (not ref.reader) then + output.data(output.length) := std_logic_vector(ref.lifespan(0)); + output.length := output.length + 1; + output.data(output.length) := std_logic_vector(ref.lifespan(1)); + output.length := output.length + 1; + end if; end if; -- Mark Last Word