On Wed, Nov 30, 2005 at 05:05:04PM -0500, [EMAIL PROTECTED] wrote: > I have generated an ASK (ON/OFF Keying) signal with the proper framing > based on the simple_framer code and successfully demodulated the signal. I > can see the rectangular pulses representing my data on the usrp scope (some > ripple due to the passband filter). The scope shows the signal with the > amplitude of the pulse going between about 100 to 7500 magnitude with the > varying pulse width. Is this streaming data ready to be processed by the > simple_correlator or does it need some signal conditioning (some type of > conversions to bits/bytes). The data is 8 x oversample are required. > > Do I need to do further signal processing before it's sent to > simple_correlator? > > I have been able to figure out what the simple_framer does but I am having > a hard time understanding the simple_correlator code. > > How the Oversample is used? The only place I see it being used is in the > code:
You might want to consider looking at the .h file too... > Nor can I make out how this code counts bits? > > // return number of set bits in the low 32 bits of x > int > gr_count_bits32 (int x) > { > int count = 0; > > for (int i = 0; i < 32; i++) > if (x & (1 << i)) > count++; > > return count; > } The first time through the loop the test is if (x & (1 << 0)) // (1 << 0) == 0x00000001 The second time through the loop the test is if (x & (1 << 1)) // (1 << 1) == 0x00000002 The third time through the loop the test is if (x & (1 << 2)) // (1 << 2) == 0x00000004 ... The 32nd time through the loop the test is if (x & (1 << 31)) // (1 << 31) == 0x80000000 It tests a single bit each time through the loop. Eric _______________________________________________ Discuss-gnuradio mailing list Discuss-gnuradio@gnu.org http://lists.gnu.org/mailman/listinfo/discuss-gnuradio