diff --git a/sim/L0_rtps_builtin_endpoint_test1.do b/sim/L0_rtps_builtin_endpoint_test1.do index 5962c1f..4ff88a2 100644 --- a/sim/L0_rtps_builtin_endpoint_test1.do +++ b/sim/L0_rtps_builtin_endpoint_test1.do @@ -1,64 +1,58 @@ onerror {resume} quietly WaveActivateNextPane {} 0 add wave -noupdate -divider SYSTEM -add wave -noupdate /l0_rtps_builtin_endpoint_test1/uut/clk -add wave -noupdate /l0_rtps_builtin_endpoint_test1/uut/reset +add wave -noupdate /l0_rtps_builtin_endpoint_test2/uut/clk +add wave -noupdate /l0_rtps_builtin_endpoint_test2/uut/reset add wave -noupdate -divider INPUT -add wave -noupdate /l0_rtps_builtin_endpoint_test1/uut/empty -add wave -noupdate /l0_rtps_builtin_endpoint_test1/uut/rd -add wave -noupdate -radix hexadecimal /l0_rtps_builtin_endpoint_test1/uut/data_in -add wave -noupdate /l0_rtps_builtin_endpoint_test1/uut/last_word_in -add wave -noupdate /l0_rtps_builtin_endpoint_test1/uut/last_word_in_latch -add wave -noupdate -divider {MAIN FSM} -add wave -noupdate /l0_rtps_builtin_endpoint_test1/uut/stage -add wave -noupdate /l0_rtps_builtin_endpoint_test1/uut/stage_next -add wave -noupdate /l0_rtps_builtin_endpoint_test1/uut/cnt -add wave -noupdate /l0_rtps_builtin_endpoint_test1/uut/endpoint_mask -add wave -noupdate /l0_rtps_builtin_endpoint_test1/uut/participant_match -add wave -noupdate -divider {MEM FSM} -add wave -noupdate -group MEMORY -radix unsigned /l0_rtps_builtin_endpoint_test1/uut/mem_ctrl_inst/addr -add wave -noupdate -group MEMORY /l0_rtps_builtin_endpoint_test1/uut/mem_ctrl_inst/read -add wave -noupdate -group MEMORY /l0_rtps_builtin_endpoint_test1/uut/mem_ctrl_inst/ready_in -add wave -noupdate -group MEMORY /l0_rtps_builtin_endpoint_test1/uut/mem_ctrl_inst/valid_in -add wave -noupdate -group MEMORY -radix hexadecimal /l0_rtps_builtin_endpoint_test1/uut/mem_ctrl_inst/data_in -add wave -noupdate -group MEMORY /l0_rtps_builtin_endpoint_test1/uut/mem_ctrl_inst/ready_out -add wave -noupdate -group MEMORY /l0_rtps_builtin_endpoint_test1/uut/mem_ctrl_inst/valid_out -add wave -noupdate -group MEMORY -radix hexadecimal /l0_rtps_builtin_endpoint_test1/uut/mem_ctrl_inst/data_out -add wave -noupdate /l0_rtps_builtin_endpoint_test1/uut/mem_op_start -add wave -noupdate /l0_rtps_builtin_endpoint_test1/uut/mem_opcode -add wave -noupdate /l0_rtps_builtin_endpoint_test1/uut/mem_op_done -add wave -noupdate /l0_rtps_builtin_endpoint_test1/uut/mem_stage -add wave -noupdate /l0_rtps_builtin_endpoint_test1/uut/mem_stage_next -add wave -noupdate /l0_rtps_builtin_endpoint_test1/uut/mem_cnt -add wave -noupdate -radix unsigned /l0_rtps_builtin_endpoint_test1/uut/mem_addr_base -add wave -noupdate -radix unsigned /l0_rtps_builtin_endpoint_test1/uut/mem_empty_head -add wave -noupdate -radix unsigned /l0_rtps_builtin_endpoint_test1/uut/mem_occupied_head -add wave -noupdate -childformat {{/l0_rtps_builtin_endpoint_test1/uut/participant_data.guid_prefix -radix hexadecimal} {/l0_rtps_builtin_endpoint_test1/uut/participant_data.meta_addr -radix hexadecimal} {/l0_rtps_builtin_endpoint_test1/uut/participant_data.def_addr -radix hexadecimal} {/l0_rtps_builtin_endpoint_test1/uut/participant_data.meta_port -radix hexadecimal} {/l0_rtps_builtin_endpoint_test1/uut/participant_data.def_port -radix hexadecimal} {/l0_rtps_builtin_endpoint_test1/uut/participant_data.lease_duration -radix unsigned} {/l0_rtps_builtin_endpoint_test1/uut/participant_data.lease_deadline -radix unsigned} {/l0_rtps_builtin_endpoint_test1/uut/participant_data.heartbeat_res_time -radix unsigned} {/l0_rtps_builtin_endpoint_test1/uut/participant_data.acknack_res_time -radix unsigned} {/l0_rtps_builtin_endpoint_test1/uut/participant_data.spdp_seq_nr -radix unsigned} {/l0_rtps_builtin_endpoint_test1/uut/participant_data.pub_seq_nr -radix unsigned} {/l0_rtps_builtin_endpoint_test1/uut/participant_data.sub_seq_nr -radix unsigned} {/l0_rtps_builtin_endpoint_test1/uut/participant_data.mes_seq_nr -radix unsigned}} -subitemconfig {/l0_rtps_builtin_endpoint_test1/uut/participant_data.guid_prefix {-height 15 -radix hexadecimal} /l0_rtps_builtin_endpoint_test1/uut/participant_data.meta_addr {-height 15 -radix hexadecimal} /l0_rtps_builtin_endpoint_test1/uut/participant_data.def_addr {-height 15 -radix hexadecimal} /l0_rtps_builtin_endpoint_test1/uut/participant_data.meta_port {-height 15 -radix hexadecimal} /l0_rtps_builtin_endpoint_test1/uut/participant_data.def_port {-height 15 -radix hexadecimal} /l0_rtps_builtin_endpoint_test1/uut/participant_data.lease_duration {-height 15 -radix unsigned} /l0_rtps_builtin_endpoint_test1/uut/participant_data.lease_deadline {-height 15 -radix unsigned} /l0_rtps_builtin_endpoint_test1/uut/participant_data.heartbeat_res_time {-height 15 -radix unsigned} /l0_rtps_builtin_endpoint_test1/uut/participant_data.acknack_res_time {-height 15 -radix unsigned} /l0_rtps_builtin_endpoint_test1/uut/participant_data.spdp_seq_nr {-height 15 -radix unsigned} /l0_rtps_builtin_endpoint_test1/uut/participant_data.pub_seq_nr {-height 15 -radix unsigned} /l0_rtps_builtin_endpoint_test1/uut/participant_data.sub_seq_nr {-height 15 -radix unsigned} /l0_rtps_builtin_endpoint_test1/uut/participant_data.mes_seq_nr {-height 15 -radix unsigned}} /l0_rtps_builtin_endpoint_test1/uut/participant_data -add wave -noupdate /l0_rtps_builtin_endpoint_test1/uut/current_pmf -add wave -noupdate /l0_rtps_builtin_endpoint_test1/uut/mem_field_flags -add wave -noupdate -divider GUARD -add wave -noupdate -radix unsigned /l0_rtps_builtin_endpoint_test1/uut/read_cnt -add wave -noupdate -radix unsigned /l0_rtps_builtin_endpoint_test1/uut/parameter_end -add wave -noupdate /l0_rtps_builtin_endpoint_test1/uut/parse_prc/rd_guard -add wave -noupdate -divider MISC -add wave -noupdate -radix unsigned /l0_rtps_builtin_endpoint_test1/uut/seq_nr -add wave -noupdate -divider TESTBENCH -add wave -noupdate -expand -group TESTBENCH /l0_rtps_builtin_endpoint_test1/start -add wave -noupdate -expand -group TESTBENCH /l0_rtps_builtin_endpoint_test1/stim_stage -add wave -noupdate -expand -group TESTBENCH /l0_rtps_builtin_endpoint_test1/stimulus.length -add wave -noupdate -expand -group TESTBENCH /l0_rtps_builtin_endpoint_test1/cnt_stim -add wave -noupdate -expand -group TESTBENCH /l0_rtps_builtin_endpoint_test1/packet_sent -add wave -noupdate -expand -group TESTBENCH /l0_rtps_builtin_endpoint_test1/mem_check_done -add wave -noupdate -expand -group TESTBENCH /l0_rtps_builtin_endpoint_test1/check_done +add wave -noupdate /l0_rtps_builtin_endpoint_test2/uut/empty +add wave -noupdate /l0_rtps_builtin_endpoint_test2/uut/rd +add wave -noupdate -radix hexadecimal /l0_rtps_builtin_endpoint_test2/uut/data_in +add wave -noupdate /l0_rtps_builtin_endpoint_test2/uut/last_word_in +add wave -noupdate /l0_rtps_builtin_endpoint_test2/uut/last_word_in_latch add wave -noupdate -divider OUTPUT -add wave -noupdate -radix hexadecimal /l0_rtps_builtin_endpoint_test1/uut/data_out -add wave -noupdate /l0_rtps_builtin_endpoint_test1/uut/endpoint_full -add wave -noupdate /l0_rtps_builtin_endpoint_test1/uut/endpoint_wr -add wave -noupdate /l0_rtps_builtin_endpoint_test1/uut/rtps_wr -add wave -noupdate /l0_rtps_builtin_endpoint_test1/uut/rtps_full -add wave -noupdate /l0_rtps_builtin_endpoint_test1/uut/last_word_out +add wave -noupdate -group ENDPOINTS /l0_rtps_builtin_endpoint_test2/uut/full_ue +add wave -noupdate -group ENDPOINTS /l0_rtps_builtin_endpoint_test2/uut/wr_ue +add wave -noupdate -group ENDPOINTS -radix hexadecimal /l0_rtps_builtin_endpoint_test2/uut/data_out_ue +add wave -noupdate -group ENDPOINTS /l0_rtps_builtin_endpoint_test2/uut/last_word_out_ue +add wave -noupdate -group {RTPS OUT} /l0_rtps_builtin_endpoint_test2/uut/full_ro +add wave -noupdate -group {RTPS OUT} /l0_rtps_builtin_endpoint_test2/uut/wr_ro +add wave -noupdate -group {RTPS OUT} -radix hexadecimal /l0_rtps_builtin_endpoint_test2/uut/data_out_ro +add wave -noupdate -group {RTPS OUT} /l0_rtps_builtin_endpoint_test2/uut/last_word_out_ro +add wave -noupdate -divider TESTBENCH +add wave -noupdate /l0_rtps_builtin_endpoint_test2/start +add wave -noupdate /l0_rtps_builtin_endpoint_test2/stim_stage +add wave -noupdate /l0_rtps_builtin_endpoint_test2/stimulus.length +add wave -noupdate /l0_rtps_builtin_endpoint_test2/cnt_stim +add wave -noupdate /l0_rtps_builtin_endpoint_test2/packet_sent +add wave -noupdate /l0_rtps_builtin_endpoint_test2/SB.ItemNumberVar +add wave -noupdate -divider {MAIN FSM} +add wave -noupdate /l0_rtps_builtin_endpoint_test2/uut/stage +add wave -noupdate /l0_rtps_builtin_endpoint_test2/uut/stage_next +add wave -noupdate /l0_rtps_builtin_endpoint_test2/uut/cnt +add wave -noupdate /l0_rtps_builtin_endpoint_test2/uut/endpoint_mask +add wave -noupdate /l0_rtps_builtin_endpoint_test2/uut/participant_match +add wave -noupdate -divider {MEM FSM} +add wave -noupdate -group MEM_FSM /l0_rtps_builtin_endpoint_test2/uut/mem_opcode +add wave -noupdate -group MEM_FSM /l0_rtps_builtin_endpoint_test2/uut/mem_op_start +add wave -noupdate -group MEM_FSM /l0_rtps_builtin_endpoint_test2/uut/mem_op_done +add wave -noupdate -group MEM_FSM /l0_rtps_builtin_endpoint_test2/uut/mem_stage +add wave -noupdate -group MEM_FSM /l0_rtps_builtin_endpoint_test2/uut/mem_stage_next +add wave -noupdate -group MEM_FSM /l0_rtps_builtin_endpoint_test2/uut/mem_cnt +add wave -noupdate -group MEM_FSM -radix unsigned /l0_rtps_builtin_endpoint_test2/uut/mem_addr_base +add wave -noupdate -divider GUARD +add wave -noupdate -radix unsigned /l0_rtps_builtin_endpoint_test2/uut/read_cnt +add wave -noupdate -radix unsigned /l0_rtps_builtin_endpoint_test2/uut/parameter_end +add wave -noupdate /l0_rtps_builtin_endpoint_test2/uut/parse_prc/rd_guard +add wave -noupdate -divider MEMORY +add wave -noupdate -group MEMORY -radix unsigned /l0_rtps_builtin_endpoint_test2/uut/mem_ctrl_inst/ram_inst/addr +add wave -noupdate -group MEMORY /l0_rtps_builtin_endpoint_test2/uut/mem_ctrl_inst/ram_inst/wen +add wave -noupdate -group MEMORY /l0_rtps_builtin_endpoint_test2/uut/mem_ctrl_inst/ram_inst/ren +add wave -noupdate -group MEMORY -radix hexadecimal /l0_rtps_builtin_endpoint_test2/uut/mem_ctrl_inst/ram_inst/wr_data +add wave -noupdate -group MEMORY -radix hexadecimal /l0_rtps_builtin_endpoint_test2/uut/mem_ctrl_inst/ram_inst/rd_data +add wave -noupdate -divider MISC +add wave -noupdate -radix unsigned /l0_rtps_builtin_endpoint_test2/uut/seq_nr TreeUpdate [SetDefaultTree] -WaveRestoreCursors {{Cursor 1} {82041201 ps} 0} +WaveRestoreCursors {Begin {63775000 ps} 1} {Error {66975000 ps} 1} {Cursor {33675000 ps} 0} quietly wave cursor active 1 configure wave -namecolwidth 149 configure wave -valuecolwidth 144 @@ -72,6 +66,6 @@ configure wave -gridoffset 0 configure wave -gridperiod 1 configure wave -griddelta 40 configure wave -timeline 0 -configure wave -timelineunits ps +configure wave -timelineunits ns update -WaveRestoreZoom {81521938 ps} {82670280 ps} +WaveRestoreZoom {63200829 ps} {64349171 ps} diff --git a/src/Tests/Level_0/L0_rtps_builtin_endpoint_test1.vhd b/src/Tests/Level_0/L0_rtps_builtin_endpoint_test1.vhd index b0b7f26..d3be673 100644 --- a/src/Tests/Level_0/L0_rtps_builtin_endpoint_test1.vhd +++ b/src/Tests/Level_0/L0_rtps_builtin_endpoint_test1.vhd @@ -206,8 +206,10 @@ begin participant.availableBuiltinEndpoints(DISC_BUILTIN_ENDPOINT_PUBLICATIONS_DETECTOR) := '1'; participant.availableBuiltinEndpoints(DISC_BUILTIN_ENDPOINT_PUBLICATIONS_ANNOUNCER) := '1'; m1 := participant; + report "DOMAIN_ID: " & to_hstring(DOMAIN_ID); + report "PARTICIPANT DOMAIN_ID: " & to_hstring(participant.domainId); gen_participant_data(participant, rtps_sub.data); - gen_sentinel(rtps_sub.data); + gen_sentinel('1', rtps_sub.data); gen_rtps_handler_out(rtps_sub, participant, stimulus); SB_mem.Push(gen_participant_mem_frame(participant)); start_test; diff --git a/src/Tests/Level_0/L0_rtps_builtin_endpoint_test2.vhd b/src/Tests/Level_0/L0_rtps_builtin_endpoint_test2.vhd index a73f5da..d4800ef 100644 --- a/src/Tests/Level_0/L0_rtps_builtin_endpoint_test2.vhd +++ b/src/Tests/Level_0/L0_rtps_builtin_endpoint_test2.vhd @@ -21,7 +21,7 @@ use work.rtps_test_package.all; -- * TOPIC_2 -- * TYPE_2 -- WRITER 3 --- * RELIABILITY BEST_EFFORT +-- * RELIABILITY BEST_EFFORT -- WRITER 4 -- * DURABILITY TRANSIENT_LOCAL -- * PRESENTATION TOPIC @@ -59,36 +59,36 @@ use work.rtps_test_package.all; -- * TOPIC_2 -- * TYPE_2 -- READER 3 --- * DURABILITY TRANSIENT_LOCAL +-- * DURABILITY TRANSIENT_LOCAL -- READER 4 --- * PRESENTATION TOPIC +-- * PRESENTATION TOPIC -- READER 5 --- * COHERENT_ACCESS TRUE +-- * COHERENT_ACCESS TRUE -- READER 6 --- * COHERENT_ACCESS TRUE --- * ORDERED_ACCESS TRUE +-- * COHERENT_ACCESS TRUE +-- * ORDERED_ACCESS TRUE -- READER 7 --- * DEADLINE 10s --- * TIME_BASED_FILTER 5s +-- * DEADLINE 10s +-- * TIME_BASED_FILTER 5s -- READER 8 --- * DEADLINE 20s --- * TIME_BASED_FILTER 5s +-- * DEADLINE 20s +-- * TIME_BASED_FILTER 5s -- READER 9 --- * LATENCY_BUDGET 500ms +-- * LATENCY_BUDGET 500ms -- READER 10 --- * LATENCY_BUDGET 2s +-- * LATENCY_BUDGET 2s -- READER 11 --- * LIVELINESS MANUAL_BY_PARTICIPANT --- * LEASE_DURATION 20s +-- * LIVELINESS MANUAL_BY_PARTICIPANT +-- * LEASE_DURATION 20s -- READER 12 --- * LIVELINESS MANUAL_BY_TOPIC --- * LEASE_DURATION 20s +-- * LIVELINESS MANUAL_BY_TOPIC +-- * LEASE_DURATION 20s -- READER 13 --- * LEASE_DURATION 10s +-- * LEASE_DURATION 10s -- READER 14 --- * LEASE_DURATION 20s +-- * LEASE_DURATION 20s -- READER 15 --- * RELIABILITY BEST_EFFORT +-- * RELIABILITY BEST_EFFORT -- READER 16 -- * DESTINATION_ORDER BY_SOURCE_TIMESTAMP @@ -379,7 +379,7 @@ begin sub.writerSN := p_sn; participant := p1; gen_participant_data(participant, sub.data); - gen_sentinel(sub.data); + gen_sentinel('1', sub.data); gen_rtps_handler_out(sub, participant, stimulus); start_test; wait_on_complete; @@ -427,7 +427,7 @@ begin endpoint.participant := p1; endpoint.littleEndian:= '1'; gen_endpoint_data(endpoint, sub_p.data); - gen_sentinel(sub_p.data); + gen_sentinel('1', sub_p.data); gen_rtps_handler_out(sub_p, endpoint, stimulus); wr_sig := gen_wr(i, FALSE); push_endpoint_reference; @@ -464,7 +464,7 @@ begin endpoint.participant := p1; endpoint.littleEndian:= '1'; gen_endpoint_data(endpoint, sub_s.data); - gen_sentinel(sub_s.data); + gen_sentinel('1', sub_s.data); gen_rtps_handler_out(sub_s, endpoint, stimulus); wr_sig := gen_wr(i, TRUE); push_endpoint_reference; @@ -475,14 +475,14 @@ begin p1_sns := p1_sns + 1; end loop; - -- *Remove Participant 1* + -- *Remove Participant 1 [Little Endian]* Log("Unmatch Participant 1", INFO); sub.writerSN := p_sn; participant := p1; participant.domainId := int(2, DOMAIN_ID_WIDTH); participant.match := UNMATCH; gen_participant_data(participant, sub.data); - gen_sentinel(sub.data); + gen_sentinel('1', sub.data); gen_rtps_handler_out(sub, participant, stimulus); push_participant_reference; start_test; @@ -613,7 +613,7 @@ begin endpoint.topic_name := ENDPOINT_TOPIC(0); endpoint.type_name := ENDPOINT_TYPE(0); gen_endpoint_data(endpoint, sub_p.data); - gen_parameter(PID_PARTITION, partition, sub_p.data); + gen_parameter(PID_PARTITION, partition, '0', sub_p.data); gen_sentinel(sub_p.data); gen_rtps_handler_out(sub_p, endpoint, stimulus); wr_sig := (others => '0'); @@ -724,7 +724,7 @@ begin endpoint.topic_name := ENDPOINT_TOPIC(0); endpoint.type_name := ENDPOINT_TYPE(0); gen_endpoint_data(endpoint, sub_s.data); - gen_parameter(PID_PARTITION, partition, sub_s.data); + gen_parameter(PID_PARTITION, partition, '0', sub_s.data); gen_sentinel(sub_s.data); gen_rtps_handler_out(sub_s, endpoint, stimulus); wr_sig := (others => '0'); 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 0853f5c..7a17835 100644 --- a/src/Tests/Level_0/L0_rtps_reader_test2_tbk.vhd +++ b/src/Tests/Level_0/L0_rtps_reader_test2_tbk.vhd @@ -1029,7 +1029,7 @@ begin cc.instance := gen_key_hash; endpoint.lifespan := life_ts; gen_inline_qos(cc, endpoint, TRUE, '1', sub.inlineQos); - gen_sentinel(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); push_reference(TRUE); 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 2525824..ec6b1b8 100644 --- a/src/Tests/Level_0/L0_rtps_reader_test2_trk.vhd +++ b/src/Tests/Level_0/L0_rtps_reader_test2_trk.vhd @@ -1039,7 +1039,7 @@ begin cc.instance := gen_key_hash; endpoint.lifespan := life_ts; gen_inline_qos(cc, endpoint, TRUE, '1', sub.inlineQos); - gen_sentinel(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); push_reference(TRUE); 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 ee9dcb5..d24f0cd 100644 --- a/src/Tests/Level_0/L0_rtps_reader_test2_vbk.vhd +++ b/src/Tests/Level_0/L0_rtps_reader_test2_vbk.vhd @@ -1010,7 +1010,7 @@ begin cc.instance := gen_key_hash; endpoint.lifespan := life_ts; gen_inline_qos(cc, endpoint, TRUE, '1', sub.inlineQos); - gen_sentinel(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); push_reference(TRUE); 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 6b99a81..8ed513e 100644 --- a/src/Tests/Level_0/L0_rtps_reader_test2_vrk.vhd +++ b/src/Tests/Level_0/L0_rtps_reader_test2_vrk.vhd @@ -1025,7 +1025,7 @@ begin cc.instance := gen_key_hash; endpoint.lifespan := life_ts; gen_inline_qos(cc, endpoint, TRUE, '1', sub.inlineQos); - gen_sentinel(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); push_reference(TRUE); 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 0dff8b1..6c50b69 100644 --- a/src/Tests/Level_0/L0_rtps_reader_test2_vrn.vhd +++ b/src/Tests/Level_0/L0_rtps_reader_test2_vrn.vhd @@ -1029,7 +1029,7 @@ begin cc.instance := gen_key_hash; endpoint.lifespan := life_ts; gen_inline_qos(cc, endpoint, TRUE, '1', sub.inlineQos); - gen_sentinel(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); diff --git a/src/rtps_builtin_endpoint.vhd b/src/rtps_builtin_endpoint.vhd index d2c8dde..c84856b 100644 --- a/src/rtps_builtin_endpoint.vhd +++ b/src/rtps_builtin_endpoint.vhd @@ -411,7 +411,6 @@ architecture arch of rtps_builtin_endpoint is -- RTPS PARAMETER LIST HEADER alias parameter_id : std_logic_vector(PARAMETER_ID_WIDTH-1 downto 0) is data_in(WORD_WIDTH-1 downto WORD_WIDTH-PARAMETER_ID_WIDTH); alias parameter_length : std_logic_vector(PARAMETER_LENGTH_WIDTH-1 downto 0) is data_in(PARAMETER_LENGTH_WIDTH-1 downto 0); - alias must_understand : std_logic is parameter_id(PARAMETER_ID_WIDTH-1); -- RTPS DATA PAYLOAD HEADER alias representation_id : std_logic_vector(PAYLOAD_REPRESENTATION_ID_WIDTH-1 downto 0) is data_in(WORD_WIDTH-1 downto WORD_WIDTH-PAYLOAD_REPRESENTATION_ID_WIDTH); alias representation_options : std_logic_vector(PAYLOAD_REPRESENTATION_ID_WIDTH-1 downto 0) is data_in(PAYLOAD_REPRESENTATION_OPTIONS_WIDTH-1 downto 0); @@ -1983,7 +1982,7 @@ begin -- NOTE: In-line QoS is completely ignored - case (parameter_id) is + case (endian_swap(endian_flag,parameter_id)) is when PID_PARTICIPANT_GUID => -- Ignore in-line QoS -- Only relevant for Participant Discovery Protocol @@ -2283,7 +2282,7 @@ begin null; when others => -- If MUST_UNDERSTAND Flag is set, we have incompatible communication. Drop Packet - if (must_understand = '1') then + if (endian_swap(endian_flag,parameter_id)(PID_MUST_UNDERSTAND_FLAG_POS) = '1') then stage_next <= SKIP_PACKET; -- Else skip Uknown Parameter else diff --git a/src/rtps_handler.vhd b/src/rtps_handler.vhd index 9a0716a..27f1fba 100644 --- a/src/rtps_handler.vhd +++ b/src/rtps_handler.vhd @@ -132,7 +132,7 @@ architecture arch of rtps_handler is -- Internal Signal for last_word_out signal last_word_out_sig : std_logic; - --*****ALIAS DEFINATION***** + --*****ALIAS DEFINITION***** -- UDP HEADER alias udp_src_port : std_logic_vector(15 downto 0) is long_latch(31 downto 16); alias udp_dest_port : std_logic_vector(15 downto 0) is long_latch(15 downto 0); @@ -142,17 +142,14 @@ architecture arch of rtps_handler is -- RTPS SUBMESSAGE HEADER alias rtps_sub_id : std_logic_vector(7 downto 0) is data_in(31 downto 24); alias rtps_sub_flags : std_logic_vector(7 downto 0) is data_in(23 downto 16); - -- Apparently illegal alias expression - --alias rtps_sub_length : unsigned(15 downto 0) is unsigned(endian_swap(rtps_sub_flags(0), data_in(15 downto 0))); - -- RTPS DATA SUBMESSAGE HEADER - -- Apparently illegal alias expression - --alias rtps_sub_data_length : unsigned(15 downto 0) is unsigned(endian_swap(flags(SUBMESSAGE_ENDIAN_FLAG_POS), data_in(15 downto 0))); begin - -- ALIAS SUBSTITUTION - rtps_sub_length <= unsigned(endian_swap(rtps_sub_flags(SUBMESSAGE_ENDIAN_FLAG_POS), data_in(15 downto 0))); - rtps_sub_data_length <= unsigned(endian_swap(flags(SUBMESSAGE_ENDIAN_FLAG_POS), data_in(15 downto 0))); + --***ALIAS SUBSTITUTION*** + -- RTPS SUBMESSAGE HEADER + rtps_sub_length <= unsigned(endian_swap(rtps_sub_flags(SUBMESSAGE_ENDIAN_FLAG_POS), data_in(SUBMESSAGE_LENGTH_WIDTH-1 downto 0))); + -- RTPS DATA SUBMESSAGE HEADER + rtps_sub_data_length <= unsigned(endian_swap(flags(SUBMESSAGE_ENDIAN_FLAG_POS), data_in(SUBMESSAGE_LENGTH_WIDTH-1 downto 0))); rd <= rd_sig; diff --git a/src/rtps_package.vhd b/src/rtps_package.vhd index 03c8763..c0df588 100644 --- a/src/rtps_package.vhd +++ b/src/rtps_package.vhd @@ -243,6 +243,8 @@ package rtps_package is constant SUBMESSAGE_INVALIDATE_FLAG_POS : natural := 1; -- *PARAMETER IDs* + constant PID_IMPL_EXTENSION_FLAG_POS : natural := PARAMETER_ID_WIDTH-1; + constant PID_MUST_UNDERSTAND_FLAG_POS : natural := PARAMETER_ID_WIDTH-2; constant PID_PAD : std_logic_vector(PARAMETER_ID_WIDTH-1 downto 0) := x"0000"; constant PID_SENTINEL : std_logic_vector(PARAMETER_ID_WIDTH-1 downto 0) := x"0001"; constant PID_PARTICIPANT_LEASE_DURATION : std_logic_vector(PARAMETER_ID_WIDTH-1 downto 0) := x"0002"; diff --git a/src/rtps_reader.vhd b/src/rtps_reader.vhd index a1e9532..3ed3acd 100644 --- a/src/rtps_reader.vhd +++ b/src/rtps_reader.vhd @@ -307,7 +307,6 @@ architecture arch of rtps_reader is -- RTPS PARAMETER LIST HEADER alias parameter_id : std_logic_vector(15 downto 0) is data_in_user(31 downto 16); alias parameter_length : std_logic_vector(15 downto 0) is data_in_user(15 downto 0); - alias must_understand : std_logic is parameter_id(14); -- RTPS DATA PAYLOAD HEADER alias representation_id : std_logic_vector(15 downto 0) is data_in_user(31 downto 16); alias representation_options : std_logic_vector(15 downto 0) is data_in_user(15 downto 0); @@ -1106,7 +1105,7 @@ begin -- DEFAULT STAGE stage_next <= SKIP_PARAMETER; - case (parameter_id) is + case (endian_swap(endian_flag,parameter_id)) is when PID_TOPIC_NAME => -- Ignore null; @@ -1186,7 +1185,7 @@ begin stage_next <= INITIATE_ADD_CACHE_CHANGE_REQUEST; when others => -- If MUST_UNDERSTAND Flag is set, we have incompatible communication. Drop Packet - if (must_understand = '1') then + if (endian_swap(endian_flag,parameter_id)(PID_MUST_UNDERSTAND_FLAG_POS) = '1') then stage_next <= SKIP_PACKET; -- Else skip Unknown Parameter else diff --git a/src/rtps_test_package.vhd b/src/rtps_test_package.vhd index ae98097..8233522 100644 --- a/src/rtps_test_package.vhd +++ b/src/rtps_test_package.vhd @@ -451,12 +451,17 @@ package rtps_test_package is procedure gen_inline_qos(status : in CACHE_CHANGE_KIND_TYPE; key : in INSTANCE_HANDLE_TYPE; output : inout TEST_PACKET_TYPE); -- Like previous procedure but with "pid" and "offset" parameters. procedure gen_inline_qos(status : in CACHE_CHANGE_KIND_TYPE; key : in INSTANCE_HANDLE_TYPE; output : inout TEST_PACKET_TYPE; pid : in std_logic_vector(PARAMETER_ID_WIDTH-1 downto 0); offset : in integer); - -- Generate Parameter List Element - -- pid Parameter ID of element - -- data Parameter Data of element - -- output Destination of generated output - procedure gen_parameter(pid : in std_logic_vector(PARAMETER_ID_WIDTH-1 downto 0); data : in TEST_PACKET_TYPE; output : inout TEST_PACKET_TYPE); + -- Generate Parameter List Element [NOTE: Dat has to be in the correct endianness] + -- pid Parameter ID of element + -- data Parameter Data of element + -- littleEndian If TRUE the generated Data is in little Endian, else in Big Endian + -- output Destination of generated output + procedure gen_parameter(pid : in std_logic_vector(PARAMETER_ID_WIDTH-1 downto 0); data : in TEST_PACKET_TYPE; littleEndian : in std_logic; output : inout TEST_PACKET_TYPE); -- Generate Parameter List Sentinel. This procedure should be used to finalize Parameter Lists + -- littleEndian If TRUE the generated Data is in little Endian, else in Big Endian + -- output Destination of generated output + procedure gen_sentinel(littleEndian : in std_logic; output : inout TEST_PACKET_TYPE); + -- Shortcut of previous procedure in Big Endian procedure gen_sentinel(output : inout TEST_PACKET_TYPE); @@ -1517,9 +1522,9 @@ package body rtps_test_package is -- GUID if (pid = PID_PARTICIPANT_GUID) then assert (16+(offset*4) >= 0) report "Parameter Length < 0" severity FAILURE; - output.data(output.length) := PID_PARTICIPANT_GUID & endian_swap(ref.littleEndian, int(16+(offset*4), PARAMETER_LENGTH_WIDTH)); + output.data(output.length) := endian_swap(ref.littleEndian, PID_PARTICIPANT_GUID) & endian_swap(ref.littleEndian, int(16+(offset*4), PARAMETER_LENGTH_WIDTH)); else - output.data(output.length) := PID_PARTICIPANT_GUID & endian_swap(ref.littleEndian, int(16, PARAMETER_LENGTH_WIDTH)); + output.data(output.length) := endian_swap(ref.littleEndian, PID_PARTICIPANT_GUID) & endian_swap(ref.littleEndian, int(16, PARAMETER_LENGTH_WIDTH)); end if; output.length := output.length + 1; output.data(output.length) := ref.guidPrefix(0); @@ -1536,9 +1541,9 @@ package body rtps_test_package is -- DOMAIN ID if (pid = PID_DOMAIN_ID) then assert (4+(offset*4) >= 0) report "Parameter Length < 0" severity FAILURE; - output.data(output.length) := PID_DOMAIN_ID & endian_swap(ref.littleEndian, int(4+(offset*4), PARAMETER_LENGTH_WIDTH)); + output.data(output.length) := endian_swap(ref.littleEndian, PID_DOMAIN_ID) & endian_swap(ref.littleEndian, int(4+(offset*4), PARAMETER_LENGTH_WIDTH)); else - output.data(output.length) := PID_DOMAIN_ID & endian_swap(ref.littleEndian, int(4, PARAMETER_LENGTH_WIDTH)); + output.data(output.length) := endian_swap(ref.littleEndian, PID_DOMAIN_ID) & endian_swap(ref.littleEndian, int(4, PARAMETER_LENGTH_WIDTH)); end if; output.length := output.length + 1; output.data(output.length) := endian_swap(ref.littleEndian, ref.domainId); @@ -1551,9 +1556,9 @@ package body rtps_test_package is tmp := string_len(ref.domainTag); if (pid = PID_DOMAIN_TAG) then assert (((round_div(tmp,4)+1)*4)+(offset*4) >= 0) report "Parameter Length < 0" severity FAILURE; - output.data(output.length) := PID_DOMAIN_TAG & endian_swap(ref.littleEndian, int(((round_div(tmp,4)+1)*4)+(offset*4), PARAMETER_LENGTH_WIDTH)); + output.data(output.length) := endian_swap(ref.littleEndian, PID_DOMAIN_TAG) & endian_swap(ref.littleEndian, int(((round_div(tmp,4)+1)*4)+(offset*4), PARAMETER_LENGTH_WIDTH)); else - output.data(output.length) := PID_DOMAIN_TAG & endian_swap(ref.littleEndian, int((round_div(tmp,4)+1)*4, PARAMETER_LENGTH_WIDTH)); + output.data(output.length) := endian_swap(ref.littleEndian, PID_DOMAIN_TAG) & endian_swap(ref.littleEndian, int((round_div(tmp,4)+1)*4, PARAMETER_LENGTH_WIDTH)); end if; output.length := output.length + 1; output.data(output.length) := endian_swap(ref.littleEndian, int(tmp, CDR_LONG_WIDTH)); @@ -1569,9 +1574,9 @@ package body rtps_test_package is -- PROTOCOL VERSION if (pid = PID_PROTOCOL_VERSION) then assert (4+(offset*4) >= 0) report "Parameter Length < 0" severity FAILURE; - output.data(output.length) := PID_PROTOCOL_VERSION & endian_swap(ref.littleEndian, int(4+(offset*4), PARAMETER_LENGTH_WIDTH)); + output.data(output.length) := endian_swap(ref.littleEndian, PID_PROTOCOL_VERSION) & endian_swap(ref.littleEndian, int(4+(offset*4), PARAMETER_LENGTH_WIDTH)); else - output.data(output.length) := PID_PROTOCOL_VERSION & endian_swap(ref.littleEndian, int(4, PARAMETER_LENGTH_WIDTH)); + output.data(output.length) := endian_swap(ref.littleEndian, PID_PROTOCOL_VERSION) & endian_swap(ref.littleEndian, int(4, PARAMETER_LENGTH_WIDTH)); end if; output.length := output.length + 1; output.data(output.length) := (others => '0'); @@ -1583,9 +1588,9 @@ package body rtps_test_package is -- VENDORID if (pid = PID_VENDORID) then assert (4+(offset*4) >= 0) report "Parameter Length < 0" severity FAILURE; - output.data(output.length) := PID_VENDORID & endian_swap(ref.littleEndian, int(4+(offset*4),PARAMETER_LENGTH_WIDTH)); + output.data(output.length) := endian_swap(ref.littleEndian, PID_VENDORID) & endian_swap(ref.littleEndian, int(4+(offset*4),PARAMETER_LENGTH_WIDTH)); else - output.data(output.length) := PID_VENDORID & endian_swap(ref.littleEndian, int(4,PARAMETER_LENGTH_WIDTH)); + output.data(output.length) := endian_swap(ref.littleEndian, PID_VENDORID) & endian_swap(ref.littleEndian, int(4,PARAMETER_LENGTH_WIDTH)); end if; output.length := output.length + 1; output.data(output.length) := (others => '0'); @@ -1598,9 +1603,9 @@ package body rtps_test_package is if (ref.expectsInlineQoS(0) /= DEFAULT_EXPECTS_INLINE_QOS or pid = PID_EXPECTS_INLINE_QOS) then if (pid = PID_EXPECTS_INLINE_QOS) then assert (4+(offset*4) >= 0) report "Parameter Length < 0" severity FAILURE; - output.data(output.length) := PID_EXPECTS_INLINE_QOS & endian_swap(ref.littleEndian, int(4+(offset*4),PARAMETER_LENGTH_WIDTH)); + output.data(output.length) := endian_swap(ref.littleEndian, PID_EXPECTS_INLINE_QOS) & endian_swap(ref.littleEndian, int(4+(offset*4),PARAMETER_LENGTH_WIDTH)); else - output.data(output.length) := PID_EXPECTS_INLINE_QOS & endian_swap(ref.littleEndian, int(4,PARAMETER_LENGTH_WIDTH)); + output.data(output.length) := endian_swap(ref.littleEndian, PID_EXPECTS_INLINE_QOS) & endian_swap(ref.littleEndian, int(4,PARAMETER_LENGTH_WIDTH)); end if; output.length := output.length + 1; output.data(output.length) := (others => '0'); @@ -1616,9 +1621,9 @@ package body rtps_test_package is for i in 0 to tmp-1 loop if (pid = PID_METATRAFFIC_MULTICAST_LOCATOR) then assert (24+(offset*4) >= 0) report "Parameter Length < 0" severity FAILURE; - output.data(output.length) := PID_METATRAFFIC_MULTICAST_LOCATOR & endian_swap(ref.littleEndian, int(24+(offset*4),PARAMETER_LENGTH_WIDTH)); + output.data(output.length) := endian_swap(ref.littleEndian, PID_METATRAFFIC_MULTICAST_LOCATOR) & endian_swap(ref.littleEndian, int(24+(offset*4),PARAMETER_LENGTH_WIDTH)); else - output.data(output.length) := PID_METATRAFFIC_MULTICAST_LOCATOR & endian_swap(ref.littleEndian, int(24,PARAMETER_LENGTH_WIDTH)); + output.data(output.length) := endian_swap(ref.littleEndian, PID_METATRAFFIC_MULTICAST_LOCATOR) & endian_swap(ref.littleEndian, int(24,PARAMETER_LENGTH_WIDTH)); end if; output.length := output.length + 1; output.data(output.length) := endian_swap(ref.littleEndian, ref.metatrafficMulticastLocatorList.locator(i).kind); @@ -1644,9 +1649,9 @@ package body rtps_test_package is for i in 0 to tmp-1 loop if (pid = PID_METATRAFFIC_UNICAST_LOCATOR) then assert (24+(offset*4) >= 0) report "Parameter Length < 0" severity FAILURE; - output.data(output.length) := PID_METATRAFFIC_UNICAST_LOCATOR & endian_swap(ref.littleEndian, int(24+(offset*4),PARAMETER_LENGTH_WIDTH)); + output.data(output.length) := endian_swap(ref.littleEndian, PID_METATRAFFIC_UNICAST_LOCATOR) & endian_swap(ref.littleEndian, int(24+(offset*4),PARAMETER_LENGTH_WIDTH)); else - output.data(output.length) := PID_METATRAFFIC_UNICAST_LOCATOR & endian_swap(ref.littleEndian, int(24,PARAMETER_LENGTH_WIDTH)); + output.data(output.length) := endian_swap(ref.littleEndian, PID_METATRAFFIC_UNICAST_LOCATOR) & endian_swap(ref.littleEndian, int(24,PARAMETER_LENGTH_WIDTH)); end if; output.length := output.length + 1; output.data(output.length) := endian_swap(ref.littleEndian, ref.metatrafficUnicastLocatorList.locator(i).kind); @@ -1672,9 +1677,9 @@ package body rtps_test_package is for i in 0 to tmp-1 loop if (pid = PID_DEFAULT_MULTICAST_LOCATOR) then assert (24+(offset*4) >= 0) report "Parameter Length < 0" severity FAILURE; - output.data(output.length) := PID_DEFAULT_MULTICAST_LOCATOR & endian_swap(ref.littleEndian, int(24+(offset*4),PARAMETER_LENGTH_WIDTH)); + output.data(output.length) := endian_swap(ref.littleEndian, PID_DEFAULT_MULTICAST_LOCATOR) & endian_swap(ref.littleEndian, int(24+(offset*4),PARAMETER_LENGTH_WIDTH)); else - output.data(output.length) := PID_DEFAULT_MULTICAST_LOCATOR & endian_swap(ref.littleEndian, int(24,PARAMETER_LENGTH_WIDTH)); + output.data(output.length) := endian_swap(ref.littleEndian, PID_DEFAULT_MULTICAST_LOCATOR) & endian_swap(ref.littleEndian, int(24,PARAMETER_LENGTH_WIDTH)); end if; output.length := output.length + 1; output.data(output.length) := endian_swap(ref.littleEndian, ref.defaultMulticastLocatorList.locator(i).kind); @@ -1701,9 +1706,9 @@ package body rtps_test_package is for i in 0 to tmp-1 loop if (pid = PID_DEFAULT_UNICAST_LOCATOR) then assert (24+(offset*4) >= 0) report "Parameter Length < 0" severity FAILURE; - output.data(output.length) := PID_DEFAULT_UNICAST_LOCATOR & endian_swap(ref.littleEndian, int(24+(offset*4),PARAMETER_LENGTH_WIDTH)); + output.data(output.length) := endian_swap(ref.littleEndian, PID_DEFAULT_UNICAST_LOCATOR) & endian_swap(ref.littleEndian, int(24+(offset*4),PARAMETER_LENGTH_WIDTH)); else - output.data(output.length) := PID_DEFAULT_UNICAST_LOCATOR & endian_swap(ref.littleEndian, int(24,PARAMETER_LENGTH_WIDTH)); + output.data(output.length) := endian_swap(ref.littleEndian, PID_DEFAULT_UNICAST_LOCATOR) & endian_swap(ref.littleEndian, int(24,PARAMETER_LENGTH_WIDTH)); end if; output.length := output.length + 1; output.data(output.length) := endian_swap(ref.littleEndian, ref.defaultUnicastLocatorList.locator(i).kind); @@ -1727,9 +1732,9 @@ package body rtps_test_package is if (ref.leaseDuration /= DEFAULT_PARTICIPANT_LEASE_DURATION or pid = PID_PARTICIPANT_LEASE_DURATION) then if (pid = PID_PARTICIPANT_LEASE_DURATION) then assert (8+(offset*4) >= 0) report "Parameter Length < 0" severity FAILURE; - output.data(output.length) := PID_PARTICIPANT_LEASE_DURATION & endian_swap(ref.littleEndian, int(8+(offset*4),PARAMETER_LENGTH_WIDTH)); + output.data(output.length) := endian_swap(ref.littleEndian, PID_PARTICIPANT_LEASE_DURATION) & endian_swap(ref.littleEndian, int(8+(offset*4),PARAMETER_LENGTH_WIDTH)); else - output.data(output.length) := PID_PARTICIPANT_LEASE_DURATION & endian_swap(ref.littleEndian, int(8,PARAMETER_LENGTH_WIDTH)); + output.data(output.length) := endian_swap(ref.littleEndian, PID_PARTICIPANT_LEASE_DURATION) & endian_swap(ref.littleEndian, int(8,PARAMETER_LENGTH_WIDTH)); end if; output.length := output.length + 1; output.data(output.length) := endian_swap(ref.littleEndian, std_logic_vector(ref.leaseDuration(0))); @@ -1743,9 +1748,9 @@ package body rtps_test_package is -- AVAILABLE ENDPOINTS if (pid = PID_BUILTIN_ENDPOINT_SET) then assert (4+(offset*4) >= 0) report "Parameter Length < 0" severity FAILURE; - output.data(output.length) := PID_BUILTIN_ENDPOINT_SET & endian_swap(ref.littleEndian, int(4+(offset*4),PARAMETER_LENGTH_WIDTH)); + output.data(output.length) := endian_swap(ref.littleEndian, PID_BUILTIN_ENDPOINT_SET) & endian_swap(ref.littleEndian, int(4+(offset*4),PARAMETER_LENGTH_WIDTH)); else - output.data(output.length) := PID_BUILTIN_ENDPOINT_SET & endian_swap(ref.littleEndian, int(4,PARAMETER_LENGTH_WIDTH)); + output.data(output.length) := endian_swap(ref.littleEndian, PID_BUILTIN_ENDPOINT_SET) & endian_swap(ref.littleEndian, int(4,PARAMETER_LENGTH_WIDTH)); end if; output.length := output.length + 1; output.data(output.length) := endian_swap(ref.littleEndian, ref.availableBuiltinEndpoints); @@ -1757,9 +1762,9 @@ package body rtps_test_package is if (ref.builtinEndpointQoS /= DEFAULT_BUILTIN_ENDPOINT_QOS or pid = PID_BUILTIN_ENDPOINT_QOS) then if (pid = PID_BUILTIN_ENDPOINT_QOS) then assert (4+(offset*4) >= 0) report "Parameter Length < 0" severity FAILURE; - output.data(output.length) := PID_BUILTIN_ENDPOINT_QOS & endian_swap(ref.littleEndian, int(4+(offset*4),PARAMETER_LENGTH_WIDTH)); + output.data(output.length) := endian_swap(ref.littleEndian, PID_BUILTIN_ENDPOINT_QOS) & endian_swap(ref.littleEndian, int(4+(offset*4),PARAMETER_LENGTH_WIDTH)); else - output.data(output.length) := PID_BUILTIN_ENDPOINT_QOS & endian_swap(ref.littleEndian, int(4,PARAMETER_LENGTH_WIDTH)); + output.data(output.length) := endian_swap(ref.littleEndian, PID_BUILTIN_ENDPOINT_QOS) & endian_swap(ref.littleEndian, int(4,PARAMETER_LENGTH_WIDTH)); end if; output.length := output.length + 1; output.data(output.length) := endian_swap(ref.littleEndian, ref.builtinEndpointQoS); @@ -1771,9 +1776,9 @@ package body rtps_test_package is -- MANUAL LIVELINESS COUNT if (pid = PID_PARTICIPANT_MANUAL_LIVELINESS_COUNT) then assert (4+(offset*4) >= 0) report "Parameter Length < 0" severity FAILURE; - output.data(output.length) := PID_PARTICIPANT_MANUAL_LIVELINESS_COUNT & endian_swap(ref.littleEndian, int(4+(offset*4),PARAMETER_LENGTH_WIDTH)); + output.data(output.length) := endian_swap(ref.littleEndian, PID_PARTICIPANT_MANUAL_LIVELINESS_COUNT) & endian_swap(ref.littleEndian, int(4+(offset*4),PARAMETER_LENGTH_WIDTH)); else - output.data(output.length) := PID_PARTICIPANT_MANUAL_LIVELINESS_COUNT & endian_swap(ref.littleEndian, int(4,PARAMETER_LENGTH_WIDTH)); + output.data(output.length) := endian_swap(ref.littleEndian, PID_PARTICIPANT_MANUAL_LIVELINESS_COUNT) & endian_swap(ref.littleEndian, int(4,PARAMETER_LENGTH_WIDTH)); end if; output.length := output.length + 1; output.data(output.length) := endian_swap(ref.littleEndian, ref.manualLivelinessCount); @@ -2150,9 +2155,9 @@ package body rtps_test_package is -- GUID if (pid = PID_ENDPOINT_GUID) then assert (16+(offset*4) >= 0) report "Parameter Length < 0" severity FAILURE; - output.data(output.length) := PID_ENDPOINT_GUID & endian_swap(ref.littleEndian, int(16+(offset*4),PARAMETER_LENGTH_WIDTH)); + output.data(output.length) := endian_swap(ref.littleEndian, PID_ENDPOINT_GUID) & endian_swap(ref.littleEndian, int(16+(offset*4),PARAMETER_LENGTH_WIDTH)); else - output.data(output.length) := PID_ENDPOINT_GUID & endian_swap(ref.littleEndian, int(16,PARAMETER_LENGTH_WIDTH)); + output.data(output.length) := endian_swap(ref.littleEndian, PID_ENDPOINT_GUID) & endian_swap(ref.littleEndian, int(16,PARAMETER_LENGTH_WIDTH)); end if; output.length := output.length + 1; output.data(output.length) := ref.participant.guidPrefix(0); @@ -2170,9 +2175,9 @@ package body rtps_test_package is if (ref.expectsInlineQoS(0) /= DEFAULT_EXPECTS_INLINE_QOS or pid = PID_EXPECTS_INLINE_QOS) then if (pid = PID_EXPECTS_INLINE_QOS) then assert (4+(offset*4) >= 0) report "Parameter Length < 0" severity FAILURE; - output.data(output.length) := PID_EXPECTS_INLINE_QOS & endian_swap(ref.littleEndian, int(4+(offset*4),PARAMETER_LENGTH_WIDTH)); + output.data(output.length) := endian_swap(ref.littleEndian, PID_EXPECTS_INLINE_QOS) & endian_swap(ref.littleEndian, int(4+(offset*4),PARAMETER_LENGTH_WIDTH)); else - output.data(output.length) := PID_EXPECTS_INLINE_QOS & endian_swap(ref.littleEndian, int(4,PARAMETER_LENGTH_WIDTH)); + output.data(output.length) := endian_swap(ref.littleEndian, PID_EXPECTS_INLINE_QOS) & endian_swap(ref.littleEndian, int(4,PARAMETER_LENGTH_WIDTH)); end if; output.length := output.length + 1; output.data(output.length) := (others => '0'); @@ -2186,9 +2191,9 @@ package body rtps_test_package is tmp := string_len(ref.topic_name); if (pid = PID_TOPIC_NAME) then assert (((round_div(tmp,4)+1)*4)+(offset*4) >= 0) report "Parameter Length < 0" severity FAILURE; - output.data(output.length) := PID_TOPIC_NAME & endian_swap(ref.littleEndian, int(((round_div(tmp,4)+1)*4)+(offset*4),PARAMETER_LENGTH_WIDTH)); + output.data(output.length) := endian_swap(ref.littleEndian, PID_TOPIC_NAME) & endian_swap(ref.littleEndian, int(((round_div(tmp,4)+1)*4)+(offset*4),PARAMETER_LENGTH_WIDTH)); else - output.data(output.length) := PID_TOPIC_NAME & endian_swap(ref.littleEndian, int((round_div(tmp,4)+1)*4,PARAMETER_LENGTH_WIDTH)); + output.data(output.length) := endian_swap(ref.littleEndian, PID_TOPIC_NAME) & endian_swap(ref.littleEndian, int((round_div(tmp,4)+1)*4,PARAMETER_LENGTH_WIDTH)); end if; output.length := output.length + 1; output.data(output.length) := endian_swap(ref.littleEndian, int(tmp, CDR_LONG_WIDTH)); @@ -2204,9 +2209,9 @@ package body rtps_test_package is tmp := string_len(ref.type_name); if (pid = PID_TYPE_NAME) then assert (((round_div(tmp,4)+1)*4)+(offset*4) >= 0) report "Parameter Length < 0" severity FAILURE; - output.data(output.length) := PID_TYPE_NAME & endian_swap(ref.littleEndian, int(((round_div(tmp,4)+1)*4)+(offset*4),PARAMETER_LENGTH_WIDTH)); + output.data(output.length) := endian_swap(ref.littleEndian, PID_TYPE_NAME) & endian_swap(ref.littleEndian, int(((round_div(tmp,4)+1)*4)+(offset*4),PARAMETER_LENGTH_WIDTH)); else - output.data(output.length) := PID_TYPE_NAME & endian_swap(ref.littleEndian, int((round_div(tmp,4)+1)*4,PARAMETER_LENGTH_WIDTH)); + output.data(output.length) := endian_swap(ref.littleEndian, PID_TYPE_NAME) & endian_swap(ref.littleEndian, int((round_div(tmp,4)+1)*4,PARAMETER_LENGTH_WIDTH)); end if; output.length := output.length + 1; output.data(output.length) := endian_swap(ref.littleEndian, int(tmp,CDR_LONG_WIDTH)); @@ -2222,9 +2227,9 @@ package body rtps_test_package is if (ref.durability /= DEFAULT_DURABILITY_QOS or pid = PID_DURABILITY) then if (pid = PID_DURABILITY) then assert (4+(offset*4) >= 0) report "Parameter Length < 0" severity FAILURE; - output.data(output.length) := PID_DURABILITY & endian_swap(ref.littleEndian, int(4+(offset*4),PARAMETER_LENGTH_WIDTH)); + output.data(output.length) := endian_swap(ref.littleEndian, PID_DURABILITY) & endian_swap(ref.littleEndian, int(4+(offset*4),PARAMETER_LENGTH_WIDTH)); else - output.data(output.length) := PID_DURABILITY & endian_swap(ref.littleEndian, int(4,PARAMETER_LENGTH_WIDTH)); + output.data(output.length) := endian_swap(ref.littleEndian, PID_DURABILITY) & endian_swap(ref.littleEndian, int(4,PARAMETER_LENGTH_WIDTH)); end if; output.length := output.length + 1; output.data(output.length) := endian_swap(ref.littleEndian, ref.durability); @@ -2239,9 +2244,9 @@ package body rtps_test_package is ref.durability_service_max_instances /= DEFAULT_DURABILITY_SERVICE_MAX_INSTANCES or ref.durability_service_max_samples_per_instances /= DEFAULT_DURABILITY_SERVICE_MAX_SAMPLES_PER_INSTANCE or pid = PID_DURABILITY_SERVICE) then if (pid = PID_DURABILITY_SERVICE) then assert (28+(offset*4) >= 0) report "Parameter Length < 0" severity FAILURE; - output.data(output.length) := PID_DURABILITY_SERVICE & endian_swap(ref.littleEndian, int(28+(offset*4),PARAMETER_LENGTH_WIDTH)); + output.data(output.length) := endian_swap(ref.littleEndian, PID_DURABILITY_SERVICE) & endian_swap(ref.littleEndian, int(28+(offset*4),PARAMETER_LENGTH_WIDTH)); else - output.data(output.length) := PID_DURABILITY_SERVICE & endian_swap(ref.littleEndian, int(28,PARAMETER_LENGTH_WIDTH)); + output.data(output.length) := endian_swap(ref.littleEndian, PID_DURABILITY_SERVICE) & endian_swap(ref.littleEndian, int(28,PARAMETER_LENGTH_WIDTH)); end if; output.length := output.length + 1; output.data(output.length) := endian_swap(ref.littleEndian, std_logic_vector(ref.durability_service_cleanup_delay(0))); @@ -2266,9 +2271,9 @@ package body rtps_test_package is if (ref.presentation /= DEFAULT_PRESENTATION_QOS or ref.coherent_access(0) /= boolean_to_std_logic(DEFAULT_COHERENT_ACCESS) or ref.ordered_access(0) /= boolean_to_std_logic(DEFAULT_ORDERED_ACCESS) or pid = PID_PRESENTATION) then if (pid = PID_PRESENTATION) then assert (8+(offset*4) >= 0) report "Parameter Length < 0" severity FAILURE; - output.data(output.length) := PID_PRESENTATION & endian_swap(ref.littleEndian, int(8+(offset*4),PARAMETER_LENGTH_WIDTH)); + output.data(output.length) := endian_swap(ref.littleEndian, PID_PRESENTATION) & endian_swap(ref.littleEndian, int(8+(offset*4),PARAMETER_LENGTH_WIDTH)); else - output.data(output.length) := PID_PRESENTATION & endian_swap(ref.littleEndian, int(8,PARAMETER_LENGTH_WIDTH)); + output.data(output.length) := endian_swap(ref.littleEndian, PID_PRESENTATION) & endian_swap(ref.littleEndian, int(8,PARAMETER_LENGTH_WIDTH)); end if; output.length := output.length + 1; output.data(output.length) := endian_swap(ref.littleEndian, ref.presentation); @@ -2283,9 +2288,9 @@ package body rtps_test_package is if (ref.deadline /= DEFAULT_DEADLINE_QOS or pid = PID_DEADLINE) then if (pid = PID_DEADLINE) then assert (8+(offset*4) >= 0) report "Parameter Length < 0" severity FAILURE; - output.data(output.length) := PID_DEADLINE & endian_swap(ref.littleEndian, int(8+(offset*4),PARAMETER_LENGTH_WIDTH)); + output.data(output.length) := endian_swap(ref.littleEndian, PID_DEADLINE) & endian_swap(ref.littleEndian, int(8+(offset*4),PARAMETER_LENGTH_WIDTH)); else - output.data(output.length) := PID_DEADLINE & endian_swap(ref.littleEndian, int(8,PARAMETER_LENGTH_WIDTH)); + output.data(output.length) := endian_swap(ref.littleEndian, PID_DEADLINE) & endian_swap(ref.littleEndian, int(8,PARAMETER_LENGTH_WIDTH)); end if; output.length := output.length + 1; output.data(output.length) := endian_swap(ref.littleEndian, std_logic_vector(ref.deadline(0))); @@ -2300,9 +2305,9 @@ package body rtps_test_package is if (ref.latency_budget /= DEFAULT_LATENCY_BUDGET_QOS or pid = PID_LATENCY_BUDGET) then if (pid = PID_LATENCY_BUDGET) then assert (8+(offset*4) >= 0) report "Parameter Length < 0" severity FAILURE; - output.data(output.length) := PID_LATENCY_BUDGET & endian_swap(ref.littleEndian, int(8+(offset*4),PARAMETER_LENGTH_WIDTH)); + output.data(output.length) := endian_swap(ref.littleEndian, PID_LATENCY_BUDGET) & endian_swap(ref.littleEndian, int(8+(offset*4),PARAMETER_LENGTH_WIDTH)); else - output.data(output.length) := PID_LATENCY_BUDGET & endian_swap(ref.littleEndian, int(8,PARAMETER_LENGTH_WIDTH)); + output.data(output.length) := endian_swap(ref.littleEndian, PID_LATENCY_BUDGET) & endian_swap(ref.littleEndian, int(8,PARAMETER_LENGTH_WIDTH)); end if; output.length := output.length + 1; output.data(output.length) := endian_swap(ref.littleEndian, std_logic_vector(ref.latency_budget(0))); @@ -2317,9 +2322,9 @@ package body rtps_test_package is if (ref.ownership /= DEFAULT_OWNERSHIP_QOS or pid = PID_OWNERSHIP) then if (pid = PID_OWNERSHIP) then assert (4+(offset*4) >= 0) report "Parameter Length < 0" severity FAILURE; - output.data(output.length) := PID_OWNERSHIP & endian_swap(ref.littleEndian, int(4+(offset*4),PARAMETER_LENGTH_WIDTH)); + output.data(output.length) := endian_swap(ref.littleEndian, PID_OWNERSHIP) & endian_swap(ref.littleEndian, int(4+(offset*4),PARAMETER_LENGTH_WIDTH)); else - output.data(output.length) := PID_OWNERSHIP & endian_swap(ref.littleEndian, int(4,PARAMETER_LENGTH_WIDTH)); + output.data(output.length) := endian_swap(ref.littleEndian, PID_OWNERSHIP) & endian_swap(ref.littleEndian, int(4,PARAMETER_LENGTH_WIDTH)); end if; output.length := output.length + 1; output.data(output.length) := endian_swap(ref.littleEndian, ref.ownership); @@ -2332,9 +2337,9 @@ package body rtps_test_package is if (ref.ownership_strength /= DEFAULT_OWNERSHIP_STRENGTH_QOS or pid = PID_OWNERSHIP_STRENGTH) then if (pid = PID_OWNERSHIP_STRENGTH) then assert (4+(offset*4) >= 0) report "Parameter Length < 0" severity FAILURE; - output.data(output.length) := PID_OWNERSHIP_STRENGTH & endian_swap(ref.littleEndian, int(4+(offset*4),PARAMETER_LENGTH_WIDTH)); + output.data(output.length) := endian_swap(ref.littleEndian, PID_OWNERSHIP_STRENGTH) & endian_swap(ref.littleEndian, int(4+(offset*4),PARAMETER_LENGTH_WIDTH)); else - output.data(output.length) := PID_OWNERSHIP_STRENGTH & endian_swap(ref.littleEndian, int(4,PARAMETER_LENGTH_WIDTH)); + output.data(output.length) := endian_swap(ref.littleEndian, PID_OWNERSHIP_STRENGTH) & endian_swap(ref.littleEndian, int(4,PARAMETER_LENGTH_WIDTH)); end if; output.length := output.length + 1; output.data(output.length) := endian_swap(ref.littleEndian, ref.ownership_strength); @@ -2347,9 +2352,9 @@ package body rtps_test_package is if (ref.liveliness /= DEFAULT_LIVELINESS_QOS or ref.leaseDuration /= DEFAULT_LEASE_DURATION or pid = PID_LIVELINESS) then if (pid = PID_LIVELINESS) then assert (12+(offset*4) >= 0) report "Parameter Length < 0" severity FAILURE; - output.data(output.length) := PID_LIVELINESS & endian_swap(ref.littleEndian, int(12+(offset*4),PARAMETER_LENGTH_WIDTH)); + output.data(output.length) := endian_swap(ref.littleEndian, PID_LIVELINESS) & endian_swap(ref.littleEndian, int(12+(offset*4),PARAMETER_LENGTH_WIDTH)); else - output.data(output.length) := PID_LIVELINESS & endian_swap(ref.littleEndian, int(12,PARAMETER_LENGTH_WIDTH)); + output.data(output.length) := endian_swap(ref.littleEndian, PID_LIVELINESS) & endian_swap(ref.littleEndian, int(12,PARAMETER_LENGTH_WIDTH)); end if; output.length := output.length + 1; output.data(output.length) := endian_swap(ref.littleEndian, ref.liveliness); @@ -2366,9 +2371,9 @@ package body rtps_test_package is if (ref.time_based_filter /= DEFAULT_TIME_BASED_FILTER_QOS or pid = PID_TIME_BASED_FILTER) then if (pid = PID_TIME_BASED_FILTER) then assert (8+(offset*4) >= 0) report "Parameter Length < 0" severity FAILURE; - output.data(output.length) := PID_TIME_BASED_FILTER & endian_swap(ref.littleEndian, int(8+(offset*4),PARAMETER_LENGTH_WIDTH)); + output.data(output.length) := endian_swap(ref.littleEndian, PID_TIME_BASED_FILTER) & endian_swap(ref.littleEndian, int(8+(offset*4),PARAMETER_LENGTH_WIDTH)); else - output.data(output.length) := PID_TIME_BASED_FILTER & endian_swap(ref.littleEndian, int(8,PARAMETER_LENGTH_WIDTH)); + output.data(output.length) := endian_swap(ref.littleEndian, PID_TIME_BASED_FILTER) & endian_swap(ref.littleEndian, int(8,PARAMETER_LENGTH_WIDTH)); end if; output.length := output.length + 1; output.data(output.length) := endian_swap(ref.littleEndian, std_logic_vector(ref.time_based_filter(0))); @@ -2383,9 +2388,9 @@ package body rtps_test_package is if (ref.reliability /= DEFAULT_RELIABILITY_QOS or ref.max_blocking_time /= DEFAULT_MAX_BLOCKING_TIME or pid = PID_RELIABILITY) then if (pid = PID_RELIABILITY) then assert (12+(offset*4) >= 0) report "Parameter Length < 0" severity FAILURE; - output.data(output.length) := PID_RELIABILITY & endian_swap(ref.littleEndian, int(12+(offset*4),PARAMETER_LENGTH_WIDTH)); + output.data(output.length) := endian_swap(ref.littleEndian, PID_RELIABILITY) & endian_swap(ref.littleEndian, int(12+(offset*4),PARAMETER_LENGTH_WIDTH)); else - output.data(output.length) := PID_RELIABILITY & endian_swap(ref.littleEndian, int(12,PARAMETER_LENGTH_WIDTH)); + output.data(output.length) := endian_swap(ref.littleEndian, PID_RELIABILITY) & endian_swap(ref.littleEndian, int(12,PARAMETER_LENGTH_WIDTH)); end if; output.length := output.length + 1; output.data(output.length) := endian_swap(ref.littleEndian, ref.reliability); @@ -2402,9 +2407,9 @@ package body rtps_test_package is if (ref.transport_priority /= DEFAULT_TRANSPORT_PRIORITY_QOS or pid = PID_TRANSPORT_PRIORITY) then if (pid = PID_TRANSPORT_PRIORITY) then assert (4+(offset*4) >= 0) report "Parameter Length < 0" severity FAILURE; - output.data(output.length) := PID_TRANSPORT_PRIORITY & endian_swap(ref.littleEndian, int(4+(offset*4),PARAMETER_LENGTH_WIDTH)); + output.data(output.length) := endian_swap(ref.littleEndian, PID_TRANSPORT_PRIORITY) & endian_swap(ref.littleEndian, int(4+(offset*4),PARAMETER_LENGTH_WIDTH)); else - output.data(output.length) := PID_TRANSPORT_PRIORITY & endian_swap(ref.littleEndian, int(4,PARAMETER_LENGTH_WIDTH)); + output.data(output.length) := endian_swap(ref.littleEndian, PID_TRANSPORT_PRIORITY) & endian_swap(ref.littleEndian, int(4,PARAMETER_LENGTH_WIDTH)); end if; output.length := output.length + 1; output.data(output.length) := endian_swap(ref.littleEndian, ref.transport_priority); @@ -2417,9 +2422,9 @@ package body rtps_test_package is if (ref.lifespan /= DEFAULT_LIFESPAN_QOS or pid = PID_LIFESPAN) then if (pid = PID_LIFESPAN) then assert (8+(offset*4) >= 0) report "Parameter Length < 0" severity FAILURE; - output.data(output.length) := PID_LIFESPAN & endian_swap(ref.littleEndian, int(8+(offset*4),PARAMETER_LENGTH_WIDTH)); + output.data(output.length) := endian_swap(ref.littleEndian, PID_LIFESPAN) & endian_swap(ref.littleEndian, int(8+(offset*4),PARAMETER_LENGTH_WIDTH)); else - output.data(output.length) := PID_LIFESPAN & endian_swap(ref.littleEndian, int(8,PARAMETER_LENGTH_WIDTH)); + output.data(output.length) := endian_swap(ref.littleEndian, PID_LIFESPAN) & endian_swap(ref.littleEndian, int(8,PARAMETER_LENGTH_WIDTH)); end if; output.length := output.length + 1; output.data(output.length) := endian_swap(ref.littleEndian, std_logic_vector(ref.lifespan(0))); @@ -2434,9 +2439,9 @@ package body rtps_test_package is if (ref.destination_order /= DEFAULT_DESTINATION_ORDER_QOS or pid = PID_DESTINATION_ORDER) then if (pid = PID_DESTINATION_ORDER) then assert (4+(offset*4) >= 0) report "Parameter Length < 0" severity FAILURE; - output.data(output.length) := PID_DESTINATION_ORDER & endian_swap(ref.littleEndian, int(4+(offset*4),PARAMETER_LENGTH_WIDTH)); + output.data(output.length) := endian_swap(ref.littleEndian, PID_DESTINATION_ORDER) & endian_swap(ref.littleEndian, int(4+(offset*4),PARAMETER_LENGTH_WIDTH)); else - output.data(output.length) := PID_DESTINATION_ORDER & endian_swap(ref.littleEndian, int(4,PARAMETER_LENGTH_WIDTH)); + output.data(output.length) := endian_swap(ref.littleEndian, PID_DESTINATION_ORDER) & endian_swap(ref.littleEndian, int(4,PARAMETER_LENGTH_WIDTH)); end if; output.length := output.length + 1; output.data(output.length) := endian_swap(ref.littleEndian, ref.destination_order); @@ -2451,9 +2456,9 @@ package body rtps_test_package is for i in 0 to tmp-1 loop if (pid = PID_MULTICAST_LOCATOR) then assert (24+(offset*4) >= 0) report "Parameter Length < 0" severity FAILURE; - output.data(output.length) := PID_MULTICAST_LOCATOR & endian_swap(ref.littleEndian, int(24+(offset*4),PARAMETER_LENGTH_WIDTH)); + output.data(output.length) := endian_swap(ref.littleEndian, PID_MULTICAST_LOCATOR) & endian_swap(ref.littleEndian, int(24+(offset*4),PARAMETER_LENGTH_WIDTH)); else - output.data(output.length) := PID_MULTICAST_LOCATOR & endian_swap(ref.littleEndian, int(24,PARAMETER_LENGTH_WIDTH)); + output.data(output.length) := endian_swap(ref.littleEndian, PID_MULTICAST_LOCATOR) & endian_swap(ref.littleEndian, int(24,PARAMETER_LENGTH_WIDTH)); end if; output.length := output.length + 1; output.data(output.length) := endian_swap(ref.littleEndian, ref.multicastLocatorList.locator(i).kind); @@ -2479,9 +2484,9 @@ package body rtps_test_package is for i in 0 to tmp-1 loop if (pid = PID_UNICAST_LOCATOR) then assert (24+(offset*4) >= 0) report "Parameter Length < 0" severity FAILURE; - output.data(output.length) := PID_UNICAST_LOCATOR & endian_swap(ref.littleEndian, int(24+(offset*4),PARAMETER_LENGTH_WIDTH)); + output.data(output.length) := endian_swap(ref.littleEndian, PID_UNICAST_LOCATOR) & endian_swap(ref.littleEndian, int(24+(offset*4),PARAMETER_LENGTH_WIDTH)); else - output.data(output.length) := PID_UNICAST_LOCATOR & endian_swap(ref.littleEndian, int(24,PARAMETER_LENGTH_WIDTH)); + output.data(output.length) := endian_swap(ref.littleEndian, PID_UNICAST_LOCATOR) & endian_swap(ref.littleEndian, int(24,PARAMETER_LENGTH_WIDTH)); end if; output.length := output.length + 1; output.data(output.length) := endian_swap(ref.littleEndian, ref.unicastLocatorList.locator(i).kind); @@ -2504,7 +2509,7 @@ package body rtps_test_package is -- USER DATA tmp := string_len(ref.user_data); if (tmp > 1) then - output.data(output.length) := PID_USER_DATA & endian_swap(ref.littleEndian, int((round_div(tmp,4)+1)*4,PARAMETER_LENGTH_WIDTH)); + output.data(output.length) := endian_swap(ref.littleEndian, PID_USER_DATA) & endian_swap(ref.littleEndian, int((round_div(tmp,4)+1)*4,PARAMETER_LENGTH_WIDTH)); output.length := output.length + 1; output.data(output.length) := endian_swap(ref.littleEndian, int(tmp, 32)); output.length := output.length + 1; @@ -2516,7 +2521,7 @@ package body rtps_test_package is -- TOPIC DATA tmp := string_len(ref.topic_data); if (tmp > 1) then - output.data(output.length) := PID_TOPIC_DATA & endian_swap(ref.littleEndian, int((round_div(tmp,4)+1)*4,PARAMETER_LENGTH_WIDTH)); + output.data(output.length) := endian_swap(ref.littleEndian, PID_TOPIC_DATA) & endian_swap(ref.littleEndian, int((round_div(tmp,4)+1)*4,PARAMETER_LENGTH_WIDTH)); output.length := output.length + 1; output.data(output.length) := endian_swap(ref.littleEndian, int(tmp,32)); output.length := output.length + 1; @@ -2528,7 +2533,7 @@ package body rtps_test_package is -- GROUP DATA tmp := string_len(ref.group_data); if (tmp > 1) then - output.data(output.length) := PID_GROUP_DATA & endian_swap(ref.littleEndian, int((round_div(tmp,4)+1)*4,PARAMETER_LENGTH_WIDTH)); + output.data(output.length) := endian_swap(ref.littleEndian, PID_GROUP_DATA) & endian_swap(ref.littleEndian, int((round_div(tmp,4)+1)*4,PARAMETER_LENGTH_WIDTH)); output.length := output.length + 1; output.data(output.length) := endian_swap(ref.littleEndian, int(tmp,32)); output.length := output.length + 1; @@ -2542,9 +2547,9 @@ package body rtps_test_package is if (unsigned(ref.max_size_serialized) /= 0) then if (pid = PID_DATA_MAX_SIZE_SERIALIZED) then assert (4+(offset*4) >= 0) report "Parameter Length < 0" severity FAILURE; - output.data(output.length) := PID_DATA_MAX_SIZE_SERIALIZED & endian_swap(ref.littleEndian, int(4+(offset*4),PARAMETER_LENGTH_WIDTH)); + output.data(output.length) := endian_swap(ref.littleEndian, PID_DATA_MAX_SIZE_SERIALIZED) & endian_swap(ref.littleEndian, int(4+(offset*4),PARAMETER_LENGTH_WIDTH)); else - output.data(output.length) := PID_DATA_MAX_SIZE_SERIALIZED & endian_swap(ref.littleEndian, int(4,PARAMETER_LENGTH_WIDTH)); + output.data(output.length) := endian_swap(ref.littleEndian, PID_DATA_MAX_SIZE_SERIALIZED) & endian_swap(ref.littleEndian, int(4,PARAMETER_LENGTH_WIDTH)); end if; output.length := output.length + 1; output.data(output.length) := endian_swap(ref.littleEndian, ref.max_size_serialized); @@ -2606,16 +2611,21 @@ package body rtps_test_package is output.last(output.length-1) := '1'; end procedure; - procedure gen_sentinel(output : inout TEST_PACKET_TYPE) is + procedure gen_sentinel(littleEndian : in std_logic; output : inout TEST_PACKET_TYPE) is begin - output.data(output.length) := PID_SENTINEL & (0 to PARAMETER_LENGTH_WIDTH-1 => '0'); + output.data(output.length) := endian_swap(littleEndian, PID_SENTINEL) & (0 to PARAMETER_LENGTH_WIDTH-1 => '0'); output.length := output.length + 1; end procedure; - procedure gen_parameter(pid : in std_logic_vector(PARAMETER_ID_WIDTH-1 downto 0); data : in TEST_PACKET_TYPE; output : inout TEST_PACKET_TYPE) is + procedure gen_sentinel(output : inout TEST_PACKET_TYPE) is + begin + gen_sentinel('0', output); + end procedure; + + procedure gen_parameter(pid : in std_logic_vector(PARAMETER_ID_WIDTH-1 downto 0); data : in TEST_PACKET_TYPE; littleEndian : in std_logic; output : inout TEST_PACKET_TYPE) is begin -- PARAMETER HEADER - output.data(output.length) := pid & int(data.length*4,PARAMETER_LENGTH_WIDTH); + output.data(output.length) := endian_swap(littleEndian, pid) & endian_swap(littleEndian, int(data.length*4, PARAMETER_LENGTH_WIDTH)); output.length := output.length + 1; -- DATA for i in 0 to data.length-1 loop @@ -2632,9 +2642,9 @@ package body rtps_test_package is if (ref.instance /= HANDLE_NIL or pid = PID_KEY_HASH) then if (pid = PID_KEY_HASH) then assert (16+(offset*4) >= 0) report "Parameter Length < 0" severity FAILURE; - output.data(output.length) := PID_KEY_HASH & endian_swap(littleEndian, int(16+(offset*4),PARAMETER_LENGTH_WIDTH)); + output.data(output.length) := endian_swap(littleEndian, PID_KEY_HASH) & endian_swap(littleEndian, int(16+(offset*4),PARAMETER_LENGTH_WIDTH)); else - output.data(output.length) := PID_KEY_HASH & endian_swap(littleEndian, int(16,PARAMETER_LENGTH_WIDTH)); + output.data(output.length) := endian_swap(littleEndian, PID_KEY_HASH) & endian_swap(littleEndian, int(16,PARAMETER_LENGTH_WIDTH)); end if; output.length := output.length + 1; output.data(output.length) := ref.instance(0); @@ -2653,9 +2663,9 @@ package body rtps_test_package is if (ref.kind /= ALIVE or pid = PID_STATUS_INFO) then if (pid = PID_STATUS_INFO) then assert (4+(offset*4) >= 0) report "Parameter Length < 0" severity FAILURE; - output.data(output.length) := PID_STATUS_INFO & endian_swap(littleEndian, int(4+(offset*4),PARAMETER_LENGTH_WIDTH)); + output.data(output.length) := endian_swap(littleEndian, PID_STATUS_INFO) & endian_swap(littleEndian, int(4+(offset*4),PARAMETER_LENGTH_WIDTH)); else - output.data(output.length) := PID_STATUS_INFO & endian_swap(littleEndian, int(4,PARAMETER_LENGTH_WIDTH)); + output.data(output.length) := endian_swap(littleEndian, PID_STATUS_INFO) & endian_swap(littleEndian, int(4,PARAMETER_LENGTH_WIDTH)); end if; output.length := output.length + 1; output.data(output.length) := (others => '0'); @@ -2680,9 +2690,9 @@ package body rtps_test_package is tmp := string_len(endpoint.topic_name); if (pid = PID_TOPIC_NAME) then assert (((round_div(tmp,4)+1)*4)+(offset*4) >= 0) report "Parameter Length < 0" severity FAILURE; - output.data(output.length) := PID_TOPIC_NAME & endian_swap(littleEndian, int(((round_div(tmp,4)+1)*4)+(offset*4),PARAMETER_LENGTH_WIDTH)); + output.data(output.length) := endian_swap(littleEndian, PID_TOPIC_NAME) & endian_swap(littleEndian, int(((round_div(tmp,4)+1)*4)+(offset*4),PARAMETER_LENGTH_WIDTH)); else - output.data(output.length) := PID_TOPIC_NAME & endian_swap(littleEndian, int((round_div(tmp,4)+1)*4,PARAMETER_LENGTH_WIDTH)); + output.data(output.length) := endian_swap(littleEndian, PID_TOPIC_NAME) & endian_swap(littleEndian, int((round_div(tmp,4)+1)*4,PARAMETER_LENGTH_WIDTH)); end if; output.length := output.length + 1; output.data(output.length) := endian_swap(littleEndian, int(tmp, CDR_LONG_WIDTH)); @@ -2698,9 +2708,9 @@ package body rtps_test_package is if (endpoint.durability /= DEFAULT_DURABILITY_QOS or pid = PID_DURABILITY) then if (pid = PID_DURABILITY) then assert (4+(offset*4) >= 0) report "Parameter Length < 0" severity FAILURE; - output.data(output.length) := PID_DURABILITY & endian_swap(littleEndian, int(4+(offset*4),PARAMETER_LENGTH_WIDTH)); + output.data(output.length) := endian_swap(littleEndian, PID_DURABILITY) & endian_swap(littleEndian, int(4+(offset*4),PARAMETER_LENGTH_WIDTH)); else - output.data(output.length) := PID_DURABILITY & endian_swap(littleEndian, int(4,PARAMETER_LENGTH_WIDTH)); + output.data(output.length) := endian_swap(littleEndian, PID_DURABILITY) & endian_swap(littleEndian, int(4,PARAMETER_LENGTH_WIDTH)); end if; output.length := output.length + 1; output.data(output.length) := endian_swap(littleEndian, endpoint.durability); @@ -2713,9 +2723,9 @@ package body rtps_test_package is if (endpoint.presentation /= DEFAULT_PRESENTATION_QOS or endpoint.coherent_access(0) /= boolean_to_std_logic(DEFAULT_COHERENT_ACCESS) or endpoint.ordered_access(0) /= boolean_to_std_logic(DEFAULT_ORDERED_ACCESS) or pid = PID_PRESENTATION) then if (pid = PID_PRESENTATION) then assert (8+(offset*4) >= 0) report "Parameter Length < 0" severity FAILURE; - output.data(output.length) := PID_PRESENTATION & endian_swap(littleEndian, int(8+(offset*4),PARAMETER_LENGTH_WIDTH)); + output.data(output.length) := endian_swap(littleEndian, PID_PRESENTATION) & endian_swap(littleEndian, int(8+(offset*4),PARAMETER_LENGTH_WIDTH)); else - output.data(output.length) := PID_PRESENTATION & endian_swap(littleEndian, int(8,PARAMETER_LENGTH_WIDTH)); + output.data(output.length) := endian_swap(littleEndian, PID_PRESENTATION) & endian_swap(littleEndian, int(8,PARAMETER_LENGTH_WIDTH)); end if; output.length := output.length + 1; output.data(output.length) := endian_swap(littleEndian, endpoint.presentation); @@ -2730,9 +2740,9 @@ package body rtps_test_package is if (endpoint.deadline /= DEFAULT_DEADLINE_QOS or pid = PID_DEADLINE) then if (pid = PID_DEADLINE) then assert (8+(offset*4) >= 0) report "Parameter Length < 0" severity FAILURE; - output.data(output.length) := PID_DEADLINE & endian_swap(littleEndian, int(8+(offset*4),PARAMETER_LENGTH_WIDTH)); + output.data(output.length) := endian_swap(littleEndian, PID_DEADLINE) & endian_swap(littleEndian, int(8+(offset*4),PARAMETER_LENGTH_WIDTH)); else - output.data(output.length) := PID_DEADLINE & endian_swap(littleEndian, int(8,PARAMETER_LENGTH_WIDTH)); + output.data(output.length) := endian_swap(littleEndian, PID_DEADLINE) & endian_swap(littleEndian, int(8,PARAMETER_LENGTH_WIDTH)); end if; output.length := output.length + 1; output.data(output.length) := endian_swap(littleEndian, std_logic_vector(endpoint.deadline(0))); @@ -2747,9 +2757,9 @@ package body rtps_test_package is if (endpoint.latency_budget /= DEFAULT_LATENCY_BUDGET_QOS or pid = PID_LATENCY_BUDGET) then if (pid = PID_LATENCY_BUDGET) then assert (8+(offset*4) >= 0) report "Parameter Length < 0" severity FAILURE; - output.data(output.length) := PID_LATENCY_BUDGET & endian_swap(littleEndian, int(8+(offset*4),PARAMETER_LENGTH_WIDTH)); + output.data(output.length) := endian_swap(littleEndian, PID_LATENCY_BUDGET) & endian_swap(littleEndian, int(8+(offset*4),PARAMETER_LENGTH_WIDTH)); else - output.data(output.length) := PID_LATENCY_BUDGET & endian_swap(littleEndian, int(8,PARAMETER_LENGTH_WIDTH)); + output.data(output.length) := endian_swap(littleEndian, PID_LATENCY_BUDGET) & endian_swap(littleEndian, int(8,PARAMETER_LENGTH_WIDTH)); end if; output.length := output.length + 1; output.data(output.length) := endian_swap(littleEndian, std_logic_vector(endpoint.latency_budget(0))); @@ -2764,9 +2774,9 @@ package body rtps_test_package is if (endpoint.ownership /= DEFAULT_OWNERSHIP_QOS or pid = PID_OWNERSHIP) then if (pid = PID_OWNERSHIP) then assert (4+(offset*4) >= 0) report "Parameter Length < 0" severity FAILURE; - output.data(output.length) := PID_OWNERSHIP & endian_swap(littleEndian, int(4+(offset*4),PARAMETER_LENGTH_WIDTH)); + output.data(output.length) := endian_swap(littleEndian, PID_OWNERSHIP) & endian_swap(littleEndian, int(4+(offset*4),PARAMETER_LENGTH_WIDTH)); else - output.data(output.length) := PID_OWNERSHIP & endian_swap(littleEndian, int(4,PARAMETER_LENGTH_WIDTH)); + output.data(output.length) := endian_swap(littleEndian, PID_OWNERSHIP) & endian_swap(littleEndian, int(4,PARAMETER_LENGTH_WIDTH)); end if; output.length := output.length + 1; output.data(output.length) := endian_swap(littleEndian, endpoint.ownership); @@ -2779,9 +2789,9 @@ package body rtps_test_package is if (endpoint.ownership_strength /= DEFAULT_OWNERSHIP_STRENGTH_QOS or pid = PID_OWNERSHIP_STRENGTH) then if (pid = PID_OWNERSHIP_STRENGTH) then assert (4+(offset*4) >= 0) report "Parameter Length < 0" severity FAILURE; - output.data(output.length) := PID_OWNERSHIP_STRENGTH & endian_swap(littleEndian, int(4+(offset*4),PARAMETER_LENGTH_WIDTH)); + output.data(output.length) := endian_swap(littleEndian, PID_OWNERSHIP_STRENGTH) & endian_swap(littleEndian, int(4+(offset*4),PARAMETER_LENGTH_WIDTH)); else - output.data(output.length) := PID_OWNERSHIP_STRENGTH & endian_swap(littleEndian, int(4,PARAMETER_LENGTH_WIDTH)); + output.data(output.length) := endian_swap(littleEndian, PID_OWNERSHIP_STRENGTH) & endian_swap(littleEndian, int(4,PARAMETER_LENGTH_WIDTH)); end if; output.length := output.length + 1; output.data(output.length) := endian_swap(littleEndian, endpoint.ownership_strength); @@ -2794,9 +2804,9 @@ package body rtps_test_package is if (endpoint.liveliness /= DEFAULT_LIVELINESS_QOS or endpoint.leaseDuration /= DEFAULT_LEASE_DURATION or pid = PID_LIVELINESS) then if (pid = PID_LIVELINESS) then assert (12+(offset*4) >= 0) report "Parameter Length < 0" severity FAILURE; - output.data(output.length) := PID_LIVELINESS & endian_swap(littleEndian, int(12+(offset*4),PARAMETER_LENGTH_WIDTH)); + output.data(output.length) := endian_swap(littleEndian, PID_LIVELINESS) & endian_swap(littleEndian, int(12+(offset*4),PARAMETER_LENGTH_WIDTH)); else - output.data(output.length) := PID_LIVELINESS & endian_swap(littleEndian, int(12,PARAMETER_LENGTH_WIDTH)); + output.data(output.length) := endian_swap(littleEndian, PID_LIVELINESS) & endian_swap(littleEndian, int(12,PARAMETER_LENGTH_WIDTH)); end if; output.length := output.length + 1; output.data(output.length) := endian_swap(littleEndian, endpoint.liveliness); @@ -2813,9 +2823,9 @@ package body rtps_test_package is if (endpoint.reliability /= DEFAULT_RELIABILITY_QOS or endpoint.max_blocking_time /= DEFAULT_MAX_BLOCKING_TIME or pid = PID_RELIABILITY) then if (pid = PID_RELIABILITY) then assert (12+(offset*4) >= 0) report "Parameter Length < 0" severity FAILURE; - output.data(output.length) := PID_RELIABILITY & endian_swap(littleEndian, int(12+(offset*4),PARAMETER_LENGTH_WIDTH)); + output.data(output.length) := endian_swap(littleEndian, PID_RELIABILITY) & endian_swap(littleEndian, int(12+(offset*4),PARAMETER_LENGTH_WIDTH)); else - output.data(output.length) := PID_RELIABILITY & endian_swap(littleEndian, int(12,PARAMETER_LENGTH_WIDTH)); + output.data(output.length) := endian_swap(littleEndian, PID_RELIABILITY) & endian_swap(littleEndian, int(12,PARAMETER_LENGTH_WIDTH)); end if; output.length := output.length + 1; output.data(output.length) := endian_swap(littleEndian, endpoint.reliability); @@ -2832,9 +2842,9 @@ package body rtps_test_package is if (endpoint.transport_priority /= DEFAULT_TRANSPORT_PRIORITY_QOS or pid = PID_TRANSPORT_PRIORITY) then if (pid = PID_TRANSPORT_PRIORITY) then assert (4+(offset*4) >= 0) report "Parameter Length < 0" severity FAILURE; - output.data(output.length) := PID_TRANSPORT_PRIORITY & endian_swap(littleEndian, int(4+(offset*4),PARAMETER_LENGTH_WIDTH)); + output.data(output.length) := endian_swap(littleEndian, PID_TRANSPORT_PRIORITY) & endian_swap(littleEndian, int(4+(offset*4),PARAMETER_LENGTH_WIDTH)); else - output.data(output.length) := PID_TRANSPORT_PRIORITY & endian_swap(littleEndian, int(4,PARAMETER_LENGTH_WIDTH)); + output.data(output.length) := endian_swap(littleEndian, PID_TRANSPORT_PRIORITY) & endian_swap(littleEndian, int(4,PARAMETER_LENGTH_WIDTH)); end if; output.length := output.length + 1; output.data(output.length) := endian_swap(littleEndian, endpoint.transport_priority); @@ -2847,9 +2857,9 @@ package body rtps_test_package is if (endpoint.lifespan /= DEFAULT_LIFESPAN_QOS or pid = PID_LIFESPAN) then if (pid = PID_LIFESPAN) then assert (8+(offset*4) >= 0) report "Parameter Length < 0" severity FAILURE; - output.data(output.length) := PID_LIFESPAN & endian_swap(littleEndian, int(8+(offset*4),PARAMETER_LENGTH_WIDTH)); + output.data(output.length) := endian_swap(littleEndian, PID_LIFESPAN) & endian_swap(littleEndian, int(8+(offset*4),PARAMETER_LENGTH_WIDTH)); else - output.data(output.length) := PID_LIFESPAN & endian_swap(littleEndian, int(8,PARAMETER_LENGTH_WIDTH)); + output.data(output.length) := endian_swap(littleEndian, PID_LIFESPAN) & endian_swap(littleEndian, int(8,PARAMETER_LENGTH_WIDTH)); end if; output.length := output.length + 1; output.data(output.length) := endian_swap(littleEndian, std_logic_vector(endpoint.lifespan(0))); @@ -2864,9 +2874,9 @@ package body rtps_test_package is if (endpoint.destination_order /= DEFAULT_DESTINATION_ORDER_QOS or pid = PID_DESTINATION_ORDER) then if (pid = PID_DESTINATION_ORDER) then assert (4+(offset*4) >= 0) report "Parameter Length < 0" severity FAILURE; - output.data(output.length) := PID_DESTINATION_ORDER & endian_swap(littleEndian, int(4+(offset*4),PARAMETER_LENGTH_WIDTH)); + output.data(output.length) := endian_swap(littleEndian, PID_DESTINATION_ORDER) & endian_swap(littleEndian, int(4+(offset*4),PARAMETER_LENGTH_WIDTH)); else - output.data(output.length) := PID_DESTINATION_ORDER & endian_swap(littleEndian, int(4,PARAMETER_LENGTH_WIDTH)); + output.data(output.length) := endian_swap(littleEndian, PID_DESTINATION_ORDER) & endian_swap(littleEndian, int(4,PARAMETER_LENGTH_WIDTH)); end if; output.length := output.length + 1; output.data(output.length) := endian_swap(littleEndian, endpoint.destination_order);