Underrun (using libusrp only)

Dear All,

I am trying to send a square-wave from the USRP DAC (basic TX board). I
have
made the the following little C++ program - but it gives me underruns
whenever I set the interpolation factor less than 64. Any help is
appreciated!

BR/
Per Z.

======================================================

#include <usrp_standard.h>
#include

using namespace std;

#define NO_ARGS 1
#define VALUE 4096
#define VALUE8 VALUE,VALUE,VALUE,VALUE,VALUE,VALUE,VALUE,VALUE
#define VALUEm8 -VALUE,-VALUE,-VALUE,-VALUE,-VALUE,-VALUE,-VALUE,-VALUE
#define VALUE256 VALUE8,VALUE8,VALUEm8,VALUEm8,
VALUE8,VALUE8,VALUEm8,VALUEm8,
VALUE8,VALUE8,VALUEm8,VALUEm8,
VALUE8,VALUE8,VALUEm8,VALUEm8,
VALUE8,VALUE8,VALUEm8,VALUEm8,
VALUE8,VALUE8,VALUEm8,VALUEm8,
VALUE8,VALUE8,VALUEm8,VALUEm8,
VALUE8,VALUE8,VALUEm8,VALUEm8 \

#define BUFFSIZE 1024

short Buffer1[BUFFSIZE]={VALUE256,VALUE256,VALUE256,VALUE256};
short Buffer2[BUFFSIZE]={VALUE256,VALUE256,VALUE256,VALUE256};

usrp_standard_tx* tx;

int main(int argc,char **argv)
{

bool underrun;
tx = usrp_standard_tx::make(0,16,2,47768);

tx->set_tx_freq (0,0); // chan: [0,1]
tx->set_tx_freq (1,0); // chan: [0,1]

tx->start();

while (1) {
tx->write((void ) Buffer1,BUFFSIZE2,&underrun);
if (underrun)
cout << “Underrrun \n”;
tx->write((void ) Buffer2,BUFFSIZE2,&underrun);
if (underrun)
cout << “Underrrun \n”;
}

return 0;
}

On Tue, Feb 19, 2008 at 01:59:45PM +0100, Per Z. wrote:

Dear All,

I am trying to send a square-wave from the USRP DAC (basic TX board). I have
made the the following little C++ program - but it gives me underruns
whenever I set the interpolation factor less than 64. Any help is
appreciated!

BR/
Per Z.

What kind of machine and OS are you running this on?

What FUSB_TECH is configure choosing?
You can find this out by grepping a Makefile for FUSB_TECH. E.g.,

[eb@dee gnuradio-core]$ grep FUSB_TECH Makefile
FUSB_TECH = linux

Eric

I am using the latest version of Ubuntu. I used the binary packages (
http://gnuradio.org/trac/wiki/DebianPackages ). So I don’t have any
Makefile
(how much I understand).

I am running on a Dell D600 Laptop.

BR/
Per

On Wed, Feb 20, 2008 at 06:58:38PM +0100, Per Z. wrote:

I am using the latest version of Ubuntu. I used the binary packages (
http://gnuradio.org/trac/wiki/DebianPackages ). So I don’t have any Makefile
(how much I understand).

I am running on a Dell D600 Laptop.

BR/
Per

Could your laptop be in some kind of “slow/powersave mode”?
If so, try setting it to the “I’m not kidding, I want performance” mode.

Eric

Did you check to see if the machine is running at full speed?
That is, not throttled back to save power?

I don’t really know how to do this. Is it something I set in the BIOS ?

Have you tried running usrp_fft.py -d 8?
Does it work without overruns?

I can do receive-only at 32MByte/sec without problem (also with libusrp
only).

BR/
Per

On Thu, Feb 21, 2008 at 06:04:52PM +0100, Per Z. wrote:

I have tried now with a better computer (Dell620) - same results.

Did you check to see if the machine is running at full speed? That
is, not throttled back to save power?

Is the USB-rate in transmit-only 32MByte/sec ?

Yes. The USB is half-duplex. We can sustain a total of 32MB/s as the
sum of the Tx and Rx data rates.

Have you tried running usrp_fft.py -d 8?
Does it work without overruns?

Admin note: please be sure to use the “Reply-to-All” command in your
mailer. The list isn’t getting copied on your replies.

Eric