discuss-gnuradio
[Top][All Lists]
Advanced

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

[Discuss-gnuradio] Tag propagaton bug in pack_k_bits_bb


From: Eugene Grayver
Subject: [Discuss-gnuradio] Tag propagaton bug in pack_k_bits_bb
Date: Thu, 17 Nov 2016 01:15:30 +0000

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 = "" 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
________________________


reply via email to

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