Wednesday, November 16, 2016

[Discuss-gnuradio] Tag propagaton bug in pack_k_bits_bb

Hello,

I found a tag propagation bug in pack_k_bits_bb.  Example python file to demonstrate the bug is below.  This block takes every 2 bits and packs them into one output.  Thus, a tag on input 0 should come out on output 0, and tag on input 7 should come out on output 3.  However, as can be seen from this example, the second tag comes out on output 4.  This is probably due to the way sync_decimator does tag propagation: round(input_index / decimation).  However, that is NOT the correct approach for this block.

Eugene

-----------------------------------------------
from gnuradio import gr, blocks
import pmt
top = gr.top_block()
tag1 = gr.python_to_tag((0, pmt.intern('A'), pmt.PMT_NIL))
tag2 = gr.python_to_tag((7, pmt.intern('B'), pmt.PMT_NIL))
src = blocks.vector_source_b([0,]*10, tags=[tag1, tag2])
packer = blocks.pack_k_bits_bb(2)
dbg = blocks.tag_debug(gr.sizeof_char,'A')
top.connect(src, packer, dbg)
top.run()
----------------------------------------------


________________________

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

No comments:

Post a Comment