Eric A. Cottrell wrote: > Hello, > > The processing of pulses into data requires me to keep track of valid > pulses (following samples are above threshold) and leading edges (sample > is 6 dB or more than previous sample and following sample is 6 dB or > less than current sample). I also want to indicate preamble start and > pass timestamps along. I have thought of three methods to do this but > do not know which would be the best one. > >
You can do this, or you may be able to break things up into chunks of samples and process them as vectors. See the ofdm_sync code for an example of how we do that. > The first method is to have two streams through the blocks, one a float > stream containing the sample values and the other a short or int stream > containing the attributes and control. The float data makes it easier > to do processing as some of the blocks use 3 dB multiplication of the > samples (1.414 and 0.707). Being an old programmer I still have the > float equals slow performance mindset. > > The second method is to have the two streams as shorts. I have to deal > with an integer multiplication and division (sample * 707 / 1000). I > have no handle if integers would be faster than floats other than > integer division tends to be expensive. > Float multiplication is 1 cycle. Integer multiplication can actually be slower these days. > The third method is to use one integer stream and have the upper 16 bits > be the attributes/control and the lower 16 bits be the value. This > method has an additional minor disadvantage over the second method of > needing to mask off the upper 16 bits when using the value but I do not > have to deal with two streams. > I would use separate streams so you don't need to play with bit fields. There are a number of places in the OFDM code where we use chars in parallel with vectors of floats, and it works well for us. Matt _______________________________________________ Discuss-gnuradio mailing list [email protected] http://lists.gnu.org/mailman/listinfo/discuss-gnuradio
