fun_ofdm  1.0
802.11a Physical Layer for USRP
 All Classes Namespaces Files Functions Variables Enumerations Enumerator Macros Pages
fun Namespace Reference

Classes

class  block_base
 The block_base class. More...
 
class  block
 The block class template. More...
 
class  channel_est
 The channel_est block. More...
 
struct  circular_accumulator
 The circular_accumulator template. More...
 
class  fft
 The fft class. More...
 
class  fft_symbols
 The fft_symbols block. More...
 
class  frame_builder
 The frame_builder class. More...
 
struct  FrameData
 The FrameData struct. More...
 
class  frame_decoder
 The frame_decoder block. More...
 
class  frame_detector
 The frame_detector block. More...
 
class  interleaver
 The interleaver class. More...
 
struct  BitInterleave
 The BitInterleave struct. More...
 
class  modulator
 The modulator class. More...
 
class  phase_tracker
 The phase_tracker block. More...
 
struct  plcp_header
 The plcp_header struct is a container for PLCP Headers and their respective parameters. More...
 
class  ppdu
 The ppdu class. More...
 
class  puncturer
 The puncturer class. More...
 
class  QAM
 Template for QAM class. More...
 
struct  RateParams
 The RateParams struct. More...
 
class  receiver
 The receiver class is the public interface for the fun_ofdm receiver. This is the easiest way to start receiving 802.11a OFDM frames out of the box. More...
 
class  receiver_chain
 The Receiver Chain class. More...
 
class  symbol_mapper
 The symbol_mapper class. More...
 
struct  tagged_vector
 tagged_vector struct More...
 
struct  tagged_sample
 The tagged_sample struct. More...
 
class  timing_sync
 The timing_sync block. More...
 
class  transmitter
 The transmitter class is the public interface for the fun_ofdm transmit chain. This is the easiest way to start transmitting 802.11a OFDM frames out of the box. More...
 
struct  usrp_params
 The usrp_params struct which holds parameters for the USRP object such as center frequency, sample rate, tx/rx gain, etc.. More...
 
class  usrp
 A simple class used to easily interface with a USRP. More...
 
union  decision_t
 decision_t is a BIT vector More...
 
union  metric_t
 the metric_t attribute More...
 
struct  v
 The v struct. More...
 
class  viterbi
 The viterbi class. More...
 

Enumerations

enum  Rate : int {
  RATE_1_2_BPSK = 0, RATE_2_3_BPSK = 1, RATE_3_4_BPSK = 2, RATE_1_2_QPSK = 3,
  RATE_2_3_QPSK = 4, RATE_3_4_QPSK = 5, RATE_1_2_QAM16 = 6, RATE_2_3_QAM16 = 7,
  RATE_3_4_QAM16 = 8, RATE_2_3_QAM64 = 9, RATE_3_4_QAM64 = 10
}
 An enum for referencing the different PHY data rates by name. More...
 
enum  vector_tag {
  NONE, STS_START, STS_END, LTS_START,
  LTS1, LTS2, START_OF_FRAME
}
 The vector_tag enum. More...
 

Functions

void partab_init (void)
 
static int parityb (unsigned char x)
 
static int parity (int x)
 

Variables

unsigned char Partab [256]
 
int Parity_initialized
 
const double POLARITY [127]
 The polarity of the pilot subcarriers beginning with the pilots of the SIGNAL symbol being multiplied by POLARITY[0], then the next symbol being multiplied by POLARITY[1] and so on. More...
 
static int PILOTS [4][2]
 The index of each pilot in the 64 sample symbol and its initial value before being multiplied by its corresponding polarity. More...
 
static int DATA_SUBCARRIERS [48]
 The indicies of the 48 data subcarriers in the 64 sample symbol. More...
 
static std::complex< double > PREAMBLE_SAMPLES [320]
 Full 802.11a Preamble in time domain. The preamble consists of 320 samples. The first 160 samples are made up of 10 copies of the short training sequence which is 16 samples long (16*10 = 160). The second half of the preamble is made up of two long training sequences which are 64 samples each preceded by a 32 sample cyclic prefix which is essentially the last half of one LTS (32+64+64 = 160). More...
 
static std::complex< double > LTS_FREQ_DOMAIN [64]
 Long Training Sequence in frequency domain. More...
 
static std::complex< double > LTS_TIME_DOMAIN_CONJ [64]
 Complex conjugate of Long Training Sequence in time domain. More...
 
static std::complex< double > STS_SAMPLES [16]
 Short Training Sequence in time domain. More...
 
