On Thu, Mar 29, 2007 at 05:16:45PM -0700, Dan Halperin wrote: > Greg Troxel wrote: > > I wonder if there is data somewhere in the flowgraph that's less than > > the amount needed for the next block to run. Perhaps there should > > be some sort of drain operation, or query for this (that adds over > > components), so one can find out what's going on. > > > > This appears to be the problem. For this configuration, the > gr_clock_recovery_mm_ff block requires at least 10 inputs - the > instrumented forecast method prints: > > 16382 inputs required for 8191 outputs > 8194 inputs required for 4095 outputs > 4100 inputs required for 2047 outputs > 2053 inputs required for 1023 outputs > 1030 inputs required for 511 outputs > 518 inputs required for 255 outputs > 262 inputs required for 127 outputs > 134 inputs required for 63 outputs > 70 inputs required for 31 outputs > 38 inputs required for 15 outputs > 22 inputs required for 7 outputs > 14 inputs required for 3 outputs > 10 inputs required for 1 outputs > > Since this block initially starts with 0 inputs and is not filled with > other data following the run of the program, the last <10 samples are > left in the flow graph. This could well be the problem with the last > bits of the last packet always being dropped/corrupted, because if you > were using queues and enqueued a message followed by a close_queue > packet, they could well get shipped through the pipeline together. > > This is where my expertise runs out; what's the right fix? Is it > block-specific (either pre-pend 0s or detect the end of data and append > 0s), or more general? > > -Dan
Try applying this patch. It has the effect of preloading ntaps()-1 zero's into the block's input stream. Eric --- gr_clock_recovery_mm_ff.cc 2006-12-20 10:40:57.000000000 -0800 +++ /tmp/gr_clock_recovery_mm_ff.cc 2007-03-29 17:59:42.000000000 -0700 @@ -61,6 +61,8 @@ set_omega(omega); // also sets min and max omega set_relative_rate (1.0 / omega); + set_history(d_interp->ntaps()); + if (DEBUG_CR_MM_FF) d_logfile = fopen("cr_mm_ff.dat", "wb"); } _______________________________________________ Discuss-gnuradio mailing list Discuss-gnuradio@gnu.org http://lists.gnu.org/mailman/listinfo/discuss-gnuradio