* Change builtin-endpoint to "last_word" System
This commit is contained in:
parent
a58a03f756
commit
9571e018e8
@ -65,7 +65,6 @@ ENDPOINT FIFO PACKET FORMAT
|
|||||||
|
|
||||||
32..............24..............16..............8...............0
|
32..............24..............16..............8...............0
|
||||||
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|
||||||
| LENTGH |
|
|
||||||
+---------------+---------------+---------------+---------------+
|
+---------------+---------------+---------------+---------------+
|
||||||
| OPCODE | FLAGS | SRC_UDP_PORT |
|
| OPCODE | FLAGS | SRC_UDP_PORT |
|
||||||
+---------------+---------------+---------------+---------------+
|
+---------------+---------------+---------------+---------------+
|
||||||
|
|||||||
@ -18,6 +18,7 @@ entity rtps_builtin_endpoint is
|
|||||||
empty : in std_logic; -- Input FIFO empty flag
|
empty : in std_logic; -- Input FIFO empty flag
|
||||||
rd : out std_logic; -- Input FIFO read signal
|
rd : out std_logic; -- Input FIFO read signal
|
||||||
data_in : in std_logic_vector(31 downto 0); -- Input FIFO data signal
|
data_in : in std_logic_vector(31 downto 0); -- Input FIFO data signal
|
||||||
|
last_word_in : in std_logic;
|
||||||
endpoint_output : out USER_ENDPOINT_OUTPUT;
|
endpoint_output : out USER_ENDPOINT_OUTPUT;
|
||||||
endpoint_full : in std_logic_vector(0 to MAX_ENDPOINTS-1);
|
endpoint_full : in std_logic_vector(0 to MAX_ENDPOINTS-1);
|
||||||
endpoint_wr : out std_logic_vector(0 to MAX_ENDPOINTS-1);
|
endpoint_wr : out std_logic_vector(0 to MAX_ENDPOINTS-1);
|
||||||
@ -122,6 +123,7 @@ architecture arch of rtps_builtin_endpoint is
|
|||||||
signal reset_max_pointer, reset_max_pointer_next : std_logic := '0';
|
signal reset_max_pointer, reset_max_pointer_next : std_logic := '0';
|
||||||
signal stale_check, stale_check_next : std_logic := '0';
|
signal stale_check, stale_check_next : std_logic := '0';
|
||||||
signal mem_guidprefix, mem_guidprefix_next : GUIDPREFIX_ARRAY_TYPE : (others => (others => '0'));
|
signal mem_guidprefix, mem_guidprefix_next : GUIDPREFIX_ARRAY_TYPE : (others => (others => '0'));
|
||||||
|
signal last_word_in_latch, last_word_in_latch_next : std_logic := '0';
|
||||||
|
|
||||||
|
|
||||||
--*****ALIAS DEFINATION*****
|
--*****ALIAS DEFINATION*****
|
||||||
@ -285,6 +287,14 @@ begin
|
|||||||
wr_sig <= '0';
|
wr_sig <= '0';
|
||||||
stale_check_next <= stale_check;
|
stale_check_next <= stale_check;
|
||||||
|
|
||||||
|
-- Last Word Latch Setter
|
||||||
|
if (last_word_in = '1') then
|
||||||
|
last_word_in_latch_next <= '1';
|
||||||
|
-- TODO: Also set in AUTO_PURGE to exit from SKIP_PACKET stage
|
||||||
|
else
|
||||||
|
last_word_in_latch_next <= last_word_in_latch;
|
||||||
|
end if;
|
||||||
|
|
||||||
-- TODO: Reset Latches
|
-- TODO: Reset Latches
|
||||||
|
|
||||||
case(stage) is
|
case(stage) is
|
||||||
@ -304,16 +314,6 @@ begin
|
|||||||
else
|
else
|
||||||
-- Process Packet
|
-- Process Packet
|
||||||
stale_check_next <= '0';
|
stale_check_next <= '0';
|
||||||
stage_next <= PACKET_LENGTH;
|
|
||||||
end if;
|
|
||||||
when PACKET_LENGTH =>
|
|
||||||
if (empty = '0') then
|
|
||||||
rd_sig <= '1';
|
|
||||||
-- Latch Packet Length
|
|
||||||
packet_length_next <= unsigned(data_in(13 downto 0));
|
|
||||||
-- Reset Word Counter
|
|
||||||
reset_read_cnt <= '1';
|
|
||||||
-- Next Stage
|
|
||||||
stage_next <= PACKET_HEADER;
|
stage_next <= PACKET_HEADER;
|
||||||
end if;
|
end if;
|
||||||
when PACKET_HEADER =>
|
when PACKET_HEADER =>
|
||||||
@ -600,9 +600,11 @@ begin
|
|||||||
end if;
|
end if;
|
||||||
when PROCESS_PL =>
|
when PROCESS_PL =>
|
||||||
if (empty = '0') then
|
if (empty = '0') then
|
||||||
rd_sig <= '1';
|
rd_sig <= '1';
|
||||||
|
-- Reset Word Counter
|
||||||
|
reset_read_cnt <= '1';
|
||||||
-- Latch Parameter End
|
-- Latch Parameter End
|
||||||
parameter_end_next <= read_cnt + unsigned(normalize_length(endian_swap(endian_flag,parameter_length)));
|
parameter_end_next <= unsigned(normalize_length(endian_swap(endian_flag,parameter_length)));
|
||||||
-- DEFAULT
|
-- DEFAULT
|
||||||
stage_next <= SKIP_PARAMETER;
|
stage_next <= SKIP_PARAMETER;
|
||||||
-- TODO: Use inline QoS?
|
-- TODO: Use inline QoS?
|
||||||
@ -1471,13 +1473,13 @@ begin
|
|||||||
end if;
|
end if;
|
||||||
end if;
|
end if;
|
||||||
when SKIP_PACKET =>
|
when SKIP_PACKET =>
|
||||||
if (read_cnt > packet_length) then
|
if (last_word_in_latch = '1') then
|
||||||
-- Begin parsing of next parameter
|
-- Begin parsing of next parameter
|
||||||
stage_next <= PROCESS_PL;
|
stage_next <= IDLE;
|
||||||
elsif (empty = '0') then
|
elsif (empty = '0') then
|
||||||
rd_sig <= '1';
|
rd_sig <= '1';
|
||||||
-- End of Packet
|
-- End of Packet
|
||||||
if (read_cnt = packet_length) then
|
if (last_word_in = '1') then
|
||||||
-- Continue parsing next packet
|
-- Continue parsing next packet
|
||||||
stage_next <= IDLE;
|
stage_next <= IDLE;
|
||||||
end if;
|
end if;
|
||||||
|
|||||||
@ -7,7 +7,7 @@ use work.rtps_package.all;
|
|||||||
|
|
||||||
-- TODO: Remove alignment logic for RTPS Submessages, since all Submessages are 32-bit aligned
|
-- TODO: Remove alignment logic for RTPS Submessages, since all Submessages are 32-bit aligned
|
||||||
-- TODO: Merge CHECK_SUB_END and SKIP_SUB stages
|
-- TODO: Merge CHECK_SUB_END and SKIP_SUB stages
|
||||||
-- TODO: Fix payload length
|
-- TODO: Remove payload length and implement "last_word" bit
|
||||||
-- TODO: Change all Endpoint Bit Vectors to "to" Ranges
|
-- TODO: Change all Endpoint Bit Vectors to "to" Ranges
|
||||||
-- Checksum has to be checked before
|
-- Checksum has to be checked before
|
||||||
|
|
||||||
@ -210,7 +210,7 @@ architecture arch of rtps_handler is
|
|||||||
end loop;
|
end loop;
|
||||||
return id;
|
return id;
|
||||||
end function;
|
end function;
|
||||||
function match_id_domain ( ref : std_logic_vector(ENTITYID_WIDTH-1 downto 0);
|
function match_id_endpoint ( ref : std_logic_vector(ENTITYID_WIDTH-1 downto 0);
|
||||||
ar : ENTITYID_TYPE) return integer is
|
ar : ENTITYID_TYPE) return integer is
|
||||||
variable id : integer := 0;
|
variable id : integer := 0;
|
||||||
begin
|
begin
|
||||||
@ -901,7 +901,7 @@ begin
|
|||||||
builtin_endpoint_next <= '1';
|
builtin_endpoint_next <= '1';
|
||||||
-- Match User Entity ID
|
-- Match User Entity ID
|
||||||
elsif (is_metatraffic = '0') then
|
elsif (is_metatraffic = '0') then
|
||||||
tmp := match_id_domain(aligned_data_in, ENTITYID);
|
tmp := match_id_endpoint(aligned_data_in, ENTITYID);
|
||||||
-- Entity non existent, skip Submessage
|
-- Entity non existent, skip Submessage
|
||||||
if (tmp = MAX_ENDPOINTS) then
|
if (tmp = MAX_ENDPOINTS) then
|
||||||
stage_next <= SKIP_SUB;
|
stage_next <= SKIP_SUB;
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user