GNU Radio Manual and C++ API Reference  3.10.9.1
The Free & Open Software Radio Ecosystem
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< uint8_t > 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< uint8_t > d_frozen_bit_values
 
std::vector< int > d_info_bit_positions
 
std::vector< int > d_info_bit_positions_reversed
 
volk::vector< unsigned char > d_volk_temp
 
volk::vector< unsigned char > d_volk_frozen_bit_mask
 
volk::vector< 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 Constructing 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

◆ polar_common()

gr::fec::code::polar_common::polar_common ( int  block_size,
int  num_info_bits,
std::vector< int >  frozen_bit_positions,
std::vector< uint8_t >  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.

◆ ~polar_common()

gr::fec::code::polar_common::~polar_common ( )

Member Function Documentation

◆ bit_reverse()

long gr::fec::code::polar_common::bit_reverse ( long  value,
int  active_bits 
) const
protected

◆ block_power()

const int gr::fec::code::polar_common::block_power ( ) const
inlineprotected

◆ block_size()

const int gr::fec::code::polar_common::block_size ( ) const
inlineprotected

◆ num_info_bits()

const int gr::fec::code::polar_common::num_info_bits ( ) const
inlineprotected

◆ print_packed_bit_array()

void gr::fec::code::polar_common::print_packed_bit_array ( const unsigned char *  printed_array,
const int  num_bytes 
) const
protected

◆ print_unpacked_bit_array()

void gr::fec::code::polar_common::print_unpacked_bit_array ( const unsigned char *  bits,
const unsigned int  num_bytes 
) const
protected

◆ setup_info_bit_positions_reversed()

void gr::fec::code::polar_common::setup_info_bit_positions_reversed ( )
protected

◆ setup_volk_vectors()

void gr::fec::code::polar_common::setup_volk_vectors ( )
protected

◆ volk_encode()

void gr::fec::code::polar_common::volk_encode ( unsigned char *  out_buf,
const unsigned char *  in_buf 
)
protected

◆ volk_encode_block()

void gr::fec::code::polar_common::volk_encode_block ( unsigned char *  out_buf,
unsigned char *  in_buf 
)
protected

Member Data Documentation

◆ d_frozen_bit_positions

std::vector<int> gr::fec::code::polar_common::d_frozen_bit_positions
protected

◆ d_frozen_bit_values

std::vector<uint8_t> gr::fec::code::polar_common::d_frozen_bit_values
protected

◆ d_info_bit_positions

std::vector<int> gr::fec::code::polar_common::d_info_bit_positions
protected

◆ d_info_bit_positions_reversed

std::vector<int> gr::fec::code::polar_common::d_info_bit_positions_reversed
protected

◆ d_volk_frozen_bit_mask

volk::vector<unsigned char> gr::fec::code::polar_common::d_volk_frozen_bit_mask
protected

◆ d_volk_frozen_bits

volk::vector<unsigned char> gr::fec::code::polar_common::d_volk_frozen_bits
protected

◆ d_volk_temp

volk::vector<unsigned char> gr::fec::code::polar_common::d_volk_temp
protected

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