Merge remote-tracking branch 'origin/develop' into nr_prs
This commit is contained in:
@@ -1273,11 +1273,7 @@ int main ( int argc, char **argv ) {
|
||||
L1proc->respEncode=(notifiedFIFO_t *) malloc(sizeof(notifiedFIFO_t));
|
||||
L1proc->respDecode=(notifiedFIFO_t *) malloc(sizeof(notifiedFIFO_t));
|
||||
|
||||
if ( strlen(get_softmodem_params()->threadPoolConfig) > 0 )
|
||||
initTpool(get_softmodem_params()->threadPoolConfig, L1proc->threadPool, true);
|
||||
else
|
||||
initTpool("n", L1proc->threadPool, true);
|
||||
|
||||
initTpool(get_softmodem_params()->threadPoolConfig, L1proc->threadPool,cpumeas(CPUMEAS_GETSTATE));
|
||||
initNotifiedFIFO(L1proc->respEncode);
|
||||
initNotifiedFIFO(L1proc->respDecode);
|
||||
}
|
||||
|
||||
+5
-15
@@ -221,8 +221,7 @@ void rx_func(void *param) {
|
||||
gNB->common_vars.rxdataF[aa],
|
||||
slot_rx,
|
||||
0,
|
||||
gNB->frame_parms.Ncp==EXTENDED?12:14,
|
||||
gNB->frame_parms.ofdm_symbol_size);
|
||||
gNB->frame_parms.Ncp==EXTENDED?12:14);
|
||||
}
|
||||
phy_procedures_gNB_uespec_RX(gNB, frame_rx, slot_rx);
|
||||
}
|
||||
@@ -430,19 +429,8 @@ void init_gNB_Tpool(int inst) {
|
||||
gNB = RC.gNB[inst];
|
||||
gNB_L1_proc_t *proc = &gNB->proc;
|
||||
|
||||
int numCPU = sysconf(_SC_NPROCESSORS_ONLN);
|
||||
LOG_I(PHY,"Number of threads requested in config file: %d, Number of threads available on this machine: %d\n",gNB->thread_pool_size,numCPU);
|
||||
int threadCnt = min(numCPU, gNB->thread_pool_size);
|
||||
if (threadCnt < 2) LOG_E(PHY,"Number of threads for gNB should be more than 1. Allocated only %d\n",threadCnt);
|
||||
char pool[80];
|
||||
sprintf(pool,"-1");
|
||||
int s_offset = 0;
|
||||
for (int icpu=1; icpu<threadCnt; icpu++) {
|
||||
sprintf(pool+2+s_offset,",-1");
|
||||
s_offset += 3;
|
||||
}
|
||||
if (getenv("noThreads")) strcpy(pool, "n");
|
||||
initTpool(pool, &gNB->threadPool, cpumeas(CPUMEAS_GETSTATE));
|
||||
// ULSCH decoding threadpool
|
||||
initTpool(get_softmodem_params()->threadPoolConfig, &gNB->threadPool, cpumeas(CPUMEAS_GETSTATE));
|
||||
// ULSCH decoder result FIFO
|
||||
initNotifiedFIFO(&gNB->respDecode);
|
||||
|
||||
@@ -536,7 +524,9 @@ void init_eNB_afterRU(void) {
|
||||
RC.nb_nr_inst = 1;
|
||||
for (inst=0; inst<RC.nb_nr_inst; inst++) {
|
||||
LOG_I(PHY,"RC.nb_nr_CC[inst:%d]:%p\n", inst, RC.gNB[inst]);
|
||||
|
||||
gNB = RC.gNB[inst];
|
||||
gNB->ldpc_offload_flag = ldpc_offload_flag;
|
||||
|
||||
phy_init_nr_gNB(gNB,0,0);
|
||||
|
||||
|
||||
@@ -97,7 +97,7 @@
|
||||
#define CONFIG_HLP_WORKER_CMD "two option for worker 'WORKER_DISABLE' or 'WORKER_ENABLE'\n"
|
||||
#define CONFIG_HLP_USRP_THREAD "having extra thead for usrp tx\n"
|
||||
#define CONFIG_HLP_DISABLNBIOT "disable nb-iot, even if defined in config\n"
|
||||
|
||||
#define CONFIG_HLP_LDPC_OFFLOAD "enable LDPC offload\n"
|
||||
#define CONFIG_HLP_USRP_ARGS "set the arguments to identify USRP (same syntax as in UHD)\n"
|
||||
|
||||
#define CONFIG_HLP_FLOG "Enable online log \n"
|
||||
|
||||
@@ -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}, \
|
||||
{"ldpc-offload-enable", CONFIG_HLP_LDPC_OFFLOAD, 0, iptr:&ldpc_offload_flag, defstrval:0, TYPE_INT, 0}, \
|
||||
{"uecap_file", CONFIG_HLP_UECAP_FILE, 0, strptr:&uecap_file, defstrval:"./uecap.xml", TYPE_STRING, 0}, \
|
||||
{"s" , CONFIG_HLP_SNR, 0, dblptr:&snr_dB, defdblval:25, TYPE_DOUBLE, 0}, \
|
||||
}
|
||||
@@ -44,6 +45,7 @@ extern uint32_t target_ul_bw;
|
||||
extern uint64_t dlsch_slot_bitmap;
|
||||
extern uint64_t ulsch_slot_bitmap;
|
||||
extern char *uecap_file;
|
||||
extern int ldpc_offload_flag;
|
||||
|
||||
// In nr-gnb.c
|
||||
extern void init_gNB(int single_thread_flag,int wait_for_sync);
|
||||
|
||||
+1
-1
@@ -679,7 +679,7 @@ void processSlotRX(void *arg) {
|
||||
phy_procedures_slot_parallelization_nrUE_RX( UE, proc, 0, 0, 1, no_relay, NULL );
|
||||
#else
|
||||
uint64_t a=rdtsc_oai();
|
||||
phy_procedures_nrUE_RX(UE, proc, gNB_id, get_nrUE_params()->nr_dlsch_parallel, &phy_pdcch_config, &rxtxD->txFifo);
|
||||
phy_procedures_nrUE_RX(UE, proc, gNB_id, &phy_pdcch_config, &rxtxD->txFifo);
|
||||
LOG_D(PHY, "In %s: slot %d, time %llu\n", __FUNCTION__, proc->nr_slot_rx, (rdtsc_oai()-a)/3500);
|
||||
#endif
|
||||
|
||||
|
||||
@@ -245,20 +245,7 @@ uint64_t set_nrUE_optmask(uint64_t bitmask) {
|
||||
nrUE_params_t *get_nrUE_params(void) {
|
||||
return &nrUE_params;
|
||||
}
|
||||
/* initialie thread pools used for NRUE processing paralleliation */
|
||||
void init_tpools(uint8_t nun_dlsch_threads) {
|
||||
char params[NR_RX_NB_TH*NR_NB_TH_SLOT*3+1]={0};
|
||||
for (int i=0; i<NR_RX_NB_TH*NR_NB_TH_SLOT; i++) {
|
||||
memcpy(params+(i*3),"-1,",3);
|
||||
}
|
||||
if (getenv("noThreads")) {
|
||||
initTpool("n", &(nrUE_params.Tpool), false);
|
||||
init_dlsch_tpool(0);
|
||||
} else {
|
||||
initTpool(params, &(nrUE_params.Tpool), false);
|
||||
init_dlsch_tpool( nun_dlsch_threads);
|
||||
}
|
||||
}
|
||||
|
||||
static void get_options(void) {
|
||||
|
||||
paramdef_t cmdline_params[] =CMDLINE_NRUEPARAMS_DESC ;
|
||||
@@ -442,7 +429,7 @@ int main( int argc, char **argv ) {
|
||||
#if T_TRACER
|
||||
T_Config_Init();
|
||||
#endif
|
||||
init_tpools(nrUE_params.nr_dlsch_parallel);
|
||||
initTpool(get_softmodem_params()->threadPoolConfig, &(nrUE_params.Tpool), cpumeas(CPUMEAS_GETSTATE));
|
||||
//randominit (0);
|
||||
set_taus_seed (0);
|
||||
|
||||
@@ -451,7 +438,7 @@ int main( int argc, char **argv ) {
|
||||
|
||||
init_opt() ;
|
||||
load_nrLDPClib(NULL);
|
||||
|
||||
|
||||
if (ouput_vcd) {
|
||||
vcd_signal_dumper_init("/tmp/openair_dump_nrUE.vcd");
|
||||
}
|
||||
|
||||
@@ -33,7 +33,7 @@
|
||||
{"tx_subdev", CONFIG_HLP_USRP_ARGS, 0, strptr:(char **)&tx_subdev, defstrval:"", TYPE_STRING, 0}, \
|
||||
{"rx_subdev", CONFIG_HLP_USRP_ARGS, 0, strptr:(char **)&rx_subdev, defstrval:"", TYPE_STRING, 0}, \
|
||||
{"single-thread-disable", CONFIG_HLP_NOSNGLT, PARAMFLAG_BOOL, iptr:&single_thread_flag, defintval:1, TYPE_INT, 0}, \
|
||||
{"dlsch-parallel", CONFIG_HLP_DLSCH_PARA, 0, u8ptr:&nrUE_params.nr_dlsch_parallel, defintval:0, TYPE_UINT8, 0}, \
|
||||
{"dlsch-parallel", CONFIG_HLP_DLSCH_PARA, 0, u8ptr:NULL, defintval:0, TYPE_UINT8, 0}, \
|
||||
{"offset-divisor", CONFIG_HLP_OFFSET_DIV, 0, uptr:&nrUE_params.ofdm_offset_divisor, defuintval:8, TYPE_UINT32, 0}, \
|
||||
{"max-ldpc-iterations", CONFIG_HLP_MAX_LDPC_ITERATIONS, 0, u8ptr:&nrUE_params.max_ldpc_iterations, defuintval:5, TYPE_UINT8, 0}, \
|
||||
{"nr-dlsch-demod-shift", CONFIG_HLP_DLSHIFT, 0, iptr:(int32_t *)&nr_dlsch_demod_shift, defintval:0, TYPE_INT, 0}, \
|
||||
@@ -80,7 +80,6 @@
|
||||
typedef struct {
|
||||
uint64_t optmask; //mask to store boolean config options
|
||||
uint32_t ofdm_offset_divisor; // Divisor for sample offset computation for each OFDM symbol
|
||||
uint8_t nr_dlsch_parallel; // number of threads for dlsch decoding, 0 means no parallelization
|
||||
uint8_t max_ldpc_iterations; // number of maximum LDPC iterations
|
||||
tpool_t Tpool; // thread pool
|
||||
} nrUE_params_t;
|
||||
|
||||
@@ -46,7 +46,7 @@ static softmodem_params_t softmodem_params;
|
||||
char *parallel_config=NULL;
|
||||
char *worker_config=NULL;
|
||||
int usrp_tx_thread = 0;
|
||||
|
||||
int ldpc_offload_flag=0;
|
||||
uint8_t nfapi_mode=0;
|
||||
|
||||
static mapping softmodem_funcs[] = MAPPING_SOFTMODEM_FUNCTIONS;
|
||||
|
||||
@@ -139,7 +139,7 @@ extern int usrp_tx_thread;
|
||||
#define CMDLINE_PARAMS_DESC { \
|
||||
{"rf-config-file", CONFIG_HLP_RFCFGF, 0, strptr:&RF_CONFIG_FILE, defstrval:NULL, TYPE_STRING, 0},\
|
||||
{"split73", CONFIG_HLP_SPLIT73, 0, strptr:&SPLIT73, defstrval:NULL, TYPE_STRING, 0}, \
|
||||
{"thread-pool", CONFIG_HLP_TPOOL, 0, strptr:&TP_CONFIG, defstrval:"n", TYPE_STRING, 0}, \
|
||||
{"thread-pool", CONFIG_HLP_TPOOL, 0, strptr:&TP_CONFIG, defstrval:"-1,-1,-1,-1,-1,-1,-1,-1", TYPE_STRING, 0}, \
|
||||
{"phy-test", CONFIG_HLP_PHYTST, PARAMFLAG_BOOL, iptr:&PHY_TEST, defintval:0, TYPE_INT, 0}, \
|
||||
{"do-ra", CONFIG_HLP_DORA, PARAMFLAG_BOOL, iptr:&DO_RA, defintval:0, TYPE_INT, 0}, \
|
||||
{"sa", CONFIG_HLP_SA, PARAMFLAG_BOOL, iptr:&SA, defintval:0, TYPE_INT, 0}, \
|
||||
@@ -283,6 +283,7 @@ extern int32_t uplink_frequency_offset[MAX_NUM_CCs][4];
|
||||
extern int usrp_tx_thread;
|
||||
extern uint16_t sl_ahead;
|
||||
extern uint16_t sf_ahead;
|
||||
extern int ldpc_offload_flag;
|
||||
extern int oai_exit;
|
||||
|
||||
void tx_func(void *param);
|
||||
|
||||
Reference in New Issue
Block a user