Commit dc30b30b authored by Florian Kaltenberger's avatar Florian Kaltenberger

Merge branch 'nr_initialsync' of...

Merge branch 'nr_initialsync' of https://gitlab.eurecom.fr/oai/openairinterface5g into nr_initialsync
parents c2aabeaa 1b68a4f2
......@@ -986,6 +986,11 @@ set(SCHED_SRC
)
add_library(SCHED_LIB ${SCHED_SRC})
set(SCHED_NR_SRC
${OPENAIR1_DIR}/SCHED_NR/phy_procedures_nr_common.c
)
add_library(SCHED_NR_LIB ${SCHED_NR_SRC})
set(SCHED_SRC_UE
${OPENAIR1_DIR}/SCHED/phy_procedures_lte_ue.c
${OPENAIR1_DIR}/SCHED/phy_procedures_lte_common.c
......@@ -2204,7 +2209,7 @@ add_executable(nr-softmodem
target_link_libraries (nr-softmodem
-Wl,--start-group
UTIL HASHTABLE SCTP_CLIENT UDP SCHED_LIB PHY_NR PHY LFDS GTPV1U SECU_CN SECU_OSA
UTIL HASHTABLE SCTP_CLIENT UDP SCHED_LIB SCHED_NR_LIB PHY_NR PHY LFDS GTPV1U SECU_CN SECU_OSA
${ITTI_LIB} ${FLPT_MSG_LIB} ${ASYNC_IF_LIB} ${FLEXRAN_AGENT_LIB} LFDS7 ${MSC_LIB} ${RAL_LIB} ${NAS_UE_LIB}
RRC_LIB S1AP_LIB S1AP_ENB L2
NFAPI_COMMON_LIB NFAPI_LIB NFAPI_VNF_LIB NFAPI_PNF_LIB NFAPI_USER_LIB
......
......@@ -19,7 +19,7 @@
* contact@openairinterface.org
*/
#include "../defs_NR.h"
#include "PHY/defs.h"
#include "SCHED/defs.h"
#include "PHY/extern.h"
#include "SIMULATION/TOOLS/defs.h"
......@@ -530,9 +530,9 @@ void phy_free_nr_gNB(PHY_VARS_gNB *gNB)
for (UE_id = 0; UE_id < NUMBER_OF_UE_MAX; UE_id++) gNB->UE_stats_ptr[UE_id] = NULL;
}
/*
void install_schedule_handlers(IF_Module_t *if_inst)
{
if_inst->PHY_config_req = phy_config_request;
if_inst->schedule_response = schedule_response;
}
}*/
......@@ -19,7 +19,7 @@
* contact@openairinterface.org
*/
#include "../defs_NR.h"
#include "../defs.h"
#include "log.h"
/// Subcarrier spacings in Hz indexed by numerology index
......
......@@ -19,7 +19,7 @@
* contact@openairinterface.org
*/
#include "../defs_NR.h"
#include "PHY/defs.h"
#define NR_PSS_DEBUG
......
......@@ -19,7 +19,7 @@
* contact@openairinterface.org
*/
#include "../defs_NR.h"
#include "PHY/defs.h"
extern short nr_mod_table[MOD_TABLE_SIZE_SHORT];
......
This diff is collapsed.
......@@ -19,7 +19,7 @@
* contact@openairinterface.org
*/
#ifndef __INIT_DEFS_NR__H__
/*#ifndef __INIT_DEFS_NR__H__
#define __INIT_DEFS_NR__H__
#define _GNU_SOURCE
......@@ -42,7 +42,7 @@
#include "types.h"
#include "defs.h"
#include "assertions.h"
#include "assertions.h"*/
#include "impl_defs_nr.h"
#define MAX_NUM_SUBCARRIER_SPACING 5
......@@ -66,6 +66,7 @@ typedef enum {
NR_MU_4,
} nr_numerology_index_e;
//NR types temporarily placed here
typedef struct {
uint32_t subcarrier_spacing;
/// 3/4 sampling
......@@ -93,187 +94,6 @@ typedef struct {
} NR_DL_FRAME_PARMS;
/// Context data structure for RX/TX portion of subframe processing
typedef struct {
/// Component Carrier index
uint8_t CC_id;
/// timestamp transmitted to HW
openair0_timestamp timestamp_tx;
/// subframe to act upon for transmission
int subframe_tx;
/// subframe to act upon for reception
int subframe_rx;
/// frame to act upon for transmission
int frame_tx;
/// frame to act upon for reception
int frame_rx;
/// \brief Instance count for RXn-TXnp4 processing thread.
/// \internal This variable is protected by \ref mutex_rxtx.
int instance_cnt_rxtx;
/// pthread structure for RXn-TXnp4 processing thread
pthread_t pthread_rxtx;
/// pthread attributes for RXn-TXnp4 processing thread
pthread_attr_t attr_rxtx;
/// condition variable for tx processing thread
pthread_cond_t cond_rxtx;
/// mutex for RXn-TXnp4 processing thread
pthread_mutex_t mutex_rxtx;
/// scheduling parameters for RXn-TXnp4 thread
struct sched_param sched_param_rxtx;
} gNB_rxtx_proc_t;
/// Context data structure for eNB subframe processing
typedef struct gNB_proc_t_s {
/// Component Carrier index
uint8_t CC_id;
/// thread index
int thread_index;
/// timestamp received from HW
openair0_timestamp timestamp_rx;
/// timestamp to send to "slave rru"
openair0_timestamp timestamp_tx;
/// subframe to act upon for reception
int subframe_rx;
/// subframe to act upon for PRACH
int subframe_prach;
/// frame to act upon for reception
int frame_rx;
/// frame to act upon for transmission
int frame_tx;
/// frame to act upon for PRACH
int frame_prach;
/// \internal This variable is protected by \ref mutex_td.
int instance_cnt_td;
/// \internal This variable is protected by \ref mutex_te.
int instance_cnt_te;
/// \internal This variable is protected by \ref mutex_prach.
int instance_cnt_prach;
// instance count for over-the-air gNB synchronization
int instance_cnt_synch;
/// \internal This variable is protected by \ref mutex_asynch_rxtx.
int instance_cnt_asynch_rxtx;
/// pthread structure for eNB single processing thread
pthread_t pthread_single;
/// pthread structure for asychronous RX/TX processing thread
pthread_t pthread_asynch_rxtx;
/// flag to indicate first RX acquisition
int first_rx;
/// flag to indicate first TX transmission
int first_tx;
/// pthread attributes for parallel turbo-decoder thread
pthread_attr_t attr_td;
/// pthread attributes for parallel turbo-encoder thread
pthread_attr_t attr_te;
/// pthread attributes for single eNB processing thread
pthread_attr_t attr_single;
/// pthread attributes for prach processing thread
pthread_attr_t attr_prach;
/// pthread attributes for asynchronous RX thread
pthread_attr_t attr_asynch_rxtx;
/// scheduling parameters for parallel turbo-decoder thread
struct sched_param sched_param_td;
/// scheduling parameters for parallel turbo-encoder thread
struct sched_param sched_param_te;
/// scheduling parameters for single eNB thread
struct sched_param sched_param_single;
/// scheduling parameters for prach thread
struct sched_param sched_param_prach;
/// scheduling parameters for asynch_rxtx thread
struct sched_param sched_param_asynch_rxtx;
/// pthread structure for parallel turbo-decoder thread
pthread_t pthread_td;
/// pthread structure for parallel turbo-encoder thread
pthread_t pthread_te;
/// pthread structure for PRACH thread
pthread_t pthread_prach;
/// condition variable for parallel turbo-decoder thread
pthread_cond_t cond_td;
/// condition variable for parallel turbo-encoder thread
pthread_cond_t cond_te;
/// condition variable for PRACH processing thread;
pthread_cond_t cond_prach;
/// condition variable for asynch RX/TX thread
pthread_cond_t cond_asynch_rxtx;
/// mutex for parallel turbo-decoder thread
pthread_mutex_t mutex_td;
/// mutex for parallel turbo-encoder thread
pthread_mutex_t mutex_te;
/// mutex for PRACH thread
pthread_mutex_t mutex_prach;
/// mutex for asynch RX/TX thread
pthread_mutex_t mutex_asynch_rxtx;
/// mutex for RU access to eNB processing (PDSCH/PUSCH)
pthread_mutex_t mutex_RU;
/// mutex for RU access to eNB processing (PRACH)
pthread_mutex_t mutex_RU_PRACH;
/// mutex for RU access to eNB processing (PRACH BR)
pthread_mutex_t mutex_RU_PRACH_br;
/// mask for RUs serving eNB (PDSCH/PUSCH)
int RU_mask;
/// mask for RUs serving eNB (PRACH)
int RU_mask_prach;
/// parameters for turbo-decoding worker thread
td_params tdp;
/// parameters for turbo-encoding worker thread
te_params tep;
/// set of scheduling variables RXn-TXnp4 threads
gNB_rxtx_proc_t proc_rxtx[2];
} gNB_proc_t;
typedef struct {
// common measurements
//! estimated noise power (linear)
unsigned int n0_power[MAX_NUM_RU_PER_eNB];
//! estimated noise power (dB)
unsigned short n0_power_dB[MAX_NUM_RU_PER_eNB];
//! total estimated noise power (linear)
unsigned int n0_power_tot;
//! estimated avg noise power (dB)
unsigned short n0_power_tot_dB;
//! estimated avg noise power (dB)
short n0_power_tot_dBm;
//! estimated avg noise power per RB per RX ant (lin)
unsigned short n0_subband_power[MAX_NUM_RU_PER_eNB][100];
//! estimated avg noise power per RB per RX ant (dB)
unsigned short n0_subband_power_dB[MAX_NUM_RU_PER_eNB][100];
//! estimated avg noise power per RB (dB)
short n0_subband_power_tot_dB[100];
//! estimated avg noise power per RB (dBm)
short n0_subband_power_tot_dBm[100];
// gNB measurements (per user)
//! estimated received spatial signal power (linear)
unsigned int rx_spatial_power[NUMBER_OF_UE_MAX][2][2];
//! estimated received spatial signal power (dB)
unsigned short rx_spatial_power_dB[NUMBER_OF_UE_MAX][2][2];
//! estimated rssi (dBm)
short rx_rssi_dBm[NUMBER_OF_UE_MAX];
//! estimated correlation (wideband linear) between spatial channels (computed in dlsch_demodulation)
int rx_correlation[NUMBER_OF_UE_MAX][2];
//! estimated correlation (wideband dB) between spatial channels (computed in dlsch_demodulation)
int rx_correlation_dB[NUMBER_OF_UE_MAX][2];
/// Wideband CQI (= SINR)
int wideband_cqi[NUMBER_OF_UE_MAX][MAX_NUM_RU_PER_eNB];
/// Wideband CQI in dB (= SINR dB)
int wideband_cqi_dB[NUMBER_OF_UE_MAX][MAX_NUM_RU_PER_eNB];
/// Wideband CQI (sum of all RX antennas, in dB)
char wideband_cqi_tot[NUMBER_OF_UE_MAX];
/// Subband CQI per RX antenna and RB (= SINR)
int subband_cqi[NUMBER_OF_UE_MAX][MAX_NUM_RU_PER_eNB][100];
/// Total Subband CQI and RB (= SINR)
int subband_cqi_tot[NUMBER_OF_UE_MAX][100];
/// Subband CQI in dB and RB (= SINR dB)
int subband_cqi_dB[NUMBER_OF_UE_MAX][MAX_NUM_RU_PER_eNB][100];
/// Total Subband CQI and RB
int subband_cqi_tot_dB[NUMBER_OF_UE_MAX][100];
/// PRACH background noise level
int prach_I0;
} PHY_MEASUREMENTS_gNB;
/// Top-level PHY Data Structure for gNB
typedef struct PHY_VARS_gNB_s {
/// Module ID indicator for this instance
......@@ -485,5 +305,184 @@ typedef struct PHY_VARS_gNB_s {
int32_t pusch_stats_BO[NUMBER_OF_UE_MAX][10240];
} PHY_VARS_gNB;
/// Context data structure for RX/TX portion of subframe processing
typedef struct {
/// Component Carrier index
uint8_t CC_id;
/// timestamp transmitted to HW
openair0_timestamp timestamp_tx;
/// subframe to act upon for transmission
int subframe_tx;
/// subframe to act upon for reception
int subframe_rx;
/// frame to act upon for transmission
int frame_tx;
/// frame to act upon for reception
int frame_rx;
/// \brief Instance count for RXn-TXnp4 processing thread.
/// \internal This variable is protected by \ref mutex_rxtx.
int instance_cnt_rxtx;
/// pthread structure for RXn-TXnp4 processing thread
pthread_t pthread_rxtx;
/// pthread attributes for RXn-TXnp4 processing thread
pthread_attr_t attr_rxtx;
/// condition variable for tx processing thread
pthread_cond_t cond_rxtx;
/// mutex for RXn-TXnp4 processing thread
pthread_mutex_t mutex_rxtx;
/// scheduling parameters for RXn-TXnp4 thread
struct sched_param sched_param_rxtx;
} gNB_rxtx_proc_t;
/// Context data structure for eNB subframe processing
typedef struct gNB_proc_t_s {
/// Component Carrier index
uint8_t CC_id;
/// thread index
int thread_index;
/// timestamp received from HW
openair0_timestamp timestamp_rx;
/// timestamp to send to "slave rru"
openair0_timestamp timestamp_tx;
/// subframe to act upon for reception
int subframe_rx;
/// subframe to act upon for PRACH
int subframe_prach;
/// frame to act upon for reception
int frame_rx;
/// frame to act upon for transmission
int frame_tx;
/// frame to act upon for PRACH
int frame_prach;
/// \internal This variable is protected by \ref mutex_td.
int instance_cnt_td;
/// \internal This variable is protected by \ref mutex_te.
int instance_cnt_te;
/// \internal This variable is protected by \ref mutex_prach.
int instance_cnt_prach;
// instance count for over-the-air gNB synchronization
int instance_cnt_synch;
/// \internal This variable is protected by \ref mutex_asynch_rxtx.
int instance_cnt_asynch_rxtx;
/// pthread structure for eNB single processing thread
pthread_t pthread_single;
/// pthread structure for asychronous RX/TX processing thread
pthread_t pthread_asynch_rxtx;
/// flag to indicate first RX acquisition
int first_rx;
/// flag to indicate first TX transmission
int first_tx;
/// pthread attributes for parallel turbo-decoder thread
pthread_attr_t attr_td;
/// pthread attributes for parallel turbo-encoder thread
pthread_attr_t attr_te;
/// pthread attributes for single eNB processing thread
pthread_attr_t attr_single;
/// pthread attributes for prach processing thread
pthread_attr_t attr_prach;
/// pthread attributes for asynchronous RX thread
pthread_attr_t attr_asynch_rxtx;
/// scheduling parameters for parallel turbo-decoder thread
struct sched_param sched_param_td;
/// scheduling parameters for parallel turbo-encoder thread
struct sched_param sched_param_te;
/// scheduling parameters for single eNB thread
struct sched_param sched_param_single;
/// scheduling parameters for prach thread
struct sched_param sched_param_prach;
/// scheduling parameters for asynch_rxtx thread
struct sched_param sched_param_asynch_rxtx;
/// pthread structure for parallel turbo-decoder thread
pthread_t pthread_td;
/// pthread structure for parallel turbo-encoder thread
pthread_t pthread_te;
/// pthread structure for PRACH thread
pthread_t pthread_prach;
/// condition variable for parallel turbo-decoder thread
pthread_cond_t cond_td;
/// condition variable for parallel turbo-encoder thread
pthread_cond_t cond_te;
/// condition variable for PRACH processing thread;
pthread_cond_t cond_prach;
/// condition variable for asynch RX/TX thread
pthread_cond_t cond_asynch_rxtx;
/// mutex for parallel turbo-decoder thread
pthread_mutex_t mutex_td;
/// mutex for parallel turbo-encoder thread
pthread_mutex_t mutex_te;
/// mutex for PRACH thread
pthread_mutex_t mutex_prach;
/// mutex for asynch RX/TX thread
pthread_mutex_t mutex_asynch_rxtx;
/// mutex for RU access to eNB processing (PDSCH/PUSCH)
pthread_mutex_t mutex_RU;
/// mutex for RU access to eNB processing (PRACH)
pthread_mutex_t mutex_RU_PRACH;
/// mutex for RU access to eNB processing (PRACH BR)
pthread_mutex_t mutex_RU_PRACH_br;
/// mask for RUs serving eNB (PDSCH/PUSCH)
int RU_mask;
/// mask for RUs serving eNB (PRACH)
int RU_mask_prach;
/// parameters for turbo-decoding worker thread
td_params tdp;
/// parameters for turbo-encoding worker thread
te_params tep;
/// set of scheduling variables RXn-TXnp4 threads
gNB_rxtx_proc_t proc_rxtx[2];
} gNB_proc_t;
typedef struct {
// common measurements
//! estimated noise power (linear)
unsigned int n0_power[MAX_NUM_RU_PER_eNB];
//! estimated noise power (dB)
unsigned short n0_power_dB[MAX_NUM_RU_PER_eNB];
//! total estimated noise power (linear)
unsigned int n0_power_tot;
//! estimated avg noise power (dB)
unsigned short n0_power_tot_dB;
//! estimated avg noise power (dB)
short n0_power_tot_dBm;
//! estimated avg noise power per RB per RX ant (lin)
unsigned short n0_subband_power[MAX_NUM_RU_PER_eNB][100];
//! estimated avg noise power per RB per RX ant (dB)
unsigned short n0_subband_power_dB[MAX_NUM_RU_PER_eNB][100];
//! estimated avg noise power per RB (dB)
short n0_subband_power_tot_dB[100];
//! estimated avg noise power per RB (dBm)
short n0_subband_power_tot_dBm[100];
// gNB measurements (per user)
//! estimated received spatial signal power (linear)
unsigned int rx_spatial_power[NUMBER_OF_UE_MAX][2][2];
//! estimated received spatial signal power (dB)
unsigned short rx_spatial_power_dB[NUMBER_OF_UE_MAX][2][2];
//! estimated rssi (dBm)
short rx_rssi_dBm[NUMBER_OF_UE_MAX];
//! estimated correlation (wideband linear) between spatial channels (computed in dlsch_demodulation)
int rx_correlation[NUMBER_OF_UE_MAX][2];
//! estimated correlation (wideband dB) between spatial channels (computed in dlsch_demodulation)
int rx_correlation_dB[NUMBER_OF_UE_MAX][2];
/// Wideband CQI (= SINR)
int wideband_cqi[NUMBER_OF_UE_MAX][MAX_NUM_RU_PER_eNB];
/// Wideband CQI in dB (= SINR dB)
int wideband_cqi_dB[NUMBER_OF_UE_MAX][MAX_NUM_RU_PER_eNB];
/// Wideband CQI (sum of all RX antennas, in dB)
char wideband_cqi_tot[NUMBER_OF_UE_MAX];
/// Subband CQI per RX antenna and RB (= SINR)
int subband_cqi[NUMBER_OF_UE_MAX][MAX_NUM_RU_PER_eNB][100];
/// Total Subband CQI and RB (= SINR)
int subband_cqi_tot[NUMBER_OF_UE_MAX][100];
/// Subband CQI in dB and RB (= SINR dB)
int subband_cqi_dB[NUMBER_OF_UE_MAX][MAX_NUM_RU_PER_eNB][100];
/// Total Subband CQI and RB
int subband_cqi_tot_dB[NUMBER_OF_UE_MAX][100];
/// PRACH background noise level
int prach_I0;
} PHY_MEASUREMENTS_gNB;
#endif
......@@ -108,8 +108,8 @@ extern double p_qam64[8];
extern double beta1_dlsch[6][MCS_COUNT];
extern double beta2_dlsch[6][MCS_COUNT];
extern char eNB_functions[6][20];
extern char eNB_timing[2][20];
extern char NB_functions[7][20];
extern char NB_timing[2][20];
extern char ru_if_types[MAX_RU_IF_TYPES][20];
extern int16_t unscrambling_lut[65536*16];
......
......@@ -23,8 +23,7 @@
#define __PHY_IMPLEMENTATION_DEFS_NR_H__
#include "impl_defs_lte.h"
//#include "impl_defs_lte.h"
typedef struct {
/// \brief Pointers (dynamic) to the received data in the time domain.
......@@ -42,5 +41,4 @@ typedef struct {
/// - third index: sample [0..]
int32_t **txdataF;
} NR_gNB_COMMON;
#endif
......@@ -139,8 +139,8 @@ double beta2_dlsch[6][MCS_COUNT] = { {2.52163, 0.83231, 0.77472, 1.36536, 1.1682
#ifdef OCP_FRAMEWORK
#include <enums.h>
#else
char eNB_functions[6][20]={"eNodeB_3GPP","eNodeB_3GPP_BBU","NGFI_RAU_IF4p5","NGFI_RRU_IF5","NGFI_RRU_IF4p5",};
char eNB_timing[2][20]={"synch_to_ext_device","synch_to_other"};
char NB_functions[7][20]={"eNodeB_3GPP","eNodeB_3GPP_BBU","NGFI_RAU_IF4p5","NGFI_RRU_IF5","NGFI_RRU_IF4p5","gNodeB_3GPP",};
char NB_timing[2][20]={"synch_to_ext_device","synch_to_other"};
char ru_if_types[MAX_RU_IF_TYPES][20]={"local RF","IF5 RRU","IF5 Mobipass","IF4p5 RRU","IF1pp RRU"};
#endif
......
/*
* 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
*/
/*
\author R. Knopp, F. Kaltenberger
\company EURECOM
\email knopp@eurecom.fr
*/
#ifndef __openair_SCHED_NR_DEFS_H__
#define __openair_SCHED_NR_DEFS_H__
#include "PHY/defs.h"
#include "PHY_INTERFACE/defs.h"
#include "SCHED/defs.h"
lte_subframe_t nr_subframe_select (nfapi_config_request_t *cfg, unsigned char subframe);
#endif
......@@ -1280,7 +1280,7 @@ void init_eNB_proc(int inst) {
for (CC_id=0; CC_id<MAX_NUM_CCs; CC_id++) {
eNB = PHY_vars_eNB_g[inst][CC_id];
LOG_I(PHY,"Initializing eNB %d CC_id %d (%s,%s),\n",inst,CC_id,eNB_functions[eNB->node_function],eNB_timing[eNB->node_timing]);
LOG_I(PHY,"Initializing eNB %d CC_id %d (%s,%s),\n",inst,CC_id,NB_functions[eNB->node_function],NB_timing[eNB->node_timing]);
proc = &eNB->proc;
proc_rxtx = proc->proc_rxtx;
......@@ -1682,7 +1682,7 @@ void init_RAN(RAN_CONTEXT *rc,eNB_func_t node_function[], eNB_timing_t node_timi
eNB->abstraction_flag = 0;
eNB->single_thread_flag = single_thread_flag;
eNB->ts_offset = 0;
LOG_I(PHY,"Initializing eNB %d CC_id %d : (%s,%s)\n",inst,CC_id,eNB_functions[node_function[CC_id]],eNB_timing[node_timing[CC_id]]);
LOG_I(PHY,"Initializing eNB %d CC_id %d : (%s,%s)\n",inst,CC_id,NB_functions[node_function[CC_id]],NB_timing[node_timing[CC_id]]);
switch (node_function[CC_id]) {
case NGFI_RRU_IF5:
......
......@@ -1395,7 +1395,7 @@ static void* ru_thread( void* param ) {
// set default return value
thread_top_init("ru_thread",0,870000,1000000,1000000);
LOG_I(PHY,"Starting RU %d (%s,%s),\n",ru->idx,eNB_functions[ru->function],eNB_timing[ru->if_timing]);
LOG_I(PHY,"Starting RU %d (%s,%s),\n",ru->idx,NB_functions[ru->function],NB_timing[ru->if_timing]);
// Start IF device if any
......@@ -1649,7 +1649,7 @@ void init_RU_proc(RU_t *ru) {
char name[100];
#ifndef OCP_FRAMEWORK
LOG_I(PHY,"Initializing RU proc %d (%s,%s),\n",ru->idx,eNB_functions[ru->function],eNB_timing[ru->if_timing]);
LOG_I(PHY,"Initializing RU proc %d (%s,%s),\n",ru->idx,NB_functions[ru->function],NB_timing[ru->if_timing]);
#endif
proc = &ru->proc;
memset((void*)proc,0,sizeof(RU_proc_t));
......
......@@ -44,7 +44,7 @@
#include "PHY/types.h"
#include "PHY/defs_NR.h"
#include "PHY/defs.h"
#undef MALLOC //there are two conflicting definitions, so we better make sure we don't use it at all
//#undef FRAME_LENGTH_COMPLEX_SAMPLES //there are two conflicting definitions, so we better make sure we don't use it at all
......@@ -617,14 +617,6 @@ void init_gNB_proc(int inst) {
// pthread_attr_init( &proc->attr_te);
pthread_attr_init( &proc_rxtx[0].attr_rxtx);
pthread_attr_init( &proc_rxtx[1].attr_rxtx);
#ifndef DEADLINE_SCHEDULER
attr0 = &proc_rxtx[0].attr_rxtx;
attr1 = &proc_rxtx[1].attr_rxtx;
attr_prach = &proc->attr_prach;
// attr_td = &proc->attr_td;
// attr_te = &proc->attr_te;
#endif
LOG_I(PHY,"gNB->single_thread_flag:%d\n", gNB->single_thread_flag);
......@@ -686,8 +678,8 @@ void kill_gNB_proc(int inst) {
pthread_cond_signal( &proc->cond_asynch_rxtx );
pthread_cond_broadcast(&sync_phy_proc.cond_phy_proc_tx);
LOG_D(PHY, "joining pthread_prach\n");
pthread_join( proc->pthread_prach, (void**)&status );
// LOG_D(PHY, "joining pthread_prach\n");
// pthread_join( proc->pthread_prach, (void**)&status );
LOG_I(PHY, "Destroying prach mutex/cond\n");
pthread_mutex_destroy( &proc->mutex_prach );
......@@ -817,7 +809,8 @@ void init_transport(PHY_VARS_gNB *gNB) {
} */
void init_gNB_afterRU(void) {
/// eNB kept in function name for nffapi calls, TO FIX
void init_eNB_afterRU(void) {
int inst,CC_id,ru_id,i,aa;
PHY_VARS_gNB *gNB;
......@@ -835,7 +828,7 @@ void init_gNB_afterRU(void) {
// map antennas and PRACH signals to gNB RX