discuss-gnuradio
[Top][All Lists]
Advanced

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

Re: [Discuss-gnuradio] Scheduler Help/Question


From: Eric Blossom
Subject: Re: [Discuss-gnuradio] Scheduler Help/Question
Date: Sun, 4 Jan 2009 12:04:22 -0800
User-agent: Mutt/1.5.18 (2008-05-17)

On Wed, Dec 31, 2008 at 12:32:45PM -0800, Earle Frank wrote:
> 
> Okay I am using the default scheduler. So now I have enabled the logging for
> the appropriate thread-per-block scheduler files.
> 
> Here's the heart of my problem. My flow graph has five blocks, A, B, C, D,
> E.
> Output of A is input to B and C.
> Output of C is input to D.
> Output of B and D are input to E.
> 
> Block A is a file source.
> 
> Block B has a 1-to-1 input to output function.
> 
> Block C breaks the samples from A into partitions of N samples. The block
> does its function over the N samples. Then it outputs the resulting N
> values.
> 
> Block D looks at the input and produces an enable signal.  The curious
> feature, due to implementation, is that this block will only output the
> enable signal high once it detects the enable going back low.
> 
> Block E takes the inputs from B and D and only outputs the values of B when
> D (the enable) is high.

The bug is that D should always produce an enable output, 1:1 with the
input.  If you're not sure of the state at start up time, output a
reasonable default value.


> Running this flow graph hangs. Looking at the log files produced for each
> block I see that blocks A & B are BLKD_OUT and blocks C, D & E are BLKD_IN.

What's happening is that the buffer between B & E is filling, then
between A & B fills, then A blocks and the everything hangs because D
isn't outputting the enable/not-enable signal.


> In this scenario, an enable signal will exist over a partition boundary, say
> starts at N-10 and ends at N+10.
> 
> At the point of hanging:
> Block A has produced N values.
> Block B has consumed N values and produced N values.
> Block C has consumed N values and produced N values.
> Block D has consumed N values and produced N-10 values.
> Block E has consumed N-10 values.
> 
> If only block A would produce the next N values the system would chug along.
> To those smarter than I, is there anything obvious as to why this is
> stalling the flow graph?
> How does the buffers work in this case?
> Block C's input buffer is empty and ready.
> Block B has 10 values left in it's output buffer, but shouldn't it be able
> to produce more outputs?
> 
> 
> Thanks again in advance,
> EF

Eric




reply via email to

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