From cffaafb284f30ce8029f90a811af286cc6664c3e Mon Sep 17 00:00:00 2001 From: Greek Date: Sat, 20 Nov 2021 16:01:57 +0100 Subject: [PATCH] Code refactoring --- src/TEMPLATE_key_holder.vhd | 6 ++-- src/TEMPLATE_reader_wrapper.vhd | 2 +- src/TODO.txt | 2 ++ .../Level_0/L0_dds_reader_test1_abzkriu.vhd | 4 +-- .../Level_0/L0_dds_reader_test1_arzkriu.vhd | 4 +-- .../Level_0/L0_dds_reader_test1_arzksiu.vhd | 4 +-- .../Level_0/L0_dds_reader_test1_arznriu.vhd | 24 ++++++------- .../Level_0/L0_dds_reader_test1_lbzkriu.vhd | 4 +-- .../Level_0/L0_dds_reader_test1_lrzkriu.vhd | 4 +-- .../Level_0/L0_dds_reader_test2_arpkriu.vhd | 4 +-- .../Level_0/L0_dds_reader_test3_arzkrio.vhd | 4 +-- .../Level_0/L0_dds_reader_test3_arzkriu.vhd | 4 +-- .../Level_0/L0_dds_reader_test3_arzkrto.vhd | 4 +-- .../Level_0/L0_dds_reader_test3_arzkrtu.vhd | 4 +-- .../Level_0/L0_dds_reader_test3_arzksto.vhd | 4 +-- .../Level_0/L0_dds_reader_test3_arznriu.vhd | 8 ++--- .../Level_0/L0_dds_reader_test4_arzkriu.vhd | 4 +-- .../Level_0/L0_dds_reader_test4_arznriu.vhd | 8 ++--- .../Level_0/L0_dds_reader_test5_arzkriu.vhd | 4 +-- .../Level_0/L0_dds_reader_test6_arzkriu.vhd | 4 +-- .../Level_0/L0_dds_reader_test7_arzkriu.vhd | 4 +-- src/Tests/Level_0/L0_dds_writer_test1_afk.vhd | 2 +- src/Tests/Level_0/L0_dds_writer_test1_aik.vhd | 2 +- src/Tests/Level_0/L0_dds_writer_test1_ain.vhd | 2 +- src/Tests/Level_0/L0_dds_writer_test1_lik.vhd | 2 +- src/Tests/Level_0/L0_dds_writer_test2_aik.vhd | 2 +- src/Tests/Level_0/L0_dds_writer_test3_aik.vhd | 2 +- src/Tests/Level_0/L0_dds_writer_test3_ain.vhd | 2 +- src/Tests/Level_0/L0_dds_writer_test4_aik.vhd | 2 +- src/Tests/Level_0/L0_dds_writer_test5_afk.vhd | 2 +- .../Level_0/L0_rtps_reader_test2_tbk.vhd | 2 +- .../Level_0/L0_rtps_reader_test2_trk.vhd | 2 +- .../Level_0/L0_rtps_reader_test2_vbk.vhd | 2 +- .../Level_0/L0_rtps_reader_test2_vrk.vhd | 2 +- .../Level_0/L0_rtps_reader_test2_vrn.vhd | 2 +- src/Tests/Level_0/L0_rtps_reader_test3_a.vhd | 2 +- src/Tests/Level_0/L0_rtps_reader_test3_m.vhd | 2 +- .../Level_1/L1_Type1_key_holder_test1.vhd | 2 +- .../Level_1/L1_Type1_key_holder_test2.vhd | 2 +- src/Tests/Level_1/L1_Type1_wrapper_test1.vhd | 2 +- src/Tests/Level_1/L1_Type1_wrapper_test2.vhd | 2 +- .../Level_1/L1_Type2_key_holder_test1.vhd | 2 +- .../Level_1/L1_Type2_key_holder_test2.vhd | 2 +- src/Tests/Level_1/L1_Type2_wrapper_test1.vhd | 2 +- src/Tests/Level_1/L1_Type2_wrapper_test2.vhd | 2 +- .../Level_1/L1_rtps_writer_test1_tbkdp.vhd | 2 +- .../Level_1/L1_rtps_writer_test1_trkdn.vhd | 2 +- .../Level_1/L1_rtps_writer_test1_trkdp.vhd | 2 +- .../Level_1/L1_rtps_writer_test1_vbkdp.vhd | 2 +- .../Level_1/L1_rtps_writer_test1_vrkdn.vhd | 2 +- .../Level_1/L1_rtps_writer_test1_vrkdp.vhd | 2 +- .../Level_1/L1_rtps_writer_test1_vrksp.vhd | 2 +- .../Level_1/L1_rtps_writer_test1_vrndp.vhd | 2 +- .../Level_1/L1_rtps_writer_test2_vrkdn.vhd | 2 +- src/Tests/Level_2/L2_Testbench_Lib3.vhd | 4 +-- src/Tests/Level_2/L2_Type1_test1.vhd | 2 +- src/Tests/Type1_key_holder.vhd | 6 ++-- src/Tests/Type1_reader_wrapper.vhd | 4 +-- src/Tests/Type2_key_holder.vhd | 6 ++-- src/Tests/Type2_reader_wrapper.vhd | 4 +-- src/Tests/test_key_holder.vhd | 6 ++-- src/dds_reader.vhd | 16 ++++----- src/dds_writer.vhd | 16 ++++----- src/rtps_builtin_endpoint.vhd | 10 +++--- src/rtps_config_package.vhd | 13 +++---- src/rtps_handler.vhd | 10 +++--- src/rtps_out.vhd | 12 +++---- src/rtps_package.vhd | 3 +- src/rtps_reader.vhd | 36 +++++++++---------- src/rtps_test_package.vhd | 8 ++--- src/rtps_writer.vhd | 28 +++++++-------- 71 files changed, 182 insertions(+), 178 deletions(-) diff --git a/src/TEMPLATE_key_holder.vhd b/src/TEMPLATE_key_holder.vhd index e88d288..b04a679 100644 --- a/src/TEMPLATE_key_holder.vhd +++ b/src/TEMPLATE_key_holder.vhd @@ -146,7 +146,7 @@ begin ack <= '1'; stage_next <= GET_PAYLOAD_HEADER; -- Reset - key_hash_next <= HANDLE_NIL; + key_hash_next <= KEY_HASH_NIL; when PUSH_SERIALIZED_KEY => ack <= '1'; -- Serialized Key is in PLAIN_CDR2 Big Endian encoding @@ -161,7 +161,7 @@ begin when READ_KEY_HASH => ack <= '1'; -- Key Hash not calculated - if (key_hash = HANDLE_NIL) then + if (key_hash = KEY_HASH_NIL) then stage_next <= START_KEY_HASH_GENERATION; else stage_next <= PUSH_KEY_HASH; @@ -477,7 +477,7 @@ begin align_offset <= (others => '0'); data_in_latch <= (others => '0'); data_out_latch <= (others => '0'); - key_hash <= HANDLE_NIL; + key_hash <= KEY_HASH_NIL; -- ###GENERATED START### -- RESET SYNC SIGNAL VALUE -- ###GENERATED END### diff --git a/src/TEMPLATE_reader_wrapper.vhd b/src/TEMPLATE_reader_wrapper.vhd index 596f879..88abdea 100644 --- a/src/TEMPLATE_reader_wrapper.vhd +++ b/src/TEMPLATE_reader_wrapper.vhd @@ -64,7 +64,7 @@ entity Type2_reader_wrapper is si_instance_state_user : out std_logic_vector(INSTANCE_STATE_KIND_WIDTH-1 downto 0); si_source_timestamp_user : out TIME_TYPE; si_instance_handle_user : out INSTANCE_HANDLE_TYPE; - si_publication_handle_user : out PUBLICATION_HANDLE_TYPE; + si_publication_handle_user : out INSTANCE_HANDLE_TYPE; si_disposed_generation_count_user : out std_logic_vector(DISPOSED_GENERATION_COUNT_WIDTH-1 downto 0); si_no_writers_generation_count_user : out std_logic_vector(NO_WRITERS_GENERATION_COUNT_WIDTH-1 downto 0); si_sample_rank_user : out std_logic_vector(SAMPLE_RANK_WIDTH-1 downto 0); diff --git a/src/TODO.txt b/src/TODO.txt index e28d741..bc23911 100644 --- a/src/TODO.txt +++ b/src/TODO.txt @@ -79,6 +79,8 @@ * If a Keyed Reader receives a DATA Message with no Key hash and no Payload, it will drop it since there is no way to determine the instance (And the SN will never be accepted). * If a Best Effort Remote Reader sends a ACKNACK, he will indirectly receive a lease deadline and may timeout (DoS Attack) * Since the Instance Handle has to be Unique but also orderable, we could use the actual Instance Memory Base Address. Since the Instances are in a list, we also have implicitly an order to all registered Instances. [It may be necessary to add a PREV pointer to the IMF to better support the read_previous_isntance operation] + - Not possible, because according to 2.2.2.5.3.16 read_next_instance, DDS v1.4: + 'This ordering is between the instance handles: It [...] must be defined even for instance handles that do not correspond to instances currently managed by the DataReader.' * Does the DEADLINE_QOS apply also to NOT_ALIVE Instances? (Current implementation makes no distinction) * Does TIME_BASED_FILTER also apply to meta-samples (DISPOSED, NO_WRITERS)? That is an easy way to not get convergent state in different DDS Readers. What do other implementations do? * The Participant GUID of the ParticipantMessageData is theoretically not needed, since it is the same as the source GUID of the Packet. This is done, so that the ParticipantMessageData has a key and can be decrypted as every other DATA Message. Our implementation checks if it is the expected GUID and drops it otherwise. diff --git a/src/Tests/Level_0/L0_dds_reader_test1_abzkriu.vhd b/src/Tests/Level_0/L0_dds_reader_test1_abzkriu.vhd index 29908b8..2d5cc04 100644 --- a/src/Tests/Level_0/L0_dds_reader_test1_abzkriu.vhd +++ b/src/Tests/Level_0/L0_dds_reader_test1_abzkriu.vhd @@ -92,7 +92,7 @@ architecture testbench of L0_dds_reader_test1_abzkriu is signal instance_handle_dds, si_instance_handle : INSTANCE_HANDLE_TYPE := HANDLE_NIL; signal max_samples_dds : std_logic_vector(MAX_SAMPLES_WIDTH-1 downto 0) := (others => '0'); signal si_source_timestamp : TIME_TYPE := TIME_INVALID; - signal si_publication_handle : PUBLICATION_HANDLE_TYPE := (others => (others => '0')); + signal si_publication_handle : INSTANCE_HANDLE_TYPE := HANDLE_NIL; signal si_disposed_generation_count : std_logic_vector(DISPOSED_GENERATION_COUNT_WIDTH-1 downto 0) := (others => '0'); signal si_no_writers_generation_count : std_logic_vector(NO_WRITERS_GENERATION_COUNT_WIDTH-1 downto 0) := (others => '0'); signal si_sample_rank : std_logic_vector(SAMPLE_RANK_WIDTH-1 downto 0) := (others => '0'); @@ -221,7 +221,7 @@ begin end function; impure function gen_key_hash return KEY_HASH_TYPE is - variable ret : KEY_HASH_TYPE := (others => (others => '0')); + variable ret : KEY_HASH_TYPE := KEY_HASH_NIL; begin for i in 0 to KEY_HASH_TYPE'length-1 loop ret(i) := RV.RandSlv(WORD_WIDTH); diff --git a/src/Tests/Level_0/L0_dds_reader_test1_arzkriu.vhd b/src/Tests/Level_0/L0_dds_reader_test1_arzkriu.vhd index 501c53b..0ad1bb2 100644 --- a/src/Tests/Level_0/L0_dds_reader_test1_arzkriu.vhd +++ b/src/Tests/Level_0/L0_dds_reader_test1_arzkriu.vhd @@ -91,7 +91,7 @@ architecture testbench of L0_dds_reader_test1_arzkriu is signal instance_handle_dds, si_instance_handle : INSTANCE_HANDLE_TYPE := HANDLE_NIL; signal max_samples_dds : std_logic_vector(MAX_SAMPLES_WIDTH-1 downto 0) := (others => '0'); signal si_source_timestamp : TIME_TYPE := TIME_INVALID; - signal si_publication_handle : PUBLICATION_HANDLE_TYPE := (others => (others => '0')); + signal si_publication_handle : INSTANCE_HANDLE_TYPE := HANDLE_NIL; signal si_disposed_generation_count : std_logic_vector(DISPOSED_GENERATION_COUNT_WIDTH-1 downto 0) := (others => '0'); signal si_no_writers_generation_count : std_logic_vector(NO_WRITERS_GENERATION_COUNT_WIDTH-1 downto 0) := (others => '0'); signal si_sample_rank : std_logic_vector(SAMPLE_RANK_WIDTH-1 downto 0) := (others => '0'); @@ -220,7 +220,7 @@ begin end function; impure function gen_key_hash return KEY_HASH_TYPE is - variable ret : KEY_HASH_TYPE := (others => (others => '0')); + variable ret : KEY_HASH_TYPE := KEY_HASH_NIL; begin for i in 0 to KEY_HASH_TYPE'length-1 loop ret(i) := RV.RandSlv(WORD_WIDTH); diff --git a/src/Tests/Level_0/L0_dds_reader_test1_arzksiu.vhd b/src/Tests/Level_0/L0_dds_reader_test1_arzksiu.vhd index dca228c..11c1e31 100644 --- a/src/Tests/Level_0/L0_dds_reader_test1_arzksiu.vhd +++ b/src/Tests/Level_0/L0_dds_reader_test1_arzksiu.vhd @@ -91,7 +91,7 @@ architecture testbench of L0_dds_reader_test1_arzksiu is signal instance_handle_dds, si_instance_handle : INSTANCE_HANDLE_TYPE := HANDLE_NIL; signal max_samples_dds : std_logic_vector(MAX_SAMPLES_WIDTH-1 downto 0) := (others => '0'); signal si_source_timestamp : TIME_TYPE := TIME_INVALID; - signal si_publication_handle : PUBLICATION_HANDLE_TYPE := (others => (others => '0')); + signal si_publication_handle : INSTANCE_HANDLE_TYPE := HANDLE_NIL; signal si_disposed_generation_count : std_logic_vector(DISPOSED_GENERATION_COUNT_WIDTH-1 downto 0) := (others => '0'); signal si_no_writers_generation_count : std_logic_vector(NO_WRITERS_GENERATION_COUNT_WIDTH-1 downto 0) := (others => '0'); signal si_sample_rank : std_logic_vector(SAMPLE_RANK_WIDTH-1 downto 0) := (others => '0'); @@ -220,7 +220,7 @@ begin end function; impure function gen_key_hash return KEY_HASH_TYPE is - variable ret : KEY_HASH_TYPE := (others => (others => '0')); + variable ret : KEY_HASH_TYPE := KEY_HASH_NIL; begin for i in 0 to KEY_HASH_TYPE'length-1 loop ret(i) := RV.RandSlv(WORD_WIDTH); diff --git a/src/Tests/Level_0/L0_dds_reader_test1_arznriu.vhd b/src/Tests/Level_0/L0_dds_reader_test1_arznriu.vhd index e44b076..5b3afc1 100644 --- a/src/Tests/Level_0/L0_dds_reader_test1_arznriu.vhd +++ b/src/Tests/Level_0/L0_dds_reader_test1_arznriu.vhd @@ -70,7 +70,7 @@ architecture testbench of L0_dds_reader_test1_arznriu is signal instance_handle_dds, si_instance_handle : INSTANCE_HANDLE_TYPE := HANDLE_NIL; signal max_samples_dds : std_logic_vector(MAX_SAMPLES_WIDTH-1 downto 0) := (others => '0'); signal si_source_timestamp : TIME_TYPE := TIME_INVALID; - signal si_publication_handle : PUBLICATION_HANDLE_TYPE := (others => (others => '0')); + signal si_publication_handle : INSTANCE_HANDLE_TYPE := HANDLE_NIL; signal si_disposed_generation_count : std_logic_vector(DISPOSED_GENERATION_COUNT_WIDTH-1 downto 0) := (others => '0'); signal si_no_writers_generation_count : std_logic_vector(NO_WRITERS_GENERATION_COUNT_WIDTH-1 downto 0) := (others => '0'); signal si_sample_rank : std_logic_vector(SAMPLE_RANK_WIDTH-1 downto 0) := (others => '0'); @@ -199,7 +199,7 @@ begin end function; impure function gen_key_hash return KEY_HASH_TYPE is - variable ret : KEY_HASH_TYPE := (others => (others => '0')); + variable ret : KEY_HASH_TYPE := KEY_HASH_NIL; begin for i in 0 to KEY_HASH_TYPE'length-1 loop ret(i) := RV.RandSlv(WORD_WIDTH); @@ -305,7 +305,7 @@ begin cc := DEFAULT_CACHE_CHANGE; cc.serialized_key := FALSE; cc.kind := ALIVE; - cc.payload := gen_payload(HANDLE_NIL,10); + cc.payload := gen_payload(KEY_HASH_NIL,10); cc.src_timestamp := gen_duration(1,0); -- TEST: NORMAL ADD_CACHE_CHANGE @@ -332,7 +332,7 @@ begin cc := DEFAULT_CACHE_CHANGE; cc.serialized_key := FALSE; cc.kind := ALIVE; - cc.payload := gen_payload(HANDLE_NIL,30); + cc.payload := gen_payload(KEY_HASH_NIL,30); cc.src_timestamp := gen_duration(2,0); -- TEST: ADD SAMPLE BIGGER THAN AVAILABLE MEMORY SPACE @@ -355,7 +355,7 @@ begin cc := DEFAULT_CACHE_CHANGE; cc.serialized_key := FALSE; cc.kind := ALIVE; - cc.payload := gen_payload(HANDLE_NIL,18); + cc.payload := gen_payload(KEY_HASH_NIL,18); cc.src_timestamp := gen_duration(3,0); -- TEST: SAMPLE WITH UNALIGNED PAYLOAD [>1 SLOT] @@ -380,7 +380,7 @@ begin cc := DEFAULT_CACHE_CHANGE; cc.serialized_key := FALSE; cc.kind := ALIVE; - cc.payload := gen_payload(HANDLE_NIL,10); + cc.payload := gen_payload(KEY_HASH_NIL,10); cc.src_timestamp := gen_duration(4,0); -- TEST: ADD SAMPLE ON MAX_SAMPLES @@ -510,7 +510,7 @@ begin cc := DEFAULT_CACHE_CHANGE; cc.serialized_key := FALSE; cc.kind := ALIVE; - cc.payload := gen_payload(HANDLE_NIL,30); + cc.payload := gen_payload(KEY_HASH_NIL,30); cc.src_timestamp := gen_duration(8,0); Log("RTPS Operation ADD_CACHE_CHANGE [Writer 0, Aligned Payload (3 Slots)] (ACCEPTED)", INFO); @@ -533,7 +533,7 @@ begin cc := DEFAULT_CACHE_CHANGE; cc.serialized_key := FALSE; cc.kind := ALIVE; - cc.payload := gen_payload(HANDLE_NIL,10); + cc.payload := gen_payload(KEY_HASH_NIL,10); cc.src_timestamp := gen_duration(9,0); -- TEST: ADD_CACHE_CHANGE ON PAYLOAD MEMORY FULL @@ -592,7 +592,7 @@ begin cc := DEFAULT_CACHE_CHANGE; cc.serialized_key := FALSE; cc.kind := ALIVE; - cc.payload := gen_payload(HANDLE_NIL,10); + cc.payload := gen_payload(KEY_HASH_NIL,10); cc.src_timestamp := gen_duration(10,0); Log("RTPS Operation ADD_CACHE_CHANGE [Writer 0, Aligned Payload] (ACCPETED)", INFO); @@ -615,7 +615,7 @@ begin cc := DEFAULT_CACHE_CHANGE; cc.serialized_key := FALSE; cc.kind := ALIVE; - cc.payload := gen_payload(HANDLE_NIL,10); + cc.payload := gen_payload(KEY_HASH_NIL,10); cc.src_timestamp := gen_duration(11,0); Log("RTPS Operation ADD_CACHE_CHANGE [Writer 0, Aligned Payload] (ACCPETED)", INFO); @@ -872,7 +872,7 @@ begin cc := DEFAULT_CACHE_CHANGE; cc.serialized_key := FALSE; cc.kind := ALIVE; - cc.payload := gen_payload(HANDLE_NIL,6); + cc.payload := gen_payload(KEY_HASH_NIL,6); cc.src_timestamp := gen_duration(18,0); -- TEST: SAMPLE WITH UNALIGNED PAYLOAD [<1 SLOT] @@ -897,7 +897,7 @@ begin cc := DEFAULT_CACHE_CHANGE; cc.serialized_key := FALSE; cc.kind := ALIVE; - cc.payload := gen_payload(HANDLE_NIL,10); + cc.payload := gen_payload(KEY_HASH_NIL,10); cc.src_timestamp := gen_duration(19,0); -- TEST: SAMPLE WITH EARLY TIMESTAMP [TIMESTAMP EARLIER THAN LAST READ] diff --git a/src/Tests/Level_0/L0_dds_reader_test1_lbzkriu.vhd b/src/Tests/Level_0/L0_dds_reader_test1_lbzkriu.vhd index 630e738..9ad6252 100644 --- a/src/Tests/Level_0/L0_dds_reader_test1_lbzkriu.vhd +++ b/src/Tests/Level_0/L0_dds_reader_test1_lbzkriu.vhd @@ -92,7 +92,7 @@ architecture testbench of L0_dds_reader_test1_lbzkriu is signal instance_handle_dds, si_instance_handle : INSTANCE_HANDLE_TYPE := HANDLE_NIL; signal max_samples_dds : std_logic_vector(MAX_SAMPLES_WIDTH-1 downto 0) := (others => '0'); signal si_source_timestamp : TIME_TYPE := TIME_INVALID; - signal si_publication_handle : PUBLICATION_HANDLE_TYPE := (others => (others => '0')); + signal si_publication_handle : INSTANCE_HANDLE_TYPE := HANDLE_NIL; signal si_disposed_generation_count : std_logic_vector(DISPOSED_GENERATION_COUNT_WIDTH-1 downto 0) := (others => '0'); signal si_no_writers_generation_count : std_logic_vector(NO_WRITERS_GENERATION_COUNT_WIDTH-1 downto 0) := (others => '0'); signal si_sample_rank : std_logic_vector(SAMPLE_RANK_WIDTH-1 downto 0) := (others => '0'); @@ -221,7 +221,7 @@ begin end function; impure function gen_key_hash return KEY_HASH_TYPE is - variable ret : KEY_HASH_TYPE := (others => (others => '0')); + variable ret : KEY_HASH_TYPE := KEY_HASH_NIL; begin for i in 0 to KEY_HASH_TYPE'length-1 loop ret(i) := RV.RandSlv(WORD_WIDTH); diff --git a/src/Tests/Level_0/L0_dds_reader_test1_lrzkriu.vhd b/src/Tests/Level_0/L0_dds_reader_test1_lrzkriu.vhd index e75ca41..581cbac 100644 --- a/src/Tests/Level_0/L0_dds_reader_test1_lrzkriu.vhd +++ b/src/Tests/Level_0/L0_dds_reader_test1_lrzkriu.vhd @@ -92,7 +92,7 @@ architecture testbench of L0_dds_reader_test1_lrzkriu is signal instance_handle_dds, si_instance_handle : INSTANCE_HANDLE_TYPE := HANDLE_NIL; signal max_samples_dds : std_logic_vector(MAX_SAMPLES_WIDTH-1 downto 0) := (others => '0'); signal si_source_timestamp : TIME_TYPE := TIME_INVALID; - signal si_publication_handle : PUBLICATION_HANDLE_TYPE := (others => (others => '0')); + signal si_publication_handle : INSTANCE_HANDLE_TYPE := HANDLE_NIL; signal si_disposed_generation_count : std_logic_vector(DISPOSED_GENERATION_COUNT_WIDTH-1 downto 0) := (others => '0'); signal si_no_writers_generation_count : std_logic_vector(NO_WRITERS_GENERATION_COUNT_WIDTH-1 downto 0) := (others => '0'); signal si_sample_rank : std_logic_vector(SAMPLE_RANK_WIDTH-1 downto 0) := (others => '0'); @@ -221,7 +221,7 @@ begin end function; impure function gen_key_hash return KEY_HASH_TYPE is - variable ret : KEY_HASH_TYPE := (others => (others => '0')); + variable ret : KEY_HASH_TYPE := KEY_HASH_NIL; begin for i in 0 to KEY_HASH_TYPE'length-1 loop ret(i) := RV.RandSlv(WORD_WIDTH); diff --git a/src/Tests/Level_0/L0_dds_reader_test2_arpkriu.vhd b/src/Tests/Level_0/L0_dds_reader_test2_arpkriu.vhd index 38dddd5..9653ab8 100644 --- a/src/Tests/Level_0/L0_dds_reader_test2_arpkriu.vhd +++ b/src/Tests/Level_0/L0_dds_reader_test2_arpkriu.vhd @@ -45,7 +45,7 @@ architecture testbench of L0_dds_reader_test2_arpkriu is signal instance_handle_dds, si_instance_handle : INSTANCE_HANDLE_TYPE := HANDLE_NIL; signal max_samples_dds : std_logic_vector(MAX_SAMPLES_WIDTH-1 downto 0) := (others => '0'); signal si_source_timestamp : TIME_TYPE := TIME_INVALID; - signal si_publication_handle : PUBLICATION_HANDLE_TYPE := (others => (others => '0')); + signal si_publication_handle : INSTANCE_HANDLE_TYPE := HANDLE_NIL; signal si_disposed_generation_count : std_logic_vector(DISPOSED_GENERATION_COUNT_WIDTH-1 downto 0) := (others => '0'); signal si_no_writers_generation_count : std_logic_vector(NO_WRITERS_GENERATION_COUNT_WIDTH-1 downto 0) := (others => '0'); signal si_sample_rank : std_logic_vector(SAMPLE_RANK_WIDTH-1 downto 0) := (others => '0'); @@ -174,7 +174,7 @@ begin end function; impure function gen_key_hash return KEY_HASH_TYPE is - variable ret : KEY_HASH_TYPE := (others => (others => '0')); + variable ret : KEY_HASH_TYPE := KEY_HASH_NIL; begin for i in 0 to KEY_HASH_TYPE'length-1 loop ret(i) := RV.RandSlv(WORD_WIDTH); diff --git a/src/Tests/Level_0/L0_dds_reader_test3_arzkrio.vhd b/src/Tests/Level_0/L0_dds_reader_test3_arzkrio.vhd index bfa6165..feba6a3 100644 --- a/src/Tests/Level_0/L0_dds_reader_test3_arzkrio.vhd +++ b/src/Tests/Level_0/L0_dds_reader_test3_arzkrio.vhd @@ -85,7 +85,7 @@ architecture testbench of L0_dds_reader_test3_arzkrio is signal instance_handle_dds, si_instance_handle : INSTANCE_HANDLE_TYPE := HANDLE_NIL; signal max_samples_dds : std_logic_vector(MAX_SAMPLES_WIDTH-1 downto 0) := (others => '0'); signal si_source_timestamp : TIME_TYPE := TIME_INVALID; - signal si_publication_handle : PUBLICATION_HANDLE_TYPE := (others => (others => '0')); + signal si_publication_handle : INSTANCE_HANDLE_TYPE := HANDLE_NIL; signal si_disposed_generation_count : std_logic_vector(DISPOSED_GENERATION_COUNT_WIDTH-1 downto 0) := (others => '0'); signal si_no_writers_generation_count : std_logic_vector(NO_WRITERS_GENERATION_COUNT_WIDTH-1 downto 0) := (others => '0'); signal si_sample_rank : std_logic_vector(SAMPLE_RANK_WIDTH-1 downto 0) := (others => '0'); @@ -214,7 +214,7 @@ begin end function; impure function gen_key_hash return KEY_HASH_TYPE is - variable ret : KEY_HASH_TYPE := (others => (others => '0')); + variable ret : KEY_HASH_TYPE := KEY_HASH_NIL; begin for i in 0 to KEY_HASH_TYPE'length-1 loop ret(i) := RV.RandSlv(WORD_WIDTH); diff --git a/src/Tests/Level_0/L0_dds_reader_test3_arzkriu.vhd b/src/Tests/Level_0/L0_dds_reader_test3_arzkriu.vhd index d1884d1..fd4173c 100644 --- a/src/Tests/Level_0/L0_dds_reader_test3_arzkriu.vhd +++ b/src/Tests/Level_0/L0_dds_reader_test3_arzkriu.vhd @@ -85,7 +85,7 @@ architecture testbench of L0_dds_reader_test3_arzkriu is signal instance_handle_dds, si_instance_handle : INSTANCE_HANDLE_TYPE := HANDLE_NIL; signal max_samples_dds : std_logic_vector(MAX_SAMPLES_WIDTH-1 downto 0) := (others => '0'); signal si_source_timestamp : TIME_TYPE := TIME_INVALID; - signal si_publication_handle : PUBLICATION_HANDLE_TYPE := (others => (others => '0')); + signal si_publication_handle : INSTANCE_HANDLE_TYPE := HANDLE_NIL; signal si_disposed_generation_count : std_logic_vector(DISPOSED_GENERATION_COUNT_WIDTH-1 downto 0) := (others => '0'); signal si_no_writers_generation_count : std_logic_vector(NO_WRITERS_GENERATION_COUNT_WIDTH-1 downto 0) := (others => '0'); signal si_sample_rank : std_logic_vector(SAMPLE_RANK_WIDTH-1 downto 0) := (others => '0'); @@ -214,7 +214,7 @@ begin end function; impure function gen_key_hash return KEY_HASH_TYPE is - variable ret : KEY_HASH_TYPE := (others => (others => '0')); + variable ret : KEY_HASH_TYPE := KEY_HASH_NIL; begin for i in 0 to KEY_HASH_TYPE'length-1 loop ret(i) := RV.RandSlv(WORD_WIDTH); diff --git a/src/Tests/Level_0/L0_dds_reader_test3_arzkrto.vhd b/src/Tests/Level_0/L0_dds_reader_test3_arzkrto.vhd index 0b0a636..1b686f6 100644 --- a/src/Tests/Level_0/L0_dds_reader_test3_arzkrto.vhd +++ b/src/Tests/Level_0/L0_dds_reader_test3_arzkrto.vhd @@ -85,7 +85,7 @@ architecture testbench of L0_dds_reader_test3_arzkrto is signal instance_handle_dds, si_instance_handle : INSTANCE_HANDLE_TYPE := HANDLE_NIL; signal max_samples_dds : std_logic_vector(MAX_SAMPLES_WIDTH-1 downto 0) := (others => '0'); signal si_source_timestamp : TIME_TYPE := TIME_INVALID; - signal si_publication_handle : PUBLICATION_HANDLE_TYPE := (others => (others => '0')); + signal si_publication_handle : INSTANCE_HANDLE_TYPE := HANDLE_NIL; signal si_disposed_generation_count : std_logic_vector(DISPOSED_GENERATION_COUNT_WIDTH-1 downto 0) := (others => '0'); signal si_no_writers_generation_count : std_logic_vector(NO_WRITERS_GENERATION_COUNT_WIDTH-1 downto 0) := (others => '0'); signal si_sample_rank : std_logic_vector(SAMPLE_RANK_WIDTH-1 downto 0) := (others => '0'); @@ -214,7 +214,7 @@ begin end function; impure function gen_key_hash return KEY_HASH_TYPE is - variable ret : KEY_HASH_TYPE := (others => (others => '0')); + variable ret : KEY_HASH_TYPE := KEY_HASH_NIL; begin for i in 0 to KEY_HASH_TYPE'length-1 loop ret(i) := RV.RandSlv(WORD_WIDTH); diff --git a/src/Tests/Level_0/L0_dds_reader_test3_arzkrtu.vhd b/src/Tests/Level_0/L0_dds_reader_test3_arzkrtu.vhd index b392408..df50153 100644 --- a/src/Tests/Level_0/L0_dds_reader_test3_arzkrtu.vhd +++ b/src/Tests/Level_0/L0_dds_reader_test3_arzkrtu.vhd @@ -85,7 +85,7 @@ architecture testbench of L0_dds_reader_test3_arzkrtu is signal instance_handle_dds, si_instance_handle : INSTANCE_HANDLE_TYPE := HANDLE_NIL; signal max_samples_dds : std_logic_vector(MAX_SAMPLES_WIDTH-1 downto 0) := (others => '0'); signal si_source_timestamp : TIME_TYPE := TIME_INVALID; - signal si_publication_handle : PUBLICATION_HANDLE_TYPE := (others => (others => '0')); + signal si_publication_handle : INSTANCE_HANDLE_TYPE := HANDLE_NIL; signal si_disposed_generation_count : std_logic_vector(DISPOSED_GENERATION_COUNT_WIDTH-1 downto 0) := (others => '0'); signal si_no_writers_generation_count : std_logic_vector(NO_WRITERS_GENERATION_COUNT_WIDTH-1 downto 0) := (others => '0'); signal si_sample_rank : std_logic_vector(SAMPLE_RANK_WIDTH-1 downto 0) := (others => '0'); @@ -214,7 +214,7 @@ begin end function; impure function gen_key_hash return KEY_HASH_TYPE is - variable ret : KEY_HASH_TYPE := (others => (others => '0')); + variable ret : KEY_HASH_TYPE := KEY_HASH_NIL; begin for i in 0 to KEY_HASH_TYPE'length-1 loop ret(i) := RV.RandSlv(WORD_WIDTH); diff --git a/src/Tests/Level_0/L0_dds_reader_test3_arzksto.vhd b/src/Tests/Level_0/L0_dds_reader_test3_arzksto.vhd index 2254cba..a77a247 100644 --- a/src/Tests/Level_0/L0_dds_reader_test3_arzksto.vhd +++ b/src/Tests/Level_0/L0_dds_reader_test3_arzksto.vhd @@ -86,7 +86,7 @@ architecture testbench of L0_dds_reader_test3_arzksto is signal instance_handle_dds, si_instance_handle : INSTANCE_HANDLE_TYPE := HANDLE_NIL; signal max_samples_dds : std_logic_vector(MAX_SAMPLES_WIDTH-1 downto 0) := (others => '0'); signal si_source_timestamp : TIME_TYPE := TIME_INVALID; - signal si_publication_handle : PUBLICATION_HANDLE_TYPE := (others => (others => '0')); + signal si_publication_handle : INSTANCE_HANDLE_TYPE := HANDLE_NIL; signal si_disposed_generation_count : std_logic_vector(DISPOSED_GENERATION_COUNT_WIDTH-1 downto 0) := (others => '0'); signal si_no_writers_generation_count : std_logic_vector(NO_WRITERS_GENERATION_COUNT_WIDTH-1 downto 0) := (others => '0'); signal si_sample_rank : std_logic_vector(SAMPLE_RANK_WIDTH-1 downto 0) := (others => '0'); @@ -215,7 +215,7 @@ begin end function; impure function gen_key_hash return KEY_HASH_TYPE is - variable ret : KEY_HASH_TYPE := (others => (others => '0')); + variable ret : KEY_HASH_TYPE := KEY_HASH_NIL; begin for i in 0 to KEY_HASH_TYPE'length-1 loop ret(i) := RV.RandSlv(WORD_WIDTH); diff --git a/src/Tests/Level_0/L0_dds_reader_test3_arznriu.vhd b/src/Tests/Level_0/L0_dds_reader_test3_arznriu.vhd index 95c6082..a802e87 100644 --- a/src/Tests/Level_0/L0_dds_reader_test3_arznriu.vhd +++ b/src/Tests/Level_0/L0_dds_reader_test3_arznriu.vhd @@ -66,7 +66,7 @@ architecture testbench of L0_dds_reader_test3_arznriu is signal instance_handle_dds, si_instance_handle : INSTANCE_HANDLE_TYPE := HANDLE_NIL; signal max_samples_dds : std_logic_vector(MAX_SAMPLES_WIDTH-1 downto 0) := (others => '0'); signal si_source_timestamp : TIME_TYPE := TIME_INVALID; - signal si_publication_handle : PUBLICATION_HANDLE_TYPE := (others => (others => '0')); + signal si_publication_handle : INSTANCE_HANDLE_TYPE := HANDLE_NIL; signal si_disposed_generation_count : std_logic_vector(DISPOSED_GENERATION_COUNT_WIDTH-1 downto 0) := (others => '0'); signal si_no_writers_generation_count : std_logic_vector(NO_WRITERS_GENERATION_COUNT_WIDTH-1 downto 0) := (others => '0'); signal si_sample_rank : std_logic_vector(SAMPLE_RANK_WIDTH-1 downto 0) := (others => '0'); @@ -195,7 +195,7 @@ begin end function; impure function gen_key_hash return KEY_HASH_TYPE is - variable ret : KEY_HASH_TYPE := (others => (others => '0')); + variable ret : KEY_HASH_TYPE := KEY_HASH_NIL; begin for i in 0 to KEY_HASH_TYPE'length-1 loop ret(i) := RV.RandSlv(WORD_WIDTH); @@ -306,7 +306,7 @@ begin cc := DEFAULT_CACHE_CHANGE; cc.serialized_key := FALSE; cc.kind := ALIVE; - cc.payload := gen_payload(HANDLE_NIL,10); + cc.payload := gen_payload(KEY_HASH_NIL,10); cc.src_timestamp := gen_duration(0,0); Log("RTPS Operation ADD_CACHE_CHANGE [Writer 0, Aligned Payload] (ACCEPTED)", INFO); @@ -395,7 +395,7 @@ begin cc := DEFAULT_CACHE_CHANGE; cc.serialized_key := FALSE; cc.kind := ALIVE; - cc.payload := gen_payload(HANDLE_NIL,10); + cc.payload := gen_payload(KEY_HASH_NIL,10); cc.src_timestamp := gen_duration(2,0); Log("RTPS Operation ADD_CACHE_CHANGE [Writer 0, Aligned Payload] (ACCEPTED)", INFO); diff --git a/src/Tests/Level_0/L0_dds_reader_test4_arzkriu.vhd b/src/Tests/Level_0/L0_dds_reader_test4_arzkriu.vhd index 0632ac9..e6b38ee 100644 --- a/src/Tests/Level_0/L0_dds_reader_test4_arzkriu.vhd +++ b/src/Tests/Level_0/L0_dds_reader_test4_arzkriu.vhd @@ -45,7 +45,7 @@ architecture testbench of L0_dds_reader_test4_arzkriu is signal instance_handle_dds, si_instance_handle : INSTANCE_HANDLE_TYPE := HANDLE_NIL; signal max_samples_dds : std_logic_vector(MAX_SAMPLES_WIDTH-1 downto 0) := (others => '0'); signal si_source_timestamp : TIME_TYPE := TIME_INVALID; - signal si_publication_handle : PUBLICATION_HANDLE_TYPE := (others => (others => '0')); + signal si_publication_handle : INSTANCE_HANDLE_TYPE := HANDLE_NIL; signal si_disposed_generation_count : std_logic_vector(DISPOSED_GENERATION_COUNT_WIDTH-1 downto 0) := (others => '0'); signal si_no_writers_generation_count : std_logic_vector(NO_WRITERS_GENERATION_COUNT_WIDTH-1 downto 0) := (others => '0'); signal si_sample_rank : std_logic_vector(SAMPLE_RANK_WIDTH-1 downto 0) := (others => '0'); @@ -174,7 +174,7 @@ begin end function; impure function gen_key_hash return KEY_HASH_TYPE is - variable ret : KEY_HASH_TYPE := (others => (others => '0')); + variable ret : KEY_HASH_TYPE := KEY_HASH_NIL; begin for i in 0 to KEY_HASH_TYPE'length-1 loop ret(i) := RV.RandSlv(WORD_WIDTH); diff --git a/src/Tests/Level_0/L0_dds_reader_test4_arznriu.vhd b/src/Tests/Level_0/L0_dds_reader_test4_arznriu.vhd index 9370465..7ce3c4e 100644 --- a/src/Tests/Level_0/L0_dds_reader_test4_arznriu.vhd +++ b/src/Tests/Level_0/L0_dds_reader_test4_arznriu.vhd @@ -45,7 +45,7 @@ architecture testbench of L0_dds_reader_test4_arznriu is signal instance_handle_dds, si_instance_handle : INSTANCE_HANDLE_TYPE := HANDLE_NIL; signal max_samples_dds : std_logic_vector(MAX_SAMPLES_WIDTH-1 downto 0) := (others => '0'); signal si_source_timestamp : TIME_TYPE := TIME_INVALID; - signal si_publication_handle : PUBLICATION_HANDLE_TYPE := (others => (others => '0')); + signal si_publication_handle : INSTANCE_HANDLE_TYPE := HANDLE_NIL; signal si_disposed_generation_count : std_logic_vector(DISPOSED_GENERATION_COUNT_WIDTH-1 downto 0) := (others => '0'); signal si_no_writers_generation_count : std_logic_vector(NO_WRITERS_GENERATION_COUNT_WIDTH-1 downto 0) := (others => '0'); signal si_sample_rank : std_logic_vector(SAMPLE_RANK_WIDTH-1 downto 0) := (others => '0'); @@ -174,7 +174,7 @@ begin end function; impure function gen_key_hash return KEY_HASH_TYPE is - variable ret : KEY_HASH_TYPE := (others => (others => '0')); + variable ret : KEY_HASH_TYPE := KEY_HASH_NIL; begin for i in 0 to KEY_HASH_TYPE'length-1 loop ret(i) := RV.RandSlv(WORD_WIDTH); @@ -310,7 +310,7 @@ begin cc.serialized_key := FALSE; cc.kind := ALIVE; cc.instance := HANDLE_NIL; - cc.payload := gen_payload(HANDLE_NIL,10); + cc.payload := gen_payload(KEY_HASH_NIL,10); cc.src_timestamp := gen_duration(1,0); Log("RTPS Operation ADD_CACHE_CHANGE [KEY_HASH, Writer 0, Aligned Payload] (ACCEPTED)", INFO); @@ -340,7 +340,7 @@ begin cc.serialized_key := FALSE; cc.kind := ALIVE; cc.instance := HANDLE_NIL; - cc.payload := gen_payload(HANDLE_NIL,10); + cc.payload := gen_payload(KEY_HASH_NIL,10); cc.src_timestamp := gen_duration(2,0); Log("RTPS Operation ADD_CACHE_CHANGE [KEY_HASH, Writer 1, Aligned Payload] (ACCEPTED)", INFO); diff --git a/src/Tests/Level_0/L0_dds_reader_test5_arzkriu.vhd b/src/Tests/Level_0/L0_dds_reader_test5_arzkriu.vhd index d3b3140..ab52d4e 100644 --- a/src/Tests/Level_0/L0_dds_reader_test5_arzkriu.vhd +++ b/src/Tests/Level_0/L0_dds_reader_test5_arzkriu.vhd @@ -45,7 +45,7 @@ architecture testbench of L0_dds_reader_test5_arzkriu is signal instance_handle_dds, si_instance_handle : INSTANCE_HANDLE_TYPE := HANDLE_NIL; signal max_samples_dds : std_logic_vector(MAX_SAMPLES_WIDTH-1 downto 0) := (others => '0'); signal si_source_timestamp : TIME_TYPE := TIME_INVALID; - signal si_publication_handle : PUBLICATION_HANDLE_TYPE := (others => (others => '0')); + signal si_publication_handle : INSTANCE_HANDLE_TYPE := HANDLE_NIL; signal si_disposed_generation_count : std_logic_vector(DISPOSED_GENERATION_COUNT_WIDTH-1 downto 0) := (others => '0'); signal si_no_writers_generation_count : std_logic_vector(NO_WRITERS_GENERATION_COUNT_WIDTH-1 downto 0) := (others => '0'); signal si_sample_rank : std_logic_vector(SAMPLE_RANK_WIDTH-1 downto 0) := (others => '0'); @@ -174,7 +174,7 @@ begin end function; impure function gen_key_hash return KEY_HASH_TYPE is - variable ret : KEY_HASH_TYPE := (others => (others => '0')); + variable ret : KEY_HASH_TYPE := KEY_HASH_NIL; begin for i in 0 to KEY_HASH_TYPE'length-1 loop ret(i) := RV.RandSlv(WORD_WIDTH); diff --git a/src/Tests/Level_0/L0_dds_reader_test6_arzkriu.vhd b/src/Tests/Level_0/L0_dds_reader_test6_arzkriu.vhd index b128734..c948158 100644 --- a/src/Tests/Level_0/L0_dds_reader_test6_arzkriu.vhd +++ b/src/Tests/Level_0/L0_dds_reader_test6_arzkriu.vhd @@ -45,7 +45,7 @@ architecture testbench of L0_dds_reader_test6_arzkriu is signal instance_handle_dds, si_instance_handle : INSTANCE_HANDLE_TYPE := HANDLE_NIL; signal max_samples_dds : std_logic_vector(MAX_SAMPLES_WIDTH-1 downto 0) := (others => '0'); signal si_source_timestamp : TIME_TYPE := TIME_INVALID; - signal si_publication_handle : PUBLICATION_HANDLE_TYPE := (others => (others => '0')); + signal si_publication_handle : INSTANCE_HANDLE_TYPE := HANDLE_NIL; signal si_disposed_generation_count : std_logic_vector(DISPOSED_GENERATION_COUNT_WIDTH-1 downto 0) := (others => '0'); signal si_no_writers_generation_count : std_logic_vector(NO_WRITERS_GENERATION_COUNT_WIDTH-1 downto 0) := (others => '0'); signal si_sample_rank : std_logic_vector(SAMPLE_RANK_WIDTH-1 downto 0) := (others => '0'); @@ -174,7 +174,7 @@ begin end function; impure function gen_key_hash return KEY_HASH_TYPE is - variable ret : KEY_HASH_TYPE := (others => (others => '0')); + variable ret : KEY_HASH_TYPE := KEY_HASH_NIL; begin for i in 0 to KEY_HASH_TYPE'length-1 loop ret(i) := RV.RandSlv(WORD_WIDTH); diff --git a/src/Tests/Level_0/L0_dds_reader_test7_arzkriu.vhd b/src/Tests/Level_0/L0_dds_reader_test7_arzkriu.vhd index 60c11fb..4317734 100644 --- a/src/Tests/Level_0/L0_dds_reader_test7_arzkriu.vhd +++ b/src/Tests/Level_0/L0_dds_reader_test7_arzkriu.vhd @@ -45,7 +45,7 @@ architecture testbench of L0_dds_reader_test7_arzkriu is signal instance_handle_dds, si_instance_handle : INSTANCE_HANDLE_TYPE := HANDLE_NIL; signal max_samples_dds : std_logic_vector(MAX_SAMPLES_WIDTH-1 downto 0) := (others => '0'); signal si_source_timestamp : TIME_TYPE := TIME_INVALID; - signal si_publication_handle : PUBLICATION_HANDLE_TYPE := (others => (others => '0')); + signal si_publication_handle : INSTANCE_HANDLE_TYPE := HANDLE_NIL; signal si_disposed_generation_count : std_logic_vector(DISPOSED_GENERATION_COUNT_WIDTH-1 downto 0) := (others => '0'); signal si_no_writers_generation_count : std_logic_vector(NO_WRITERS_GENERATION_COUNT_WIDTH-1 downto 0) := (others => '0'); signal si_sample_rank : std_logic_vector(SAMPLE_RANK_WIDTH-1 downto 0) := (others => '0'); @@ -174,7 +174,7 @@ begin end function; impure function gen_key_hash return KEY_HASH_TYPE is - variable ret : KEY_HASH_TYPE := (others => (others => '0')); + variable ret : KEY_HASH_TYPE := KEY_HASH_NIL; begin for i in 0 to KEY_HASH_TYPE'length-1 loop ret(i) := RV.RandSlv(WORD_WIDTH); diff --git a/src/Tests/Level_0/L0_dds_writer_test1_afk.vhd b/src/Tests/Level_0/L0_dds_writer_test1_afk.vhd index 5488e83..aa87b51 100644 --- a/src/Tests/Level_0/L0_dds_writer_test1_afk.vhd +++ b/src/Tests/Level_0/L0_dds_writer_test1_afk.vhd @@ -237,7 +237,7 @@ begin end function; impure function gen_key_hash return KEY_HASH_TYPE is - variable ret : KEY_HASH_TYPE := (others => (others => '0')); + variable ret : KEY_HASH_TYPE := KEY_HASH_NIL; begin for i in 0 to KEY_HASH_TYPE'length-1 loop ret(i) := RV.RandSlv(WORD_WIDTH); diff --git a/src/Tests/Level_0/L0_dds_writer_test1_aik.vhd b/src/Tests/Level_0/L0_dds_writer_test1_aik.vhd index 0bc64b3..e45dd79 100644 --- a/src/Tests/Level_0/L0_dds_writer_test1_aik.vhd +++ b/src/Tests/Level_0/L0_dds_writer_test1_aik.vhd @@ -217,7 +217,7 @@ begin end function; impure function gen_key_hash return KEY_HASH_TYPE is - variable ret : KEY_HASH_TYPE := (others => (others => '0')); + variable ret : KEY_HASH_TYPE := KEY_HASH_NIL; begin for i in 0 to KEY_HASH_TYPE'length-1 loop ret(i) := RV.RandSlv(WORD_WIDTH); diff --git a/src/Tests/Level_0/L0_dds_writer_test1_ain.vhd b/src/Tests/Level_0/L0_dds_writer_test1_ain.vhd index 6bbef99..1797726 100644 --- a/src/Tests/Level_0/L0_dds_writer_test1_ain.vhd +++ b/src/Tests/Level_0/L0_dds_writer_test1_ain.vhd @@ -190,7 +190,7 @@ begin end function; impure function gen_key_hash return KEY_HASH_TYPE is - variable ret : KEY_HASH_TYPE := (others => (others => '0')); + variable ret : KEY_HASH_TYPE := KEY_HASH_NIL; begin for i in 0 to KEY_HASH_TYPE'length-1 loop ret(i) := RV.RandSlv(WORD_WIDTH); diff --git a/src/Tests/Level_0/L0_dds_writer_test1_lik.vhd b/src/Tests/Level_0/L0_dds_writer_test1_lik.vhd index 355f572..b19ce65 100644 --- a/src/Tests/Level_0/L0_dds_writer_test1_lik.vhd +++ b/src/Tests/Level_0/L0_dds_writer_test1_lik.vhd @@ -217,7 +217,7 @@ begin end function; impure function gen_key_hash return KEY_HASH_TYPE is - variable ret : KEY_HASH_TYPE := (others => (others => '0')); + variable ret : KEY_HASH_TYPE := KEY_HASH_NIL; begin for i in 0 to KEY_HASH_TYPE'length-1 loop ret(i) := RV.RandSlv(WORD_WIDTH); diff --git a/src/Tests/Level_0/L0_dds_writer_test2_aik.vhd b/src/Tests/Level_0/L0_dds_writer_test2_aik.vhd index 13afb67..cab0ad4 100644 --- a/src/Tests/Level_0/L0_dds_writer_test2_aik.vhd +++ b/src/Tests/Level_0/L0_dds_writer_test2_aik.vhd @@ -151,7 +151,7 @@ begin end function; impure function gen_key_hash return KEY_HASH_TYPE is - variable ret : KEY_HASH_TYPE := (others => (others => '0')); + variable ret : KEY_HASH_TYPE := KEY_HASH_NIL; begin for i in 0 to KEY_HASH_TYPE'length-1 loop ret(i) := RV.RandSlv(WORD_WIDTH); diff --git a/src/Tests/Level_0/L0_dds_writer_test3_aik.vhd b/src/Tests/Level_0/L0_dds_writer_test3_aik.vhd index 4b396c3..22bdb69 100644 --- a/src/Tests/Level_0/L0_dds_writer_test3_aik.vhd +++ b/src/Tests/Level_0/L0_dds_writer_test3_aik.vhd @@ -153,7 +153,7 @@ begin end function; impure function gen_key_hash return KEY_HASH_TYPE is - variable ret : KEY_HASH_TYPE := (others => (others => '0')); + variable ret : KEY_HASH_TYPE := KEY_HASH_NIL; begin for i in 0 to KEY_HASH_TYPE'length-1 loop ret(i) := RV.RandSlv(WORD_WIDTH); diff --git a/src/Tests/Level_0/L0_dds_writer_test3_ain.vhd b/src/Tests/Level_0/L0_dds_writer_test3_ain.vhd index 9e4daf2..9d82b69 100644 --- a/src/Tests/Level_0/L0_dds_writer_test3_ain.vhd +++ b/src/Tests/Level_0/L0_dds_writer_test3_ain.vhd @@ -153,7 +153,7 @@ begin end function; impure function gen_key_hash return KEY_HASH_TYPE is - variable ret : KEY_HASH_TYPE := (others => (others => '0')); + variable ret : KEY_HASH_TYPE := KEY_HASH_NIL; begin for i in 0 to KEY_HASH_TYPE'length-1 loop ret(i) := RV.RandSlv(WORD_WIDTH); diff --git a/src/Tests/Level_0/L0_dds_writer_test4_aik.vhd b/src/Tests/Level_0/L0_dds_writer_test4_aik.vhd index dd5bfbd..5f37c2b 100644 --- a/src/Tests/Level_0/L0_dds_writer_test4_aik.vhd +++ b/src/Tests/Level_0/L0_dds_writer_test4_aik.vhd @@ -153,7 +153,7 @@ begin end function; impure function gen_key_hash return KEY_HASH_TYPE is - variable ret : KEY_HASH_TYPE := (others => (others => '0')); + variable ret : KEY_HASH_TYPE := KEY_HASH_NIL; begin for i in 0 to KEY_HASH_TYPE'length-1 loop ret(i) := RV.RandSlv(WORD_WIDTH); diff --git a/src/Tests/Level_0/L0_dds_writer_test5_afk.vhd b/src/Tests/Level_0/L0_dds_writer_test5_afk.vhd index 0af24a3..d287af0 100644 --- a/src/Tests/Level_0/L0_dds_writer_test5_afk.vhd +++ b/src/Tests/Level_0/L0_dds_writer_test5_afk.vhd @@ -153,7 +153,7 @@ begin end function; impure function gen_key_hash return KEY_HASH_TYPE is - variable ret : KEY_HASH_TYPE := (others => (others => '0')); + variable ret : KEY_HASH_TYPE := KEY_HASH_NIL; begin for i in 0 to KEY_HASH_TYPE'length-1 loop ret(i) := RV.RandSlv(WORD_WIDTH); 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 947c841..0853f5c 100644 --- a/src/Tests/Level_0/L0_rtps_reader_test2_tbk.vhd +++ b/src/Tests/Level_0/L0_rtps_reader_test2_tbk.vhd @@ -165,7 +165,7 @@ begin end function; impure function gen_key_hash return KEY_HASH_TYPE is - variable ret : KEY_HASH_TYPE := (others => (others => '0')); + variable ret : KEY_HASH_TYPE := KEY_HASH_NIL; begin for i in 0 to KEY_HASH_TYPE'length-1 loop ret(i) := RV.RandSlv(WORD_WIDTH); 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 766c293..2525824 100644 --- a/src/Tests/Level_0/L0_rtps_reader_test2_trk.vhd +++ b/src/Tests/Level_0/L0_rtps_reader_test2_trk.vhd @@ -165,7 +165,7 @@ begin end function; impure function gen_key_hash return KEY_HASH_TYPE is - variable ret : KEY_HASH_TYPE := (others => (others => '0')); + variable ret : KEY_HASH_TYPE := KEY_HASH_NIL; begin for i in 0 to KEY_HASH_TYPE'length-1 loop ret(i) := RV.RandSlv(WORD_WIDTH); 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 f4117cc..ee9dcb5 100644 --- a/src/Tests/Level_0/L0_rtps_reader_test2_vbk.vhd +++ b/src/Tests/Level_0/L0_rtps_reader_test2_vbk.vhd @@ -165,7 +165,7 @@ begin end function; impure function gen_key_hash return KEY_HASH_TYPE is - variable ret : KEY_HASH_TYPE := (others => (others => '0')); + variable ret : KEY_HASH_TYPE := KEY_HASH_NIL; begin for i in 0 to KEY_HASH_TYPE'length-1 loop ret(i) := RV.RandSlv(WORD_WIDTH); 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 88b600a..6b99a81 100644 --- a/src/Tests/Level_0/L0_rtps_reader_test2_vrk.vhd +++ b/src/Tests/Level_0/L0_rtps_reader_test2_vrk.vhd @@ -165,7 +165,7 @@ begin end function; impure function gen_key_hash return KEY_HASH_TYPE is - variable ret : KEY_HASH_TYPE := (others => (others => '0')); + variable ret : KEY_HASH_TYPE := KEY_HASH_NIL; begin for i in 0 to KEY_HASH_TYPE'length-1 loop ret(i) := RV.RandSlv(WORD_WIDTH); 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 e31944b..0dff8b1 100644 --- a/src/Tests/Level_0/L0_rtps_reader_test2_vrn.vhd +++ b/src/Tests/Level_0/L0_rtps_reader_test2_vrn.vhd @@ -165,7 +165,7 @@ begin end function; impure function gen_key_hash return KEY_HASH_TYPE is - variable ret : KEY_HASH_TYPE := (others => (others => '0')); + variable ret : KEY_HASH_TYPE := KEY_HASH_NIL; begin for i in 0 to KEY_HASH_TYPE'length-1 loop ret(i) := RV.RandSlv(WORD_WIDTH); diff --git a/src/Tests/Level_0/L0_rtps_reader_test3_a.vhd b/src/Tests/Level_0/L0_rtps_reader_test3_a.vhd index 0a19eac..33bdd25 100644 --- a/src/Tests/Level_0/L0_rtps_reader_test3_a.vhd +++ b/src/Tests/Level_0/L0_rtps_reader_test3_a.vhd @@ -164,7 +164,7 @@ begin end function; impure function gen_key_hash return KEY_HASH_TYPE is - variable ret : KEY_HASH_TYPE := (others => (others => '0')); + variable ret : KEY_HASH_TYPE := KEY_HASH_NIL; begin for i in 0 to KEY_HASH_TYPE'length-1 loop ret(i) := RV.RandSlv(WORD_WIDTH); diff --git a/src/Tests/Level_0/L0_rtps_reader_test3_m.vhd b/src/Tests/Level_0/L0_rtps_reader_test3_m.vhd index 45f35fb..20206df 100644 --- a/src/Tests/Level_0/L0_rtps_reader_test3_m.vhd +++ b/src/Tests/Level_0/L0_rtps_reader_test3_m.vhd @@ -164,7 +164,7 @@ begin end function; impure function gen_key_hash return KEY_HASH_TYPE is - variable ret : KEY_HASH_TYPE := (others => (others => '0')); + variable ret : KEY_HASH_TYPE := KEY_HASH_NIL; begin for i in 0 to KEY_HASH_TYPE'length-1 loop ret(i) := RV.RandSlv(WORD_WIDTH); diff --git a/src/Tests/Level_1/L1_Type1_key_holder_test1.vhd b/src/Tests/Level_1/L1_Type1_key_holder_test1.vhd index 96bfecf..a529476 100644 --- a/src/Tests/Level_1/L1_Type1_key_holder_test1.vhd +++ b/src/Tests/Level_1/L1_Type1_key_holder_test1.vhd @@ -28,7 +28,7 @@ architecture testbench of L1_Type1_key_holder_test1 is signal opcode_kh : KEY_HOLDER_OPCODE_TYPE := NOP; shared variable SB_out : osvvm.ScoreBoardPkg_slv.ScoreBoardPType; shared variable serialized_key : TEST_PACKET_TYPE := EMPTY_TEST_PACKET; - signal key_hash, key_hash_latch : KEY_HASH_TYPE := HANDLE_NIL; + signal key_hash, key_hash_latch : KEY_HASH_TYPE := KEY_HASH_NIL; signal id_in : std_logic_vector(CDR_LONG_WIDTH-1 downto 0) := (others => '0'); signal a_in : std_logic_vector(CDR_LONG_WIDTH-1 downto 0) := (others => '0'); diff --git a/src/Tests/Level_1/L1_Type1_key_holder_test2.vhd b/src/Tests/Level_1/L1_Type1_key_holder_test2.vhd index 27df847..ea0d723 100644 --- a/src/Tests/Level_1/L1_Type1_key_holder_test2.vhd +++ b/src/Tests/Level_1/L1_Type1_key_holder_test2.vhd @@ -28,7 +28,7 @@ architecture testbench of L1_Type1_key_holder_test2 is signal opcode_kh : KEY_HOLDER_OPCODE_TYPE := NOP; shared variable SB_out : osvvm.ScoreBoardPkg_slv.ScoreBoardPType; shared variable serialized_key : TEST_PACKET_TYPE := EMPTY_TEST_PACKET; - signal key_hash, key_hash_latch : KEY_HASH_TYPE := HANDLE_NIL; + signal key_hash, key_hash_latch : KEY_HASH_TYPE := KEY_HASH_NIL; signal id_in : std_logic_vector(CDR_LONG_WIDTH-1 downto 0) := (others => '0'); signal a_in : std_logic_vector(CDR_LONG_WIDTH-1 downto 0) := (others => '0'); diff --git a/src/Tests/Level_1/L1_Type1_wrapper_test1.vhd b/src/Tests/Level_1/L1_Type1_wrapper_test1.vhd index 88bd089..1b163e7 100644 --- a/src/Tests/Level_1/L1_Type1_wrapper_test1.vhd +++ b/src/Tests/Level_1/L1_Type1_wrapper_test1.vhd @@ -92,7 +92,7 @@ begin si_instance_state_dds => (others => '0'), si_source_timestamp_dds => TIME_ZERO, si_instance_handle_dds => HANDLE_NIL, - si_publication_handle_dds => GUID_UNKNOWN, + si_publication_handle_dds => HANDLE_NIL, si_disposed_generation_count_dds => (others => '0'), si_no_writers_generation_count_dds => (others => '0'), si_sample_rank_dds => (others => '0'), diff --git a/src/Tests/Level_1/L1_Type1_wrapper_test2.vhd b/src/Tests/Level_1/L1_Type1_wrapper_test2.vhd index 10ac9b7..d82c216 100644 --- a/src/Tests/Level_1/L1_Type1_wrapper_test2.vhd +++ b/src/Tests/Level_1/L1_Type1_wrapper_test2.vhd @@ -95,7 +95,7 @@ begin si_instance_state_dds => (others => '0'), si_source_timestamp_dds => TIME_ZERO, si_instance_handle_dds => HANDLE_NIL, - si_publication_handle_dds => GUID_UNKNOWN, + si_publication_handle_dds => HANDLE_NIL, si_disposed_generation_count_dds => (others => '0'), si_no_writers_generation_count_dds => (others => '0'), si_sample_rank_dds => (others => '0'), diff --git a/src/Tests/Level_1/L1_Type2_key_holder_test1.vhd b/src/Tests/Level_1/L1_Type2_key_holder_test1.vhd index 27e474b..d3d6b9e 100644 --- a/src/Tests/Level_1/L1_Type2_key_holder_test1.vhd +++ b/src/Tests/Level_1/L1_Type2_key_holder_test1.vhd @@ -28,7 +28,7 @@ architecture testbench of L1_Type2_key_holder_test1 is signal opcode_kh : KEY_HOLDER_OPCODE_TYPE := NOP; shared variable SB_out : osvvm.ScoreBoardPkg_slv.ScoreBoardPType; shared variable serialized_key : TEST_PACKET_TYPE := EMPTY_TEST_PACKET; - signal key_hash, key_hash_latch : KEY_HASH_TYPE := HANDLE_NIL; + signal key_hash, key_hash_latch : KEY_HASH_TYPE := KEY_HASH_NIL; signal id_in : std_logic_vector(CDR_LONG_WIDTH-1 downto 0) := (others => '0'); signal TestSequence_len_in, TestSequence_addr_in: std_logic_vector(TESTSEQUENCE_ADDR_WIDTH-1 downto 0) := (others => '0'); diff --git a/src/Tests/Level_1/L1_Type2_key_holder_test2.vhd b/src/Tests/Level_1/L1_Type2_key_holder_test2.vhd index e8e65de..33a7476 100644 --- a/src/Tests/Level_1/L1_Type2_key_holder_test2.vhd +++ b/src/Tests/Level_1/L1_Type2_key_holder_test2.vhd @@ -28,7 +28,7 @@ architecture testbench of L1_Type2_key_holder_test2 is signal opcode_kh : KEY_HOLDER_OPCODE_TYPE := NOP; shared variable SB_out : osvvm.ScoreBoardPkg_slv.ScoreBoardPType; shared variable serialized_key : TEST_PACKET_TYPE := EMPTY_TEST_PACKET; - signal key_hash, key_hash_latch : KEY_HASH_TYPE := HANDLE_NIL; + signal key_hash, key_hash_latch : KEY_HASH_TYPE := KEY_HASH_NIL; signal id_in : std_logic_vector(CDR_LONG_WIDTH-1 downto 0) := (others => '0'); signal TestSequence_len_in, TestSequence_addr_in: std_logic_vector(TESTSEQUENCE_ADDR_WIDTH-1 downto 0) := (others => '0'); diff --git a/src/Tests/Level_1/L1_Type2_wrapper_test1.vhd b/src/Tests/Level_1/L1_Type2_wrapper_test1.vhd index 689daf1..8e578e9 100644 --- a/src/Tests/Level_1/L1_Type2_wrapper_test1.vhd +++ b/src/Tests/Level_1/L1_Type2_wrapper_test1.vhd @@ -164,7 +164,7 @@ begin si_instance_state_dds => (others => '0'), si_source_timestamp_dds => TIME_ZERO, si_instance_handle_dds => HANDLE_NIL, - si_publication_handle_dds => GUID_UNKNOWN, + si_publication_handle_dds => HANDLE_NIL, si_disposed_generation_count_dds => (others => '0'), si_no_writers_generation_count_dds => (others => '0'), si_sample_rank_dds => (others => '0'), diff --git a/src/Tests/Level_1/L1_Type2_wrapper_test2.vhd b/src/Tests/Level_1/L1_Type2_wrapper_test2.vhd index 1b4591b..7aa0d7b 100644 --- a/src/Tests/Level_1/L1_Type2_wrapper_test2.vhd +++ b/src/Tests/Level_1/L1_Type2_wrapper_test2.vhd @@ -167,7 +167,7 @@ begin si_instance_state_dds => (others => '0'), si_source_timestamp_dds => TIME_ZERO, si_instance_handle_dds => HANDLE_NIL, - si_publication_handle_dds => GUID_UNKNOWN, + si_publication_handle_dds => HANDLE_NIL, si_disposed_generation_count_dds => (others => '0'), si_no_writers_generation_count_dds => (others => '0'), si_sample_rank_dds => (others => '0'), diff --git a/src/Tests/Level_1/L1_rtps_writer_test1_tbkdp.vhd b/src/Tests/Level_1/L1_rtps_writer_test1_tbkdp.vhd index 74c09a5..9efc596 100644 --- a/src/Tests/Level_1/L1_rtps_writer_test1_tbkdp.vhd +++ b/src/Tests/Level_1/L1_rtps_writer_test1_tbkdp.vhd @@ -196,7 +196,7 @@ begin end function; impure function gen_key_hash return KEY_HASH_TYPE is - variable ret : KEY_HASH_TYPE := (others => (others => '0')); + variable ret : KEY_HASH_TYPE := KEY_HASH_NIL; begin for i in 0 to KEY_HASH_TYPE'length-1 loop ret(i) := RV.RandSlv(WORD_WIDTH); diff --git a/src/Tests/Level_1/L1_rtps_writer_test1_trkdn.vhd b/src/Tests/Level_1/L1_rtps_writer_test1_trkdn.vhd index 2cb9ee4..5e7e65d 100644 --- a/src/Tests/Level_1/L1_rtps_writer_test1_trkdn.vhd +++ b/src/Tests/Level_1/L1_rtps_writer_test1_trkdn.vhd @@ -196,7 +196,7 @@ begin end function; impure function gen_key_hash return KEY_HASH_TYPE is - variable ret : KEY_HASH_TYPE := (others => (others => '0')); + variable ret : KEY_HASH_TYPE := KEY_HASH_NIL; begin for i in 0 to KEY_HASH_TYPE'length-1 loop ret(i) := RV.RandSlv(WORD_WIDTH); diff --git a/src/Tests/Level_1/L1_rtps_writer_test1_trkdp.vhd b/src/Tests/Level_1/L1_rtps_writer_test1_trkdp.vhd index 80364f7..be6d511 100644 --- a/src/Tests/Level_1/L1_rtps_writer_test1_trkdp.vhd +++ b/src/Tests/Level_1/L1_rtps_writer_test1_trkdp.vhd @@ -196,7 +196,7 @@ begin end function; impure function gen_key_hash return KEY_HASH_TYPE is - variable ret : KEY_HASH_TYPE := (others => (others => '0')); + variable ret : KEY_HASH_TYPE := KEY_HASH_NIL; begin for i in 0 to KEY_HASH_TYPE'length-1 loop ret(i) := RV.RandSlv(WORD_WIDTH); diff --git a/src/Tests/Level_1/L1_rtps_writer_test1_vbkdp.vhd b/src/Tests/Level_1/L1_rtps_writer_test1_vbkdp.vhd index e8269ad..3109263 100644 --- a/src/Tests/Level_1/L1_rtps_writer_test1_vbkdp.vhd +++ b/src/Tests/Level_1/L1_rtps_writer_test1_vbkdp.vhd @@ -196,7 +196,7 @@ begin end function; impure function gen_key_hash return KEY_HASH_TYPE is - variable ret : KEY_HASH_TYPE := (others => (others => '0')); + variable ret : KEY_HASH_TYPE := KEY_HASH_NIL; begin for i in 0 to KEY_HASH_TYPE'length-1 loop ret(i) := RV.RandSlv(WORD_WIDTH); diff --git a/src/Tests/Level_1/L1_rtps_writer_test1_vrkdn.vhd b/src/Tests/Level_1/L1_rtps_writer_test1_vrkdn.vhd index 1c208a3..f4d0fb7 100644 --- a/src/Tests/Level_1/L1_rtps_writer_test1_vrkdn.vhd +++ b/src/Tests/Level_1/L1_rtps_writer_test1_vrkdn.vhd @@ -196,7 +196,7 @@ begin end function; impure function gen_key_hash return KEY_HASH_TYPE is - variable ret : KEY_HASH_TYPE := (others => (others => '0')); + variable ret : KEY_HASH_TYPE := KEY_HASH_NIL; begin for i in 0 to KEY_HASH_TYPE'length-1 loop ret(i) := RV.RandSlv(WORD_WIDTH); diff --git a/src/Tests/Level_1/L1_rtps_writer_test1_vrkdp.vhd b/src/Tests/Level_1/L1_rtps_writer_test1_vrkdp.vhd index 7172e8b..ef7d53f 100644 --- a/src/Tests/Level_1/L1_rtps_writer_test1_vrkdp.vhd +++ b/src/Tests/Level_1/L1_rtps_writer_test1_vrkdp.vhd @@ -196,7 +196,7 @@ begin end function; impure function gen_key_hash return KEY_HASH_TYPE is - variable ret : KEY_HASH_TYPE := (others => (others => '0')); + variable ret : KEY_HASH_TYPE := KEY_HASH_NIL; begin for i in 0 to KEY_HASH_TYPE'length-1 loop ret(i) := RV.RandSlv(WORD_WIDTH); diff --git a/src/Tests/Level_1/L1_rtps_writer_test1_vrksp.vhd b/src/Tests/Level_1/L1_rtps_writer_test1_vrksp.vhd index f077359..8e1891f 100644 --- a/src/Tests/Level_1/L1_rtps_writer_test1_vrksp.vhd +++ b/src/Tests/Level_1/L1_rtps_writer_test1_vrksp.vhd @@ -196,7 +196,7 @@ begin end function; impure function gen_key_hash return KEY_HASH_TYPE is - variable ret : KEY_HASH_TYPE := (others => (others => '0')); + variable ret : KEY_HASH_TYPE := KEY_HASH_NIL; begin for i in 0 to KEY_HASH_TYPE'length-1 loop ret(i) := RV.RandSlv(WORD_WIDTH); diff --git a/src/Tests/Level_1/L1_rtps_writer_test1_vrndp.vhd b/src/Tests/Level_1/L1_rtps_writer_test1_vrndp.vhd index e90d205..b3f7e62 100644 --- a/src/Tests/Level_1/L1_rtps_writer_test1_vrndp.vhd +++ b/src/Tests/Level_1/L1_rtps_writer_test1_vrndp.vhd @@ -196,7 +196,7 @@ begin end function; impure function gen_key_hash return KEY_HASH_TYPE is - variable ret : KEY_HASH_TYPE := (others => (others => '0')); + variable ret : KEY_HASH_TYPE := KEY_HASH_NIL; begin for i in 0 to KEY_HASH_TYPE'length-1 loop ret(i) := RV.RandSlv(WORD_WIDTH); diff --git a/src/Tests/Level_1/L1_rtps_writer_test2_vrkdn.vhd b/src/Tests/Level_1/L1_rtps_writer_test2_vrkdn.vhd index 81af70e..cc83c0f 100644 --- a/src/Tests/Level_1/L1_rtps_writer_test2_vrkdn.vhd +++ b/src/Tests/Level_1/L1_rtps_writer_test2_vrkdn.vhd @@ -195,7 +195,7 @@ begin end function; impure function gen_key_hash return KEY_HASH_TYPE is - variable ret : KEY_HASH_TYPE := (others => (others => '0')); + variable ret : KEY_HASH_TYPE := KEY_HASH_NIL; begin for i in 0 to KEY_HASH_TYPE'length-1 loop ret(i) := RV.RandSlv(WORD_WIDTH); diff --git a/src/Tests/Level_2/L2_Testbench_Lib3.vhd b/src/Tests/Level_2/L2_Testbench_Lib3.vhd index 772e4ad..f284a04 100644 --- a/src/Tests/Level_2/L2_Testbench_Lib3.vhd +++ b/src/Tests/Level_2/L2_Testbench_Lib3.vhd @@ -43,7 +43,7 @@ entity L2_Testbench_Lib3 is si_instance_state_user : out std_logic_vector(INSTANCE_STATE_KIND_WIDTH-1 downto 0); si_source_timestamp_user : out TIME_TYPE; si_instance_handle_user : out INSTANCE_HANDLE_TYPE; - si_publication_handle_user : out PUBLICATION_HANDLE_TYPE; + si_publication_handle_user : out INSTANCE_HANDLE_TYPE; si_disposed_generation_count_user : out std_logic_vector(DISPOSED_GENERATION_COUNT_WIDTH-1 downto 0); si_no_writers_generation_count_user : out std_logic_vector(NO_WRITERS_GENERATION_COUNT_WIDTH-1 downto 0); si_sample_rank_user : out std_logic_vector(SAMPLE_RANK_WIDTH-1 downto 0); @@ -80,7 +80,7 @@ architecture arch of L2_Testbench_Lib3 is signal return_code_wr_dds : std_logic_vector(RETURN_CODE_WIDTH-1 downto 0); signal data_in_wr_dds : std_logic_vector(WORD_WIDTH-1 downto 0); signal si_source_timestamp_wr_dds : TIME_TYPE; - signal si_publication_handle_wr_dds : PUBLICATION_HANDLE_TYPE; + signal si_publication_handle_wr_dds : INSTANCE_HANDLE_TYPE; signal si_disposed_generation_count_wr_dds : std_logic_vector(DISPOSED_GENERATION_COUNT_WIDTH-1 downto 0); signal si_no_writers_generation_count_wr_dds : std_logic_vector(NO_WRITERS_GENERATION_COUNT_WIDTH-1 downto 0); signal si_sample_rank_wr_dds : std_logic_vector(SAMPLE_RANK_WIDTH-1 downto 0); diff --git a/src/Tests/Level_2/L2_Type1_test1.vhd b/src/Tests/Level_2/L2_Type1_test1.vhd index ecfca33..3a3f0f9 100644 --- a/src/Tests/Level_2/L2_Type1_test1.vhd +++ b/src/Tests/Level_2/L2_Type1_test1.vhd @@ -54,7 +54,7 @@ architecture testbench of L2_Type1_test1 is signal max_samples_r : std_logic_vector(MAX_SAMPLES_WIDTH-1 downto 0) := (others => '0'); signal return_code_r : std_logic_vector(RETURN_CODE_WIDTH-1 downto 0) := RETCODE_OK; signal si_source_timestamp_r : Testbench_Lib3.rtps_package.TIME_TYPE := Testbench_Lib3.rtps_package.TIME_INVALID; - signal si_publication_handle_r : Testbench_Lib3.rtps_package.PUBLICATION_HANDLE_TYPE := Testbench_Lib3.rtps_package.GUID_UNKNOWN; + signal si_publication_handle_r : Testbench_Lib3.rtps_package.INSTANCE_HANDLE_TYPE := Testbench_Lib3.rtps_package.HANDLE_NIL; signal si_disposed_generation_count_r : std_logic_vector(DISPOSED_GENERATION_COUNT_WIDTH-1 downto 0) := (others => '0'); signal si_no_writers_generation_count_r : std_logic_vector(NO_WRITERS_GENERATION_COUNT_WIDTH-1 downto 0) := (others => '0'); signal si_sample_rank_r : std_logic_vector(SAMPLE_RANK_WIDTH-1 downto 0) := (others => '0'); diff --git a/src/Tests/Type1_key_holder.vhd b/src/Tests/Type1_key_holder.vhd index fb110c7..6a2af8d 100644 --- a/src/Tests/Type1_key_holder.vhd +++ b/src/Tests/Type1_key_holder.vhd @@ -141,7 +141,7 @@ begin ack <= '1'; stage_next <= GET_PAYLOAD_HEADER; -- Reset - key_hash_next <= HANDLE_NIL; + key_hash_next <= KEY_HASH_NIL; when PUSH_SERIALIZED_KEY => ack <= '1'; -- Serialized Key is in PLAIN_CDR2 Big Endian encoding @@ -156,7 +156,7 @@ begin when READ_KEY_HASH => ack <= '1'; -- Key Hash not calculated - if (key_hash = HANDLE_NIL) then + if (key_hash = KEY_HASH_NIL) then stage_next <= START_KEY_HASH_GENERATION; else stage_next <= PUSH_KEY_HASH; @@ -493,7 +493,7 @@ begin align_offset <= (others => '0'); data_in_latch <= (others => '0'); data_out_latch <= (others => '0'); - key_hash <= HANDLE_NIL; + key_hash <= KEY_HASH_NIL; -- ###GENERATED START### id_latch <= (others => '0'); -- ###GENERATED END### diff --git a/src/Tests/Type1_reader_wrapper.vhd b/src/Tests/Type1_reader_wrapper.vhd index cfea6d1..5b8c619 100644 --- a/src/Tests/Type1_reader_wrapper.vhd +++ b/src/Tests/Type1_reader_wrapper.vhd @@ -33,7 +33,7 @@ entity Type1_reader_wrapper is si_instance_state_dds : in std_logic_vector(INSTANCE_STATE_KIND_WIDTH-1 downto 0); si_source_timestamp_dds : in TIME_TYPE; si_instance_handle_dds : in INSTANCE_HANDLE_TYPE; - si_publication_handle_dds : in PUBLICATION_HANDLE_TYPE; + si_publication_handle_dds : in INSTANCE_HANDLE_TYPE; si_disposed_generation_count_dds : in std_logic_vector(DISPOSED_GENERATION_COUNT_WIDTH-1 downto 0); si_no_writers_generation_count_dds : in std_logic_vector(NO_WRITERS_GENERATION_COUNT_WIDTH-1 downto 0); si_sample_rank_dds : in std_logic_vector(SAMPLE_RANK_WIDTH-1 downto 0); @@ -64,7 +64,7 @@ entity Type1_reader_wrapper is si_instance_state_user : out std_logic_vector(INSTANCE_STATE_KIND_WIDTH-1 downto 0); si_source_timestamp_user : out TIME_TYPE; si_instance_handle_user : out INSTANCE_HANDLE_TYPE; - si_publication_handle_user : out PUBLICATION_HANDLE_TYPE; + si_publication_handle_user : out INSTANCE_HANDLE_TYPE; si_disposed_generation_count_user : out std_logic_vector(DISPOSED_GENERATION_COUNT_WIDTH-1 downto 0); si_no_writers_generation_count_user : out std_logic_vector(NO_WRITERS_GENERATION_COUNT_WIDTH-1 downto 0); si_sample_rank_user : out std_logic_vector(SAMPLE_RANK_WIDTH-1 downto 0); diff --git a/src/Tests/Type2_key_holder.vhd b/src/Tests/Type2_key_holder.vhd index ea9c008..faf5514 100644 --- a/src/Tests/Type2_key_holder.vhd +++ b/src/Tests/Type2_key_holder.vhd @@ -185,7 +185,7 @@ begin ack <= '1'; stage_next <= GET_PAYLOAD_HEADER; -- Reset - key_hash_next <= HANDLE_NIL; + key_hash_next <= KEY_HASH_NIL; when PUSH_SERIALIZED_KEY => ack <= '1'; -- Serialized Key is in PLAIN_CDR2 Big Endian encoding @@ -200,7 +200,7 @@ begin when READ_KEY_HASH => ack <= '1'; -- Key Hash not calculated - if (key_hash = HANDLE_NIL) then + if (key_hash = KEY_HASH_NIL) then stage_next <= START_KEY_HASH_GENERATION; else stage_next <= PUSH_KEY_HASH; @@ -768,7 +768,7 @@ begin align_offset <= (others => '0'); data_in_latch <= (others => '0'); data_out_latch <= (others => '0'); - key_hash <= HANDLE_NIL; + key_hash <= KEY_HASH_NIL; -- ###GENERATED START### id_latch <= (others => '0'); TestSequence_len_latch <= (others => '0'); diff --git a/src/Tests/Type2_reader_wrapper.vhd b/src/Tests/Type2_reader_wrapper.vhd index 37aad59..00f1295 100644 --- a/src/Tests/Type2_reader_wrapper.vhd +++ b/src/Tests/Type2_reader_wrapper.vhd @@ -33,7 +33,7 @@ entity Type2_reader_wrapper is si_instance_state_dds : in std_logic_vector(INSTANCE_STATE_KIND_WIDTH-1 downto 0); si_source_timestamp_dds : in TIME_TYPE; si_instance_handle_dds : in INSTANCE_HANDLE_TYPE; - si_publication_handle_dds : in PUBLICATION_HANDLE_TYPE; + si_publication_handle_dds : in INSTANCE_HANDLE_TYPE; si_disposed_generation_count_dds : in std_logic_vector(DISPOSED_GENERATION_COUNT_WIDTH-1 downto 0); si_no_writers_generation_count_dds : in std_logic_vector(NO_WRITERS_GENERATION_COUNT_WIDTH-1 downto 0); si_sample_rank_dds : in std_logic_vector(SAMPLE_RANK_WIDTH-1 downto 0); @@ -64,7 +64,7 @@ entity Type2_reader_wrapper is si_instance_state_user : out std_logic_vector(INSTANCE_STATE_KIND_WIDTH-1 downto 0); si_source_timestamp_user : out TIME_TYPE; si_instance_handle_user : out INSTANCE_HANDLE_TYPE; - si_publication_handle_user : out PUBLICATION_HANDLE_TYPE; + si_publication_handle_user : out INSTANCE_HANDLE_TYPE; si_disposed_generation_count_user : out std_logic_vector(DISPOSED_GENERATION_COUNT_WIDTH-1 downto 0); si_no_writers_generation_count_user : out std_logic_vector(NO_WRITERS_GENERATION_COUNT_WIDTH-1 downto 0); si_sample_rank_user : out std_logic_vector(SAMPLE_RANK_WIDTH-1 downto 0); diff --git a/src/Tests/test_key_holder.vhd b/src/Tests/test_key_holder.vhd index bb68053..85ae840 100644 --- a/src/Tests/test_key_holder.vhd +++ b/src/Tests/test_key_holder.vhd @@ -41,13 +41,13 @@ begin stage_next <= GET_KEY_HASH; cnt_next <= 0; -- Reset - key_hash_next <= HANDLE_NIL; + key_hash_next <= KEY_HASH_NIL; when PUSH_SERIALIZED_KEY => ack <= '1'; stage_next <= GET_KEY_HASH; cnt_next <= 0; -- Reset - key_hash_next <= HANDLE_NIL; + key_hash_next <= KEY_HASH_NIL; when READ_KEY_HASH => ack <= '1'; stage_next <= PUSH_KEY_HASH; @@ -140,7 +140,7 @@ begin if (reset = '1') then stage <= IDLE; cnt <= 0; - key_hash <= HANDLE_NIL; + key_hash <= KEY_HASH_NIL; else stage <= stage_next; cnt <= cnt_next; diff --git a/src/dds_reader.vhd b/src/dds_reader.vhd index 19823b9..162ac4b 100644 --- a/src/dds_reader.vhd +++ b/src/dds_reader.vhd @@ -64,7 +64,7 @@ entity dds_reader is si_instance_state : out std_logic_vector(INSTANCE_STATE_KIND_WIDTH-1 downto 0); si_source_timestamp : out TIME_TYPE; si_instance_handle : out INSTANCE_HANDLE_TYPE; - si_publication_handle : out PUBLICATION_HANDLE_TYPE; + si_publication_handle : out INSTANCE_HANDLE_TYPE; si_disposed_generation_count : out std_logic_vector(DISPOSED_GENERATION_COUNT_WIDTH-1 downto 0); si_no_writers_generation_count : out std_logic_vector(NO_WRITERS_GENERATION_COUNT_WIDTH-1 downto 0); si_sample_rank : out std_logic_vector(SAMPLE_RANK_WIDTH-1 downto 0); @@ -265,7 +265,7 @@ architecture arch of dds_reader is end record; -- Zero initialized Endpoint Data constant ZERO_INSTANCE_DATA : INSTANCE_DATA_TYPE := ( - key_hash => (others => (others => '0')), + key_hash => KEY_HASH_NIL, status_info => (others => '0'), sample_cnt => (others => '0'), disposed_gen_cnt => (others => '0'), @@ -286,7 +286,7 @@ architecture arch of dds_reader is end record; -- Zero initialized Instance Data Latch constant ZERO_INST_LATCH_DATA : INST_LATCH_DATA_TYPE := ( - key_hash => (others => (others => '0')), + key_hash => KEY_HASH_NIL, status_info => (others => '0'), sample_cnt => (others => '0'), gen_cnt => (others => '0'), @@ -475,7 +475,7 @@ architecture arch of dds_reader is signal si_instance_state_sig, si_instance_state_sig_next : std_logic_vector(INSTANCE_STATE_KIND_WIDTH-1 downto 0); signal si_source_timestamp_sig, si_source_timestamp_sig_next : TIME_TYPE; signal si_instance_handle_sig, si_instance_handle_sig_next : INSTANCE_HANDLE_TYPE; - signal si_publication_handle_sig, si_publication_handle_sig_next : PUBLICATION_HANDLE_TYPE; + signal si_publication_handle_sig, si_publication_handle_sig_next : INSTANCE_HANDLE_TYPE; signal si_disposed_generation_count_sig, si_disposed_generation_count_sig_next : std_logic_vector(DISPOSED_GENERATION_COUNT_WIDTH-1 downto 0); signal si_no_writers_generation_count_sig, si_no_writers_generation_count_sig_next : std_logic_vector(NO_WRITERS_GENERATION_COUNT_WIDTH-1 downto 0); signal si_sample_rank_sig, si_sample_rank_sig_next : unsigned(SAMPLE_RANK_WIDTH-1 downto 0); @@ -847,7 +847,7 @@ begin remove_oldest_inst_sample_next <= '0'; remove_oldest_sample_next <= '0'; is_take_next <= '0'; - key_hash_next <= HANDLE_NIL; + key_hash_next <= KEY_HASH_NIL; -- DEADLINE QoS @@ -1031,7 +1031,7 @@ begin si_instance_state_sig_next <= (others => '0'); si_source_timestamp_sig_next <= TIME_ZERO; si_instance_handle_sig_next <= HANDLE_NIL; - si_publication_handle_sig_next <= (others => (others => '0')); + si_publication_handle_sig_next <= HANDLE_NIL; si_sample_rank_sig_next <= (others => '0'); si_generation_rank_sig_next <= (others => '0'); si_valid_data_sig_next <= '0'; @@ -6620,9 +6620,9 @@ begin inst_next_addr_base <= INSTANCE_MEMORY_MAX_ADDRESS; inst_prev_addr_base <= INSTANCE_MEMORY_MAX_ADDRESS; inst_empty_head <= INSTANCE_MEMORY_MAX_ADDRESS; - key_hash <= HANDLE_NIL; + key_hash <= KEY_HASH_NIL; si_instance_handle_sig <= HANDLE_NIL; - si_publication_handle_sig <= (others => (others => '0')); + si_publication_handle_sig <= HANDLE_NIL; instance_handle <= HANDLE_NIL; sample_rej_last_inst <= HANDLE_NIL; ts_latch <= TIME_INVALID; diff --git a/src/dds_writer.vhd b/src/dds_writer.vhd index f53a279..c44733e 100644 --- a/src/dds_writer.vhd +++ b/src/dds_writer.vhd @@ -231,7 +231,7 @@ architecture arch of dds_writer is end record; -- Zero initialized Endpoint Data constant ZERO_INSTANCE_DATA : INSTANCE_DATA_TYPE := ( - key_hash => (others => (others => '0')), + key_hash => KEY_HASH_NIL, status_info => (others => '0'), sample_cnt => (others => '0'), ack_cnt => (others => '0') @@ -247,7 +247,7 @@ architecture arch of dds_writer is end record; -- Zero initialized Instance Data Latch constant ZERO_INST_LATCH_DATA : INST_LATCH_DATA_TYPE := ( - key_hash => (others => (others => '0')), + key_hash => KEY_HASH_NIL, status_info => (others => '0'), sample_cnt => (others => '0'), ack_cnt => (others => '0'), @@ -896,7 +896,7 @@ begin instance_handle_next <= HANDLE_NIL; source_ts_next <= TIME_INVALID; sample_status_info_next <= (others => '0'); - key_hash_next <= HANDLE_NIL; + key_hash_next <= KEY_HASH_NIL; new_sample_next <= SAMPLE_MEMORY_MAX_ADDRESS; return_code_latch_next <= RETCODE_UNSUPPORTED; @@ -915,7 +915,7 @@ begin end if; else ack_dds <= '1'; - key_hash_next <= HANDLE_NIL; + key_hash_next <= KEY_HASH_NIL; stage_next <= SKIP; return_stage_next <= PUSH_KEY_HASH; end if; @@ -1100,7 +1100,7 @@ begin end if; else ack_dds <= '1'; - key_hash_next <= HANDLE_NIL; + key_hash_next <= KEY_HASH_NIL; stage_next <= SKIP; return_stage_next <= PUSH_KEY_HASH; end if; @@ -1541,7 +1541,7 @@ begin cnt_next <= 0; else -- Reject Registration - key_hash_next <= HANDLE_NIL; + key_hash_next <= KEY_HASH_NIL; stage_next <= PUSH_KEY_HASH; cnt_next <= 0; end if; @@ -1571,7 +1571,7 @@ begin cnt_next <= 0; else -- Return Special Value - key_hash_next <= HANDLE_NIL; + key_hash_next <= KEY_HASH_NIL; stage_next <= PUSH_KEY_HASH; cnt_next <= 0; end if; @@ -4487,7 +4487,7 @@ begin cc_instance_handle_sig <= HANDLE_NIL; sample_rej_last_inst <= HANDLE_NIL; deadline_miss_last_inst <= HANDLE_NIL; - key_hash <= HANDLE_NIL; + key_hash <= KEY_HASH_NIL; deadline_time <= time + DEADLINE_QOS; lifespan_time <= TIME_INFINITE; source_ts <= TIME_INVALID; diff --git a/src/rtps_builtin_endpoint.vhd b/src/rtps_builtin_endpoint.vhd index be2f57d..517e8fb 100644 --- a/src/rtps_builtin_endpoint.vhd +++ b/src/rtps_builtin_endpoint.vhd @@ -1414,7 +1414,7 @@ begin case (cnt) is -- Liveliness Assertion Opcode when 0 => - data_out_sig <= OPCODE_LIVELINESS_UPDATE; + data_out_sig <= EMO_LIVELINESS_UPDATE; cnt_next <= cnt + 1; -- GUID Prefix 1/3 when 1 => @@ -2902,7 +2902,7 @@ begin case (cnt) is -- Match Opcode when 0 => - data_out_sig <= OPCODE_ENDPOINT_MATCH; + data_out_sig <= EMO_ENDPOINT_MATCH; cnt_next <= cnt + 1; -- GUID Prefix 1/3 when 1 => @@ -2962,7 +2962,7 @@ begin case (cnt) is -- Match Opcode when 0 => - data_out_sig <= OPCODE_ENDPOINT_UNMATCH; + data_out_sig <= EMO_ENDPOINT_UNMATCH; cnt_next <= cnt + 1; -- GUID Prefix 1/3 when 1 => @@ -2995,7 +2995,7 @@ begin case (cnt) is -- Match Opcode when 0 => - data_out_sig <= OPCODE_PARTICIPANT_UNMATCH; + data_out_sig <= EMO_PARTICIPANT_UNMATCH; cnt_next <= cnt + 1; -- GUID Prefix 1/3 when 1 => @@ -5924,7 +5924,7 @@ begin last_word_in_latch <= '0'; ud_status <= '0'; parameter_end <= (others => '1'); - opcode <= (others => '0'); + opcode <= SID_PAD; flags <= (others => '0'); string_length <= (others => '0'); compare_length <= (others => '0'); diff --git a/src/rtps_config_package.vhd b/src/rtps_config_package.vhd index 37a657a..abd25a6 100644 --- a/src/rtps_config_package.vhd +++ b/src/rtps_config_package.vhd @@ -35,12 +35,13 @@ package rtps_config_package is -- participant_id=0 constant USER_IPv4_UNICAST_PORT : std_logic_vector(UDP_PORT_WIDTH-1 downto 0) := std_logic_vector(to_unsigned(PORT_CONFIG_PB + PORT_CONFIG_D3 + PORT_CONFIG_DG*USER_DOMAIN_ID, UDP_PORT_WIDTH)); - -- ENDPOINT FRAME OPCODES - constant ENDPOINT_MATCH_OPCODE_WIDTH: natural := 32; - constant OPCODE_ENDPOINT_MATCH : std_logic_vector(ENDPOINT_MATCH_OPCODE_WIDTH-1 downto 0) := x"55000000"; - constant OPCODE_ENDPOINT_UNMATCH : std_logic_vector(ENDPOINT_MATCH_OPCODE_WIDTH-1 downto 0) := x"55000001"; - constant OPCODE_PARTICIPANT_UNMATCH : std_logic_vector(ENDPOINT_MATCH_OPCODE_WIDTH-1 downto 0) := x"55000002"; - constant OPCODE_LIVELINESS_UPDATE : std_logic_vector(ENDPOINT_MATCH_OPCODE_WIDTH-1 downto 0) := x"55000003"; + -- ENDPOINT META OPCODES + constant EMO_WIDTH : natural := 32; + constant EMO_NOP : std_logic_vector(EMO_WIDTH-1 downto 0) := x"00000000"; + constant EMO_ENDPOINT_MATCH : std_logic_vector(EMO_WIDTH-1 downto 0) := x"55000000"; + constant EMO_ENDPOINT_UNMATCH : std_logic_vector(EMO_WIDTH-1 downto 0) := x"55000001"; + constant EMO_PARTICIPANT_UNMATCH : std_logic_vector(EMO_WIDTH-1 downto 0) := x"55000002"; + constant EMO_LIVELINESS_UPDATE : std_logic_vector(EMO_WIDTH-1 downto 0) := x"55000003"; type HISTORY_CACHE_OPCODE_TYPE is (NOP, ADD_CACHE_CHANGE, GET_CACHE_CHANGE, ACK_CACHE_CHANGE, NACK_CACHE_CHANGE, REMOVE_CACHE_CHANGE, REMOVE_WRITER, GET_MIN_SN, GET_MAX_SN); type KEY_HOLDER_OPCODE_TYPE is (NOP, PUSH_DATA, PUSH_SERIALIZED_KEY, READ_KEY_HASH, READ_SERIALIZED_KEY); diff --git a/src/rtps_handler.vhd b/src/rtps_handler.vhd index 5c237f7..d38928b 100644 --- a/src/rtps_handler.vhd +++ b/src/rtps_handler.vhd @@ -1372,14 +1372,14 @@ begin align_offset <= (others => '0'); align_sig <= (others => '0'); offset_latch <= (others => '0'); - src_addr <= (others => '0'); - src_port <= (others => '0'); + src_addr <= IPv4_ADDRESS_INVALID; + src_port <= UDP_PORT_INVALID; flags <= (others => '0'); - src_entityid <= (others => '0'); - dest_entityid <= (others => '0'); + src_entityid <= ENTITYID_UNKNOWN; + dest_entityid <= ENTITYID_UNKNOWN; user_endpoints <= (others => '0'); numlocators <= (others => '0'); - opcode <= (others => '0'); + opcode <= SID_PAD; data_header_end <= (others => '0'); long_latch <= (others => '0'); ulong_latch <= (others => '0'); diff --git a/src/rtps_out.vhd b/src/rtps_out.vhd index ed6aa6e..b615297 100644 --- a/src/rtps_out.vhd +++ b/src/rtps_out.vhd @@ -44,9 +44,9 @@ architecture arch of rtps_out is signal input_stage, input_stage_next : INPUT_STAGE_TYPE; signal output_stage, output_stage_next : OUTPUT_STAGE_TYPE; signal filled ,reset_filled, set_filled: std_logic; - signal src_addr, src_addr_next : std_logic_vector(WORD_WIDTH-1 downto 0); - signal dest_addr, dest_addr_next : std_logic_vector(WORD_WIDTH-1 downto 0); - signal ports, ports_next : std_logic_vector(WORD_WIDTH-1 downto 0); + signal src_addr, src_addr_next : std_logic_vector(IPv4_ADDRESS_WIDTH-1 downto 0); + signal dest_addr, dest_addr_next : std_logic_vector(IPv4_ADDRESS_WIDTH-1 downto 0); + signal ports, ports_next : std_logic_vector((UDP_PORT_WIDTH*2)-1 downto 0); begin @@ -290,9 +290,9 @@ begin selector <= 0; in_pntr <= MAX_BUFFER_SIZE; out_pntr <= MAX_BUFFER_SIZE; - src_addr <= (others => '0'); - dest_addr <= (others => '0'); - ports <= (others => '0'); + src_addr <= IPv4_ADDRESS_INVALID; + dest_addr <= IPv4_ADDRESS_INVALID; + ports <= UDP_PORT_INVALID & UDP_PORT_INVALID; length <= (others => '0'); packet_end <= (others => '0'); buff <= (others => (others => '0')); diff --git a/src/rtps_package.vhd b/src/rtps_package.vhd index d69d5e5..ffbb94b 100644 --- a/src/rtps_package.vhd +++ b/src/rtps_package.vhd @@ -95,7 +95,6 @@ package rtps_package is type KEY_HASH_TYPE is array (0 to (KEY_HASH_WIDTH/WORD_WIDTH)-1) of std_logic_vector(WORD_WIDTH-1 downto 0); -- DDS subtype INSTANCE_HANDLE_TYPE is KEY_HASH_TYPE; - subtype PUBLICATION_HANDLE_TYPE is GUID_TYPE; -- Helper Function function gen_duration(s,ns : integer) return DURATION_TYPE; @@ -124,6 +123,8 @@ package rtps_package is constant LENGTH_UNLIMITED : std_logic_vector(CDR_LONG_WIDTH-1 downto 0) := std_logic_vector(to_signed(-1,CDR_LONG_WIDTH)); -- DDS constant HANDLE_NIL : INSTANCE_HANDLE_TYPE := (others => (others => '0')); + -- CUSTOM + constant KEY_HASH_NIL : KEY_HASH_TYPE := (others => (others => '0')); -- *RETURN CODES* (DDS) constant RETCODE_OK : std_logic_vector(RETURN_CODE_WIDTH-1 downto 0) := std_logic_vector(to_unsigned(0,RETURN_CODE_WIDTH)); diff --git a/src/rtps_reader.vhd b/src/rtps_reader.vhd index 5b110d8..e250e35 100644 --- a/src/rtps_reader.vhd +++ b/src/rtps_reader.vhd @@ -191,7 +191,7 @@ architecture arch of rtps_reader is -- Packet Opcode Latch (RTPS Message ID) signal opcode, opcode_next : std_logic_vector(SUBMESSAGE_ID_WIDTH-1 downto 0); -- Metatraffic Opcode Latch - signal meta_opcode, meta_opcode_next : std_logic_vector(WORD_WIDTH-1 downto 0); + signal meta_opcode, meta_opcode_next : std_logic_vector(EMO_WIDTH-1 downto 0); -- Signifies if the received packet is a metatraffic operation signal is_meta, is_meta_next : std_logic; -- Source GUID Latch @@ -486,16 +486,16 @@ begin meta_opcode_next <= data_in_meta; case (data_in_meta) is - when OPCODE_ENDPOINT_MATCH => + when EMO_ENDPOINT_MATCH => stage_next <= LATCH_GUIDPREFIX; cnt_next <= 0; - when OPCODE_ENDPOINT_UNMATCH => + when EMO_ENDPOINT_UNMATCH => stage_next <= LATCH_GUIDPREFIX; cnt_next <= 0; - when OPCODE_PARTICIPANT_UNMATCH => + when EMO_PARTICIPANT_UNMATCH => stage_next <= LATCH_GUIDPREFIX; cnt_next <= 0; - when OPCODE_LIVELINESS_UPDATE => + when EMO_LIVELINESS_UPDATE => -- Synthesis Guard if (LIVELINESS_QOS /= MANUAL_BY_TOPIC_LIVELINESS_QOS) then stage_next <= LATCH_GUIDPREFIX; @@ -557,7 +557,7 @@ begin guid_next(2) <= data_in_user; end if; - if (is_meta = '1' and (meta_opcode = OPCODE_PARTICIPANT_UNMATCH or (LIVELINESS_QOS /= MANUAL_BY_TOPIC_LIVELINESS_QOS and meta_opcode = OPCODE_LIVELINESS_UPDATE))) then + if (is_meta = '1' and (meta_opcode = EMO_PARTICIPANT_UNMATCH or (LIVELINESS_QOS /= MANUAL_BY_TOPIC_LIVELINESS_QOS and meta_opcode = EMO_LIVELINESS_UPDATE))) then --assert (last_word_in_meta = '1') report "last_word_in_meta not set" severity FAILURE; -- DONE Parsing stage_next <= INITIATE_ENDPOINT_SEARCH; @@ -572,7 +572,7 @@ begin -- Input FIFO Guard if ((is_meta = '1' and empty_meta = '0') or (is_meta = '0' and empty_user = '0')) then if (is_meta = '1') then - --assert (meta_opcode /= OPCODE_ENDPOINT_UNMATCH or (meta_opcode = OPCODE_ENDPOINT_UNMATCH and last_word_in_meta = '1')) report "last_word_in_meta not set" severity FAILURE; + --assert (meta_opcode /= EMO_ENDPOINT_UNMATCH or (meta_opcode = EMO_ENDPOINT_UNMATCH and last_word_in_meta = '1')) report "last_word_in_meta not set" severity FAILURE; rd_meta <= '1'; guid_next(3) <= data_in_meta; -- Memory Operation Guard @@ -589,7 +589,7 @@ begin if (is_meta = '1') then case (meta_opcode) is - when OPCODE_ENDPOINT_MATCH => + when EMO_ENDPOINT_MATCH => mem_op_start <= '1'; mem_opcode <= SEARCH_ENDPOINT; mem_field_flags <= (others => '0'); @@ -600,18 +600,18 @@ begin else stage_next <= METATRAFFIC_OPERATION; end if; - when OPCODE_ENDPOINT_UNMATCH => + when EMO_ENDPOINT_UNMATCH => mem_op_start <= '1'; mem_opcode <= SEARCH_ENDPOINT; mem_field_flags <= (others => '0'); stage_next <= METATRAFFIC_OPERATION; - when OPCODE_PARTICIPANT_UNMATCH => + when EMO_PARTICIPANT_UNMATCH => mem_op_start <= '1'; mem_opcode <= GET_FIRST_ENDPOINT; mem_field_flags <= EMF_GUIDPREFIX_FLAG; stage_next <= METATRAFFIC_OPERATION; cnt_next <= 0; - when OPCODE_LIVELINESS_UPDATE => + when EMO_LIVELINESS_UPDATE => -- Synthesis Guard if (LIVELINESS_QOS /= MANUAL_BY_TOPIC_LIVELINESS_QOS) then mem_op_start <= '1'; @@ -673,7 +673,7 @@ begin -- Memory Operation Guard if (mem_op_done = '1') then case (meta_opcode) is - when OPCODE_ENDPOINT_MATCH => + when EMO_ENDPOINT_MATCH => -- Endpoint already in Memory if (mem_addr_base /= ENDPOINT_MEMORY_MAX_ADDRESS) then -- Synthesis Guard @@ -704,7 +704,7 @@ begin -- DONE stage_next <= IDLE; end if; - when OPCODE_ENDPOINT_UNMATCH => + when EMO_ENDPOINT_UNMATCH => -- Endpoint not in Memory if (mem_addr_base = ENDPOINT_MEMORY_MAX_ADDRESS) then -- Ignore @@ -723,7 +723,7 @@ begin stage_next <= IDLE; end if; end if; - when OPCODE_PARTICIPANT_UNMATCH => + when EMO_PARTICIPANT_UNMATCH => -- Precondition: mem_endpoint_data set (EMF_GUIDPREFIX_FLAG) case (cnt) is @@ -761,7 +761,7 @@ begin when others => null; end case; - when OPCODE_LIVELINESS_UPDATE => + when EMO_LIVELINESS_UPDATE => -- Precondition: mem_endpoint_data set (EMF_GUIDPREFIX_FLAG) -- Synthesis Guard @@ -2972,17 +2972,17 @@ begin stale_check <= '0'; parameter_end <= (others => '1'); bitmap_cnt <= (others => '0'); - meta_opcode <= (others => '0'); + meta_opcode <= EMO_NOP; status_info <= (others => '0'); mem_addr_base <= (others => '0'); last_addr <= (others => '0'); mem_addr_latch <= (others => '0'); max_endpoint_addr <= (others => '0'); flags <= (others => '0'); - opcode <= (others => '0'); + opcode <= SID_PAD; count <= (others => '0'); current_emf <= (others => '0'); - key_hash <= (others => (others => '0')); + key_hash <= KEY_HASH_NIL; bitmap_latch <= (others => (others => '0')); else stage <= stage_next; diff --git a/src/rtps_test_package.vhd b/src/rtps_test_package.vhd index 6a28e7f..78d0eaa 100644 --- a/src/rtps_test_package.vhd +++ b/src/rtps_test_package.vhd @@ -2100,7 +2100,7 @@ package body rtps_test_package is report "No Endpoint Frame generated on Participant match" severity WARNING; return; when UNMATCH => - output.data(output.length) := OPCODE_PARTICIPANT_UNMATCH; + output.data(output.length) := EMO_PARTICIPANT_UNMATCH; output.length := output.length + 1; when others => null; @@ -2120,7 +2120,7 @@ package body rtps_test_package is procedure gen_liveliness_update_frame( ref : in PARTICIPANT_DATA_TYPE; output : inout TEST_PACKET_TYPE) is begin -- OPCODE - output.data(output.length) := OPCODE_LIVELINESS_UPDATE; + output.data(output.length) := EMO_LIVELINESS_UPDATE; output.length := output.length + 1; -- GUID Prefix output.data(output.length) := ref.guidPrefix(0); @@ -2566,10 +2566,10 @@ package body rtps_test_package is -- OPCODE case (ref.match) is when MATCH => - output.data(output.length) := OPCODE_ENDPOINT_MATCH; + output.data(output.length) := EMO_ENDPOINT_MATCH; output.length := output.length + 1; when UNMATCH => - output.data(output.length) := OPCODE_ENDPOINT_UNMATCH; + output.data(output.length) := EMO_ENDPOINT_UNMATCH; output.length := output.length + 1; when others => null; diff --git a/src/rtps_writer.vhd b/src/rtps_writer.vhd index 7fc2999..977d980 100644 --- a/src/rtps_writer.vhd +++ b/src/rtps_writer.vhd @@ -209,7 +209,7 @@ architecture arch of rtps_writer is -- Packet Opcode Latch (RTPS Message ID) signal opcode, opcode_next : std_logic_vector(SUBMESSAGE_ID_WIDTH-1 downto 0); -- Metatraffic Opcode Latch - signal meta_opcode, meta_opcode_next : std_logic_vector(WORD_WIDTH-1 downto 0); + signal meta_opcode, meta_opcode_next : std_logic_vector(EMO_WIDTH-1 downto 0); -- Signifies if the received packet is a metatraffic operation signal is_meta, is_meta_next : std_logic; -- Source GUID Latch @@ -565,13 +565,13 @@ begin meta_opcode_next <= data_in_meta; case (data_in_meta) is - when OPCODE_ENDPOINT_MATCH => + when EMO_ENDPOINT_MATCH => stage_next <= LATCH_GUIDPREFIX; cnt_next <= 0; - when OPCODE_ENDPOINT_UNMATCH => + when EMO_ENDPOINT_UNMATCH => stage_next <= LATCH_GUIDPREFIX; cnt_next <= 0; - when OPCODE_PARTICIPANT_UNMATCH => + when EMO_PARTICIPANT_UNMATCH => stage_next <= LATCH_GUIDPREFIX; cnt_next <= 0; when others => @@ -636,7 +636,7 @@ begin guid_next(2) <= data_in_user; end if; - if (is_meta = '1' and (meta_opcode = OPCODE_PARTICIPANT_UNMATCH or meta_opcode = OPCODE_LIVELINESS_UPDATE)) then + if (is_meta = '1' and (meta_opcode = EMO_PARTICIPANT_UNMATCH or meta_opcode = EMO_LIVELINESS_UPDATE)) then --assert (last_word_in_meta = '1') report "last_word_in_meta not set" severity FAILURE; -- DONE Parsing stage_next <= INITIATE_ENDPOINT_SEARCH; @@ -651,7 +651,7 @@ begin -- Input FIFO Guard if ((is_meta = '1' and empty_meta = '0') or (is_meta = '0' and empty_user = '0')) then if (is_meta = '1') then - --assert (meta_opcode /= OPCODE_ENDPOINT_UNMATCH or (meta_opcode = OPCODE_ENDPOINT_UNMATCH and last_word_in_meta = '1')) report "last_word_in_meta not set" severity FAILURE; + --assert (meta_opcode /= EMO_ENDPOINT_UNMATCH or (meta_opcode = EMO_ENDPOINT_UNMATCH and last_word_in_meta = '1')) report "last_word_in_meta not set" severity FAILURE; rd_meta <= '1'; guid_next(3) <= data_in_meta; -- Memory Operation Guard @@ -668,18 +668,18 @@ begin if (is_meta = '1') then case (meta_opcode) is - when OPCODE_ENDPOINT_MATCH => + when EMO_ENDPOINT_MATCH => mem_op_start <= '1'; mem_opcode <= SEARCH_ENDPOINT; mem_field_flags <= (others => '0'); stage_next <= LATCH_ENDPOINT_DATA; cnt_next <= 0; - when OPCODE_ENDPOINT_UNMATCH => + when EMO_ENDPOINT_UNMATCH => mem_op_start <= '1'; mem_opcode <= SEARCH_ENDPOINT; mem_field_flags <= EMF_ACK_SEQ_NR_BASE_FLAG; stage_next <= METATRAFFIC_OPERATION; - when OPCODE_PARTICIPANT_UNMATCH => + when EMO_PARTICIPANT_UNMATCH => mem_op_start <= '1'; mem_opcode <= GET_FIRST_ENDPOINT; mem_field_flags <= EMF_GUIDPREFIX_FLAG; @@ -730,7 +730,7 @@ begin -- Memory Operation Guard if (mem_op_done = '1') then case (meta_opcode) is - when OPCODE_ENDPOINT_MATCH => + when EMO_ENDPOINT_MATCH => -- Endpoint already in Memory if (mem_addr_base /= ENDPOINT_MEMORY_MAX_ADDRESS) then -- Update the Endpoint Data @@ -782,7 +782,7 @@ begin stage_next <= IDLE; end if; end if; - when OPCODE_ENDPOINT_UNMATCH => + when EMO_ENDPOINT_UNMATCH => assert check_mask(current_emf, EMF_ACK_SEQ_NR_BASE_FLAG) severity FAILURE; -- Endpoint not in Memory @@ -804,7 +804,7 @@ begin stage_next <= IDLE; end if; end if; - when OPCODE_PARTICIPANT_UNMATCH => + when EMO_PARTICIPANT_UNMATCH => case (cnt) is when 0 => assert check_mask(current_emf, EMF_GUIDPREFIX_FLAG) severity FAILURE; @@ -3635,8 +3635,8 @@ begin historical_push <= '0'; assert_liveliness_latch <= '0'; bitmap_cnt <= (others => '0'); - meta_opcode <= (others => '0'); - opcode <= (others => '0'); + meta_opcode <= EMO_NOP; + opcode <= SID_PAD; rtps_flags <= (others => '0'); reader_flags <= (others => '0'); count <= (others => '0');