[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Discuss-gnuradio] ofdm reception affected by python threading?
From: |
Eric Blossom |
Subject: |
Re: [Discuss-gnuradio] ofdm reception affected by python threading? |
Date: |
Mon, 24 May 2010 23:27:03 -0700 |
User-agent: |
Mutt/1.5.20 (2009-08-17) |
On Fri, May 21, 2010 at 02:15:15PM -0700, Veljko Pejovic wrote:
> Hi,
>
> I'm using two USRP2 with XCVR2450s, a week old gnuradio git master and
> Ubuntu 9.10.
>
> A few months ago while using the OFDM code I observed that I tend to
> receive (or send?) packets in groups, although I was sending them
> individually.
>
> Now, I finally isolated the problem. I added a few simple print lines:
>
> "Message inserted in HAVE_HEADER" - whenever a message is enqueued in
> STATE_HAVE_SYNC of ofdm_frame_sink.cc
>
> and
>
> "Message picked up from the queue" - in queue_watcher_thread in
> ofdm.py, every time the message is fetched from the queue.
>
> The output that I expected was:
>
> Message inserted in HAVE_HEADER
> Message picked up from the queue
> Message inserted in HAVE_HEADER
> Message picked up from the queue
> ...
>
> However, I'm getting rather inconsistent output (this is a sample,
> check the attachment for the first few seconds of the output):
>
> Message inserted in HAVE_HEADER
> Message inserted in HAVE_HEADER
> Message inserted in HAVE_HEADER
> Message inserted in HAVE_HEADER
> Message picked up from the queue
> Message picked up from the queue
> Message picked up from the queue
> Message picked up from the queue
> Message inserted in HAVE_HEADER
> Message inserted in HAVE_HEADER
> Message inserted in HAVE_HEADER
> Message inserted in HAVE_HEADER
> Message inserted in HAVE_HEADER
> Message picked up from the queue
> Message picked up from the queue
> Message picked up from the queue
> Message picked up from the queue
> Message picked up from the queue
>
> So, it is definitely the receiver that has problems. It looks as if
> "msg = self.rcvd_pktq.delete_head()" in queue_watcher_thread in
> ofdm.py is not checked frequently enough. Could it be that Python does
> not switch threads fast enough? Note, I do have real time scheduling
> enabled.
> Any ideas on how to get around this?
Is your machine out of CPU cycles?
If it's not fast enough, it won't keep up.
Eric