Merge remote-tracking branch 'origin/develop' into ue-phy-sync-improvements
This commit is contained in:
@@ -87,8 +87,9 @@
|
||||
#define CONFIG_HLP_NOTWAIT "don't wait for tracer, start immediately\n"
|
||||
#define CONFIG_HLP_TNOFORK "to ease debugging with gdb\n"
|
||||
#define CONFIG_HLP_DISABLNBIOT "disable nb-iot, even if defined in config\n"
|
||||
#define CONFIG_HLP_DISABLETIMECORR "disable UE timing correction\n"
|
||||
#define CONFIG_HLP_RRC_CFG_PATH "path for RRC configuration\n"
|
||||
#define CONFIG_HLP_DISABLETIMECORR "disable UE timing correction\n"
|
||||
#define CONFIG_HLP_RRC_CFG_PATH "path for RRC configuration\n"
|
||||
#define CONFIG_HLP_UECAP_FILE "path for UE Capabilities file\n"
|
||||
|
||||
#define CONFIG_HLP_NUMEROLOGY "adding numerology for 5G\n"
|
||||
#define CONFIG_HLP_EMULATE_RF "Emulated RF enabled(disable by defult)\n"
|
||||
|
||||
@@ -111,16 +111,11 @@ int32_t uplink_frequency_offset[MAX_NUM_CCs][4];
|
||||
|
||||
//Temp fix for inexistent NR upper layer
|
||||
unsigned char NB_gNB_INST = 1;
|
||||
char *uecap_file;
|
||||
|
||||
|
||||
int UE_scan = 1;
|
||||
int UE_scan_carrier = 0;
|
||||
runmode_t mode = normal_txrx;
|
||||
static double snr_dB=20;
|
||||
|
||||
FILE *input_fd=NULL;
|
||||
|
||||
|
||||
#if MAX_NUM_CCs == 1
|
||||
rx_gain_t rx_gain_mode[MAX_NUM_CCs][4] = {{max_gain,max_gain,max_gain,max_gain}};
|
||||
double tx_gain[MAX_NUM_CCs][4] = {{20,0,0,0}};
|
||||
@@ -193,8 +188,6 @@ openair0_config_t openair0_cfg[MAX_CARDS];
|
||||
|
||||
double cpuf;
|
||||
|
||||
extern char uecap_xer[1024];
|
||||
char uecap_xer_in=0;
|
||||
|
||||
/* see file openair2/LAYER2/MAC/main.c for why abstraction_flag is needed
|
||||
* this is very hackish - find a proper solution
|
||||
@@ -710,6 +703,7 @@ int main( int argc, char **argv ) {
|
||||
// don't create if node doesn't connect to RRC/S1/GTP
|
||||
int ret=create_gNB_tasks(1);
|
||||
AssertFatal(ret==0,"cannot create ITTI tasks\n");
|
||||
|
||||
/* Start the agent. If it is turned off in the configuration, it won't start */
|
||||
/*
|
||||
RCconfig_nr_flexran();
|
||||
|
||||
@@ -29,6 +29,7 @@
|
||||
{"D" , CONFIG_HLP_DLBM_PHYTEST,0, u64ptr:&dlsch_slot_bitmap, defintval:0, TYPE_UINT64, 0}, \
|
||||
{"U" , CONFIG_HLP_ULBM_PHYTEST,0, u64ptr:&ulsch_slot_bitmap, defintval:0, TYPE_UINT64, 0}, \
|
||||
{"usrp-tx-thread-config", CONFIG_HLP_USRP_THREAD, 0, iptr:&usrp_tx_thread, defstrval:0, TYPE_INT, 0}, \
|
||||
{"uecap_file", CONFIG_HLP_UECAP_FILE, 0, strptr:(char **)&uecap_file, defstrval:"./uecap.xml", TYPE_STRING, 0}, \
|
||||
{"s" , CONFIG_HLP_SNR, 0, dblptr:&snr_dB, defdblval:25, TYPE_DOUBLE, 0}, \
|
||||
}
|
||||
|
||||
@@ -41,6 +42,7 @@ extern uint32_t target_dl_bw;
|
||||
extern uint32_t target_ul_bw;
|
||||
extern uint64_t dlsch_slot_bitmap;
|
||||
extern uint64_t ulsch_slot_bitmap;
|
||||
extern char *uecap_file;
|
||||
|
||||
// In nr-gnb.c
|
||||
extern void init_gNB(int single_thread_flag,int wait_for_sync);
|
||||
|
||||
+4
-2
@@ -1127,13 +1127,15 @@ void *UE_thread(void *arg) {
|
||||
return NULL;
|
||||
}
|
||||
|
||||
void init_NR_UE(int nb_inst, char* rrc_config_path) {
|
||||
void init_NR_UE(int nb_inst,
|
||||
char* uecap_file,
|
||||
char* rrc_config_path) {
|
||||
int inst;
|
||||
NR_UE_MAC_INST_t *mac_inst;
|
||||
NR_UE_RRC_INST_t* rrc_inst;
|
||||
|
||||
for (inst=0; inst < nb_inst; inst++) {
|
||||
AssertFatal((rrc_inst = nr_l3_init_ue(rrc_config_path)) != NULL, "can not initialize RRC module\n");
|
||||
AssertFatal((rrc_inst = nr_l3_init_ue(uecap_file,rrc_config_path)) != NULL, "can not initialize RRC module\n");
|
||||
AssertFatal((mac_inst = nr_l2_init_ue(rrc_inst)) != NULL, "can not initialize L2 module\n");
|
||||
AssertFatal((mac_inst->if_module = nr_ue_if_module_init(inst)) != NULL, "can not initialize IF module\n");
|
||||
}
|
||||
|
||||
@@ -118,6 +118,7 @@ int vcdflag = 0;
|
||||
double rx_gain_off = 0.0;
|
||||
char *usrp_args = NULL;
|
||||
char *rrc_config_path = NULL;
|
||||
char *uecap_file = NULL;
|
||||
int dumpframe = 0;
|
||||
|
||||
uint64_t downlink_frequency[MAX_NUM_CCs][4];
|
||||
@@ -150,8 +151,6 @@ int numerology = 0;
|
||||
int oaisim_flag = 0;
|
||||
int emulate_rf = 0;
|
||||
uint32_t N_RB_DL = 106;
|
||||
char uecap_xer_in = 0;
|
||||
char uecap_xer[1024];
|
||||
|
||||
/* see file openair2/LAYER2/MAC/main.c for why abstraction_flag is needed
|
||||
* this is very hackish - find a proper solution
|
||||
@@ -264,14 +263,6 @@ static void get_options(void) {
|
||||
|
||||
if (vcdflag > 0)
|
||||
ouput_vcd = 1;
|
||||
|
||||
if ( !(CONFIG_ISFLAGSET(CONFIG_ABORT)) && (!(CONFIG_ISFLAGSET(CONFIG_NOOOPT))) ) {
|
||||
// Here the configuration file is the XER encoded UE capabilities
|
||||
// Read it in and store in asn1c data structures
|
||||
sprintf(uecap_xer,"%stargets/PROJECTS/GENERIC-LTE-EPC/CONF/UE_config.xml",getenv("OPENAIR_HOME"));
|
||||
printf("%s\n",uecap_xer);
|
||||
uecap_xer_in=1;
|
||||
} /* UE with config file */
|
||||
}
|
||||
|
||||
// set PHY vars from command line
|
||||
@@ -454,7 +445,7 @@ int main( int argc, char **argv ) {
|
||||
#endif
|
||||
LOG_I(HW, "Version: %s\n", PACKAGE_VERSION);
|
||||
|
||||
init_NR_UE(1,rrc_config_path);
|
||||
init_NR_UE(1,uecap_file,rrc_config_path);
|
||||
|
||||
int mode_offset = get_softmodem_params()->nsa ? NUMBER_OF_UE_MAX : 1;
|
||||
uint16_t node_number = get_softmodem_params()->node_number;
|
||||
|
||||
@@ -33,8 +33,9 @@
|
||||
{"dlsch-parallel", CONFIG_HLP_DLSCH_PARA, 0, iptr:(int32_t *)&nrUE_params.nr_dlsch_parallel, defintval:0, TYPE_UINT8, 0}, \
|
||||
{"offset-divisor", CONFIG_HLP_OFFSET_DIV, 0, uptr:(uint32_t *)&nrUE_params.ofdm_offset_divisor, defuintval:UINT_MAX, TYPE_UINT32, 0}, \
|
||||
{"nr-dlsch-demod-shift", CONFIG_HLP_DLSHIFT, 0, iptr:(int32_t *)&nr_dlsch_demod_shift, defintval:0, TYPE_INT, 0}, \
|
||||
{"V" , CONFIG_HLP_VCD, PARAMFLAG_BOOL, iptr:&vcdflag, defintval:0, TYPE_INT, 0}, \
|
||||
{"rrc_config_path", CONFIG_HLP_RRC_CFG_PATH,0, strptr:(char **)&rrc_config_path, defstrval:"./", TYPE_STRING, 0}, \
|
||||
{"V" , CONFIG_HLP_VCD, PARAMFLAG_BOOL, iptr:&vcdflag, defintval:0, TYPE_INT, 0}, \
|
||||
{"uecap_file", CONFIG_HLP_UECAP_FILE, 0, strptr:(char **)&uecap_file, defstrval:"./uecap.xml", TYPE_STRING, 0}, \
|
||||
{"rrc_config_path", CONFIG_HLP_RRC_CFG_PATH,0, strptr:(char **)&rrc_config_path, defstrval:"./", TYPE_STRING, 0}, \
|
||||
{"ue-idx-standalone", NULL, 0, u16ptr:&ue_idx_standalone, defuintval:0xFFFF, TYPE_UINT16, 0} \
|
||||
}
|
||||
|
||||
@@ -85,7 +86,7 @@ extern nrUE_params_t *get_nrUE_params(void);
|
||||
// In nr-ue.c
|
||||
extern int setup_nr_ue_buffers(PHY_VARS_NR_UE **phy_vars_ue, openair0_config_t *openair0_cfg);
|
||||
extern void fill_ue_band_info(void);
|
||||
extern void init_NR_UE(int, char*);
|
||||
extern void init_NR_UE(int, char*, char*);
|
||||
extern void init_NR_UE_threads(int);
|
||||
extern void reset_opp_meas(void);
|
||||
extern void print_opp_meas(void);
|
||||
|
||||
Reference in New Issue
Block a user