static std::vector< unsigned char > VALID_RATES = {0xD, 0xE, 0xF, 0x5, 0x6, 0x7, 0x9, 0xA, 0xB, 0x1, 0x3}
 Valid rate field values. More...
 
int lts_count = 0
 

Enumeration Type Documentation

enum fun::Rate : int

An enum for referencing the different PHY data rates by name.

The numbers represent the coding rate used with the first number being the numerator and the second number being the denominator followed by the modulation used. For example RATE_1_2_BPSK means BPSK modulation with a Rate 1/2 convoluational code.

Enumerator
RATE_1_2_BPSK 

Rate 1/2 code : BPSK modulation.

RATE_2_3_BPSK 

Rate 2/3 code : BPSK modulation.

RATE_3_4_BPSK 

Rate 3/4 code : BPSK modulation.

RATE_1_2_QPSK 

Rate 1/2 code : QPSK modulation.

RATE_2_3_QPSK 

Rate 2/3 code : QPSK modulation.

RATE_3_4_QPSK 

Rate 3/4 code : QPSK modulation.

RATE_1_2_QAM16 

Rate 1/2 code : QAM16 modulation.

RATE_2_3_QAM16 

Rate 2/3 code : QAM16 modulation.

RATE_3_4_QAM16 

Rate 3/4 code : QAM16 modulation.

RATE_2_3_QAM64 

Rate 2/3 code : QAM64 modulation.

RATE_3_4_QAM64 

Rate 3/4 code : QAM64 modulation.

Definition at line 31 of file rates.h.

31  : int
32  {
33  RATE_1_2_BPSK = 0,
34  RATE_2_3_BPSK = 1,
35  RATE_3_4_BPSK = 2,
36  RATE_1_2_QPSK = 3,
37  RATE_2_3_QPSK = 4,
38  RATE_3_4_QPSK = 5,
39  RATE_1_2_QAM16 = 6,
40  RATE_2_3_QAM16 = 7,
41  RATE_3_4_QAM16 = 8,
42  RATE_2_3_QAM64 = 9,
43  RATE_3_4_QAM64 = 10
44  };

The vector_tag enum.

These tags are used to mark specific locations in the received packet such as the start of the short & long training sequences

Enumerator
NONE 

No tag.

STS_START 

Approximate start of STS.

STS_END 

Approximate end of STS.

LTS_START 

