adding time_source command line parameter and removing duplications of clock_source
ignoring command line paramters clock_source and time_source in lte-softmodem and harmonizing it with nr-softmodem time_source and clock_source handled separately in usrp_lib.cpp
This commit is contained in:
@@ -1405,7 +1405,6 @@ void fill_rf_config(RU_t *ru,
|
||||
cfg->num_rb_dl=fp->N_RB_DL;
|
||||
cfg->tx_num_channels=ru->nb_tx;
|
||||
cfg->rx_num_channels=ru->nb_rx;
|
||||
cfg->clock_source=get_softmodem_params()->clock_source;
|
||||
|
||||
for (int i=0; i<ru->nb_tx; i++) {
|
||||
cfg->tx_freq[i] = (double)fp->dl_CarrierFreq;
|
||||
@@ -2683,7 +2682,7 @@ void set_function_spec_param(RU_t *ru) {
|
||||
//extern void RCconfig_RU(void);
|
||||
|
||||
|
||||
void init_RU(char *rf_config_file, clock_source_t clock_source, clock_source_t time_source, int send_dmrssync) {
|
||||
void init_RU(char *rf_config_file, int send_dmrssync) {
|
||||
int ru_id, i, CC_id;
|
||||
RU_t *ru;
|
||||
PHY_VARS_eNB *eNB0 = (PHY_VARS_eNB *)NULL;
|
||||
@@ -2718,8 +2717,6 @@ void init_RU(char *rf_config_file, clock_source_t clock_source, clock_source_t t
|
||||
ru->south_out_cnt = 0;
|
||||
// use eNB_list[0] as a reference for RU frame parameters
|
||||
// NOTE: multiple CC_id are not handled here yet!
|
||||
ru->openair0_cfg.clock_source = clock_source;
|
||||
ru->openair0_cfg.time_source = time_source;
|
||||
|
||||
//ru->generate_dmrs_sync = (ru->is_slave == 0) ? 1 : 0;
|
||||
if ((ru->is_slave == 0) && (ru->ota_sync_enable == 1))
|
||||
@@ -2956,6 +2953,27 @@ void RCconfig_RU(void) {
|
||||
LOG_E(PHY, "Erroneous RU clock source in the provided configuration file: '%s'\n", *(RUParamList.paramarray[j][RU_SDR_CLK_SRC].strptr));
|
||||
}
|
||||
}
|
||||
else {
|
||||
RC.ru[j]->openair0_cfg.clock_source = unset;
|
||||
}
|
||||
|
||||
if (config_isparamset(RUParamList.paramarray[j], RU_SDR_TME_SRC)) {
|
||||
if (strcmp(*(RUParamList.paramarray[j][RU_SDR_TME_SRC].strptr), "internal") == 0) {
|
||||
RC.ru[j]->openair0_cfg.time_source = internal;
|
||||
LOG_D(PHY, "RU time source set as internal\n");
|
||||
} else if (strcmp(*(RUParamList.paramarray[j][RU_SDR_TME_SRC].strptr), "external") == 0) {
|
||||
RC.ru[j]->openair0_cfg.time_source = external;
|
||||
LOG_D(PHY, "RU time source set as external\n");
|
||||
} else if (strcmp(*(RUParamList.paramarray[j][RU_SDR_TME_SRC].strptr), "gpsdo") == 0) {
|
||||
RC.ru[j]->openair0_cfg.time_source = gpsdo;
|
||||
LOG_D(PHY, "RU time source set as gpsdo\n");
|
||||
} else {
|
||||
LOG_E(PHY, "Erroneous RU time source in the provided configuration file: '%s'\n", *(RUParamList.paramarray[j][RU_SDR_CLK_SRC].strptr));
|
||||
}
|
||||
}
|
||||
else {
|
||||
RC.ru[j]->openair0_cfg.time_source = unset;
|
||||
}
|
||||
|
||||
if (strcmp(*(RUParamList.paramarray[j][RU_LOCAL_RF_IDX].strptr), "yes") == 0) {
|
||||
if ( !(config_isparamset(RUParamList.paramarray[j],RU_LOCAL_IF_NAME_IDX)) ) {
|
||||
|
||||
@@ -654,7 +654,7 @@ int main ( int argc, char **argv )
|
||||
// some initialization is necessary and init_ru_vnf do this.
|
||||
if (RC.nb_RU >0 && NFAPI_MODE!=NFAPI_MODE_VNF) {
|
||||
printf("Initializing RU threads\n");
|
||||
init_RU(get_softmodem_params()->rf_config_file,get_softmodem_params()->clock_source,get_softmodem_params()->timing_source,get_softmodem_params()->send_dmrs_sync);
|
||||
init_RU(get_softmodem_params()->rf_config_file,get_softmodem_params()->send_dmrs_sync);
|
||||
|
||||
for (ru_id=0; ru_id<RC.nb_RU; ru_id++) {
|
||||
RC.ru[ru_id]->rf_map.card=0;
|
||||
|
||||
@@ -81,7 +81,6 @@
|
||||
#define CONFIG_HLP_DLSHIFT "dynamic shift for LLR compuation for TM3/4 (default 0)\n"
|
||||
#define CONFIG_HLP_USRP_ARGS "set the arguments to identify USRP (same syntax as in UHD)\n"
|
||||
#define CONFIG_HLP_DMAMAP "sets flag for improved EXMIMO UE performance\n"
|
||||
#define CONFIG_HLP_CLK "tells hardware to use a clock reference (0:internal, 1:external, 2:gpsdo)\n"
|
||||
#define CONFIG_HLP_TDD "Set hardware to TDD mode (default: FDD). Used only with -U (otherwise set in config file).\n"
|
||||
#define CONFIG_HLP_TADV "Set timing_advance\n"
|
||||
|
||||
@@ -115,7 +114,6 @@
|
||||
{"dlsch-demod-shift", CONFIG_HLP_DLSHIFT, 0, iptr:(int32_t *)&dlsch_demod_shift, defintval:0, TYPE_INT, 0}, \
|
||||
{"usrp-args", CONFIG_HLP_USRP_ARGS, 0, strptr:(char **)&usrp_args, defstrval:"type=b200",TYPE_STRING, 0}, \
|
||||
{"mmapped-dma", CONFIG_HLP_DMAMAP, PARAMFLAG_BOOL, uptr:&mmapped_dma, defintval:0, TYPE_INT, 0}, \
|
||||
{"clock-source", CONFIG_HLP_CLK, 0, iptr:&clock_source, defintval:0, TYPE_INT, 0}, \
|
||||
{"T" , CONFIG_HLP_TDD, PARAMFLAG_BOOL, iptr:&tddflag, defintval:0, TYPE_INT, 0}, \
|
||||
{"A", CONFIG_HLP_TADV, 0, iptr:&(timingadv), defintval:0, TYPE_INT, 0} \
|
||||
}
|
||||
@@ -169,7 +167,7 @@ extern void init_RU_proc(RU_t *ru);
|
||||
extern void stop_RU(int nb_ru);
|
||||
extern void kill_RU_proc(RU_t *ru);
|
||||
extern void set_function_spec_param(RU_t *ru);
|
||||
extern void init_RU(char *, clock_source_t clock_source, clock_source_t time_source, int send_dmrssync);
|
||||
extern void init_RU(char *, int send_dmrssync);
|
||||
|
||||
// In lte-ue.c
|
||||
extern int setup_ue_buffers(PHY_VARS_UE **phy_vars_ue, openair0_config_t *openair0_cfg);
|
||||
|
||||
@@ -113,10 +113,6 @@ uint16_t runtime_phy_tx[29][6]; // SISO [MCS 0-28][RBs 0-5 : 6, 15, 25, 50, 75,
|
||||
|
||||
volatile int oai_exit = 0;
|
||||
|
||||
|
||||
clock_source_t clock_source = internal,time_source=internal;
|
||||
|
||||
|
||||
unsigned int mmapped_dma=0;
|
||||
|
||||
|
||||
@@ -467,7 +463,8 @@ void init_openair0(LTE_DL_FRAME_PARMS *frame_parms,int rxgain) {
|
||||
|
||||
openair0_cfg[card].Mod_id = 0;
|
||||
openair0_cfg[card].num_rb_dl=frame_parms->N_RB_DL;
|
||||
openair0_cfg[card].clock_source = clock_source;
|
||||
openair0_cfg[card].clock_source = get_softmodem_params()->clock_source;
|
||||
openair0_cfg[card].time_source = get_softmodem_params()->timing_source;
|
||||
openair0_cfg[card].tx_num_channels=min(2,frame_parms->nb_antennas_tx);
|
||||
openair0_cfg[card].rx_num_channels=min(2,frame_parms->nb_antennas_rx);
|
||||
|
||||
|
||||
@@ -64,7 +64,7 @@ sim_t sim;
|
||||
|
||||
void init_ru_devices(void);
|
||||
|
||||
void init_RU(char *,clock_source_t clock_source,clock_source_t time_source,int send_dmrssync);
|
||||
void init_RU(char *,int send_dmrssync);
|
||||
|
||||
void *rfsim_top(void *n_frames);
|
||||
|
||||
@@ -101,7 +101,7 @@ void RCConfig_sim(void) {
|
||||
RC.nb_RU = RUParamList.numelt;
|
||||
AssertFatal(RC.nb_RU>0,"we need at least 1 RU for simulation\n");
|
||||
printf("returned with %d rus\n",RC.nb_RU);
|
||||
init_RU(NULL,internal,internal,0);
|
||||
init_RU(NULL,0);
|
||||
printf("Waiting for RUs to get set up\n");
|
||||
wait_RUs();
|
||||
init_ru_devices();
|
||||
|
||||
Reference in New Issue
Block a user