Hi activecat,
The scheduler might be confused if he asked for less than iFactor samples,
because then your forecast tells him you need 0 input to produce that... The
joys of Integer division
Can you modify it so that it always demands at least 1 input?
--
Sent from my Android device with K-9
Hi activecat,
The scheduler might be confused if he asked for less than iFactor samples,
because then your forecast tells him you need 0 input to produce that... The
joys of Integer division
Can you modify it so that it always demands at least 1 input?
--
Sent from my Android device with K-9
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA256
Hi activecat,
The scheduler might be confused if he asked for less than iFactor samples,
because then your forecast tells him you need 0 input to produce that...
Integer division
- --
Sent from my Android device with K-9 Mail. Please excuse my
Dear Marcus,
Sure, I have changed it, as follows:
void quadrator_upconverter_impl::forecast (int noutput_items,
gr_vector_int ninput_items_required)
{ ninput_items_required[0] = std::min( 1, noutput_items / d_iFactor
); }
This tested has no effect to the flow graph; the block still
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1
Hi Activecat,
your std::min should be a std::max :) would you try with that?
On 08.03.2014 12:30, Activecat wrote:
BTW I thought it is redundant to do this change, because as long
as set_min_noutput_items(d_iFactor) works on the fly, the
Dear Marcus,
Meanwhile, as you had advised, I had tried to see the parameters
that forecast() and general_work() are called with. Refer below
verbose message. When the flow chart started, the initial values
are samp_rate=32k, change_rate=64; hence d_iFactor = 32k/64 = 500.
At line 24 the
Hi Activecat,
to answer question 1):
grepping for min_noutput_items instantly shows that in
gnuradio-runtime/lib/block_executor.cc line 299, your block's min_noutput_items() is
called every iteration. If there isn't enough space, the block thread sleeps until there
is more. So yes, it works
Dear Marcus,
1). The line 299 of gnuradio-runtime/lib/block_executor.cc is:
noutput_items = min_available_space(d, m-output_multiple(),
m-min_noutput_items());
If this line shows that set_min_output_items() works on the fly, does
this also shows set_out_multiple() works on the fly?
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1
Hi Activecat,
On 08.03.2014 03:34, Activecat wrote:
Dear Marcus,
1). The line 299 of gnuradio-runtime/lib/block_executor.cc is:
noutput_items = min_available_space(d, m-output_multiple(),
m-min_noutput_items());
If this line shows that
Dear Marcus,
This is the forecast, I believe it is correct.
void quadrator_upconverter_impl::forecast (int noutput_items,
gr_vector_int ninput_items_required)
{ ninput_items_required[0] = noutput_items / d_iFactor; }
Note: d_iFactor is the instantaneous interpolation factor.
Dear Sir,
Let me explain the reason of why to use the function:
set_min_noutput_items().
I am creating a custom interpolator block.
Says, the interpolation factor is 1000. Hence it is important to call
set_output_multiple(1000).
Meanwhile, for this block the interpolation factor depends on
Dear Sir,
In c++ we have: set_min_noutput_items()
What is it equivalent syntax in python ?
I try this:
self.set_min_noutput_items()
Error message:
AttributeError: 'quadrator_upconverter_python1' object has no attribute
'set_min_noutput_items'
Note:
The self.set_output_multiple() in python
12 matches
Mail list logo