Merge remote-tracking branch 'origin/compil_improv' into integration_2026_w09 (!3953)

Improvements in compilation dependence

Once more I ended up in a long trip inside OAI intricate compilation
This commit is contained in:
Robert Schmidt
2026-02-26 11:01:24 +01:00
50 changed files with 131 additions and 186 deletions
-1
View File
@@ -2046,7 +2046,6 @@ INPUT = \
@CMAKE_CURRENT_SOURCE_DIR@/../openair1/PHY/NR_REFSIG/ul_ref_seq_nr.c \
@CMAKE_CURRENT_SOURCE_DIR@/../openair1/PHY/NR_REFSIG/sss_nr.h \
@CMAKE_CURRENT_SOURCE_DIR@/../openair1/PHY/NR_REFSIG/dmrs_nr.c \
@CMAKE_CURRENT_SOURCE_DIR@/../openair1/PHY/NR_REFSIG/refsig_defs_ue.h \
@CMAKE_CURRENT_SOURCE_DIR@/../openair1/PHY/NR_REFSIG/ptrs_nr.h \
@CMAKE_CURRENT_SOURCE_DIR@/../openair1/PHY/NR_REFSIG/nr_refsig.h \
@CMAKE_CURRENT_SOURCE_DIR@/../openair1/PHY/NR_REFSIG/dmrs_nr.h \
+1 -2
View File
@@ -51,7 +51,6 @@
#include "PHY/NR_TRANSPORT/nr_transport_proto.h"
#include "PHY/TOOLS/tools_defs.h"
#include "PHY/defs_RU.h"
#include "PHY/defs_common.h"
#include "PHY/defs_gNB.h"
#include "PHY/defs_nr_common.h"
#include "PHY/impl_defs_nr.h"
@@ -200,7 +199,7 @@ static void rx_func(processingData_L1_t *info)
int soffset = (slot_rx % RU_RX_SLOT_DEPTH) * gNB->frame_parms.symbols_per_slot * gNB->frame_parms.ofdm_symbol_size;
for (int bb = 0; bb < gNB->common_vars.num_beams_period; bb++) {
for (int aa = 0; aa < gNB->frame_parms.nb_antennas_rx; aa++) {
const uint max_symb = (gNB->frame_parms.Ncp == EXTENDED) ? 12 : 14;
const uint max_symb = (gNB->frame_parms.Ncp == NR_EXTENDED) ? 12 : 14;
for (int sym = 0; sym < max_symb; sym++)
apply_nr_rotation_symbol_RX(&gNB->frame_parms,
gNB->common_vars.rxdataF[bb][aa] + soffset + sym * gNB->frame_parms.ofdm_symbol_size,
+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;
@@ -21,7 +21,7 @@ if (ENABLE_LDPC_AAL)
set_target_properties(ldpc_aal PROPERTIES COMPILE_FLAGS "-DALLOW_EXPERIMENTAL_API")
set_target_properties(ldpc_aal PROPERTIES LIBRARY_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR})
target_include_directories(ldpc_aal PRIVATE ${LIBDPDK_AAL_INCLUDE_DIRS})
target_link_libraries(ldpc_aal PRIVATE ldpc_gen_HEADERS ${LIBDPDK_AAL_LDFLAGS})
target_link_libraries(ldpc_aal PRIVATE log_headers ldpc_gen_HEADERS ${LIBDPDK_AAL_LDFLAGS})
if (PMD_T2)
target_link_libraries(ldpc_aal PRIVATE ${PMD_T2})
endif()
@@ -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,10 @@
// [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,10 @@
*/
#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>
@@ -30,15 +30,8 @@
#include <nr_rate_matching.h>
#include "PHY/CODING/coding_defs.h"
#include "PHY/CODING/coding_extern.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_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;
+2 -1
View File
@@ -19,12 +19,13 @@
* contact@openairinterface.org
*/
#include "phy_init.h"
#include "PHY/phy_extern.h"
#include "SCHED/sched_common.h"
#include "assertions.h"
#include <math.h>
#include "openair1/PHY/defs_RU.h"
#include "openair1/PHY/defs_nr_common.h"
#include "openair1/PHY/defs_gNB.h"
void nr_phy_init_RU(RU_t *ru)
{
+1 -1
View File
@@ -28,7 +28,7 @@
#include "PHY/NR_UE_TRANSPORT/nr_transport_proto_ue.h"
#include "PHY/NR_REFSIG/pss_nr.h"
#include "PHY/NR_REFSIG/ul_ref_seq_nr.h"
#include "PHY/NR_REFSIG/refsig_defs_ue.h"
#include "PHY/NR_REFSIG/sl_refsig_defs.h"
#include "PHY/NR_REFSIG/nr_refsig.h"
#include "PHY/NR_REFSIG/nr_mod_table.h"
#include "openair2/COMMON/prs_nr_paramdef.h"
+7 -7
View File
@@ -321,7 +321,7 @@ void nr_init_frame_parms(nfapi_nr_config_request_scf_t* cfg, NR_DL_FRAME_PARMS *
fp->nb_antennas_rx = cfg->carrier_config.num_rx_ant.value; // It denotes the number of rx antennas at gNB
fp->nb_antennas_tx = cfg->carrier_config.num_tx_ant.value; // It corresponds to pdsch_AntennaPorts (logical antenna ports)
fp->symbols_per_slot = ((Ncp == NORMAL)? 14 : 12); // to redefine for different slot formats
fp->symbols_per_slot = ((Ncp == NR_NORMAL)? 14 : 12); // to redefine for different slot formats
fp->samples_per_subframe_wCP = fp->ofdm_symbol_size * fp->symbols_per_slot * fp->slots_per_subframe;
fp->samples_per_frame_wCP = 10 * fp->samples_per_subframe_wCP;
fp->samples_per_slot_wCP = fp->symbols_per_slot*fp->ofdm_symbol_size;
@@ -353,7 +353,7 @@ int nr_init_frame_parms_ue(NR_DL_FRAME_PARMS *fp, fapi_nr_config_request_t* conf
uint8_t nb_ant_ports_gNB = 1;
uint8_t tdd_cfg = 3;
uint8_t Nid_cell = 0;
int Ncp = NORMAL;
int Ncp = NR_NORMAL;
if(fp->nb_antennas_rx == 0)
fp->nb_antennas_rx = 1;
@@ -408,7 +408,7 @@ int nr_init_frame_parms_ue(NR_DL_FRAME_PARMS *fp, fapi_nr_config_request_t* conf
set_scs_parameters(fp, fp->numerology_index, N_RB, config->ssb_table.ssb_case);
fp->slots_per_frame = 10* fp->slots_per_subframe;
fp->symbols_per_slot = ((Ncp == NORMAL)? 14 : 12); // to redefine for different slot formats
fp->symbols_per_slot = ((Ncp == NR_NORMAL)? 14 : 12); // to redefine for different slot formats
fp->samples_per_subframe_wCP = fp->ofdm_symbol_size * fp->symbols_per_slot * fp->slots_per_subframe;
fp->samples_per_frame_wCP = 10 * fp->samples_per_subframe_wCP;
fp->samples_per_slot_wCP = fp->symbols_per_slot*fp->ofdm_symbol_size;
@@ -468,12 +468,12 @@ void nr_init_frame_parms_ue_sa(NR_DL_FRAME_PARMS *frame_parms, const nrUE_cell_p
frame_parms->frame_type = get_frame_type(nr_band, frame_parms->numerology_index);
frame_parms->Ncp = NORMAL;
frame_parms->Ncp = NR_NORMAL;
set_scs_parameters(frame_parms, frame_parms->numerology_index, frame_parms->N_RB_DL, set_ssb_case(mu, nr_band));
set_Lmax(frame_parms);
frame_parms->slots_per_frame = 10* frame_parms->slots_per_subframe;
frame_parms->symbols_per_slot = ((frame_parms->Ncp == NORMAL)? 14 : 12); // to redefine for different slot formats
frame_parms->symbols_per_slot = ((frame_parms->Ncp == NR_NORMAL)? 14 : 12); // to redefine for different slot formats
frame_parms->samples_per_subframe_wCP = frame_parms->ofdm_symbol_size * frame_parms->symbols_per_slot * frame_parms->slots_per_subframe;
frame_parms->samples_per_frame_wCP = 10 * frame_parms->samples_per_subframe_wCP;
frame_parms->samples_per_slot_wCP = frame_parms->symbols_per_slot*frame_parms->ofdm_symbol_size;
@@ -565,7 +565,7 @@ int nr_init_frame_parms_ue_sl(NR_DL_FRAME_PARMS *fp,
LOG_I(PHY, "Initializing frame parms for mu %d, N_RB %d, Ncp %d\n", fp->numerology_index, fp->N_RB_DL, fp->Ncp);
if (fp->Ncp == EXTENDED)
if (fp->Ncp == NR_EXTENDED)
AssertFatal(fp->numerology_index == NR_MU_2,
"Invalid cyclic prefix %d for numerology index %d\n",
fp->Ncp,
@@ -574,7 +574,7 @@ int nr_init_frame_parms_ue_sl(NR_DL_FRAME_PARMS *fp,
sl_set_scs_parameters(fp, fp->numerology_index, fp->N_RB_SL);
fp->slots_per_frame = 10 * fp->slots_per_subframe;
fp->symbols_per_slot = ((fp->Ncp == NORMAL) ? 14 : 12); // to redefine for different slot formats
fp->symbols_per_slot = ((fp->Ncp == NR_NORMAL) ? 14 : 12); // to redefine for different slot formats
fp->samples_per_subframe_wCP = fp->ofdm_symbol_size * fp->symbols_per_slot * fp->slots_per_subframe;
fp->samples_per_frame_wCP = 10 * fp->samples_per_subframe_wCP;
fp->samples_per_slot_wCP = fp->symbols_per_slot * fp->ofdm_symbol_size;
-1
View File
@@ -24,7 +24,6 @@
#include "PHY/defs_eNB.h"
#include "PHY/defs_UE.h"
#include "PHY/defs_gNB.h"
#include "LTE_SystemInformationBlockType2.h"
//#include "RadioResourceConfigCommonSIB.h"
@@ -488,10 +488,9 @@ int nr_pusch_channel_estimation(PHY_VARS_gNB *gNB,
const int nb_rb_pusch = pusch_pdu->rb_size;
//------------------generate DMRS------------------//
NR_DL_FRAME_PARMS *fp = &gNB->frame_parms;
if (pusch_pdu->transform_precoding == transformPrecoder_disabled) {
// Note: pilot returned by the following function is already the complex conjugate of the transmitted DMRS
NR_DL_FRAME_PARMS *fp = &gNB->frame_parms;
const uint32_t *gold = nr_gold_pusch(fp->N_RB_UL,
fp->symbols_per_slot,
gNB->gNB_config.cell_config.phy_cell_id.value,
@@ -500,7 +499,7 @@ int nr_pusch_channel_estimation(PHY_VARS_gNB *gNB,
symbol);
float beta_dmrs_pusch = get_beta_dmrs(pusch_pdu->num_dmrs_cdm_grps_no_data, pusch_pdu->dmrs_config_type == pusch_dmrs_type2);
int16_t dmrs_scaling = (1 / beta_dmrs_pusch) * (1 << 14);
nr_pusch_dmrs_rx(gNB,
nr_pusch_dmrs_rx(fp->Ncp,
Ns,
gold,
pilot,
@@ -521,7 +520,7 @@ int nr_pusch_channel_estimation(PHY_VARS_gNB *gNB,
"Num RBs not configured according to 3GPP 38.211 section 6.3.1.4. For PUSCH with transform precoding, num RBs "
"cannot be multiple of any other primenumber other than 2,3,5\n");
AssertFatal(dmrs_seq != NULL, "DMRS low PAPR seq not found, check if DMRS sequences are generated");
nr_pusch_lowpaprtype1_dmrs_rx(gNB, Ns, dmrs_seq, pilot, 1000, 0, nb_rb_pusch, 0, pusch_pdu->dmrs_config_type);
nr_pusch_lowpaprtype1_dmrs_rx(fp->Ncp, Ns, dmrs_seq, pilot, 1000, 0, nb_rb_pusch, 0, pusch_pdu->dmrs_config_type);
#ifdef DEBUG_PUSCH
printf("NR_UL_CHANNEL_EST: index %d, u %d,v %d\n", index, u, v);
LOG_M("gNb_DMRS_SEQ.m", "gNb_DMRS_SEQ", dmrs_seq, 6 * nb_rb_pusch, 1, 1);
@@ -556,7 +555,7 @@ int nr_pusch_channel_estimation(PHY_VARS_gNB *gNB,
delay_t *delay = &gNB->ulsch[ul_id].delay;
memset(delay, 0, sizeof(*delay));
int nb_antennas_rx = gNB->frame_parms.nb_antennas_rx;
int nb_antennas_rx = fp->nb_antennas_rx;
delay_t delay_arr[nb_antennas_rx];
uint64_t noise_amp2_arr[nb_antennas_rx];
int max_ch_arr[nb_antennas_rx];
@@ -573,7 +572,7 @@ int nr_pusch_channel_estimation(PHY_VARS_gNB *gNB,
initNotifiedFIFO(&respPuschAarx);
start_meas(&gNB->pusch_channel_estimation_antenna_processing_stats);
int numAntennas = gNB->dmrs_num_antennas_per_thread;
int num_jobs = CEILIDIV(gNB->frame_parms.nb_antennas_rx, numAntennas);
int num_jobs = CEILIDIV(fp->nb_antennas_rx, numAntennas);
puschAntennaProc_t rdatas[num_jobs];
memset(rdatas, 0, sizeof(rdatas));
task_ans_t ans;
@@ -597,7 +596,7 @@ int nr_pusch_channel_estimation(PHY_VARS_gNB *gNB,
rdata->noise_amp2 = &noise_amp2_arr[rdata->aarx];
rdata->delay = &delay_arr[rdata->aarx];
rdata->beam_nb = beam_nb;
rdata->frame_parms = &gNB->frame_parms;
rdata->frame_parms = fp;
rdata->pusch_vars = &gNB->pusch_vars[ul_id];
rdata->chest_freq = gNB->chest_freq;
rdata->rxdataF = gNB->common_vars.rxdataF;
@@ -617,14 +616,14 @@ int nr_pusch_channel_estimation(PHY_VARS_gNB *gNB,
join_task_ans(&ans);
stop_meas(&gNB->pusch_channel_estimation_antenna_processing_stats);
for (int aarx = 0; aarx < gNB->frame_parms.nb_antennas_rx; aarx++) {
for (int aarx = 0; aarx < fp->nb_antennas_rx; aarx++) {
*max_ch = max(*max_ch, max_ch_arr[aarx]);
noise_amp2 += noise_amp2_arr[aarx];
nest_count += nest_count_arr[aarx];
}
// get the maximum delay
*delay = delay_arr[0];
for (int aarx = 1; aarx < gNB->frame_parms.nb_antennas_rx; aarx++) {
for (int aarx = 1; aarx < fp->nb_antennas_rx; aarx++) {
if (delay_arr[aarx].est_delay >= delay->est_delay) {
*delay = delay_arr[aarx];
}
+6 -9
View File
@@ -35,10 +35,7 @@
//#define DEBUG_PUSCH
#include "PHY/TOOLS/tools_defs.h"
#include "refsig_defs_ue.h"
#include "PHY/defs_nr_UE.h"
#include "nr_refsig.h"
#include "PHY/defs_gNB.h"
#include "nfapi/open-nFAPI/nfapi/public_inc/nfapi_nr_interface.h"
// Table 6.4.1.1.3-1/2 from TS 38.211
@@ -66,7 +63,7 @@ static inline c16_t get_modulated(const uint32_t *gold_sequence, const int idx_g
return (c16_t){-val.r, -val.i};
}
int nr_pusch_dmrs_rx(PHY_VARS_gNB *gNB,
int nr_pusch_dmrs_rx(nr_prefix_type_t Ncp,
unsigned int Ns,
const uint32_t *nr_gold_pusch,
c16_t *output,
@@ -88,7 +85,7 @@ int nr_pusch_dmrs_rx(PHY_VARS_gNB *gNB,
const int nb_dmrs = dmrs_type == pusch_dmrs_type1 ? 6 : 4;
if ((p>=1000) && (p<((dmrs_type==pusch_dmrs_type1) ? 1008 : 1012))) {
if (gNB->frame_parms.Ncp == NORMAL) {
if (Ncp == NR_NORMAL) {
for (int k = 0; k < nb_pusch_rb * nb_dmrs; k++) {
int i = k + dmrs_offset;
int w = (wf[p - 1000][i & 1]) * (wt[p - 1000][lp]);
@@ -110,7 +107,7 @@ int nr_pusch_dmrs_rx(PHY_VARS_gNB *gNB,
return(0);
}
int nr_pdsch_dmrs_rx(const PHY_VARS_NR_UE *ue,
int nr_pdsch_dmrs_rx(nr_prefix_type_t Ncp,
unsigned int Ns,
const unsigned int *nr_gold_pdsch,
c16_t *output,
@@ -128,7 +125,7 @@ int nr_pdsch_dmrs_rx(const PHY_VARS_NR_UE *ue,
LOG_E(PHY,"Bad PDSCH DMRS config type %d\n", config_type);
if ((p >= 1000) && (p < ((config_type == NFAPI_NR_DMRS_TYPE1) ? 1008 : 1012))) {
if (ue->frame_parms.Ncp == NORMAL) {
if (Ncp == NR_NORMAL) {
for (int i = 0; i < nb_pdsch_rb * ((config_type == NFAPI_NR_DMRS_TYPE1) ? 6 : 4); i++) {
int w = (wf[p - 1000][i & 1]) * (wt[p - 1000][lp]);
output[i] = get_modulated(nr_gold_pdsch, i, w == 1);
@@ -215,7 +212,7 @@ void nr_gen_ref_conj_symbols(const uint32_t *in, uint32_t length, c16_t *output,
}
}
int nr_pusch_lowpaprtype1_dmrs_rx(PHY_VARS_gNB *gNB,
int nr_pusch_lowpaprtype1_dmrs_rx(nr_prefix_type_t Ncp,
unsigned int Ns,
c16_t *dmrs_seq,
c16_t *output,
@@ -234,7 +231,7 @@ int nr_pusch_lowpaprtype1_dmrs_rx(PHY_VARS_gNB *gNB,
LOG_E(PHY,"PUSCH DMRS config type %d not valid\n", dmrs_type);
if ((p>=1000) && (p<1008)) {
if (gNB->frame_parms.Ncp == NORMAL) {
if (Ncp == NR_NORMAL) {
nb_dmrs = NR_NB_SC_PER_RB/2; // for DMRS TYPE 1 - 6 DMRS REs present per RB
for (int i=dmrs_offset; i<dmrs_offset+(nb_pusch_rb*nb_dmrs); i++) {
k = i-dmrs_offset;
+1 -1
View File
@@ -19,7 +19,7 @@
* contact@openairinterface.org
*/
#include "refsig_defs_ue.h"
#include "sl_refsig_defs.h"
#include "openair1/PHY/LTE_TRANSPORT/transport_proto.h" // for lte_gold_generic()
void sl_init_psbch_dmrs_gold_sequences(PHY_VARS_NR_UE *UE)
+31 -4
View File
@@ -24,11 +24,38 @@
#ifndef __NR_REFSIG__H__
#define __NR_REFSIG__H__
#include "PHY/defs_gNB.h"
#include "openair1/PHY/NR_REFSIG/nr_refsig_common.h"
#include "PHY/nr_phy_common/inc/nr_phy_common.h"
#include "PHY/defs_nr_common.h"
int nr_pusch_dmrs_rx(PHY_VARS_gNB *gNB,
uint32_t *gold_cache(uint32_t key, int length);
uint32_t *nr_gold_pbch(int Lmax, int Nid, int n_hf, int ssb);
uint32_t *nr_gold_pdcch(int N_RB_DL, int symbols_per_slot, unsigned short n_idDMRS, int ns, int l);
uint32_t *nr_gold_pdsch(int N_RB_DL, int symbols_per_slot, int nid, int nscid, int slot, int symbol);
uint32_t *nr_gold_pusch(int N_RB_UL, int symbols_per_slot, int Nid, int nscid, int slot, int symbol);
uint32_t *nr_gold_csi_rs(int N_RB_DL, int symbols_per_slot, int slot, int symb, uint32_t Nid);
uint32_t *nr_gold_prs(int nid, int slot, int symbol);
int nr_pdsch_dmrs_rx(nr_prefix_type_t Ncp,
unsigned int Ns,
const unsigned int *nr_gold_pdsch,
c16_t *output,
unsigned short p,
unsigned char lp,
unsigned short nb_pdsch_rb,
uint8_t config_type,
int16_t dmrs_scaling);
/*!\brief This function generates the NR Gold sequence (38-211, Sec 5.2.1) for the PBCH DMRS.
@param PHY_VARS_NR_UE* ue structure provides configuration, frame parameters and the pointers to the 32 bits sequence storage tables
*/
void nr_pbch_dmrs_rx(int dmrss, const unsigned int *nr_gold_pbch, c16_t *output, bool sidelink);
/*!\brief This function generates the NR Gold sequence (38-211, Sec 5.2.1) for the PDCCH DMRS.
@param PHY_VARS_NR_UE* ue structure provides configuration, frame parameters and the pointers to the 32 bits sequence storage tables
*/
void nr_pdcch_dmrs_ref(const unsigned int *nr_gold_pdcch, c16_t *output, unsigned short nb_rb_corset);
int nr_pusch_dmrs_rx(nr_prefix_type_t Ncp,
unsigned int Ns,
const uint32_t *nr_gold_pusch,
c16_t *output,
@@ -43,7 +70,7 @@ void nr_generate_modulation_table(void);
extern simde__m128i byte2m128i[256];
int nr_pusch_lowpaprtype1_dmrs_rx(PHY_VARS_gNB *gNB,
int nr_pusch_lowpaprtype1_dmrs_rx(nr_prefix_type_t Ncp,
unsigned int Ns,
c16_t *dmrs_seq,
c16_t *output,
-54
View File
@@ -1,54 +0,0 @@
/*
* Licensed to the OpenAirInterface (OAI) Software Alliance under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The OpenAirInterface Software Alliance licenses this file to You under
* the OAI Public License, Version 1.1 (the "License"); you may not use this file
* except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.openairinterface.org/?page_id=698
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*-------------------------------------------------------------------------------
* For more information about the OpenAirInterface (OAI) Software Alliance:
* contact@openairinterface.org
*/
/* Definitions for LTE Reference signals */
/* Author R. Knopp / EURECOM / OpenAirInterface.org */
#ifndef __NR_REFSIG_DEFS__H__
#define __NR_REFSIG_DEFS__H__
#include "PHY/defs_nr_UE.h"
#include "nr_refsig_common.h"
/*!\brief This function generates the NR Gold sequence (38-211, Sec 5.2.1) for the PBCH DMRS.
@param PHY_VARS_NR_UE* ue structure provides configuration, frame parameters and the pointers to the 32 bits sequence storage tables
*/
void nr_pbch_dmrs_rx(int dmrss, const unsigned int *nr_gold_pbch, c16_t *output, bool sidelink);
/*!\brief This function generates the NR Gold sequence (38-211, Sec 5.2.1) for the PDCCH DMRS.
@param PHY_VARS_NR_UE* ue structure provides configuration, frame parameters and the pointers to the 32 bits sequence storage tables
*/
void nr_pdcch_dmrs_ref(const unsigned int *nr_gold_pdcch, c16_t *output, unsigned short nb_rb_corset);
int nr_pdsch_dmrs_rx(const PHY_VARS_NR_UE *ue,
unsigned int Ns,
const unsigned int *nr_gold_pdsch,
c16_t *output,
unsigned short p,
unsigned char lp,
unsigned short nb_pdsch_rb,
uint8_t config_type,
int16_t dmrs_scaling);
void sl_generate_pss(SL_NR_UE_INIT_PARAMS_t *sl_init_params, uint8_t n_sl_id2, uint16_t scaling);
void sl_generate_pss_ifft_samples(sl_nr_ue_phy_params_t *sl_ue_params, SL_NR_UE_INIT_PARAMS_t *sl_init_params);
void sl_generate_sss(SL_NR_UE_INIT_PARAMS_t *sl_init_params, uint16_t slss_id, uint16_t scaling);
void sl_init_psbch_dmrs_gold_sequences(PHY_VARS_NR_UE *UE);
#endif
@@ -19,17 +19,15 @@
* contact@openairinterface.org
*/
/* Definitions for NR Reference signals */
/* Definitions for LTE Reference signals */
/* Author R. Knopp / EURECOM / OpenAirInterface.org */
#ifndef __NR_REFSIG_DEFS__H__
#define __NR_REFSIG_DEFS__H__
#ifndef __NR_REFSIG_COMMON_H__
#define __NR_REFSIG_COMMON_H__
uint32_t *gold_cache(uint32_t key, int length);
uint32_t *nr_gold_pbch(int Lmax, int Nid, int n_hf, int ssb);
uint32_t *nr_gold_pdcch(int N_RB_DL, int symbols_per_slot, unsigned short n_idDMRS, int ns, int l);
uint32_t *nr_gold_pdsch(int N_RB_DL, int symbols_per_slot, int nid, int nscid, int slot, int symbol);
uint32_t *nr_gold_pusch(int N_RB_UL, int symbols_per_slot, int Nid, int nscid, int slot, int symbol);
uint32_t *nr_gold_csi_rs(int N_RB_DL, int symbols_per_slot, int slot, int symb, uint32_t Nid);
uint32_t *nr_gold_prs(int nid, int slot, int symbol);
#include "PHY/defs_nr_UE.h"
void sl_generate_pss(SL_NR_UE_INIT_PARAMS_t *sl_init_params, uint8_t n_sl_id2, uint16_t scaling);
void sl_generate_pss_ifft_samples(sl_nr_ue_phy_params_t *sl_ue_params, SL_NR_UE_INIT_PARAMS_t *sl_init_params);
void sl_generate_sss(SL_NR_UE_INIT_PARAMS_t *sl_init_params, uint16_t slss_id, uint16_t scaling);
void sl_init_psbch_dmrs_gold_sequences(PHY_VARS_NR_UE *UE);
#endif
-2
View File
@@ -35,8 +35,6 @@
//#define DEBUG_FILL_DCI
#include "nr_dlsch.h"
int compfunc(const void *a, const void *b)
{
return (*(int *)a - *(int *)b);
@@ -26,7 +26,6 @@
#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"
+1 -1
View File
@@ -36,7 +36,7 @@
#include "PHY/sse_intrin.h"
#include "executables/softmodem-common.h"
#include "reverse_bits.h"
#include "openair1/PHY/NR_REFSIG/nr_refsig_common.h"
#include "openair1/PHY/NR_REFSIG/nr_refsig.h"
#include "openair1/PHY/NR_REFSIG/nr_mod_table.h"
#include "openair1/PHY/TOOLS/tools_defs.h"
@@ -31,7 +31,6 @@
*/
#include "PHY/sse_intrin.h"
#include "PHY/impl_defs_nr.h"
#include "PHY/defs_nr_UE.h"
#include "PHY/NR_TRANSPORT/nr_prach.h"
#include "PHY/NR_TRANSPORT/nr_transport_common_proto.h"
#include "common/utils/LOG/log.h"
+21 -2
View File
@@ -1,9 +1,28 @@
/*
* Licensed to the OpenAirInterface (OAI) Software Alliance under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The OpenAirInterface Software Alliance licenses this file to You under
* the OAI Public License, Version 1.1 (the "License"); you may not use this file
* except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.openairinterface.org/?page_id=698
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*-------------------------------------------------------------------------------
* For more information about the OpenAirInterface (OAI) Software Alliance:
* contact@openairinterface.org
*/
#include "PHY/defs_gNB.h"
#include "PHY/NR_TRANSPORT/nr_transport_proto.h"
#include "PHY/LTE_REFSIG/lte_refsig.h"
#include "PHY/NR_REFSIG/nr_refsig.h"
#include "PHY/sse_intrin.h"
#include "openair1/PHY/NR_REFSIG/refsig_defs_ue.h"
#include "openair1/PHY/NR_REFSIG/nr_mod_table.h"
//#define DEBUG_PRS_MOD
//#define DEBUG_PRS_MAP
@@ -32,7 +32,7 @@ void nr_idft(int32_t *z, uint32_t Msc_PUSCH)
int i, ip;
LOG_T(PHY,"Doing lte_idft for Msc_PUSCH %d\n",Msc_PUSCH);
LOG_T(PHY,"Doing nr_idft for Msc_PUSCH %d\n", Msc_PUSCH);
if ((Msc_PUSCH % 1536) > 0) {
// conjugate input
@@ -23,7 +23,6 @@
#include <string.h>
#include "SCHED_NR_UE/defs.h"
#include "nr_estimation.h"
#include "PHY/NR_REFSIG/refsig_defs_ue.h"
#include "PHY/NR_REFSIG/nr_refsig.h"
#include "PHY/NR_REFSIG/dmrs_nr.h"
#include "PHY/NR_REFSIG/ptrs_nr.h"
@@ -1296,7 +1295,7 @@ void nr_pdsch_channel_estimation(PHY_VARS_NR_UE *ue,
float beta_dmrs_pdsch = get_beta_dmrs(dlsch->n_dmrs_cdm_groups, config_type == NFAPI_NR_DMRS_TYPE2);
int16_t dmrs_scaling = (int16_t)((1 / beta_dmrs_pdsch) * (1 << 14));
const uint32_t *gold = nr_gold_pdsch(fp->N_RB_DL, fp->symbols_per_slot, dlsch->dlDmrsScramblingId, dlsch->nscid, slot, symbol);
nr_pdsch_dmrs_rx(ue, slot, gold, pilot, 1000 + p, 0, nb_rb_pdsch + rb_offset, config_type, dmrs_scaling);
nr_pdsch_dmrs_rx(fp->Ncp, slot, gold, pilot, 1000 + p, 0, nb_rb_pdsch + rb_offset, config_type, dmrs_scaling);
delay_t delay = {0};
-1
View File
@@ -1 +0,0 @@
UE NR transport/physical channel procedures are here
-1
View File
@@ -40,7 +40,6 @@
#include "PHY/sse_intrin.h"
#include "common/utils/nr/nr_common.h"
#include <openair1/PHY/TOOLS/phy_scope_interface.h>
#include "openair1/PHY/NR_REFSIG/refsig_defs_ue.h"
#include "PHY/NR_UE_ESTIMATION/nr_estimation.h"
#include "assertions.h"
@@ -32,12 +32,10 @@
#include "common/platform_constants.h"
#include "nr_phy_common.h"
#include "PHY/defs_nr_UE.h"
#include "PHY/phy_extern.h"
#include "nr_transport_proto_ue.h"
#include "PHY/sse_intrin.h"
#include "T.h"
#include "openair1/PHY/NR_UE_ESTIMATION/nr_estimation.h"
#include "openair1/PHY/NR_TRANSPORT/nr_dlsch.h"
#include "PHY/NR_REFSIG/nr_refsig.h"
#include "PHY/NR_REFSIG/dmrs_nr.h"
#include "common/utils/nr/nr_common.h"
@@ -42,7 +42,7 @@
#include "PHY/NR_REFSIG/pss_nr.h"
#include "PHY/NR_REFSIG/sss_nr.h"
#include "PHY/NR_REFSIG/refsig_defs_ue.h"
#include "PHY/NR_REFSIG/nr_refsig.h"
#include "PHY/TOOLS/tools_defs.h"
#include "nr-uesoftmodem.h"
+1 -1
View File
@@ -36,8 +36,8 @@
#include "openair1/SCHED_NR_UE/defs.h"
#include <openair1/PHY/NR_UE_TRANSPORT/nr_transport_proto_ue.h>
#include <openair1/PHY/TOOLS/phy_scope_interface.h>
#include "openair1/PHY/NR_REFSIG/nr_refsig_common.h"
#include "PHY/nr_phy_common/inc/nr_phy_common.h"
#include "openair1/PHY/NR_REFSIG/nr_refsig.h"
#include "reverse_bits.h"
#include "instrumentation.h"
//#define DEBUG_PBCH
@@ -20,7 +20,6 @@
*/
#include "PHY/defs_nr_UE.h"
#include "PHY/LTE_REFSIG/lte_refsig.h"
#include "PHY/NR_REFSIG/nr_mod_table.h"
#include "PHY/NR_UE_TRANSPORT/nr_transport_proto_ue.h"
#include "PHY/CODING/nrPolar_tools/nr_polar_psbch_defs.h"
@@ -26,7 +26,6 @@
#include "PHY/NR_UE_TRANSPORT/nr_transport_proto_ue.h"
#include "PHY/CODING/coding_defs.h"
#include "PHY/CODING/coding_extern.h"
#include "PHY/CODING/lte_interleaver_inline.h"
#include "PHY/CODING/nrLDPC_extern.h"
#include "PHY/CODING/nrLDPC_coding/nrLDPC_coding_interface.h"
#include "PHY/NR_UE_TRANSPORT/nr_transport_ue.h"
+1 -1
View File
@@ -32,7 +32,7 @@
#include <stdint.h>
#include "PHY/NR_REFSIG/dmrs_nr.h"
#include "PHY/NR_REFSIG/ptrs_nr.h"
#include "PHY/NR_REFSIG/refsig_defs_ue.h"
#include "PHY/NR_REFSIG/nr_refsig.h"
#include "PHY/NR_UE_TRANSPORT/nr_transport_ue.h"
#include "PHY/NR_UE_TRANSPORT/nr_transport_proto_ue.h"
#include "PHY/MODULATION/nr_modulation.h"
-14
View File
@@ -37,7 +37,6 @@
#include "defs_nr_common.h"
#include "CODING/nrPolar_tools/nr_polar_pbch_defs.h"
#include "openair2/NR_PHY_INTERFACE/NR_IF_Module.h"
#include "PHY/NR_TRANSPORT/nr_transport_common_proto.h"
#include "PHY/impl_defs_top.h"
#include "PHY/CODING/nrLDPC_coding/nrLDPC_coding_interface.h"
#include "PHY/CODING/nrLDPC_extern.h"
@@ -159,19 +158,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;
+6 -2
View File
@@ -34,7 +34,6 @@
#define __PHY_DEFS_NR_COMMON__H__
#include "PHY/impl_defs_top.h"
#include "nfapi_nr_interface_scf.h"
#include "impl_defs_nr.h"
#include "PHY/CODING/nrPolar_tools/nr_polar_defs.h"
@@ -84,6 +83,11 @@
#define NR_PUCCH_DMRS_RB 4
typedef enum {
NR_NORMAL = 0,
NR_EXTENDED = 1
} nr_prefix_type_t;
typedef enum {
NR_MU_0=0,
NR_MU_1,
@@ -228,7 +232,7 @@ struct NR_DL_FRAME_PARMS {
/// Number of common transmit antenna ports in eNodeB (1 or 2)
uint8_t nb_antenna_ports_gNB;
/// Cyclic Prefix for DL (0=Normal CP, 1=Extended CP)
lte_prefix_type_t Ncp;
nr_prefix_type_t Ncp;
/// sequence which is computed based on carrier frequency and numerology to rotate/derotate each OFDM symbol according to Section 5.3 in 38.211
/// First dimension is for the direction of the link (0 DL, 1 UL, 2 SL)
c16_t symbol_rotation[3][224];
-14
View File
@@ -240,20 +240,6 @@
#define NR_MAX_ULSCH_HARQ_PROCESSES (NR_MAX_HARQ_PROCESSES) /* cf 38.214 6.1 UE procedure for receiving the physical uplink shared channel */
#define NR_MAX_DLSCH_HARQ_PROCESSES (NR_MAX_HARQ_PROCESSES) /* cf 38.214 5.1 UE procedure for receiving the physical downlink shared channel */
/// Data structure for transmission.
typedef struct {
/// RAW TX sample buffer
char *TX_DMA_BUFFER[2];
} TX_VARS ;
/// Data structure for reception.
typedef struct {
/// RAW TX sample buffer
char *TX_DMA_BUFFER[2];
/// RAW RX sample buffer
int *RX_DMA_BUFFER[2];
} TX_RX_VARS;
/// Measurement Variables
//#define NUMBER_OF_SUBBANDS_MAX 13
@@ -23,7 +23,7 @@
#define __NR_PHY_COMMON__H__
#include "PHY/impl_defs_top.h"
#include "PHY/TOOLS/tools_defs.h"
#include "PHY/NR_REFSIG/nr_refsig_common.h"
#include "PHY/NR_REFSIG/nr_refsig.h"
#include "PHY/MODULATION/nr_modulation.h"
void init_byte2m128i(void);
+1 -1
View File
@@ -338,7 +338,7 @@ void phy_procedures_gNB_TX(PHY_VARS_gNB *gNB,
slot,
fp->N_RB_DL,
0,
fp->Ncp == EXTENDED ? 12 : 14);
fp->Ncp == NR_EXTENDED ? 12 : 14);
}
T(T_GNB_PHY_DL_OUTPUT_SIGNAL,
T_INT(0),
+1 -2
View File
@@ -38,7 +38,6 @@
#include "PHY/INIT/nr_phy_init.h"
#include "PHY/MODULATION/modulation_eNB.h"
#include "PHY/MODULATION/modulation_UE.h"
#include "PHY/NR_REFSIG/refsig_defs_ue.h"
#include "PHY/NR_TRANSPORT/nr_dlsch.h"
#include "PHY/NR_TRANSPORT/nr_transport_proto.h"
#include "PHY/NR_UE_TRANSPORT/nr_transport_proto_ue.h"
@@ -374,7 +373,7 @@ int main(int argc, char **argv)
frame_parms->nb_antennas_tx = n_tx;
frame_parms->nb_antennas_rx = n_rx;
frame_parms->N_RB_DL = N_RB_DL;
frame_parms->Ncp = extended_prefix_flag ? EXTENDED : NORMAL;
frame_parms->Ncp = extended_prefix_flag ? NR_EXTENDED : NR_NORMAL;
crcTableInit();
nr_phy_config_request_sim(gNB, N_RB_DL, N_RB_DL, mu, Nid_cell,SSB_positions);
// TDD configuration
-1
View File
@@ -34,7 +34,6 @@
#include "PHY/defs_nr_common.h"
#include "PHY/defs_nr_UE.h"
#include "PHY/defs_gNB.h"
#include "PHY/NR_REFSIG/refsig_defs_ue.h"
#include "PHY/MODULATION/modulation_eNB.h"
#include "PHY/MODULATION/modulation_UE.h"
#include "PHY/MODULATION/nr_modulation.h"
-1
View File
@@ -34,7 +34,6 @@
#include "PHY/defs_nr_common.h"
#include "PHY/defs_nr_UE.h"
#include "PHY/defs_gNB.h"
#include "PHY/NR_REFSIG/refsig_defs_ue.h"
#include "PHY/MODULATION/modulation_eNB.h"
#include "PHY/MODULATION/modulation_UE.h"
#include "PHY/NR_ESTIMATION/nr_ul_estimation.h"
+1 -1
View File
@@ -338,7 +338,7 @@ int main(int argc, char *argv[])
NR_DL_FRAME_PARMS *fp = &gNB->frame_parms;
fp->N_RB_DL = N_RB_DL;
fp->N_RB_UL = N_RB_UL;
fp->Ncp = extended_prefix_flag ? EXTENDED : NORMAL;
fp->Ncp = extended_prefix_flag ? NR_EXTENDED : NR_NORMAL;
fp->nb_antennas_tx = n_tx;
fp->nb_antennas_rx = n_rx;
fp->threequarter_fs = threequarter_fs;
+1 -2
View File
@@ -35,7 +35,6 @@
#include "PHY/defs_gNB.h"
#include "PHY/CODING/nrLDPC_coding/nrLDPC_coding_interface.h"
#include "PHY/INIT/nr_phy_init.h"
#include "PHY/NR_REFSIG/refsig_defs_ue.h"
#include "PHY/MODULATION/modulation_eNB.h"
#include "PHY/MODULATION/modulation_UE.h"
#include "PHY/NR_TRANSPORT/nr_transport_proto.h"
@@ -393,7 +392,7 @@ int main(int argc, char **argv)
frame_parms = &gNB->frame_parms; //to be initialized I suppose (maybe not necessary for PBCH)
frame_parms->N_RB_DL = N_RB_DL;
frame_parms->N_RB_UL = N_RB_UL;
frame_parms->Ncp = extended_prefix_flag ? EXTENDED : NORMAL;
frame_parms->Ncp = extended_prefix_flag ? NR_EXTENDED : NR_NORMAL;
gNB->max_ldpc_iterations = max_ldpc_iterations;
crcTableInit();
+1 -1
View File
@@ -741,7 +741,7 @@ int main(int argc, char *argv[])
gNB->pusch_thres = -20;
gNB->frame_parms.N_RB_DL = N_RB_DL;
gNB->frame_parms.N_RB_UL = N_RB_UL;
gNB->frame_parms.Ncp = extended_prefix_flag ? EXTENDED : NORMAL;
gNB->frame_parms.Ncp = extended_prefix_flag ? NR_EXTENDED : NR_NORMAL;
AssertFatal((gNB->if_inst = NR_IF_Module_init(0)) != NULL, "Cannot register interface");
gNB->if_inst->NR_PHY_config_req = nr_phy_config_request;
-1
View File
@@ -34,7 +34,6 @@
#include <string.h>
#include <errno.h>
#include "openair2/NR_PHY_INTERFACE/NR_IF_Module.h"
#include "openair1/PHY/defs_gNB.h"
#include "nfapi/open-nFAPI/nfapi/public_inc/nfapi_nr_interface_scf.h"
#include "openair1/PHY/LTE_TRANSPORT/transport_common.h"
#include "softmodem-common.h"