Hi all
To test my program several times with the same data I replaced the “USRP
source” with a “file source” and a throttle:
Old situation:
self.uhd_usrp_source_0 = uhd.usrp_source(
device_addr=“addr=192.168.10.2”,
io_type=uhd.io_type.COMPLEX_FLOAT32,
num_channels=1,
)
self.uhd_usrp_source_0.set_samp_rate(samp_rate)
self.uhd_usrp_source_0.set_center_freq(227360000, 0)
self.uhd_usrp_source_0.set_gain(31.5, 0)
New situation:
self.file_source = gr.file_source(gr.sizeof_gr_complex1,
“/home/hoim/WorkDAB/Record8.dat”, False)
self.throttle_0 = gr.throttle(gr.sizeof_gr_complex1, samp_rate)
My problem is that the generated output isn’t every time the same. Has
GNU Radio something like a “Master reset” that I had to use before I
start my programm? Or have somebody an idea what the origin of the
inconsistence could be?
Any help will be appreciated
Thanks
Michael
On Wed, Jul 20, 2011 at 3:27 AM, Michael H. [email protected] wrote:
)
GNU Radio something like a “Master reset” that I had to use before I
start my programm? Or have somebody an idea what the origin of the
inconsistence could be?
Any help will be appreciated
Thanks
Michael
If you are running your program from the start each time and therefore
removing your flow graph and rebuilding it, there is no need for a
“reset”
as all blocks have no state left over from the last run. There is some
concept of a reset on certain blocks if you are running the flow graph
multiple times in a row, though, but only the ones that store memory.
So to answer your question is the always reliable “it depends.” It
really
depends on what you are doing to your signal. Most blocks will
behave deterministically, but some (very few) use random numbers that
might
indicate a problem. If you have your own block(s) in there somewhere,
they
could also be causing a problem.
Tom
Thanks for your answer Tom.
I can isolate the fault to one of my blocks:
http://www.zhaw.ch/~hoim/howto_ofdm_symbol_cutter_cc.cc
This block has two inputs, both have the same rate. If I connect the
input to a file with throttle and the output to a “vector_sink_c” I see
that the amount of data produced by the block is not always the same. My
conclusion is that my block looses data.
In this block I cut data out of a stream. Hence from time to time there
are rest periods between the data production. Is this a problem for gnu
radio? Should I allocate more memory for this block (how can I do that)?
Any help will be appreciated
Thanks
Michael