Skip to content
Snippets Groups Projects

Resolve L2SDP-23

Merged Reinier van der Walle requested to merge L2SDP-23 into master
13 unresolved threads

Closes L2SDP-23

Merge request reports

Loading
Loading

Activity

Filter activity
  • Approvals
  • Assignees & reviewers
  • Comments (from bots)
  • Comments (from users)
  • Commits & branches
  • Edits
  • Labels
  • Lock status
  • Mentions
  • Merge request status
  • Tracking
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
  • I think the original use of u_common_spulse was correct. The new stuff with c_nof_spulse around it is not needed, because the whole purpose of common_spulse is to take care of that.

  • Please register or sign in to reply
  • 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.

    • Please register or sign in to reply
  • 239 252 state <= s_idle;
    240 253 i_src_out <= c_dp_sosi_rst;
    241 254 received_eop <= FALSE;
    255 expecting_eop <= FALSE;
  • 22 22 -- Purpose:
    23 23 -- The FIFO starts outputting data when the output is ready and it has been
    24 24 -- filled with more than g_fifo_fill words or an eop signal has been received.
  • 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';
  • 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
  • 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
  • 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
    • We did not use to put our name in the file, because that can be found in the svn/git log, but now with OpenCores and others using our code it does become handy to put an author name in:

      Author: R. Walle

      Same for other files.

    • Please register or sign in to reply
  • 1 -------------------------------------------------------------------------------
    2 --
    3 -- Copyright (C) 2020
  • 1 LIBRARY IEEE, common_lib, dp_lib, technology_lib, tech_mac_10g_lib;
  • 1 LIBRARY IEEE, common_lib, dp_lib, technology_lib;
  • added 1 commit

    Compare with previous version

  • 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;
  • 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
  • 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

    Compare with previous version

  • merged

  • Eric Kooistra mentioned in commit 8e99d557

    mentioned in commit 8e99d557

  • Please register or sign in to reply
    Loading