[Top][All Lists]

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

Re: [Discuss-gnuradio] usrp_* gains on Mac OS X fixed

From: Jonathan Jacky
Subject: Re: [Discuss-gnuradio] usrp_* gains on Mac OS X fixed
Date: Fri, 6 Jan 2006 15:02:13 -0800 (PST)

On Wed, 4 Jan 2006, Eric Blossom wrote:

Please revise and test the _s file.

I revised usrp1_{source,sink}_s.cc as shown in the diffs below.
Once again, I hard-coded #define WORDS_BIGENDIAN 1 right into those
files to make sure the fixes would be effective without changing configure.ac.

At first it wasn't clear to me how to test these easily, since most of the
usrp programs use the _c versions.  Then I noticed benchmark_usb.py
uses the _s versions of both source and sink.  This program works in
my latest build (from CVS, checked out Dec 29).  First I fixed
usrp1_source_s.cc ONLY, so the bytes between source and sink would not
be consistent.  I built and ran benchmark_usb, and sure enough it was
broken: it failed at all data rates, and at every rate, nright = 0,
runlength = 0, and delta = ntotal.  Then I fixed usrp1_sink_s.cc so
the source and sink should be consistent again.  I built and ran, now
benchmark_usb works as before, achieving 2MB/sec and sometimes 4MB/sec
(this is on a 1 GHZ Mac G4 with a Belkin USB 2.0 card), and reasonable
values for nright etc.  I conclude the fixes did something, and it
seems to be the right thing.

usrp_fft.py or usrp_oscope.py with the -8 option. I think the s8 case should work OK as is.

It does.  With a 500 mV pp input to RX-A, usrp_oscope -8 shows a trace
that ranges over -/+ 2500 counts, which is the same as the recently
fixed s16 case.  So it seems no further changes are needed in

Jon Jacky

PS here are the diffs

diff -r1.3 usrp1_source_s.cc
#define WORDS_BIGENDIAN 1 // FIXME so usrp_bytesex does the right thing
#include <usrp_bytesex.h>

<       out[i] = s16[i];
      out[i] = usrp_to_host_short(s16[i]);

diff -r1.3 usrp1_sink_s.cc
#define WORDS_BIGENDIAN 1 // FIXME so usrp_bytesex does the right thing
#include <usrp_bytesex.h>

<     dst[i] = in[i];
    dst[i] = host_to_usrp_short(in[i]);

reply via email to

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