Support WITH_KEY=FALSE Topics in DDS and RTPS Reader

In the event of Keyless Topics less resources are used with the
help of "synthesis guards".
This commit is contained in:
Greek 2021-02-03 18:28:37 +01:00
parent d3fb1cc176
commit dc8746c463
2 changed files with 2231 additions and 2066 deletions

File diff suppressed because it is too large Load Diff

View File

@ -21,6 +21,7 @@ entity rtps_reader is
HEARTBEAT_SUPPRESSION_DELAY : DURATION_TYPE := TODO;
LEASE_DURATION : DURATION_TYPE := DEFAULT_LEASE_DURATION;
ENTITYID : std_logic_vector(ENTITYID_WIDTH-1 downto 0) := ENTITYID_UNKNOWN;
WITH_KEY : boolean := FALSE -- TODO: Default
);
port (
-- SYSTEM
@ -1158,7 +1159,7 @@ begin
when 4 =>
dds_data_in <= lifespan(1);
-- Skip Key Hash, if not received
if (key_hash_rcvd = '0') then
if (not WITH_KEY or key_hash_rcvd = '0') then
cnt_next <= 9;
end if;
-- Key hash 1/4
@ -1182,7 +1183,7 @@ begin
dds_data_in <= std_logic_vector(to_unsigned(mem_pos, CDR_LONG_WIDTH));
-- Payload exists
if (data_flag = '1' or key_flag = '1') then
if (data_flag = '1' or (WITH_KEY and key_flag = '1')) then
stage_next <= PUSH_PAYLOAD;
else
-- DONE