From 41f41b65304503ed2155b60073dc64463d8356bb Mon Sep 17 00:00:00 2001 From: Greek Date: Wed, 27 May 2020 17:55:54 +0200 Subject: [PATCH] * Updated Vivado Project * Synthesis fixes in RTPS Handler --- src/rtps_handler.vhd | 22 +++++++++++----------- syn/project_1.xpr | 28 ++++++++-------------------- 2 files changed, 19 insertions(+), 31 deletions(-) diff --git a/src/rtps_handler.vhd b/src/rtps_handler.vhd index 1670725..9495132 100644 --- a/src/rtps_handler.vhd +++ b/src/rtps_handler.vhd @@ -218,7 +218,7 @@ architecture arch of rtps_handler is -- 'endianness' argument. function endian_swap( endianness : std_logic; data :std_logic_vector) return std_logic_vector is - variable ret : std_logic_vector(data'reverse_range); + variable ret : std_logic_vector(data'range); begin -- Assert that Data Signal is Byte aligned assert (data'length mod 8 = 0) severity failure; @@ -226,7 +226,7 @@ architecture arch of rtps_handler is if (endianness = '1') then -- Reverse byte Order for i in 0 to (data'length/8)-1 loop - ret(i*8+8-1 downto i*8) := data((3-i)*8+8-1 downto (3-i)*8); + ret(i*8+8-1 downto i*8) := data(((data'length/8)-1-i)*8+8-1 downto ((data'length/8)-1-i)*8); end loop; -- Big Endian else @@ -345,7 +345,7 @@ begin flags_next <= flags; src_entityid_next <= src_entityid; user_endpoint_next <= user_endpoint; - builtin_endpoint_next <= builtin_endpoint_next; + builtin_endpoint_next <= builtin_endpoint; return_stage_next <= return_stage; numlocators_next <= numlocators; payload_length_next <= payload_length; @@ -955,9 +955,9 @@ begin -- End of Data Header if (read_cnt = data_header_end) then -- Push Submessage Contents - stage_next <= PUSH_PAYLOAD; + stage_next <= PUSH_PAYLOAD; -- Fix alignement - align_offset <= data_header_offset_latch; + align_offset_next <= data_header_offset_latch; end if; end if; when PUSH_PAYLOAD => @@ -972,9 +972,9 @@ begin output_sig <= pad_signal(offset_latch, aligned_data_in); wr_sig <= '1'; -- Begin parsing of next submessage - stage_next <= RTPS_SUB_HEADER; + stage_next <= RTPS_SUB_HEADER; -- Fix alignement - align_offset <= offset_latch; + align_offset_next <= offset_latch; else -- Push Normal (Endianness is not handled here) output_sig <= aligned_data_in; @@ -995,9 +995,9 @@ begin -- End of Submessage elsif (read_cnt > sub_end) then -- Begin parsing of next submessage - stage_next <= RTPS_SUB_HEADER; + stage_next <= RTPS_SUB_HEADER; -- Fix alignement - align_offset <= offset_latch; + align_offset_next <= offset_latch; -- Submessage has still "unknown" Content else stage_next <= SKIP_SUB; @@ -1021,9 +1021,9 @@ begin -- End of Submessage elsif (read_cnt = sub_end) then -- Begin parsing of next submessage - stage_next <= RTPS_SUB_HEADER; + stage_next <= RTPS_SUB_HEADER; -- Fix alignement - align_offset <= offset_latch; + align_offset_next <= offset_latch; end if; -- Latch Input for alignment purposes align_sig_next <= data_in(23 downto 0); diff --git a/syn/project_1.xpr b/syn/project_1.xpr index 3398a7a..61fce83 100644 --- a/syn/project_1.xpr +++ b/syn/project_1.xpr @@ -60,25 +60,19 @@ - - - - - - - + - + @@ -86,9 +80,7 @@ @@ -108,9 +100,8 @@