|
fun_ofdm
1.0
802.11a Physical Layer for USRP
|
Template for QAM class. More...
#include <qam.h>
Public Member Functions | |
| QAM (double power, int gain=0) | |
| QAM Constructor. More... | |
| void | encode (const char *bits, double *sym) |
| Encode recursively to match the decoding process. More... | |
| void | decode (double sym, unsigned char *bits) |
| Decode recursively. More... | |
Static Public Member Functions | |
| static int | sign (int v) |
| sign More... | |
| static int | clamp (int i) |
| clamp More... | |
Private Attributes | |
| int | d_gain |
| double | d_scale_e |
| double | d_scale_d |
Template for QAM class.
fast QAM (uses at most 4x imull to decode) Tested on 7600 bogomips yields 600-1200Mbps encoding and 300Mbps decoding Compile with -O3
QAM Constructor.
| power | desired symbol power |
| gain | gain on the decoded confidence (power of 2) |
Definition at line 35 of file qam.h.
References fun::QAM< NumBits >::d_gain, fun::QAM< NumBits >::d_scale_d, and fun::QAM< NumBits >::d_scale_e.
|
inlinestatic |
clamp
| i |
Definition at line 68 of file qam.h.
Referenced by fun::QAM< NumBits >::decode().
|
inline |
Decode recursively.
We decode recursively because we want meaningful confidences. The alternative would be to simply divide and round, which only yields the smallest per-bit confidence.
output bit confidence is between 0 and 255.
| sym | |
| bits |
Definition at line 110 of file qam.h.
References amp, fun::QAM< NumBits >::clamp(), fun::QAM< NumBits >::d_gain, fun::QAM< NumBits >::d_scale_d, and fun::QAM< NumBits >::sign().
Referenced by fun::modulator::demodulate().
|
inline |
Encode recursively to match the decoding process.
This could have been implemented by a gray + multiply. gray(i) = (i> >1)^i see: http://www.dspguru.com/dsp/tricks/gray-code-conversion
| bits | |
| sym |
Definition at line 83 of file qam.h.
References fun::QAM< NumBits >::d_scale_e.
Referenced by fun::modulator::modulate().
|
inlinestatic |
sign
| v |
Definition at line 58 of file qam.h.
Referenced by fun::QAM< NumBits >::decode().
|
private |
Definition at line 26 of file qam.h.
Referenced by fun::QAM< NumBits >::decode(), and fun::QAM< NumBits >::QAM().
|
private |
Definition at line 28 of file qam.h.
Referenced by fun::QAM< NumBits >::decode(), and fun::QAM< NumBits >::QAM().
|
private |
Definition at line 27 of file qam.h.
Referenced by fun::QAM< NumBits >::encode(), and fun::QAM< NumBits >::QAM().