Estimated beginning of LTS (i.e. first sample of the LTS Cyclic prefix.

LTS1 

Estimated beginning of first LTS symbol (32 samples after LTS_START.

LTS2 

Estimated beginning of second LTS symbol (64 samples after LTS1.

START_OF_FRAME 

Estimated beginning of frame i.e. Signal symbol (64 samples after LTS2)

Definition at line 25 of file tagged_vector.h.

26  {
27  NONE,
28  STS_START,
29  STS_END,
30  LTS_START,
31  LTS1,
32  LTS2,
34  };

Function Documentation

static int fun::parity ( int  x)
inlinestatic

Definition at line 43 of file parity.h.

References parityb().

Referenced by fun::viterbi::conv_encode(), fun::ppdu::decode_header(), fun::ppdu::encoder_header(), and fun::viterbi::viterbi_alloc().

43  {
44  /* Fold down to one byte */
45  x ^= (x >> 16);
46  x ^= (x >> 8);
47  return parityb(x);
48  }
static int fun::parityb ( unsigned char  x)
inlinestatic

Definition at line 33 of file parity.h.

References Parity_initialized, Partab, and partab_init().

Referenced by parity().

33  {
34  extern unsigned char Partab[256];
35  extern int Parity_initialized;
36  if(!Parity_initialized){
37  partab_init();
38  }
39  return Partab[x];
40  }
void fun::partab_init ( )

static inline parity(int x) – compute parity (up to 32 bits?)

Definition at line 17 of file parity.cpp.

References Parity_initialized, and Partab.

Referenced by parityb().

17  {
18  int i,cnt,ti;
19 
20  /* Initialize parity lookup table */
21  for(i=0;i<256;i++){
22  cnt = 0;
23  ti = i;
24  while(ti){
25  if(ti & 1)
26  cnt++;
27  ti >>= 1;
28  }
29  Partab[i] = cnt & 1;
30  }
32  }

Variable Documentation

int fun::DATA_SUBCARRIERS[48]
static
Initial value:
=
{
6, 7, 8, 9, 10, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 26, 27, 28, 29, 30, 31,
33, 34, 35, 36, 37, 38, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 54, 55, 56, 57, 58
}

The indicies of the 48 data subcarriers in the 64 sample symbol.

Definition at line 46 of file phase_tracker.cpp.

Referenced by fun::phase_tracker::work().

int fun::lts_count = 0

Definition at line 33 of file timing_sync.cpp.

std::complex<double> fun::LTS_FREQ_DOMAIN[64]
static

Long Training Sequence in frequency domain.

Definition at line 363 of file preamble.h.

Referenced by fun::channel_est::work().

std::complex<double> fun::LTS_TIME_DOMAIN_CONJ[64]
static

Complex conjugate of Long Training Sequence in time domain.

Definition at line 432 of file preamble.h.

Referenced by fun::timing_sync::work().

int fun::Parity_initialized

Definition at line 12 of file parity.cpp.

Referenced by parityb(), and partab_init().

unsigned char fun::Partab[256]

Definition at line 11 of file parity.cpp.

Referenced by parityb(), and partab_init().

int fun::PILOTS[4][2]
static
Initial value:
=
{
{ 11, 1 },
{ 25, 1 },
{ 39, 1 },
{ 53, -1 },
}

The index of each pilot in the 64 sample symbol and its initial value before being multiplied by its corresponding polarity.

Definition at line 37 of file phase_tracker.cpp.

Referenced by fun::phase_tracker::work().

const double fun::POLARITY[127]
Initial value:
= {
1, 1, 1, 1,-1,-1,-1, 1,-1,-1,-1,-1, 1, 1,-1, 1,
-1,-1, 1, 1,-1, 1, 1,-1, 1, 1, 1, 1, 1, 1,-1, 1,
1, 1,-1, 1, 1,-1,-1, 1, 1, 1,-1, 1,-1,-1,-1, 1,
-1, 1,-1,-1, 1,-1,-1, 1, 1, 1, 1, 1,-1,-1, 1, 1,
-1,-1, 1,-1, 1,-1, 1, 1,-1,-1,-1, 1, 1,-1,-1,-1,
-1, 1,-1,-1, 1,-1, 1, 1, 1, 1,-1, 1,-1, 1,-1, 1,
-1,-1,-1,-1,-1, 1,-1, 1, 1,-1, 1,-1, 1, 1, 1,-1,
-1, 1,-1,-1,-1, 1, 1, 1,-1,-1,-1,-1,-1,-1,-1
}

The polarity of the pilot subcarriers beginning with the pilots of the SIGNAL symbol being multiplied by POLARITY[0], then the next symbol being multiplied by POLARITY[1] and so on.

Definition at line 23 of file phase_tracker.cpp.

Referenced by fun::phase_tracker::work().

std::complex<double> fun::PREAMBLE_SAMPLES[320]
static

Full 802.11a Preamble in time domain. The preamble consists of 320 samples. The first 160 samples are made up of 10 copies of the short training sequence which is 16 samples long (16*10 = 160). The second half of the preamble is made up of two long training sequences which are 64 samples each preceded by a 32 sample cyclic prefix which is essentially the last half of one LTS (32+64+64 = 160).

Definition at line 24 of file preamble.h.

Referenced by fun::frame_builder::build_frame().

std::complex<double> fun::STS_SAMPLES[16]
static
Initial value:
=
{
std::complex<double>( 0.0459987545121 , 0.0459987545121),
std::complex<double>(-0.132443716852 , 0.00233959188499),
std::complex<double>(-0.0134727232705 , -0.0785247857538),
std::complex<double>( 0.142755292821 , -0.0126511678539),
std::complex<double>( 0.0919975090242 , 0.0),
std::complex<double>( 0.142755292821 , -0.0126511678539),
std::complex<double>(-0.0134727232705 , -0.0785247857538),
std::complex<double>(-0.132443716852 , 0.00233959188499),
std::complex<double>( 0.0459987545121 , 0.0459987545121),
std::complex<double>( 0.00233959188499, -0.132443716852),
std::complex<double>(-0.0785247857538 , -0.0134727232705),
std::complex<double>(-0.0126511678539 , 0.142755292821),
std::complex<double>( 0.0 , 0.0919975090242),
std::complex<double>(-0.0126511678539 , 0.142755292821),
std::complex<double>(-0.0785247857538 , -0.0134727232705),
std::complex<double>( 0.00233959188499, -0.132443716852),
}

Short Training Sequence in time domain.

Definition at line 501 of file preamble.h.

std::vector<unsigned char> fun::VALID_RATES = {0xD, 0xE, 0xF, 0x5, 0x6, 0x7, 0x9, 0xA, 0xB, 0x1, 0x3}
static

Valid rate field values.

Definition at line 21 of file rates.h.

Referenced by fun::ppdu::decode_header().