Hi Experts,
As follow is my program to test stream_mux block. I found when
dat1_num+dat2_num > 8192, the result was wrong.
Is there something I have made a mistake?
My gnuradio version is v3.7.4git-35-g1092e685
#!/usr/bin/env python
from gnuradio import gr
from gnuradio import blocks
if name == ‘main’:
tb = gr.top_block ()
dat1_num = 3
dat2_num = 8191
dat1 = [1] * dat1_num
dat1_src = blocks.vector_source_f(dat1)
dat2 = [2] * dat2_num
dat2_src = blocks.vector_source_f(dat2)
tmp_dat = dat1 + dat2
tmp_dst = blocks.vector_sink_f()
mux = blocks.stream_mux(gr.sizeof_float, (dat1_num, dat2_num))
tb.connect((dat1_src, 0), (mux, 0))
tb.connect((dat2_src, 0), (mux, 1))
tb.connect(mux, tmp_dst)
tb.run ()
if (tuple(tmp_dat) == tmp_dst.data()):
print "fine"
else:
print len(tmp_dst.data())
On 03/25/2014 03:59 PM, Tiankun Hu wrote:
Hi Experts,
As follow is my program to test stream_mux block. I found when
dat1_num+dat2_num > 8192, the result was wrong.
Is there something I have made a mistake?
There might be a bug in that block, although when you’re streaming, it
should work (i.e. not when you have a static case).
M
On 03/25/2014 06:15 PM, Martin B. wrote:
On 03/25/2014 03:59 PM, Tiankun Hu wrote:
Hi Experts,
As follow is my program to test stream_mux block. I found when
dat1_num+dat2_num > 8192, the result was wrong.
Is there something I have made a mistake?
There might be a bug in that block, although when you’re streaming, it
should work (i.e. not when you have a static case).
I checked the code, there was indeed a bit of a bug with finite stream
lengths. Commited a fix.
Cheers,
M
Hi Martin,
I haven’t found your committed in master branch yet, could you share
your diff?
于 2014年03月26日 04:37, Martin B. 写道:
I checked the code, there was indeed a bit of a bug with finite stream
lengths. Commited a fix.
Cheers,
M
–
Thanks
Tiankun
On 03/26/2014 02:13 PM, Tiankun Hu wrote:
Hi Martin,
I haven’t found your committed in master branch yet, could you share
your diff?
https://github.com/mbr0wn/gnuradio/tree/blocks/stream_mux
M
Thanks your help, it works fine now.
于 2014年03月27日 16:54, Martin B. 写道:
于 2014年03月26日 04:37, Martin B. 写道:
I checked the code, there was indeed a bit of a bug with finite stream
Discuss-gnuradio mailing list
[email protected]
https://lists.gnu.org/mailman/listinfo/discuss-gnuradio
–
Thanks
Tiankun