Wednesday, November 16, 2016

[Discuss-gnuradio] Bug in GR runtime related to lock/unlock and tag propagation

Hello,


I came across a nasty bug in the runtime.  It has something to do with the tag pruning code after a flowgraph is reconfigured.  My guess is that some counter is not being reset, even though the output buffer is reset.  It is easy to demonstrate by hooking up a usrp_source to tag_debug.  usrp_source inserts tags but they are not seen by the tag_debug (after the first time).


Here's a full python example script.


------------------------

from gnuradio import gr, blocks, uhd
import time
top = gr.top_block()
src = uhd.usrp_source('', uhd.stream_args('fc32'))
dbg = blocks.tag_debug(gr.sizeof_gr_complex,'A')
top.connect(src, dbg)
top.start()
for idx in range(10):
    time.sleep(5)
    top.lock()
    top.disconnect(src, dbg)
    # Tags are lost whether we reuse the same dbg or create a new one
    #dbg = blocks.tag_debug(gr.sizeof_gr_complex,'A%d' % idx)
    top.connect(src, dbg)
    top.unlock()

top.stop()
top.wait()
---------------------------

________________________

Eugene Grayver, Ph.D.
Aerospace Corp., Sr. Eng. Spec.
Tel: 310.336.1274
________________________

No comments:

Post a Comment