Nios® V/II Embedded Design Suite (EDS)
Support for Embedded Development Tools, Processors (SoCs and Nios® V/II processor), Embedded Development Suites (EDSs), Boot and Configuration, Operating Systems, C and C++
12665 Discussions

Nios V Ethernet failed on Cyclone V GT development kit

linhviet306
Beginner
505 Views

Hi, I'm currently learning to transfer data through Ethernet using Nios. Since I use Quartus Prime 22.1, the niche stack isn't there anymore, so I tried to use Nios V and uC/TCP IP base on the CVGT simple socket server reference design, I changed the SGDMA to mSGDMA, Nios II to Nios V. Everything else is exactly as in the reference design. The project compiled fine (although there is some timing requirement error on the nios_cpu sdram). I tested the Nios V with the code from the Arria 10 uC-TCP simple socket server. The processor started and failed at Auto-negotiation. 

Can you guys help me please?

linhviet306_0-1731985941112.png

 

0 Kudos
9 Replies
linhviet306
Beginner
498 Views

Updated on my progress. So I increase the autonegotiation timeout from 2500 to 5000, and got this error

 

linhviet306_0-1731987433148.png

 

0 Kudos
linhviet306
Beginner
480 Views

Next update, so I increase the mSGDMA to 2K, and the PHY is instantiate succesfully. But, after that, it got stuck at Simple Socket Server listening on port 80, can't ping or using Telnet to connect. Any idea how should I debug this?

 

linhviet306_1-1731991601729.png

 

0 Kudos
JingyangTeh
Employee
430 Views

Hi


I am Jingyang and will be helping out on this case.

When you mention you increased the mSGDMA to 2K are you referring to the buffer size?


When it is on listening, that means you are able to connect to it by ssh.

Try using another device (using Putty or Telnet) and connect to 192.168.1.234 with port 80.

You should be able to receive some logs from the board.


Regards

Jingyang, Teh


0 Kudos
linhviet306
Beginner
418 Views
Hi Jingyang, thank you for your support!

I did try with putty and it said connection time out. I started debug and tried to ping from the board and it failed. The NetBuf_Get method failed. I noticed the Tx led is always on. So I think there maybe some error with the buffer address pointer of the mSGDMAs or TSE.
0 Kudos
JingyangTeh
Employee
344 Views

Hi


Just asking the ethernet cable setup, did you connect the ethernet cable to your laptop or it is through a router?

For static IP you would need to connect the board ethernet directly to your laptop ehternet port. After that in the laptop ethernet setting set the ip address to ip mentioned in the board.

https://www.trendnet.com/press/resource-library/how-to-set-static-ip-address


Besides that you could remain your current setup and change the IP from static to DHCP.


Regards

Jingyang, Teh


0 Kudos
linhviet306
Beginner
325 Views

Hi,

 

I connect the board directly to my laptop and use static IP. Can't ping the board or ping from the board. I tried to use packet sender to send UDP data to the board to see if the core can receive anything but it didn't trigger the receive routine in mSGDMA. How should I process?

 

By the way reduce the SSS_TX_BUF_SIZE help me with the NetBuf_Get problem. Apparently the MTU size is less than the SST_TX_BUF + header, so it failed. Reduce the buffer size help the Tx trigger, but it still have timeout problem that Ping still failed.

0 Kudos
JingyangTeh
Employee
219 Views

Hi


That is weird.

Looking back at your initial comment.

You migrated the NiosII design over to NiosV and made some changes to the SGDMA.

One suggestion is for you to try ou thte NiosV example design first and see how it goes.

The design is based of the Arria10 but it would be able to be migrated to CycloneV.


Regards

Jingyang, Teh


0 Kudos
linhviet306
Beginner
156 Views

Hi, 

 

I did try with the Nios V design. The design for Arria 10 uses SGMII mode, I changed it to RGMII, but the problem still persist. I think there's some problem with the mSGDMA core using prefetcher core.

Do you guys have any reference design for the msgdma using only standard descriptor without the prefetcher core. I was able to construct standard descriptor without prefetcher core and sent raw UDP frame. But I couldn't make the receive part to work.

0 Kudos
JingyangTeh
Employee
49 Views

Hi


Let me try to change example design to work with RGMII on the dev kit here.

It might be a big change or not, let me try but no guarantee

Please give me sometime to work on this.


Regards

Jingyang, Teh


0 Kudos
Reply