Commit 1b68a4f2 authored by Guy De Souza's avatar Guy De Souza

NR exe update(compiling)

parent 7b524674
...@@ -978,6 +978,11 @@ set(SCHED_SRC ...@@ -978,6 +978,11 @@ set(SCHED_SRC
) )
add_library(SCHED_LIB ${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 set(SCHED_SRC_UE
${OPENAIR1_DIR}/SCHED/phy_procedures_lte_ue.c ${OPENAIR1_DIR}/SCHED/phy_procedures_lte_ue.c
${OPENAIR1_DIR}/SCHED/phy_procedures_lte_common.c ${OPENAIR1_DIR}/SCHED/phy_procedures_lte_common.c
...@@ -2164,7 +2169,7 @@ add_executable(nr-softmodem ...@@ -2164,7 +2169,7 @@ add_executable(nr-softmodem
target_link_libraries (nr-softmodem target_link_libraries (nr-softmodem
-Wl,--start-group -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} ${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 RRC_LIB S1AP_LIB S1AP_ENB L2
NFAPI_COMMON_LIB NFAPI_LIB NFAPI_VNF_LIB NFAPI_PNF_LIB NFAPI_USER_LIB NFAPI_COMMON_LIB NFAPI_LIB NFAPI_VNF_LIB NFAPI_PNF_LIB NFAPI_USER_LIB
......
...@@ -19,7 +19,7 @@ ...@@ -19,7 +19,7 @@
* contact@openairinterface.org * contact@openairinterface.org
*/ */
#include "../defs_NR.h" #include "PHY/defs.h"
#include "SCHED/defs.h" #include "SCHED/defs.h"
#include "PHY/extern.h" #include "PHY/extern.h"
#include "SIMULATION/TOOLS/defs.h" #include "SIMULATION/TOOLS/defs.h"
...@@ -530,9 +530,9 @@ void phy_free_nr_gNB(PHY_VARS_gNB *gNB) ...@@ -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; 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) void install_schedule_handlers(IF_Module_t *if_inst)
{ {
if_inst->PHY_config_req = phy_config_request; if_inst->PHY_config_req = phy_config_request;
if_inst->schedule_response = schedule_response; if_inst->schedule_response = schedule_response;
} }*/
...@@ -19,7 +19,7 @@ ...@@ -19,7 +19,7 @@
* contact@openairinterface.org * contact@openairinterface.org
*/ */
#include "../defs_NR.h" #include "../defs.h"
#include "log.h" #include "log.h"
/// Subcarrier spacings in Hz indexed by numerology index /// Subcarrier spacings in Hz indexed by numerology index
......
...@@ -19,7 +19,7 @@ ...@@ -19,7 +19,7 @@
* contact@openairinterface.org * contact@openairinterface.org
*/ */
#include "../defs_NR.h" #include "PHY/defs.h"
#define NR_PSS_DEBUG #define NR_PSS_DEBUG
......
...@@ -19,7 +19,7 @@ ...@@ -19,7 +19,7 @@
* contact@openairinterface.org * contact@openairinterface.org
*/ */
#include "../defs_NR.h" #include "PHY/defs.h"
extern short nr_mod_table[MOD_TABLE_SIZE_SHORT]; extern short nr_mod_table[MOD_TABLE_SIZE_SHORT];
......
This diff is collapsed.
This diff is collapsed.
...@@ -108,8 +108,8 @@ extern double p_qam64[8]; ...@@ -108,8 +108,8 @@ extern double p_qam64[8];
extern double beta1_dlsch[6][MCS_COUNT]; extern double beta1_dlsch[6][MCS_COUNT];
extern double beta2_dlsch[6][MCS_COUNT]; extern double beta2_dlsch[6][MCS_COUNT];
extern char eNB_functions[6][20]; extern char NB_functions[7][20];
extern char eNB_timing[2][20]; extern char NB_timing[2][20];
extern char ru_if_types[MAX_RU_IF_TYPES][20]; extern char ru_if_types[MAX_RU_IF_TYPES][20];
extern int16_t unscrambling_lut[65536*16]; extern int16_t unscrambling_lut[65536*16];
......
...@@ -23,8 +23,7 @@ ...@@ -23,8 +23,7 @@
#define __PHY_IMPLEMENTATION_DEFS_NR_H__ #define __PHY_IMPLEMENTATION_DEFS_NR_H__
#include "impl_defs_lte.h" //#include "impl_defs_lte.h"
typedef struct { typedef struct {
/// \brief Pointers (dynamic) to the received data in the time domain. /// \brief Pointers (dynamic) to the received data in the time domain.
...@@ -42,5 +41,4 @@ typedef struct { ...@@ -42,5 +41,4 @@ typedef struct {
/// - third index: sample [0..] /// - third index: sample [0..]
int32_t **txdataF; int32_t **txdataF;
} NR_gNB_COMMON; } NR_gNB_COMMON;
#endif #endif
...@@ -139,8 +139,8 @@ double beta2_dlsch[6][MCS_COUNT] = { {2.52163, 0.83231, 0.77472, 1.36536, 1.1682 ...@@ -139,8 +139,8 @@ double beta2_dlsch[6][MCS_COUNT] = { {2.52163, 0.83231, 0.77472, 1.36536, 1.1682
#ifdef OCP_FRAMEWORK #ifdef OCP_FRAMEWORK
#include <enums.h> #include <enums.h>
#else #else
char eNB_functions[6][20]={"eNodeB_3GPP","eNodeB_3GPP_BBU","NGFI_RAU_IF4p5","NGFI_RRU_IF5","NGFI_RRU_IF4p5",}; char NB_functions[7][20]={"eNodeB_3GPP","eNodeB_3GPP_BBU","NGFI_RAU_IF4p5","NGFI_RRU_IF5","NGFI_RRU_IF4p5","gNodeB_3GPP",};
char eNB_timing[2][20]={"synch_to_ext_device","synch_to_other"}; 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"}; char ru_if_types[MAX_RU_IF_TYPES][20]={"local RF","IF5 RRU","IF5 Mobipass","IF4p5 RRU","IF1pp RRU"};
#endif #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) { ...@@ -1280,7 +1280,7 @@ void init_eNB_proc(int inst) {
for (CC_id=0; CC_id<MAX_NUM_CCs; CC_id++) { for (CC_id=0; CC_id<MAX_NUM_CCs; CC_id++) {
eNB = PHY_vars_eNB_g[inst][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 = &eNB->proc;
proc_rxtx = proc->proc_rxtx; 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 ...@@ -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->abstraction_flag = 0;
eNB->single_thread_flag = single_thread_flag; eNB->single_thread_flag = single_thread_flag;
eNB->ts_offset = 0; 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]) { switch (node_function[CC_id]) {
case NGFI_RRU_IF5: case NGFI_RRU_IF5:
......
...@@ -1395,7 +1395,7 @@ static void* ru_thread( void* param ) { ...@@ -1395,7 +1395,7 @@ static void* ru_thread( void* param ) {
// set default return value // set default return value
thread_top_init("ru_thread",0,870000,1000000,1000000); 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 // Start IF device if any
...@@ -1649,7 +1649,7 @@ void init_RU_proc(RU_t *ru) { ...@@ -1649,7 +1649,7 @@ void init_RU_proc(RU_t *ru) {
char name[100]; char name[100];
#ifndef OCP_FRAMEWORK #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 #endif
proc = &ru->proc; proc = &ru->proc;
memset((void*)proc,0,sizeof(RU_proc_t)); memset((void*)proc,0,sizeof(RU_proc_t));
......
...@@ -44,7 +44,7 @@ ...@@ -44,7 +44,7 @@
#include "PHY/types.h" #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 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 //#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) { ...@@ -617,14 +617,6 @@ void init_gNB_proc(int inst) {
// pthread_attr_init( &proc->attr_te); // pthread_attr_init( &proc->attr_te);
pthread_attr_init( &proc_rxtx[0].attr_rxtx); pthread_attr_init( &proc_rxtx[0].attr_rxtx);
pthread_attr_init( &proc_rxtx[1].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); LOG_I(PHY,"gNB->single_thread_flag:%d\n", gNB->single_thread_flag);
...@@ -686,8 +678,8 @@ void kill_gNB_proc(int inst) { ...@@ -686,8 +678,8 @@ void kill_gNB_proc(int inst) {
pthread_cond_signal( &proc->cond_asynch_rxtx ); pthread_cond_signal( &proc->cond_asynch_rxtx );
pthread_cond_broadcast(&sync_phy_proc.cond_phy_proc_tx); pthread_cond_broadcast(&sync_phy_proc.cond_phy_proc_tx);
LOG_D(PHY, "joining pthread_prach\n"); // LOG_D(PHY, "joining pthread_prach\n");
pthread_join( proc->pthread_prach, (void**)&status ); // pthread_join( proc->pthread_prach, (void**)&status );
LOG_I(PHY, "Destroying prach mutex/cond\n"); LOG_I(PHY, "Destroying prach mutex/cond\n");
pthread_mutex_destroy( &proc->mutex_prach ); pthread_mutex_destroy( &proc->mutex_prach );
...@@ -817,7 +809,8 @@ void init_transport(PHY_VARS_gNB *gNB) { ...@@ -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; int inst,CC_id,ru_id,i,aa;
PHY_VARS_gNB *gNB; PHY_VARS_gNB *gNB;
...@@ -835,7 +828,7 @@ void init_gNB_afterRU(void) { ...@@ -835,7 +828,7 @@ void init_gNB_afterRU(void) {
// map antennas and PRACH signals to gNB RX // map antennas and PRACH signals to gNB RX
if (0) AssertFatal(gNB->num_RU>0,"Number of RU attached to gNB %d is zero\n",gNB->Mod_id); if (0) AssertFatal(gNB->num_RU>0,"Number of RU attached to gNB %d is zero\n",gNB->Mod_id);
LOG_I(PHY,"Mapping RX ports from %d RUs to gNB %d\n",gNB->num_RU,gNB->Mod_id); LOG_I(PHY,"Mapping RX ports from %d RUs to gNB %d\n",gNB->num_RU,gNB->Mod_id);
gNB->gNB_config.rf_config.tx_antenna_ports.value = 0; gNB->gNB_config->rf_config.tx_antenna_ports.value = 0;
//LOG_I(PHY,"Overwriting gNB->prach_vars.rxsigF[0]:%p\n", gNB->prach_vars.rxsigF[0]); //LOG_I(PHY,"Overwriting gNB->prach_vars.rxsigF[0]:%p\n", gNB->prach_vars.rxsigF[0]);
...@@ -844,7 +837,7 @@ void init_gNB_afterRU(void) { ...@@ -844,7 +837,7 @@ void init_gNB_afterRU(void) {
LOG_I(PHY,"gNB->num_RU:%d\n", gNB->num_RU); LOG_I(PHY,"gNB->num_RU:%d\n", gNB->num_RU);
for (ru_id=0,aa=0;ru_id<gNB->num_RU;ru_id++) { for (ru_id=0,aa=0;ru_id<gNB->num_RU;ru_id++) {
gNB->gNB_config.rf_config.tx_antenna_ports.value += gNB->RU_list[ru_id]->nb_rx; gNB->gNB_config->rf_config.tx_antenna_ports.value += gNB->RU_list[ru_id]->nb_rx;
AssertFatal(gNB->RU_list[ru_id]->common.rxdataF!=NULL, AssertFatal(gNB->RU_list[ru_id]->common.rxdataF!=NULL,
"RU %d : common.rxdataF is NULL\n", "RU %d : common.rxdataF is NULL\n",
...@@ -867,29 +860,29 @@ void init_gNB_afterRU(void) { ...@@ -867,29 +860,29 @@ void init_gNB_afterRU(void) {
* In monolithic mode, we come here with nb_antennas_rx == 0 * In monolithic mode, we come here with nb_antennas_rx == 0
* (not tested in other modes). * (not tested in other modes).
*/ */
if (gNB->gNB_config.rf_config.tx_antenna_ports.value < 1) if (gNB->gNB_config->rf_config.tx_antenna_ports.value < 1)
{ {
LOG_I(PHY, "%s() ************* DJP ***** gNB->gNB_config.rf_config.tx_antenna_ports:%d - GOING TO HARD CODE TO 1", __FUNCTION__, gNB->gNB_config.rf_config.tx_antenna_ports.value); LOG_I(PHY, "%s() ************* DJP ***** gNB->gNB_config->rf_config.tx_antenna_ports:%d - GOING TO HARD CODE TO 1", __FUNCTION__, gNB->gNB_config->rf_config.tx_antenna_ports.value);
gNB->gNB_config.rf_config.tx_antenna_ports.value = 1; gNB->gNB_config->rf_config.tx_antenna_ports.value = 1;
} }
else else
{ {
//LOG_I(PHY," Delete code\n"); //LOG_I(PHY," Delete code\n");
} }
if (gNB->gNB_config.rf_config.tx_antenna_ports.value < 1) if (gNB->gNB_config->rf_config.tx_antenna_ports.value < 1)
{ {
LOG_I(PHY, "%s() ************* DJP ***** gNB->gNB_config.rf_config.tx_antenna_ports:%d - GOING TO HARD CODE TO 1", __FUNCTION__, gNB->gNB_config.rf_config.tx_antenna_ports.value); LOG_I(PHY, "%s() ************* DJP ***** gNB->gNB_config->rf_config.tx_antenna_ports:%d - GOING TO HARD CODE TO 1", __FUNCTION__, gNB->gNB_config->rf_config.tx_antenna_ports.value);
gNB->gNB_config.rf_config.tx_antenna_ports.value = 1; gNB->gNB_config->rf_config.tx_antenna_ports.value = 1;
} }
else else
{ {
//LOG_I(PHY," Delete code\n"); //LOG_I(PHY," Delete code\n");
} }
AssertFatal(gNB->gNB_config.rf_config.tx_antenna_ports.value >0, AssertFatal(gNB->gNB_config->rf_config.tx_antenna_ports.value >0,
"inst %d, CC_id %d : nb_antennas_rx %d\n",inst,CC_id,gNB->gNB_config.rf_config.tx_antenna_ports.value); "inst %d, CC_id %d : nb_antennas_rx %d\n",inst,CC_id,gNB->gNB_config->rf_config.tx_antenna_ports.value);
LOG_I(PHY,"inst %d, CC_id %d : nb_antennas_rx %d\n",inst,CC_id,gNB->gNB_config.rf_config.tx_antenna_ports.value); LOG_I(PHY,"inst %d, CC_id %d : nb_antennas_rx %d\n",inst,CC_id,gNB->gNB_config->rf_config.tx_antenna_ports.value);
/// Transport init necessary for NR synchro /// Transport init necessary for NR synchro
//init_transport(gNB); //init_transport(gNB);
//init_precoding_weights(RC.gNB[inst][CC_id]); //init_precoding_weights(RC.gNB[inst][CC_id]);
...@@ -901,9 +894,9 @@ void init_gNB_afterRU(void) { ...@@ -901,9 +894,9 @@ void init_gNB_afterRU(void) {
AssertFatal(RC.ru[ru_id]!=NULL,"ru_id %d is null\n",ru_id); AssertFatal(RC.ru[ru_id]!=NULL,"ru_id %d is null\n",ru_id);
RC.ru[ru_id]->wakeup_rxtx = wakeup_rxtx; RC.ru[ru_id]->nr_wakeup_rxtx = wakeup_rxtx;
// RC.ru[ru_id]->wakeup_prach_eNB = wakeup_prach_gNB; // RC.ru[ru_id]->wakeup_prach_eNB = wakeup_prach_gNB;
RC.ru[ru_id]->eNB_top = gNB_top; RC.ru[ru_id]->gNB_top = gNB_top;
} }
} }
......
This diff is collapsed.
...@@ -72,7 +72,7 @@ int main( int argc, char **argv ) ...@@ -72,7 +72,7 @@ int main( int argc, char **argv )
//#undef FRAME_LENGTH_COMPLEX_SAMPLES //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
#include "PHY/types.h" #include "PHY/types.h"
#include "PHY/defs_NR.h" #include "PHY/defs.h"
#include "PHY/vars.h" #include "PHY/vars.h"
#include "SCHED/vars.h" #include "SCHED/vars.h"
#include "LAYER2/MAC/vars.h" #include "LAYER2/MAC/vars.h"
...@@ -227,7 +227,7 @@ uint64_t num_missed_slots=0; // counter for the number of missed slots ...@@ -227,7 +227,7 @@ uint64_t num_missed_slots=0; // counter for the number of missed slots
extern void reset_opp_meas(void); extern void reset_opp_meas(void);
extern void print_opp_meas(void); extern void print_opp_meas(void);
///extern void init_eNB_afterRU(void); extern void init_eNB_afterRU(void);
int transmission_mode=1; int transmission_mode=1;
...@@ -689,8 +689,8 @@ void init_openair0(void) { ...@@ -689,8 +689,8 @@ void init_openair0(void) {
openair0_cfg[card].duplex_mode = duplex_mode_FDD; openair0_cfg[card].duplex_mode = duplex_mode_FDD;
printf("HW: Configuring card %d, nb_antennas_tx/rx %d/%d\n",card, printf("HW: Configuring card %d, nb_antennas_tx/rx %d/%d\n",card,
RC.eNB[0][0]->frame_parms.nb_antennas_tx , RC.gNB[0][0]->gNB_config->rf_config.tx_antenna_ports.value,
RC.eNB[0][0]->frame_parms.nb_antennas_rx ); RC.gNB[0][0]->gNB_config->rf_config.tx_antenna_ports.value );
openair0_cfg[card].Mod_id = 0; openair0_cfg[card].Mod_id = 0;
openair0_cfg[card].num_rb_dl=config[0]->rf_config.dl_channel_bandwidth.value; openair0_cfg[card].num_rb_dl=config[0]->rf_config.dl_channel_bandwidth.value;
...@@ -698,8 +698,8 @@ void init_openair0(void) { ...@@ -698,8 +698,8 @@ void init_openair0(void) {
openair0_cfg[card].clock_source = clock_source; openair0_cfg[card].clock_source = clock_source;
openair0_cfg[card].tx_num_channels=min(2,RC.eNB[0][0]->frame_parms.nb_antennas_tx ); openair0_cfg[card].tx_num_channels=min(2,RC.gNB[0][0]->gNB_config->rf_config.tx_antenna_ports.value );
openair0_cfg[card].rx_num_channels=min(2,RC.eNB[0][0]->frame_parms.nb_antennas_rx ); openair0_cfg[card].rx_num_channels=min(2,RC.gNB[0][0]->gNB_config->rf_config.tx_antenna_ports.value );
for (i=0; i<4; i++) { for (i=0; i<4; i++) {
...@@ -715,7 +715,7 @@ void init_openair0(void) { ...@@ -715,7 +715,7 @@ void init_openair0(void) {
openair0_cfg[card].autocal[i] = 1; openair0_cfg[card].autocal[i] = 1;
openair0_cfg[card].tx_gain[i] = tx_gain[0][i]; openair0_cfg[card].tx_gain[i] = tx_gain[0][i];
openair0_cfg[card].rx_gain[i] = RC.eNB[0][0]->rx_total_gain_dB; openair0_cfg[card].rx_gain[i] = RC.gNB[0][0]->rx_total_gain_dB;
openair0_cfg[card].configFilename = rf_config_file; openair0_cfg[card].configFilename = rf_config_file;
...@@ -759,7 +759,7 @@ void wait_gNBs(void) { ...@@ -759,7 +759,7 @@ void wait_gNBs(void) {
printf("RC.nb_L1_CC[%d]:%d\n", i, RC.nb_L1_CC[i]); printf("RC.nb_L1_CC[%d]:%d\n", i, RC.nb_L1_CC[i]);
for (j=0;j<RC.nb_L1_CC[i];j++) { for (j=0;j<RC.nb_L1_CC[i];j++) {
if (RC.eNB[i][j]->configured==0) { ///gNB if (RC.gNB[i][j]->configured==0) {
waiting=1; waiting=1;
break; break;
} }
...@@ -786,7 +786,7 @@ extern void phy_free_RU(RU_t*); ...@@ -786,7 +786,7 @@ extern void phy_free_RU(RU_t*);
int stop_L1L2(module_id_t gnb_id) int stop_L1L2(module_id_t gnb_id)
{ {
LOG_W(ENB_APP, "stopping lte-softmodem\n"); LOG_W(ENB_APP, "stopping nr-softmodem\n");
oai_exit = 1; oai_exit = 1;
if (!RC.ru) { if (!RC.ru) {
...@@ -816,13 +816,13 @@ int stop_L1L2(module_id_t gnb_id) ...@@ -816,13 +816,13 @@ int stop_L1L2(module_id_t gnb_id)
/* these tasks need to pick up new configuration */ /* these tasks need to pick up new configuration */
terminate_task(TASK_RRC_ENB, gnb_id); terminate_task(TASK_RRC_ENB, gnb_id);
terminate_task(TASK_L2L1, gnb_id); terminate_task(TASK_L2L1, gnb_id);
LOG_I(ENB_APP, "calling kill_eNB_proc() for instance %d\n", gnb_id); LOG_I(ENB_APP, "calling kill_gNB_proc() for instance %d\n", gnb_id);
kill_gNB_proc(gnb_id); kill_gNB_proc(gnb_id);
LOG_I(ENB_APP, "calling kill_RU_proc() for instance %d\n", gnb_id); LOG_I(ENB_APP, "calling kill_RU_proc() for instance %d\n", gnb_id);
kill_RU_proc(gnb_id); kill_RU_proc(gnb_id);
oai_exit = 0; oai_exit = 0;
for (int cc_id = 0; cc_id < RC.nb_CC[gnb_id]; cc_id++) { for (int cc_id = 0; cc_id < RC.nb_CC[gnb_id]; cc_id++) {
//free_transport(RC.eNB[gnb_id][cc_id]); //free_transport(RC.gNB[gnb_id][cc_id]);
phy_free_nr_gNB(RC.gNB[gnb_id][cc_id]); phy_free_nr_gNB(RC.gNB[gnb_id][cc_id]);
} }
phy_free_RU(RC.ru[gnb_id]); phy_free_RU(RC.ru[gnb_id]);
...@@ -850,7 +850,7 @@ int restart_L1L2(module_id_t gnb_id) ...@@ -850,7 +850,7 @@ int restart_L1L2(module_id_t gnb_id)
RC.ru_mask |= (1 << ru->idx); RC.ru_mask |= (1 << ru->idx);
/* copy the changed frame parameters to the RU */ /* copy the changed frame parameters to the RU */
/* TODO this should be done for all RUs associated to this eNB */ /* TODO this should be done for all RUs associated to this gNB */
memcpy(&ru->frame_parms, &RC.gNB[gnb_id][0]->frame_parms, sizeof(NR_DL_FRAME_PARMS)); memcpy(&ru->frame_parms, &RC.gNB[gnb_id][0]->frame_parms, sizeof(NR_DL_FRAME_PARMS));
set_function_spec_param(RC.ru[gnb_id]); set_function_spec_param(RC.ru[gnb_id]);
...@@ -876,7 +876,7 @@ int restart_L1L2(module_id_t gnb_id) ...@@ -876,7 +876,7 @@ int restart_L1L2(module_id_t gnb_id)
/* TODO XForms might need to be restarted, but it is currently (09/02/18) /* TODO XForms might need to be restarted, but it is currently (09/02/18)
* broken, so we cannot test it */ * broken, so we cannot test it */
wait_eNBs(); wait_gNBs();
init_RU_proc(ru); init_RU_proc(ru);
ru->rf_map.card = 0; ru->rf_map.card = 0;
ru->rf_map.chain = 0; /* CC_id + chain_offset;*/ ru->rf_map.chain = 0; /* CC_id + chain_offset;*/
...@@ -961,7 +961,7 @@ int main( int argc, char **argv ) ...@@ -961,7 +961,7 @@ int main( int argc, char **argv )
if (ouput_vcd) { if (ouput_vcd) {
VCD_SIGNAL_DUMPER_INIT("/tmp/openair_dump_eNB.vcd"); VCD_SIGNAL_DUMPER_INIT("/tmp/openair_dump_gNB.vcd");
} }
if (opp_enabled ==1) { if (opp_enabled ==1) {
...@@ -1173,11 +1173,11 @@ int main( int argc, char **argv ) ...@@ -1173,11 +1173,11 @@ int main( int argc, char **argv )
printf("RC.nb_L1_inst:%d\n", RC.nb_L1_inst); printf("RC.nb_L1_inst:%d\n", RC.nb_L1_inst);
if (RC.nb_L1_inst > 0) { if (RC.nb_L1_inst > 0) {
printf("Initializing gNB threads single_thread_flag:%d wait_for_sync:%d\n", single_thread_flag,wait_for_sync); printf("Initializing gNB threads single_thread_flag:%d wait_for_sync:%d\n", single_thread_flag,wait_for_sync);
init_eNB(single_thread_flag,wait_for_sync); init_gNB(single_thread_flag,wait_for_sync);
} }
printf("wait_gNBs()\n"); printf("wait_gNBs()\n");
wait_eNBs(); wait_gNBs();
printf("About to Init RU threads RC.nb_RU:%d\n", RC.nb_RU); printf("About to Init RU threads RC.nb_RU:%d\n", RC.nb_RU);
if (RC.nb_RU >0) { if (RC.nb_RU >0) {
...@@ -1200,7 +1200,7 @@ int main( int argc, char **argv ) ...@@ -1200,7 +1200,7 @@ int main( int argc, char **argv )
printf("ALL RUs READY!\n"); printf("ALL RUs READY!\n");
printf("RC.nb_RU:%d\n", RC.nb_RU); printf("RC.nb_RU:%d\n", RC.nb_RU);
// once all RUs are ready initialize the rest of the gNBs ((dependence on final RU parameters after configuration) // once all RUs are ready initialize the rest of the gNBs ((dependence on final RU parameters after configuration)
printf("ALL RUs ready - init eNBs\n"); printf("ALL RUs ready - init gNBs\n");
if (nfapi_mode != 1 && nfapi_mode != 2) if (nfapi_mode != 1 && nfapi_mode != 2)
{ {
...@@ -1209,10 +1209,10 @@ int main( int argc, char **argv ) ...@@ -1209,10 +1209,10 @@ int main( int argc, char **argv )
} }
else else
{ {
printf("NFAPI mode - DO NOT call init_eNB_afterRU()\n"); printf("NFAPI mode - DO NOT call init_gNB_afterRU()\n");
} }
printf("ALL RUs ready - ALL eNBs ready\n"); printf("ALL RUs ready - ALL gNBs ready\n");
// connect the TX/RX buffers // connect the TX/RX buffers
...@@ -1278,7 +1278,7 @@ int main( int argc, char **argv ) ...@@ -1278,7 +1278,7 @@ int main( int argc, char **argv )
* threads have been stopped (they partially use the same memory) */ * threads have been stopped (they partially use the same memory) */
for (int inst = 0; inst < NB_gNB_INST; inst++) { for (int inst = 0; inst < NB_gNB_INST; inst++) {
for (int cc_id = 0; cc_id < RC.nb_CC[inst]; cc_id++) { for (int cc_id = 0; cc_id < RC.nb_CC[inst]; cc_id++) {
free_transport(RC.gNB[inst][cc_id]); //free_transport(RC.gNB[inst][cc_id]);
phy_free_nr_gNB(RC.gNB[inst][cc_id]); phy_free_nr_gNB(RC.gNB[inst][cc_id]);
} }
} }
......
...@@ -252,8 +252,6 @@ extern void reset_opp_meas(void); ...@@ -252,8 +252,6 @@ extern void reset_opp_meas(void);
extern void print_opp_meas(void); extern void print_opp_meas(void);
extern void init_fep_thread(PHY_VARS_gNB *, pthread_attr_t *); extern void init_fep_thread(PHY_VARS_gNB *, pthread_attr_t *);
extern void init_td_thread(PHY_VARS_gNB *, pthread_attr_t *);
extern void init_te_thread(PHY_VARS_gNB *, pthread_attr_t *);
void init_gNB_afterRU(void); void init_gNB_afterRU(void);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment