Resolved build warnings(25+) and 5G nFAPI downlink errors(future_ul_tti_request)
This commit is contained in:
+3
-11
@@ -146,9 +146,6 @@ extern void add_subframe(uint16_t *frameP, uint16_t *subframeP, int offset);
|
||||
static inline int rxtx(PHY_VARS_gNB *gNB, int frame_rx, int slot_rx, int frame_tx, int slot_tx, char *thread_name) {
|
||||
struct timespec current;
|
||||
clock_gettime(CLOCK_MONOTONIC, ¤t);
|
||||
//LOG_I(PHY,"%sCurrent time %d.%d,frame_rx %d,slot_rx %d,frame_tx %d,slot_tx %d\n", __FUNCTION__, current.tv_sec,current.tv_nsec,frame_rx,slot_rx,frame_tx,slot_tx);
|
||||
// if(nfapi_mode!=0)
|
||||
// sf_ahead = (uint16_t) ceil((float)6/(0x01<<gNB->frame_parms.numerology_index));
|
||||
|
||||
sl_ahead = sf_ahead*gNB->frame_parms.slots_per_subframe;
|
||||
nfapi_nr_config_request_scf_t *cfg = &gNB->gNB_config;
|
||||
@@ -157,7 +154,7 @@ clock_gettime(CLOCK_MONOTONIC, ¤t);
|
||||
|
||||
// *******************************************************************
|
||||
// NFAPI not yet supported for NR - this code has to be revised
|
||||
if (nfapi_mode == NFAPI_MODE_PNF) {
|
||||
if (NFAPI_MODE == NFAPI_MODE_PNF) {
|
||||
// I am a PNF and I need to let nFAPI know that we have a (sub)frame tick
|
||||
//add_subframe(&frame, &subframe, 4);
|
||||
//oai_subframe_ind(proc->frame_tx, proc->subframe_tx);
|
||||
@@ -187,7 +184,6 @@ clock_gettime(CLOCK_MONOTONIC, ¤t);
|
||||
// ****************************************
|
||||
|
||||
T(T_GNB_PHY_DL_TICK, T_INT(gNB->Mod_id), T_INT(frame_tx), T_INT(slot_tx));
|
||||
|
||||
/* hack to remove UEs */
|
||||
extern int rnti_to_remove[10];
|
||||
extern volatile int rnti_to_remove_count;
|
||||
@@ -248,16 +244,15 @@ clock_gettime(CLOCK_MONOTONIC, ¤t);
|
||||
}
|
||||
*/
|
||||
// Call the scheduler
|
||||
|
||||
pthread_mutex_lock(&gNB->UL_INFO_mutex);
|
||||
gNB->UL_INFO.frame = frame_rx;
|
||||
gNB->UL_INFO.slot = slot_rx;
|
||||
gNB->UL_INFO.module_id = gNB->Mod_id;
|
||||
gNB->UL_INFO.CC_id = gNB->CC_id;
|
||||
|
||||
gNB->if_inst->NR_UL_indication(&gNB->UL_INFO);
|
||||
|
||||
pthread_mutex_unlock(&gNB->UL_INFO_mutex);
|
||||
|
||||
// RX processing
|
||||
int tx_slot_type = nr_slot_select(cfg,frame_tx,slot_tx);
|
||||
int rx_slot_type = nr_slot_select(cfg,frame_rx,slot_rx);
|
||||
|
||||
@@ -408,7 +403,6 @@ static void *gNB_L1_thread( void *param ) {
|
||||
while (!oai_exit) {
|
||||
struct timespec t;
|
||||
clock_gettime(CLOCK_MONOTONIC,&t);
|
||||
//printf("\nbefore time %d.%d\n",t.tv_sec,t.tv_nsec);
|
||||
VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME( VCD_SIGNAL_DUMPER_FUNCTIONS_gNB_PROC_RXTX0, 0 );
|
||||
if (wait_on_condition(&L1_proc->mutex,&L1_proc->cond,&L1_proc->instance_cnt,thread_name)<0) break;
|
||||
VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME( VCD_SIGNAL_DUMPER_FUNCTIONS_gNB_PROC_RXTX0, 1 );
|
||||
@@ -419,8 +413,6 @@ static void *gNB_L1_thread( void *param ) {
|
||||
int frame_tx = L1_proc->frame_tx;
|
||||
int slot_tx = L1_proc->slot_tx;
|
||||
uint64_t timestamp_tx = L1_proc->timestamp_tx;
|
||||
|
||||
//printf("\nframe %d slot %d after wait time %d.%d\n",frame_rx,slot_rx,t.tv_sec,t.tv_nsec);
|
||||
|
||||
|
||||
VCD_SIGNAL_DUMPER_DUMP_VARIABLE_BY_NAME(VCD_SIGNAL_DUMPER_VARIABLES_SLOT_NUMBER_TX0_GNB,slot_tx);
|
||||
|
||||
+1
-1
@@ -1565,7 +1565,7 @@ void *ru_thread( void *param ) {
|
||||
if((slot_start.tv_sec > curr_time.tv_sec) || (slot_start.tv_sec == curr_time.tv_sec && slot_start.tv_nsec > curr_time.tv_nsec)){
|
||||
sleep_time = timespec_sub(slot_start,curr_time);
|
||||
|
||||
usleep(sleep_time.tv_nsec * 1e-3);
|
||||
usleep(sleep_time.tv_nsec * 1e-3);
|
||||
}
|
||||
else{//continue
|
||||
}
|
||||
|
||||
@@ -915,7 +915,7 @@ if(!IS_SOFTMODEM_NOS1)
|
||||
|
||||
usleep(1000);
|
||||
|
||||
if (nfapi_mode) {
|
||||
if (NFAPI_MODE) {
|
||||
printf("NFAPI*** - mutex and cond created - will block shortly for completion of PNF connection\n");
|
||||
pthread_cond_init(&sync_cond,NULL);
|
||||
pthread_mutex_init(&sync_mutex, NULL);
|
||||
@@ -923,7 +923,7 @@ if(!IS_SOFTMODEM_NOS1)
|
||||
|
||||
const char *nfapi_mode_str = "<UNKNOWN>";
|
||||
|
||||
switch(nfapi_mode) {
|
||||
switch(NFAPI_MODE) {
|
||||
case 0:
|
||||
nfapi_mode_str = "MONOLITHIC";
|
||||
break;
|
||||
@@ -943,7 +943,7 @@ if(!IS_SOFTMODEM_NOS1)
|
||||
|
||||
printf("NFAPI MODE:%s\n", nfapi_mode_str);
|
||||
|
||||
if (nfapi_mode==NFAPI_MODE_VNF) // VNF
|
||||
if (NFAPI_MODE==NFAPI_MODE_VNF) // VNF
|
||||
wait_nfapi_init("main?");
|
||||
|
||||
printf("START MAIN THREADS\n");
|
||||
@@ -972,7 +972,7 @@ if(!IS_SOFTMODEM_NOS1)
|
||||
|
||||
config_sync_var=0;
|
||||
|
||||
if (nfapi_mode==NFAPI_MODE_PNF) { // PNF
|
||||
if (NFAPI_MODE==NFAPI_MODE_PNF) { // PNF
|
||||
wait_nfapi_init("main?");
|
||||
}
|
||||
|
||||
@@ -992,7 +992,7 @@ if(!IS_SOFTMODEM_NOS1)
|
||||
load_softscope("nr",&p);
|
||||
}
|
||||
|
||||
if (nfapi_mode != NFAPI_MODE_PNF && nfapi_mode != NFAPI_MODE_VNF) {
|
||||
if (NFAPI_MODE != NFAPI_MODE_PNF && NFAPI_MODE != NFAPI_MODE_VNF) {
|
||||
printf("Not NFAPI mode - call init_eNB_afterRU()\n");
|
||||
init_eNB_afterRU();
|
||||
} else {
|
||||
|
||||
@@ -39,11 +39,13 @@
|
||||
#include "executables/thread-common.h"
|
||||
#include "common/utils/LOG/log.h"
|
||||
#include "softmodem-common.h"
|
||||
#include "nfapi/oai_integration/vendor_ext.h"
|
||||
|
||||
|
||||
static softmodem_params_t softmodem_params;
|
||||
char *parallel_config=NULL;
|
||||
char *worker_config=NULL;
|
||||
|
||||
uint8_t nfapi_mode=0;
|
||||
|
||||
static mapping softmodem_funcs[] = MAPPING_SOFTMODEM_FUNCTIONS;
|
||||
static struct timespec start;
|
||||
@@ -143,6 +145,7 @@ void get_common_options(uint32_t execmask) {
|
||||
if(parallel_config != NULL) set_parallel_conf(parallel_config);
|
||||
|
||||
if(worker_config != NULL) set_worker_conf(worker_config);
|
||||
nfapi_setmode(nfapi_mode);
|
||||
}
|
||||
void softmodem_printresources(int sig, telnet_printfunc_t pf) {
|
||||
struct rusage usage;
|
||||
|
||||
@@ -90,7 +90,7 @@ extern "C"
|
||||
#define CONFIG_HLP_RFSIM "Run in rf simulator mode (also known as basic simulator)\n"
|
||||
#define CONFIG_HLP_NOKRNMOD "(noS1 only): Use tun instead of namesh module \n"
|
||||
#define CONFIG_HLP_DISABLNBIOT "disable nb-iot, even if defined in config\n"
|
||||
|
||||
#define CONFIG_HLP_NFAPI "Change the nFAPI mode for NR\n"
|
||||
/*-----------------------------------------------------------------------------------------------------------------------------------------------------*/
|
||||
/* command line parameters common to eNodeB and UE */
|
||||
/* optname helpstr paramflags XXXptr defXXXval type numelt */
|
||||
@@ -110,6 +110,7 @@ extern "C"
|
||||
#define SEND_DMRSSYNC softmodem_params.send_dmrs_sync
|
||||
#define USIM_TEST softmodem_params.usim_test
|
||||
#define USE_256QAM_TABLE softmodem_params.use_256qam_table
|
||||
#define NFAPI softmodem_params.nfapi
|
||||
|
||||
#define DEFAULT_RFCONFIG_FILE "/usr/local/etc/syriq/ue.band7.tm1.PRB100.NR40.dat";
|
||||
|
||||
@@ -139,6 +140,7 @@ extern "C"
|
||||
{"nokrnmod", CONFIG_HLP_NOKRNMOD, PARAMFLAG_BOOL, uptr:&nokrnmod, defintval:0, TYPE_INT, 0}, \
|
||||
{"nbiot-disable", CONFIG_HLP_DISABLNBIOT, PARAMFLAG_BOOL, uptr:&nonbiot, defuintval:0, TYPE_INT, 0}, \
|
||||
{"use-256qam-table", CONFIG_HLP_256QAM, PARAMFLAG_BOOL, iptr:&USE_256QAM_TABLE, defintval:0, TYPE_INT, 0}, \
|
||||
{"nfapi", CONFIG_HLP_NFAPI, 0, u8ptr:&nfapi_mode, defintval:0, TYPE_UINT8, 0}, \
|
||||
}
|
||||
|
||||
|
||||
@@ -225,6 +227,8 @@ typedef struct {
|
||||
int hw_timing_advance;
|
||||
uint32_t send_dmrs_sync;
|
||||
int use_256qam_table;
|
||||
uint8_t nfapi;
|
||||
|
||||
} softmodem_params_t;
|
||||
|
||||
extern uint64_t get_softmodem_optmask(void);
|
||||
@@ -236,6 +240,8 @@ extern char *get_softmodem_function(uint64_t *sofmodemfunc_mask_ptr);
|
||||
extern void set_softmodem_sighandler(void);
|
||||
extern uint64_t downlink_frequency[MAX_NUM_CCs][4];
|
||||
extern int32_t uplink_frequency_offset[MAX_NUM_CCs][4];
|
||||
extern uint8_t nfapi_mode;
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
Reference in New Issue
Block a user