Merge remote-tracking branch 'origin/develop' into threading-rk
This commit is contained in:
@@ -51,6 +51,7 @@
|
||||
#include "PHY/defs_common.h"
|
||||
#include "PHY/types.h"
|
||||
#include "PHY/INIT/phy_init.h"
|
||||
#include "PHY/phy_extern.h"
|
||||
#include "PHY/LTE_ESTIMATION/lte_estimation.h"
|
||||
#include "PHY/LTE_REFSIG/lte_refsig.h"
|
||||
#include "PHY/LTE_TRANSPORT/if4_tools.h"
|
||||
@@ -105,13 +106,6 @@ void wait_eNBs(void);
|
||||
|
||||
const char ru_states[6][9] = {"RU_IDLE","RU_CONFIG","RU_READY","RU_RUN","RU_ERROR","RU_SYNC"};
|
||||
|
||||
extern const char NB_functions[7][20];
|
||||
extern const char NB_timing[2][20];
|
||||
|
||||
|
||||
extern const char ru_if_types[MAX_RU_IF_TYPES][20];
|
||||
|
||||
|
||||
#if defined(PRE_SCD_THREAD)
|
||||
#include "common/ran_context.h"
|
||||
#include "nfapi/oai_integration/vendor_ext.h"
|
||||
|
||||
@@ -77,6 +77,7 @@ unsigned short config_frames[4] = {2,9,11,13};
|
||||
|
||||
#include "create_tasks.h"
|
||||
|
||||
#include "pdcp.h"
|
||||
|
||||
#include "PHY/INIT/phy_init.h"
|
||||
|
||||
@@ -241,8 +242,8 @@ unsigned int build_rfdc(int dcoff_i_rxfe, int dcoff_q_rxfe) {
|
||||
return (dcoff_i_rxfe + (dcoff_q_rxfe<<8));
|
||||
}
|
||||
|
||||
|
||||
void exit_function(const char *file, const char *function, const int line, const char *s) {
|
||||
void exit_function(const char *file, const char *function, const int line, const char *s, const int assert)
|
||||
{
|
||||
int ru_id;
|
||||
|
||||
if (s != NULL) {
|
||||
@@ -266,8 +267,12 @@ void exit_function(const char *file, const char *function, const int line, const
|
||||
}
|
||||
}
|
||||
|
||||
sleep(1); //allow lte-softmodem threads to exit first
|
||||
exit(1);
|
||||
if (assert) {
|
||||
abort();
|
||||
} else {
|
||||
sleep(1); // allow lte-softmodem threads to exit first
|
||||
exit(EXIT_SUCCESS);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -39,6 +39,7 @@
|
||||
#include "assertions.h"
|
||||
|
||||
#include "PHY/types.h"
|
||||
#include "pdcp.h"
|
||||
|
||||
#include "PHY/defs_UE.h"
|
||||
#include "common/ran_context.h"
|
||||
@@ -244,7 +245,7 @@ unsigned int build_rfdc(int dcoff_i_rxfe, int dcoff_q_rxfe) {
|
||||
}
|
||||
|
||||
|
||||
void exit_function(const char *file, const char *function, const int line, const char *s) {
|
||||
void exit_function(const char *file, const char *function, const int line, const char *s, const int assert) {
|
||||
int CC_id;
|
||||
logClean();
|
||||
printf("%s:%d %s() Exiting OAI softmodem: %s\n",file,line, function, ((s==NULL)?"":s));
|
||||
@@ -258,12 +259,15 @@ void exit_function(const char *file, const char *function, const int line, const
|
||||
PHY_vars_UE_g[0][CC_id]->rfdevice.trx_end_func(&PHY_vars_UE_g[0][CC_id]->rfdevice);
|
||||
}
|
||||
|
||||
sleep(1); //allow lte-softmodem threads to exit first
|
||||
|
||||
if(PHY_vars_UE_g != NULL )
|
||||
itti_terminate_tasks (TASK_UNKNOWN);
|
||||
|
||||
exit(1);
|
||||
if (assert) {
|
||||
abort();
|
||||
} else {
|
||||
sleep(1); // allow lte-softmodem threads to exit first
|
||||
exit(EXIT_SUCCESS);
|
||||
}
|
||||
}
|
||||
|
||||
extern int16_t dlsch_demod_shift;
|
||||
|
||||
+11
-5
@@ -49,12 +49,14 @@
|
||||
#include "radio/ETHERNET/USERSPACE/LIB/if_defs.h"
|
||||
|
||||
#include "PHY/phy_vars.h"
|
||||
#include "PHY/phy_extern.h"
|
||||
#include "PHY/TOOLS/phy_scope_interface.h"
|
||||
#include "common/utils/LOG/log.h"
|
||||
#include "common/utils/LOG/vcd_signal_dumper.h"
|
||||
#include "PHY/INIT/phy_init.h"
|
||||
#include "openair2/ENB_APP/enb_paramdef.h"
|
||||
#include "system.h"
|
||||
#include "nfapi/oai_integration/vendor_ext.h"
|
||||
|
||||
#include <executables/softmodem-common.h>
|
||||
#include <executables/thread-common.h>
|
||||
@@ -85,7 +87,7 @@ int32_t uplink_frequency_offset[MAX_NUM_CCs][4];
|
||||
|
||||
|
||||
void nfapi_setmode(nfapi_mode_t nfapi_mode) { return; }
|
||||
void exit_function(const char *file, const char *function, const int line, const char *s) {
|
||||
void exit_function(const char *file, const char *function, const int line, const char *s, const int assert) {
|
||||
|
||||
if (s != NULL) {
|
||||
printf("%s:%d %s() Exiting OAI softmodem: %s\n",file,line, function, s);
|
||||
@@ -102,11 +104,15 @@ void exit_function(const char *file, const char *function, const int line, const
|
||||
ru_m.ifdevice.trx_end_func(&ru_m.ifdevice);
|
||||
ru_m.ifdevice.trx_end_func = NULL;
|
||||
}
|
||||
|
||||
|
||||
pthread_mutex_destroy(ru_m.ru_mutex);
|
||||
pthread_cond_destroy(ru_m.ru_cond);
|
||||
sleep(1); //allow lte-softmodem threads to exit first
|
||||
exit(1);
|
||||
pthread_cond_destroy(ru_m.ru_cond);
|
||||
if (assert) {
|
||||
abort();
|
||||
} else {
|
||||
sleep(1); // allow lte-softmodem threads to exit first
|
||||
exit(EXIT_SUCCESS);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -28,6 +28,7 @@
|
||||
#include "nfapi/oai_integration/vendor_ext.h"
|
||||
#include "openair2/F1AP/f1ap_common.h"
|
||||
#include "openair2/GNB_APP/gnb_config.h"
|
||||
#include "pdcp.h"
|
||||
|
||||
RAN_CONTEXT_t RC;
|
||||
THREAD_STRUCT thread_struct;
|
||||
@@ -36,10 +37,15 @@ int32_t uplink_frequency_offset[MAX_NUM_CCs][4];
|
||||
int asn1_xer_print;
|
||||
int oai_exit = 0;
|
||||
instance_t CUuniqInstance = 0;
|
||||
RRC_release_list_t rrc_release_info;
|
||||
|
||||
void exit_function(const char *file, const char *function, const int line, const char *s)
|
||||
void exit_function(const char *file, const char *function, const int line, const char *s, const int assert)
|
||||
{
|
||||
if (assert) {
|
||||
abort();
|
||||
} else {
|
||||
sleep(1); // allow other threads to exit first
|
||||
exit(EXIT_SUCCESS);
|
||||
}
|
||||
}
|
||||
|
||||
nfapi_mode_t nfapi_mod = -1;
|
||||
@@ -93,14 +99,9 @@ void nr_rlc_bearer_init_ul_spec(struct NR_LogicalChannelConfig *mac_LogicalChann
|
||||
abort();
|
||||
}
|
||||
|
||||
rlc_op_status_t nr_rrc_rlc_config_asn1_req(const protocol_ctxt_t *const ctxt_pP,
|
||||
const NR_SRB_ToAddModList_t *const srb2add_listP,
|
||||
const NR_DRB_ToAddModList_t *const drb2add_listP,
|
||||
const NR_DRB_ToReleaseList_t *const drb2release_listP,
|
||||
struct NR_CellGroupConfig__rlc_BearerToAddModList *rlc_bearer2add_list)
|
||||
void nr_rlc_add_drb(int rnti, int drb_id, const NR_RLC_BearerConfig_t *rlc_BearerConfig)
|
||||
{
|
||||
abort();
|
||||
return 0;
|
||||
}
|
||||
|
||||
int nr_rrc_gNB_process_GTPV1U_CREATE_TUNNEL_RESP(const protocol_ctxt_t *const ctxt_pP, const gtpv1u_gnb_create_tunnel_resp_t *const create_tunnel_resp_p, int offset)
|
||||
|
||||
@@ -42,7 +42,7 @@
|
||||
|
||||
#include "PHY/types.h"
|
||||
|
||||
#include "PHY/INIT/phy_init.h"
|
||||
#include "PHY/INIT/nr_phy_init.h"
|
||||
|
||||
#include "PHY/defs_gNB.h"
|
||||
#include "SCHED/sched_eNB.h"
|
||||
@@ -230,7 +230,7 @@ void rx_func(void *param) {
|
||||
gNB->ulsch[j]->harq_mask = 0;
|
||||
int h;
|
||||
for (h = 0; h < NR_MAX_ULSCH_HARQ_PROCESSES; h++) {
|
||||
gNB->ulsch[j]->harq_processes[h]->status = SCH_IDLE;
|
||||
gNB->ulsch[j]->harq_processes[h]->status = NR_SCH_IDLE;
|
||||
gNB->ulsch[j]->harq_processes[h]->round = 0;
|
||||
gNB->ulsch[j]->harq_processes[h]->handled = 0;
|
||||
}
|
||||
@@ -639,7 +639,7 @@ void init_eNB_afterRU(void) {
|
||||
for (i=0; i<gNB->RU_list[ru_id]->nb_rx; aa++,i++) {
|
||||
LOG_I(PHY,"Attaching RU %d antenna %d to gNB antenna %d\n",gNB->RU_list[ru_id]->idx,i,aa);
|
||||
gNB->prach_vars.rxsigF[aa] = gNB->RU_list[ru_id]->prach_rxsigF[0][i];
|
||||
gNB->common_vars.rxdataF[aa] = gNB->RU_list[ru_id]->common.rxdataF[i];
|
||||
gNB->common_vars.rxdataF[aa] = (c16_t *)gNB->RU_list[ru_id]->common.rxdataF[i];
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
+11
-1
@@ -46,7 +46,7 @@
|
||||
#include "PHY/defs_nr_common.h"
|
||||
#include "PHY/phy_extern.h"
|
||||
#include "PHY/NR_TRANSPORT/nr_transport_proto.h"
|
||||
#include "PHY/INIT/phy_init.h"
|
||||
#include "PHY/INIT/nr_phy_init.h"
|
||||
#include "SCHED_NR/sched_nr.h"
|
||||
|
||||
#include "common/utils/LOG/log.h"
|
||||
@@ -1860,6 +1860,16 @@ static void NRRCconfig_RU(void) {
|
||||
RC.ru[j]->openair0_cfg.sdr_addrs = strdup(*(RUParamList.paramarray[j][RU_SDR_ADDRS].strptr));
|
||||
}
|
||||
|
||||
if (config_isparamset(RUParamList.paramarray[j], RU_TX_SUBDEV)) {
|
||||
RC.ru[j]->openair0_cfg.tx_subdev = strdup(*(RUParamList.paramarray[j][RU_TX_SUBDEV].strptr));
|
||||
LOG_I(PHY, "RU USRP tx subdev == %s\n", RC.ru[j]->openair0_cfg.tx_subdev);
|
||||
}
|
||||
|
||||
if (config_isparamset(RUParamList.paramarray[j], RU_RX_SUBDEV)) {
|
||||
RC.ru[j]->openair0_cfg.rx_subdev = strdup(*(RUParamList.paramarray[j][RU_RX_SUBDEV].strptr));
|
||||
LOG_I(PHY, "RU USRP rx subdev == %s\n", RC.ru[j]->openair0_cfg.rx_subdev);
|
||||
}
|
||||
|
||||
if (config_isparamset(RUParamList.paramarray[j], RU_SDR_CLK_SRC)) {
|
||||
if (strcmp(*(RUParamList.paramarray[j][RU_SDR_CLK_SRC].strptr), "internal") == 0) {
|
||||
RC.ru[j]->openair0_cfg.clock_source = internal;
|
||||
|
||||
@@ -59,10 +59,11 @@ unsigned short config_frames[4] = {2,9,11,13};
|
||||
#include "common/utils/LOG/log.h"
|
||||
#include "common/utils/LOG/vcd_signal_dumper.h"
|
||||
#include "UTIL/OPT/opt.h"
|
||||
#include "pdcp.h"
|
||||
|
||||
#include "intertask_interface.h"
|
||||
|
||||
#include "PHY/INIT/phy_init.h"
|
||||
#include "PHY/INIT/nr_phy_init.h"
|
||||
|
||||
#include "system.h"
|
||||
#include <openair2/GNB_APP/gnb_app.h>
|
||||
@@ -249,8 +250,8 @@ unsigned int build_rfdc(int dcoff_i_rxfe, int dcoff_q_rxfe) {
|
||||
#define KBLU "\x1B[34m"
|
||||
#define RESET "\033[0m"
|
||||
|
||||
|
||||
void exit_function(const char *file, const char *function, const int line, const char *s) {
|
||||
void exit_function(const char *file, const char *function, const int line, const char *s, const int assert)
|
||||
{
|
||||
int ru_id;
|
||||
|
||||
if (s != NULL) {
|
||||
@@ -274,8 +275,12 @@ void exit_function(const char *file, const char *function, const int line, const
|
||||
}
|
||||
}
|
||||
|
||||
sleep(1); //allow lte-softmodem threads to exit first
|
||||
exit(1);
|
||||
if (assert) {
|
||||
abort();
|
||||
} else {
|
||||
sleep(1); // allow nr-softmodem threads to exit first
|
||||
exit(EXIT_SUCCESS);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -528,7 +533,7 @@ void wait_gNBs(void) {
|
||||
void terminate_task(task_id_t task_id, module_id_t mod_id) {
|
||||
LOG_I(GNB_APP, "sending TERMINATE_MESSAGE to task %s (%d)\n", itti_get_task_name(task_id), task_id);
|
||||
MessageDef *msg;
|
||||
msg = itti_alloc_new_message (ENB_APP, 0, TERMINATE_MESSAGE);
|
||||
msg = itti_alloc_new_message (TASK_ENB_APP, 0, TERMINATE_MESSAGE);
|
||||
itti_send_msg_to_task (task_id, ENB_MODULE_ID_TO_INSTANCE(mod_id), msg);
|
||||
}
|
||||
|
||||
|
||||
+19
-17
@@ -15,23 +15,25 @@
|
||||
/* command line parameters common to eNodeB and UE */
|
||||
/* optname helpstr paramflags XXXptr defXXXval type numelt */
|
||||
/*----------------------------------------------------------------------------------------------------------------------------------------------------------------------*/
|
||||
#define CMDLINE_PARAMS_DESC_GNB { \
|
||||
{"single-thread-disable", CONFIG_HLP_NOSNGLT, PARAMFLAG_BOOL, iptr:&single_thread_flag, defintval:1, TYPE_INT, 0}, \
|
||||
{"A" , CONFIG_HLP_TADV, 0, uptr:&timing_advance, defintval:0, TYPE_UINT, 0}, \
|
||||
{"E" , CONFIG_HLP_TQFS, PARAMFLAG_BOOL, i8ptr:&threequarter_fs, defintval:0, TYPE_INT8, 0}, \
|
||||
{"m" , CONFIG_HLP_DLMCS_PHYTEST,0, uptr:&target_dl_mcs, defintval:0, TYPE_UINT, 0}, \
|
||||
{"l" , CONFIG_HLP_DLNL_PHYTEST,0, uptr:&target_dl_Nl, defintval:0, TYPE_UINT, 0}, \
|
||||
{"L" , CONFIG_HLP_ULNL_PHYTEST,0, uptr:&target_ul_Nl, defintval:0, TYPE_UINT, 0}, \
|
||||
{"t" , CONFIG_HLP_ULMCS_PHYTEST,0, uptr:&target_ul_mcs, defintval:0, TYPE_UINT, 0}, \
|
||||
{"M" , CONFIG_HLP_DLBW_PHYTEST,0, uptr:&target_dl_bw, defintval:0, TYPE_UINT, 0}, \
|
||||
{"T" , CONFIG_HLP_ULBW_PHYTEST,0, uptr:&target_ul_bw, defintval:0, TYPE_UINT, 0}, \
|
||||
{"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_ports1.xml",TYPE_STRING, 0}, \
|
||||
{"s" , CONFIG_HLP_SNR, 0, dblptr:&snr_dB, defdblval:25, TYPE_DOUBLE, 0}, \
|
||||
}
|
||||
// clang-format off
|
||||
#define CMDLINE_PARAMS_DESC_GNB { \
|
||||
{"single-thread-disable", CONFIG_HLP_NOSNGLT, PARAMFLAG_BOOL, .iptr=&single_thread_flag, .defintval=1, TYPE_INT, 0}, \
|
||||
{"A" , CONFIG_HLP_TADV, 0, .uptr=&timing_advance, .defintval=0, TYPE_UINT, 0}, \
|
||||
{"E" , CONFIG_HLP_TQFS, PARAMFLAG_BOOL, .i8ptr=&threequarter_fs, .defintval=0, TYPE_INT8, 0}, \
|
||||
{"m" , CONFIG_HLP_DLMCS_PHYTEST, 0, .uptr=&target_dl_mcs, .defintval=0, TYPE_UINT, 0}, \
|
||||
{"l" , CONFIG_HLP_DLNL_PHYTEST, 0, .uptr=&target_dl_Nl, .defintval=0, TYPE_UINT, 0}, \
|
||||
{"L" , CONFIG_HLP_ULNL_PHYTEST, 0, .uptr=&target_ul_Nl, .defintval=0, TYPE_UINT, 0}, \
|
||||
{"t" , CONFIG_HLP_ULMCS_PHYTEST, 0, .uptr=&target_ul_mcs, .defintval=0, TYPE_UINT, 0}, \
|
||||
{"M" , CONFIG_HLP_DLBW_PHYTEST, 0, .uptr=&target_dl_bw, .defintval=0, TYPE_UINT, 0}, \
|
||||
{"T" , CONFIG_HLP_ULBW_PHYTEST, 0, .uptr=&target_ul_bw, .defintval=0, TYPE_UINT, 0}, \
|
||||
{"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_ports1.xml", TYPE_STRING, 0}, \
|
||||
{"s" , CONFIG_HLP_SNR, 0, .dblptr=&snr_dB, .defdblval=25, TYPE_DOUBLE, 0}, \
|
||||
}
|
||||
// clang-format on
|
||||
|
||||
extern uint32_t target_dl_mcs;
|
||||
extern uint32_t target_dl_Nl;
|
||||
|
||||
+44
-19
@@ -24,7 +24,7 @@
|
||||
#include <openair1/PHY/impl_defs_top.h>
|
||||
#include "executables/nr-uesoftmodem.h"
|
||||
#include "PHY/phy_extern_nr_ue.h"
|
||||
#include "PHY/INIT/phy_init.h"
|
||||
#include "PHY/INIT/nr_phy_init.h"
|
||||
#include "NR_MAC_UE/mac_proto.h"
|
||||
#include "RRC/NR_UE/rrc_proto.h"
|
||||
#include "SCHED_NR_UE/phy_frame_config_nr.h"
|
||||
@@ -33,6 +33,7 @@
|
||||
#include "executables/softmodem-common.h"
|
||||
#include "PHY/NR_REFSIG/refsig_defs_ue.h"
|
||||
#include "radio/COMMON/common_lib.h"
|
||||
#include "pdcp.h"
|
||||
|
||||
/*
|
||||
* NR SLOT PROCESSING SEQUENCE
|
||||
@@ -351,8 +352,7 @@ static void *NRUE_phy_stub_standalone_pnf_task(void *arg)
|
||||
mac->scc_SIB->tdd_UL_DL_ConfigurationCommon,
|
||||
ul_info.slot_tx, mac->frame_type)) {
|
||||
LOG_D(NR_MAC, "Slot %d. calling nr_ue_ul_ind() and nr_ue_pucch_scheduler() from %s\n", ul_info.slot_tx, __FUNCTION__);
|
||||
nr_ue_scheduler(NULL, &ul_info);
|
||||
nr_ue_prach_scheduler(mod_id, ul_info.frame_tx, ul_info.slot_tx);
|
||||
nr_ue_ul_scheduler(&ul_info);
|
||||
nr_ue_pucch_scheduler(mod_id, ul_info.frame_tx, ul_info.slot_tx, NULL);
|
||||
}
|
||||
if (!IS_SOFTMODEM_NOS1 && get_softmodem_params()->sa) {
|
||||
@@ -687,21 +687,33 @@ void syncInFrame(PHY_VARS_NR_UE *UE, openair0_timestamp *timestamp) {
|
||||
|
||||
LOG_I(PHY,"Resynchronizing RX by %d samples (mode = %d)\n",UE->rx_offset,UE->mode);
|
||||
|
||||
*timestamp += UE->frame_parms.get_samples_per_slot(1,&UE->frame_parms);
|
||||
for ( int size=UE->rx_offset ; size > 0 ; size -= UE->frame_parms.samples_per_subframe ) {
|
||||
int unitTransfer=size>UE->frame_parms.samples_per_subframe ? UE->frame_parms.samples_per_subframe : size ;
|
||||
// we write before read because gNB waits for UE to write and both executions halt
|
||||
// this happens here as the read size is samples_per_subframe which is very much larger than samp_per_slot
|
||||
if (IS_SOFTMODEM_RFSIM) dummyWrite(UE,*timestamp, unitTransfer);
|
||||
AssertFatal(unitTransfer ==
|
||||
UE->rfdevice.trx_read_func(&UE->rfdevice,
|
||||
timestamp,
|
||||
(void **)UE->common_vars.rxdata,
|
||||
unitTransfer,
|
||||
UE->frame_parms.nb_antennas_rx),"");
|
||||
*timestamp += unitTransfer; // this does not affect the read but needed for RFSIM write
|
||||
if (IS_SOFTMODEM_IQPLAYER || IS_SOFTMODEM_IQRECORDER) {
|
||||
// Resynchonize by slot (will work with numerology 1 only)
|
||||
for ( int size=UE->rx_offset ; size > 0 ; size -= UE->frame_parms.samples_per_subframe/2 ) {
|
||||
int unitTransfer=size>UE->frame_parms.samples_per_subframe/2 ? UE->frame_parms.samples_per_subframe/2 : size ;
|
||||
AssertFatal(unitTransfer ==
|
||||
UE->rfdevice.trx_read_func(&UE->rfdevice,
|
||||
timestamp,
|
||||
(void **)UE->common_vars.rxdata,
|
||||
unitTransfer,
|
||||
UE->frame_parms.nb_antennas_rx),"");
|
||||
}
|
||||
} else {
|
||||
*timestamp += UE->frame_parms.get_samples_per_slot(1,&UE->frame_parms);
|
||||
for ( int size=UE->rx_offset ; size > 0 ; size -= UE->frame_parms.samples_per_subframe ) {
|
||||
int unitTransfer=size>UE->frame_parms.samples_per_subframe ? UE->frame_parms.samples_per_subframe : size ;
|
||||
// we write before read because gNB waits for UE to write and both executions halt
|
||||
// this happens here as the read size is samples_per_subframe which is very much larger than samp_per_slot
|
||||
if (IS_SOFTMODEM_RFSIM) dummyWrite(UE,*timestamp, unitTransfer);
|
||||
AssertFatal(unitTransfer ==
|
||||
UE->rfdevice.trx_read_func(&UE->rfdevice,
|
||||
timestamp,
|
||||
(void **)UE->common_vars.rxdata,
|
||||
unitTransfer,
|
||||
UE->frame_parms.nb_antennas_rx),"");
|
||||
*timestamp += unitTransfer; // this does not affect the read but needed for RFSIM write
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
int computeSamplesShift(PHY_VARS_NR_UE *UE) {
|
||||
@@ -773,6 +785,11 @@ void *UE_thread(void *arg) {
|
||||
syncRunning=false;
|
||||
syncData_t *tmp=(syncData_t *)NotifiedFifoData(res);
|
||||
if (UE->is_synchronized) {
|
||||
LOG_I(PHY,"UE synchronized decoded_frame_rx=%d UE->init_sync_frame=%d trashed_frames=%d\n",
|
||||
decoded_frame_rx,
|
||||
UE->init_sync_frame,
|
||||
trashed_frames);
|
||||
|
||||
decoded_frame_rx=(((mac->mib->systemFrameNumber.buf[0] >> mac->mib->systemFrameNumber.bits_unused)<<4) | tmp->proc.decoded_frame_rx);
|
||||
// shift the frame index with all the frames we trashed meanwhile we perform the synch search
|
||||
decoded_frame_rx=(decoded_frame_rx + UE->init_sync_frame + trashed_frames) % MAX_FRAME_NUMBER;
|
||||
@@ -780,8 +797,16 @@ void *UE_thread(void *arg) {
|
||||
delNotifiedFIFO_elt(res);
|
||||
start_rx_stream=0;
|
||||
} else {
|
||||
readFrame(UE, ×tamp, true);
|
||||
trashed_frames+=2;
|
||||
if (IS_SOFTMODEM_IQPLAYER || IS_SOFTMODEM_IQRECORDER) {
|
||||
// For IQ recorder/player we force synchronization to happen in 280 ms
|
||||
while (trashed_frames != 28) {
|
||||
readFrame(UE, ×tamp, true);
|
||||
trashed_frames+=2;
|
||||
}
|
||||
} else {
|
||||
readFrame(UE, ×tamp, true);
|
||||
trashed_frames+=2;
|
||||
}
|
||||
continue;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -59,10 +59,11 @@ unsigned short config_frames[4] = {2,9,11,13};
|
||||
|
||||
#include "UTIL/OPT/opt.h"
|
||||
#include "enb_config.h"
|
||||
#include "pdcp.h"
|
||||
|
||||
#include "intertask_interface.h"
|
||||
|
||||
#include "PHY/INIT/phy_init.h"
|
||||
#include "PHY/INIT/nr_phy_init.h"
|
||||
#include "system.h"
|
||||
#include <openair2/RRC/NR_UE/rrc_proto.h>
|
||||
#include <openair2/LAYER2/NR_MAC_UE/mac_defs.h>
|
||||
@@ -213,7 +214,8 @@ int create_tasks_nrue(uint32_t ue_nb) {
|
||||
return 0;
|
||||
}
|
||||
|
||||
void exit_function(const char *file, const char *function, const int line, const char *s) {
|
||||
void exit_function(const char *file, const char *function, const int line, const char *s, const int assert)
|
||||
{
|
||||
int CC_id;
|
||||
|
||||
if (s != NULL) {
|
||||
@@ -229,8 +231,12 @@ void exit_function(const char *file, const char *function, const int line, const
|
||||
}
|
||||
}
|
||||
|
||||
sleep(1); //allow lte-softmodem threads to exit first
|
||||
exit(1);
|
||||
if (assert) {
|
||||
abort();
|
||||
} else {
|
||||
sleep(1); // allow lte-softmodem threads to exit first
|
||||
exit(EXIT_SUCCESS);
|
||||
}
|
||||
}
|
||||
|
||||
uint64_t get_nrUE_optmask(void) {
|
||||
@@ -504,13 +510,13 @@ int main( int argc, char **argv ) {
|
||||
nr_band);
|
||||
}
|
||||
else{
|
||||
if(mac->if_module != NULL && mac->if_module->phy_config_request != NULL)
|
||||
mac->if_module->phy_config_request(&mac->phy_config);
|
||||
|
||||
DevAssert(mac->if_module != NULL && mac->if_module->phy_config_request != NULL);
|
||||
mac->if_module->phy_config_request(&mac->phy_config);
|
||||
mac->phy_config_request_sent = true;
|
||||
fapi_nr_config_request_t *nrUE_config = &UE[CC_id]->nrUE_config;
|
||||
|
||||
nr_init_frame_parms_ue(&UE[CC_id]->frame_parms, nrUE_config,
|
||||
*mac->scc->downlinkConfigCommon->frequencyInfoDL->frequencyBandList.list.array[0]);
|
||||
*mac->scc->downlinkConfigCommon->frequencyInfoDL->frequencyBandList.list.array[0]);
|
||||
}
|
||||
|
||||
init_nr_ue_vars(UE[CC_id], 0, abstraction_flag);
|
||||
|
||||
@@ -28,54 +28,56 @@
|
||||
/* command line parameters defining UE running mode */
|
||||
/* optname helpstr paramflags XXXptr defXXXval type numelt */
|
||||
/*------------------------------------------------------------------------------------------------------------------------------------------*/
|
||||
// clang-format off
|
||||
#define CMDLINE_NRUEPARAMS_DESC { \
|
||||
{"usrp-args", CONFIG_HLP_USRP_ARGS, 0, strptr:&usrp_args, defstrval:"type=b200", TYPE_STRING, 0}, \
|
||||
{"tx_subdev", CONFIG_HLP_TX_SUBDEV, 0, strptr:&tx_subdev, defstrval:NULL, TYPE_STRING, 0}, \
|
||||
{"rx_subdev", CONFIG_HLP_RX_SUBDEV, 0, strptr:&rx_subdev, defstrval:NULL, 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: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}, \
|
||||
{"V" , CONFIG_HLP_VCD, PARAMFLAG_BOOL, iptr:&vcdflag, defintval:0, TYPE_INT, 0}, \
|
||||
{"uecap_file", CONFIG_HLP_UECAP_FILE, 0, strptr:&uecap_file, defstrval:"./uecap_ports1.xml", TYPE_STRING, 0}, \
|
||||
{"rrc_config_path", CONFIG_HLP_RRC_CFG_PATH,0, strptr:&rrc_config_path, defstrval:"./", TYPE_STRING, 0}, \
|
||||
{"ue-idx-standalone", NULL, 0, u16ptr:&ue_idx_standalone, defuintval:0xFFFF, TYPE_UINT16, 0} \
|
||||
{"usrp-args", CONFIG_HLP_USRP_ARGS, 0, .strptr=&usrp_args, .defstrval="type=b200", TYPE_STRING, 0}, \
|
||||
{"tx_subdev", CONFIG_HLP_TX_SUBDEV, 0, .strptr=&tx_subdev, .defstrval=NULL, TYPE_STRING, 0}, \
|
||||
{"rx_subdev", CONFIG_HLP_RX_SUBDEV, 0, .strptr=&rx_subdev, .defstrval=NULL, 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=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}, \
|
||||
{"V" , CONFIG_HLP_VCD, PARAMFLAG_BOOL, .iptr=&vcdflag, .defintval=0, TYPE_INT, 0}, \
|
||||
{"uecap_file", CONFIG_HLP_UECAP_FILE, 0, .strptr=&uecap_file, .defstrval="./uecap_ports1.xml", TYPE_STRING, 0}, \
|
||||
{"rrc_config_path", CONFIG_HLP_RRC_CFG_PATH, 0, .strptr=&rrc_config_path, .defstrval="./", TYPE_STRING, 0}, \
|
||||
{"ue-idx-standalone", NULL, 0, .u16ptr=&ue_idx_standalone, .defuintval=0xFFFF, TYPE_UINT16, 0} \
|
||||
}
|
||||
|
||||
// clang-format on
|
||||
|
||||
/*------------------------------------------------------------------------------------------------------------------------------------------*/
|
||||
/* command line parameters defining UE running mode */
|
||||
/* optname helpstr paramflags XXXptr defXXXval type numelt */
|
||||
/*------------------------------------------------------------------------------------------------------------------------------------------*/
|
||||
// clang-format off
|
||||
#define CMDLINE_NRUE_PHYPARAMS_DESC { \
|
||||
{ CALIBRX_OPT, CONFIG_HLP_CALUER, 0, iptr:&rx_input_level_dBm, defintval:0, TYPE_INT, 0}, \
|
||||
{ CALIBRXMED_OPT, CONFIG_HLP_CALUERM, 0, iptr:&rx_input_level_dBm, defintval:0, TYPE_INT, 0}, \
|
||||
{ CALIBRXBYP_OPT, CONFIG_HLP_CALUERB, 0, iptr:&rx_input_level_dBm, defintval:0, TYPE_INT, 0}, \
|
||||
{ DBGPRACH_OPT, CONFIG_HLP_DBGUEPR, PARAMFLAG_BOOL, uptr:NULL, defuintval:1, TYPE_INT, 0}, \
|
||||
{ NOL2CONNECT_OPT, CONFIG_HLP_NOL2CN, PARAMFLAG_BOOL, uptr:NULL, defuintval:1, TYPE_INT, 0}, \
|
||||
{ CALIBPRACH_OPT, CONFIG_HLP_CALPRACH, PARAMFLAG_BOOL, uptr:NULL, defuintval:1, TYPE_INT, 0}, \
|
||||
{ DUMPFRAME_OPT, CONFIG_HLP_DUMPFRAME, PARAMFLAG_BOOL, iptr:&dumpframe, defintval:0, TYPE_INT, 0}, \
|
||||
{"ue-rxgain", CONFIG_HLP_UERXG, 0, dblptr:&(rx_gain[0][0]), defdblval:110, TYPE_DOUBLE,0}, \
|
||||
{"ue-rxgain-off", CONFIG_HLP_UERXGOFF, 0, dblptr:&rx_gain_off, defdblval:0, TYPE_DOUBLE,0}, \
|
||||
{"ue-txgain", CONFIG_HLP_UETXG, 0, dblptr:&(tx_gain[0][0]), defdblval:0, TYPE_DOUBLE,0}, \
|
||||
{"ue-nb-ant-rx", CONFIG_HLP_UENANTR, 0, u8ptr:&(fp->nb_antennas_rx), defuintval:1, TYPE_UINT8, 0}, \
|
||||
{"ue-nb-ant-tx", CONFIG_HLP_UENANTT, 0, u8ptr:&(fp->nb_antennas_tx), defuintval:1, TYPE_UINT8, 0}, \
|
||||
{"ue-scan-carrier", CONFIG_HLP_UESCAN, PARAMFLAG_BOOL, iptr:&(UE->UE_scan_carrier), defintval:0, TYPE_INT, 0}, \
|
||||
{"ue-fo-compensation", CONFIG_HLP_UEFO, PARAMFLAG_BOOL, iptr:&(UE->UE_fo_compensation), defintval:0, TYPE_INT, 0}, \
|
||||
{"ue-max-power", NULL, 0, iptr:&(tx_max_power[0]), defintval:90, TYPE_INT, 0}, \
|
||||
{"A" , CONFIG_HLP_TADV, 0, iptr:&(UE->timing_advance), defintval:0, TYPE_INT, 0}, \
|
||||
{"E" , CONFIG_HLP_TQFS, PARAMFLAG_BOOL, u8ptr:&(fp->threequarter_fs), defintval:0, TYPE_UINT8, 0}, \
|
||||
{"r" , CONFIG_HLP_PRB_SA, 0, iptr:&(fp->N_RB_DL), defintval:106, TYPE_UINT, 0}, \
|
||||
{"ssb", CONFIG_HLP_SSC, 0, u16ptr:&(fp->ssb_start_subcarrier), defintval:516, TYPE_UINT16,0}, \
|
||||
{"T" , CONFIG_HLP_TDD, PARAMFLAG_BOOL, iptr:&tddflag, defintval:0, TYPE_INT, 0}, \
|
||||
{"if_freq" , CONFIG_HLP_IF_FREQ, 0, u64ptr:&(UE->if_freq), defuintval:0, TYPE_UINT64,0}, \
|
||||
{"if_freq_off" , CONFIG_HLP_IF_FREQ_OFF, 0, iptr:&(UE->if_freq_off), defuintval:0, TYPE_INT, 0}, \
|
||||
{"chest-freq", CONFIG_HLP_CHESTFREQ, 0, iptr:&(UE->chest_freq), defintval:0, TYPE_INT, 0}, \
|
||||
{"chest-time", CONFIG_HLP_CHESTTIME, 0, iptr:&(UE->chest_time), defintval:0, TYPE_INT, 0}, \
|
||||
{"ue-timing-correction-disable", CONFIG_HLP_DISABLETIMECORR, PARAMFLAG_BOOL, iptr:&(UE->no_timing_correction), defintval:0, TYPE_INT, 0}, \
|
||||
{ CALIBRX_OPT, CONFIG_HLP_CALUER, 0, .iptr=&rx_input_level_dBm, .defintval=0, TYPE_INT, 0}, \
|
||||
{ CALIBRXMED_OPT, CONFIG_HLP_CALUERM, 0, .iptr=&rx_input_level_dBm, .defintval=0, TYPE_INT, 0}, \
|
||||
{ CALIBRXBYP_OPT, CONFIG_HLP_CALUERB, 0, .iptr=&rx_input_level_dBm, .defintval=0, TYPE_INT, 0}, \
|
||||
{ DBGPRACH_OPT, CONFIG_HLP_DBGUEPR, PARAMFLAG_BOOL, .uptr=NULL, .defuintval=1, TYPE_INT, 0}, \
|
||||
{ NOL2CONNECT_OPT, CONFIG_HLP_NOL2CN, PARAMFLAG_BOOL, .uptr=NULL, .defuintval=1, TYPE_INT, 0}, \
|
||||
{ CALIBPRACH_OPT, CONFIG_HLP_CALPRACH, PARAMFLAG_BOOL, .uptr=NULL, .defuintval=1, TYPE_INT, 0}, \
|
||||
{ DUMPFRAME_OPT, CONFIG_HLP_DUMPFRAME, PARAMFLAG_BOOL, .iptr=&dumpframe, .defintval=0, TYPE_INT, 0}, \
|
||||
{"ue-rxgain", CONFIG_HLP_UERXG, 0, .dblptr=&(rx_gain[0][0]), .defdblval=110, TYPE_DOUBLE, 0}, \
|
||||
{"ue-rxgain-off", CONFIG_HLP_UERXGOFF, 0, .dblptr=&rx_gain_off, .defdblval=0, TYPE_DOUBLE, 0}, \
|
||||
{"ue-txgain", CONFIG_HLP_UETXG, 0, .dblptr=&(tx_gain[0][0]), .defdblval=0, TYPE_DOUBLE, 0}, \
|
||||
{"ue-nb-ant-rx", CONFIG_HLP_UENANTR, 0, .u8ptr=&(fp->nb_antennas_rx), .defuintval=1, TYPE_UINT8, 0}, \
|
||||
{"ue-nb-ant-tx", CONFIG_HLP_UENANTT, 0, .u8ptr=&(fp->nb_antennas_tx), .defuintval=1, TYPE_UINT8, 0}, \
|
||||
{"ue-scan-carrier", CONFIG_HLP_UESCAN, PARAMFLAG_BOOL, .iptr=&(UE->UE_scan_carrier), .defintval=0, TYPE_INT, 0}, \
|
||||
{"ue-fo-compensation", CONFIG_HLP_UEFO, PARAMFLAG_BOOL, .iptr=&(UE->UE_fo_compensation), .defintval=0, TYPE_INT, 0}, \
|
||||
{"ue-max-power", NULL, 0, .iptr=&(tx_max_power[0]), .defintval=90, TYPE_INT, 0}, \
|
||||
{"A" , CONFIG_HLP_TADV, 0, .iptr=&(UE->timing_advance), .defintval=0, TYPE_INT, 0}, \
|
||||
{"E" , CONFIG_HLP_TQFS, PARAMFLAG_BOOL, .u8ptr=&(fp->threequarter_fs), .defintval=0, TYPE_UINT8, 0}, \
|
||||
{"r" , CONFIG_HLP_PRB_SA, 0, .iptr=&(fp->N_RB_DL), .defintval=106, TYPE_UINT, 0}, \
|
||||
{"ssb", CONFIG_HLP_SSC, 0, .u16ptr=&(fp->ssb_start_subcarrier), .defintval=516, TYPE_UINT16, 0}, \
|
||||
{"T" , CONFIG_HLP_TDD, PARAMFLAG_BOOL, .iptr=&tddflag, .defintval=0, TYPE_INT, 0}, \
|
||||
{"if_freq" , CONFIG_HLP_IF_FREQ, 0, .u64ptr=&(UE->if_freq), .defuintval=0, TYPE_UINT64, 0}, \
|
||||
{"if_freq_off" , CONFIG_HLP_IF_FREQ_OFF, 0, .iptr=&(UE->if_freq_off), .defuintval=0, TYPE_INT, 0}, \
|
||||
{"chest-freq", CONFIG_HLP_CHESTFREQ, 0, .iptr=&(UE->chest_freq), .defintval=0, TYPE_INT, 0}, \
|
||||
{"chest-time", CONFIG_HLP_CHESTTIME, 0, .iptr=&(UE->chest_time), .defintval=0, TYPE_INT, 0}, \
|
||||
{"ue-timing-correction-disable", CONFIG_HLP_DISABLETIMECORR, PARAMFLAG_BOOL, .iptr=&(UE->no_timing_correction), .defintval=0, TYPE_INT, 0}, \
|
||||
}
|
||||
|
||||
// clang-format on
|
||||
|
||||
typedef struct {
|
||||
uint64_t optmask; //mask to store boolean config options
|
||||
|
||||
@@ -146,7 +146,6 @@ void get_common_options(uint32_t execmask) {
|
||||
}
|
||||
|
||||
if (nokrnmod) {
|
||||
printf("nokrnmod bit enabled \n");
|
||||
set_softmodem_optmask(SOFTMODEM_NOKRNMOD_BIT);
|
||||
}
|
||||
|
||||
@@ -220,7 +219,7 @@ void signal_handler(int sig) {
|
||||
softmodem_printresources(sig,(telnet_printfunc_t)printf);
|
||||
if (sig != SOFTMODEM_RTSIGNAL) {
|
||||
printf("Linux signal %s...\n",strsignal(sig));
|
||||
exit_function(__FILE__, __FUNCTION__, __LINE__,"softmodem starting exit procedure\n");
|
||||
exit_function(__FILE__, __FUNCTION__, __LINE__, "softmodem starting exit procedure\n", OAI_EXIT_NORMAL);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -137,50 +137,49 @@ extern "C"
|
||||
#define DEFAULT_RFCONFIG_FILE "/usr/local/etc/syriq/ue.band7.tm1.PRB100.NR40.dat";
|
||||
|
||||
extern int usrp_tx_thread;
|
||||
extern char *nfapi_str;
|
||||
|
||||
// clang-format off
|
||||
#define CMDLINE_PARAMS_DESC { \
|
||||
{"rf-config-file", CONFIG_HLP_RFCFGF, 0, strptr:&RF_CONFIG_FILE, defstrval:NULL, TYPE_STRING, 0},\
|
||||
{"thread-pool", CONFIG_HLP_TPOOL, 0, strptr:&TP_CONFIG, defstrval:"-1,-1,-1,-1,-1,-1,-1,-1", TYPE_STRING, 0}, \
|
||||
{"reorder-thread-disable",CONFIG_HLP_REORDER, PARAMFLAG_BOOL, iptr:&REORDER_THREAD_DISABLE, defintval:0, TYPE_INT, 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}, \
|
||||
{"usim-test", CONFIG_HLP_USIM, PARAMFLAG_BOOL, u8ptr:&USIM_TEST, defintval:0, TYPE_UINT8, 0}, \
|
||||
{"clock-source", CONFIG_HLP_CLK, 0, uptr:&CLOCK_SOURCE, defintval:0, TYPE_UINT, 0}, \
|
||||
{"time-source", CONFIG_HLP_TME, 0, uptr:&TIMING_SOURCE, defintval:0, TYPE_UINT, 0}, \
|
||||
{"tune-offset", CONFIG_HLP_TUNE_OFFSET, 0, dblptr:&TUNE_OFFSET, defintval:0, TYPE_DOUBLE, 0}, \
|
||||
{"wait-for-sync", NULL, PARAMFLAG_BOOL, iptr:&WAIT_FOR_SYNC, defintval:0, TYPE_INT, 0}, \
|
||||
{"single-thread-enable", CONFIG_HLP_NOSNGLT, PARAMFLAG_BOOL, iptr:&SINGLE_THREAD_FLAG, defintval:0, TYPE_INT, 0}, \
|
||||
{"C" , CONFIG_HLP_DLF, 0, u64ptr:&(downlink_frequency[0][0]), defuintval:0, TYPE_UINT64, 0}, \
|
||||
{"CO" , CONFIG_HLP_ULF, 0, iptr:&(uplink_frequency_offset[0][0]), defintval:0, TYPE_INT, 0}, \
|
||||
{"a" , CONFIG_HLP_CHOFF, 0, iptr:&CHAIN_OFFSET, defintval:0, TYPE_INT, 0}, \
|
||||
{"d" , CONFIG_HLP_SOFTS, PARAMFLAG_BOOL, uptr:&do_forms, defintval:0, TYPE_UINT, 0}, \
|
||||
{"dqt" , CONFIG_HLP_SOFTS_QT, PARAMFLAG_BOOL, uptr:&do_forms_qt, defintval:0, TYPE_UINT, 0}, \
|
||||
{"q" , CONFIG_HLP_STMON, PARAMFLAG_BOOL, iptr:&opp_enabled, defintval:0, TYPE_INT, 0}, \
|
||||
{"numerology" , CONFIG_HLP_NUMEROLOGY, PARAMFLAG_BOOL, iptr:&NUMEROLOGY, defintval:1, TYPE_INT, 0}, \
|
||||
{"band" , CONFIG_HLP_BAND, PARAMFLAG_BOOL, iptr:&BAND, defintval:78, 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:¶llel_config, defstrval:NULL, TYPE_STRING, 0}, \
|
||||
{"worker-config", CONFIG_HLP_WORKER_CMD, 0, strptr:&worker_config, defstrval:NULL, TYPE_STRING, 0}, \
|
||||
{"noS1", CONFIG_HLP_NOS1, PARAMFLAG_BOOL, uptr:&noS1, defintval:0, TYPE_UINT, 0}, \
|
||||
{"rfsim", CONFIG_HLP_RFSIM, PARAMFLAG_BOOL, uptr:&rfsim, defintval:0, TYPE_UINT, 0}, \
|
||||
{"nokrnmod", CONFIG_HLP_NOKRNMOD, PARAMFLAG_BOOL, uptr:&nokrnmod, defintval:0, TYPE_UINT, 0}, \
|
||||
{"nbiot-disable", CONFIG_HLP_DISABLNBIOT, PARAMFLAG_BOOL, uptr:&nonbiot, defuintval:0, TYPE_UINT, 0}, \
|
||||
{"chest-freq", CONFIG_HLP_CHESTFREQ, 0, iptr:&CHEST_FREQ, defintval:0, TYPE_INT, 0}, \
|
||||
{"chest-time", CONFIG_HLP_CHESTTIME, 0, iptr:&CHEST_TIME, defintval:0, TYPE_INT, 0}, \
|
||||
{"nsa", CONFIG_HLP_NSA, PARAMFLAG_BOOL, iptr:&NSA, defintval:0, TYPE_INT, 0}, \
|
||||
{"node-number", NULL, 0, u16ptr:&NODE_NUMBER, defuintval:0, TYPE_UINT16, 0}, \
|
||||
{"usrp-tx-thread-config", CONFIG_HLP_USRP_THREAD, 0, iptr:&usrp_tx_thread, defintval:0, TYPE_INT, 0}, \
|
||||
{"nfapi", CONFIG_HLP_NFAPI, 0, strptr:&nfapi_str, defstrval:"MONOLITHIC", TYPE_STRING, 0}, \
|
||||
{"non-stop", CONFIG_HLP_NONSTOP, PARAMFLAG_BOOL, iptr:&NON_STOP, defintval:0, TYPE_INT, 0}, \
|
||||
{"emulate-l1", CONFIG_L1_EMULATOR, PARAMFLAG_BOOL, iptr:&EMULATE_L1, defintval:0, TYPE_INT, 0}, \
|
||||
{"continuous-tx", CONFIG_HLP_CONTINUOUS_TX,PARAMFLAG_BOOL, iptr:&CONTINUOUS_TX, defintval:0, TYPE_INT, 0}, \
|
||||
{"disable-stats", CONFIG_HLP_STATS_DISABLE, PARAMFLAG_BOOL, iptr:&stats_disabled, defintval:0, TYPE_INT, 0}, \
|
||||
}
|
||||
|
||||
|
||||
{"rf-config-file", CONFIG_HLP_RFCFGF, 0, .strptr=&RF_CONFIG_FILE, .defstrval=NULL, TYPE_STRING, 0}, \
|
||||
{"thread-pool", CONFIG_HLP_TPOOL, 0, .strptr=&TP_CONFIG, .defstrval="-1,-1,-1,-1,-1,-1,-1,-1", TYPE_STRING, 0}, \
|
||||
{"reorder-thread-disable",CONFIG_HLP_REORDER, PARAMFLAG_BOOL, .iptr:&REORDER_THREAD_DISABLE, .defintval:0, TYPE_INT, 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}, \
|
||||
{"usim-test", CONFIG_HLP_USIM, PARAMFLAG_BOOL, .u8ptr=&USIM_TEST, .defintval=0, TYPE_UINT8, 0}, \
|
||||
{"clock-source", CONFIG_HLP_CLK, 0, .uptr=&CLOCK_SOURCE, .defintval=0, TYPE_UINT, 0}, \
|
||||
{"time-source", CONFIG_HLP_TME, 0, .uptr=&TIMING_SOURCE, .defintval=0, TYPE_UINT, 0}, \
|
||||
{"tune-offset", CONFIG_HLP_TUNE_OFFSET, 0, .dblptr=&TUNE_OFFSET, .defintval=0, TYPE_DOUBLE, 0}, \
|
||||
{"wait-for-sync", NULL, PARAMFLAG_BOOL, .iptr=&WAIT_FOR_SYNC, .defintval=0, TYPE_INT, 0}, \
|
||||
{"single-thread-enable", CONFIG_HLP_NOSNGLT, PARAMFLAG_BOOL, .iptr=&SINGLE_THREAD_FLAG, .defintval=0, TYPE_INT, 0}, \
|
||||
{"C" , CONFIG_HLP_DLF, 0, .u64ptr=&(downlink_frequency[0][0]), .defuintval=0, TYPE_UINT64, 0}, \
|
||||
{"CO" , CONFIG_HLP_ULF, 0, .iptr=&(uplink_frequency_offset[0][0]), .defintval=0, TYPE_INT, 0}, \
|
||||
{"a" , CONFIG_HLP_CHOFF, 0, .iptr=&CHAIN_OFFSET, .defintval=0, TYPE_INT, 0}, \
|
||||
{"d" , CONFIG_HLP_SOFTS, PARAMFLAG_BOOL, .uptr=&do_forms, .defintval=0, TYPE_UINT, 0}, \
|
||||
{"dqt" , CONFIG_HLP_SOFTS_QT, PARAMFLAG_BOOL, .uptr=&do_forms_qt, .defintval=0, TYPE_UINT, 0}, \
|
||||
{"q" , CONFIG_HLP_STMON, PARAMFLAG_BOOL, .iptr=&opp_enabled, .defintval=0, TYPE_INT, 0}, \
|
||||
{"numerology" , CONFIG_HLP_NUMEROLOGY, PARAMFLAG_BOOL, .iptr=&NUMEROLOGY, .defintval=1, TYPE_INT, 0}, \
|
||||
{"band" , CONFIG_HLP_BAND, PARAMFLAG_BOOL, .iptr=&BAND, .defintval=78, 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=¶llel_config, .defstrval=NULL, TYPE_STRING, 0}, \
|
||||
{"worker-config", CONFIG_HLP_WORKER_CMD, 0, .strptr=&worker_config, .defstrval=NULL, TYPE_STRING, 0}, \
|
||||
{"noS1", CONFIG_HLP_NOS1, PARAMFLAG_BOOL, .uptr=&noS1, .defintval=0, TYPE_UINT, 0}, \
|
||||
{"rfsim", CONFIG_HLP_RFSIM, PARAMFLAG_BOOL, .uptr=&rfsim, .defintval=0, TYPE_UINT, 0}, \
|
||||
{"nokrnmod", CONFIG_HLP_NOKRNMOD, PARAMFLAG_BOOL, .uptr=&nokrnmod, .defintval=1, TYPE_UINT, 0}, \
|
||||
{"nbiot-disable", CONFIG_HLP_DISABLNBIOT, PARAMFLAG_BOOL, .uptr=&nonbiot, .defuintval=0, TYPE_UINT, 0}, \
|
||||
{"chest-freq", CONFIG_HLP_CHESTFREQ, 0, .iptr=&CHEST_FREQ, .defintval=0, TYPE_INT, 0}, \
|
||||
{"chest-time", CONFIG_HLP_CHESTTIME, 0, .iptr=&CHEST_TIME, .defintval=0, TYPE_INT, 0}, \
|
||||
{"nsa", CONFIG_HLP_NSA, PARAMFLAG_BOOL, .iptr=&NSA, .defintval=0, TYPE_INT, 0}, \
|
||||
{"node-number", NULL, 0, .u16ptr=&NODE_NUMBER, .defuintval=0, TYPE_UINT16, 0}, \
|
||||
{"usrp-tx-thread-config", CONFIG_HLP_USRP_THREAD, 0, .iptr=&usrp_tx_thread, .defstrval=0, TYPE_INT, 0}, \
|
||||
{"nfapi", CONFIG_HLP_NFAPI, 0, .strptr=NULL, .defstrval="MONOLITHIC", TYPE_STRING, 0}, \
|
||||
{"non-stop", CONFIG_HLP_NONSTOP, PARAMFLAG_BOOL, .iptr=&NON_STOP, .defintval=0, TYPE_INT, 0}, \
|
||||
{"emulate-l1", CONFIG_L1_EMULATOR, PARAMFLAG_BOOL, .iptr=&EMULATE_L1, .defintval=0, TYPE_INT, 0}, \
|
||||
{"continuous-tx", CONFIG_HLP_CONTINUOUS_TX, PARAMFLAG_BOOL, .iptr=&CONTINUOUS_TX, .defintval=0, TYPE_INT, 0}, \
|
||||
{"disable-stats", CONFIG_HLP_STATS_DISABLE, PARAMFLAG_BOOL, .iptr=&stats_disabled, .defintval=0, TYPE_INT, 0}, \
|
||||
}
|
||||
// clang-format on
|
||||
|
||||
// clang-format off
|
||||
#define CMDLINE_PARAMS_CHECK_DESC { \
|
||||
{ .s5 = { NULL } }, \
|
||||
{ .s5 = { NULL } }, \
|
||||
@@ -223,6 +222,7 @@ extern char *nfapi_str;
|
||||
{ .s5 = { NULL } }, \
|
||||
{ .s5 = { NULL } }, \
|
||||
}
|
||||
// clang-format on
|
||||
|
||||
#define CONFIG_HLP_NSA "Enable NSA mode \n"
|
||||
#define CONFIG_HLP_FLOG "Enable online log \n"
|
||||
@@ -235,23 +235,28 @@ extern char *nfapi_str;
|
||||
/* command line parameters for LOG utility */
|
||||
/* optname helpstr paramflags XXXptr defXXXval type numelt */
|
||||
/*-------------------------------------------------------------------------------------------------------------------------------------------------*/
|
||||
#define CMDLINE_LOGPARAMS_DESC \
|
||||
{ \
|
||||
{CONFIG_FLOG_OPT, CONFIG_HLP_FLOG, 0, uptr : &online_log_messages, defintval : 1, TYPE_INT, 0}, {CONFIG_LOGL_OPT, CONFIG_HLP_LOGL, 0, uptr : &glog_level, defintval : 0, TYPE_UINT, 0}, \
|
||||
{"telnetsrv", CONFIG_HLP_TELN, PARAMFLAG_BOOL | PARAMFLAG_CMDLINEONLY, uptr : &start_telnetsrv, defintval : 0, TYPE_UINT, 0}, \
|
||||
{"websrv", CONFIG_HLP_WEB, PARAMFLAG_BOOL | PARAMFLAG_CMDLINEONLY, uptr : &start_websrv, defintval : 0, TYPE_UINT, 0}, \
|
||||
{"log-mem", NULL, 0, strptr : &logmem_filename, defstrval : NULL, TYPE_STRING, 0}, {"telnetclt", NULL, 0, uptr : &start_telnetclt, defstrval : NULL, TYPE_UINT, 0}, \
|
||||
}
|
||||
// clang-format off
|
||||
#define CMDLINE_LOGPARAMS_DESC { \
|
||||
{CONFIG_FLOG_OPT, CONFIG_HLP_FLOG, 0, .uptr = &online_log_messages, .defintval = 1, TYPE_INT, 0}, \
|
||||
{CONFIG_LOGL_OPT, CONFIG_HLP_LOGL, 0, .uptr = &glog_level, .defintval = 0, TYPE_UINT, 0}, \
|
||||
{"telnetsrv", CONFIG_HLP_TELN, PARAMFLAG_BOOL | PARAMFLAG_CMDLINEONLY, .uptr = &start_telnetsrv, .defintval = 0, TYPE_UINT, 0}, \
|
||||
{"websrv", CONFIG_HLP_WEB, PARAMFLAG_BOOL | PARAMFLAG_CMDLINEONLY, .uptr = &start_websrv, .defintval = 0, TYPE_UINT, 0}, \
|
||||
{"log-mem", NULL, 0, .strptr = &logmem_filename, .defstrval = NULL, TYPE_STRING, 0}, \
|
||||
{"telnetclt", NULL, 0, .uptr = &start_telnetclt, .defstrval = NULL, TYPE_UINT, 0}, \
|
||||
}
|
||||
// clang-format on
|
||||
|
||||
/* check function for global log level */
|
||||
// clang-format off
|
||||
#define CMDLINE_LOGPARAMS_CHECK_DESC { \
|
||||
{ .s5= {NULL} } , \
|
||||
{ .s2= {config_check_intrange, {0,4}}}, \
|
||||
{ .s5= {NULL} } , \
|
||||
{ .s5= {NULL} } , \
|
||||
{ .s5= {NULL} } , \
|
||||
{ .s5= {NULL} } , \
|
||||
}
|
||||
{ .s5= {NULL} } , \
|
||||
{ .s2= {config_check_intrange, {0,4}}}, \
|
||||
{ .s5= {NULL} } , \
|
||||
{ .s5= {NULL} } , \
|
||||
{ .s5= {NULL} } , \
|
||||
{ .s5= {NULL} } , \
|
||||
}
|
||||
// clang-format on
|
||||
|
||||
/***************************************************************************************************************************************/
|
||||
|
||||
@@ -264,6 +269,7 @@ extern char *nfapi_str;
|
||||
#define SOFTMODEM_DOSCOPE_BIT (1<<15)
|
||||
#define SOFTMODEM_RECPLAY_BIT (1<<16)
|
||||
#define SOFTMODEM_TELNETCLT_BIT (1<<17)
|
||||
#define SOFTMODEM_RECRECORD_BIT (1<<18)
|
||||
#define SOFTMODEM_ENB_BIT (1<<20)
|
||||
#define SOFTMODEM_GNB_BIT (1<<21)
|
||||
#define SOFTMODEM_4GUE_BIT (1<<22)
|
||||
@@ -284,6 +290,7 @@ extern char *nfapi_str;
|
||||
#define IS_SOFTMODEM_DOSCOPE ( get_softmodem_optmask() & SOFTMODEM_DOSCOPE_BIT)
|
||||
#define IS_SOFTMODEM_DOSCOPE_QT ( get_softmodem_optmask() & SOFTMODEM_DOSCOPE_QT_BIT)
|
||||
#define IS_SOFTMODEM_IQPLAYER ( get_softmodem_optmask() & SOFTMODEM_RECPLAY_BIT)
|
||||
#define IS_SOFTMODEM_IQRECORDER ( get_softmodem_optmask() & SOFTMODEM_RECRECORD_BIT)
|
||||
#define IS_SOFTMODEM_TELNETCLT_BIT ( get_softmodem_optmask() & SOFTMODEM_TELNETCLT_BIT)
|
||||
#define IS_SOFTMODEM_ENB_BIT ( get_softmodem_optmask() & SOFTMODEM_ENB_BIT)
|
||||
#define IS_SOFTMODEM_GNB_BIT ( get_softmodem_optmask() & SOFTMODEM_GNB_BIT)
|
||||
|
||||
Reference in New Issue
Block a user