free5GRAN
V1.0
|
Functions | |
int | compute_N_polar_code (int E, int K, int nmax) |
void | rate_recover (int *input_bits, int *output_bits, int i_bil, int E, int N, int K) |
void | polar_decode (int *input_bits, int *output_bits, int N, int K, int nmax, int i_il, int n_pc, int n_wm_pc, int E) |
void | crc_validate (int *input_bits, int *crc_polynom, int *remainder, int length_input, int length_crc) |
void | compute_crc (int *input_bits, int *crc_polynom, int *remainder, int length_input, int length_crc) |
void | compute_ldpc_base_graph (int A, float R, int &graph) |
void | compute_transport_block_size (int n_re, float R, int mod_order, int num_layers, int nrb, int &tbs) |
void | compute_Zc_dl_sch (int kb, float k_p, int &Zc, int &i_ls) |
void | compute_code_block_segmentation_info_ldpc (int graph, int B, int &Zc, int &K, int &i_ls, int &L, int &C, int &N, int &K_p) |
void | rate_recover_ldpc (int *input_bits, int N, int i_lbrm, int E, int id_rv, int mod_order, int C, int Zc, int graph, int K, int K_p, int *output_sequence) |
void | rate_recover_ldpc (double *input_bits, int N, int i_lbrm, int E, int id_rv, int mod_order, int C, int Zc, int graph, int K, int K_p, double *output_sequence) |
void | compute_circular_permutation_matrix (int size, int offset, int **matrix) |
void | ldpc_decode_one_bit (vector< vector< int >> R, double *soft_bits, int i, double &new_bit) |
void | compute_H_matrix_ldpc (int Zc, int graph, int i_ls, vector< vector< int >> &matrix, int &size_i, int &size_j) |
void | ldpc_decode (double *input_bits, int N, int Zc, int graph, int K, int i_ls, int *output_sequence) |
void | decode_bch (int *bch_bits, bool &crc_validated, int *mib_bits, int pci) |
void | decode_dci (int *dci_bits, int E, int K, int *rnti, bool &validated, int *decoded_dci_bits) |
vector< int > | decode_dl_sch (double *dl_sch_bits, int n_re, float R, int nrb, int E, bool &validated, free5GRAN::dci_1_0_si_rnti dci_1_0_si_rnti) |
void free5GRAN::phy::transport_channel::compute_circular_permutation_matrix | ( | int | size, |
int | offset, | ||
int ** | matrix | ||
) |
Compute offset times right shifted identity matrix of size n
[in] | size | Identity matrix size |
[in] | offset | Number of times to shift matrix |
[out] | matrix | Output matrix |
Definition at line 718 of file transport_channel.cpp.
void free5GRAN::phy::transport_channel::compute_code_block_segmentation_info_ldpc | ( | int | graph, |
int | B, | ||
int & | Zc, | ||
int & | K, | ||
int & | i_ls, | ||
int & | L, | ||
int & | C, | ||
int & | N, | ||
int & | K_p | ||
) |
Compute code block segmentation informations for LDPC
3GPP standard: TS 38.212 V15.2.0 Section 5.2.2
[in] | graph | LDPC base graph |
[in] | B | Code block segmentation input size (inlcuding CRC) |
[out] | Zc | Returned LDPC lifting size |
[out] | K | Code block segmentation output size |
[out] | i_ls | Zc set index |
[out] | L | Code block CRC length |
[out] | C | Number of code blocks |
[out] | N | LDPC output sequence |
[out] | K_p | K' intermediate K value |
Definition at line 545 of file transport_channel.cpp.
void free5GRAN::phy::transport_channel::compute_crc | ( | int * | input_bits, |
int * | crc_polynom, | ||
int * | remainder, | ||
int | length_input, | ||
int | length_crc | ||
) |
CRC computation
Compute the CRC for a given input and polynom
[in] | input_bits | Input bits sequence |
[in] | crc_polynom | Polynom used for CRC computation |
[out] | remainder | Output CRC |
[in] | length_input | Input size |
[in] | length_crc | Polynom size |
Definition at line 392 of file transport_channel.cpp.
void free5GRAN::phy::transport_channel::compute_H_matrix_ldpc | ( | int | Zc, |
int | graph, | ||
int | i_ls, | ||
vector< vector< int >> & | matrix, | ||
int & | size_i, | ||
int & | size_j | ||
) |
Compute Hbg matrix for LDPC
3GPP standard: TS 38.212 V15.2.0 Section 5.3.2
[in] | Zc | LDPC lifting size |
[in] | graph | LDPC base graph |
[in] | i_ls | Zc set index |
[out] | matrix | H matrix |
[out] | size_i | H matrix number of rows |
[out] | size_i | H matrix number of columns |
Definition at line 786 of file transport_channel.cpp.
void free5GRAN::phy::transport_channel::compute_ldpc_base_graph | ( | int | A, |
float | R, | ||
int & | graph | ||
) |
Choose LDPC base graph
3GPP standard: TS 38.212 V15.2.0 Section 7.2.2
[in] | A | Transport block size |
[in] | R | Code rate |
[out] | graph | Output graph |
Definition at line 471 of file transport_channel.cpp.
int free5GRAN::phy::transport_channel::compute_N_polar_code | ( | int | E, |
int | K, | ||
int | nmax | ||
) |
Compute polar coding out sequence size
3GPP standard: TS 38.212 V15.2.0 Section 5.3.1
[in] | E | Rate matching output sequence length |
[in] | K | Polar coding input sequence length (including CRC) |
[in] | nmax | Maximum value of n |
Definition at line 41 of file transport_channel.cpp.
void free5GRAN::phy::transport_channel::compute_transport_block_size | ( | int | n_re, |
float | R, | ||
int | mod_order, | ||
int | num_layers, | ||
int | nrb, | ||
int & | tbs | ||
) |
Transport block size computation
3GPP standard: TS 38.214 V15.2.0 Section 5.1.3.2
Partial implementation: n_info > 3824 not implemented
[in] | n_re | Number of PDSCH RE per RB |
[in] | R | Code rate |
[in] | mod_order | Modulation order |
[in] | num_layers | Number of transport layers |
[in] | nrb | Number of RB in PDSCH allocation |
[out] | tbs | Transport block size |
Definition at line 488 of file transport_channel.cpp.
void free5GRAN::phy::transport_channel::compute_Zc_dl_sch | ( | int | kb, |
float | k_p, | ||
int & | Zc, | ||
int & | i_ls | ||
) |
Compute LDPC lifting size for DL-SCH encoding/decoding
3GPP standard: TS 38.212 V15.2.0 Section 5.2.2
[in] | kb | Intermediate value for Zc computation |
[in] | k_p | K' value |
[out] | Zc | Returned value |
[out] | i_ls | Zc set index |
Definition at line 523 of file transport_channel.cpp.
void free5GRAN::phy::transport_channel::crc_validate | ( | int * | input_bits, |
int * | crc_polynom, | ||
int * | remainder, | ||
int | length_input, | ||
int | length_crc | ||
) |
CRC validation
Computes the remainder of the division of the input sequence by the polynom. If the remainder is equal to 0, CRC is validated
[in] | input_bits | Input bits sequence |
[in] | crc_polynom | Polynom used for CRC computation |
[out] | remainder | Output remainder of the division |
[in] | length_input | Input size |
[in] | length_crc | Polynom size |
Definition at line 297 of file transport_channel.cpp.
void free5GRAN::phy::transport_channel::decode_bch | ( | int * | bch_bits, |
bool & | crc_validated, | ||
int * | mib_bits, | ||
int | pci | ||
) |
Decode broadcast channel
3GPP standard: TS 38.212 V15.2.0 Section 7.1
Details:
[in] | bch_bits | Input bits sequence |
[out] | crc_validated | Indicator for CRC validation |
[out] | mib_bits | Output MIB bits |
[in] | pci | Cell PCI |
Definition at line 936 of file transport_channel.cpp.
void free5GRAN::phy::transport_channel::decode_dci | ( | int * | dci_bits, |
int | E, | ||
int | K, | ||
int * | rnti, | ||
bool & | validated, | ||
int * | decoded_dci_bits | ||
) |
DCI decoding
3GPP standard: TS 38.212 V15.2.0 Section 7.3
Partial implementation: Only DCI Format 1_0 has been tested
Details:
[in] | dci_bits | Input bits sequence |
[in] | E | PDCCH payload size |
[in] | K | DCI payload size (including CRC) |
[in] | rnti | RNTI for identifying DCI Format |
[out] | validated | Indicator for CRC validation |
[out] | decoded_dci_bits | Output bits sequence |
Definition at line 1044 of file transport_channel.cpp.
vector< int > free5GRAN::phy::transport_channel::decode_dl_sch | ( | double * | dl_sch_bits, |
int | n_re, | ||
float | R, | ||
int | nrb, | ||
int | E, | ||
bool & | validated, | ||
free5GRAN::dci_1_0_si_rnti | dci_1_0_si_rnti | ||
) |
DL-SCH decoding
3GPP standard: TS 38.212 V15.2.0 Section 7.2
Partial implementation: Implemented for one code block (C=1)
Details:
[in] | dl_sch_bits | Input soft bits sequence |
[in] | n_re | Number of RE per PDSCH RB |
[in] | R | Code Rate |
[in] | nrb | Number of PDSCH allocated RB |
[in] | E | PDSCH output sequence length |
[out] | validated | CRC validation indicator |
[in] | dci_1_0_si_rnti | Input DCI Format 1_0 object |
Definition at line 1112 of file transport_channel.cpp.
void free5GRAN::phy::transport_channel::ldpc_decode | ( | double * | input_bits, |
int | N, | ||
int | Zc, | ||
int | graph, | ||
int | K, | ||
int | i_ls, | ||
int * | output_sequence | ||
) |
Compute H matrix for LDPC using Belief propagation algorithm
3GPP standard: TS 38.212 V15.2.0 Section 5.3.2
Details:
[in] | input_bits | Input soft bits sequence |
[in] | N | LDPC input bit sequence length |
[in] | Zc | LDPC lifting size |
[in] | graph | LDPC base graph |
[in] | K | Code block length |
[in] | i_ls | Zc set index |
[out] | output_sequence | Corrected output bits sequence |
Definition at line 821 of file transport_channel.cpp.
void free5GRAN::phy::transport_channel::ldpc_decode_one_bit | ( | vector< vector< int >> | R, |
double * | soft_bits, | ||
int | i, | ||
double & | new_bit | ||
) |
LDPC correct one bit value (using belief propagation algorithm)
[in] | R | Input set of rows connected to bit i |
[in] | soft_bits | Input soft bits |
[in] | i | Bit index |
[out] | new_bit | New bit value |
Definition at line 735 of file transport_channel.cpp.
void free5GRAN::phy::transport_channel::polar_decode | ( | int * | input_bits, |
int * | output_bits, | ||
int | N, | ||
int | K, | ||
int | nmax, | ||
int | i_il, | ||
int | n_pc, | ||
int | n_wm_pc, | ||
int | E | ||
) |
Polar decoding
3GPP standard: TS 38.212 V15.2.0 Section 5.3.1
Partial implementation: Only n_wm_pc=0 is implemented
Details:
[in] | input_bits | Input bits sequence |
[out] | output_bits | Output bits sequence |
[in] | N | Rate matching input sequence length |
[in] | K | Polar coding input sequence length (including CRC) |
[in] | nmax | Maximum value of n |
[in] | i_il | Interleaving indicator (0: No interleaving, 1: Interleaving) |
[in] | n_pc | Number of parity check bits |
[in] | n_wm_pc | Number of other parity check bits |
Definition at line 125 of file transport_channel.cpp.
void free5GRAN::phy::transport_channel::rate_recover | ( | int * | input_bits, |
int * | output_bits, | ||
int | i_bil, | ||
int | E, | ||
int | N, | ||
int | K | ||
) |
Rate recovering for polar coding.
3GPP standard: TS 38.212 V15.2.0 Section 5.4.1
Partial implementation: Code block de-interleaving not implemented
[in] | input_bits | Input bits sequence |
[out] | output_bits | Output bits sequence |
[in] | i_bil | Coded blocks interleaving indicator (0: No interleaving, 1: Interleaving) |
[in] | E | Rate matching output sequence length |
[in] | N | Rate matching input sequence length |
Definition at line 74 of file transport_channel.cpp.
void free5GRAN::phy::transport_channel::rate_recover_ldpc | ( | int * | input_bits, |
int | N, | ||
int | i_lbrm, | ||
int | E, | ||
int | id_rv, | ||
int | mod_order, | ||
int | C, | ||
int | Zc, | ||
int | graph, | ||
int | K, | ||
int | K_p, | ||
int * | output_sequence | ||
) |
Rate recovering for LDPC (hard bits)
3GPP standard: TS 38.212 V15.2.0 Section 5.4.2
[in] | input_bits | DL-SCH input bits |
[in] | N | Output sequence length |
[in] | i_lbrm | Indicator for N_cb computation |
[in] | E | DL-SCH input sequence length |
[in] | id_rv | Redundancy version |
[in] | mod_order | Modulation order |
[in] | C | Number of code blocks |
[in] | Zc | LDPC lifting size |
[in] | graph | LDPC base graph |
[in] | K | Code block length |
[in] | K_p | K' code block intermediate length |
[out] | output_sequence | Output bits |
Definition at line 592 of file transport_channel.cpp.
void free5GRAN::phy::transport_channel::rate_recover_ldpc | ( | double * | input_bits, |
int | N, | ||
int | i_lbrm, | ||
int | E, | ||
int | id_rv, | ||
int | mod_order, | ||
int | C, | ||
int | Zc, | ||
int | graph, | ||
int | K, | ||
int | K_p, | ||
double * | output_sequence | ||
) |
Rate recovering for LDPC (soft bits)
3GPP standard: TS 38.212 V15.2.0 Section 5.4.2
[in] | input_bits | DL-SCH input soft bits |
[in] | N | Output sequence length |
[in] | i_lbrm | Indicator for N_cb computation |
[in] | E | DL-SCH input sequence length |
[in] | id_rv | Redundancy version |
[in] | mod_order | Modulation order |
[in] | C | Number of code blocks |
[in] | Zc | LDPC lifting size |
[in] | graph | LDPC base graph |
[in] | K | Code block length |
[in] | K_p | K' code block intermediate length |
[out] | output_sequence | Output soft bits |
Definition at line 653 of file transport_channel.cpp.