Merge with develop-nr
This commit is contained in:
@@ -682,6 +682,27 @@ static void* gNB_thread_prach( void* param ) {
|
||||
extern void init_td_thread(PHY_VARS_gNB *);
|
||||
extern void init_te_thread(PHY_VARS_gNB *);
|
||||
|
||||
static void* process_stats_thread(void* param) {
|
||||
|
||||
PHY_VARS_gNB *gNB = (PHY_VARS_gNB*)param;
|
||||
|
||||
reset_meas(&gNB->dlsch_encoding_stats);
|
||||
reset_meas(&gNB->dlsch_scrambling_stats);
|
||||
reset_meas(&gNB->dlsch_modulation_stats);
|
||||
|
||||
wait_sync("process_stats_thread");
|
||||
|
||||
while(!oai_exit)
|
||||
{
|
||||
sleep(1);
|
||||
print_meas(&gNB->dlsch_encoding_stats, "pdsch_encoding", NULL, NULL);
|
||||
print_meas(&gNB->dlsch_scrambling_stats, "pdsch_scrambling", NULL, NULL);
|
||||
print_meas(&gNB->dlsch_modulation_stats, "pdsch_modulation", NULL, NULL);
|
||||
}
|
||||
return(NULL);
|
||||
}
|
||||
|
||||
|
||||
void init_gNB_proc(int inst) {
|
||||
int i=0;
|
||||
int CC_id;
|
||||
@@ -729,6 +750,7 @@ void init_gNB_proc(int inst) {
|
||||
threadCreate( &L1_proc_tx->pthread, gNB_L1_thread_tx, gNB,"L1_proc_tx", -1, OAI_PRIORITY_RT);
|
||||
}
|
||||
|
||||
if(opp_enabled == 1) threadCreate(&proc->L1_stats_thread, process_stats_thread,(void *)gNB, "time_meas", -1, OAI_PRIORITY_RT_LOW);
|
||||
//pthread_create( &proc->pthread_prach, attr_prach, gNB_thread_prach, gNB );
|
||||
char name[16];
|
||||
|
||||
|
||||
+33
-24
@@ -1077,30 +1077,39 @@ 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=92.16e6;
|
||||
cfg->samples_per_frame = 921600;
|
||||
cfg->tx_bw = 40e6;
|
||||
cfg->rx_bw = 40e6;
|
||||
AssertFatal(0 == 1,"three quarter sampling not supported for N_RB 273\n");
|
||||
} else {
|
||||
cfg->sample_rate=122.88e6;
|
||||
cfg->samples_per_frame = 1228800;
|
||||
cfg->tx_bw = 40e6;
|
||||
cfg->rx_bw = 40e6;
|
||||
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 = 80e6;
|
||||
cfg->rx_bw = 80e6;
|
||||
} else {
|
||||
cfg->sample_rate=122.88e6;
|
||||
cfg->samples_per_frame = 1228800;
|
||||
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);
|
||||
@@ -1623,7 +1632,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;
|
||||
@@ -1688,7 +1697,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);
|
||||
@@ -1982,8 +1991,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->nr_start_if = nr_start_if; // need to start the if interface for if4p5
|
||||
ru->ifdevice.host_type = RRU_HOST;
|
||||
@@ -2004,8 +2013,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 = NULL; // 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
|
||||
@@ -2034,13 +2043,13 @@ 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->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->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
|
||||
ru->start_rf = NULL; // no local RF
|
||||
ru->feprx = fep_full; // this is frequency-shift + DFTs
|
||||
ru->feptx_prec = feptx_prec; // 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
|
||||
ru->start_rf = NULL; // no local RF
|
||||
ru->stop_rf = NULL;
|
||||
ru->nr_start_if = nr_start_if; // need to start if interface for IF5
|
||||
ru->ifdevice.host_type = RAU_HOST;
|
||||
|
||||
@@ -122,6 +122,7 @@ int threequarter_fs=0;
|
||||
uint32_t downlink_frequency[MAX_NUM_CCs][4];
|
||||
int32_t uplink_frequency_offset[MAX_NUM_CCs][4];
|
||||
|
||||
|
||||
extern int16_t nr_dlsch_demod_shift;
|
||||
|
||||
int UE_scan = 0;
|
||||
@@ -399,7 +400,7 @@ int16_t dlsch_demod_shift;
|
||||
|
||||
static void get_options(void) {
|
||||
int CC_id;
|
||||
int tddflag=0, nonbiotflag;
|
||||
int tddflag=0, nonbiotflag, vcdflag=0;
|
||||
char *loopfile=NULL;
|
||||
int dumpframe=0;
|
||||
uint32_t online_log_messages;
|
||||
@@ -470,6 +471,9 @@ static void get_options(void) {
|
||||
frame_parms[CC_id]->frame_type = TDD;
|
||||
}
|
||||
|
||||
if (vcdflag > 0)
|
||||
ouput_vcd = 1;
|
||||
|
||||
/*if (frame_parms[0]->N_RB_DL !=0) {
|
||||
if ( frame_parms[0]->N_RB_DL < 6 ) {
|
||||
frame_parms[0]->N_RB_DL = 6;
|
||||
@@ -731,7 +735,11 @@ int main( int argc, char **argv ) {
|
||||
if(IS_SOFTMODEM_NOS1)
|
||||
init_pdcp();
|
||||
|
||||
/*
|
||||
if (ouput_vcd) {
|
||||
vcd_signal_dumper_init("/tmp/openair_dump_nrUE.vcd");
|
||||
}
|
||||
|
||||
/*
|
||||
#ifdef PDCP_USE_NETLINK
|
||||
netlink_init();
|
||||
#if defined(PDCP_USE_NETLINK_QUEUES)
|
||||
@@ -826,5 +834,8 @@ int main( int argc, char **argv ) {
|
||||
while(true)
|
||||
sleep(3600);
|
||||
|
||||
if (ouput_vcd)
|
||||
vcd_signal_dumper_close();
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
@@ -79,6 +79,7 @@
|
||||
{"q" , CONFIG_HLP_STMON, PARAMFLAG_BOOL, iptr:&opp_enabled, defintval:0, TYPE_INT, 0}, \
|
||||
{"S" , CONFIG_HLP_MSLOTS, PARAMFLAG_BOOL, u8ptr:&exit_missed_slots, defintval:1, TYPE_UINT8, 0}, \
|
||||
{"T" , CONFIG_HLP_TDD, PARAMFLAG_BOOL, iptr:&tddflag, defintval:0, TYPE_INT, 0}, \
|
||||
{"V" , CONFIG_HLP_VCD, PARAMFLAG_BOOL, iptr:&vcdflag, defintval:0, TYPE_INT, 0}, \
|
||||
{"numerology" , CONFIG_HLP_NUMEROLOGY, PARAMFLAG_BOOL, iptr:&numerology, defintval:0, TYPE_INT, 0}, \
|
||||
{"emulate-rf" , CONFIG_HLP_EMULATE_RF, PARAMFLAG_BOOL, iptr:&emulate_rf, defintval:0, TYPE_INT, 0}, \
|
||||
{"parallel-config", CONFIG_HLP_PARALLEL_CMD,0, strptr:(char **)¶llel_config, defstrval:NULL, TYPE_STRING, 0}, \
|
||||
|
||||
Reference in New Issue
Block a user