EmbeddedRelated.com
Forums

transfer speed of data using uipstack and free rtos

Started by anand_eee14 February 22, 2009
hi can any one tell wat is the maximum rate of data transfer using a
uip stack ...
im sending a adc data through udp protocol using uip stack using
lpc2378 olimex dev board and recieving it with an vb application like
a data acquition system wat is the max speed supported by that stack
...with free rtos and without free rtos no other application is
running currently i achieved 200KB/s using a 100Mb/s link through
ethernet ...im sending 1450 bytes continously ...how can i increase
the speed from 200KB/s to 12MB/s

An Engineer's Guide to the LPC2100 Series

anand_eee14 schrieb:

> ethernet ...im sending 1450 bytes continously ...how can i increase
> the speed from 200KB/s to 12MB/s

You can't. Do the math.The LPC is too slow.

You did not tell what protocol you use, but with TCP this would no work.

Anyhow, I could tweak a TCP connection up to 8MB/s on a 400MHz PPC, but
really no chance on 72MHz CPU (6cycle/byte !).
--
42Bastian

Note: SPAM-only account, direct mail to bs42@...
>> Anyhow, I could tweak a TCP connection up to 8MB/s on a 400MHz PPC,
>> but really no chance on 72MHz CPU (6cycle/byte !).

It all depends on the software. The LPC23XX/24XX have: dual AHB bus, DMA packet transfer, and hardware checksum. Substantial hardware aceleration features. These ARM7 MCUs beat many ARM9 MCUs with higher clk speeds on Enet performance.

At the full Enet-100 line speed of 100M bits/sec, and assuming about 20% overhead with headers, the maximum line data speed is about 10M bytes/sec. In terms of 32bit DWORDs, that is 2.5M dwords/sec. A 72MHz 32b MCU with the hardware features above can easily do that.

One of the TCP/IP code sets I have tried with the LPC2468 does 54M bits/sec. Two other ones do over 90M bits/sec, virtually full line speed. It all depends on the TCP/IP software: zero data copy, dynamic packet allocation, dual size buffers, 32bit data ops, etc. Other software can be an order of magnitude slower. You won't get those speeds with uIP or lwIP.

Regards, Chris.


Hi,

> It all depends on the software. The LPC23XX/24XX have: dual AHB bus, DMA
> packet transfer, and hardware checksum.

What hardware checksum? The only thing I know about is the Ethernet CRC, no
hardware checksumming.

--
Paul Curtis, Rowley Associates Ltd http://www.rowley.co.uk
CrossWorks for ARM, MSP430, AVR, MAXQ, and now Cortex-M3 processors

HM2 wrote:

>>> Anyhow, I could tweak a TCP connection up to 8MB/s on a 400MHz PPC,
>>> but really no chance on 72MHz CPU (6cycle/byte !).
>
> It all depends on the software. The LPC23XX/24XX have: dual AHB
> bus, DMA packet transfer, and hardware checksum. Substantial
> hardware aceleration features. These ARM7 MCUs beat many ARM9 MCUs
> with higher clk speeds on Enet performance.
>
> At the full Enet-100 line speed of 100M bits/sec, and assuming about
> 20% overhead with headers, the maximum line data speed is about 10M
> bytes/sec. In terms of 32bit DWORDs, that is 2.5M dwords/sec. A
> 72MHz 32b MCU with the hardware features above can easily do that.

Since you need to prepare the packet, even with DMA you need to fill
the buffer, thus reading the data from somewhere. On a ARM7 reading 2
dwords
needs 6cycles.

>
> One of the TCP/IP code sets I have tried with the LPC2468 does 54M
> bits/sec. Two other ones do over 90M bits/sec, virtually full line

I doubt this, though ...
90MBit/32bit = 2.8M read accesses.
Even with a fast checksum on copy, a word (ARM speak for 32bit) needs
3 cycles reading, 1 cycle summing, 1 cycle storing means 14M cycles ...

> speed. It all depends on the TCP/IP software: zero data copy,
> dynamic packet allocation, dual size buffers, 32bit data ops, etc.

Hmm, you make me wonder ...
So
a) TCP ?
b) which ?
c) share ?

--
42Bastian

im using a UDP protocol to send and recieve data

________________________________
From: 42Bastian
To: l...
Sent: Sunday, 22 February, 2009 12:15:45 PM
Subject: Re: [lpc2000] transfer speed of data using uipstack and free rtos
anand_eee14 schrieb:

