Forum: GNU Radio Bug in usrp_rx_cfile.py?

Announcement (2017-05-07): www.ruby-forum.com is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see rubyonrails.org/community and ruby-lang.org/en/community for other Rails- und Ruby-related community platforms.
John Windish (Guest)
on 2006-03-31 00:33
(Received via mailing list)
I think I have found a bug in usrp_rx_cfile.py...

I created an m-file for matlab to format data files that are generated
by usrp_rx_cfile.py (attached).  When I process a data file (sample file
attached) there is a huge oscillation which occurs at about the 400th
sample.

Noting that the data before the oscillation is moving slowly, it looks
to me like usrp_rx_cfile.py begins to capture data BEFORE the new
parameters for the capture are set-up.  (The capture I did prior to this
one had a lower decimation rate, which given my hypothesis on the
problem, would give the resultant data).  I'm guessing the huge
oscillation occurs when the new parameters are put into effect, and
after that, data is captured properly.

Looking through the code, I may be missing an easy way to correct this
(if it is indeed the issue).  Has anybody else encoutered an issue
similar to this one?

For reference, the data that I attached was captured with a decimation
rate of 32 with 20k samples.  The previous capture was done with a
decimation rate of 16 and 20k samples.

I'm running Fedora Core 4 on a Pentium based machine.

Thanks for any insight or help.

John
Charles S. (Guest)
on 2006-03-31 00:57
(Received via mailing list)
On Thu, 2006-03-30 at 12:11 -0800, John Windish wrote:
> I think I have found a bug in usrp_rx_cfile.py...
>

Looks like a few blocks of stale data like you surmised. You can
strip off the first 500 samples with dd like:

dd ibs=8 skip=500 if=N20kD32.dat of=N20kD32_stripped.dat
Eric B. (Guest)
on 2006-03-31 01:10
(Received via mailing list)
On Thu, Mar 30, 2006 at 12:11:01PM -0800, John Windish wrote:
> I think I have found a bug in usrp_rx_cfile.py...
>

> I created an m-file for matlab to format data files that are
> generated by usrp_rx_cfile.py (attached).

Thanks.  FYI, there's already one in
gnuradio-core/src/utils/read_complex_binary.m

> When I process a data file (sample file attached) there is a huge
> oscillation which occurs at about the 400th sample.

> Noting that the data before the oscillation is moving slowly, it
> looks to me like usrp_rx_cfile.py begins to capture data BEFORE the
> new parameters for the capture are set-up.  (The capture I did prior
> to this one had a lower decimation rate, which given my hypothesis
> on the problem, would give the resultant data).  I'm guessing the
> huge oscillation occurs when the new parameters are put into effect,
> and after that, data is captured properly.


> Looking through the code, I may be missing an easy way to correct
> this (if it is indeed the issue).  Has anybody else encoutered an
> issue similar to this one?

I've heard similar reports in the past.

The problem won't be in usrp_rx_cfile.  It'll be somewhere in the
usrp_standard / fusb_linux / FX2 firmware / FPGA code.  There's
probably some buffer that's not flushed when the USRP is closed or
opened.

> For reference, the data that I attached was captured with a
> decimation rate of 32 with 20k samples.  The previous capture was
> done with a decimation rate of 16 and 20k samples.
>
> I'm running Fedora Core 4 on a Pentium based machine.
>
> Thanks for any insight or help.

For a work-around, I suggest you drop the first 1M samples.

> John

Eric
unknown (Guest)
on 2006-03-31 02:56
(Received via mailing list)
Friends -

On Thu, Mar 30, 2006 at 01:08:24PM -0800, Eric B. wrote:
> opened.
I ran into this in my work, that is derived from USRP.
Resetting n-1 buffers isn't good enough.  :-p
You have to reset the FPGA buffer, the Cypress FX buffer,
and the host USB stack.  My model code is at
  http://recycle.lbl.gov/~ldoolitt/xguff.html

> For a work-around, I suggest you drop the first 1M samples.

I did this for a while, and got tired of it.

    - Larry
Eric B. (Guest)
on 2006-03-31 07:27
(Received via mailing list)
On Thu, Mar 30, 2006 at 02:53:46PM -0800, removed_email_address@domain.invalid
wrote:
> I did this for a while, and got tired of it.
>
>     - Larry

Thanks Larry!

When I get some breathing room I'll back port whatever changes are
required.

Eric
This topic is locked and can not be replied to.