Forum Discussion

antoineb's avatar
antoineb
Icon for New Contributor rankNew Contributor
2 days ago

NiosV µC/OS-II TCP-IP debug

Hello,

I am trying design a NiosV program with TCP/IP based on this example design:

Arria® 10 FPGA – Simple Socket Server for the Nios® V/m Processor Design Example

I don't have the proposed devkit, so I compiled it for two different Arria10 targets. For both targets, I get the error:

[network_init] Failed to NetIF_Start(): (2010).

TSE link seems to be OK.

Since I'm not experienced with Nios, I'm looking for help to debug it.

Thanks

7 Replies

  • Hello,

    I would like to know the Quartus Software version you are using to compile the design to get the SOF file?

    Thanks

  • antoineb's avatar
    antoineb
    Icon for New Contributor rankNew Contributor

    Yes of course. I forgot to mention it. Sorry.

    I use Quartus Version 25.1.0 Build 129 03/26/2025 Patches 0.36 SC Pro Edition.

    Thanks

  • No worries.

    We have seen these error messages in our internal testing; here are some details:

    This error message means device initialization failed. This can happen due to following reasons:

    • mSGDMA open failures
    • Memory / buffer allocation failures
    • Individual TX/RX descriptor init/add failures
    • PHY / MDIO / link failures
    • MAC-level failures
    • Descriptor system failure
    • MAC Tx/Rx enable failures

    So, we suspect it has something to do with the PHY/MDIO init. and linkup- PHY / MDIO / link failures

    As we do not have enough information on what PHY the A10 targets have and what are the corresponding MDIO and PHY init sequences.

    Questions:

    • What are the PHYs on the your A10 targets?
    • What is the TSE and MDIO configuration in the design?
    • Since it is mentioned "TSE link seems to be OK", can we read the PHY IDs? 

    Please let me know if you have any questions. Look forward to hear from you. thanks

    • antoineb's avatar
      antoineb
      Icon for New Contributor rankNew Contributor

      Hello,

      Maybe my question is naive, but do you mean I need an external PHY?  I remembered, while reading your answer, that I disabled MDIO.

      TSE led_link signal is set to '1'. When I read the PCS Configuration Registers (address 0x200) and I obtained 0xFF for the control register, 0x3F for the status register (it confirms that link status is valid), and 0x1 for the phy_identifier register.

      My TSE configuration is:

      • 10/100/1000 Mb Ethernet MAC with 1000BASE-X/SGMII PCS
      • Use internal FIFO
      • Transceiver type GXB
      • Enable MAC 10/100 half duplex support
      • Include statistics counters
      • Align packet headers to 32bit
      • Enable magic packet detection
      • Enable SGMII bridge
      • Enable transceiver reconfiguration


      Thanks  

    • antoineb's avatar
      antoineb
      Icon for New Contributor rankNew Contributor

      Also, I'm surprised that there is no transceiver PHY reset controller implemented in the .qsys module. Can it be a reset or initialization problem?

      Thanks

  • Can you please enable MDIO. The design will need external PHY. The uCOSII TCP IP stack with design support Marvell 88E2110 SGMII PHY. Can you provide information on the external PHY, please share the complete log message. If you have different external PHY then you will need to write your own uCOSII driver for external PHY .

    Thanks!

    • antoineb's avatar
      antoineb
      Icon for New Contributor rankNew Contributor

      Hello,

      I don't have an external PHY, can it not work with an internal one? In the reference design, the serial link comes from TSE, it does not export a GMII interface. I think I missed something.

      This is the complete log:

      juart-terminal: connected to hardware target using JTAG UART on cable
      juart-terminal: "DE5 on localhost:1315 [1-1.3]", device 1, instance 0
      juart-terminal: (Use the IDE stop button or Ctrl-C to terminate)
      
      [crt0.S] Setting up stack and global pointers.
      [crt0.S] Clearing BSS 
      [crt0.S] Calling alt_main.
      [alt_main.c] Entering alt_main, calling alt_irq_init.
      [alt_main.c] Done alt_irq_init, calling alt_os_init.
      [alt_main.c] Done OS Init, calling alt_sem_create.
      [alt_main.c] Calling alt_sys_init.
      [alt_main.c] Done alt_sys_init.
      [alt_main.c] Redirecting IO.
      [alt_main.c] Calling C++ constructors.
      [alt_main.c] Calling atexit.
      [alt_main.c] Calling main.
      [main] Main Task TOS: 0x4f888
      Print the value of System ID 
      System ID from Peripheral core is 0xFACECAFE 
      [uc_main_task] 
      [uc_main_task] ==============================================================
      [uc_main_task]                       uC/TCP-IP Setup
      [uc_main_task] ==============================================================
      [uc_main_task] TSE MAC base: 0x212000.
      [uc_main_task] Rx csr name: /dev/sys_tse_msgdma_rx_csr.
      [uc_main_task] Tx csr name: /dev/sys_tse_msgdma_tx_csr.
      [uc_main_task] INFO: Initializing network stack.
      [network_init] Failed to NetIF_Start(): (2010).
      [uc_main_task] INFO: Initializing network stack: Failed.

      Thanks