> ethernet ...im sending 1450 bytes continously ...how can i increase
> the speed from 200KB/s to 12MB/s

You can't. Do the math.The LPC is too slow.

You did not tell what protocol you use, but with TCP this would no work.

Anyhow, I could tweak a TCP connection up to 8MB/s on a 400MHz PPC, but
really no chance on 72MHz CPU (6cycle/byte !).

--
42Bastian

Note: SPAM-only account, direct mail to bs42@...

Add more friends to your messenger and enjoy! Go to http://messenger.yahoo.com/invite/



Hi,

> > One of the TCP/IP code sets I have tried with the LPC2468 does 54M
> > bits/sec. Two other ones do over 90M bits/sec, virtually full line
>
> I doubt this, though ...
> 90MBit/32bit = 2.8M read accesses.
> Even with a fast checksum on copy, a word (ARM speak for 32bit) needs
> 3 cycles reading, 1 cycle summing, 1 cycle storing means 14M cycles ...
>
> > speed. It all depends on the TCP/IP software: zero data copy,
> > dynamic packet allocation, dual size buffers, 32bit data ops, etc.
>
> Hmm, you make me wonder ...
> So
> a) TCP ?
> b) which ?
> c) share ?

Hmm, I get a throughput of about 4MB/second on a TCP socket using a 100Mbit
link (including TCP checksum calculation). That works out to about
32Mbit/second on a 100Mbit link or about 1/3 the bandwidth available. I
can't get it to go any faster on an LPC2300, wish I could, but I'm max'd
out.

--
Paul Curtis, Rowley Associates Ltd http://www.rowley.co.uk
CrossWorks for ARM, MSP430, AVR, MAXQ, and now Cortex-M3 processors

hi chris
can u send me that tcp/ip software of lpc2468 which supports 54Mbits/sec
--- In l..., "HM2" wrote:
>
> >> Anyhow, I could tweak a TCP connection up to 8MB/s on a 400MHz PPC,
> >> but really no chance on 72MHz CPU (6cycle/byte !).
>
> It all depends on the software. The LPC23XX/24XX have: dual AHB
bus, DMA packet transfer, and hardware checksum. Substantial hardware
aceleration features. These ARM7 MCUs beat many ARM9 MCUs with higher
clk speeds on Enet performance.
>
> At the full Enet-100 line speed of 100M bits/sec, and assuming about
20% overhead with headers, the maximum line data speed is about 10M
bytes/sec. In terms of 32bit DWORDs, that is 2.5M dwords/sec. A
72MHz 32b MCU with the hardware features above can easily do that.
>
> One of the TCP/IP code sets I have tried with the LPC2468 does 54M
bits/sec. Two other ones do over 90M bits/sec, virtually full line
speed. It all depends on the TCP/IP software: zero data copy, dynamic
packet allocation, dual size buffers, 32bit data ops, etc. Other
software can be an order of magnitude slower. You won't get those
speeds with uIP or lwIP.
>
> Regards, Chris.
>
>

Paul

> Hmm, I get a throughput of about 4MB/second on a TCP socket using a 100Mbit
> link (including TCP checksum calculation). That works out to about
> 32Mbit/second on a 100Mbit link or about 1/3 the bandwidth available. I
> can't get it to go any faster on an LPC2300, wish I could, but I'm max'd
> out.

I just wonder: Ethernet uses 100MiB/s( 1000*1000, not 1024*1024) ?
Am I right ?

--
42Bastian

Note: SPAM-only account, direct mail to bs42@...
Hi,

> > Hmm, I get a throughput of about 4MB/second on a TCP socket using a
> 100Mbit
> > link (including TCP checksum calculation). That works out to about
> > 32Mbit/second on a 100Mbit link or about 1/3 the bandwidth available. I
> > can't get it to go any faster on an LPC2300, wish I could, but I'm max'd
> > out.
>
> I just wonder: Ethernet uses 100MiB/s( 1000*1000, not 1024*1024) ?
> Am I right ?

Correct, 100Mbit is 100MHz. (Note I think you mean 100Mib/s, a capital B is
usually Byte...)

--
Paul Curtis, Rowley Associates Ltd http://www.rowley.co.uk
CrossWorks for ARM, MSP430, AVR, MAXQ, and now Cortex-M3 processors