tukl-msd / msdlib.loopy

the Loopy hardware-in-the-loop framework
3 stars 4 forks source link

connection drops from TCP/IP stack #7

Open AndrewSftD opened 10 years ago

AndrewSftD commented 10 years ago

In some tests for some modules loopy seems to drop the Ethernet connection, either after one transfer or before any transfer has occurred. To check for the cause of these drops and bug fix (ensure reliability of connection under a wide range of cases).

mweberUKL commented 10 years ago

I have looked into the lwIP wiki (http://lwip.wikia.com/wiki/Raw/TCP). I seams to be really important to call this tcp_tmr() function regularly, which I can not find in the implementation of the board-side driver. It would be nice to know the version of lwIP used in the Xilinx tools. After version 1.4.0 they seam to have added a handy function called sys_check_timeouts() which handles all of these polling things. Can we find out, which version of lwIP is used to compile the board-side / is integrated in the Xilinx ISE?

mweberUKL commented 10 years ago

Update:

It seams as if the lwip version used in the Xilinx ISE would be version 1.4.0. That is good. The bad news is that the convenient function sys_check_timeouts() is not available when working on a bare-metal microblaze without OS (as in our case).

It should be possible to use some kind of time interrupts to call the needed functions that clean up the lwip stack. I have found a quite old example which shows an implementation of a simple TCP/IP demo application from Xilinx. I'm not sure if all the hardware components needed for this example are in the design that loopy has as output. Maybe someone can check and we could try to get the example going on the current platform?

Link: http://lists.gnu.org/archive/html/lwip-users/2006-01/txt2SBcegvnqV.txt

I'm not sure if this solves the issue, but in all examples I have seen so far, they emphasised that you have to call the timer functions regularly.

AndrewSftD commented 10 years ago

Noted, I will look into this.