[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Discuss-gnuradio] Understanding flow control

From: Matt Ettus
Subject: Re: [Discuss-gnuradio] Understanding flow control
Date: Fri, 15 Jan 2010 15:24:24 -0800
User-agent: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv: Gecko/20091209 Fedora/3.0-4.fc12 Thunderbird/3.0

On 01/15/2010 03:08 PM, Tom Gross wrote:
yes of course we have two separate gig-e cards.   if the usrp2 is
sending us "pause" commands then it seems evident the usrp2 is having
trouble keeping up, not the computer.

First off, the USRP2 will only send pause frames when you are transmitting, not receiving. Pause frames are not generated due to the USRP2 being unable to keep up. Pause frames are not generated due to the computer not being able to keep up. Pause frames are generated as a normal part of the transmission process. This is fundamental, and you need to understand exactly why.

When you are transmitting, the USRP2 can only consume samples at a fixed rate, determined by the clock rate (100 MHz) and the interpolation rate (4 or higher). No matter what that rate is, your computer should be able to generate samples faster than that. Since your computer does not have a 100 MHz clock to pace the generation of those samples, it will generate them too fast. When they are sent the USRP2, which can only consume them at a certain rate, they will pile up in the buffers of the USRP2. Once the buffers get full enough, the USRP2 will send pause frames back to the computer to tell it to wait until the samples it has can work their way through the pipeline.

Again, this is completely normal and not because your computer is too slow, and not because the USRP2 is too slow. It is a normal consequence of the practicalities of generating samples asynchronously to their consumption.

So in normal transmit operation, you will see large numbers of pause frames going from the USRP2 to the computer. Do not be alarmed.

When receiving, the USRP only generates data as fast as samples are created by the ADC clock, divided by the decimation rate. If the decimation rate is 4 then the sample rate is 25 MS/s at 32 bits per sample, or 800 mbits. This fits just fine into gigabit ethernet, and so it all just goes out almost immediately over the ethernet, and nothing ever backs up and stalls. If your computer couldn't keep up, then it MIGHT WANT TO send pause frames, but we have disabled that. Instead, if your computer can't keep up it will drop frames and you'll see "S" in your terminal window. Get a faster computer or do less processing if you see this.

If you were to try a decimation of 3 or lower, then you would be generating more than 1 gigabit per second, and the ethernet wouldn't keep up, and the buffers in the USRP2 would overflow and cause an overrun ("O") error. You shouldn't be doing this because it won't work.

I hope this has cleared it up. To summarize -- each USRP2 needs its own Gigabit ethernet card to talk to EVEN if it is using only a tiny fraction of the total bandwidth. And those cards need to be configured to honor flow control.


reply via email to

[Prev in Thread] Current Thread [Next in Thread]