Resolve L2SDP-23
Closes L2SDP-23
Merge request reports
Activity
175 181 END GENERATE; 176 182 177 183 gen_dp_fifo_dc : IF g_use_dual_clock=TRUE GENERATE 178 u_common_spulse : ENTITY common_lib.common_spulse 179 PORT MAP ( 180 in_rst => wr_rst, 181 in_clk => wr_clk, 182 in_pulse => snk_in.eop, 183 out_rst => rd_rst, 184 out_clk => rd_clk, 185 out_pulse => crossed_domain_snk_in_eop 186 ); 184 -- Transfer eop across clock domain 239 252 state <= s_idle; 240 253 i_src_out <= c_dp_sosi_rst; 241 254 received_eop <= FALSE; 255 expecting_eop <= FALSE; 242 256 ELSIF rising_edge(rd_clk) THEN 243 257 xon_reg <= nxt_xon_reg; 244 258 state <= nxt_state; 245 259 i_src_out <= nxt_src_out; 246 260 IF crossed_domain_snk_in_eop = '1' THEN 247 received_eop <= TRUE; 261 IF expecting_eop THEN The rising_edge() clock process should only contain this line expecting_eop <= nxt_expecting_eop; All IF THEN ELSE assignments should be done in the PROCESS that makes nxt_expecting_eop. An exception is if the nxt value can be easily be determined in one statement, but that is not the case here. It is a bit confusing that part of the assignment is done directly in this PROCESS and part depends on nxt_expecting_eop.
65 dp_field_blk_snk_in.data(field_hi(c_hdr_field_arr, i) DOWNTO field_lo(c_hdr_field_arr, i)) <= c_hdr_field_arr(i).default(c_hdr_field_arr(i).size-1 DOWNTO 0); 66 END LOOP; 67 -- Overwrite fields comming from inputs 68 dp_field_blk_snk_in.data(field_hi(c_hdr_field_arr, "eth_src_mac") DOWNTO field_lo(c_hdr_field_arr, "eth_src_mac")) <= arp_sha; 69 dp_field_blk_snk_in.data(field_hi(c_hdr_field_arr, "arp_sha") DOWNTO field_lo(c_hdr_field_arr, "arp_sha")) <= arp_sha; 70 dp_field_blk_snk_in.data(field_hi(c_hdr_field_arr, "arp_spa") DOWNTO field_lo(c_hdr_field_arr, "arp_spa")) <= arp_spa; 71 dp_field_blk_snk_in.data(field_hi(c_hdr_field_arr, "arp_tpa") DOWNTO field_lo(c_hdr_field_arr, "arp_tpa")) <= arp_tpa; 72 END PROCESS; 73 74 -- pps counter process setting sop, eop and valid 75 p_dp_pps : PROCESS (dp_clk, dp_rst) 76 BEGIN 77 IF dp_rst = '1' THEN 78 trigger <= FALSE; 79 pps_cnt <= 0; 80 dp_field_blk_snk_in.sop <= '0'; Better use dp_field_blk_snk_in <= c_dp_sosi_rst;, because it is shorter code and then we are sure that all necessary fields get cleared at reset (e.g. also the sync, even though that one is not used here). This c_dp_sosi_rst also resets the sosi data field, which is not necessary andcosts logic, however that we will fix soon by redefining the c_dp_sosi_rst constant, using 'X' for the data fields, instead of '0'.
changed this line in version 2 of the diff
35 CONSTANT c_cin_w : NATURAL := 4; 36 CONSTANT c_pipeline : NATURAL := c_network_total_header_64b_nof_words + 5; -- Header length and 5 more pipeline cycles to allow for the other states 37 38 TYPE t_state IS (s_idle, s_capture, s_check, s_sum, s_output, s_wait); 39 40 TYPE t_reg IS RECORD 41 state : t_state; 42 word_cnt : NATURAL RANGE 0 TO c_network_total_header_64b_nof_words; 43 hdr_words_arr : t_network_total_header_64b_arr; 44 hdr_fields : t_network_total_header; 45 hdr_response : t_network_total_header_64b_arr; 46 ip_checksum : STD_LOGIC_VECTOR(c_halfword_w -1 DOWNTO 0); 47 icmp_checksum : STD_LOGIC_VECTOR(c_halfword_w -1 DOWNTO 0); 48 ip_sum : UNSIGNED(c_halfword_w + c_cin_w -1 DOWNTO 0); 49 src_out : t_dp_sosi; 50 changed this line in version 2 of the diff
34 USE common_lib.common_field_pkg.ALL; 35 USE common_lib.common_network_layers_pkg.ALL; 36 USE dp_lib.dp_stream_pkg.ALL; 37 USE dp_lib.tb_dp_pkg.ALL; 38 39 40 ENTITY tb_nw_arp_request IS 41 GENERIC ( 42 g_test_backpressure : BOOLEAN := TRUE 43 ); 44 END tb_nw_arp_request; 45 46 47 ARCHITECTURE tb OF tb_nw_arp_request IS 48 49 changed this line in version 2 of the diff
7 -- 8 -- This program is free software: you can redistribute it and/or modify 9 -- it under the terms of the GNU General Public License as published by 10 -- the Free Software Foundation, either version 3 of the License, or 11 -- (at your option) any later version. 12 -- 13 -- This program is distributed in the hope that it will be useful, 14 -- but WITHOUT ANY WARRANTY; without even the implied warranty of 15 -- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 16 -- GNU General Public License for more details. 17 -- 18 -- You should have received a copy of the GNU General Public License 19 -- along with this program. If not, see <http://www.gnu.org/licenses/>. 20 -- 21 ------------------------------------------------------------------------------- 22 1 ------------------------------------------------------------------------------- 2 -- 3 -- Copyright (C) 2020 changed this line in version 2 of the diff
77 104 IF dp_rst = '1' THEN 78 105 trigger <= FALSE; 79 106 pps_cnt <= 0; 80 dp_field_blk_snk_in.sop <= '0'; 81 dp_field_blk_snk_in.eop <= '0'; 82 dp_field_blk_snk_in.valid <= '0'; 107 dp_field_blk_snk_in c_dp_sosi_rst; changed this line in version 3 of the diff
8 -- you may not use this file except in compliance with the License. 9 -- You may obtain a copy of the License at 10 -- 11 -- http://www.apache.org/licenses/LICENSE-2.0 12 -- 13 -- Unless required by applicable law or agreed to in writing, software 14 -- distributed under the License is distributed on an "AS IS" BASIS, 15 -- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 16 -- See the License for the specific language governing permissions and 17 -- limitations under the License. 20 18 -- 21 19 ------------------------------------------------------------------------------- 22 20 21 ------------------------------------------------------------------------------- 22 -- Author: R. van der Walle 23 changed this line in version 3 of the diff
added 8 commits
- cb8c4c9f - Fixed syntax error
- b4ed464b - removed white line
- 7c9e2c8b - Added network header functions
- 3e865edb - Made number of test packets configurable
- 4987479f - added nxt signal for cleaner code
- ab96e44a - corrected number of pipeline stages
- 190dcc54 - Added dp_offload_tx_v3
- 3f044e04 - Replaced if else statements by switch
Toggle commit listmentioned in commit 8e99d557