discuss-gnuradio
[Top][All Lists]
Advanced

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

Re: [Discuss-gnuradio] Help using simple_framer and simple_correlator


From: address@hidden
Subject: Re: [Discuss-gnuradio] Help using simple_framer and simple_correlator
Date: Wed, 30 Nov 2005 17:05:04 -0500

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:

gr_simple_correlator::enter_looking ()
{
  fflush (stdout);
  // fprintf (stderr, ">>> enter_looking\n");
  d_state = ST_LOOKING;
  for (int i = 0; i < OVERSAMPLE; i++)
    d_shift_reg[i] = 0;
  d_osi = 0;

  d_avbi = 0;
  d_avg = d_avg * 0.5;
  d_accum = 0;
  for (int i = 0; i < AVG_PERIOD; i++)
    d_avgbuf[i] = 0.0;
}

which only seem to be setting values to 0.0.

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;
}

// return number of set bits in the low 64 bits of x
int 
gr_count_bits64 (unsigned long long x)
{
  return gr_count_bits32((x >> 32) & 0xffffffff) + gr_count_bits32(x &
0xffffffff);
}

Any help with how this code works would be of great help.

Thanks,
Mike

--------------------------------------------------------------------
mail2web - Check your email from the web at
http://mail2web.com/ .






reply via email to

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