UltraScale+的10G/25G Ethernet Subsystem IP核使用

文章目录

  • 前言
  • 一、设计框图
    • 1.1、xxv_ethernet_0
    • 1.2、xxv_ethernet_0_sharedlogic_wrapper
    • 1.3、xxv_ethernet_0_clocking_wrapper
    • 1.4、xxv_ethernet_0_common_wrapper
  • 二、IP核配置
  • 三、仿真
  • 四、上板测速
  • 五、总结

前言

前面我们学习了很多基于XILINX 7系列的高速接口使用,本文将介绍xilinx UltraScale+的10G/25G Ethernet Subsystem IP核的使用。大体使用与7系列相差无几,甚至更加简单。大家如果看过7系列那部分的内容,这个上手非常快。

一、设计框图

在这里插入图片描述)

设计框图与7系列大致相似。直接使用官方例程也是可以的,但是这样子更加清晰,我们自己将来使用的时候更加方便,在梳理的过程中也可以加深印象。

1.1、xxv_ethernet_0

xxv_ethernet_0 xxv_ethernet_u0 (
    .gt_txp_out                         (o_gt_txp                           ),  // output wire [0 : 0] gt_txp_out
    .gt_txn_out                         (o_gt_txn                           ),  // output wire [0 : 0] gt_txn_out
    .gt_rxp_in                          (i_gt_rxp                           ),  // input wire [0 : 0] gt_rxp_in
    .gt_rxn_in                          (i_gt_rxn                           ),  // input wire [0 : 0] gt_rxn_in
    .rx_core_clk_0                      (w_rx_core_clk                      ),  // input wire rx_core_clk_0
    .rx_serdes_reset_0                  (w_rx_serdes_reset                  ),  // input wire rx_serdes_reset_0
    .txoutclksel_in_0                   (3'b101                             ),  // input wire [2 : 0] txoutclksel_in_0
    .rxoutclksel_in_0                   (3'b101                             ),  // input wire [2 : 0] rxoutclksel_in_0
    .rxrecclkout_0                      (w_rxrecclkout                      ),  // output wire rxrecclkout_0
    .sys_reset                          (i_sys_reset                        ),  // input wire sys_reset
    .dclk                               (i_dclk                             ),  // input wire dclk
    .tx_clk_out_0                       (o_tx_clk_out                       ),  // output wire tx_clk_out_0
    .rx_clk_out_0                       (o_rx_clk_out                       ),  // output wire rx_clk_out_0
    .gtpowergood_out_0                  (),                                     // output wire gtpowergood_out_0
    .qpll0clk_in                        (i_qpll0outclk                      ),  // input wire [0 : 0] qpll0clk_in
    .qpll0refclk_in                     (i_qpll0outrefclk                   ),  // input wire [0 : 0] qpll0refclk_in
    .qpll1clk_in                        (i_qpll1outclk                      ),  // input wire [0 : 0] qpll1clk_in
    .qpll1refclk_in                     (i_qpll1outrefclk                   ),  // input wire [0 : 0] qpll1refclk_in
    .gtwiz_reset_qpll0lock_in           (i_qpll0lock                        ),  // input wire gtwiz_reset_qpll0lock_in
    .gtwiz_reset_qpll0reset_out         (o_qpll0reset                       ),  // output wire gtwiz_reset_qpll0reset_out
    .gtwiz_reset_qpll1lock_in           (i_qpll1lock                        ),  // input wire gtwiz_reset_qpll1lock_in
    .gtwiz_reset_qpll1reset_out         (o_qpll1reset                       ),  // output wire gtwiz_reset_qpll1reset_out
    .gt_reset_tx_done_out_0             (w_gt_reset_tx_done                 ),  // output wire gt_reset_tx_done_out_0
    .gt_reset_rx_done_out_0             (w_gt_reset_rx_done                 ),  // output wire gt_reset_rx_done_out_0
    .gt_reset_all_in_0                  (w_gtwiz_reset_all                  ),  // input wire gt_reset_all_in_0
    .gt_tx_reset_in_0                   (w_gtwiz_reset_tx_datapath          ),  // input wire gt_tx_reset_in_0
    .gt_rx_reset_in_0                   (w_gtwiz_reset_rx_datapath          ),  // input wire gt_rx_reset_in_0
    .rx_reset_0                         (w_rx_core_reset                    ),  // input wire rx_reset_0
    .rx_axis_tvalid_0                   (rx_axis_tvalid                     ),  // output wire rx_axis_tvalid_0
    .rx_axis_tdata_0                    (rx_axis_tdata                      ),  // output wire [63 : 0] rx_axis_tdata_0
    .rx_axis_tlast_0                    (rx_axis_tlast                      ),  // output wire rx_axis_tlast_0
    .rx_axis_tkeep_0                    (rx_axis_tkeep                      ),  // output wire [7 : 0] rx_axis_tkeep_0
    .rx_axis_tuser_0                    (rx_axis_tuser                      ),  // output wire rx_axis_tuser_0
    .ctl_rx_enable_0                    (ctl_rx_enable_0                    ),  // input wire ctl_rx_enable_0
    .ctl_rx_check_preamble_0            (ctl_rx_check_preamble_0            ),  // input wire ctl_rx_check_preamble_0
    .ctl_rx_check_sfd_0                 (ctl_rx_check_sfd_0                 ),  // input wire ctl_rx_check_sfd_0
    .ctl_rx_force_resync_0              (ctl_rx_force_resync_0              ),  // input wire ctl_rx_force_resync_0
    .ctl_rx_delete_fcs_0                (ctl_rx_delete_fcs_0                ),  // input wire ctl_rx_delete_fcs_0
    .ctl_rx_ignore_fcs_0                (ctl_rx_ignore_fcs_0                ),  // input wire ctl_rx_ignore_fcs_0
    .ctl_rx_max_packet_len_0            (ctl_rx_max_packet_len_0            ),  // input wire [14 : 0] ctl_rx_max_packet_len_0
    .ctl_rx_min_packet_len_0            (ctl_rx_min_packet_len_0            ),  // input wire [7 : 0] ctl_rx_min_packet_len_0
    .ctl_rx_process_lfi_0               (ctl_rx_process_lfi_0               ),  // input wire ctl_rx_process_lfi_0
    .ctl_rx_test_pattern_0              (ctl_rx_test_pattern_0              ),  // input wire ctl_rx_test_pattern_0
    .ctl_rx_data_pattern_select_0       (ctl_rx_data_pattern_select_0       ),  // input wire ctl_rx_data_pattern_select_0
    .ctl_rx_test_pattern_enable_0       (ctl_rx_test_pattern_enable_0       ),  // input wire ctl_rx_test_pattern_enable_0
    .ctl_rx_custom_preamble_enable_0    (ctl_rx_custom_preamble_enable_0    ),  // input wire ctl_rx_custom_preamble_enable_0
    .stat_rx_framing_err_0              (stat_rx_framing_err_0              ),  // output wire stat_rx_framing_err_0
    .stat_rx_framing_err_valid_0        (stat_rx_framing_err_valid_0        ),  // output wire stat_rx_framing_err_valid_0
    .stat_rx_local_fault_0              (stat_rx_local_fault_0              ),  // output wire stat_rx_local_fault_0
    .stat_rx_block_lock_0               (stat_rx_block_lock_0               ),  // output wire stat_rx_block_lock_0
    .stat_rx_valid_ctrl_code_0          (stat_rx_valid_ctrl_code_0          ),  // output wire stat_rx_valid_ctrl_code_0
    .stat_rx_status_0                   (o_stat_rx_status                   ),  // output wire stat_rx_status_0
    .stat_rx_remote_fault_0             (stat_rx_remote_fault_0             ),  // output wire stat_rx_remote_fault_0
    .stat_rx_bad_fcs_0                  (stat_rx_bad_fcs_0                  ),  // output wire [1 : 0] stat_rx_bad_fcs_0_0
    .stat_rx_stomped_fcs_0              (stat_rx_stomped_fcs_0              ),  // output wire [1 : 0] stat_rx_stomped_fcs_0
    .stat_rx_truncated_0                (stat_rx_truncated_0                ),  // output wire stat_rx_truncated_0
    .stat_rx_internal_local_fault_0     (stat_rx_internal_local_fault_0     ),  // output wire stat_rx_internal_local_fault_0
    .stat_rx_received_local_fault_0     (stat_rx_received_local_fault_0     ),  // output wire stat_rx_received_local_fault_0
    .stat_rx_hi_ber_0                   (stat_rx_hi_ber_0                   ),  // output wire stat_rx_hi_ber_0
    .stat_rx_got_signal_os_0            (stat_rx_got_signal_os_0            ),  // output wire stat_rx_got_signal_os_0
    .stat_rx_test_pattern_mismatch_0    (stat_rx_test_pattern_mismatch_0    ),  // output wire stat_rx_test_pattern_mismatch_0
    .stat_rx_total_bytes_0              (stat_rx_total_bytes_0              ),  // output wire [3 : 0] stat_rx_total_bytes_0
    .stat_rx_total_packets_0            (stat_rx_total_packets_0            ),  // output wire [1 : 0] stat_rx_total_packets_0
    .stat_rx_total_good_bytes_0         (stat_rx_total_good_bytes_0         ),  // output wire [13 : 0] stat_rx_total_good_bytes_0
    .stat_rx_total_good_packets_0       (stat_rx_total_good_packets_0       ),  // output wire stat_rx_total_good_packets_0
    .stat_rx_packet_bad_fcs_0           (stat_rx_packet_bad_fcs_0           ),  // output wire stat_rx_packet_bad_fcs_0
    .stat_rx_packet_64_bytes_0          (stat_rx_packet_64_bytes_0          ),  // output wire stat_rx_packet_64_bytes_0
    .stat_rx_packet_65_127_bytes_0      (stat_rx_packet_65_127_bytes_0      ),  // output wire stat_rx_packet_65_127_bytes_0
    .stat_rx_packet_128_255_bytes_0     (stat_rx_packet_128_255_bytes_0     ),  // output wire stat_rx_packet_128_255_bytes_0
    .stat_rx_packet_256_511_bytes_0     (stat_rx_packet_256_511_bytes_0     ),  // output wire stat_rx_packet_256_511_bytes_0
    .stat_rx_packet_512_1023_bytes_0    (stat_rx_packet_512_1023_bytes_0    ),  // output wire stat_rx_packet_512_1023_bytes_0
    .stat_rx_packet_1024_1518_bytes_0   (stat_rx_packet_1024_1518_bytes_0   ),  // output wire stat_rx_packet_1024_1518_bytes_0
    .stat_rx_packet_1519_1522_bytes_0   (stat_rx_packet_1519_1522_bytes_0   ),  // output wire stat_rx_packet_1519_1522_bytes_0
    .stat_rx_packet_1523_1548_bytes_0   (stat_rx_packet_1523_1548_bytes_0   ),  // output wire stat_rx_packet_1523_1548_bytes_0
    .stat_rx_packet_1549_2047_bytes_0   (stat_rx_packet_1549_2047_bytes_0   ),  // output wire stat_rx_packet_1549_2047_bytes_0
    .stat_rx_packet_2048_4095_bytes_0   (stat_rx_packet_2048_4095_bytes_0   ),  // output wire stat_rx_packet_2048_4095_bytes_0
    .stat_rx_packet_4096_8191_bytes_0   (stat_rx_packet_4096_8191_bytes_0   ),  // output wire stat_rx_packet_4096_8191_bytes_0
    .stat_rx_packet_8192_9215_bytes_0   (stat_rx_packet_8192_9215_bytes_0   ),  // output wire stat_rx_packet_8192_9215_bytes_0
    .stat_rx_packet_small_0             (stat_rx_packet_small_0             ),  // output wire stat_rx_packet_small_0
    .stat_rx_packet_large_0             (stat_rx_packet_large_0             ),  // output wire stat_rx_packet_large_0
    .stat_rx_unicast_0                  (stat_rx_unicast_0                  ),  // output wire stat_rx_unicast_0
    .stat_rx_multicast_0                (stat_rx_multicast_0                ),  // output wire stat_rx_multicast_0
    .stat_rx_broadcast_0                (stat_rx_broadcast_0                ),  // output wire stat_rx_broadcast_0
    .stat_rx_oversize_0                 (stat_rx_oversize_0                 ),  // output wire stat_rx_oversize_0
    .stat_rx_toolong_0                  (stat_rx_toolong_0                  ),  // output wire stat_rx_toolong_0
    .stat_rx_undersize_0                (stat_rx_undersize_0                ),  // output wire stat_rx_undersize_0
    .stat_rx_fragment_0                 (stat_rx_fragment_0                 ),  // output wire stat_rx_fragment_0
    .stat_rx_vlan_0                     (stat_rx_vlan_0                     ),  // output wire stat_rx_vlan_0
    .stat_rx_inrangeerr_0               (stat_rx_inrangeerr_0               ),  // output wire stat_rx_inrangeerr_0
    .stat_rx_jabber_0                   (stat_rx_jabber_0                   ),  // output wire stat_rx_jabber_0
    .stat_rx_bad_code_0                 (stat_rx_bad_code_0                 ),  // output wire stat_rx_bad_code_0
    .stat_rx_bad_sfd_0                  (stat_rx_bad_sfd_0                  ),  // output wire stat_rx_bad_sfd_0
    .stat_rx_bad_preamble_0             (stat_rx_bad_preamble_0             ),  // output wire stat_rx_bad_preamble_0

    .tx_reset_0                         (w_tx_core_reset                    ),      // input wire tx_reset_0
    .tx_axis_tready_0                   (tx_axis_tready                     ),      // output wire tx_axis_tready_0
    .tx_axis_tvalid_0                   (tx_axis_tvalid                     ),      // input wire tx_axis_tvalid_0
    .tx_axis_tdata_0                    (tx_axis_tdata                      ),      // input wire [63 : 0] tx_axis_tdata_0
    .tx_axis_tlast_0                    (tx_axis_tlast                      ),      // input wire tx_axis_tlast_0
    .tx_axis_tkeep_0                    (tx_axis_tkeep                      ),      // input wire [7 : 0] tx_axis_tkeep_0
    .tx_axis_tuser_0                    (tx_axis_tuser                      ),      // input wire tx_axis_tuser_0
    .tx_unfout_0                        (tx_unfout_0                        ),      // output wire tx_unfout_0
    .tx_preamblein_0                    (tx_preamblein_0                    ),      // input wire [55 : 0] tx_preamblein_0
    .rx_preambleout_0                   (rx_preambleout_0                   ),      // output wire [55 : 0] rx_preambleout_0  

    .stat_tx_local_fault_0              (stat_tx_local_fault_0              ),      // output wire stat_tx_local_fault_0
    .stat_tx_total_bytes_0              (stat_tx_total_bytes_0              ),      // output wire [3 : 0] stat_tx_total_bytes_0_0
    .stat_tx_total_packets_0            (stat_tx_total_packets_0            ),      // output wire stat_tx_total_packets_0
    .stat_tx_total_good_bytes_0         (stat_tx_total_good_bytes_0         ),      // output wire [13 : 0] stat_tx_total_good_bytes_0
    .stat_tx_total_good_packets_0       (stat_tx_total_good_packets_0       ),      // output wire stat_tx_total_good_packets_0
    .stat_tx_bad_fcs_0                  (stat_tx_bad_fcs_0                  ),      // output wire stat_tx_bad_fcs_0
    .stat_tx_packet_64_bytes_0          (stat_tx_packet_64_bytes_0          ),      // output wire stat_tx_packet_64_bytes_0
    .stat_tx_packet_65_127_bytes_0      (stat_tx_packet_65_127_bytes_0      ),      // output wire stat_tx_packet_65_127_bytes_0
    .stat_tx_packet_128_255_bytes_0     (stat_tx_packet_128_255_bytes_0     ),      // output wire stat_tx_packet_128_255_bytes_0
    .stat_tx_packet_256_511_bytes_0     (stat_tx_packet_256_511_bytes_0     ),      // output wire stat_tx_packet_256_511_bytes_0
    .stat_tx_packet_512_1023_bytes_0    (stat_tx_packet_512_1023_bytes_0    ),      // output wire stat_tx_packet_512_1023_bytes_0
    .stat_tx_packet_1024_1518_bytes_0   (stat_tx_packet_1024_1518_bytes_0   ),      // output wire stat_tx_packet_1024_1518_bytes_0
    .stat_tx_packet_1519_1522_bytes_0   (stat_tx_packet_1519_1522_bytes_0   ),      // output wire stat_tx_packet_1519_1522_bytes_0
    .stat_tx_packet_1523_1548_bytes_0   (stat_tx_packet_1523_1548_bytes_0   ),      // output wire stat_tx_packet_1523_1548_bytes_0
    .stat_tx_packet_1549_2047_bytes_0   (stat_tx_packet_1549_2047_bytes_0   ),      // output wire stat_tx_packet_1549_2047_bytes_0
    .stat_tx_packet_2048_4095_bytes_0   (stat_tx_packet_2048_4095_bytes_0   ),      // output wire stat_tx_packet_2048_4095_bytes_0
    .stat_tx_packet_4096_8191_bytes_0   (stat_tx_packet_4096_8191_bytes_0   ),      // output wire stat_tx_packet_4096_8191_bytes_0
    .stat_tx_packet_8192_9215_bytes_0   (stat_tx_packet_8192_9215_bytes_0   ),      // output wire stat_tx_packet_8192_9215_bytes_0
    .stat_tx_packet_small_0             (stat_tx_packet_small_0             ),      // output wire stat_tx_packet_small_0
    .stat_tx_packet_large_0             (stat_tx_packet_large_0             ),      // output wire stat_tx_packet_large_0
    .stat_tx_unicast_0                  (stat_tx_unicast_0                  ),      // output wire stat_tx_unicast_0
    .stat_tx_multicast_0                (stat_tx_multicast_0                ),      // output wire stat_tx_multicast_0
    .stat_tx_broadcast_0                (stat_tx_broadcast_0                ),      // output wire stat_tx_broadcast_0
    .stat_tx_vlan_0                     (stat_tx_vlan_0                     ),      // output wire stat_tx_vlan_00
    .stat_tx_frame_error_0              (stat_tx_frame_error_0              ),      // output wire stat_tx_frame_error_0

    .ctl_tx_enable_0                    (ctl_tx_enable_0                    ),      // input wire ctl_tx_enable_0
    .ctl_tx_send_rfi_0                  (ctl_tx_send_rfi_0                  ),      // input wire ctl_tx_send_rfi_0
    .ctl_tx_send_lfi_0                  (ctl_tx_send_lfi_0                  ),      // input wire ctl_tx_send_lfi_0
    .ctl_tx_send_idle_0                 (ctl_tx_send_idle_0                 ),      // input wire ctl_tx_send_idle_0
    .ctl_tx_fcs_ins_enable_0            (ctl_tx_fcs_ins_enable_0            ),      // input wire ctl_tx_fcs_ins_enable_0
    .ctl_tx_ignore_fcs_0                (ctl_tx_ignore_fcs_0                ),      // input wire ctl_tx_ignore_fcs_0
    .ctl_tx_test_pattern_0              (ctl_tx_test_pattern_0              ),      // input wire ctl_tx_test_pattern_0
    .ctl_tx_test_pattern_enable_0       (ctl_tx_test_pattern_enable_0       ),      // input wire ctl_tx_test_pattern_enable_0
    .ctl_tx_test_pattern_select_0       (ctl_tx_test_pattern_select_0       ),      // input wire ctl_tx_test_pattern_select_0
    .ctl_tx_data_pattern_select_0       (ctl_tx_data_pattern_select_0       ),      // input wire ctl_tx_data_pattern_select_0
    .ctl_tx_test_pattern_seed_a_0       (ctl_tx_test_pattern_seed_a_0       ),      // input wire [57 : 0] ctl_tx_test_pattern_seed_a_0
    .ctl_tx_test_pattern_seed_b_0       (ctl_tx_test_pattern_seed_b_0       ),      // input wire [57 : 0] ctl_tx_test_pattern_seed_b_0
    .ctl_tx_ipg_value_0                 (ctl_tx_ipg_value_0                 ),      // input wire [3 : 0] ctl_tx_ipg_value_0
    .ctl_tx_custom_preamble_enable_0    (ctl_tx_custom_preamble_enable_0    ),      // input wire ctl_tx_custom_preamble_enable_0
    .gt_loopback_in_0                   (3'b000                   )      // input wire [2 : 0] gt_loopback_in_0
);

xxv_ethernet_0模块就是例化的IP核。(里面一大堆控制信号和状态信号),但大部分无需关注,关注以下信号即可:
信号具体含义可查阅xilinx手册pg210,有中文的,阅读起来很快。一般就按照我这么配置即可,这样配置的情况下我们用户无需关注前导码和纠错码,MAC帧只需要用户处理目的地址、源地址、类型/长度和数据。如果有特殊需求,比如自定义前导码什么的,可以查看手册。

assign w_rx_core_clk = o_tx_clk_out;
/*----ctrl rx----*/ 
assign ctl_rx_enable_0                  = 1'b1          ;
assign ctl_rx_check_preamble_0          = 1'b1          ;
assign ctl_rx_check_sfd_0               = 1'b1          ;
assign ctl_rx_force_resync_0            = 1'b0          ;
assign ctl_rx_delete_fcs_0              = 1'b1          ;
assign ctl_rx_ignore_fcs_0              = 1'b0          ;
assign ctl_rx_max_packet_len_0          = P_MAX_LENGTH  ;
assign ctl_rx_min_packet_len_0          = P_MIN_LENGTH  ;
assign ctl_rx_process_lfi_0             = 1'b0          ;
assign ctl_rx_test_pattern_0            = 1'b0          ;
assign ctl_rx_test_pattern_enable_0     = 1'b0          ;
assign ctl_rx_data_pattern_select_0     = 1'b0          ;
assign ctl_rx_custom_preamble_enable_0  = 1'b0          ;
/*----tx single----*/
assign tx_preamblein_0                  = 55'h55_55_55_55_55_55_55;
assign tx_reset_0                       = 1'b0          ;
assign ctl_tx_enable_0                  = 1'b1          ;
assign ctl_tx_send_rfi_0                = 1'b0          ;
assign ctl_tx_send_lfi_0                = 1'b0          ;
assign ctl_tx_send_idle_0               = 1'b0          ;
assign ctl_tx_fcs_ins_enable_0          = 1'b1          ;
assign ctl_tx_ignore_fcs_0              = 1'b0          ;
assign ctl_tx_test_pattern_0            = 'd0           ;
assign ctl_tx_test_pattern_enable_0     = 'd0           ;
assign ctl_tx_test_pattern_select_0     = 'd0           ;
assign ctl_tx_data_pattern_select_0     = 'd0           ;
assign ctl_tx_test_pattern_seed_a_0     = 'd0           ;
assign ctl_tx_test_pattern_seed_b_0     = 'd0           ;
assign ctl_tx_ipg_value_0               = 4'd12         ;
assign ctl_tx_custom_preamble_enable_0  = 1'b0          ;

1.2、xxv_ethernet_0_sharedlogic_wrapper

xxv_ethernet_0_sharedlogic_wrapper是共享逻辑模块,这是example design当中的模块,这里面处理了GT参考时钟差分转单端、QPLL共享时钟核产生用户各种复位信号,但是我进行了简单的修改方便我们进行设计。

以下为我修改后的代码,简单而言就是将其中的GT参考时钟差分转单端的模块xxv_ethernet_0_clocking_wrapper核QPLL共享时钟逻辑模块xxv_ethernet_0_clocking_wrapper全部都拉了出来,在上层uplus_ten_gig_module模块当中进行例化,这样就可以方便我们用户在uplus_ten_gig_module当中通过例化多个uplus_ten_gig_channel模块来实现多通道数据传输的过程。(不过在U+当中我们直接在IP核配置的时候选择多个core也是非常简单的,不过按照本文当中这样子做会清晰不少)

module xxv_ethernet_0_sharedlogic_wrapper (
    //  input gt_refclk_p,
    //  input gt_refclk_n,
    //  output gt_refclk_out,
    //input   i_gt_ref_clk,
    //  input  [0:0] qpll0reset,
    //  output [0:0] qpll0lock,
    //  output [0:0] qpll0outclk,
    //  output [0:0] qpll0outrefclk,
    //  input  [0:0] qpll1reset,
    //  output [0:0] qpll1lock,
    //  output [0:0] qpll1outclk,
    //  output [0:0] qpll1outrefclk,
     input  wire gt_txusrclk2_0,
     input  wire gt_rxusrclk2_0,
     input  wire rx_core_clk_0,
     input  wire gt_tx_reset_in_0,
     input  wire gt_rx_reset_in_0,

     input  wire tx_core_reset_in_0,
     input  wire rx_core_reset_in_0,
     output wire tx_core_reset_out_0,
     output wire rx_core_reset_out_0,
     output wire rx_serdes_reset_out_0,
     output wire usr_tx_reset_0,
     output wire usr_rx_reset_0,
     output wire gtwiz_reset_all_0,
     output wire gtwiz_reset_tx_datapath_out_0,
     output wire gtwiz_reset_rx_datapath_out_0,
 
     input  wire sys_reset,
     input  wire dclk

);

 //wire gt_ref_clk;


// xxv_ethernet_0_clocking_wrapper i_xxv_ethernet_0_clocking_wrapper(
//     .gt_refclk_p (gt_refclk_p),
//     .gt_refclk_n (gt_refclk_n),
//     .gt_refclk_out (gt_refclk_out),
//     .gt_refclk (gt_ref_clk));

// xxv_ethernet_0_common_wrapper i_xxv_ethernet_0_common_wrapper
// (
//     .refclk(i_gt_ref_clk),
//     .qpll0reset(qpll0reset),
//     .qpll0lock(qpll0lock),
//     .qpll0outclk(qpll0outclk),
//     .qpll0outrefclk(qpll0outrefclk),
//     .qpll1reset (qpll1reset),
//     .qpll1lock (qpll1lock),
//     .qpll1outclk (qpll1outclk),
//     .qpll1outrefclk (qpll1outrefclk)
// );
 

xxv_ethernet_0_reset_wrapper i_xxv_ethernet_0_reset_wrapper_0(
    .gt_txusrclk2 (gt_txusrclk2_0),
    .gt_rxusrclk2 (gt_rxusrclk2_0),
    .rx_core_clk (rx_core_clk_0),
    .gt_tx_reset_in (gt_tx_reset_in_0),
    .gt_rx_reset_in (gt_rx_reset_in_0),
    .tx_core_reset_in (tx_core_reset_in_0),
    .rx_core_reset_in (rx_core_reset_in_0),
    .tx_core_reset_out (tx_core_reset_out_0),
    .rx_core_reset_out (rx_core_reset_out_0),
    .rx_serdes_reset_out (rx_serdes_reset_out_0),
    .usr_tx_reset (usr_tx_reset_0),
    .usr_rx_reset (usr_rx_reset_0),
    .gtwiz_reset_all (gtwiz_reset_all_0),
    .gtwiz_reset_tx_datapath_out (gtwiz_reset_tx_datapath_out_0),
    .gtwiz_reset_rx_datapath_out (gtwiz_reset_rx_datapath_out_0),
    .sys_reset (sys_reset),
    .dclk (dclk)
);
endmodule

1.3、xxv_ethernet_0_clocking_wrapper

该模块里面就是例化了IBUFDS_GTE4原语

1.4、xxv_ethernet_0_common_wrapper

QPLL的相关操作,较为复杂,不用关注太多。

二、IP核配置

第一页就是选选位宽,线速率和通道数
在这里插入图片描述
选这个FIFO可以让发送和接收的用户逻辑处于用一个时钟域,将o_tx_clk_out赋值于w_rx_core_clk 即可

assign w_rx_core_clk = o_tx_clk_out;

在这里插入图片描述
参考时钟按道理一般来说都是156.25Mhz,但我的板卡是通过FMCP拓展的SFP,它只能提供312,5Mhz数据,用起来好像没有问题,我测试过和使用156.25Mhz参考时钟的其他U+板卡进行通信,并没有任何问题。最后产生的用户时钟都是156.25Mhz。
在这里插入图片描述
在这里插入图片描述
想使用我这套模板使用这个IP核需要将共享逻辑拉出来(上图),如果直接在第一页勾选多个通道,完全可以将共享逻辑包含在IP核内,IP核会产生一大堆信号,会带有通道编号(下图),使用起来也特别简单,就是不好整理也不好拓展。。。

在这里插入图片描述

三、仿真

AXIS_gen_module模块是自己写的一个AXIS数据产生模块,用于仿真和上板测试。在产生用户数据的时候,需要关注stat_rx_status_0信号,该信号拉高说明整个IP核各种同步都结束了,用户此时可以正常发送和接收数据了。
在这里插入图片描述

四、上板测速

与之前讲的7系列测速方法一样,产生的数据长度为186时钟周期,也就是1488字节数据,以此观察网卡接收带宽。
在这里插入图片描述

在这里插入图片描述

五、总结

完整工程参考:https://github.com/shun6-6/U_10g_eth_design

本文来自互联网用户投稿,该文观点仅代表作者本人,不代表本站立场。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如若转载,请注明出处:http://www.mfbz.cn/a/569861.html

如若内容造成侵权/违法违规/事实不符,请联系我们进行投诉反馈qq邮箱809451989@qq.com,一经查实,立即删除!

相关文章

CC攻击频发,企业如何做好网络安全,该怎么防护能免遭CC攻击?

在当前网络现状下,随着信息技术的飞速发展,网络攻击手段也愈发多样化和复杂化。其中,CC攻击作为一种针对Web应用层的拒绝服务攻击,其危害日益凸显,对企业和个人造成了严重的威胁。下面我们就从多个角度详细分享关于CC攻…

SpringCloudAlibaba入门学习笔记20240408~20240424

跟学b站“图灵架构师”SpringCloudAlibaba入门教程 系统架构演化进程 单体应用架构>垂直应用架构>分布式架构>SOA架构>微服务架构 1、针对微服务架构: 如何管理众多小服务?(服务治理 注册中心[服务注册 发现 剔除])nacos 众多小服务之间如…

智能驾驶+网络安全

在智能驾驶场景下,安全问题一直是一个持续热点。 针对车机模块不被黑客利用Linux的漏洞攻击,可以采取以下几种方式来提高安全性: 安全设计和防护:在设计车机模块时,需要考虑安全性,并采取相应的安全防护措施…

【Yolov系列】Yolov5学习(一):大致框架

一、Yolov5网络结构 Yolov5特点: 合适于移动端部署,模型小,速度快 Yolov5骨干结构:CSPDarknet53网络Yolov5主要有Yolov5s、Yolov5m、Yolov5l、Yolov5x四个版本。这几个模型的结构基本一样,不同的是depth_multiple模型…

C++ | Leetcode C++题解之第42题接雨水

题目&#xff1a; 题解&#xff1a; class Solution { public:int trap(vector<int>& height) {int n height.size();if (n 0) {return 0;}vector<int> leftMax(n);leftMax[0] height[0];for (int i 1; i < n; i) {leftMax[i] max(leftMax[i - 1], he…

SpringMVC 源码剖析

SpringMVC 源码剖析 0 从源码角度分析SpringMVC执行流程 // 前端控制器&#xff0c;SpringMVC最核心的类 public class DispatcherServlet extends FrameworkServlet {// 前端控制器最核心的方法&#xff0c;这个方法是负责处理请求的&#xff0c;一次请求&#xff0c;调用一次…

数据类型总结

1 引言 在计算机的世界里&#xff0c;数据类型是被人类定义出来的&#xff0c;方便人去更好地理解、辨别数据。计算机只能识别二进制数&#xff0c;不可能要求写代码时&#xff0c;只是输入一些0/1的东西。通过定义数据类型&#xff0c;可以让人和计算机更好地“沟通”&#x…

图像处理|关于二维傅里叶变换的学习笔记(实用版)

因为图像至少是2D的&#xff0c;所以在数字图像处理中使用的都是2D-傅里叶变换。 1.什么是傅里叶变换(DFT)&#xff1f;傅里叶变换是将图像从空间域转换到频域&#xff0c;其逆变换是将图像从频域转到空间域。 物理意义是&#xff1a; 2.频谱图怎么看&#xff1f;傅里叶频谱图…

亚马逊、ozon、美客多等平台的测评技术核心:提升跨境电商业绩的关键要素

现今&#xff0c;越来越多的跨境卖家开始深入了解测评自养号这一领域&#xff0c;他们希望通过优化运营来降低成本并增加利润。在整个测评工作中&#xff0c;测评技术是非常关键的一环。只有不断学习、保持冷静&#xff0c;我们才能不断提升测评能力&#xff0c;从而获得更多机…

Bentley二次开发教程22-文件及模型管理-材质、图层

材质 材质主要用于对元素进行材质贴图&#xff0c;以表现实际的材料样式。材质表中包含材质表&#xff0c;材质面板以及材质。而其属性记录了反射等多种属性以表达实际材质效果。 创建材质 当我们需要创建自定义的材质时&#xff0c;对应的&#xff0c;需要依次创建材质表&…

JavaScript:js实现在线五子棋人机(人人)对弈

在线五子棋人机对弈 全部使用前端技术,使用HTML,CSS以及JS进行实现. 棋盘在后端就是一个15*15的二维数组 页面设计 页面设计的比较粗糙 主要使用js自带的canvas画布进行绘画 HTML代码如下: <div class"outer"><canvas id"canvas" height&qu…

男生一般穿什么裤子好看?五大爆款男装精选测评!

男生裤子要怎么选才能找到适合自己的裤子呢&#xff1f;这肯定是大家选裤子时经常出现的一个疑问了&#xff0c;现在的市面上虽然款式风格非常多&#xff0c;但是由于品牌鱼龙混杂的原因&#xff0c;不同的裤子质量也参差不齐。为了帮助各位男同胞能选到适合自己的裤子&#xf…

centos7使用源码安装方式redis

安装编译源码的工具gcc yum install -y gcc下载源码 源码下载地址 https://download.redis.io/releases/ 注意事项 不建议安装最新版本redis&#xff0c;所以我这里选择6.2.6版本 下载 wget https://download.redis.io/releases/redis-6.2.6.tar.gz解压 tar -zxvf redis-…

工业相机和镜头参数和选型

工业相机和镜头参数和选型 文章目录 工业相机和镜头参数和选型前言一、相机参数解释和选型1.相机参数1.1快门-shutter1.2曝光-exposure1.3增益-gain1.4 感光芯片类型&#xff08;CCD/CMOS&#xff09;1.5 感光芯片&#xff08;靶面&#xff09;尺寸1.6 分辨率1.7 像元尺寸1.8 帧…

【点量云流】国内首家适配国产信创的实时云渲染解决方案,助力国产化信创新体验!

一、背景 随着信息技术的广泛应用&#xff0c;信息安全与自主可控成为国家发展的重要保障。近年来&#xff0c;国产化信创的发展&#xff0c;为推动信息技术产业自主创新&#xff0c;实现关键技术和产品的自主可控&#xff0c;对于保障国家信息安全、促进产业发展有着重要意义。…

程序员英语之Spring篇

spring.io/quickstart 本期课程讲解Spring官网的快速上手页面 官网地址 https://spring.io/quickstart Spring Quickstart Guide Spring 快速开始指南 Guide 指南 What you’ll build 接下来你将要构建的是什么&#xff1f; build 构建 You will build a classic “H…

Laravel 6 - 第十二章 控制器

​ 文章目录 Laravel 6 - 第一章 简介 Laravel 6 - 第二章 项目搭建 Laravel 6 - 第三章 文件夹结构 Laravel 6 - 第四章 生命周期 Laravel 6 - 第五章 控制反转和依赖注入 Laravel 6 - 第六章 服务容器 Laravel 6 - 第七章 服务提供者 Laravel 6 - 第八章 门面 Laravel 6 - …

计算机网络4——网络层1

文章目录 一、网络层1、概念2、网络层的两个层面1&#xff09;介绍2&#xff09;问题3&#xff09;解决 二、网际协议IP1、介绍2、虚拟互联网络1&#xff09;介绍2&#xff09;案例 3、IP地址1&#xff09;IP 地址及其表示方法2&#xff09;分类的IP地址3&#xff09;无分类编址…

FineVis助力智慧水务:水务可视化智能决策与管理

一、智慧水务是什么 智慧水务是利用数采仪、无线网络、水质水压表等在线监测设备实时感知城市供排水系统的运行状态&#xff0c;以及采用可视化方式整合水务管理部门与供排水设施&#xff0c;形成“城市水务物联网”的创新管理模式。通过这一系统&#xff0c;海量水务信息可以…

慧明咨询:成绩公式,发现未知,助力进步

在当今社会,数以万计的学子面临着激烈的教育竞争。2000万的中考生、1000万的高考生、300万的考研生以及500万的国考备考者,都在为了通过这“独木桥”而战。 面对有限的优质学区、师资力量的不足、以及巨大的心理压力,学生及其家长们焦虑不已。为此,深圳市慧明咨询顾问有限公司…
最新文章