zynq lwip实验时MDIO和MDC配置问题

泄露秘密 提交于 2020-04-21 23:20:51

1:配置ebaz4205的网口

set_property IOSTANDARD LVCMOS33 [get_ports ENET0_GMII_RX_CLK_0]
set_property PACKAGE_PIN U14 [get_ports ENET0_GMII_RX_CLK_0]
set_property PACKAGE_PIN U15 [get_ports ENET0_GMII_TX_CLK_0]
set_property PACKAGE_PIN W19 [get_ports {ENET0_GMII_TX_EN_0[0]}]
set_property PACKAGE_PIN W18 [get_ports {ENET0_GMII_TXD[0]}]
set_property PACKAGE_PIN Y18 [get_ports {ENET0_GMII_TXD[1]}]
set_property PACKAGE_PIN V18 [get_ports {ENET0_GMII_TXD[2]}]
set_property PACKAGE_PIN Y19 [get_ports {ENET0_GMII_TXD[3]}]
set_property PACKAGE_PIN W16 [get_ports ENET0_GMII_RX_DV_0]
set_property PACKAGE_PIN W15 [get_ports MDIO_ETHERNET_0_0_mdc]
set_property PACKAGE_PIN Y14 [get_ports MDIO_ETHERNET_0_0_mdio_io]
set_property PACKAGE_PIN Y16 [get_ports {ENET0_GMII_RXD[0]}]
set_property PACKAGE_PIN V16 [get_ports {ENET0_GMII_RXD[1]}]
set_property PACKAGE_PIN V17 [get_ports {ENET0_GMII_RXD[2]}]
set_property PACKAGE_PIN Y17 [get_ports {ENET0_GMII_RXD[3]}]

set_property IOSTANDARD LVCMOS33 [get_ports ENET0_GMII_TX_CLK_0]
set_property IOSTANDARD LVCMOS33 [get_ports {ENET0_GMII_RXD[3]}]
set_property IOSTANDARD LVCMOS33 [get_ports {ENET0_GMII_RXD[2]}]
set_property IOSTANDARD LVCMOS33 [get_ports {ENET0_GMII_RXD[1]}]
set_property IOSTANDARD LVCMOS33 [get_ports {ENET0_GMII_RXD[0]}]
set_property IOSTANDARD LVCMOS33 [get_ports {ENET0_GMII_TX_EN_0[0]}]
set_property IOSTANDARD LVCMOS33 [get_ports {ENET0_GMII_TXD[3]}]
set_property IOSTANDARD LVCMOS33 [get_ports {ENET0_GMII_TXD[2]}]
set_property IOSTANDARD LVCMOS33 [get_ports {ENET0_GMII_TXD[1]}]
set_property IOSTANDARD LVCMOS33 [get_ports {ENET0_GMII_TXD[0]}]
set_property IOSTANDARD LVCMOS33 [get_ports ENET0_GMII_RX_DV_0]
set_property IOSTANDARD LVCMOS33 [get_ports MDIO_ETHERNET_0_0_mdc]
set_property IOSTANDARD LVCMOS33 [get_ports MDIO_ETHERNET_0_0_mdio_io]

2:sdk中tcp echo server实验是成功的。有一个问题不明白:xdc约束中MDIO_ETHERNET_0_0_mdio_io是哪来的????后来通过代码也可以通过open implemented design图看来这两个信号没有约束:

3:当将配置中的ETH0的MDIO和MDC两个信号去掉之后(xdc中约束也当然去掉),再export到sdk中,创建echo server应用时出现:

4:重新再配置上MDC和MDIO,

1). 导入hardware后,先regenerate BSP. 进入BSP设置看下stdout/stdin 有没有被改成别的uart? 

2). 先clean工程再重新编译。

实验又成功了:

这说明lwip其实是用到了MDC和MDIO的。

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!