On Fri, Jul 15, 2005 at 05:53:08PM -0700, Sachi wrote: > Hi, Matt and Eric > > I have a basic problem regarding the flow schedueling > in GNU Radio, especially when we try to combine > several sub-streams using a multiplier or an adder. > Can we make sure the indexes are still aligned? > > For example, suppose I want to implement: > z[n] = x[n] + c * y[n] > Source block A is used to genereate x[1], x[2], > x[3]... > source block B is used to genereate y[1], y[2], > y[3]... > Block C, gr_multiply_const_cc, is used to multiply > y[n], as the constant c. > Block D, gr_add_cc, is used to add the two streams, > the flow graph looks like: > A->D > B->C->D > > So my question is, can the scheduling mechanism in GNU > Radio guarantee the index alignment? I mean, will the > block C introduce any delay, or the two sourced > generating data in different speeds, so that at the > adder D, the index for the two sequence is not aligned > any more, but something looks like: > z[n] = x[n] + c * y[n - 1]??
They will be aligned. If the sources are producing data at different rates, the pipeline will block (the adder block) waiting for data to be available from both input streams. > Another more complicated example is the FM stereo > receiver, after fm-demodulating the input signal, we > need to split the data stream into two, process the > two sub-streams separately (filtering), and recombine > them using an adder and a substractor. Something > like: > A->B->C->F > A->D->E->F > I am concerned about whether the index is still > aligned at F. Can we make sure (BC) and (DE) > introduce the same delay? As long as the group delay through B->C is the same as D->E this will work. You control the group delay by your choice of filter taps, etc. In general, if B->C's overall input/output ratio is the same as D->E's, you'll be OK. E.g., if they're both 1:1, or 1:N or N:1, everything should work fine. > Thank you very much, the answer to this is very > important to me, because I am going implement some > complex algorithms. I know the simulink in Matlab > could guarantee this, but I am not sure whether GNU > Radio could gurantee this, especially when we split up > stream and recombine again. Eric _______________________________________________ Discuss-gnuradio mailing list Discuss-gnuradio@gnu.org http://lists.gnu.org/mailman/listinfo/discuss-gnuradio