PL通過EMIO方式外接PHY晶片的實驗
阿新 • • 發佈:2019-02-12
首先設定EMIO方式引出ETHE1
之後我們看到ZYNQ模組生長出了GMII介面如下圖:
主要是三部分:
1,左邊的ENET1_EXT_INITN是外部中斷的輸入。
2,MIO主控部分,時鐘是輸出的,資料是雙向的,所以有一個方向選擇T。我們可以簡單做一個三態門實現。
3,GMII介面部分[注1]。
生成HDL檔案之後接著我們從原理圖上找到這些引腳的對應,做成XDC約束檔案,主要部分如下:
#set_property -dict {PACKAGE_PIN Y11 IOSTANDARD LVCMOS33} [get_ports pmod_ja1]; set_property -dict {PACKAGE_PIN AD10 IOSTANDARD LVCMOS33} [get_ports {ENET1_GMII_RXD[0]}]; set_property -dict {PACKAGE_PIN AC12 IOSTANDARD LVCMOS33} [get_ports {ENET1_GMII_RXD[1]}]; set_property -dict {PACKAGE_PIN AD11 IOSTANDARD LVCMOS33} [get_ports {ENET1_GMII_RXD[2]}]; set_property -dict {PACKAGE_PIN AD13 IOSTANDARD LVCMOS33} [get_ports {ENET1_GMII_RXD[3]}]; set_property -dict {PACKAGE_PIN AB15 IOSTANDARD LVCMOS33} [get_ports {ENET1_GMII_RXD[4]}]; set_property -dict {PACKAGE_PIN AB14 IOSTANDARD LVCMOS33} [get_ports {ENET1_GMII_RXD[5]}]; set_property -dict {PACKAGE_PIN AE16 IOSTANDARD LVCMOS33} [get_ports {ENET1_GMII_RXD[6]}]; set_property -dict {PACKAGE_PIN AE15 IOSTANDARD LVCMOS33} [get_ports {ENET1_GMII_RXD[7]}]; set_property -dict {PACKAGE_PIN AD14 IOSTANDARD LVCMOS33} [get_ports {ENET1_GMII_TXD[0]}]; set_property -dict {PACKAGE_PIN Y12 IOSTANDARD LVCMOS33} [get_ports {ENET1_GMII_TXD[1]}]; set_property -dict {PACKAGE_PIN Y11 IOSTANDARD LVCMOS33} [get_ports {ENET1_GMII_TXD[2]}]; set_property -dict {PACKAGE_PIN W13 IOSTANDARD LVCMOS33} [get_ports {ENET1_GMII_TXD[3]}]; set_property -dict {PACKAGE_PIN Y13 IOSTANDARD LVCMOS33} [get_ports {ENET1_GMII_TXD[4]}]; set_property -dict {PACKAGE_PIN W16 IOSTANDARD LVCMOS33} [get_ports {ENET1_GMII_TXD[5]}]; set_property -dict {PACKAGE_PIN W15 IOSTANDARD LVCMOS33} [get_ports {ENET1_GMII_TXD[6]}]; set_property -dict {PACKAGE_PIN Y17 IOSTANDARD LVCMOS33} [get_ports {ENET1_GMII_TXD[7]}]; set_property -dict {PACKAGE_PIN AC14 IOSTANDARD LVCMOS33} [get_ports ENET1_GMII_TX_CLK]; set_property -dict {PACKAGE_PIN AC13 IOSTANDARD LVCMOS33} [get_ports ENET1_GMII_RX_CLK]; set_property -dict {PACKAGE_PIN AE10 IOSTANDARD LVCMOS33} [get_ports ENET1_GMII_RX_DV]; set_property -dict {PACKAGE_PIN Y10 IOSTANDARD LVCMOS33} [get_ports ENET1_GMII_RX_ER]; set_property -dict {PACKAGE_PIN AA10 IOSTANDARD LVCMOS33} [get_ports ENET1_GMII_TX_EN]; set_property -dict {PACKAGE_PIN AA17 IOSTANDARD LVCMOS33} [get_ports ENET1_GMII_TX_ER]; set_property -dict {PACKAGE_PIN Y15 IOSTANDARD LVCMOS33} [get_ports ENET1_MDIO_MC]; set_property -dict {PACKAGE_PIN Y16 IOSTANDARD LVCMOS33} [get_ports ENET1_MDIO_MD];
注1 : 關於GMII介面可以學習https://wenku.baidu.com/view/6d03c124bd64783e09122bab.html