Forum Discussion

Altera_Forum's avatar
Altera_Forum
Icon for Honored Contributor rankHonored Contributor
12 years ago

Running Quartus 13.0sp1 Triple Speed Ethernet IP on uClinux

Hi,

I have had no luck getting the Ethernet connection working and am hoping someone could provide some guidance. I have a Cyclone V GX development board running uClinux but I would like to enhance it, so I can connect my PC to the board via Ethernet. A cross over cable is being used and the network ip address is within range (board ip addr: 192.168.0.4 and PC ip addr: 192.168.0.1). In the "make menuconfig", the "Altera Tripple Speed Ethernet support" and "Drivers for Marvell PHYs" are selected. When I boot up uClinux, it shows "eth0: Altera TSE MAC at 0xf400400 irq 3/4". Everything looks okay, but when I try to ping from PC to the board, I keep getting destination host unreachable. Attached is a screen capture of both windows. The right window is the PC pinging the board and the left is nios2-terminal running uClinux. "ipconfig -a" shows the correct IP and MAC addresses, but there is no Ethernet connection. I greatly appreciate if anyone can point me in the right direction and let me know what I need to do.

Thanks!

12 Replies

  • Altera_Forum's avatar
    Altera_Forum
    Icon for Honored Contributor rankHonored Contributor

    Hi Kazu,

    Many thanks for your help. I have resolved the issue. The problem wasn't in the tx scatter gather DMA but the enet_gtx_clk along with timing constraint problem in the SDC. The Marvell 88E1111 gigabit ethernet transceiver requires the following interface signals

    GTX_CLK -> PHY transmit clock (enet_gtx_clk)

    TX_EN -> transmit control signal (enet_tx_en)

    TXD[3:0] -> data transmit bus (enet_tx_d[3:0])

    RX_CLK -> PHY receive clock (enet_rx_clk)

    RX_DV -> receive control signal ( enet_rx_dv)

    RXD[3:0] -> data receive bus (enet_rx_d[3:0])

    The MAC must hold TX_EN (transmit control signal) low until the MAC has ensured the TX_EN is operating at the same speed as the PHY. However, because of the enet_gtx_clk isn't working properly, which it explain the TX_EN is always low I have mentioned from previous post. The key to my problem is I have a PLL generate frequency (125MHz, 25MHz, and 2.5MHz) to drive the MAC transmit clock and PHY GTX clock, which I though it was a correct thing to do since this is what it's in the board_portal_update example come with the board. However, the key to my solution is the PHY GTX clock require 90 degree phase shift from the MAC transmit clock. Therefore, the PLL should generate two sets of frequency, (125MHz, 25MHz, and 2.5MHz) to drive the MAC transmit clock and then another set with 90 degree phase shift (125MHz, 25MHz, and 2.5MHz) to drive the PHY GTX clock.

    I am able to ping from both end but am trying to understand why I needed the 90deg phase shift for it enable to work properly. Does it makes any sense to you?

    Yeung
  • Altera_Forum's avatar
    Altera_Forum
    Icon for Honored Contributor rankHonored Contributor

    Hi,

    --- Quote Start ---

    I am able to ping from both end but am trying to understand why I needed the 90deg phase shift for it enable to work properly. Does it makes any sense to you?

    --- Quote End ---

    I don't know what interface mode (GMII, RGMII, MII) you are using, but about the timing, maybe the next references will help you.

    http://www.ieee802.org/3/z/public/presentations/nov1996/aigmitim.pdf

    http://www.altera.com/literature/an/an477.pdf

    Kazu