Article ID: 000086267 Content Type: Troubleshooting Last Reviewed: 08/09/2023

Why does my Nios® II Simple Socket Server design example fail to auto-negotiate at 1G speed?

Environment

    Intel® Quartus® Prime Pro Edition
    Nios® II Embedded Design Suite (EDS)
BUILT IN - ARTICLE INTRO SECOND COMPONENT
Description

Due to the default timeout period in the Simple Socket Server template, there is a possibility that auto-negotiation at 1G speed may fail in Cyclone® V, Cyclone® 10, and Max® 10 devices.

Resolution

To work around this problem, the user is required to modify the BSP source code to increase auto-negotiation timeout delay and recompile to generate the new ELF file using the instructions below.

 

Open the following file in the project directory:

../software/<project_name_bsp>/drivers/src/altera_avalon_tse.c

 

Change the timeout delay from "usleep(1000)"  to "usleep(5000)" as shown in the next portion of code:

alt_32 alt_tse_phy_restart_an(alt_tse_phy_info *pphy, alt_u32 timeout_threshold) {

………………………………….

while(alt_tse_phy_rd_mdio_reg(pphy, TSE_PHY_MDIO_STATUS, TSE_PHY_MDIO_STATUS_AN_COMPLETE, 1) == 0 ){

     
if(timeout >  timeout_threshold) { tse_dprintf(4, "WARNING : PHY[%d.%d] - Auto-Negotiation FAILED\n", mac_group_index, mac_info_index);

 

/* Restore previous MDIO address */

alt_tse_phy_wr_mdio_addr(pphy, mdioadd_prev);

return TSE_PHY_AN_NOT_COMPLETE; 

              
}

               
usleep(5000); //updated from usleep(1000)

}

Related Products

This article applies to 2 products

Intel® Cyclone®
Intel® MAX® CPLDs and FPGAs

1