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++

lwip stack question

Altera_Forum
Honored Contributor II
892 Views

 

--- Quote Start ---  

originally posted by niosiiuser@Jul 22 2005, 02:21 AM 

hello provintan, 

 

yes it is possible to receive udp packets with over 80 mbit/s. it seems that i’m working on a similar application like you. i got about 82 mbit/s udp rx. 

 

my system consists of: 

1. cyclone ep1c12 @ 50 mhz cpu clock 

2. 32 mb sdram 

3. 4 mb flash 

4. davicom dm9000 ethernet mac/phy (using the 16 bit bus) 

5. some others stuff … 

 

for the first experiments i was using “lwip” but unfortunately “lwip” is very slow in handling large udp packets because “lwip” is copying fragmented packets some times around. for getting this speed some changes were needed in my system: 

 

1. because “lwip” is not very fast, it is better to write your own little udp stack. in my system lwip resides belong a little udp stack. for this i’m filtering incoming udp packets directly in the mac driver (dm9000) and store the payload in the sdram via dma. “lwip” will handle arps and the other network data like tcp. 

2. it is necessary to get the data out of the sram of the mac as fast as possible. if you are too slow the sram will overflow! keep attention on the timing of the ethernet mac when using dma (you have to slow down the dma with the timing settings for the mac). 

3. unfortunately i hadn’t enough ios (240 pqfp) so i had to connect the dm9000 via a 16 bit bus with the cyclone. this results in a lower bandwidth. to compensate this behaviour an own bridge connects the outside tri-state bus (dm9000, flash, compactflash) with the avalon bus. the bridge controls the timing and is doing dynamic bus sizing (32 bit to 16 bit) for read and write cycles. 

 

 

so you see it is possible. i hope my explanation helps you to get the desired speed out of your system. 

 

 

good luck, 

niosiiuser 

<div align='right'><{post_snapback}> (index.php?act=findpost&pid=8541) 

--- quote end ---  

 

--- Quote End ---  

 

 

hello everyone: 

i am very interesting niosiiuser said.i want to how you write your own little udp stack and tcp stack?hope to receive somebody letter me or give some suggestion! 

thank you!!
0 Kudos
0 Replies
Reply