Commit 31b2ea77 authored by Florian Kaltenberger's avatar Florian Kaltenberger

Merge remote-tracking branch 'origin/uhd_set_thread_prio' into integration_develop-nr_2019w24

parents b170fc31 fb632d10
......@@ -313,6 +313,7 @@ const char* eurecomFunctionsNames[] = {
"phy_enb_prach_rx",
"phy_ru_prach_rx",
"phy_enb_pdcch_tx",
"phy_enb_common_tx",
"phy_enb_rs_tx",
"phy_ue_generate_prach",
"phy_ue_ulsch_modulation",
......
......@@ -292,6 +292,7 @@ typedef enum {
VCD_SIGNAL_DUMPER_FUNCTIONS_PHY_ENB_PRACH_RX,
VCD_SIGNAL_DUMPER_FUNCTIONS_PHY_RU_PRACH_RX,
VCD_SIGNAL_DUMPER_FUNCTIONS_PHY_ENB_PDCCH_TX,
VCD_SIGNAL_DUMPER_FUNCTIONS_PHY_ENB_COMMON_TX,
VCD_SIGNAL_DUMPER_FUNCTIONS_PHY_ENB_RS_TX,
VCD_SIGNAL_DUMPER_FUNCTIONS_UE_GENERATE_PRACH,
VCD_SIGNAL_DUMPER_FUNCTIONS_UE_ULSCH_MODULATION,
......
......@@ -41,7 +41,7 @@ typedef struct {
} T_cache_t;
/* number of VCD functions (to be kept up to date! see in T_messages.txt) */
#define VCD_NUM_FUNCTIONS 192//190
#define VCD_NUM_FUNCTIONS 193//192//190
/* number of VCD variables (to be kept up to date! see in T_messages.txt) */
#define VCD_NUM_VARIABLES 136//128
......
......@@ -2249,6 +2249,11 @@ ID = VCD_FUNCTION_PHY_ENB_PDCCH_TX
GROUP = ALL:VCD:ENB:VCD_FUNCTION
FORMAT = int,value
VCD_NAME = phy_enb_pdcch_tx
ID = VCD_FUNCTION_PHY_ENB_COMMON_TX
DESC = VCD function PHY_ENB_COMMON_TX
GROUP = ALL:VCD:ENB:VCD_FUNCTION
FORMAT = int,value
VCD_NAME = phy_enb_common_tx
ID = VCD_FUNCTION_PHY_ENB_RS_TX
DESC = VCD function PHY_ENB_RS_TX
GROUP = ALL:VCD:ENB:VCD_FUNCTION
......
......@@ -415,9 +415,6 @@ int wakeup_txfh(PHY_VARS_gNB *gNB,gNB_L1_rxtx_proc_t *proc,int frame_tx,int slot
RU_proc_t *ru_proc;
int waitret,ret;
struct timespec wait;
wait.tv_sec=0;
wait.tv_nsec=10000000L;
......@@ -489,10 +486,6 @@ int wakeup_tx(PHY_VARS_gNB *gNB,int frame_rx,int slot_rx,int frame_tx,int slot_t
int ret;
struct timespec wait;
wait.tv_sec=0;
wait.tv_nsec=5000000L;
AssertFatal((ret = pthread_mutex_lock(&L1_proc_tx->mutex))==0,"mutex_lock returns %d\n",ret);
......@@ -529,7 +522,6 @@ int wakeup_rxtx(PHY_VARS_gNB *gNB,RU_t *ru) {
RU_proc_t *ru_proc=&ru->proc;
int ret;
int i;
struct timespec wait;
AssertFatal((ret=pthread_mutex_lock(&proc->mutex_RU))==0,"mutex_lock returns %d\n",ret);
for (i=0;i<gNB->num_RU;i++) {
......@@ -551,9 +543,6 @@ int wakeup_rxtx(PHY_VARS_gNB *gNB,RU_t *ru) {
}
wait.tv_sec=0;
wait.tv_nsec=5000000L;
// wake up TX for subframe n+sl_ahead
// lock the TX mutex and make sure the thread is ready
AssertFatal((ret=pthread_mutex_lock(&L1_proc->mutex)) == 0,"mutex_lock returns %d\n", ret);
......
......@@ -1208,6 +1208,12 @@ static void *ru_thread_tx( void *param ) {
int i = 0;
int ret;
if(ru->if_south == LOCAL_RF)
{
uhd_set_thread_prio();
LOG_I(PHY,"set ru_thread_tx uhd priority");
}
wait_on_condition(&proc->mutex_FH1,&proc->cond_FH1,&proc->instance_cnt_FH1,"ru_thread_tx");
printf( "ru_thread_tx ready\n");
......
......@@ -168,10 +168,12 @@ void phy_procedures_gNB_TX(PHY_VARS_gNB *gNB,
memset(gNB->common_vars.txdataF[aa],0,fp->samples_per_slot_wCP*sizeof(int32_t));
}
VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME(VCD_SIGNAL_DUMPER_FUNCTIONS_PHY_ENB_COMMON_TX,1);
if (nfapi_mode == 0 || nfapi_mode == 1) {
if (!(frame%ssb_frame_periodicity)) // generate SSB only for given frames according to SSB periodicity
nr_common_signal_procedures(gNB,frame, slot);
}
VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME(VCD_SIGNAL_DUMPER_FUNCTIONS_PHY_ENB_COMMON_TX,0);
num_dci = gNB->pdcch_vars.num_dci;
num_pdsch_rnti = gNB->pdcch_vars.num_pdsch_rnti;
......
......@@ -43,7 +43,7 @@
int set_device(openair0_device *device) {
switch (device->type) {
case EXMIMO_DEV:
LOG_I(HW,"[%s] has loaded EXPRESS MIMO device.\n",((device->host_type == RAU_HOST) ? "RAU": "RRU"));
break;
......@@ -95,6 +95,8 @@ int set_transport(openair0_device *device) {
}
typedef int(*devfunc_t)(openair0_device *, openair0_config_t *, eth_params_t *);
//loader_shlibfunc_t shlib_fdesc[2];
/* look for the interface library and load it */
int load_lib(openair0_device *device, openair0_config_t *openair0_cfg, eth_params_t * cfg, uint8_t flag) {
......@@ -102,11 +104,12 @@ int load_lib(openair0_device *device, openair0_config_t *openair0_cfg, eth_param
int ret=0;
char *libname;
if (flag == RAU_LOCAL_RADIO_HEAD) {
if (getenv("RFSIMULATOR") != NULL)
libname="rfsimulator";
else
if (getenv("RFSIMULATOR") != NULL)
libname="rfsimulator";
else
libname=OAI_RF_LIBNAME;
shlib_fdesc[0].fname="device_init";
//shlib_fdesc[1].fname="uhd_set_thread_priority";
} else {
libname=OAI_TP_LIBNAME;
shlib_fdesc[0].fname="transport_init";
......@@ -116,11 +119,32 @@ int load_lib(openair0_device *device, openair0_config_t *openair0_cfg, eth_param
LOG_E(HW,"Library %s couldn't be loaded\n",libname);
} else {
ret=((devfunc_t)shlib_fdesc[0].fptr)(device,openair0_cfg,cfg);
//uhd_set_thread_priority_fun = (set_prio_func_t)shlib_fdesc[1].fptr;
}
return ret;
}
void uhd_set_thread_prio(void) {
loader_shlibfunc_t shlib_fdesc[1];
int ret = 0;
char *libname;
if (getenv("RFSIMULATOR") != NULL)
libname="rfsimulator";
else
libname=OAI_RF_LIBNAME;
shlib_fdesc[0].fname="uhd_set_thread_priority";
ret=load_module_shlib(libname,shlib_fdesc,1,NULL);
if (ret < 0) {
LOG_E(HW,"Library %s couldn't be loaded\n",libname);
} else {
(set_prio_func_t)shlib_fdesc[0].fptr();
}
return ret;
}
int openair0_device_load(openair0_device *device, openair0_config_t *openair0_cfg) {
......
......@@ -445,6 +445,10 @@ int openair0_set_rx_frequencies(openair0_device *device, openair0_config_t *open
#define gettid() syscall(__NR_gettid)
/*@}*/
void uhd_set_thread_prio(void);
typedef void(*set_prio_func_t)(void);
set_prio_func_t uhd_set_thread_priority_fun;
#ifdef __cplusplus
}
#endif
......
......@@ -1462,5 +1462,10 @@ extern "C" {
#endif
return 0;
}
void uhd_set_thread_priority(void) {
uhd::set_thread_priority_safe(1.0);
}
}
/*@}*/
......@@ -254,7 +254,7 @@ RUs = (
max_pdschReferenceSignalPower = -27;
max_rxgain = 114;
eNB_instances = [0];
sdr_addrs = "addr=192.168.10.2,second_addr=192.168.20.2,mgmt_addr=192.168.100.8,clock_source=external,time_source=external";
sdr_addrs = "addr=192.168.10.2,second_addr=192.168.20.2,mgmt_addr=192.168.10.2,clock_source=external,time_source=external";
}
);
......
......@@ -254,7 +254,7 @@ RUs = (
max_pdschReferenceSignalPower = -27;
max_rxgain = 114;
eNB_instances = [0];
sdr_addrs = "addr=192.168.30.2";
sdr_addrs = "type=x300";
}
);
......
......@@ -254,7 +254,7 @@ RUs = (
max_pdschReferenceSignalPower = -27;
max_rxgain = 114;
eNB_instances = [0];
sdr_addrs = "addr=192.168.10.2,mgmt_addr=192.168.100.8";
sdr_addrs = "addr=192.168.10.2,mgmt_addr=192.168.10.2";
clock_src = "external";
}
);
......
......@@ -254,7 +254,7 @@ RUs = (
max_pdschReferenceSignalPower = -27;
max_rxgain = 114;
eNB_instances = [0];
sdr_addrs = "addr=192.168.30.2";
sdr_addrs = "type=x300";
}
);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment