remove unnecessary gNB header dependence in coding files
This commit is contained in:
@@ -29,6 +29,7 @@
|
|||||||
|
|
||||||
#include <stdint.h>
|
#include <stdint.h>
|
||||||
#include <stdbool.h>
|
#include <stdbool.h>
|
||||||
|
#include "common/utils/nr/nr_common.h"
|
||||||
|
|
||||||
#define CRC24_A 0
|
#define CRC24_A 0
|
||||||
#define CRC24_B 1
|
#define CRC24_B 1
|
||||||
@@ -38,6 +39,18 @@
|
|||||||
#define MAX_TURBO_ITERATIONS_MBSFN 8
|
#define MAX_TURBO_ITERATIONS_MBSFN 8
|
||||||
#define MAX_TURBO_ITERATIONS max_turbo_iterations
|
#define MAX_TURBO_ITERATIONS max_turbo_iterations
|
||||||
|
|
||||||
|
static inline int lenWithCrc(int nbSeg, int len)
|
||||||
|
{
|
||||||
|
if (nbSeg > 1)
|
||||||
|
return (len + 24 + 24 * nbSeg) / nbSeg;
|
||||||
|
return len + (len > NR_MAX_PDSCH_TBS ? 24 : 16);
|
||||||
|
}
|
||||||
|
static inline int crcType(int nbSeg, int len)
|
||||||
|
{
|
||||||
|
if (nbSeg > 1)
|
||||||
|
return CRC24_B;
|
||||||
|
return len > NR_MAX_PDSCH_TBS ? CRC24_A : CRC16;
|
||||||
|
}
|
||||||
|
|
||||||
#define LTE_NULL 2
|
#define LTE_NULL 2
|
||||||
typedef struct {
|
typedef struct {
|
||||||
|
|||||||
@@ -19,6 +19,8 @@
|
|||||||
* contact@openairinterface.org
|
* contact@openairinterface.org
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
#include "openair1/PHY/defs_common.h"
|
||||||
|
|
||||||
extern decoder_if_t *decoder16;
|
extern decoder_if_t *decoder16;
|
||||||
extern decoder_if_t *decoder8;
|
extern decoder_if_t *decoder8;
|
||||||
extern encoder_if_t *encoder;
|
extern encoder_if_t *encoder;
|
||||||
|
|||||||
@@ -9,6 +9,9 @@
|
|||||||
#include <common/utils/LOG/log.h>
|
#include <common/utils/LOG/log.h>
|
||||||
#define NR_LDPC_ENABLE_PARITY_CHECK
|
#define NR_LDPC_ENABLE_PARITY_CHECK
|
||||||
|
|
||||||
|
#include "PHY/CODING/nrLDPC_decoder/nrLDPCdecoder_defs.h"
|
||||||
|
#include "PHY/CODING/coding_defs.h"
|
||||||
|
|
||||||
#include <stdint.h>
|
#include <stdint.h>
|
||||||
#include <getopt.h>
|
#include <getopt.h>
|
||||||
#include <inttypes.h>
|
#include <inttypes.h>
|
||||||
|
|||||||
@@ -23,7 +23,9 @@
|
|||||||
* \brief interface for libraries implementing coding/decoding algorithms
|
* \brief interface for libraries implementing coding/decoding algorithms
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include "PHY/defs_gNB.h"
|
#include "common/utils/time_meas.h"
|
||||||
|
#include "openair1/PHY/defs_common.h"
|
||||||
|
#include "common/utils/threadPool/thread-pool.h"
|
||||||
|
|
||||||
#ifndef __NRLDPC_CODING_INTERFACE__H__
|
#ifndef __NRLDPC_CODING_INTERFACE__H__
|
||||||
#define __NRLDPC_CODING_INTERFACE__H__
|
#define __NRLDPC_CODING_INTERFACE__H__
|
||||||
|
|||||||
-6
@@ -25,17 +25,11 @@
|
|||||||
|
|
||||||
// [from gNB coding]
|
// [from gNB coding]
|
||||||
#include "nr_rate_matching.h"
|
#include "nr_rate_matching.h"
|
||||||
#include "PHY/defs_gNB.h"
|
|
||||||
#include "PHY/CODING/coding_extern.h"
|
#include "PHY/CODING/coding_extern.h"
|
||||||
#include "PHY/CODING/coding_defs.h"
|
#include "PHY/CODING/coding_defs.h"
|
||||||
#include "PHY/CODING/lte_interleaver_inline.h"
|
#include "PHY/CODING/lte_interleaver_inline.h"
|
||||||
#include "PHY/CODING/nrLDPC_coding/nrLDPC_coding_interface.h"
|
#include "PHY/CODING/nrLDPC_coding/nrLDPC_coding_interface.h"
|
||||||
#include "PHY/CODING/nrLDPC_extern.h"
|
#include "PHY/CODING/nrLDPC_extern.h"
|
||||||
#include "PHY/NR_TRANSPORT/nr_transport_common_proto.h"
|
|
||||||
#include "PHY/NR_TRANSPORT/nr_transport_proto.h"
|
|
||||||
#include "PHY/NR_TRANSPORT/nr_ulsch.h"
|
|
||||||
#include "PHY/NR_TRANSPORT/nr_dlsch.h"
|
|
||||||
#include "SCHED_NR/sched_nr.h"
|
|
||||||
#include "defs.h"
|
#include "defs.h"
|
||||||
#include "common/utils/LOG/log.h"
|
#include "common/utils/LOG/log.h"
|
||||||
|
|
||||||
|
|||||||
-5
@@ -24,16 +24,11 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
#include "nr_rate_matching.h"
|
#include "nr_rate_matching.h"
|
||||||
#include "PHY/defs_gNB.h"
|
|
||||||
#include "PHY/CODING/coding_extern.h"
|
#include "PHY/CODING/coding_extern.h"
|
||||||
#include "PHY/CODING/coding_defs.h"
|
#include "PHY/CODING/coding_defs.h"
|
||||||
#include "PHY/CODING/lte_interleaver_inline.h"
|
#include "PHY/CODING/lte_interleaver_inline.h"
|
||||||
#include "PHY/CODING/nrLDPC_coding/nrLDPC_coding_interface.h"
|
#include "PHY/CODING/nrLDPC_coding/nrLDPC_coding_interface.h"
|
||||||
#include "PHY/CODING/nrLDPC_extern.h"
|
#include "PHY/CODING/nrLDPC_extern.h"
|
||||||
#include "PHY/NR_TRANSPORT/nr_transport_proto.h"
|
|
||||||
#include "PHY/NR_TRANSPORT/nr_transport_common_proto.h"
|
|
||||||
#include "PHY/NR_TRANSPORT/nr_dlsch.h"
|
|
||||||
#include "SCHED_NR/sched_nr.h"
|
|
||||||
#include "common/utils/LOG/log.h"
|
#include "common/utils/LOG/log.h"
|
||||||
#include "common/utils/nr/nr_common.h"
|
#include "common/utils/nr/nr_common.h"
|
||||||
#include <openair2/UTIL/OPT/opt.h>
|
#include <openair2/UTIL/OPT/opt.h>
|
||||||
|
|||||||
@@ -33,12 +33,6 @@
|
|||||||
#include "PHY/CODING/lte_interleaver_inline.h"
|
#include "PHY/CODING/lte_interleaver_inline.h"
|
||||||
#include "PHY/CODING/nrLDPC_coding/nrLDPC_coding_xdma/nrLDPC_coding_xdma_offload.h"
|
#include "PHY/CODING/nrLDPC_coding/nrLDPC_coding_xdma/nrLDPC_coding_xdma_offload.h"
|
||||||
#include "PHY/CODING/nrLDPC_extern.h"
|
#include "PHY/CODING/nrLDPC_extern.h"
|
||||||
#include "PHY/NR_TRANSPORT/nr_dlsch.h"
|
|
||||||
#include "PHY/NR_TRANSPORT/nr_transport_common_proto.h"
|
|
||||||
#include "PHY/NR_TRANSPORT/nr_transport_proto.h"
|
|
||||||
#include "PHY/NR_TRANSPORT/nr_ulsch.h"
|
|
||||||
#include "PHY/defs_gNB.h"
|
|
||||||
#include "SCHED_NR/sched_nr.h"
|
|
||||||
#include "common/utils/LOG/log.h"
|
#include "common/utils/LOG/log.h"
|
||||||
#include "defs.h"
|
#include "defs.h"
|
||||||
// #define DEBUG_ULSCH_DECODING
|
// #define DEBUG_ULSCH_DECODING
|
||||||
|
|||||||
@@ -99,6 +99,9 @@
|
|||||||
/** Maximum number of segments per TB = MAX_NUM_NR_DLSCH_SEGMENTS_PER_LAYER*NR_MAX_NB_LAYERS */
|
/** Maximum number of segments per TB = MAX_NUM_NR_DLSCH_SEGMENTS_PER_LAYER*NR_MAX_NB_LAYERS */
|
||||||
#define NR_LDPC_MAX_NUM_CB 144
|
#define NR_LDPC_MAX_NUM_CB 144
|
||||||
|
|
||||||
|
/* LDPC maximum code block size - maximum E */
|
||||||
|
#define LDPC_MAX_CB_SIZE 32768
|
||||||
|
|
||||||
// ==============================================================================
|
// ==============================================================================
|
||||||
// GLOBAL CONSTANT VARIABLES
|
// GLOBAL CONSTANT VARIABLES
|
||||||
|
|
||||||
|
|||||||
@@ -21,8 +21,6 @@
|
|||||||
#ifndef _NRLDPC_EXTERN_H__
|
#ifndef _NRLDPC_EXTERN_H__
|
||||||
#define _NRLDPC_EXTERN_H__
|
#define _NRLDPC_EXTERN_H__
|
||||||
#include "openair1/PHY/CODING/nrLDPC_defs.h"
|
#include "openair1/PHY/CODING/nrLDPC_defs.h"
|
||||||
/* LDPC maximum code block size - maximum E */
|
|
||||||
#define LDPC_MAX_CB_SIZE 32768
|
|
||||||
/* ldpc coder/decoder API*/
|
/* ldpc coder/decoder API*/
|
||||||
typedef struct ldpc_interface_s {
|
typedef struct ldpc_interface_s {
|
||||||
LDPC_initfunc_t *LDPCinit;
|
LDPC_initfunc_t *LDPCinit;
|
||||||
|
|||||||
@@ -32,7 +32,7 @@
|
|||||||
|
|
||||||
#include "nr_polar_defs.h"
|
#include "nr_polar_defs.h"
|
||||||
#include "nr_polar_psbch_defs.h"
|
#include "nr_polar_psbch_defs.h"
|
||||||
#include "PHY/NR_TRANSPORT/nr_dci.h"
|
#include "common/utils/LOG/log.h"
|
||||||
|
|
||||||
#define PolarKey ((messageType << 24) | (messageLength << 8) | aggregation_level)
|
#define PolarKey ((messageType << 24) | (messageLength << 8) | aggregation_level)
|
||||||
static t_nrPolar_params *PolarList = NULL;
|
static t_nrPolar_params *PolarList = NULL;
|
||||||
|
|||||||
@@ -159,19 +159,6 @@ typedef struct {
|
|||||||
//////////////////////////////////////////////////////////////
|
//////////////////////////////////////////////////////////////
|
||||||
} NR_UL_gNB_HARQ_t;
|
} NR_UL_gNB_HARQ_t;
|
||||||
|
|
||||||
static inline int lenWithCrc(int nbSeg, int len)
|
|
||||||
{
|
|
||||||
if (nbSeg > 1)
|
|
||||||
return (len + 24 + 24 * nbSeg) / nbSeg;
|
|
||||||
return len + (len > NR_MAX_PDSCH_TBS ? 24 : 16);
|
|
||||||
}
|
|
||||||
static inline int crcType(int nbSeg, int len)
|
|
||||||
{
|
|
||||||
if (nbSeg > 1)
|
|
||||||
return CRC24_B;
|
|
||||||
return len > NR_MAX_PDSCH_TBS ? CRC24_A : CRC16;
|
|
||||||
}
|
|
||||||
|
|
||||||
typedef struct {
|
typedef struct {
|
||||||
uint32_t frame;
|
uint32_t frame;
|
||||||
uint32_t slot;
|
uint32_t slot;
|
||||||
|
|||||||
Reference in New Issue
Block a user