Merge branch 'develop' into ru_rau_enhancement_L1_renaming
Conflicts: ci-scripts/xml_files/enb_ue_usrp210_band7_test_05mhz_tm1.xml cmake_targets/CMakeLists.txt cmake_targets/build_oai openair1/PHY/LTE_UE_TRANSPORT/initial_sync.c targets/PROJECTS/CENTOS-LTE-EPC-INTEGRATION/CONF/enb.centos.calisson.conf targets/PROJECTS/CENTOS-LTE-EPC-INTEGRATION/CONF/enb.centos.memphis.conf targets/PROJECTS/CENTOS-LTE-EPC-INTEGRATION/CONF/enb.centos.nord.conf targets/RT/USER/lte-softmodem.c targets/RT/USER/lte-ue.c
This commit is contained in:
@@ -0,0 +1,60 @@
|
||||
Active_eNBs = ( "eNB_Eurecom_LTEBox");
|
||||
# Asn1_verbosity, choice in: none, info, annoying
|
||||
Asn1_verbosity = "none";
|
||||
|
||||
eNBs =
|
||||
(
|
||||
{
|
||||
# real_time choice in {hard, rt-preempt, no}
|
||||
real_time = "hard";
|
||||
////////// Identification parameters:
|
||||
eNB_ID = 0xe00;
|
||||
|
||||
cell_type = "CELL_MACRO_ENB";
|
||||
|
||||
eNB_name = "eNB_Eurecom_LTEBox";
|
||||
|
||||
// Tracking area code, 0x0000 and 0xfffe are reserved values
|
||||
tracking_area_code = 15;
|
||||
plmn_list = ( { mcc = 208; mnc = 92; mnc_length = 2; } );
|
||||
|
||||
////////// Channel parameters:
|
||||
// Default Paging DRX of the eNB as defined in TS 36.304
|
||||
default_paging_drx = "PAGING_DRX_256";
|
||||
|
||||
////////// Physical parameters:
|
||||
frame_type = "FDD";
|
||||
prefix_type = "NORMAL";
|
||||
eutra_band = 7;
|
||||
downlink_frequency = 2680000000L;
|
||||
uplink_frequency_offset = -120000000;
|
||||
|
||||
////////// MME parameters:
|
||||
mme_ip_address = ( { ipv4 = "192.168.13.11";
|
||||
ipv6 = "192:168:30::17";
|
||||
active = "yes";
|
||||
preference = "ipv4";
|
||||
}
|
||||
);
|
||||
|
||||
enable_measurement_reports = "no";
|
||||
|
||||
///X2
|
||||
enable_x2 = "no";
|
||||
t_reloc_prep = 1000; /* unit: millisecond */
|
||||
tx2_reloc_overall = 2000; /* unit: millisecond */
|
||||
|
||||
NETWORK_INTERFACES :
|
||||
{
|
||||
ENB_INTERFACE_NAME_FOR_S1_MME = "eth0";
|
||||
ENB_IPV4_ADDRESS_FOR_S1_MME = "192.168.13.10/24";
|
||||
|
||||
ENB_INTERFACE_NAME_FOR_S1U = "eth0";
|
||||
ENB_IPV4_ADDRESS_FOR_S1U = "192.168.13.10/24";
|
||||
|
||||
ENB_IPV4_ADDRESS_FOR_X2C = "192.168.13.10/24";
|
||||
ENB_PORT_FOR_X2C = 36422; # Spec 36422
|
||||
};
|
||||
|
||||
}
|
||||
);
|
||||
@@ -0,0 +1,91 @@
|
||||
Active_eNBs = ( "eNB_Eurecom_LTEBox");
|
||||
# Asn1_verbosity, choice in: none, info, annoying
|
||||
Asn1_verbosity = "none";
|
||||
|
||||
eNBs =
|
||||
(
|
||||
{
|
||||
# real_time choice in {hard, rt-preempt, no}
|
||||
real_time = "hard";
|
||||
////////// Identification parameters:
|
||||
eNB_ID = 0xe00;
|
||||
|
||||
cell_type = "CELL_MACRO_ENB";
|
||||
|
||||
eNB_name = "eNB_Eurecom_LTEBox";
|
||||
|
||||
// Tracking area code, 0x0000 and 0xfffe are reserved values
|
||||
tracking_area_code = 15;
|
||||
plmn_list = ( { mcc = 208; mnc = 92; mnc_length = 2; } );
|
||||
|
||||
////////// Channel parameters:
|
||||
// Default Paging DRX of the eNB as defined in TS 36.304
|
||||
default_paging_drx = "PAGING_DRX_256";
|
||||
|
||||
////////// Physical parameters:
|
||||
frame_type = "FDD";
|
||||
prefix_type = "NORMAL";
|
||||
eutra_band = 7;
|
||||
downlink_frequency = 2680000000L;
|
||||
uplink_frequency_offset = -120000000;
|
||||
|
||||
component_carriers = (
|
||||
{
|
||||
cell_id = 0;
|
||||
N_RB_DL = 25;
|
||||
},
|
||||
{
|
||||
cell_id = 1;
|
||||
N_RB_DL = 50;
|
||||
}
|
||||
);
|
||||
|
||||
|
||||
////////// MME parameters:
|
||||
mme_ip_address = ( { ipv4 = "192.168.13.11";
|
||||
ipv6 = "192:168:30::17";
|
||||
active = "yes";
|
||||
preference = "ipv4";
|
||||
}
|
||||
);
|
||||
|
||||
enable_measurement_reports = "no";
|
||||
|
||||
///X2
|
||||
enable_x2 = "no";
|
||||
t_reloc_prep = 1000; /* unit: millisecond */
|
||||
tx2_reloc_overall = 2000; /* unit: millisecond */
|
||||
|
||||
NETWORK_INTERFACES :
|
||||
{
|
||||
ENB_INTERFACE_NAME_FOR_S1_MME = "eth0";
|
||||
ENB_IPV4_ADDRESS_FOR_S1_MME = "192.168.13.10/24";
|
||||
|
||||
ENB_INTERFACE_NAME_FOR_S1U = "eth0";
|
||||
ENB_IPV4_ADDRESS_FOR_S1U = "192.168.13.10/24";
|
||||
|
||||
ENB_IPV4_ADDRESS_FOR_X2C = "192.168.13.10/24";
|
||||
ENB_PORT_FOR_X2C = 36422; # Spec 36422
|
||||
};
|
||||
# available options for level: error, warn, notice, info, debug, trace
|
||||
# available options for verbosity: none, low, medium, high, full
|
||||
log_config :
|
||||
{
|
||||
global_log_level ="debug";
|
||||
global_log_verbosity ="medium";
|
||||
hw_log_level ="debug";
|
||||
hw_log_verbosity ="medium";
|
||||
phy_log_level ="info";
|
||||
phy_log_verbosity ="medium";
|
||||
mac_log_level ="debug";
|
||||
mac_log_verbosity ="high";
|
||||
rlc_log_level ="info";
|
||||
rlc_log_verbosity ="medium";
|
||||
pdcp_log_level ="info";
|
||||
pdcp_log_verbosity ="medium";
|
||||
rrc_log_level ="info";
|
||||
rrc_log_verbosity ="medium";
|
||||
};
|
||||
|
||||
}
|
||||
);
|
||||
@@ -0,0 +1,59 @@
|
||||
Active_eNBs = ( "eNB_Eurecom_LTEBox");
|
||||
# Asn1_verbosity, choice in: none, info, annoying
|
||||
Asn1_verbosity = "none";
|
||||
|
||||
eNBs =
|
||||
(
|
||||
{
|
||||
////////// Identification parameters:
|
||||
hard_real_time = "yes";
|
||||
eNB_ID = 0xe00;
|
||||
|
||||
cell_type = "CELL_MACRO_ENB";
|
||||
|
||||
eNB_name = "eNB_Eurecom_LTEBox";
|
||||
|
||||
// Tracking area code, 0x0000 and 0xfffe are reserved values
|
||||
tracking_area_code = 15;
|
||||
plmn_list = ( { mcc = 208; mnc = 92; mnc_length = 2; } );
|
||||
|
||||
////////// Channel parameters:
|
||||
// Default Paging DRX of the eNB as defined in TS 36.304
|
||||
default_paging_drx = "PAGING_DRX_256";
|
||||
|
||||
////////// Physical parameters:
|
||||
frame_type = "FDD";
|
||||
prefix_type = "NORMAL";
|
||||
eutra_band = 7;
|
||||
downlink_frequency = 2680000000L;
|
||||
uplink_frequency_offset = -120000000;
|
||||
|
||||
////////// MME parameters:
|
||||
mme_ip_address = ( { ipv4 = "192.168.13.11";
|
||||
ipv6 = "192:168:30::17";
|
||||
active = "yes";
|
||||
preference = "ipv4";
|
||||
}
|
||||
);
|
||||
|
||||
enable_measurement_reports = "no";
|
||||
|
||||
///X2
|
||||
enable_x2 = "no";
|
||||
t_reloc_prep = 1000; /* unit: millisecond */
|
||||
tx2_reloc_overall = 2000; /* unit: millisecond */
|
||||
|
||||
NETWORK_INTERFACES :
|
||||
{
|
||||
ENB_INTERFACE_NAME_FOR_S1_MME = "eth1";
|
||||
ENB_IPV4_ADDRESS_FOR_S1_MME = "192.168.13.10/24";
|
||||
|
||||
ENB_INTERFACE_NAME_FOR_S1U = "eth1";
|
||||
ENB_IPV4_ADDRESS_FOR_S1U = "192.168.13.10/24";
|
||||
|
||||
ENB_IPV4_ADDRESS_FOR_X2C = "192.168.13.10/24";
|
||||
ENB_PORT_FOR_X2C = 36422; # Spec 36422
|
||||
};
|
||||
|
||||
}
|
||||
);
|
||||
@@ -360,6 +360,8 @@ eNBs =
|
||||
}
|
||||
);
|
||||
|
||||
enable_measurement_reports = "no";
|
||||
|
||||
///X2
|
||||
enable_x2 = "no";
|
||||
t_reloc_prep = 1000; /* unit: millisecond */
|
||||
|
||||
@@ -142,6 +142,8 @@ eNBs =
|
||||
}
|
||||
);
|
||||
|
||||
enable_measurement_reports = "no";
|
||||
|
||||
///X2
|
||||
enable_x2 = "no";
|
||||
t_reloc_prep = 1000; /* unit: millisecond */
|
||||
|
||||
@@ -178,6 +178,8 @@ eNBs =
|
||||
}
|
||||
);
|
||||
|
||||
enable_measurement_reports = "no";
|
||||
|
||||
///X2
|
||||
enable_x2 = "no";
|
||||
t_reloc_prep = 1000; /* unit: millisecond */
|
||||
|
||||
@@ -142,6 +142,8 @@ eNBs =
|
||||
}
|
||||
);
|
||||
|
||||
enable_measurement_reports = "no";
|
||||
|
||||
///X2
|
||||
enable_x2 = "no";
|
||||
t_reloc_prep = 1000; /* unit: millisecond */
|
||||
|
||||
@@ -178,6 +178,8 @@ eNBs =
|
||||
}
|
||||
);
|
||||
|
||||
enable_measurement_reports = "no";
|
||||
|
||||
///X2
|
||||
enable_x2 = "no";
|
||||
t_reloc_prep = 1000; /* unit: millisecond */
|
||||
|
||||
@@ -145,6 +145,8 @@ eNBs =
|
||||
}
|
||||
);
|
||||
|
||||
enable_measurement_reports = "no";
|
||||
|
||||
///X2
|
||||
enable_x2 = "no";
|
||||
t_reloc_prep = 1000; /* unit: millisecond */
|
||||
|
||||
@@ -178,6 +178,8 @@ eNBs =
|
||||
}
|
||||
);
|
||||
|
||||
enable_measurement_reports = "no";
|
||||
|
||||
///X2
|
||||
enable_x2 = "no";
|
||||
t_reloc_prep = 1000; /* unit: millisecond */
|
||||
|
||||
@@ -179,6 +179,8 @@ eNBs =
|
||||
}
|
||||
);
|
||||
|
||||
enable_measurement_reports = "no";
|
||||
|
||||
///X2
|
||||
enable_x2 = "no";
|
||||
t_reloc_prep = 1000; /* unit: millisecond */
|
||||
|
||||
@@ -179,6 +179,8 @@ eNBs =
|
||||
}
|
||||
);
|
||||
|
||||
enable_measurement_reports = "no";
|
||||
|
||||
///X2
|
||||
enable_x2 = "no";
|
||||
t_reloc_prep = 1000; /* unit: millisecond */
|
||||
|
||||
@@ -179,6 +179,8 @@ eNBs =
|
||||
}
|
||||
);
|
||||
|
||||
enable_measurement_reports = "no";
|
||||
|
||||
///X2
|
||||
enable_x2 = "no";
|
||||
t_reloc_prep = 1000; /* unit: millisecond */
|
||||
|
||||
@@ -146,6 +146,8 @@ eNBs =
|
||||
}
|
||||
);
|
||||
|
||||
enable_measurement_reports = "no";
|
||||
|
||||
///X2
|
||||
enable_x2 = "no";
|
||||
t_reloc_prep = 1000; /* unit: millisecond */
|
||||
|
||||
@@ -148,6 +148,8 @@ eNBs =
|
||||
}
|
||||
);
|
||||
|
||||
enable_measurement_reports = "no";
|
||||
|
||||
///X2
|
||||
enable_x2 = "no";
|
||||
t_reloc_prep = 1000; /* unit: millisecond */
|
||||
|
||||
@@ -148,6 +148,8 @@ eNBs =
|
||||
}
|
||||
);
|
||||
|
||||
enable_measurement_reports = "no";
|
||||
|
||||
///X2
|
||||
enable_x2 = "no";
|
||||
t_reloc_prep = 1000; /* unit: millisecond */
|
||||
|
||||
@@ -179,6 +179,8 @@ eNBs =
|
||||
}
|
||||
);
|
||||
|
||||
enable_measurement_reports = "no";
|
||||
|
||||
///X2
|
||||
enable_x2 = "no";
|
||||
t_reloc_prep = 1000; /* unit: millisecond */
|
||||
|
||||
@@ -148,6 +148,8 @@ eNBs =
|
||||
}
|
||||
);
|
||||
|
||||
enable_measurement_reports = "no";
|
||||
|
||||
///X2
|
||||
enable_x2 = "no";
|
||||
t_reloc_prep = 1000; /* unit: millisecond */
|
||||
|
||||
@@ -148,6 +148,8 @@ eNBs =
|
||||
}
|
||||
);
|
||||
|
||||
enable_measurement_reports = "no";
|
||||
|
||||
///X2
|
||||
enable_x2 = "no";
|
||||
t_reloc_prep = 1000; /* unit: millisecond */
|
||||
|
||||
@@ -60,6 +60,7 @@ void get_common_options(void) {
|
||||
uint32_t nonbiot;
|
||||
uint32_t rfsim;
|
||||
uint32_t basicsim;
|
||||
uint32_t do_forms;
|
||||
paramdef_t cmdline_params[] =CMDLINE_PARAMS_DESC ;
|
||||
paramdef_t cmdline_logparams[] =CMDLINE_LOGPARAMS_DESC ;
|
||||
checkedparam_t cmdline_log_CheckParams[] = CMDLINE_LOGPARAMS_CHECK_DESC;
|
||||
@@ -100,6 +101,10 @@ void get_common_options(void) {
|
||||
set_softmodem_optmask(SOFTMODEM_BASICSIM_BIT);
|
||||
}
|
||||
|
||||
if (do_forms) {
|
||||
set_softmodem_optmask(SOFTMODEM_DOFORMS_BIT);
|
||||
}
|
||||
|
||||
#if BASIC_SIMULATOR
|
||||
set_softmodem_optmask(SOFTMODEM_BASICSIM_BIT);
|
||||
#endif
|
||||
|
||||
@@ -64,6 +64,7 @@
|
||||
#include "LAYER2/MAC/mac_proto.h"
|
||||
#include "RRC/LTE/rrc_vars.h"
|
||||
#include "PHY_INTERFACE/phy_interface_vars.h"
|
||||
#include "PHY/TOOLS/phy_scope_interface.h"
|
||||
#include "nfapi/oai_integration/vendor_ext.h"
|
||||
#ifdef SMBV
|
||||
#include "PHY/TOOLS/smbv.h"
|
||||
@@ -490,9 +491,11 @@ void init_pdcp(void) {
|
||||
if (!NODE_IS_DU(RC.rrc[0]->node_type)) {
|
||||
pdcp_layer_init();
|
||||
uint32_t pdcp_initmask = (IS_SOFTMODEM_NOS1) ?
|
||||
(PDCP_USE_NETLINK_BIT | LINK_ENB_PDCP_TO_IP_DRIVER_BIT) : LINK_ENB_PDCP_TO_GTPV1U_BIT;
|
||||
(PDCP_USE_NETLINK_BIT | LINK_ENB_PDCP_TO_IP_DRIVER_BIT) : LINK_ENB_PDCP_TO_GTPV1U_BIT;
|
||||
|
||||
if (IS_SOFTMODEM_NOS1)
|
||||
pdcp_initmask = pdcp_initmask | ENB_NAS_USE_TUN_BIT | SOFTMODEM_NOKRNMOD_BIT ;
|
||||
|
||||
pdcp_module_init(pdcp_initmask);
|
||||
|
||||
if (NODE_IS_CU(RC.rrc[0]->node_type)) {
|
||||
@@ -580,9 +583,9 @@ int main( int argc, char **argv ) {
|
||||
/* Read configuration */
|
||||
if (RC.nb_inst > 0) {
|
||||
read_config_and_init();
|
||||
|
||||
/* Start the agent. If it is turned off in the configuration, it won't start */
|
||||
RCconfig_flexran();
|
||||
|
||||
for (i = 0; i < RC.nb_inst; i++) {
|
||||
flexran_agent_start(i);
|
||||
}
|
||||
@@ -708,6 +711,8 @@ int main( int argc, char **argv ) {
|
||||
fflush(stderr);
|
||||
// end of CI modifications
|
||||
//getchar();
|
||||
if(IS_SOFTMODEM_DOFORMS)
|
||||
load_softscope("enb");
|
||||
itti_wait_tasks_end();
|
||||
oai_exit=1;
|
||||
LOG_I(ENB_APP,"oai_exit=%d\n",oai_exit);
|
||||
@@ -715,6 +720,9 @@ int main( int argc, char **argv ) {
|
||||
|
||||
if (RC.nb_inst == 0 || !NODE_IS_CU(RC.rrc[0]->node_type)) {
|
||||
int UE_id;
|
||||
if(IS_SOFTMODEM_DOFORMS)
|
||||
end_forms();
|
||||
|
||||
LOG_I(ENB_APP,"stopping MODEM threads\n");
|
||||
stop_eNB(NB_eNB_INST);
|
||||
stop_RU(RC.nb_RU);
|
||||
|
||||
@@ -181,7 +181,6 @@
|
||||
#define WAIT_FOR_SYNC softmodem_params.wait_for_sync
|
||||
#define SINGLE_THREAD_FLAG softmodem_params.single_thread_flag
|
||||
#define CHAIN_OFFSET softmodem_params.chain_offset
|
||||
#define DO_FORMS softmodem_params.do_forms
|
||||
#define NUMEROLOGY softmodem_params.numerology
|
||||
#define EMULATE_RF softmodem_params.emulate_rf
|
||||
#define CLOCK_SOURCE softmodem_params.clock_source
|
||||
@@ -199,7 +198,7 @@
|
||||
{"single-thread-enable", CONFIG_HLP_NOSNGLT, PARAMFLAG_BOOL, iptr:&SINGLE_THREAD_FLAG, defintval:0, TYPE_INT, 0}, \
|
||||
{"C" , CONFIG_HLP_DLF, 0, uptr:&(downlink_frequency[0][0]), defuintval:2680000000, TYPE_UINT, 0}, \
|
||||
{"a" , CONFIG_HLP_CHOFF, 0, iptr:&CHAIN_OFFSET, defintval:0, TYPE_INT, 0}, \
|
||||
{"d" , CONFIG_HLP_SOFTS, PARAMFLAG_BOOL, uptr:(uint32_t *)&DO_FORMS, defintval:0, TYPE_INT8, 0}, \
|
||||
{"d" , CONFIG_HLP_SOFTS, PARAMFLAG_BOOL, uptr:(uint32_t *)&do_forms, defintval:0, TYPE_INT8, 0}, \
|
||||
{"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}, \
|
||||
{"numerology" , CONFIG_HLP_NUMEROLOGY, PARAMFLAG_BOOL, iptr:&NUMEROLOGY, defintval:0, TYPE_INT, 0}, \
|
||||
@@ -249,6 +248,7 @@
|
||||
#define SOFTMODEM_RFSIM_BIT (1<<10)
|
||||
#define SOFTMODEM_BASICSIM_BIT (1<<11)
|
||||
#define SOFTMODEM_SIML1_BIT (1<<12)
|
||||
#define SOFTMODEM_DOFORMS_BIT (1<<15)
|
||||
typedef struct {
|
||||
uint64_t optmask;
|
||||
THREAD_STRUCT thread_struct;
|
||||
@@ -259,7 +259,6 @@ typedef struct {
|
||||
int wait_for_sync; //eNodeB only
|
||||
int single_thread_flag; //eNodeB only
|
||||
int chain_offset;
|
||||
uint32_t do_forms;
|
||||
int numerology;
|
||||
unsigned int start_msc;
|
||||
uint32_t clock_source;
|
||||
@@ -274,6 +273,7 @@ typedef struct {
|
||||
#define IS_SOFTMODEM_RFSIM ( get_softmodem_optmask() & SOFTMODEM_RFSIM_BIT)
|
||||
#define IS_SOFTMODEM_BASICSIM ( get_softmodem_optmask() & SOFTMODEM_BASICSIM_BIT)
|
||||
#define IS_SOFTMODEM_SIML1 ( get_softmodem_optmask() & SOFTMODEM_SIML1_BIT)
|
||||
#define IS_SOFTMODEM_DOFORMS ( get_softmodem_optmask() & SOFTMODEM_DOFORMS_BIT)
|
||||
extern uint64_t get_softmodem_optmask(void);
|
||||
extern uint64_t set_softmodem_optmask(uint64_t bitmask);
|
||||
extern void get_common_options(void);
|
||||
|
||||
@@ -1503,6 +1503,7 @@ void *UE_thread(void *arg) {
|
||||
int i;
|
||||
int th_id;
|
||||
static uint8_t thread_idx = 0;
|
||||
int ret;
|
||||
cpu_set_t cpuset;
|
||||
CPU_ZERO(&cpuset);
|
||||
|
||||
@@ -1724,15 +1725,27 @@ void *UE_thread(void *arg) {
|
||||
}
|
||||
|
||||
pickTime(gotIQs);
|
||||
struct timespec tv= {0};
|
||||
tv.tv_nsec=10*1000;
|
||||
|
||||
if( IS_SOFTMODEM_BASICSIM || IS_SOFTMODEM_RFSIM)
|
||||
tv.tv_sec=INT_MAX;
|
||||
/* no timeout in IS_SOFTMODEM_BASICSIM or IS_SOFTMODEM_RFSIM mode */
|
||||
if (IS_SOFTMODEM_BASICSIM || IS_SOFTMODEM_RFSIM) {
|
||||
ret = pthread_mutex_lock(&proc->mutex_rxtx);
|
||||
} else {
|
||||
struct timespec tv;
|
||||
if (clock_gettime(CLOCK_REALTIME, &tv) != 0) {
|
||||
perror("clock_gettime");
|
||||
exit(1);
|
||||
}
|
||||
tv.tv_nsec += 10*1000;
|
||||
if (tv.tv_nsec >= 1000 * 1000 * 1000) {
|
||||
tv.tv_sec++;
|
||||
tv.tv_nsec -= 1000 * 1000 * 1000;
|
||||
}
|
||||
ret = pthread_mutex_timedlock(&proc->mutex_rxtx, &tv);
|
||||
}
|
||||
|
||||
// operate on thread sf mod 2
|
||||
if ((errno = pthread_mutex_timedlock(&proc->mutex_rxtx, &tv)) !=0) {
|
||||
if ( errno == ETIMEDOUT) {
|
||||
if (ret != 0) {
|
||||
if (ret == ETIMEDOUT) {
|
||||
LOG_E(PHY,"Missed real time\n");
|
||||
continue;
|
||||
} else {
|
||||
@@ -1741,7 +1754,7 @@ void *UE_thread(void *arg) {
|
||||
}
|
||||
}
|
||||
|
||||
//usleep(3000);
|
||||
// usleep(3000);
|
||||
if(sub_frame == 0) {
|
||||
//UE->proc.proc_rxtx[0].frame_rx++;
|
||||
//UE->proc.proc_rxtx[1].frame_rx++;
|
||||
|
||||
@@ -66,7 +66,7 @@
|
||||
#include "LAYER2/MAC/mac_proto.h"
|
||||
#include "RRC/LTE/rrc_vars.h"
|
||||
#include "PHY_INTERFACE/phy_interface_vars.h"
|
||||
|
||||
#include "PHY/TOOLS/phy_scope_interface.h"
|
||||
#include "common/utils/LOG/log.h"
|
||||
#include "nfapi/oai_integration/vendor_ext.h"
|
||||
#include "UTIL/OTG/otg_tx.h"
|
||||
@@ -85,26 +85,14 @@
|
||||
|
||||
#include "system.h"
|
||||
|
||||
#ifdef XFORMS
|
||||
#include "PHY/TOOLS/lte_phy_scope.h"
|
||||
#include "stats.h"
|
||||
#endif
|
||||
|
||||
#include "lte-softmodem.h"
|
||||
|
||||
|
||||
|
||||
/* temporary compilation wokaround (UE/eNB split */
|
||||
uint16_t sf_ahead;
|
||||
#ifdef XFORMS
|
||||
// current status is that every UE has a DL scope for a SINGLE eNB (eNB_id=0)
|
||||
// at eNB 0, an UL scope for every UE
|
||||
FD_lte_phy_scope_ue *form_ue[NUMBER_OF_UE_MAX];
|
||||
FD_lte_phy_scope_enb *form_enb[MAX_NUM_CCs][NUMBER_OF_UE_MAX];
|
||||
FD_stats_form *form_stats=NULL,*form_stats_l2=NULL;
|
||||
char title[255];
|
||||
unsigned char scope_enb_num_ue = 2;
|
||||
static pthread_t forms_thread; //xforms
|
||||
#endif //XFORMS
|
||||
|
||||
|
||||
pthread_cond_t nfapi_sync_cond;
|
||||
pthread_mutex_t nfapi_sync_mutex;
|
||||
@@ -149,7 +137,7 @@ int snr_dB=25;
|
||||
runmode_t mode = normal_txrx;
|
||||
|
||||
FILE *input_fd=NULL;
|
||||
|
||||
int otg_enabled=0;
|
||||
|
||||
#if MAX_NUM_CCs == 1
|
||||
rx_gain_t rx_gain_mode[MAX_NUM_CCs][4] = {{max_gain,max_gain,max_gain,max_gain}};
|
||||
@@ -180,10 +168,6 @@ char channels[128] = "0";
|
||||
|
||||
int rx_input_level_dBm;
|
||||
|
||||
#ifdef XFORMS
|
||||
extern int otg_enabled;
|
||||
#endif
|
||||
//int number_of_cards = 1;
|
||||
|
||||
|
||||
static LTE_DL_FRAME_PARMS *frame_parms[MAX_NUM_CCs];
|
||||
@@ -330,68 +314,8 @@ void exit_function(const char *file, const char *function, const int line, const
|
||||
exit(1);
|
||||
}
|
||||
|
||||
#ifdef XFORMS
|
||||
|
||||
|
||||
void reset_stats(FL_OBJECT *button, long arg) {
|
||||
int i,j,k;
|
||||
PHY_VARS_eNB *phy_vars_eNB = RC.eNB[0][0];
|
||||
|
||||
for (i=0; i<NUMBER_OF_UE_MAX; i++) {
|
||||
for (k=0; k<8; k++) { //harq_processes
|
||||
for (j=0; j<phy_vars_eNB->dlsch[i][0]->Mlimit; j++) {
|
||||
phy_vars_eNB->UE_stats[i].dlsch_NAK[k][j]=0;
|
||||
phy_vars_eNB->UE_stats[i].dlsch_ACK[k][j]=0;
|
||||
phy_vars_eNB->UE_stats[i].dlsch_trials[k][j]=0;
|
||||
}
|
||||
|
||||
phy_vars_eNB->UE_stats[i].dlsch_l2_errors[k]=0;
|
||||
phy_vars_eNB->UE_stats[i].ulsch_errors[k]=0;
|
||||
phy_vars_eNB->UE_stats[i].ulsch_consecutive_errors=0;
|
||||
phy_vars_eNB->UE_stats[i].dlsch_sliding_cnt=0;
|
||||
phy_vars_eNB->UE_stats[i].dlsch_NAK_round0=0;
|
||||
phy_vars_eNB->UE_stats[i].dlsch_mcs_offset=0;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
static void *scope_thread(void *arg) {
|
||||
char stats_buffer[16384];
|
||||
# ifdef ENABLE_XFORMS_WRITE_STATS
|
||||
FILE *UE_stats, *eNB_stats;
|
||||
# endif
|
||||
struct sched_param sched_param;
|
||||
sched_param.sched_priority = sched_get_priority_min(SCHED_FIFO)+1;
|
||||
sched_setscheduler(0, SCHED_FIFO,&sched_param);
|
||||
printf("Scope thread has priority %d\n",sched_param.sched_priority);
|
||||
# ifdef ENABLE_XFORMS_WRITE_STATS
|
||||
UE_stats = fopen("UE_stats.txt", "w");
|
||||
#endif
|
||||
|
||||
while (!oai_exit) {
|
||||
// dump_ue_stats (PHY_vars_UE_g[0][0], &PHY_vars_UE_g[0][0]->proc.proc_rxtx[0],stats_buffer, 0, mode,rx_input_level_dBm);
|
||||
//fl_set_object_label(form_stats->stats_text, stats_buffer);
|
||||
fl_clear_browser(form_stats->stats_text);
|
||||
fl_add_browser_line(form_stats->stats_text, stats_buffer);
|
||||
phy_scope_UE(form_ue[0],
|
||||
PHY_vars_UE_g[0][0],
|
||||
0,
|
||||
0,7);
|
||||
// printf("%s",stats_buffer);
|
||||
}
|
||||
|
||||
# ifdef ENABLE_XFORMS_WRITE_STATS
|
||||
|
||||
if (UE_stats) {
|
||||
rewind (UE_stats);
|
||||
fwrite (stats_buffer, 1, len, UE_stats);
|
||||
fclose (UE_stats);
|
||||
}
|
||||
|
||||
# endif
|
||||
pthread_exit((void *)arg);
|
||||
}
|
||||
#endif
|
||||
|
||||
|
||||
|
||||
@@ -678,9 +602,6 @@ void init_pdcp(void) {
|
||||
}
|
||||
|
||||
int main( int argc, char **argv ) {
|
||||
#if defined (XFORMS)
|
||||
void *status;
|
||||
#endif
|
||||
int CC_id;
|
||||
uint8_t abstraction_flag=0;
|
||||
#ifdef UESIM_EXPANSION
|
||||
@@ -690,9 +611,6 @@ int main( int argc, char **argv ) {
|
||||
// if not changed from the command line option --num-ues
|
||||
NB_UE_INST=1;
|
||||
NB_THREAD_INST=1;
|
||||
#if defined (XFORMS)
|
||||
int ret;
|
||||
#endif
|
||||
configmodule_interface_t *config_mod;
|
||||
start_background_system();
|
||||
config_mod = load_configmodule(argc, argv, CONFIG_ENABLECMDLINEONLY);
|
||||
@@ -752,9 +670,7 @@ int main( int argc, char **argv ) {
|
||||
|
||||
MSC_INIT(MSC_E_UTRAN, THREAD_MAX+TASK_MAX);
|
||||
init_opt();
|
||||
|
||||
init_pdcp();
|
||||
|
||||
//TTN for D2D
|
||||
printf ("RRC control socket\n");
|
||||
rrc_control_socket_init();
|
||||
@@ -901,37 +817,9 @@ int main( int argc, char **argv ) {
|
||||
PHY_vars_UE_g[0][0]->no_timing_correction = 1;
|
||||
}
|
||||
|
||||
#ifdef XFORMS
|
||||
int UE_id;
|
||||
printf("XFORMS\n");
|
||||
if(IS_SOFTMODEM_DOFORMS)
|
||||
load_softscope("ue");
|
||||
|
||||
if (get_softmodem_params()->do_forms==1) {
|
||||
fl_initialize (&argc, argv, NULL, 0, 0);
|
||||
form_stats = create_form_stats_form();
|
||||
fl_show_form (form_stats->stats_form, FL_PLACE_HOTSPOT, FL_FULLBORDER, "stats");
|
||||
UE_id = 0;
|
||||
form_ue[UE_id] = create_lte_phy_scope_ue();
|
||||
sprintf (title, "LTE DL SCOPE UE");
|
||||
fl_show_form (form_ue[UE_id]->lte_phy_scope_ue, FL_PLACE_HOTSPOT, FL_FULLBORDER, title);
|
||||
/*
|
||||
if (openair_daq_vars.use_ia_receiver) {
|
||||
fl_set_button(form_ue[UE_id]->button_0,1);
|
||||
fl_set_object_label(form_ue[UE_id]->button_0, "IA Receiver ON");
|
||||
} else {
|
||||
fl_set_button(form_ue[UE_id]->button_0,0);
|
||||
fl_set_object_label(form_ue[UE_id]->button_0, "IA Receiver OFF");
|
||||
}*/
|
||||
fl_set_button(form_ue[UE_id]->button_0,0);
|
||||
fl_set_object_label(form_ue[UE_id]->button_0, "IA Receiver OFF");
|
||||
ret = pthread_create(&forms_thread, NULL, scope_thread, NULL);
|
||||
|
||||
if (ret == 0)
|
||||
pthread_setname_np( forms_thread, "xforms" );
|
||||
|
||||
printf("Scope thread created, ret=%d\n",ret);
|
||||
}
|
||||
|
||||
#endif
|
||||
config_check_unknown_cmdlineopt(CONFIG_CHECKALLSECTIONS);
|
||||
printf("Sending sync to all threads (%p,%p,%p)\n",&sync_var,&sync_cond,&sync_mutex);
|
||||
pthread_mutex_lock(&sync_mutex);
|
||||
@@ -960,19 +848,11 @@ int main( int argc, char **argv ) {
|
||||
|
||||
printf("Terminating application - oai_exit=%d\n",oai_exit);
|
||||
#endif
|
||||
|
||||
// stop threads
|
||||
#ifdef XFORMS
|
||||
printf("waiting for XFORMS thread\n");
|
||||
if(IS_SOFTMODEM_DOFORMS)
|
||||
end_forms();
|
||||
|
||||
if (get_softmodem_params()->do_forms==1) {
|
||||
pthread_join(forms_thread,&status);
|
||||
fl_hide_form(form_stats->stats_form);
|
||||
fl_free_form(form_stats->stats_form);
|
||||
fl_hide_form(form_ue[0]->lte_phy_scope_ue);
|
||||
fl_free_form(form_ue[0]->lte_phy_scope_ue);
|
||||
}
|
||||
|
||||
#endif
|
||||
printf("stopping MODEM threads\n");
|
||||
pthread_cond_destroy(&sync_cond);
|
||||
pthread_mutex_destroy(&sync_mutex);
|
||||
|
||||
Reference in New Issue
Block a user