discuss-gnuradio
[Top][All Lists]
Advanced

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

Re: [Discuss-gnuradio] Large number of overflows...


From: Matt Ettus
Subject: Re: [Discuss-gnuradio] Large number of overflows...
Date: Thu, 22 Apr 2010 16:56:19 -0700
User-agent: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.1.9) Gecko/20100330 Fedora/3.0.4-1.fc12 Thunderbird/3.0.4

On 04/22/2010 04:38 PM, Ian Holland wrote:
Hi Matt

Myself and a colleague have created a C++ equivalent for the same
flowgraph, with realtime scheduling enabled. We still have overruns for
data rates above 2 Mbps, even on a Core i7 machine. We will try and make
a multi-threaded version to hopefully resolve this, since our version is
only single-threaded at this stage.


I am pretty sure that what you are seeing is that your application is not keeping up. The USRP2 keeps sending data to the computer as fast as it generates it. The ethernet card DMAs it into some buffer in memory. Your app uses it and the driver then frees the buffer. If at some point the driver receives a frame and there is no buffer free for it then the packet will be dropped, and you'll see an "S". S stands for sequence number error, which is how the system can tell that there is a dropped packet. It is an overrun occurring in the computer, not in the hardware. The hardware will not overrun.

The best way to test what is happening is to run usrp2_fft.py. If you can run that at the same or higher sample rates than you are using in your application, then the driver is not the issue. My guess is that your computer will run without problem at decimation of 6 at worst, and more likely all the way down to 4. Your app is running at a decimation of around 12 or 16, so it is your app that can't keep up.


Think of it this way -- the fastest Core i7 machines are 3.2 GHz. For a 2 Mbps signal, you only have 1600 cycles per data bit. Assuming you are using at least 2 samples per bit, you only have 800 cycles per sample to process them. This is certainly possible, but you will need to optimize your code.

How long are your filters? Are you using FFT-based filters instead of convolution based? Is too much memory getting copied around?


In regards to using GRC to create the flowgraph, how can I check if
realtime scheduling is enabled, and/or enable realtime scheduling?


It is the last option in the "Options" top block.

Matt




reply via email to

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