remove unnecessary gNB header dependence in coding files

This commit is contained in:
francescomani
2026-02-26 11:00:37 +01:00
committed by Robert Schmidt
parent db2bcf0eee
commit 4447d67650
11 changed files with 25 additions and 34 deletions
+13
View File
@@ -29,6 +29,7 @@
#include <stdint.h>
#include <stdbool.h>
#include "common/utils/nr/nr_common.h"
#define CRC24_A 0
#define CRC24_B 1
@@ -38,6 +39,18 @@
#define MAX_TURBO_ITERATIONS_MBSFN 8
#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
typedef struct {
+2
View File
@@ -19,6 +19,8 @@
* contact@openairinterface.org
*/
#include "openair1/PHY/defs_common.h"
extern decoder_if_t *decoder16;
extern decoder_if_t *decoder8;
extern encoder_if_t *encoder;
@@ -9,6 +9,9 @@
#include <common/utils/LOG/log.h>
#define NR_LDPC_ENABLE_PARITY_CHECK
#include "PHY/CODING/nrLDPC_decoder/nrLDPCdecoder_defs.h"
#include "PHY/CODING/coding_defs.h"
#include <stdint.h>
#include <getopt.h>
#include <inttypes.h>
@@ -23,7 +23,9 @@
* \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__
#define __NRLDPC_CODING_INTERFACE__H__
@@ -25,17 +25,11 @@
// [from gNB coding]
#include "nr_rate_matching.h"
#include "PHY/defs_gNB.h"
#include "PHY/CODING/coding_extern.h"
#include "PHY/CODING/coding_defs.h"
#include "PHY/CODING/lte_interleaver_inline.h"
#include "PHY/CODING/nrLDPC_coding/nrLDPC_coding_interface.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 "common/utils/LOG/log.h"
@@ -24,16 +24,11 @@
*/
#include "nr_rate_matching.h"
#include "PHY/defs_gNB.h"
#include "PHY/CODING/coding_extern.h"
#include "PHY/CODING/coding_defs.h"
#include "PHY/CODING/lte_interleaver_inline.h"
#include "PHY/CODING/nrLDPC_coding/nrLDPC_coding_interface.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/nr/nr_common.h"
#include <openair2/UTIL/OPT/opt.h>
@@ -33,12 +33,6 @@
#include "PHY/CODING/lte_interleaver_inline.h"
#include "PHY/CODING/nrLDPC_coding/nrLDPC_coding_xdma/nrLDPC_coding_xdma_offload.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 "defs.h"
// #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 */
#define NR_LDPC_MAX_NUM_CB 144
/* LDPC maximum code block size - maximum E */
#define LDPC_MAX_CB_SIZE 32768
// ==============================================================================
// GLOBAL CONSTANT VARIABLES
-2
View File
@@ -21,8 +21,6 @@
#ifndef _NRLDPC_EXTERN_H__
#define _NRLDPC_EXTERN_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*/
typedef struct ldpc_interface_s {
LDPC_initfunc_t *LDPCinit;
@@ -32,7 +32,7 @@
#include "nr_polar_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)
static t_nrPolar_params *PolarList = NULL;
-13
View File
@@ -159,19 +159,6 @@ typedef struct {
//////////////////////////////////////////////////////////////
} 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 {
uint32_t frame;
uint32_t slot;