GNU Radio Manual and C++ API Reference  3.7.9.2
The Free & Open Software Radio Ecosystem
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Modules Pages
gr::fec::code::polar_common Class Reference

POLAR code common operations and attributes. More...

#include <gnuradio/fec/polar_common.h>

Public Member Functions

 polar_common (int block_size, int num_info_bits, std::vector< int > frozen_bit_positions, std::vector< char > frozen_bit_values)
 
 ~polar_common ()
 

Protected Member Functions

const int block_size () const
 
const int block_power () const
 
const int num_info_bits () const
 
long bit_reverse (long value, int active_bits) const
 
void print_packed_bit_array (const unsigned char *printed_array, const int num_bytes) const
 
void print_unpacked_bit_array (const unsigned char *bits, const unsigned int num_bytes) const
 
void setup_info_bit_positions_reversed ()
 
void setup_volk_vectors ()
 
void volk_encode (unsigned char *out_buf, const unsigned char *in_buf)
 
void volk_encode_block (unsigned char *out_buf, unsigned char *in_buf)
 

Protected Attributes

std::vector< int > d_frozen_bit_positions
 
std::vector< char > d_frozen_bit_values
 
std::vector< int > d_info_bit_positions
 
std::vector< int > d_info_bit_positions_reversed
 
unsigned char * d_volk_temp
 
unsigned char * d_volk_frozen_bit_mask
 
unsigned char * d_volk_frozen_bits
 

Detailed Description

POLAR code common operations and attributes.

Polar codes are based on this paper by Erdal Arikan "Channel Polarization: A Method for Contructing Capacity-Achieving Codes for Symmetric Binary-Input Memoryless Channels", 2009 block holds common information for encoders and decoders. All polar encoder/decoders inherit from polar_common.

class holds common info. It is common to all encoders and decoders.

Constructor & Destructor Documentation

gr::fec::code::polar_common::polar_common ( int  block_size,
int  num_info_bits,
std::vector< int >  frozen_bit_positions,
std::vector< char >  frozen_bit_values 
)
Parameters
block_sizecodeword size. MUST be a power of 2.
num_info_bitsrepresents the number of information bits in a block. Also called frame_size. <= block_size
frozen_bit_positionsis an integer vector which defines the position of all frozen bits in a block. Its size MUST be equal to block_size - num_info_bits. Also it must be sorted and every position must only occur once.
frozen_bit_valuesholds an unpacked byte for every frozen bit position. It defines if a frozen bit is fixed to '0' or '1'. Defaults to all ZERO.
gr::fec::code::polar_common::~polar_common ( )

Member Function Documentation

long gr::fec::code::polar_common::bit_reverse ( long  value,
int  active_bits 
) const
protected
const int gr::fec::code::polar_common::block_power ( ) const
inlineprotected
const int gr::fec::code::polar_common::block_size ( ) const
inlineprotected
const int gr::fec::code::polar_common::num_info_bits ( ) const
inlineprotected
void gr::fec::code::polar_common::print_packed_bit_array ( const unsigned char *  printed_array,
const int  num_bytes 
) const
protected
void gr::fec::code::polar_common::print_unpacked_bit_array ( const unsigned char *  bits,
const unsigned int  num_bytes 
) const
protected
void gr::fec::code::polar_common::setup_info_bit_positions_reversed ( )
protected
void gr::fec::code::polar_common::setup_volk_vectors ( )
protected
void gr::fec::code::polar_common::volk_encode ( unsigned char *  out_buf,
const unsigned char *  in_buf 
)
protected
void gr::fec::code::polar_common::volk_encode_block ( unsigned char *  out_buf,
unsigned char *  in_buf 
)
protected

Member Data Documentation

std::vector<int> gr::fec::code::polar_common::d_frozen_bit_positions
protected
std::vector<char> gr::fec::code::polar_common::d_frozen_bit_values
protected
std::vector<int> gr::fec::code::polar_common::d_info_bit_positions
protected
std::vector<int> gr::fec::code::polar_common::d_info_bit_positions_reversed
protected
unsigned char* gr::fec::code::polar_common::d_volk_frozen_bit_mask
protected
unsigned char* gr::fec::code::polar_common::d_volk_frozen_bits
protected
unsigned char* gr::fec::code::polar_common::d_volk_temp
protected

The documentation for this class was generated from the following file: