discuss-gnuradio
[Top][All Lists]
Advanced

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

Re: [Discuss-gnuradio] dropped bits?


From: Eric Blossom
Subject: Re: [Discuss-gnuradio] dropped bits?
Date: Mon, 4 Jul 2005 20:38:44 -0700
User-agent: Mutt/1.5.6i

On Mon, Jul 04, 2005 at 10:58:49AM -0700, John E. Don Carlos wrote:
> Eric,
> Sorry to have to ask but:
> 1) what program generates the u0u0?  What is being checked to determine that
> bits are dropped?

"uO" == usrp overrun.  
Printed out on line 94 of gr-usrp/src/usrp1_source_base.cc

The lower level host-side library code polls the FPGA at about 10 Hz,
asking it if there have been any under or overruns.  The
usrp_basic_rx::read and usrp_basic_tx::write methods return this info.

You can access the number of Rx overruns from python with

    x = u.noverruns()  # where u is an instance of usrp.source_c

Likewise, you can the number of Tx underuns with

    x = u.nunderruns()  # where u is an instance of usrp.sink_c

In both cases, a value greater than 2 indicates a problem.  Sometimes
we see a couple of over/under-runs right at startup, which accounts
for the 1 or 2.

> 2) how do i grab sink.data?  Do i do it with Python or C?

Python.  See gnuradio-core/src/python/gnuradio/gr/qa_*.py for lots of
examples.  qa_head.py is the simplest of the bunch.

The C++ documentation on gr_vector_sink_f is less than enlightening.
You want the undocumented data() method.
http://www.gnu.org/software/gnuradio/doc/classgr__vector__sink__f.html

Note that gr.vector_source_f and friends have to keep malloc'ing
storage to hold whatever you send to it.  Don't get too carried away.
A few meg is probably fine, 100's of megs is definitely asking for trouble.

Eric




reply via email to

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