目录
一.ps_mio_eth_1g
使用FPGA板载的RJ45接口,使用zynq Ultrascale+ Mpsoc的GEM3,然后直接用vitis或者SDK跑Iwip来构建以太网。
二.ps_emio_eth_1g
使用emio将GEM0引出,再配合1G/2.5G Ethernet PCS/PMA or SGMII核搭建,参考ZYNQ使用1G/2.5G Ethernet PCS/PMA or SGMII拓展PS端网口
之后在petalinux或者vitis中来开发。
三.pl_eth_1g
参考官方的zcu102例子搭建,使用SFP构建1000Base-x的转接口。
需要找到GTH(GTH是一种高速的收发器,支持500Mb/s到16.375Gb/s的传输速度)的位置。
如图所示,SFP_SI5328_OUT为BANK 225,pin为W10,X0Y10(SFP0),需要修改为125MHz。
更改引脚约束
#zcu106
# Copyright 2020 Xilinx Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#sfp0
set_property PACKAGE_PIN AE22 [get_ports sfp_tx_dis]
set_property IOSTANDARD LVCMOS12 [get_ports sfp_tx_dis]
set_property PACKAGE_PIN Y4 [get_ports s*_txp]
set_property PACKAGE_PIN AA2 [get_ports s*_rxp]
set_property PACKAGE_PIN Y3 [get_ports s*_txn]
set_property PACKAGE_PIN AA1 [get_ports s*_rxn]
# FMC HPC0 txp
#FMC_HPC0_DP0_C2M_P -> g4
#FMC_HPC0_DP1_C2M_P -> h6
#FMC_HPC0_DP2_C2M_P -> f6
#FMC_HPC0_DP3_C2M_P -> k6
#FMC_HPC0_DP4_C2M_P -> m6
#FMC_HPC0_DP5_C2M_P -> p6
#FMC_HPC0_DP6_C2M_P -> r4
#FMC_HPC0_DP7_C2M_P -> n4
#USER_MGT_SI570_CLOCK2_C_P
set_property PACKAGE_PIN R10 [get_ports mgt_clk_clk_p]
# User SMA MGT Clock
#set_property PACKAGE_PIN N27 [get_ports mgt_clk_clk_p]
# FMC_HPC0_GBTCLK1_M2C_C_P B20 Clock
#set_property PACKAGE_PIN L8 [get_ports mgt_clk_clk_p]
#set_property IOSTANDARD LVCMOS25 [get_ports mgt_clk_*] 156.25 MHz
create_clock -name gt_ref_clk -period 6.4 [get_ports mgt_clk_clk_p]
#LED 2 and 3
# led 0 .. 7 => ag14, af13, ae13, aj14, aj15, ah13, ah14, al12
set_property IOSTANDARD LVCMOS12 [get_ports *led]
set_property PACKAGE_PIN AL11 [get_ports axil_reset_led]
#set_property PACKAGE_PIN af13 [get_ports axil_reset_led]
set_property PACKAGE_PIN AK13 [get_ports axi_lite_clk_led]
#set_property PACKAGE_PIN aj14 [get_ports axi_lite_clk_led]
set_property PACKAGE_PIN AM8 [get_ports mgt_clk_led]
#set_property PACKAGE_PIN ah13 [get_ports mgt_clk_led]
set_property PACKAGE_PIN AM10 [get_ports rx_clk_led]
#set_property IOSTANDARD LVCMOS25 [get_ports axil_reset_led]
#set_property IOSTANDARD LVCMOS33 [get_ports axi_lite_clk_led]
#set_property IOSTANDARD LVCMOS33 [get_ports mgt_clk_led]
## Dip Switches
### GPIO_DIP_SW0 .. 7 AN14, AP14, AM14, AN13, AN12, AP12, AL13, AK13
## GPIO Switches
### GPIO_SW_E S N W C => AE14 AE15 AG15 AF15 AG13
综合后可以使用Iwip来查看以太网。
四.github的开源代码
直接在linux下make好zcu106对应的设计,然后ping对应的IP,这里使用的也是SFP,实现了一个回传发送。