Forum Discussion
Altera TSE driver and example program for lwIP (1.3.2)
After many many requests and complaints about lack of support and/or documentation for support of lwIP for the Altera TSE, I have developed a drop-in TSE driver and example program and made this available to the NIOS II community. This was done for NIOS II 8.1 SP0.01. I don't expect difficulty with version 9.x.
This is for the latest version of lwIP (the latest is as of this post) for a minimal program and HTTP server based on the http server in the lwIP contrib folder. The lwIP TSE driver uses the altera_avalon_tse driver and SGDMA as-is. There is a complete (as in 41-step) set of instructions on creating the project and example program. More information and the link to the driver is available here: http://lwip.wikia.com/wiki/available_device_drivers#lwip_1.3.2 Please direct any questions, changes for NIOS II 9.1, or comments to this thread. 12-16-2010 update: This example works with NIOS Version 10.0 with some tweaks to the procedure to create the project. Also, a lwIP 1.4 release candidate has been out for a while and it drops into this example (in place of 1.3) without changes. Bill257 Replies
- Altera_Forum
Honored Contributor
Hi BillA and guys.I am still with my troubles.
It still does not working. As i understand, when i define as a accept callback function(as you defined) http_accept and define there(inside the http_accept), so after then external tcp-client(PC program) connects to the board, callback function must to start and i should stop on breakpoit,which has been defined. But it does not happens. And in follows actions, program do not stop in breakpoints of callback function. What could be a reason? Thanks,Slava. - Altera_Forum
Honored Contributor
Rapa,
Can you ping the board you're running lwIP on? Bill - Altera_Forum
Honored Contributor
No,I cannot
- Altera_Forum
Honored Contributor
Run the Simple Socket Server example setting a MAC address as it shows you to do and try to ping the board.
- Altera_Forum
Honored Contributor
Rapa!
You don't provide enough information to let someone help you. Please clarify: 1) Is your PHY detected correctly? Grab debug output from tse driver (example shown in BillA's original post) and post it here. 2) Have you tried at 100M? 10M? 3) Do you see any packets from your board in the network (tcpdump is handy)? Any activity on TXD lines? 4) Are you receiving? In any case, this is not lwIP specific problem, as Biil said. Both lwIP example and Simple Socket Server should run as is if hardware set up correctly. Probably something wrong with SOPC or top level FPGA design (for example I spent a lot of time trying to run my board at 1000M until I got 2 lines for sdc file from bertronicom). I would suggest you to use Simple Socket Server template as a standard reference, and after you make it running (ping, DHCP and telnet server) switch to lwIP for better performance and smaller footprint. Igor - Altera_Forum
Honored Contributor
Many thanks for your comments, Igor!!!
- Altera_Forum
Honored Contributor
Ims. Thank you for your reply.
Here is answers: 1.PHY detected correctly.Exactly as shown in BillA's example. 2.At this stage I am always working at 100Mb. Board is connected to switch 10/100 Mb. 3.I do not see no packets from the board in the network(using TCP/IP sniffer). No activities on TxD line. But there is something strange. When i am trying to connect with PC to board(on sniffer i see it as a broadcast), i receive the packet as broadcast and decode it as broadcast and i send the answer to broadcast, but this answer does not go to network. It happens at ARP level. 4.Yes.I am receiving. I see it by debug and also I see it by Rx LED. - Altera_Forum
Honored Contributor
You Could check your timming assignments for the Tx lines
- Altera_Forum
Honored Contributor
I don't get you.What do you mean?
- Altera_Forum
Honored Contributor
signal of data and the clock signal must be come at deterministic time, if your data are coming out of time, your data could be lost. You can set your timing assignments in Quartus.