diff --git a/executables/nr-ru.c b/executables/nr-ru.c index c58c9b6f70..d84d9d1cfc 100644 --- a/executables/nr-ru.c +++ b/executables/nr-ru.c @@ -1063,30 +1063,42 @@ void fill_rf_config(RU_t *ru, char *rf_config_file) { cfg->rx_bw = 1.5e6; } else AssertFatal(1==0,"Unknown N_RB %d\n",N_RB); } else if (mu == NR_MU_1) { - if(N_RB == 217) { + if(N_RB == 273) { + if (fp->threequarter_fs) { + cfg->sample_rate=115.2e6; + cfg->samples_per_frame = 1152000; + cfg->tx_bw = 100e6; + cfg->rx_bw = 100e6; + } else { + cfg->sample_rate=153.6e6; + cfg->samples_per_frame = 1536000; + cfg->tx_bw = 100e6; + cfg->rx_bw = 100e6; + } + } else if(N_RB == 217) { if (fp->threequarter_fs) { cfg->sample_rate=92.16e6; cfg->samples_per_frame = 921600; - cfg->tx_bw = 40e6; - cfg->rx_bw = 40e6; + cfg->tx_bw = 80e6; + cfg->rx_bw = 80e6; } else { cfg->sample_rate=122.88e6; cfg->samples_per_frame = 1228800; - cfg->tx_bw = 40e6; - cfg->rx_bw = 40e6; + cfg->tx_bw = 80e6; + cfg->rx_bw = 80e6; } } else if(N_RB == 106) { if (fp->threequarter_fs) { cfg->sample_rate=46.08e6; cfg->samples_per_frame = 460800; - cfg->tx_bw = 20e6; - cfg->rx_bw = 20e6; + cfg->tx_bw = 40e6; + cfg->rx_bw = 40e6; } else { cfg->sample_rate=61.44e6; cfg->samples_per_frame = 614400; - cfg->tx_bw = 20e6; - cfg->rx_bw = 20e6; + cfg->tx_bw = 40e6; + cfg->rx_bw = 40e6; } } else { AssertFatal(0==1,"N_RB %d not yet supported for numerology %d\n",N_RB,mu); @@ -1609,7 +1621,7 @@ extern void nr_feptx_ofdm(RU_t *ru,int frame_tx,int tti_tx); extern void nr_feptx_ofdm_2thread(RU_t *ru,int frame_tx,int tti_tx); extern void feptx_prec(RU_t *ru, int frame_tx,int tti_tx); extern void init_fep_thread(RU_t *ru); -extern void init_nr_feptx_thread(RU_t *ru); +extern void nr_init_feptx_thread(RU_t *ru); void init_RU_proc(RU_t *ru) { int i=0; @@ -1674,7 +1686,7 @@ void init_RU_proc(RU_t *ru) { threadCreate( &proc->pthread_prach, ru_thread_prach, (void *)ru,"RACH", -1, OAI_PRIORITY_RT ); } - if (get_nprocs()>=2) { + if (get_thread_worker_conf() == WORKER_ENABLE) { if (ru->feprx) init_fep_thread(ru); if (ru->feptx_ofdm) nr_init_feptx_thread(ru); @@ -1966,8 +1978,8 @@ void set_function_spec_param(RU_t *ru) { ru->fh_north_out = fh_if4p5_north_out; // send_IF4p5 on reception ru->fh_south_out = tx_rf; // send output to RF ru->fh_north_asynch_in = fh_if4p5_north_asynch_in; // TX packets come asynchronously - ru->feprx = (get_nprocs()<=2) ? fep_full :ru_fep_full_2thread; // RX DFTs - ru->feptx_ofdm = (get_nprocs()<=2) ? nr_feptx_ofdm : nr_feptx_ofdm_2thread; // this is fep with idft only (no precoding in RRU) + ru->feprx = (get_thread_worker_conf() == WORKER_ENABLE) ? ru_fep_full_2thread : fep_full; // RX DFTs + ru->feptx_ofdm = (get_thread_worker_conf() == WORKER_ENABLE) ? nr_feptx_ofdm_2thread : nr_feptx_ofdm; // this is fep with idft only (no precoding in RRU) ru->feptx_prec = NULL; ru->start_if = start_if; // need to start the if interface for if4p5 ru->ifdevice.host_type = RRU_HOST; @@ -1988,8 +2000,8 @@ void set_function_spec_param(RU_t *ru) { malloc_IF4p5_buffer(ru); } else if (ru->function == gNodeB_3GPP) { ru->do_prach = 0; // no prach processing in RU - ru->feprx = (get_nprocs()<=2) ? fep_full : ru_fep_full_2thread; // RX DFTs - ru->feptx_ofdm = (get_nprocs()<=2) ? nr_feptx_ofdm : nr_feptx_ofdm_2thread; // this is fep with idft and precoding + ru->feprx = (get_thread_worker_conf() == WORKER_ENABLE) ? ru_fep_full_2thread : fep_full; // RX DFTs + ru->feptx_ofdm = (get_thread_worker_conf() == WORKER_ENABLE) ? nr_feptx_ofdm_2thread : nr_feptx_ofdm; // this is fep with idft and precoding ru->feptx_prec = feptx_prec; // this is fep with idft and precoding ru->fh_north_in = NULL; // no incoming fronthaul from north ru->fh_north_out = NULL; // no outgoing fronthaul to north @@ -2018,9 +2030,9 @@ void set_function_spec_param(RU_t *ru) { case REMOTE_IF5: // the remote unit is IF5 RRU ru->do_prach = 0; - ru->feprx = (get_nprocs()<=2) ? fep_full : fep_full; // this is frequency-shift + DFTs + ru->feprx = fep_full; // this is frequency-shift + DFTs ru->feptx_prec = feptx_prec; // need to do transmit Precoding + IDFTs - ru->feptx_ofdm = (get_nprocs()<=2) ? nr_feptx_ofdm : nr_feptx_ofdm_2thread; // need to do transmit Precoding + IDFTs + ru->feptx_ofdm = (get_thread_worker_conf() == WORKER_ENABLE) ? nr_feptx_ofdm_2thread : nr_feptx_ofdm; // need to do transmit Precoding + IDFTs ru->fh_south_in = fh_if5_south_in; // synchronous IF5 reception ru->fh_south_out = fh_if5_south_out; // synchronous IF5 transmission ru->fh_south_asynch_in = NULL; // no asynchronous UL diff --git a/nfapi/open-nFAPI/nfapi/public_inc/nfapi_nr_interface.h b/nfapi/open-nFAPI/nfapi/public_inc/nfapi_nr_interface.h index 71baa4ed20..569a727e39 100644 --- a/nfapi/open-nFAPI/nfapi/public_inc/nfapi_nr_interface.h +++ b/nfapi/open-nFAPI/nfapi/public_inc/nfapi_nr_interface.h @@ -582,7 +582,7 @@ typedef struct { uint8_t time_allocation_type; uint8_t freq_allocation_type; uint8_t start_prb; - uint8_t n_prb; + uint16_t n_prb;////it was uint8_t uint8_t start_symbol; uint8_t nb_symbols; uint8_t mcs_idx; diff --git a/openair2/GNB_APP/gnb_config.c b/openair2/GNB_APP/gnb_config.c index ab36765445..ece82f3538 100644 --- a/openair2/GNB_APP/gnb_config.c +++ b/openair2/GNB_APP/gnb_config.c @@ -802,8 +802,9 @@ void RCconfig_NRRRC(MessageDef *msg_p, uint32_t i, gNB_RRC_INST *rrc) { NRRRC_CONFIGURATION_REQ (msg_p).N_RB_DL[j]= N_RB_DL; if(N_RB_DL == 217) sf_ahead = 2; else if(N_RB_DL == 106) sf_ahead = 4; - else AssertFatal (0,"Failed to parse gNB configuration file %s, gnb %d unknown value \"%d\" for N_RB_DL choice: 106, 217 !\n", - RC.config_file_name, i, N_RB_DL); + else sf_ahead = 4; + /*else AssertFatal (0,"Failed to parse gNB configuration file %s, gnb %d unknown value \"%d\" for N_RB_DL choice: 106, 217 !\n", + RC.config_file_name, i, N_RB_DL);*/ /* if ((N_RB_DL!=6) && (N_RB_DL!=15) && (N_RB_DL!=25) && (N_RB_DL!=50) && (N_RB_DL!=75) && (N_RB_DL!=100)) { diff --git a/targets/ARCH/USRP/USERSPACE/LIB/usrp_lib.cpp b/targets/ARCH/USRP/USERSPACE/LIB/usrp_lib.cpp index 84736dd3cf..33d5669a31 100644 --- a/targets/ARCH/USRP/USERSPACE/LIB/usrp_lib.cpp +++ b/targets/ARCH/USRP/USERSPACE/LIB/usrp_lib.cpp @@ -1153,6 +1153,22 @@ extern "C" { LOG_I(PHY,"%s() sample_rate:%u\n", __FUNCTION__, (int)openair0_cfg[0].sample_rate); switch ((int)openair0_cfg[0].sample_rate) { + case 153600000: + // from usrp_time_offset + //openair0_cfg[0].samples_per_packet = 2048; + openair0_cfg[0].tx_sample_advance = 15; //to be checked + openair0_cfg[0].tx_bw = 100e6; + openair0_cfg[0].rx_bw = 100e6; + break; + + case 115200000: + // from usrp_time_offset + //openair0_cfg[0].samples_per_packet = 2048; + openair0_cfg[0].tx_sample_advance = 15; //to be checked + openair0_cfg[0].tx_bw = 100e6; + openair0_cfg[0].rx_bw = 100e6; + break; + case 122880000: // from usrp_time_offset //openair0_cfg[0].samples_per_packet = 2048;