Class holds common methods and attributes for different decoder implementations.
More...
#include <gnuradio/fec/polar_decoder_common.h>
|
float | llr_odd (const float la, const float lb) const |
|
float | llr_even (const float la, const float lb, const unsigned char f) const |
|
unsigned char | llr_bit_decision (const float llr) const |
|
const bool | is_frozen_bit (const int u_num) const |
|
const unsigned char | next_frozen_bit () |
|
void | initialize_decoder (unsigned char *u, float *llrs, const float *input) |
|
void | butterfly (float *llrs, unsigned char *u, const int stage, const int u_num, const int row) |
|
void | butterfly_volk (float *llrs, unsigned char *u, const int stage, const int u_num, const int row) |
|
void | butterfly_generic (float *llrs, unsigned char *u, const int stage, const int u_num, const int row) |
|
void | even_u_values (unsigned char *u_even, const unsigned char *u, const int u_num) |
|
void | odd_xor_even_values (unsigned char *u_xor, const unsigned char *u, const int u_num) |
|
void | extract_info_bits (unsigned char *output, const unsigned char *input) const |
|
void | print_pretty_llr_vector (const float *llr_vec) const |
|
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) |
|
Class holds common methods and attributes for different decoder implementations.
◆ polar_decoder_common()
gr::fec::code::polar_decoder_common::polar_decoder_common |
( |
int |
block_size, |
|
|
int |
num_info_bits, |
|
|
std::vector< int > |
frozen_bit_positions, |
|
|
std::vector< char > |
frozen_bit_values |
|
) |
| |
- Parameters
-
block_size | codeword size. MUST be a power of 2. |
num_info_bits | represents the number of information bits in a block. Also called frame_size. <= block_size |
frozen_bit_positions | is 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_values | holds 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_decoder_common()
gr::fec::code::polar_decoder_common::~polar_decoder_common |
( |
| ) |
|
◆ butterfly()
void gr::fec::code::polar_decoder_common::butterfly |
( |
float * |
llrs, |
|
|
unsigned char * |
u, |
|
|
const int |
stage, |
|
|
const int |
u_num, |
|
|
const int |
row |
|
) |
| |
|
protected |
◆ butterfly_generic()
void gr::fec::code::polar_decoder_common::butterfly_generic |
( |
float * |
llrs, |
|
|
unsigned char * |
u, |
|
|
const int |
stage, |
|
|
const int |
u_num, |
|
|
const int |
row |
|
) |
| |
|
protected |
◆ butterfly_volk()
void gr::fec::code::polar_decoder_common::butterfly_volk |
( |
float * |
llrs, |
|
|
unsigned char * |
u, |
|
|
const int |
stage, |
|
|
const int |
u_num, |
|
|
const int |
row |
|
) |
| |
|
protected |
◆ even_u_values()
void gr::fec::code::polar_decoder_common::even_u_values |
( |
unsigned char * |
u_even, |
|
|
const unsigned char * |
u, |
|
|
const int |
u_num |
|
) |
| |
|
protected |
◆ extract_info_bits()
void gr::fec::code::polar_decoder_common::extract_info_bits |
( |
unsigned char * |
output, |
|
|
const unsigned char * |
input |
|
) |
| const |
|
protected |
◆ get_input_size()
int gr::fec::code::polar_decoder_common::get_input_size |
( |
| ) |
|
|
inlinevirtual |
Returns the input size in items that the decoder object uses to decode a full frame. Often, this number is the number of bits per frame if the input format is unpacked. If the block expects packed bytes, then this value should be the number of bytes (number of bits / 8) per input frame.
The child class MUST implement this function.
Implements gr::fec::generic_decoder.
◆ get_output_size()
int gr::fec::code::polar_decoder_common::get_output_size |
( |
| ) |
|
|
inlinevirtual |
Returns the output size in items that the decoder object produces after decoding a full frame. Often, this number is the number of bits in the outputted frame if the input format is unpacked. If the block produces packed bytes, then this value should be the number of bytes (number of bits / 8) per frame produced. This value is generally something like get_input_size()/R for a 1/R rate code.
The child class MUST implement this function.
Implements gr::fec::generic_decoder.
◆ initialize_decoder()
void gr::fec::code::polar_decoder_common::initialize_decoder |
( |
unsigned char * |
u, |
|
|
float * |
llrs, |
|
|
const float * |
input |
|
) |
| |
|
protected |
◆ is_frozen_bit()
const bool gr::fec::code::polar_decoder_common::is_frozen_bit |
( |
const int |
u_num | ) |
const |
|
protected |
◆ llr_bit_decision()
unsigned char gr::fec::code::polar_decoder_common::llr_bit_decision |
( |
const float |
llr | ) |
const |
|
inlineprotected |
◆ llr_even()
float gr::fec::code::polar_decoder_common::llr_even |
( |
const float |
la, |
|
|
const float |
lb, |
|
|
const unsigned char |
f |
|
) |
| const |
|
protected |
◆ llr_odd()
float gr::fec::code::polar_decoder_common::llr_odd |
( |
const float |
la, |
|
|
const float |
lb |
|
) |
| const |
|
protected |
◆ next_frozen_bit()
const unsigned char gr::fec::code::polar_decoder_common::next_frozen_bit |
( |
| ) |
|
|
protected |
◆ odd_xor_even_values()
void gr::fec::code::polar_decoder_common::odd_xor_even_values |
( |
unsigned char * |
u_xor, |
|
|
const unsigned char * |
u, |
|
|
const int |
u_num |
|
) |
| |
|
protected |
◆ print_pretty_llr_vector()
void gr::fec::code::polar_decoder_common::print_pretty_llr_vector |
( |
const float * |
llr_vec | ) |
const |
|
protected |
◆ rate()
double gr::fec::code::polar_decoder_common::rate |
( |
| ) |
|
|
inlinevirtual |
Returns the rate of the code. For every r input bits, there is 1 output bit, so the rate is 1/r. Used for setting things like the encoder block's relative rate.
This function MUST be reimplemented by the child class.
Implements gr::fec::generic_decoder.
◆ set_frame_size()
bool gr::fec::code::polar_decoder_common::set_frame_size |
( |
unsigned int |
frame_size | ) |
|
|
inlinevirtual |
Updates the size of a decoded frame.
The child class MUST implement this function and interpret how the frame_size
information affects the block's behavior. It should also provide bounds checks.
Implements gr::fec::generic_decoder.
The documentation for this class was generated from the following file: