discuss-gnuradio
[Top][All Lists]
Advanced

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

Re: [Discuss-gnuradio] scheduler and special interleaver block


From: Eric Blossom
Subject: Re: [Discuss-gnuradio] scheduler and special interleaver block
Date: Sun, 17 Sep 2006 18:39:57 -0700
User-agent: Mutt/1.5.9i

On Sun, Sep 17, 2006 at 01:45:07PM -0700, Thomas Schmid wrote:
> Hi Everyone,
> 
> I have a question about the gnuradio scheduler and the interleaver block.
> 
> Let's assume that we have an interleaver block with two inputs and one
> output. Now, is it correct that the gnuradio scheduler runs the
> interleaver block only if there is data on both interleaver-input
> channels? If this is the case, then it would be complicated if you had
> two message sources because the two message sources would be
> independent and not generate messages at the same time and of the same
> size. Thus, the interleaver block would not work.
> 
> Would it be possible to write a special interleaver block which checks
> both inputs. If there is input on one channel, but not on the other,
> the interleaver interleaves the data from that channel with 0's (or
> some other defined value).
> 
> Thank you very much for any comments on this issue,
> Thomas

Hi Thomas,

The scheduler depends on the "forecast" method to tell it what the
requirements are of the block. 

You could try having forecast return zero as the answer to "how much
input do your require to produce Y output" on each of it's inputs.

Then in your general_work method you'd look at the ninput_items vector
to determine how much input was available on each input.

Like any block derived directly from gr_block, you'd have to be sure
to call the consume(which, how_many) method to tell the scheduler how
many items you consumed on each input stream.

This would entail a bit more overhead than usual, but it probably
wouldn't be a problem.

Let me know if this isn't clear.

Eric




reply via email to

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