mirror of https://github.com/pvnis/srsRAN_4G.git
You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
68 lines
2.4 KiB
C
68 lines
2.4 KiB
C
4 years ago
|
/**
|
||
4 years ago
|
*
|
||
4 years ago
|
* \section COPYRIGHT
|
||
4 years ago
|
*
|
||
4 years ago
|
* Copyright 2013-2021 Software Radio Systems Limited
|
||
4 years ago
|
*
|
||
4 years ago
|
* By using this file, you agree to the terms and conditions set
|
||
|
* forth in the LICENSE file which can be found at the top level of
|
||
|
* the distribution.
|
||
4 years ago
|
*
|
||
|
*/
|
||
|
|
||
|
/*!
|
||
|
* \file polar_chanalloc.h
|
||
|
* \brief Declaration of the subchannel allocation block.
|
||
4 years ago
|
* \author Jesus Gomez
|
||
4 years ago
|
* \date 2020
|
||
|
*
|
||
|
* \copyright Software Radio Systems Limited
|
||
|
*
|
||
|
*
|
||
|
*/
|
||
|
|
||
4 years ago
|
#ifndef SRSRAN_CHANALLOC_H
|
||
|
#define SRSRAN_CHANALLOC_H
|
||
4 years ago
|
|
||
4 years ago
|
#include "srsran/config.h"
|
||
4 years ago
|
#include "stdint.h"
|
||
|
|
||
|
/*!
|
||
|
* Allocates message bits (data + CRC) to the encoder input bit vector at the
|
||
|
* positions specified in \a K_set\\PC_set, computes and allocates the PC bits and
|
||
|
* zeros to the remaining positions.
|
||
|
* \param[in] message A pointer to the vector with the message bits (data and CRC).
|
||
|
* \param[out] input_encoder A pointer to the encoder input bit vector.
|
||
|
* \param[in] N The codeword length.
|
||
|
* \param[in] K Number of data + CRC bits.
|
||
|
* \param[in] nPC Number of parity check (PC) bits.
|
||
|
* \param[in] K_set Pointer to the indices of the encoder input vector containing.
|
||
|
* \param[in] PC_set Pointer to the indices of the parity check bits.
|
||
|
*/
|
||
4 years ago
|
void srsran_polar_chanalloc_tx(const uint8_t* message,
|
||
4 years ago
|
uint8_t* input_encoder,
|
||
|
const uint16_t N,
|
||
|
const uint16_t K,
|
||
|
const uint8_t nPC,
|
||
|
const uint16_t* K_set,
|
||
|
const uint16_t* PC_set);
|
||
|
|
||
|
/*!
|
||
|
* Extracts message bits (data + CRC) from the decoder output vector
|
||
|
* according to the positions specified in \a K_set\\PC_set.
|
||
|
* \param[in] output_decoder A pointer to the decoder output bit vector.
|
||
|
* \param[out] message A pointer to the vector with the message bits (data and CRC).
|
||
|
* \param[in] K Number of data + CRC bits.
|
||
|
* \param[in] nPC Number of parity check (PC) bits.
|
||
|
* \param[in] K_set Pointer to the indices of the encoder input vector containing.
|
||
|
* \param[in] PC_set Pointer to the indices of the parity check bits.
|
||
|
*/
|
||
4 years ago
|
void srsran_polar_chanalloc_rx(const uint8_t* output_decoder,
|
||
4 years ago
|
uint8_t* message,
|
||
|
const uint16_t K,
|
||
|
const uint8_t nPC,
|
||
|
const uint16_t* K_set,
|
||
|
const uint16_t* PC_set);
|
||
|
|
||
4 years ago
|
#endif // SRSRAN_CHANALLOC_H
|