Operation of all of the physical simulators are tested and verified + various warning removals
This commit is contained in:
@@ -953,20 +953,20 @@
|
|||||||
<pre_exec>$OPENAIR_DIR/cmake_targets/autotests/tools/free_mem.bash</pre_exec>
|
<pre_exec>$OPENAIR_DIR/cmake_targets/autotests/tools/free_mem.bash</pre_exec>
|
||||||
<pre_exec_args></pre_exec_args>
|
<pre_exec_args></pre_exec_args>
|
||||||
<main_exec> $OPENAIR_DIR/targets/bin/dlsim.Rel15</main_exec>
|
<main_exec> $OPENAIR_DIR/targets/bin/dlsim.Rel15</main_exec>
|
||||||
<main_exec_args> -m5 -gF -s-1 -w1.0 -f.2 -n500 -B50 -c2 -z2 -O60
|
<main_exec_args> -m=5 -g=F -s=-1 -w=1.0 -f=.2 -n=500 -B=50 -c=2 -z=2 -O=60
|
||||||
-m4 -gF -s0 -w1.0 -f.2 -n500 -B6 -c4 -z2 -O60
|
-m=4 -g=F -s=0 -w=1.0 -f=.2 -n=500 -B=6 -c=4 -z=2 -O=60
|
||||||
-m15 -gF -s6.7 -w1.0 -f.2 -n500 -B50 -c2 -z2 -O60
|
-m=15 -g=F -s=6.7 -w=1.0 -f=.2 -n=500 -B=50 -c=2 -z=2 -O=60
|
||||||
-m15 -gF -s6.7 -w1.0 -f.2 -n500 -B25 -c2 -z2 -O60
|
-m=15 -g=F -s=6.7 -w=1.0 -f=.2 -n=500 -B=25 -c=2 -z=2 -O=60
|
||||||
-m15 -gG -s1.4 -w1.0 -f.2 -n500 -B50 -c2 -z2 -O25
|
-m=15 -g=G -s=1.4 -w=1.0 -f=.2 -n=500 -B=50 -c=2 -z=2 -O=25
|
||||||
-m15 -gG -s1.4 -w1.0 -f.2 -n500 -B25 -c2 -z2 -O25
|
-m=15 -g=G -s=1.4 -w=1.0 -f=.2 -n=500 -B=25 -c=2 -z=2 -O=25
|
||||||
-m25 -gF -s17.4 -w1.0 -f.2 -n500 -B25 -c3 -z2 -O60
|
-m=25 -g=F -s=17.4 -w=1.0 -f=.2 -n=500 -B=25 -c=3 -z=2 -O=60
|
||||||
-m25 -gF -s17.5 -w1.0 -f.2 -n500 -B25 -c3 -z2 -r1022 -O60
|
-m=25 -g=F -s=17.5 -w=1.0 -f=.2 -n=500 -B=25 -c=3 -z=2 -r=1022 -O=60
|
||||||
-m26 -gF -s17.7 -w1.0 -f.2 -n500 -B50 -c2 -z2 -O60
|
-m=26 -g=F -s=17.7 -w=1.0 -f=.2 -n=500 -B=50 -c=2 -z=2 -O=60
|
||||||
-m26 -gF -s17.6 -w1.0 -f.2 -n500 -B100 -c2 -z2 -O60
|
-m=26 -g=F -s=17.6 -w=1.0 -f=.2 -n=500 -B=100 -c=2 -z=2 -O=60
|
||||||
-m26 -gF -s17.3 -w1.0 -f.2 -n500 -B100 -c2 -z2 -r1600 -O60
|
-m=26 -g=F -s=17.3 -w=1.0 -f=.2 -n=500 -B=100 -c=2 -z=2 -r=1600 -O=60
|
||||||
-m26 -gF -s16.6 -w1.0 -f.2 -n500 -B100 -c2 -z2 -r1899 -O60
|
-m=26 -g=F -s=16.6 -w=1.0 -f=.2 -n=500 -B=100 -c=2 -z=2 -r=1899 -O=60
|
||||||
-m14 -gF -s6.8 -w1.0 -f.2 -n500 -B50 -c2 -x2 -y2 -z2 -O60
|
-m=14 -g=F -s=6.8 -w=1.0 -f=.2 -n=500 -B=50 -c=2 -x=2 -y=2 -z=2 -O=60
|
||||||
-m13 -gF -s5.9 -w1.0 -f.2 -n500 -B25 -c3 -x2 -y2 -z2 -O60</main_exec_args>
|
-m=13 -g=F -s=5.9 -w=1.0 -f=.2 -n=500 -B=25 -c=3 -x=2 -y=2 -z=2 -O=60</main_exec_args>
|
||||||
<tags>dlsim.test1 dlsim.test5 dlsim.test6 dlsim.test6b dlsim.test7 dlsim.test7b dlsim.test10 dlsim.test10b dlsim.test11 dlsim.test11a dlsim.test11b dlsim.test11c dlsim.TM2_test1 dlsim.TM2_test1b</tags>
|
<tags>dlsim.test1 dlsim.test5 dlsim.test6 dlsim.test6b dlsim.test7 dlsim.test7b dlsim.test10 dlsim.test10b dlsim.test11 dlsim.test11a dlsim.test11b dlsim.test11c dlsim.TM2_test1 dlsim.TM2_test1b</tags>
|
||||||
<search_expr_true>"passed"</search_expr_true>
|
<search_expr_true>"passed"</search_expr_true>
|
||||||
<search_expr_false>segmentation fault|assertion|exiting|fatal</search_expr_false>
|
<search_expr_false>segmentation fault|assertion|exiting|fatal</search_expr_false>
|
||||||
|
|||||||
@@ -575,6 +575,22 @@ function main() {
|
|||||||
$build_dir $exec \
|
$build_dir $exec \
|
||||||
$exec $dbin/$exec.$REL
|
$exec $dbin/$exec.$REL
|
||||||
|
|
||||||
|
# if --eNB --UE are both provided together as build options
|
||||||
|
if [ "$eNB" = "1" -a "$UE" = "1" ] ; then
|
||||||
|
echo_info "Compiling lte-uesoftmodem"
|
||||||
|
compilations \
|
||||||
|
$build_dir lte-uesoftmodem \
|
||||||
|
lte-uesoftmodem $dbin/lte-uesoftmodem.$REL
|
||||||
|
fi
|
||||||
|
|
||||||
|
# if --gNB --nrUE are both provided together as build options
|
||||||
|
if [ "$gNB" = "1" -a "$nrUE" = "1" ] ; then
|
||||||
|
echo_info "Compiling nr-uesoftmodem"
|
||||||
|
compilations \
|
||||||
|
$build_dir nr-uesoftmodem \
|
||||||
|
nr-uesoftmodem $dbin/nr-uesoftmodem.$REL
|
||||||
|
fi
|
||||||
|
|
||||||
# mandatory shared lib
|
# mandatory shared lib
|
||||||
compilations \
|
compilations \
|
||||||
$build_dir $config_libconfig_shlib \
|
$build_dir $config_libconfig_shlib \
|
||||||
|
|||||||
@@ -1,9 +0,0 @@
|
|||||||
set(ENABLE_ITTI True)
|
|
||||||
set(ENABLE_USE_MME False)
|
|
||||||
set(PDCP_USE_NETLINK True)
|
|
||||||
set(LINK_ENB_PDCP_TO_IP_DRIVER True)
|
|
||||||
set(LINK_ENB_PDCP_TO_GTPV1U False)
|
|
||||||
set(PDCP_USE_NETLINK_QUEUES False)
|
|
||||||
set(LINUX True)
|
|
||||||
set(SECU False)
|
|
||||||
set(NAS_UE False)
|
|
||||||
+2
-2
@@ -88,8 +88,8 @@ unsigned short config_frames[4] = {2,9,11,13};
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
/* these variables have to be defined before including ENB_APP/enb_paramdef.h and GNB_APP/gnb_paramdef.h */
|
/* these variables have to be defined before including ENB_APP/enb_paramdef.h and GNB_APP/gnb_paramdef.h */
|
||||||
static int DEFBANDS[] = {7};
|
//static int DEFBANDS[] = {7};
|
||||||
static int DEFENBS[] = {0};
|
//static int DEFENBS[] = {0};
|
||||||
|
|
||||||
static int DEFNRBANDS[] = {7};
|
static int DEFNRBANDS[] = {7};
|
||||||
static int DEFGNBS[] = {0};
|
static int DEFGNBS[] = {0};
|
||||||
|
|||||||
@@ -93,20 +93,24 @@
|
|||||||
#define CONFIG_HLP_USRP_CLK_SRC "USRP clock source: 'internal' or 'external'\n"
|
#define CONFIG_HLP_USRP_CLK_SRC "USRP clock source: 'internal' or 'external'\n"
|
||||||
|
|
||||||
#define CONFIG_HLP_FLOG "Enable online log \n"
|
#define CONFIG_HLP_FLOG "Enable online log \n"
|
||||||
#define CONFIG_HLP_LOGL "Set the global log level, valide options: (9:trace, 8/7:debug, 6:info, 4:warn, 3:error)\n"
|
#define CONFIG_HLP_LOGL "Set the global log level, valid options: (4:trace, 3:debug, 2:info, 1:warn, (0:error))\n"
|
||||||
#define CONFIG_HLP_LOGV "Set the global log verbosity \n"
|
#define CONFIG_HLP_LOGV "Set the global log verbosity \n"
|
||||||
#define CONFIG_HLP_TELN "Start embedded telnet server \n"
|
#define CONFIG_HLP_TELN "Start embedded telnet server \n"
|
||||||
|
#define CONFIG_HLP_MSC "Enable the MSC tracing utility \n"
|
||||||
#define CONFIG_HLP_SNR "Set average SNR in dB (for --siml1 option)\n"
|
#define CONFIG_HLP_SNR "Set average SNR in dB (for --siml1 option)\n"
|
||||||
/*------------------------------------------------------------------------------------------------------------------------------*/
|
/*--------------------------------------------------------------------------------------------------------------------------------*/
|
||||||
/* command line parameters for LOG utility */
|
/* command line parameters for LOG utility */
|
||||||
/* optname helpstr paramflags XXXptr defXXXval type numelt */
|
/* optname helpstr paramflags XXXptr defXXXval type numelt */
|
||||||
/*------------------------------------------------------------------------------------------------------------------------------*/
|
/*--------------------------------------------------------------------------------------------------------------------------------*/
|
||||||
|
#define START_MSC softmodem_params.start_msc
|
||||||
#define CMDLINE_LOGPARAMS_DESC { \
|
#define CMDLINE_LOGPARAMS_DESC { \
|
||||||
{"R" , CONFIG_HLP_FLOG, 0, uptr:&online_log_messages, defintval:1, TYPE_INT, 0}, \
|
{"R" , CONFIG_HLP_FLOG, 0, uptr:&online_log_messages, defintval:1, TYPE_INT, 0}, \
|
||||||
{"g" , CONFIG_HLP_LOGL, 0, uptr:&glog_level, defintval:0, TYPE_UINT, 0}, \
|
{"g" , CONFIG_HLP_LOGL, 0, uptr:&glog_level, defintval:0, TYPE_UINT, 0}, \
|
||||||
{"G" , CONFIG_HLP_LOGV, 0, uptr:&glog_verbosity, defintval:0, TYPE_UINT16, 0}, \
|
{"G" , CONFIG_HLP_LOGV, 0, uptr:&glog_verbosity, defintval:0, TYPE_UINT16, 0}, \
|
||||||
{"telnetsrv", CONFIG_HLP_TELN, PARAMFLAG_BOOL, uptr:&start_telnetsrv, defintval:0, TYPE_UINT, 0}, \
|
{"telnetsrv", CONFIG_HLP_TELN, PARAMFLAG_BOOL, uptr:&start_telnetsrv, defintval:0, TYPE_UINT, 0}, \
|
||||||
|
{"msc", CONFIG_HLP_MSC, PARAMFLAG_BOOL, uptr:&START_MSC, defintval:0, TYPE_UINT, 0}, \
|
||||||
}
|
}
|
||||||
|
|
||||||
#define CMDLINE_ONLINELOG_IDX 0
|
#define CMDLINE_ONLINELOG_IDX 0
|
||||||
#define CMDLINE_GLOGLEVEL_IDX 1
|
#define CMDLINE_GLOGLEVEL_IDX 1
|
||||||
#define CMDLINE_GLOGVERBO_IDX 2
|
#define CMDLINE_GLOGVERBO_IDX 2
|
||||||
@@ -114,6 +118,7 @@
|
|||||||
|
|
||||||
/***************************************************************************************************************************************/
|
/***************************************************************************************************************************************/
|
||||||
|
|
||||||
|
|
||||||
extern pthread_cond_t sync_cond;
|
extern pthread_cond_t sync_cond;
|
||||||
extern pthread_mutex_t sync_mutex;
|
extern pthread_mutex_t sync_mutex;
|
||||||
extern int sync_var;
|
extern int sync_var;
|
||||||
|
|||||||
@@ -189,6 +189,23 @@ int transmission_mode=1;
|
|||||||
int emulate_rf = 0;
|
int emulate_rf = 0;
|
||||||
int numerology = 0;
|
int numerology = 0;
|
||||||
|
|
||||||
|
typedef struct {
|
||||||
|
uint64_t optmask;
|
||||||
|
THREAD_STRUCT thread_struct;
|
||||||
|
char rf_config_file[1024];
|
||||||
|
int phy_test;
|
||||||
|
uint8_t usim_test;
|
||||||
|
int emulate_rf;
|
||||||
|
int wait_for_sync; //eNodeB only
|
||||||
|
int single_thread_flag; //eNodeB only
|
||||||
|
int chain_offset;
|
||||||
|
int numerology;
|
||||||
|
unsigned int start_msc;
|
||||||
|
uint32_t clock_source;
|
||||||
|
int hw_timing_advance;
|
||||||
|
} softmodem_params_t;
|
||||||
|
static softmodem_params_t softmodem_params;
|
||||||
|
|
||||||
static char *parallel_config = NULL;
|
static char *parallel_config = NULL;
|
||||||
static char *worker_config = NULL;
|
static char *worker_config = NULL;
|
||||||
static THREAD_STRUCT thread_struct;
|
static THREAD_STRUCT thread_struct;
|
||||||
@@ -492,7 +509,8 @@ static void get_options(void) {
|
|||||||
uint32_t online_log_messages;
|
uint32_t online_log_messages;
|
||||||
uint32_t glog_level, glog_verbosity;
|
uint32_t glog_level, glog_verbosity;
|
||||||
uint32_t start_telnetsrv;
|
uint32_t start_telnetsrv;
|
||||||
paramdef_t cmdline_params[] = CMDLINE_PARAMS_DESC ;
|
char *in_ip=NULL, *in_path=NULL;
|
||||||
|
paramdef_t cmdline_params[] = CMDLINE_PARAMS_DESC_GNB ;
|
||||||
paramdef_t cmdline_logparams[] = CMDLINE_LOGPARAMS_DESC ;
|
paramdef_t cmdline_logparams[] = CMDLINE_LOGPARAMS_DESC ;
|
||||||
config_process_cmdline( cmdline_params,sizeof(cmdline_params)/sizeof(paramdef_t),NULL);
|
config_process_cmdline( cmdline_params,sizeof(cmdline_params)/sizeof(paramdef_t),NULL);
|
||||||
|
|
||||||
@@ -550,10 +568,10 @@ static void get_options(void) {
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
void set_default_frame_parms(nfapi_nr_config_request_t *config[MAX_NUM_CCs], NR_DL_FRAME_PARMS *frame_parms[MAX_NUM_CCs]) {
|
void set_default_frame_parms(nfapi_nr_config_request_t *config[MAX_NUM_CCs],
|
||||||
int CC_id;
|
NR_DL_FRAME_PARMS *frame_parms[MAX_NUM_CCs])
|
||||||
|
{
|
||||||
for (CC_id=0; CC_id<MAX_NUM_CCs; CC_id++) {
|
for (int CC_id=0; CC_id<MAX_NUM_CCs; CC_id++) {
|
||||||
frame_parms[CC_id] = (NR_DL_FRAME_PARMS *) malloc(sizeof(NR_DL_FRAME_PARMS));
|
frame_parms[CC_id] = (NR_DL_FRAME_PARMS *) malloc(sizeof(NR_DL_FRAME_PARMS));
|
||||||
config[CC_id] = (nfapi_nr_config_request_t *) malloc(sizeof(nfapi_nr_config_request_t));
|
config[CC_id] = (nfapi_nr_config_request_t *) malloc(sizeof(nfapi_nr_config_request_t));
|
||||||
config[CC_id]->subframe_config.numerology_index_mu.value =1;
|
config[CC_id]->subframe_config.numerology_index_mu.value =1;
|
||||||
@@ -861,7 +879,7 @@ static void wait_nfapi_init(char *thread_name) {
|
|||||||
|
|
||||||
int main( int argc, char **argv )
|
int main( int argc, char **argv )
|
||||||
{
|
{
|
||||||
int i, CC_id, ru_id;
|
int i, ru_id, CC_id = 0;
|
||||||
start_background_system();
|
start_background_system();
|
||||||
|
|
||||||
///static configuration for NR at the moment
|
///static configuration for NR at the moment
|
||||||
|
|||||||
@@ -17,7 +17,7 @@
|
|||||||
/* command line parameters common to eNodeB and UE */
|
/* command line parameters common to eNodeB and UE */
|
||||||
/* optname helpstr paramflags XXXptr defXXXval type numelt */
|
/* optname helpstr paramflags XXXptr defXXXval type numelt */
|
||||||
/*---------------------------------------------------------------------------------------------------------------------------------------------------------------------------*/
|
/*---------------------------------------------------------------------------------------------------------------------------------------------------------------------------*/
|
||||||
#define CMDLINE_PARAMS_DESC { \
|
#define CMDLINE_PARAMS_DESC_GNB { \
|
||||||
{"rf-config-file", CONFIG_HLP_RFCFGF, 0, strptr:(char **)&rf_config_file, defstrval:NULL, TYPE_STRING, sizeof(rf_config_file)},\
|
{"rf-config-file", CONFIG_HLP_RFCFGF, 0, strptr:(char **)&rf_config_file, defstrval:NULL, TYPE_STRING, sizeof(rf_config_file)},\
|
||||||
{"ulsch-max-errors", CONFIG_HLP_ULMAXE, 0, uptr:&ULSCH_max_consecutive_errors, defuintval:0, TYPE_UINT, 0}, \
|
{"ulsch-max-errors", CONFIG_HLP_ULMAXE, 0, uptr:&ULSCH_max_consecutive_errors, defuintval:0, TYPE_UINT, 0}, \
|
||||||
{"phy-test", CONFIG_HLP_PHYTST, PARAMFLAG_BOOL, iptr:&phy_test, defintval:0, TYPE_INT, 0}, \
|
{"phy-test", CONFIG_HLP_PHYTST, PARAMFLAG_BOOL, iptr:&phy_test, defintval:0, TYPE_INT, 0}, \
|
||||||
|
|||||||
@@ -161,6 +161,23 @@ uint8_t nb_antenna_rx = 1;
|
|||||||
char ref[128] = "internal";
|
char ref[128] = "internal";
|
||||||
char channels[128] = "0";
|
char channels[128] = "0";
|
||||||
|
|
||||||
|
typedef struct {
|
||||||
|
uint64_t optmask;
|
||||||
|
THREAD_STRUCT thread_struct;
|
||||||
|
char rf_config_file[1024];
|
||||||
|
int phy_test;
|
||||||
|
uint8_t usim_test;
|
||||||
|
int emulate_rf;
|
||||||
|
int wait_for_sync; //eNodeB only
|
||||||
|
int single_thread_flag; //eNodeB only
|
||||||
|
int chain_offset;
|
||||||
|
int numerology;
|
||||||
|
unsigned int start_msc;
|
||||||
|
uint32_t clock_source;
|
||||||
|
int hw_timing_advance;
|
||||||
|
} softmodem_params_t;
|
||||||
|
static softmodem_params_t softmodem_params;
|
||||||
|
|
||||||
static char *parallel_config = NULL;
|
static char *parallel_config = NULL;
|
||||||
static char *worker_config = NULL;
|
static char *worker_config = NULL;
|
||||||
static THREAD_STRUCT thread_struct;
|
static THREAD_STRUCT thread_struct;
|
||||||
@@ -386,7 +403,7 @@ int16_t dlsch_demod_shift;
|
|||||||
static void get_options(void) {
|
static void get_options(void) {
|
||||||
int CC_id;
|
int CC_id;
|
||||||
int tddflag=0, nonbiotflag;
|
int tddflag=0, nonbiotflag;
|
||||||
char *loopfile=NULL;
|
char *loopfile=NULL, *in_ip=NULL, *in_path=NULL;
|
||||||
int dumpframe=0;
|
int dumpframe=0;
|
||||||
uint32_t online_log_messages;
|
uint32_t online_log_messages;
|
||||||
uint32_t glog_level, glog_verbosity;
|
uint32_t glog_level, glog_verbosity;
|
||||||
|
|||||||
@@ -528,7 +528,7 @@ typedef struct{
|
|||||||
uint16_t srs_monitoring_periodicity;
|
uint16_t srs_monitoring_periodicity;
|
||||||
uint16_t slot_monitoring_periodicity;
|
uint16_t slot_monitoring_periodicity;
|
||||||
uint16_t slot_monitoring_offset;
|
uint16_t slot_monitoring_offset;
|
||||||
uint16_t monitoring_symbols_in_slot;
|
uint32_t monitoring_symbols_in_slot;
|
||||||
uint16_t number_of_candidates[NFAPI_NR_MAX_NB_CCE_AGGREGATION_LEVELS];
|
uint16_t number_of_candidates[NFAPI_NR_MAX_NB_CCE_AGGREGATION_LEVELS];
|
||||||
} nfapi_nr_search_space_t;
|
} nfapi_nr_search_space_t;
|
||||||
|
|
||||||
|
|||||||
@@ -279,11 +279,12 @@ void phy_config_request(PHY_Config_t *phy_config) {
|
|||||||
}*/
|
}*/
|
||||||
|
|
||||||
|
|
||||||
void phy_free_nr_gNB(PHY_VARS_gNB *gNB) {
|
void phy_free_nr_gNB(PHY_VARS_gNB *gNB)
|
||||||
|
{
|
||||||
//NR_DL_FRAME_PARMS* const fp = &gNB->frame_parms;
|
//NR_DL_FRAME_PARMS* const fp = &gNB->frame_parms;
|
||||||
//nfapi_nr_config_request_t *cfg = &gNB->gNB_config;
|
//nfapi_nr_config_request_t *cfg = &gNB->gNB_config;
|
||||||
NR_gNB_COMMON *const common_vars = &gNB->common_vars;
|
NR_gNB_COMMON *const common_vars = &gNB->common_vars;
|
||||||
NR_gNB_PUSCH **const pusch_vars = gNB->pusch_vars;
|
//NR_gNB_PUSCH **const pusch_vars = gNB->pusch_vars;
|
||||||
/*LTE_eNB_SRS *const srs_vars = gNB->srs_vars;
|
/*LTE_eNB_SRS *const srs_vars = gNB->srs_vars;
|
||||||
LTE_eNB_PRACH *const prach_vars = &gNB->prach_vars;*/
|
LTE_eNB_PRACH *const prach_vars = &gNB->prach_vars;*/
|
||||||
uint32_t ***pdcch_dmrs = gNB->nr_gold_pdcch_dmrs;
|
uint32_t ***pdcch_dmrs = gNB->nr_gold_pdcch_dmrs;
|
||||||
|
|||||||
@@ -678,13 +678,13 @@ int init_nr_ue_signal(PHY_VARS_NR_UE *ue,
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
int i,j,k,l,slot,symb,q,layer;
|
int i,j,k,l,slot,symb,q;
|
||||||
int eNB_id;
|
int eNB_id;
|
||||||
int th_id;
|
int th_id;
|
||||||
int n_ssb_crb=(fp->N_RB_DL-20);
|
int n_ssb_crb=(fp->N_RB_DL-20);
|
||||||
int k_ssb=0;
|
int k_ssb=0;
|
||||||
uint32_t ****pusch_dmrs;
|
uint32_t ****pusch_dmrs;
|
||||||
int N_n_scid[2] = {0,1}; // [HOTFIX] This is a temporary implementation of scramblingID0 and scramblingID1 which are given by DMRS-UplinkConfig
|
uint16_t N_n_scid[2] = {0,1}; // [HOTFIX] This is a temporary implementation of scramblingID0 and scramblingID1 which are given by DMRS-UplinkConfig
|
||||||
int n_scid;
|
int n_scid;
|
||||||
abstraction_flag = 0;
|
abstraction_flag = 0;
|
||||||
fp->nb_antennas_tx = 1;
|
fp->nb_antennas_tx = 1;
|
||||||
|
|||||||
@@ -26,20 +26,19 @@ extern short nr_mod_table[NR_MOD_TABLE_SIZE_SHORT];
|
|||||||
void nr_modulation(uint32_t *in,
|
void nr_modulation(uint32_t *in,
|
||||||
uint16_t length,
|
uint16_t length,
|
||||||
uint16_t mod_order,
|
uint16_t mod_order,
|
||||||
int16_t *out) {
|
int16_t *out)
|
||||||
|
{
|
||||||
uint16_t offset;
|
uint16_t offset;
|
||||||
uint16_t order;
|
|
||||||
int i,j;
|
|
||||||
uint8_t idx, b_idx;
|
uint8_t idx, b_idx;
|
||||||
|
|
||||||
offset = (mod_order==2)? NR_MOD_TABLE_QPSK_OFFSET : (mod_order==4)? NR_MOD_TABLE_QAM16_OFFSET : \
|
offset = (mod_order==2)? NR_MOD_TABLE_QPSK_OFFSET : (mod_order==4)? NR_MOD_TABLE_QAM16_OFFSET : \
|
||||||
(mod_order==6)? NR_MOD_TABLE_QAM64_OFFSET: (mod_order==8)? NR_MOD_TABLE_QAM256_OFFSET : 0;
|
(mod_order==6)? NR_MOD_TABLE_QAM64_OFFSET: (mod_order==8)? NR_MOD_TABLE_QAM256_OFFSET : 0;
|
||||||
|
|
||||||
for (i=0; i<length/mod_order; i++) {
|
for (int i=0; i<length/mod_order; i++)
|
||||||
|
{
|
||||||
idx = 0;
|
idx = 0;
|
||||||
|
for (int j=0; j<mod_order; j++)
|
||||||
for (j=0; j<mod_order; j++) {
|
{
|
||||||
b_idx = (i*mod_order+j)&0x1f;
|
b_idx = (i*mod_order+j)&0x1f;
|
||||||
if (i && (!b_idx))
|
if (i && (!b_idx))
|
||||||
in++;
|
in++;
|
||||||
|
|||||||
@@ -23,7 +23,6 @@
|
|||||||
|
|
||||||
void nr_gold_pbch(PHY_VARS_NR_UE* ue)
|
void nr_gold_pbch(PHY_VARS_NR_UE* ue)
|
||||||
{
|
{
|
||||||
|
|
||||||
unsigned int n, x1, x2;
|
unsigned int n, x1, x2;
|
||||||
unsigned int Nid, i_ssb, i_ssb2;
|
unsigned int Nid, i_ssb, i_ssb2;
|
||||||
unsigned char Lmax, l, n_hf, N_hf;
|
unsigned char Lmax, l, n_hf, N_hf;
|
||||||
@@ -63,9 +62,10 @@ void nr_gold_pbch(PHY_VARS_NR_UE* ue)
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void nr_gold_pdcch(PHY_VARS_NR_UE* ue,unsigned short n_idDMRS, unsigned short length_dmrs)
|
void nr_gold_pdcch(PHY_VARS_NR_UE* ue,
|
||||||
|
unsigned short n_idDMRS,
|
||||||
|
unsigned short length_dmrs)
|
||||||
{
|
{
|
||||||
|
|
||||||
unsigned char ns,l;
|
unsigned char ns,l;
|
||||||
unsigned int n,x1,x2,x2tmp0;
|
unsigned int n,x1,x2,x2tmp0;
|
||||||
unsigned int nid;
|
unsigned int nid;
|
||||||
@@ -106,9 +106,11 @@ void nr_gold_pdcch(PHY_VARS_NR_UE* ue,unsigned short n_idDMRS, unsigned short le
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void nr_gold_pdsch(PHY_VARS_NR_UE* ue,unsigned short lbar,unsigned short *n_idDMRS, unsigned short length_dmrs)
|
void nr_gold_pdsch(PHY_VARS_NR_UE* ue,
|
||||||
|
unsigned short lbar,
|
||||||
|
unsigned short *n_idDMRS,
|
||||||
|
unsigned short length_dmrs)
|
||||||
{
|
{
|
||||||
|
|
||||||
unsigned char ns,l;
|
unsigned char ns,l;
|
||||||
unsigned int n,x1,x2,x2tmp0;
|
unsigned int n,x1,x2,x2tmp0;
|
||||||
int nscid;
|
int nscid;
|
||||||
@@ -161,9 +163,10 @@ void nr_gold_pdsch(PHY_VARS_NR_UE* ue,unsigned short lbar,unsigned short *n_idDM
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void nr_init_pusch_dmrs(PHY_VARS_NR_UE* ue, uint16_t *N_n_scid, uint8_t n_scid)
|
void nr_init_pusch_dmrs(PHY_VARS_NR_UE* ue,
|
||||||
|
uint16_t *N_n_scid,
|
||||||
|
uint8_t n_scid)
|
||||||
{
|
{
|
||||||
|
|
||||||
uint32_t x1, x2, n;
|
uint32_t x1, x2, n;
|
||||||
uint8_t reset, slot, symb, q;
|
uint8_t reset, slot, symb, q;
|
||||||
NR_DL_FRAME_PARMS *fp = &ue->frame_parms;
|
NR_DL_FRAME_PARMS *fp = &ue->frame_parms;
|
||||||
|
|||||||
@@ -31,7 +31,9 @@
|
|||||||
/*!\brief This function generates the NR Gold sequence (38-211, Sec 5.2.1) for the PBCH DMRS.
|
/*!\brief This function generates the NR Gold sequence (38-211, Sec 5.2.1) for the PBCH DMRS.
|
||||||
@param PHY_VARS_NR_UE* ue structure provides configuration, frame parameters and the pointers to the 32 bits sequence storage tables
|
@param PHY_VARS_NR_UE* ue structure provides configuration, frame parameters and the pointers to the 32 bits sequence storage tables
|
||||||
*/
|
*/
|
||||||
int nr_pbch_dmrs_rx(int dmrss,unsigned int *nr_gold_pbch, int32_t *output );
|
int nr_pbch_dmrs_rx(int dmrss,
|
||||||
|
unsigned int *nr_gold_pbch,
|
||||||
|
int32_t *output);
|
||||||
|
|
||||||
/*!\brief This function generates the NR Gold sequence (38-211, Sec 5.2.1) for the PDCCH DMRS.
|
/*!\brief This function generates the NR Gold sequence (38-211, Sec 5.2.1) for the PDCCH DMRS.
|
||||||
@param PHY_VARS_NR_UE* ue structure provides configuration, frame parameters and the pointers to the 32 bits sequence storage tables
|
@param PHY_VARS_NR_UE* ue structure provides configuration, frame parameters and the pointers to the 32 bits sequence storage tables
|
||||||
@@ -63,6 +65,8 @@ void nr_gold_pdsch(PHY_VARS_NR_UE* ue,
|
|||||||
unsigned short *n_idDMRS,
|
unsigned short *n_idDMRS,
|
||||||
unsigned short length_dmrs);
|
unsigned short length_dmrs);
|
||||||
|
|
||||||
void nr_init_pusch_dmrs(PHY_VARS_NR_UE* ue, uint16_t *N_n_scid, uint8_t n_scid);
|
void nr_init_pusch_dmrs(PHY_VARS_NR_UE* ue,
|
||||||
|
uint16_t *N_n_scid,
|
||||||
|
uint8_t n_scid);
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|||||||
@@ -218,8 +218,8 @@ void feptx_ofdm_2thread(RU_t *ru,int frame,int subframe) {
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void feptx_ofdm(RU_t *ru,int frame,int subframe) {
|
void feptx_ofdm(RU_t *ru, int frame, int subframe)
|
||||||
|
{
|
||||||
LTE_DL_FRAME_PARMS *fp=ru->frame_parms;
|
LTE_DL_FRAME_PARMS *fp=ru->frame_parms;
|
||||||
|
|
||||||
unsigned int aa, slot_offset, slot_offset_F;
|
unsigned int aa, slot_offset, slot_offset_F;
|
||||||
|
|||||||
@@ -206,31 +206,50 @@ void phy_procedures_gNB_TX(PHY_VARS_gNB *gNB,
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
void nr_ulsch_procedures(PHY_VARS_gNB *gNB, gNB_L1_rxtx_proc_t *proc, int UE_id, uint8_t harq_pid) {
|
void nr_ulsch_procedures(PHY_VARS_gNB *gNB,
|
||||||
|
gNB_L1_rxtx_proc_t *proc,
|
||||||
|
int UE_id,
|
||||||
|
uint8_t harq_pid)
|
||||||
|
{
|
||||||
NR_DL_FRAME_PARMS *frame_parms = &gNB->frame_parms;
|
NR_DL_FRAME_PARMS *frame_parms = &gNB->frame_parms;
|
||||||
nfapi_nr_ul_config_ulsch_pdu *rel15_ul = &gNB->ulsch[UE_id+1][0]->harq_processes[harq_pid]->ulsch_pdu;
|
nfapi_nr_ul_config_ulsch_pdu *rel15_ul = &gNB->ulsch[UE_id+1][0]->harq_processes[harq_pid]->ulsch_pdu;
|
||||||
nfapi_nr_ul_config_ulsch_pdu_rel15_t *nfapi_ulsch_pdu_rel15 = &rel15_ul->ulsch_pdu_rel15;
|
nfapi_nr_ul_config_ulsch_pdu_rel15_t *nfapi_ulsch_pdu_rel15 = &rel15_ul->ulsch_pdu_rel15;
|
||||||
|
|
||||||
uint8_t ret;
|
//uint8_t ret;
|
||||||
uint32_t G;
|
uint32_t G;
|
||||||
int Nid_cell = 0; // [hna] shouldn't be a local variable (should be signaled)
|
int Nid_cell = 0; // [hna] shouldn't be a local variable (should be signaled)
|
||||||
|
|
||||||
G = nr_get_G(nfapi_ulsch_pdu_rel15->number_rbs, nfapi_ulsch_pdu_rel15->number_symbols, nfapi_ulsch_pdu_rel15->nb_re_dmrs, nfapi_ulsch_pdu_rel15->length_dmrs, nfapi_ulsch_pdu_rel15->Qm, nfapi_ulsch_pdu_rel15->n_layers);
|
G = nr_get_G(nfapi_ulsch_pdu_rel15->number_rbs,
|
||||||
|
nfapi_ulsch_pdu_rel15->number_symbols,
|
||||||
|
nfapi_ulsch_pdu_rel15->nb_re_dmrs,
|
||||||
|
nfapi_ulsch_pdu_rel15->length_dmrs,
|
||||||
|
nfapi_ulsch_pdu_rel15->Qm,
|
||||||
|
nfapi_ulsch_pdu_rel15->n_layers);
|
||||||
|
|
||||||
//----------------------------------------------------------
|
//----------------------------------------------------------
|
||||||
//------------------- ULSCH unscrambling -------------------
|
//------------------- ULSCH unscrambling -------------------
|
||||||
//----------------------------------------------------------
|
//----------------------------------------------------------
|
||||||
|
|
||||||
nr_ulsch_unscrambling(gNB->pusch_vars[UE_id]->llr, G, 0, Nid_cell, rel15_ul->rnti);
|
nr_ulsch_unscrambling(gNB->pusch_vars[UE_id]->llr,
|
||||||
|
G,
|
||||||
|
0,
|
||||||
|
Nid_cell,
|
||||||
|
rel15_ul->rnti);
|
||||||
|
|
||||||
//----------------------------------------------------------
|
//----------------------------------------------------------
|
||||||
//--------------------- ULSCH decoding ---------------------
|
//--------------------- ULSCH decoding ---------------------
|
||||||
//----------------------------------------------------------
|
//----------------------------------------------------------
|
||||||
|
|
||||||
ret = nr_ulsch_decoding(gNB, UE_id, gNB->pusch_vars[UE_id]->llr, frame_parms, proc->frame_rx,
|
//ret = nr_ulsch_decoding(gNB,
|
||||||
nfapi_ulsch_pdu_rel15->number_symbols, proc->slot_rx, harq_pid, 0);
|
nr_ulsch_decoding(gNB,
|
||||||
|
UE_id,
|
||||||
|
gNB->pusch_vars[UE_id]->llr,
|
||||||
|
frame_parms,
|
||||||
|
proc->frame_rx,
|
||||||
|
nfapi_ulsch_pdu_rel15->number_symbols,
|
||||||
|
proc->slot_rx,
|
||||||
|
harq_pid,
|
||||||
|
0);
|
||||||
|
|
||||||
// if (ret > ulsch_gNB->max_ldpc_iterations)
|
// if (ret > ulsch_gNB->max_ldpc_iterations)
|
||||||
// n_errors++;
|
// n_errors++;
|
||||||
|
|||||||
@@ -40,9 +40,8 @@
|
|||||||
#include "PHY/impl_defs_nr.h"
|
#include "PHY/impl_defs_nr.h"
|
||||||
extern PHY_VARS_NR_UE ***PHY_vars_UE_g;
|
extern PHY_VARS_NR_UE ***PHY_vars_UE_g;
|
||||||
|
|
||||||
int8_t nr_ue_scheduled_response(nr_scheduled_response_t *scheduled_response){
|
int8_t nr_ue_scheduled_response(nr_scheduled_response_t *scheduled_response)
|
||||||
|
{
|
||||||
|
|
||||||
/// module id
|
/// module id
|
||||||
module_id_t module_id = scheduled_response->module_id;
|
module_id_t module_id = scheduled_response->module_id;
|
||||||
/// component carrier id
|
/// component carrier id
|
||||||
|
|||||||
@@ -2463,10 +2463,11 @@ void ue_pucch_procedures(PHY_VARS_NR_UE *ue,UE_nr_rxtx_proc_t *proc,uint8_t eNB_
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|
||||||
void phy_procedures_nrUE_TX(PHY_VARS_NR_UE *ue,UE_nr_rxtx_proc_t *proc,uint8_t gNB_id, uint8_t thread_id) {
|
void phy_procedures_nrUE_TX(PHY_VARS_NR_UE *ue,
|
||||||
|
UE_nr_rxtx_proc_t *proc,
|
||||||
|
uint8_t gNB_id,
|
||||||
NR_DL_FRAME_PARMS *frame_parms=&ue->frame_parms;
|
uint8_t thread_id)
|
||||||
|
{
|
||||||
fapi_nr_dci_pdu_rel15_t *ul_dci_pdu;
|
fapi_nr_dci_pdu_rel15_t *ul_dci_pdu;
|
||||||
NR_UE_ULSCH_t *ulsch_ue;
|
NR_UE_ULSCH_t *ulsch_ue;
|
||||||
NR_UL_UE_HARQ_t *harq_process_ul_ue;
|
NR_UL_UE_HARQ_t *harq_process_ul_ue;
|
||||||
@@ -2487,7 +2488,6 @@ void phy_procedures_nrUE_TX(PHY_VARS_NR_UE *ue,UE_nr_rxtx_proc_t *proc,uint8_t g
|
|||||||
|
|
||||||
harq_pid = 0; //temporary implementation
|
harq_pid = 0; //temporary implementation
|
||||||
|
|
||||||
|
|
||||||
generate_ue_ulsch_params(ue,
|
generate_ue_ulsch_params(ue,
|
||||||
0,
|
0,
|
||||||
gNB_id,
|
gNB_id,
|
||||||
@@ -2496,7 +2496,6 @@ void phy_procedures_nrUE_TX(PHY_VARS_NR_UE *ue,UE_nr_rxtx_proc_t *proc,uint8_t g
|
|||||||
ulsch_ue = ue->ulsch[thread_id][gNB_id][0]; // cwd_index = 0
|
ulsch_ue = ue->ulsch[thread_id][gNB_id][0]; // cwd_index = 0
|
||||||
harq_process_ul_ue = ulsch_ue->harq_processes[harq_pid];
|
harq_process_ul_ue = ulsch_ue->harq_processes[harq_pid];
|
||||||
|
|
||||||
|
|
||||||
TBS = nr_compute_tbs(ul_dci_pdu->mcs, harq_process_ul_ue->nb_rb, ulsch_ue->Nsymb_pusch, ulsch_ue->nb_re_dmrs, ulsch_ue->length_dmrs, ul_dci_pdu->precod_nbr_layers);
|
TBS = nr_compute_tbs(ul_dci_pdu->mcs, harq_process_ul_ue->nb_rb, ulsch_ue->Nsymb_pusch, ulsch_ue->nb_re_dmrs, ulsch_ue->length_dmrs, ul_dci_pdu->precod_nbr_layers);
|
||||||
|
|
||||||
//-----------------------------------------------------//
|
//-----------------------------------------------------//
|
||||||
@@ -2524,7 +2523,6 @@ void phy_procedures_nrUE_TX(PHY_VARS_NR_UE *ue,UE_nr_rxtx_proc_t *proc,uint8_t g
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
nr_ue_pusch_common_procedures(ue,
|
nr_ue_pusch_common_procedures(ue,
|
||||||
slot_tx,
|
slot_tx,
|
||||||
ul_dci_pdu->precod_nbr_layers,
|
ul_dci_pdu->precod_nbr_layers,
|
||||||
|
|||||||
@@ -67,7 +67,6 @@
|
|||||||
#include "common/config/config_load_configmodule.h"
|
#include "common/config/config_load_configmodule.h"
|
||||||
#include "PHY/INIT/phy_init.h"
|
#include "PHY/INIT/phy_init.h"
|
||||||
#include "nfapi/oai_integration/vendor_ext.h"
|
#include "nfapi/oai_integration/vendor_ext.h"
|
||||||
#include "targets/RT/USER/lte-softmodem.h"
|
|
||||||
|
|
||||||
void feptx_ofdm(RU_t *ru, int frame, int subframe);
|
void feptx_ofdm(RU_t *ru, int frame, int subframe);
|
||||||
void feptx_prec(RU_t *ru, int frame, int subframe);
|
void feptx_prec(RU_t *ru, int frame, int subframe);
|
||||||
@@ -86,7 +85,29 @@ double t_rx_min = 1000000000; /*!< \brief initial min process time for rx */
|
|||||||
int n_tx_dropped = 0; /*!< \brief initial max process time for tx */
|
int n_tx_dropped = 0; /*!< \brief initial max process time for tx */
|
||||||
int n_rx_dropped = 0; /*!< \brief initial max process time for rx */
|
int n_rx_dropped = 0; /*!< \brief initial max process time for rx */
|
||||||
|
|
||||||
THREAD_STRUCT thread_struct;
|
//THREAD_STRUCT thread_struct;
|
||||||
|
static THREAD_STRUCT thread_struct;
|
||||||
|
|
||||||
|
void set_parallel_conf(char *parallel_conf) {
|
||||||
|
if(strcmp(parallel_conf,"PARALLEL_SINGLE_THREAD")==0) thread_struct.parallel_conf = PARALLEL_SINGLE_THREAD;
|
||||||
|
else if(strcmp(parallel_conf,"PARALLEL_RU_L1_SPLIT")==0) thread_struct.parallel_conf = PARALLEL_RU_L1_SPLIT;
|
||||||
|
else if(strcmp(parallel_conf,"PARALLEL_RU_L1_TRX_SPLIT")==0) thread_struct.parallel_conf = PARALLEL_RU_L1_TRX_SPLIT;
|
||||||
|
|
||||||
|
printf("[CONFIG] parallel conf is set to %d\n",thread_struct.parallel_conf);
|
||||||
|
}
|
||||||
|
void set_worker_conf(char *worker_conf) {
|
||||||
|
if(strcmp(worker_conf,"WORKER_DISABLE")==0) thread_struct.worker_conf = WORKER_DISABLE;
|
||||||
|
else if(strcmp(worker_conf,"WORKER_ENABLE")==0) thread_struct.worker_conf = WORKER_ENABLE;
|
||||||
|
|
||||||
|
printf("[CONFIG] worker conf is set to %d\n",thread_struct.worker_conf);
|
||||||
|
}
|
||||||
|
PARALLEL_CONF_t get_thread_parallel_conf(void) {
|
||||||
|
return thread_struct.parallel_conf;
|
||||||
|
}
|
||||||
|
WORKER_CONF_t get_thread_worker_conf(void) {
|
||||||
|
return thread_struct.worker_conf;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
int emulate_rf = 0;
|
int emulate_rf = 0;
|
||||||
|
|
||||||
@@ -629,7 +650,7 @@ int main(int argc, char **argv) {
|
|||||||
snr0 = 0;
|
snr0 = 0;
|
||||||
// num_layers = 1;
|
// num_layers = 1;
|
||||||
perfect_ce = 0;
|
perfect_ce = 0;
|
||||||
/*static paramdef_t options[] = {
|
static paramdef_t options[] = {
|
||||||
{ "awgn", "Use AWGN channel and not multipath", PARAMFLAG_BOOL, strptr:NULL, defintval:0, TYPE_INT, 0, NULL, NULL },
|
{ "awgn", "Use AWGN channel and not multipath", PARAMFLAG_BOOL, strptr:NULL, defintval:0, TYPE_INT, 0, NULL, NULL },
|
||||||
{ "Abstx", "Turns on calibration mode for abstraction.", PARAMFLAG_BOOL, iptr:&abstx, defintval:0, TYPE_INT, 0 },
|
{ "Abstx", "Turns on calibration mode for abstraction.", PARAMFLAG_BOOL, iptr:&abstx, defintval:0, TYPE_INT, 0 },
|
||||||
{ "bTDD", "Set the tdd configuration mode",0, iptr:&tdd_config, defintval:3, TYPE_INT, 0 },
|
{ "bTDD", "Set the tdd configuration mode",0, iptr:&tdd_config, defintval:3, TYPE_INT, 0 },
|
||||||
@@ -892,372 +913,8 @@ int main(int argc, char **argv) {
|
|||||||
exit(0);
|
exit(0);
|
||||||
|
|
||||||
if (thread_struct.parallel_conf != PARALLEL_SINGLE_THREAD)
|
if (thread_struct.parallel_conf != PARALLEL_SINGLE_THREAD)
|
||||||
set_worker_conf("WORKER_ENABLE");*/
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
int c;
|
|
||||||
while ((c = getopt (argc, argv, "ahdpZDe:Em:n:o:s:f:t:c:g:r:F:x:q:y:z:AM:N:I:i:O:R:S:C:T:b:u:v:w:B:Pl:WXYL:")) != -1) {
|
|
||||||
switch (c) {
|
|
||||||
case 'a':
|
|
||||||
awgn_flag = 1;
|
|
||||||
channel_model = AWGN;
|
|
||||||
break;
|
|
||||||
|
|
||||||
case 'A':
|
|
||||||
abstx = 1;
|
|
||||||
break;
|
|
||||||
|
|
||||||
case 'b':
|
|
||||||
tdd_config=atoi(optarg);
|
|
||||||
break;
|
|
||||||
|
|
||||||
case 'B':
|
|
||||||
N_RB_DL=atoi(optarg);
|
|
||||||
break;
|
|
||||||
|
|
||||||
case 'c':
|
|
||||||
num_pdcch_symbols=atoi(optarg);
|
|
||||||
break;
|
|
||||||
|
|
||||||
case 'C':
|
|
||||||
Nid_cell = atoi(optarg);
|
|
||||||
break;
|
|
||||||
|
|
||||||
case 'd':
|
|
||||||
dci_flag = 1;
|
|
||||||
break;
|
|
||||||
|
|
||||||
case 'D':
|
|
||||||
frame_type=TDD;
|
|
||||||
break;
|
|
||||||
|
|
||||||
case 'e':
|
|
||||||
num_rounds=1;
|
|
||||||
common_flag = 1;
|
|
||||||
TPC = atoi(optarg);
|
|
||||||
break;
|
|
||||||
|
|
||||||
case 'E':
|
|
||||||
threequarter_fs=1;
|
|
||||||
break;
|
|
||||||
|
|
||||||
case 'f':
|
|
||||||
input_snr_step= atof(optarg);
|
|
||||||
break;
|
|
||||||
|
|
||||||
case 'F':
|
|
||||||
forgetting_factor = atof(optarg);
|
|
||||||
break;
|
|
||||||
|
|
||||||
case 'i':
|
|
||||||
input_fd = fopen(optarg,"r");
|
|
||||||
input_file=1;
|
|
||||||
dci_flag = 1;
|
|
||||||
break;
|
|
||||||
|
|
||||||
case 'I':
|
|
||||||
input_trch_fd = fopen(optarg,"r");
|
|
||||||
input_trch_file=1;
|
|
||||||
break;
|
|
||||||
|
|
||||||
case 'W':
|
|
||||||
two_thread_flag = 1;
|
|
||||||
break;
|
|
||||||
case 'l':
|
|
||||||
offset_mumimo_llr_drange_fix=atoi(optarg);
|
|
||||||
break;
|
|
||||||
|
|
||||||
case 'm':
|
|
||||||
mcs1 = atoi(optarg);
|
|
||||||
break;
|
|
||||||
|
|
||||||
case 'M':
|
|
||||||
mcs2 = atoi(optarg);
|
|
||||||
break;
|
|
||||||
|
|
||||||
case 'O':
|
|
||||||
test_perf=atoi(optarg);
|
|
||||||
//print_perf =1;
|
|
||||||
break;
|
|
||||||
|
|
||||||
case 't':
|
|
||||||
mcs_i = atoi(optarg);
|
|
||||||
i_mod = get_Qm(mcs_i);
|
|
||||||
break;
|
|
||||||
|
|
||||||
case 'n':
|
|
||||||
n_frames = atoi(optarg);
|
|
||||||
break;
|
|
||||||
|
|
||||||
|
|
||||||
case 'o':
|
|
||||||
rx_sample_offset = atoi(optarg);
|
|
||||||
break;
|
|
||||||
|
|
||||||
case 'r':
|
|
||||||
DLSCH_RB_ALLOC = atoi(optarg);
|
|
||||||
rballocset = 1;
|
|
||||||
break;
|
|
||||||
|
|
||||||
case 's':
|
|
||||||
snr0 = atof(optarg);
|
|
||||||
break;
|
|
||||||
|
|
||||||
case 'w':
|
|
||||||
snr_int = atof(optarg);
|
|
||||||
break;
|
|
||||||
|
|
||||||
|
|
||||||
case 'N':
|
|
||||||
n_ch_rlz= atof(optarg);
|
|
||||||
break;
|
|
||||||
|
|
||||||
case 'p':
|
|
||||||
extended_prefix_flag=1;
|
|
||||||
break;
|
|
||||||
|
|
||||||
case 'g':
|
|
||||||
memcpy(channel_model_input,optarg,10);
|
|
||||||
|
|
||||||
switch((char)*optarg) {
|
|
||||||
case 'A':
|
|
||||||
channel_model=SCM_A;
|
|
||||||
break;
|
|
||||||
|
|
||||||
case 'B':
|
|
||||||
channel_model=SCM_B;
|
|
||||||
break;
|
|
||||||
|
|
||||||
case 'C':
|
|
||||||
channel_model=SCM_C;
|
|
||||||
break;
|
|
||||||
|
|
||||||
case 'D':
|
|
||||||
channel_model=SCM_D;
|
|
||||||
break;
|
|
||||||
|
|
||||||
case 'E':
|
|
||||||
channel_model=EPA;
|
|
||||||
break;
|
|
||||||
|
|
||||||
case 'F':
|
|
||||||
channel_model=EVA;
|
|
||||||
break;
|
|
||||||
|
|
||||||
case 'G':
|
|
||||||
channel_model=ETU;
|
|
||||||
break;
|
|
||||||
|
|
||||||
case 'H':
|
|
||||||
channel_model=Rayleigh8;
|
|
||||||
break;
|
|
||||||
|
|
||||||
case 'I':
|
|
||||||
channel_model=Rayleigh1;
|
|
||||||
break;
|
|
||||||
|
|
||||||
case 'J':
|
|
||||||
channel_model=Rayleigh1_corr;
|
|
||||||
break;
|
|
||||||
|
|
||||||
case 'K':
|
|
||||||
channel_model=Rayleigh1_anticorr;
|
|
||||||
break;
|
|
||||||
|
|
||||||
case 'L':
|
|
||||||
channel_model=Rice8;
|
|
||||||
break;
|
|
||||||
|
|
||||||
case 'M':
|
|
||||||
channel_model=Rice1;
|
|
||||||
break;
|
|
||||||
|
|
||||||
case 'N':
|
|
||||||
channel_model=AWGN;
|
|
||||||
break;
|
|
||||||
default:
|
|
||||||
printf("Unsupported channel model!\n");
|
|
||||||
exit(-1);
|
|
||||||
}
|
|
||||||
|
|
||||||
break;
|
|
||||||
case 'R':
|
|
||||||
num_rounds=atoi(optarg);
|
|
||||||
break;
|
|
||||||
|
|
||||||
case 'S':
|
|
||||||
subframe=atoi(optarg);
|
|
||||||
break;
|
|
||||||
|
|
||||||
case 'T':
|
|
||||||
n_rnti=atoi(optarg);
|
|
||||||
break;
|
|
||||||
|
|
||||||
case 'u':
|
|
||||||
dual_stream_UE=1;
|
|
||||||
UE->use_ia_receiver = 1;
|
|
||||||
|
|
||||||
if ((n_tx_port!=2) || (transmission_mode!=5)) {
|
|
||||||
printf("IA receiver only supported for TM5!");
|
|
||||||
exit(-1);
|
|
||||||
}
|
|
||||||
|
|
||||||
break;
|
|
||||||
|
|
||||||
case 'v':
|
|
||||||
i_mod = atoi(optarg);
|
|
||||||
|
|
||||||
if (i_mod!=2 && i_mod!=4 && i_mod!=6) {
|
|
||||||
printf("Wrong i_mod %d, should be 2,4 or 6\n",i_mod);
|
|
||||||
exit(-1);
|
|
||||||
}
|
|
||||||
|
|
||||||
break;
|
|
||||||
|
|
||||||
case 'P':
|
|
||||||
print_perf=1;
|
|
||||||
break;
|
|
||||||
|
|
||||||
case 'q':
|
|
||||||
n_tx_port=atoi(optarg);
|
|
||||||
|
|
||||||
if ((n_tx_port==0) || ((n_tx_port>2))) {
|
|
||||||
printf("Unsupported number of cell specific antennas ports %d\n",n_tx_port);
|
|
||||||
exit(-1);
|
|
||||||
}
|
|
||||||
|
|
||||||
break;
|
|
||||||
|
|
||||||
|
|
||||||
case 'x':
|
|
||||||
transmission_mode=atoi(optarg);
|
|
||||||
|
|
||||||
if ((transmission_mode!=1) &&
|
|
||||||
(transmission_mode!=2) &&
|
|
||||||
(transmission_mode!=3) &&
|
|
||||||
(transmission_mode!=4) &&
|
|
||||||
(transmission_mode!=5) &&
|
|
||||||
(transmission_mode!=6) &&
|
|
||||||
(transmission_mode!=7)) {
|
|
||||||
printf("Unsupported transmission mode %d\n",transmission_mode);
|
|
||||||
exit(-1);
|
|
||||||
}
|
|
||||||
|
|
||||||
if (transmission_mode>1 && transmission_mode<7) {
|
|
||||||
n_tx_port = 2;
|
|
||||||
}
|
|
||||||
|
|
||||||
break;
|
|
||||||
|
|
||||||
case 'y':
|
|
||||||
n_tx_phy=atoi(optarg);
|
|
||||||
|
|
||||||
if (n_tx_phy < n_tx_port) {
|
|
||||||
printf("n_tx_phy mush not be smaller than n_tx_port");
|
|
||||||
exit(-1);
|
|
||||||
}
|
|
||||||
|
|
||||||
if ((transmission_mode>1 && transmission_mode<7) && n_tx_port<2) {
|
|
||||||
printf("n_tx_port must be >1 for transmission_mode %d\n",transmission_mode);
|
|
||||||
exit(-1);
|
|
||||||
}
|
|
||||||
|
|
||||||
if (transmission_mode==7 && (n_tx_phy!=1 && n_tx_phy!=2 && n_tx_phy!=4 && n_tx_phy!=8 && n_tx_phy!=16 && n_tx_phy!=64 && n_tx_phy!=128)) {
|
|
||||||
printf("Physical number of antennas not supported for TM7.\n");
|
|
||||||
exit(-1);
|
|
||||||
}
|
|
||||||
|
|
||||||
break;
|
|
||||||
break;
|
|
||||||
|
|
||||||
case 'X':
|
|
||||||
xforms=1;
|
|
||||||
break;
|
|
||||||
|
|
||||||
case 'Y':
|
|
||||||
perfect_ce=1;
|
|
||||||
break;
|
|
||||||
|
|
||||||
case 'z':
|
|
||||||
n_rx=atoi(optarg);
|
|
||||||
|
|
||||||
if ((n_rx==0) || (n_rx>2)) {
|
|
||||||
printf("Unsupported number of rx antennas %d\n",n_rx);
|
|
||||||
exit(-1);
|
|
||||||
}
|
|
||||||
|
|
||||||
break;
|
|
||||||
|
|
||||||
case 'Z':
|
|
||||||
dump_table=1;
|
|
||||||
break;
|
|
||||||
|
|
||||||
case 'L':
|
|
||||||
loglvl = atoi(optarg);
|
|
||||||
break;
|
|
||||||
|
|
||||||
case 'h':
|
|
||||||
default:
|
|
||||||
printf("%s -h(elp) -a(wgn on) -d(ci decoding on) -p(extended prefix on) -m mcs1 -M mcs2 -n n_frames -s snr0 -x transmission mode (1,2,5,6,7) -y TXant -z RXant -I trch_file\n",argv[0]);
|
|
||||||
printf("-h This message\n");
|
|
||||||
printf("-a Use AWGN channel and not multipath\n");
|
|
||||||
printf("-c Number of PDCCH symbols\n");
|
|
||||||
printf("-m MCS1 for TB 1\n");
|
|
||||||
printf("-M MCS2 for TB 2\n");
|
|
||||||
printf("-d Transmit the DCI and compute its error statistics\n");
|
|
||||||
printf("-p Use extended prefix mode\n");
|
|
||||||
printf("-n Number of frames to simulate\n");
|
|
||||||
printf("-o Sample offset for receiver\n");
|
|
||||||
printf("-s Starting SNR, runs from SNR to SNR+%.1fdB in steps of %.1fdB. If n_frames is 1 then just SNR is simulated and MATLAB/OCTAVE output is generated\n", snr_int, snr_step);
|
|
||||||
printf("-f step size of SNR, default value is 1.\n");
|
|
||||||
printf("-C cell id\n");
|
|
||||||
printf("-S subframe\n");
|
|
||||||
printf("-D use TDD mode\n");
|
|
||||||
printf("-b TDD config\n");
|
|
||||||
printf("-B bandwidth configuration (in number of ressource blocks): 6, 25, 50, 100\n");
|
|
||||||
printf("-r ressource block allocation (see section 7.1.6.3 in 36.213\n");
|
|
||||||
printf("-g [A:M] Use 3GPP 25.814 SCM-A/B/C/D('A','B','C','D') or 36-101 EPA('E'), EVA ('F'),ETU('G') models (ignores delay spread and Ricean factor), Rayghleigh8 ('H'), Rayleigh1('I'), Rayleigh1_corr('J'), Rayleigh1_anticorr ('K'), Rice8('L'), Rice1('M')\n");
|
|
||||||
printf("-F forgetting factor (0 new channel every trial, 1 channel constant\n");
|
|
||||||
printf("-x Transmission mode (1,2,6,7 for the moment)\n");
|
|
||||||
printf("-q Number of TX antennas ports used in eNB\n");
|
|
||||||
printf("-y Number of TX antennas used in eNB\n");
|
|
||||||
printf("-z Number of RX antennas used in UE\n");
|
|
||||||
printf("-t MCS of interfering UE\n");
|
|
||||||
printf("-R Number of HARQ rounds (fixed)\n");
|
|
||||||
printf("-A Turns on calibration mode for abstraction.\n");
|
|
||||||
printf("-N Determines the number of Channel Realizations in Abstraction mode. Default value is 1. \n");
|
|
||||||
printf("-O Set the percenatge of effective rate to testbench the modem performance (typically 30 and 70, range 1-100) \n");
|
|
||||||
printf("-I Input filename for TrCH data (binary)\n");
|
|
||||||
printf("-u Enables the Interference Aware Receiver for TM5 (default is normal receiver)\n");
|
|
||||||
exit(1);
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
set_parallel_conf("PARALLEL_RU_L1_TRX_SPLIT");
|
|
||||||
set_worker_conf("WORKER_ENABLE");
|
set_worker_conf("WORKER_ENABLE");
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
if (transmission_mode>1) pa=dBm3;
|
if (transmission_mode>1) pa=dBm3;
|
||||||
|
|
||||||
printf("dlsim: tmode %d, pa %d\n",transmission_mode,pa);
|
printf("dlsim: tmode %d, pa %d\n",transmission_mode,pa);
|
||||||
@@ -1272,6 +929,7 @@ int main(int argc, char **argv) {
|
|||||||
// however itti will catch all signals, so ctrl-c won't work anymore
|
// however itti will catch all signals, so ctrl-c won't work anymore
|
||||||
// alternatively you can disable ITTI completely in CMakeLists.txt
|
// alternatively you can disable ITTI completely in CMakeLists.txt
|
||||||
//itti_init(TASK_MAX, THREAD_MAX, MESSAGES_ID_MAX, tasks_info, messages_info, messages_definition_xml, NULL);
|
//itti_init(TASK_MAX, THREAD_MAX, MESSAGES_ID_MAX, tasks_info, messages_info, messages_definition_xml, NULL);
|
||||||
|
T_stdout = 1;
|
||||||
|
|
||||||
if (common_flag == 0) {
|
if (common_flag == 0) {
|
||||||
switch (N_RB_DL) {
|
switch (N_RB_DL) {
|
||||||
@@ -1634,14 +1292,16 @@ int main(int argc, char **argv) {
|
|||||||
if (DLSCH_alloc_pdu2_1E[0].tpmi == 5) {
|
if (DLSCH_alloc_pdu2_1E[0].tpmi == 5) {
|
||||||
eNB->UE_stats[0].DL_pmi_single = (unsigned short)(taus()&0xffff);
|
eNB->UE_stats[0].DL_pmi_single = (unsigned short)(taus()&0xffff);
|
||||||
|
|
||||||
if (n_users>1) eNB->UE_stats[1].DL_pmi_single = (eNB->UE_stats[0].DL_pmi_single ^ 0x1555); //opposite PMI
|
if (n_users>1)
|
||||||
|
eNB->UE_stats[1].DL_pmi_single = (eNB->UE_stats[0].DL_pmi_single ^ 0x1555); //opposite PMI
|
||||||
} else {
|
} else {
|
||||||
eNB->UE_stats[0].DL_pmi_single = 0;
|
eNB->UE_stats[0].DL_pmi_single = 0;
|
||||||
|
|
||||||
if (n_users>1) eNB->UE_stats[1].DL_pmi_single = 0;
|
if (n_users>1)
|
||||||
|
eNB->UE_stats[1].DL_pmi_single = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
L1_rxtx_proc_t *proc_eNB = &eNB->proc.L1_proc; //&eNB->proc.proc_rxtx[0]; //UE->current_thread_id[subframe]];
|
L1_rxtx_proc_t *proc_eNB = &eNB->proc.L1_proc;
|
||||||
proc_eNB->frame_tx=0;
|
proc_eNB->frame_tx=0;
|
||||||
|
|
||||||
if (input_fd==NULL) {
|
if (input_fd==NULL) {
|
||||||
@@ -1846,7 +1506,7 @@ int main(int argc, char **argv) {
|
|||||||
|
|
||||||
start_meas(&eNB->ofdm_mod_stats);
|
start_meas(&eNB->ofdm_mod_stats);
|
||||||
ru->proc.tti_tx=subframe;
|
ru->proc.tti_tx=subframe;
|
||||||
memcpy((void *)&ru->frame_parms,(void *)&eNB->frame_parms,sizeof(LTE_DL_FRAME_PARMS));
|
memcpy((void *)ru->frame_parms,(void *)&eNB->frame_parms,sizeof(LTE_DL_FRAME_PARMS));
|
||||||
feptx_prec(ru,proc_eNB->frame_tx,subframe);
|
feptx_prec(ru,proc_eNB->frame_tx,subframe);
|
||||||
feptx_ofdm(ru,proc_eNB->frame_tx,subframe);
|
feptx_ofdm(ru,proc_eNB->frame_tx,subframe);
|
||||||
stop_meas(&eNB->ofdm_mod_stats);
|
stop_meas(&eNB->ofdm_mod_stats);
|
||||||
|
|||||||
@@ -94,7 +94,7 @@ int main(int argc, char **argv)
|
|||||||
// int sync_pos, sync_pos_slot;
|
// int sync_pos, sync_pos_slot;
|
||||||
// FILE *rx_frame_file;
|
// FILE *rx_frame_file;
|
||||||
FILE *output_fd = NULL;
|
FILE *output_fd = NULL;
|
||||||
uint8_t write_output_file=0;
|
//uint8_t write_output_file=0;
|
||||||
//int result;
|
//int result;
|
||||||
//int freq_offset;
|
//int freq_offset;
|
||||||
//int subframe_offset;
|
//int subframe_offset;
|
||||||
@@ -144,7 +144,7 @@ int main(int argc, char **argv)
|
|||||||
while ((c = getopt (argc, argv, "f:hA:f:g:n:o:s:S:t:x:y:z:N:F:GR:P:IL:")) != -1) {
|
while ((c = getopt (argc, argv, "f:hA:f:g:n:o:s:S:t:x:y:z:N:F:GR:P:IL:")) != -1) {
|
||||||
switch (c) {
|
switch (c) {
|
||||||
case 'f':
|
case 'f':
|
||||||
write_output_file=1;
|
//write_output_file=1;
|
||||||
output_fd = fopen(optarg,"w");
|
output_fd = fopen(optarg,"w");
|
||||||
|
|
||||||
if (output_fd==NULL) {
|
if (output_fd==NULL) {
|
||||||
|
|||||||
@@ -104,7 +104,7 @@ int main(int argc, char **argv) {
|
|||||||
|
|
||||||
char c;
|
char c;
|
||||||
int i,sf;
|
int i,sf;
|
||||||
double SNR, SNR_lin, snr0 = -2.0, snr1 = 2.0;
|
double SNR, snr0 = -2.0, snr1 = 2.0; //, SNR_lin;
|
||||||
double snr_step = 0.1;
|
double snr_step = 0.1;
|
||||||
uint8_t snr1set = 0;
|
uint8_t snr1set = 0;
|
||||||
FILE *output_fd = NULL;
|
FILE *output_fd = NULL;
|
||||||
@@ -123,7 +123,7 @@ int main(int argc, char **argv) {
|
|||||||
//unsigned char pbch_phase = 0;
|
//unsigned char pbch_phase = 0;
|
||||||
int frame = 0, subframe = 0;
|
int frame = 0, subframe = 0;
|
||||||
NR_DL_FRAME_PARMS *frame_parms;
|
NR_DL_FRAME_PARMS *frame_parms;
|
||||||
double sigma;
|
//double sigma;
|
||||||
unsigned char qbits = 8;
|
unsigned char qbits = 8;
|
||||||
int ret;
|
int ret;
|
||||||
int loglvl = OAILOG_WARNING;
|
int loglvl = OAILOG_WARNING;
|
||||||
@@ -531,15 +531,10 @@ int main(int argc, char **argv) {
|
|||||||
|
|
||||||
//if (i<16) printf("modulated_input[%d] = %d\n",i,modulated_input[i]);
|
//if (i<16) printf("modulated_input[%d] = %d\n",i,modulated_input[i]);
|
||||||
|
|
||||||
SNR_lin = pow(10, SNR / 10.0);
|
//SNR_lin = pow(10, SNR / 10.0);
|
||||||
sigma = 1.0 / sqrt(2 * SNR_lin);
|
//sigma = 1.0 / sqrt(2 * SNR_lin);
|
||||||
#if 0
|
|
||||||
channel_output_fixed[i] = (short) quantize(sigma / 4.0 / 4.0,
|
|
||||||
modulated_input[i] + sigma * gaussdouble(0.0, 1.0),
|
|
||||||
qbits);
|
|
||||||
#else
|
|
||||||
channel_output_fixed[i] = (short) quantize(0.01, modulated_input[i], qbits);
|
channel_output_fixed[i] = (short) quantize(0.01, modulated_input[i], qbits);
|
||||||
#endif
|
//channel_output_fixed[i] = (short) quantize(sigma / 4.0 / 4.0, modulated_input[i] + sigma * gaussdouble(0.0, 1.0), qbits);
|
||||||
//channel_output_fixed[i] = (char)quantize8bit(sigma/4.0,(2.0*modulated_input[i]) - 1.0 + sigma*gaussdouble(0.0,1.0));
|
//channel_output_fixed[i] = (char)quantize8bit(sigma/4.0,(2.0*modulated_input[i]) - 1.0 + sigma*gaussdouble(0.0,1.0));
|
||||||
//printf("channel_output_fixed[%d]: %d\n",i,channel_output_fixed[i]);
|
//printf("channel_output_fixed[%d]: %d\n",i,channel_output_fixed[i]);
|
||||||
|
|
||||||
|
|||||||
@@ -400,7 +400,7 @@ void nr_configure_dci_from_pdcch_config(nfapi_nr_dl_config_pdcch_parameters_rel1
|
|||||||
// first symbol
|
// first symbol
|
||||||
//AssertFatal(pdcch_scs==kHz15, "PDCCH SCS above 15kHz not allowed if a symbol above 2 is monitored");
|
//AssertFatal(pdcch_scs==kHz15, "PDCCH SCS above 15kHz not allowed if a symbol above 2 is monitored");
|
||||||
for (int i=0; i<get_symbolsperslot(&cfg); i++)
|
for (int i=0; i<get_symbolsperslot(&cfg); i++)
|
||||||
if ((search_space->monitoring_symbols_in_slot>>(15-i))&1) {
|
if ((search_space->monitoring_symbols_in_slot>>(31-i))&1) {
|
||||||
pdcch_params->first_symbol=i;
|
pdcch_params->first_symbol=i;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -57,8 +57,8 @@ void nr_init_coreset(nfapi_nr_coreset_t *coreset) {
|
|||||||
coreset->dmrs_scrambling_id = 0;
|
coreset->dmrs_scrambling_id = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
void nr_init_search_space(nfapi_nr_search_space_t *search_space) {
|
void nr_init_search_space(nfapi_nr_search_space_t *search_space)
|
||||||
|
{
|
||||||
search_space->search_space_id = 1;
|
search_space->search_space_id = 1;
|
||||||
search_space->coreset_id = 1;
|
search_space->coreset_id = 1;
|
||||||
search_space->search_space_type = NFAPI_NR_SEARCH_SPACE_TYPE_UE_SPECIFIC;
|
search_space->search_space_type = NFAPI_NR_SEARCH_SPACE_TYPE_UE_SPECIFIC;
|
||||||
|
|||||||
@@ -64,7 +64,9 @@
|
|||||||
#include "rrc_nas_primitives.h"
|
#include "rrc_nas_primitives.h"
|
||||||
#include "COMMON/platform_types.h"
|
#include "COMMON/platform_types.h"
|
||||||
|
|
||||||
|
#ifndef MAKE_VERSION
|
||||||
#define MAKE_VERSION(a,b,c) ((a)*256+(b)*16+(c))
|
#define MAKE_VERSION(a,b,c) ((a)*256+(b)*16+(c))
|
||||||
|
#endif
|
||||||
|
|
||||||
struct rb_entity {
|
struct rb_entity {
|
||||||
nasRadioBearerId_t rab_id;
|
nasRadioBearerId_t rab_id;
|
||||||
|
|||||||
@@ -68,10 +68,10 @@ typedef guint8 gboolean;
|
|||||||
#define CONFIG_HLP_TYPEMON "Type of L2 monitoring messages: none,pcap,wireshark \n"
|
#define CONFIG_HLP_TYPEMON "Type of L2 monitoring messages: none,pcap,wireshark \n"
|
||||||
#define CONFIG_HLP_L2MONIP "ip address for wireshark messages \n"
|
#define CONFIG_HLP_L2MONIP "ip address for wireshark messages \n"
|
||||||
#define CONFIG_HLP_L2MONPATH "file path for pcap messages on localhost \n"
|
#define CONFIG_HLP_L2MONPATH "file path for pcap messages on localhost \n"
|
||||||
/*-----------------------------------------------------------------------------------------------------------------------------------------------------------------------*/
|
/*---------------------------------------------------------------------------------------------------------------------------------------------*/
|
||||||
/* command line parameters for LOG utility */
|
/* command line parameters for LOG utility */
|
||||||
/* optname helpstr paramflags XXXptr defXXXval type numelt */
|
/* optname helpstr paramflags XXXptr defXXXval type numelt */
|
||||||
/*-----------------------------------------------------------------------------------------------------------------------------------------------------------------------*/
|
/*---------------------------------------------------------------------------------------------------------------------------------------------*/
|
||||||
#define OPT_PARAMS_DESC { \
|
#define OPT_PARAMS_DESC { \
|
||||||
{"type" , CONFIG_HLP_TYPEMON, 0, strptr:&in_type, defstrval:"none", TYPE_STRING, 0}, \
|
{"type" , CONFIG_HLP_TYPEMON, 0, strptr:&in_type, defstrval:"none", TYPE_STRING, 0}, \
|
||||||
{"ip" , CONFIG_HLP_L2MONIP, 0, strptr:&in_ip, defstrval:"127.0.0.1", TYPE_STRING, 0}, \
|
{"ip" , CONFIG_HLP_L2MONIP, 0, strptr:&in_ip, defstrval:"127.0.0.1", TYPE_STRING, 0}, \
|
||||||
|
|||||||
@@ -99,8 +99,6 @@ int opt_enabled=0;
|
|||||||
//static unsigned char g_PDUBuffer[1600];
|
//static unsigned char g_PDUBuffer[1600];
|
||||||
//static unsigned int g_PDUOffset;
|
//static unsigned int g_PDUOffset;
|
||||||
|
|
||||||
char in_ip[40];
|
|
||||||
char in_path[FILENAME_MAX];
|
|
||||||
FILE *file_fd = NULL;
|
FILE *file_fd = NULL;
|
||||||
pcap_hdr_t file_header = {
|
pcap_hdr_t file_header = {
|
||||||
0xa1b2c3d4, /* magic number */
|
0xa1b2c3d4, /* magic number */
|
||||||
@@ -334,7 +332,9 @@ static void SendFrame(guint8 radioType, guint8 direction, guint8 rntiType,
|
|||||||
|
|
||||||
/* Write an individual PDU (PCAP packet header + mac-context + mac-pdu) */
|
/* Write an individual PDU (PCAP packet header + mac-context + mac-pdu) */
|
||||||
static int MAC_LTE_PCAP_WritePDU(MAC_Context_Info_t *context,
|
static int MAC_LTE_PCAP_WritePDU(MAC_Context_Info_t *context,
|
||||||
const uint8_t *PDU, unsigned int length) {
|
const uint8_t *PDU,
|
||||||
|
unsigned int length)
|
||||||
|
{
|
||||||
pcaprec_hdr_t packet_header;
|
pcaprec_hdr_t packet_header;
|
||||||
uint8_t context_header[256];
|
uint8_t context_header[256];
|
||||||
int offset = 0;
|
int offset = 0;
|
||||||
@@ -379,6 +379,7 @@ static int MAC_LTE_PCAP_WritePDU(MAC_Context_Info_t *context,
|
|||||||
fwrite(PDU, 1, length, file_fd);
|
fwrite(PDU, 1, length, file_fd);
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
#include <common/ran_context.h>
|
#include <common/ran_context.h>
|
||||||
extern RAN_CONTEXT_t RC;
|
extern RAN_CONTEXT_t RC;
|
||||||
#include <openair1/PHY/phy_extern_ue.h>
|
#include <openair1/PHY/phy_extern_ue.h>
|
||||||
@@ -434,8 +435,11 @@ void trace_pdu(int direction, uint8_t *pdu_buffer, unsigned int pdu_buffer_size,
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
/*---------------------------------------------------*/
|
/*---------------------------------------------------*/
|
||||||
int init_opt(void) {
|
int init_opt(void)
|
||||||
|
{
|
||||||
char *in_type=NULL;
|
char *in_type=NULL;
|
||||||
|
char *in_ip=NULL;
|
||||||
|
char *in_path=NULL;
|
||||||
paramdef_t opt_params[] = OPT_PARAMS_DESC ;
|
paramdef_t opt_params[] = OPT_PARAMS_DESC ;
|
||||||
checkedparam_t opt_checkParams[] = OPTPARAMS_CHECK_DESC;
|
checkedparam_t opt_checkParams[] = OPTPARAMS_CHECK_DESC;
|
||||||
uint16_t in_port;
|
uint16_t in_port;
|
||||||
@@ -520,6 +524,7 @@ int init_opt(void) {
|
|||||||
// memset(mac_info, 0, sizeof(mac_lte_info)+pdu_buffer_size + 8);
|
// memset(mac_info, 0, sizeof(mac_lte_info)+pdu_buffer_size + 8);
|
||||||
return (1);
|
return (1);
|
||||||
}
|
}
|
||||||
|
|
||||||
void terminate_opt(void) {
|
void terminate_opt(void) {
|
||||||
/* Close local socket */
|
/* Close local socket */
|
||||||
// free(mac_info);
|
// free(mac_info);
|
||||||
|
|||||||
@@ -153,8 +153,7 @@ void uhd_set_thread_prio(void) {
|
|||||||
} else {
|
} else {
|
||||||
(set_prio_func_t)shlib_fdesc[0].fptr();
|
(set_prio_func_t)shlib_fdesc[0].fptr();
|
||||||
}
|
}
|
||||||
return ret;
|
//return ret;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
int openair0_device_load(openair0_device *device,
|
int openair0_device_load(openair0_device *device,
|
||||||
|
|||||||
@@ -54,6 +54,7 @@ softmodem_params_t *get_softmodem_params(void) {
|
|||||||
void get_common_options(void) {
|
void get_common_options(void) {
|
||||||
uint32_t online_log_messages;
|
uint32_t online_log_messages;
|
||||||
uint32_t glog_level ;
|
uint32_t glog_level ;
|
||||||
|
uint32_t glog_verbosity;
|
||||||
uint32_t start_telnetsrv;
|
uint32_t start_telnetsrv;
|
||||||
uint32_t noS1;
|
uint32_t noS1;
|
||||||
uint32_t nokrnmod;
|
uint32_t nokrnmod;
|
||||||
|
|||||||
@@ -166,7 +166,7 @@
|
|||||||
{"threadSlot1ProcOne", NULL, 0, iptr:&(threads.slot1_proc_one), defintval:1, TYPE_INT, 0}, \
|
{"threadSlot1ProcOne", NULL, 0, iptr:&(threads.slot1_proc_one), defintval:1, TYPE_INT, 0}, \
|
||||||
{"threadSlot1ProcTwo", NULL, 0, iptr:&(threads.slot1_proc_two), defintval:1, TYPE_INT, 0}, \
|
{"threadSlot1ProcTwo", NULL, 0, iptr:&(threads.slot1_proc_two), defintval:1, TYPE_INT, 0}, \
|
||||||
}
|
}
|
||||||
// {"threadIQ", NULL, 0, iptr:&(threads.iq), defintval:1, TYPE_INT, 0}, \
|
// {"threadIQ", NULL, 0, iptr:&(threads.iq), defintval:1, TYPE_INT, 0},
|
||||||
|
|
||||||
#define DEFAULT_DLF 2680000000
|
#define DEFAULT_DLF 2680000000
|
||||||
|
|
||||||
@@ -188,7 +188,6 @@
|
|||||||
{"ulsch-max-errors", CONFIG_HLP_ULMAXE, 0, uptr:&ULSCH_max_consecutive_errors, defuintval:0, TYPE_UINT, 0}, \
|
{"ulsch-max-errors", CONFIG_HLP_ULMAXE, 0, uptr:&ULSCH_max_consecutive_errors, defuintval:0, TYPE_UINT, 0}, \
|
||||||
{"phy-test", CONFIG_HLP_PHYTST, PARAMFLAG_BOOL, iptr:&PHY_TEST, defintval:0, TYPE_INT, 0}, \
|
{"phy-test", CONFIG_HLP_PHYTST, PARAMFLAG_BOOL, iptr:&PHY_TEST, defintval:0, TYPE_INT, 0}, \
|
||||||
{"usim-test", CONFIG_HLP_USIM, PARAMFLAG_BOOL, u8ptr:&USIM_TEST, defintval:0, TYPE_UINT8, 0}, \
|
{"usim-test", CONFIG_HLP_USIM, PARAMFLAG_BOOL, u8ptr:&USIM_TEST, defintval:0, TYPE_UINT8, 0}, \
|
||||||
{"emulate-rf" , CONFIG_HLP_EMULATE_RF, PARAMFLAG_BOOL, iptr:&EMULATE_RF, defintval:0, TYPE_INT, 0}, \
|
|
||||||
{"clock", CONFIG_HLP_CLK, 0, uptr:&CLOCK_SOURCE, defintval:0, TYPE_UINT, 0}, \
|
{"clock", CONFIG_HLP_CLK, 0, uptr:&CLOCK_SOURCE, defintval:0, TYPE_UINT, 0}, \
|
||||||
{"wait-for-sync", NULL, PARAMFLAG_BOOL, iptr:&WAIT_FOR_SYNC, defintval:0, TYPE_INT, 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}, \
|
{"single-thread-enable", CONFIG_HLP_NOSNGLT, PARAMFLAG_BOOL, iptr:&SINGLE_THREAD_FLAG, defintval:0, TYPE_INT, 0}, \
|
||||||
@@ -198,6 +197,7 @@
|
|||||||
{"q" , CONFIG_HLP_STMON, PARAMFLAG_BOOL, iptr:&opp_enabled, defintval:0, TYPE_INT, 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}, \
|
{"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}, \
|
{"numerology" , CONFIG_HLP_NUMEROLOGY, PARAMFLAG_BOOL, iptr:&NUMEROLOGY, defintval:0, 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:(char **)¶llel_config, defstrval:NULL, TYPE_STRING, 0}, \
|
{"parallel-config", CONFIG_HLP_PARALLEL_CMD,0, strptr:(char **)¶llel_config, defstrval:NULL, TYPE_STRING, 0}, \
|
||||||
{"worker-config", CONFIG_HLP_WORKER_CMD, 0, strptr:(char **)&worker_config, defstrval:NULL, TYPE_STRING, 0}, \
|
{"worker-config", CONFIG_HLP_WORKER_CMD, 0, strptr:(char **)&worker_config, defstrval:NULL, TYPE_STRING, 0}, \
|
||||||
{"noS1", CONFIG_HLP_NOS1, PARAMFLAG_BOOL, uptr:&noS1, defintval:0, TYPE_INT, 0}, \
|
{"noS1", CONFIG_HLP_NOS1, PARAMFLAG_BOOL, uptr:&noS1, defintval:0, TYPE_INT, 0}, \
|
||||||
@@ -209,6 +209,7 @@
|
|||||||
|
|
||||||
#define CONFIG_HLP_FLOG "Enable online log \n"
|
#define CONFIG_HLP_FLOG "Enable online log \n"
|
||||||
#define CONFIG_HLP_LOGL "Set the global log level, valid options: (4:trace, 3:debug, 2:info, 1:warn, (0:error))\n"
|
#define CONFIG_HLP_LOGL "Set the global log level, valid options: (4:trace, 3:debug, 2:info, 1:warn, (0:error))\n"
|
||||||
|
#define CONFIG_HLP_LOGV "Set the global log verbosity \n"
|
||||||
#define CONFIG_HLP_TELN "Start embedded telnet server \n"
|
#define CONFIG_HLP_TELN "Start embedded telnet server \n"
|
||||||
#define CONFIG_HLP_MSC "Enable the MSC tracing utility \n"
|
#define CONFIG_HLP_MSC "Enable the MSC tracing utility \n"
|
||||||
/*---------------------------------------------------------------------------------------------------------------------------------------------------------------------------*/
|
/*---------------------------------------------------------------------------------------------------------------------------------------------------------------------------*/
|
||||||
@@ -219,9 +220,11 @@
|
|||||||
#define CMDLINE_LOGPARAMS_DESC { \
|
#define CMDLINE_LOGPARAMS_DESC { \
|
||||||
{"R" , CONFIG_HLP_FLOG, 0, uptr:&online_log_messages, defintval:1, TYPE_INT, 0}, \
|
{"R" , CONFIG_HLP_FLOG, 0, uptr:&online_log_messages, defintval:1, TYPE_INT, 0}, \
|
||||||
{"g" , CONFIG_HLP_LOGL, 0, uptr:&glog_level, defintval:0, TYPE_UINT, 0}, \
|
{"g" , CONFIG_HLP_LOGL, 0, uptr:&glog_level, defintval:0, TYPE_UINT, 0}, \
|
||||||
|
{"G" , CONFIG_HLP_LOGV, 0, uptr:&glog_verbosity, defintval:0, TYPE_UINT16, 0}, \
|
||||||
{"telnetsrv", CONFIG_HLP_TELN, PARAMFLAG_BOOL, uptr:&start_telnetsrv, defintval:0, TYPE_UINT, 0}, \
|
{"telnetsrv", CONFIG_HLP_TELN, PARAMFLAG_BOOL, uptr:&start_telnetsrv, defintval:0, TYPE_UINT, 0}, \
|
||||||
{"msc", CONFIG_HLP_MSC, PARAMFLAG_BOOL, uptr:&START_MSC, defintval:0, TYPE_UINT, 0}, \
|
{"msc", CONFIG_HLP_MSC, PARAMFLAG_BOOL, uptr:&START_MSC, defintval:0, TYPE_UINT, 0}, \
|
||||||
}
|
}
|
||||||
|
|
||||||
#define CMDLINE_ONLINELOG_IDX 0
|
#define CMDLINE_ONLINELOG_IDX 0
|
||||||
#define CMDLINE_GLOGLEVEL_IDX 1
|
#define CMDLINE_GLOGLEVEL_IDX 1
|
||||||
#define CMDLINE_GLOGVERBO_IDX 2
|
#define CMDLINE_GLOGVERBO_IDX 2
|
||||||
@@ -282,8 +285,6 @@ void set_worker_conf(char *worker_conf);
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
#define SOFTMODEM_NOS1_BIT (1<<0)
|
#define SOFTMODEM_NOS1_BIT (1<<0)
|
||||||
#define SOFTMODEM_NOKRNMOD_BIT (1<<1)
|
#define SOFTMODEM_NOKRNMOD_BIT (1<<1)
|
||||||
#define SOFTMODEM_NONBIOT_BIT (1<<2)
|
#define SOFTMODEM_NONBIOT_BIT (1<<2)
|
||||||
@@ -324,7 +325,6 @@ extern pthread_cond_t sync_cond;
|
|||||||
extern pthread_mutex_t sync_mutex;
|
extern pthread_mutex_t sync_mutex;
|
||||||
extern int sync_var;
|
extern int sync_var;
|
||||||
|
|
||||||
|
|
||||||
extern uint32_t downlink_frequency[MAX_NUM_CCs][4];
|
extern uint32_t downlink_frequency[MAX_NUM_CCs][4];
|
||||||
extern int32_t uplink_frequency_offset[MAX_NUM_CCs][4];
|
extern int32_t uplink_frequency_offset[MAX_NUM_CCs][4];
|
||||||
|
|
||||||
@@ -343,7 +343,8 @@ extern int transmission_mode;
|
|||||||
extern double cpuf;
|
extern double cpuf;
|
||||||
|
|
||||||
// In lte-enb.c
|
// In lte-enb.c
|
||||||
extern void init_eNB(int single_thread_flag,int wait_for_sync);
|
extern void init_eNB(int single_thread_flag,
|
||||||
|
int wait_for_sync);
|
||||||
extern void stop_eNB(int);
|
extern void stop_eNB(int);
|
||||||
extern void kill_eNB_proc(int inst);
|
extern void kill_eNB_proc(int inst);
|
||||||
|
|
||||||
@@ -357,7 +358,8 @@ extern void kill_RU_proc(RU_t *ru);
|
|||||||
extern void set_function_spec_param(RU_t *ru);
|
extern void set_function_spec_param(RU_t *ru);
|
||||||
|
|
||||||
// In lte-ue.c
|
// In lte-ue.c
|
||||||
extern int setup_ue_buffers(PHY_VARS_UE **phy_vars_ue, openair0_config_t *openair0_cfg);
|
extern int setup_ue_buffers(PHY_VARS_UE **phy_vars_ue,
|
||||||
|
openair0_config_t *openair0_cfg);
|
||||||
extern void fill_ue_band_info(void);
|
extern void fill_ue_band_info(void);
|
||||||
|
|
||||||
extern void init_UE(int nb_inst,
|
extern void init_UE(int nb_inst,
|
||||||
@@ -371,7 +373,11 @@ extern void init_UE(int nb_inst,
|
|||||||
int rxgain,
|
int rxgain,
|
||||||
int txpowermax,
|
int txpowermax,
|
||||||
LTE_DL_FRAME_PARMS *fp);
|
LTE_DL_FRAME_PARMS *fp);
|
||||||
extern void init_thread(int sched_runtime, int sched_deadline, int sched_fifo, cpu_set_t *cpuset, char *name);
|
extern void init_thread(int sched_runtime,
|
||||||
|
int sched_deadline,
|
||||||
|
int sched_fifo,
|
||||||
|
cpu_set_t *cpuset,
|
||||||
|
char *name);
|
||||||
|
|
||||||
extern void reset_opp_meas(void);
|
extern void reset_opp_meas(void);
|
||||||
extern void print_opp_meas(void);
|
extern void print_opp_meas(void);
|
||||||
@@ -394,7 +400,10 @@ extern int stop_L1L2(module_id_t enb_id);
|
|||||||
extern int restart_L1L2(module_id_t enb_id);
|
extern int restart_L1L2(module_id_t enb_id);
|
||||||
|
|
||||||
|
|
||||||
extern void init_UE_stub_single_thread(int nb_inst,int eMBMS_active, int uecap_xer_in, char *emul_iface);
|
extern void init_UE_stub_single_thread(int nb_inst,
|
||||||
|
int eMBMS_active,
|
||||||
|
int uecap_xer_in,
|
||||||
|
char *emul_iface);
|
||||||
|
|
||||||
extern PHY_VARS_UE *init_ue_vars(LTE_DL_FRAME_PARMS *frame_parms,
|
extern PHY_VARS_UE *init_ue_vars(LTE_DL_FRAME_PARMS *frame_parms,
|
||||||
uint8_t UE_id,
|
uint8_t UE_id,
|
||||||
|
|||||||
Reference in New Issue
Block a user