Merge branch 'tdd25period_for_MR' into tdd2_5period_withRLCupdate

Conflicts:
	openair2/LAYER2/NR_MAC_gNB/config.c
	openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_RA.c
	targets/ARCH/AW2SORI/oaiori.c
This commit is contained in:
Raymond Knopp
2022-03-13 07:30:44 +01:00
589 changed files with 5816 additions and 42027 deletions
+9
View File
@@ -414,6 +414,7 @@ int aw2s_startstreaming(openair0_device *device) {
/*
while (rx0->fst != ORI_FST_Operational ||
(openair0_cfg->rx_num_channels > 1 && rx1->fst != ORI_FST_Operational) ||
<<<<<<< HEAD
(openair0_cfg->rx_num_channels > 2 && rx2->fst != ORI_FST_Operational) ||
(openair0_cfg->rx_num_channels > 3 && rx3->fst != ORI_FST_Operational))
{}
@@ -421,6 +422,14 @@ int aw2s_startstreaming(openair0_device *device) {
// test RX interface
uint64_t TS;
int64_t deltaTS,olddeltaTS=-1;
=======
tx0->fst != ORI_FST_Operational ||
(openair0_cfg->tx_num_channels > 1 && tx1->fst != ORI_FST_Operational))
{}*/
// test RX interface
uint64_t TS;
char temp_rx[2048] __attribute__((aligned(32)));
>>>>>>> tdd25period_for_MR
int aid,r0=0,r1=(openair0_cfg->rx_num_channels > 1) ? 0 : 1;
int r2=(openair0_cfg->rx_num_channels > 2) ? 0 : 1;
int r3=(openair0_cfg->rx_num_channels > 3) ? 0 : 1;
+3 -4
View File
@@ -58,10 +58,9 @@ int read_recplayconfig(recplay_conf_t **recplay_conf, recplay_state_t **recplay_
// Use mmap for IQ files for systems with less than 6GB total RAM
sysinfo(&systeminfo);
if (systeminfo.totalram < 6144000000) {
(*recplay_state)->use_mmap = 0;
} else {
(*recplay_state)->use_mmap = 1;
if (systeminfo.totalram < 6144000000 && ((*recplay_conf)->use_mmap == 1)) {
LOG_W(HW,"System with %f GB of mem (<6GB), mmap usage disabled\n",systeminfo.totalram/10E9);
(*recplay_conf)->use_mmap = 0;
}
} else { /* record player enabled */
free(*recplay_conf);
+7 -6
View File
@@ -78,7 +78,7 @@ typedef struct {
#define CONFIG_HLP_SF_LOOPS "Number of loops to replay of the entire subframes file"
#define CONFIG_HLP_SF_RDELAY "Delay in microseconds to read a subframe in replay mode"
#define CONFIG_HLP_SF_WDELAY "Delay in microseconds to write a subframe in replay mode"
#define CONFIG_HLP_USE_MMAP "In replay mode, map iq file in memory before replaying"
/* keyword strings for config options, used in CMDLINE_XXX_DESC macros and printed when -h option is used */
#define CONFIG_OPT_SF_FILE "subframes-file"
#define CONFIG_OPT_SF_REC "subframes-record"
@@ -87,7 +87,7 @@ typedef struct {
#define CONFIG_OPT_SF_LOOPS "subframes-loops"
#define CONFIG_OPT_SF_RDELAY "subframes-read-delay"
#define CONFIG_OPT_SF_WDELAY "subframes-write-delay"
#define CONFIG_OPT_USE_MMAP "use-mmap"
#define DEVICE_RECPLAY_SECTION "device.recplay"
/* For information only - the macro is not usable in C++ */
/*---------------------------------------------------------------------------------------------------------------------------------------------------------------------------*/
@@ -95,13 +95,14 @@ typedef struct {
/* optname helpstr paramflags XXXptr defXXXval type numelt */
/*---------------------------------------------------------------------------------------------------------------------------------------------------------------------------*/
#define DEVICE_RECPLAY_PARAMS_DESC { \
{CONFIG_OPT_SF_FILE, CONFIG_HLP_SF_FILE, 0, strptr:(char **)((*recplay_conf)->u_sf_filename), defstrval:DEF_SF_FILE, TYPE_STRING, 1024}, \
{CONFIG_OPT_SF_REC, CONFIG_HLP_SF_REC, PARAMFLAG_BOOL, uptr:&(u_sf_record), defuintval:0, TYPE_UINT, 0}, \
{CONFIG_OPT_SF_REP, CONFIG_HLP_SF_REP, PARAMFLAG_BOOL, uptr:&(u_sf_replay), defuintval:0, TYPE_UINT, 0}, \
{CONFIG_OPT_SF_FILE, CONFIG_HLP_SF_FILE, 0, strptr:(char **)((*recplay_conf)->u_sf_filename), defstrval:DEF_SF_FILE, TYPE_STRING, 1024}, \
{CONFIG_OPT_SF_REC, CONFIG_HLP_SF_REC, PARAMFLAG_BOOL, uptr:&(u_sf_record), defuintval:0, TYPE_UINT, 0}, \
{CONFIG_OPT_SF_REP, CONFIG_HLP_SF_REP, PARAMFLAG_BOOL, uptr:&(u_sf_replay), defuintval:0, TYPE_UINT, 0}, \
{CONFIG_OPT_SF_MAX, CONFIG_HLP_SF_MAX, 0, uptr:&((*recplay_conf)->u_sf_max), defintval:DEF_NB_SF, TYPE_UINT, 0}, \
{CONFIG_OPT_SF_LOOPS, CONFIG_HLP_SF_LOOPS, 0, uptr:&((*recplay_conf)->u_sf_loops), defintval:DEF_SF_NB_LOOP, TYPE_UINT, 0}, \
{CONFIG_OPT_SF_RDELAY, CONFIG_HLP_SF_RDELAY, 0, uptr:&((*recplay_conf)->u_sf_read_delay), defintval:DEF_SF_DELAY_READ, TYPE_UINT, 0}, \
{CONFIG_OPT_SF_WDELAY, CONFIG_HLP_SF_WDELAY, 0, uptr:&((*recplay_conf)->u_sf_write_delay), defintval:DEF_SF_DELAY_WRITE, TYPE_UINT, 0}, \
{CONFIG_OPT_USE_MMAP, CONFIG_HLP_USE_MMAP, PARAMFLAG_BOOL, uptr:&((*recplay_conf)->use_mmap), defuintval:1, TYPE_UINT, 0}, \
}/*! \brief Record Player Configuration and state */
typedef struct {
char u_sf_filename[1024]; // subframes file path
@@ -109,10 +110,10 @@ typedef struct {
unsigned int u_sf_loops ; // number of loops in replay mode
unsigned int u_sf_read_delay; // read delay in replay mode
unsigned int u_sf_write_delay ; // write delay in replay mode
unsigned int use_mmap; // default is to use mmap
} recplay_conf_t;
typedef struct {
int use_mmap; // default is to use mmap
size_t mapsize;
FILE *pFile;
int fd;
+1 -3
View File
@@ -673,7 +673,7 @@ static int trx_usrp_read(openair0_device *device, openair0_timestamp *ptimestamp
if (samples_received == nsamps) s->wait_for_first_pps=0;
// bring RX data into 12 LSBs for softmodem RX
for (int i=0; i<cc; i++) {
for (int i=0; i<cc; i++) {
#if defined(__x86_64__) || defined(__i386__)
#ifdef __AVX2__
@@ -693,7 +693,6 @@ static int trx_usrp_read(openair0_device *device, openair0_timestamp *ptimestamp
for (int j=0; j<nsamps2; j++)
((int16x8_t *)buff[i])[j] = vshrq_n_s16(buff_tmp[i][j],rxshift);
#endif
}
}
if (samples_received < nsamps) {
@@ -1096,7 +1095,6 @@ extern "C" {
if (device->type==USRP_X300_DEV) {
openair0_cfg[0].rx_gain_calib_table = calib_table_x310;
std::cerr << "-- Using calibration table: calib_table_x310" << std::endl;
// s->usrp->set_rx_dc_offset(true);
}
if (device->type==USRP_N300_DEV) {
@@ -1,7 +1,7 @@
# I/Q record-playback
## using the iq recorder or iq player
This feature provides I/Q record-playback as presented in the 4th OAI workshop. Tests have only been performed with a eNB, but the implementation should allow any softmodem executable to use the iq's record/player.
This feature provides I/Q record-playback as presented in the 4th OAI workshop. The implementation allows any softmodem executable to use the iq's record/player.
The I/Q record/playback feature is briefly described hereafter, it allows you to:
* record subframes received by the USRP board in a file while the system is operating (for example you can record a full UE connection/traffic/ disconnection sequence). Today the oai USRP device is the only one supporting the recording feature.
* replay subframes from a file to operate the system (possibly in multiple loops if the recorded sequence is convenient from the logical point of view).
@@ -75,7 +75,7 @@ U[HW]I ru thread Writing file header to /tmp/iqfile
```
### Playback/replay mode
The option works only for 5MHz bandwidth because the information stored in the iq's file header regarding bandwidth is not yet properly processed.
When replaying iq's received by eNB or gNB The option works only for 5MHz bandwidth because the information stored in the iq's file header regarding bandwidth is not yet properly processed.
In this version, mismatch between file content and run time parameters might lead to unpredictable results. In addition a file recorded on a AVX2-capable processor cannot be replayed on a non-AVX2-capable processor (this is to be further investigated).
options for replay mode are:
* `subframes-replay` Activate replay mode
@@ -83,6 +83,7 @@ options for replay mode are:
* `subframes-loops` Number of iterations to replay the entire subframes file (default is 5)
* `subframes-read-delay` Delay in microseconds to read a subframe in replay mode (default 200)
* `subframes-write-delay` Delay in milliseconds to write a subframe in replay mode (default 15)
* `use-mmap` Boolean, set to 1 (true) by default, iq file is map to memory if true, otherwise iq's are read from file.
>iq player session example:
```bash
+17 -16
View File
@@ -68,19 +68,18 @@ static int iqplayer_loadfile(openair0_device *device, openair0_config_t *openair
exit(-1);
}
if (s->use_mmap) {
if (c->use_mmap) {
// use mmap
s->mapsize=sb.st_size;
LOG_I(HW,"Loading subframes using mmap() from %s size=%lu bytes ...\n",c->u_sf_filename, (uint64_t)sb.st_size );
void *mptr = mmap(NULL, sb.st_size, PROT_WRITE, MAP_PRIVATE, s->fd, 0) ;
s->ms_sample = (iqrec_t *) ( mmap(NULL, sb.st_size, PROT_WRITE, MAP_PRIVATE, s->fd, 0) + sizeof(iqfile_header_t));
if (mptr != MAP_FAILED) {
s->ms_sample = (iqrec_t *) ( mptr + sizeof(iqfile_header_t));
parse_iqfile_header(device, (iqfile_header_t *)mptr);
s->ms_sample = (iqrec_t *)((char *)mptr + sizeof(iqfile_header_t));
LOG_I(HW,"Loaded %u subframes.\n",s->nbSamplesBlocks );
} else {
LOG_E(HW,"Cannot mmap file, exiting.\n");
LOG_E(HW,"Cannot mmap file, exiting, errnor %s\n",strerror(errno));
close(s->fd);
exit(-1);
}
@@ -108,7 +107,7 @@ static int iqplayer_loadfile(openair0_device *device, openair0_config_t *openair
if (lseek(s->fd,sizeof(iqfile_header_t), SEEK_SET) == 0) {
LOG_I(HW,"Initial seek at beginning of the file\n" );
} else {
LOG_I(HW,"Problem initial seek at beginning of the file\n");
LOG_I(HW,"Problem initial seek at beginning of the file, %s\n",strerror(errno));
}
} else {
LOG_E(HW,"Cannot read header in %s exiting.\n",c->u_sf_filename );
@@ -134,11 +133,10 @@ static int trx_iqplayer_start(openair0_device *device) {
static void trx_iqplayer_end(openair0_device *device) {
if (device == NULL)
return;
if (device->recplay_state == NULL)
return;
if (device->recplay_state->use_mmap) {
if (device->openair0_cfg->recplay_conf->use_mmap) {
if (device->recplay_state->ms_sample != MAP_FAILED) {
munmap(device->recplay_state->ms_sample, device->recplay_state->mapsize);
}
@@ -201,21 +199,22 @@ static int trx_iqplayer_read(openair0_device *device, openair0_timestamp *ptimes
LOG_I(HW,"go back at the beginning of IQ file");
device->recplay_state->currentPtr=(uint8_t *)device->recplay_state->ms_sample;
if (!s->use_mmap) {
if (lseek(device->recplay_state->fd, 0, SEEK_SET) != 0) {
LOG_E(HW, "Problem seeking at the beginning of IQ file");
}
if (!(device->openair0_cfg->recplay_conf->use_mmap) ) {
close(device->recplay_state->fd);
iqplayer_loadfile(device, device->openair0_cfg);
// LOG_E(HW, "Problem seeking at the beginning of IQ file %s\n",strerror(errno));
}
}
if (!s->use_mmap) {
if (!(device->openair0_cfg->recplay_conf->use_mmap)) {
// read sample from file
if (read(s->fd, s->ms_sample, sizeof(iqrec_t)) != sizeof(iqrec_t)) {
LOG_E(HW,"pb reading iqfile at index %lu\n",sizeof(iqrec_t)*s->curSamplesBlock );
LOG_E(HW,"pb reading iqfile at index %lu %s\n",sizeof(iqrec_t)*s->curSamplesBlock, strerror(errno) );
exit(-1);
} else {
if (read(s->fd, s->ms_sample+1, s->ms_sample->nbBytes) != s->ms_sample->nbBytes) {
LOG_E(HW,"pb reading iqfile at index %lu\n",sizeof(iqrec_t)*s->curSamplesBlock );
LOG_E(HW,"pb reading iqfile at index %lu %s\n",sizeof(iqrec_t)*s->curSamplesBlock, strerror(errno) );
exit(-1);
}
}
@@ -225,7 +224,9 @@ static int trx_iqplayer_read(openair0_device *device, openair0_timestamp *ptimes
AssertFatal(curHeader->header==BELL_LABS_IQ_HEADER,"" );
// the current timestamp is the stored timestamp until we wrap on input
// USRP shifts 1 sample time to time
AssertFatal(s->wrap_count !=0 || abs(curHeader->ts-s->currentTs) < 5 ,"");
if (s->wrap_count !=0 && device->openair0_cfg->recplay_conf->use_mmap)
AssertFatal( abs(curHeader->ts-s->currentTs) < 5 ,
"wrap_count=%li, ts %lu %lu",s->wrap_count,curHeader->ts,s->currentTs);
AssertFatal(nsamps*4==curHeader->nbBytes,"");
*ptimestamp = s->currentTs;
memcpy(buff[0], curHeader+1, nsamps*4);
@@ -233,7 +234,7 @@ static int trx_iqplayer_read(openair0_device *device, openair0_timestamp *ptimes
// Prepare for next read
s->currentTs+=nsamps;
if (s->use_mmap)
if (device->openair0_cfg->recplay_conf->use_mmap)
s->currentPtr+=sizeof(iqrec_t)+s->ms_sample->nbBytes;
struct timespec req;
+2 -7
View File
@@ -28,7 +28,6 @@
#include "sctp_eNB_task.h"
#include "x2ap_eNB.h"
#include "s1ap_eNB.h"
#include "udp_eNB_task.h"
#include "gtpv1u_eNB_task.h"
#if ENABLE_RAL
#include "lteRALue.h"
@@ -67,11 +66,7 @@ int create_tasks(uint32_t enb_nb) {
if (EPC_MODE_ENABLED && !NODE_IS_DU(type) && ! ( split73==SPLIT73_DU ) ) {
rc = itti_create_task(TASK_S1AP, s1ap_eNB_task, NULL);
AssertFatal(rc >= 0, "Create task for S1AP failed\n");
if (!(get_softmodem_params()->emulate_rf)){
rc = itti_create_task(TASK_UDP, udp_eNB_task, NULL);
AssertFatal(rc >= 0, "Create task for UDP failed\n");
}
rc = itti_create_task(TASK_GTPV1_U, gtpv1u_eNB_task, NULL);
rc = itti_create_task(TASK_GTPV1_U, gtpv1uTask, NULL);
AssertFatal(rc >= 0, "Create task for GTPV1U failed\n");
}
@@ -91,7 +86,7 @@ int create_tasks(uint32_t enb_nb) {
rc = itti_create_task(TASK_DU_F1, F1AP_DU_task, NULL);
AssertFatal(rc >= 0, "Create task for DU F1AP failed\n");
// DU is now GTP-U instead of protobuf
rc = itti_create_task(TASK_GTPV1_U, gtpv1u_eNB_task, NULL);
rc = itti_create_task(TASK_GTPV1_U, gtpv1uTask, NULL);
AssertFatal(rc >= 0, "Create task for GTPV1U failed\n");
}
+1 -38
View File
@@ -28,7 +28,6 @@
#include "sctp_eNB_task.h"
#include "x2ap_eNB.h"
#include "s1ap_eNB.h"
#include "udp_eNB_task.h"
#include "gtpv1u_eNB_task.h"
#include "m2ap_eNB.h"
#include "m2ap_MCE.h"
@@ -75,46 +74,10 @@ int create_tasks_mbms(uint32_t enb_nb) {
rc = itti_create_task (TASK_MCE_APP, MCE_app_task, NULL);
AssertFatal(rc >= 0, "Create task for MCE APP failed\n");
// LOG_I(ENB_APP, "Creating ENB_APP eNB Task\n");
// rc = itti_create_task (TASK_ENB_APP, eNB_app_task, NULL);
// AssertFatal(rc >= 0, "Create task for eNB APP failed\n");
//
// LOG_I(RRC,"Creating RRC eNB Task\n");
// rc = itti_create_task (TASK_RRC_ENB, rrc_enb_task, NULL);
// AssertFatal(rc >= 0, "Create task for RRC eNB failed\n");
//
// if (EPC_MODE_ENABLED) {
// rc = itti_create_task(TASK_SCTP, sctp_eNB_task, NULL);
// AssertFatal(rc >= 0, "Create task for SCTP failed\n");
// }
// rc = itti_create_task(TASK_SCTP, sctp_eNB_task, NULL);
// AssertFatal(rc >= 0, "Create task for SCTP failed\n");
//
//
// if (EPC_MODE_ENABLED && !NODE_IS_DU(type)) {
// rc = itti_create_task(TASK_S1AP, s1ap_eNB_task, NULL);
// AssertFatal(rc >= 0, "Create task for S1AP failed\n");
// if (!(get_softmodem_params()->emulate_rf)){
// rc = itti_create_task(TASK_UDP, udp_eNB_task, NULL);
// AssertFatal(rc >= 0, "Create task for UDP failed\n");
// }
// rc = itti_create_task(TASK_GTPV1_U, gtpv1u_eNB_task, NULL);
// AssertFatal(rc >= 0, "Create task for GTPV1U failed\n");
// if (is_x2ap_enabled()) {
// rc = itti_create_task(TASK_X2AP, x2ap_task, NULL);
// AssertFatal(rc >= 0, "Create task for X2AP failed\n");
// } else {
// LOG_I(X2AP, "X2AP is disabled.\n");
// }
// }
////
if(!EPC_MODE_ENABLED){
// rc = itti_create_task(TASK_SCTP, sctp_eNB_task, NULL);
// AssertFatal(rc >= 0, "Create task for SCTP failed\n");
rc = itti_create_task(TASK_UDP, udp_eNB_task, NULL);
AssertFatal(rc >= 0, "Create task for UDP failed\n");
rc = itti_create_task(TASK_GTPV1_U, gtpv1u_eNB_task, NULL);
rc = itti_create_task(TASK_GTPV1_U, gtpv1uTask, NULL);
AssertFatal(rc >= 0, "Create task for GTPV1U failed\n");
}
///
-1
View File
@@ -27,7 +27,6 @@
#include "sctp_eNB_task.h"
#include "s1ap_eNB.h"
#include "openair3/NAS/UE/nas_ue_task.h"
#include "udp_eNB_task.h"
#include "gtpv1u_eNB_task.h"
#if ENABLE_RAL
#include "lteRALue.h"
@@ -70,23 +70,15 @@ eNBs =
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";
};
}
@@ -269,17 +269,10 @@ NETWORK_CONTROLLER :
log_config :
{
global_log_level ="info";
global_log_verbosity ="medium";
hw_log_level ="info";
hw_log_verbosity ="medium";
phy_log_level ="info";
phy_log_verbosity ="medium";
mac_log_level ="info";
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";
};
@@ -263,18 +263,11 @@ THREAD_STRUCT = (
log_config :
{
global_log_level ="info";
global_log_verbosity ="medium";
hw_log_level ="info";
hw_log_verbosity ="medium";
phy_log_level ="info";
phy_log_verbosity ="medium";
mac_log_level ="info";
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";
};
@@ -200,15 +200,10 @@ eNBs = (
log_config = {
global_log_level = "info";
global_log_verbosity = "medium";
pdcp_log_level = "info";
pdcp_log_verbosity = "high";
rrc_log_level = "info";
rrc_log_verbosity = "medium";
flexran_agent_log_level = "info";
flexran_agent_log_verbosity = "medium";
gtp_log_level = "info";
gtp_log_verbosity = "medium";
};
NETWORK_CONTROLLER : {
@@ -96,17 +96,11 @@ RUs = (
log_config = {
global_log_level = "info";
global_log_verbosity = "medium";
hw_log_level = "info";
hw_log_verbosity = "medium";
phy_log_level = "info";
phy_log_verbosity = "medium";
mac_log_level = "info";
mac_log_verbosity = "high";
rlc_log_level = "info";
rlc_log_verbosity = "medium";
flexran_agent_log_level = "info";
flexran_agent_log_verbosity = "medium";
};
NETWORK_CONTROLLER : {
@@ -382,24 +382,6 @@ eNBs =
ENB_IPV4_ADDRESS_FOR_X2C = "127.0.0.2/24";
ENB_PORT_FOR_X2C = 36422; # Spec 36422
};
log_config :
{
global_log_level ="info";
global_log_verbosity ="medium";
hw_log_level ="info";
hw_log_verbosity ="medium";
phy_log_level ="info";
phy_log_verbosity ="medium";
mac_log_level ="info";
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";
};
}
);
@@ -438,17 +420,10 @@ RUs = (
log_config :
{
global_log_level ="info";
global_log_verbosity ="medium";
hw_log_level ="info";
hw_log_verbosity ="medium";
phy_log_level ="info";
phy_log_verbosity ="medium";
mac_log_level ="info";
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";
};
@@ -176,19 +176,12 @@ THREAD_STRUCT = (
log_config :
{
global_log_level ="debug";
global_log_verbosity ="medium";
hw_log_level ="info";
hw_log_verbosity ="medium";
phy_log_level ="info";
phy_log_verbosity ="medium";
mac_log_level ="info";
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";
};
}
@@ -256,17 +256,10 @@ THREAD_STRUCT = (
log_config :
{
global_log_level ="info";
global_log_verbosity ="medium";
hw_log_level ="info";
hw_log_verbosity ="medium";
phy_log_level ="info";
phy_log_verbosity ="medium";
mac_log_level ="info";
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";
};
@@ -176,19 +176,12 @@ THREAD_STRUCT = (
log_config :
{
global_log_level ="debug";
global_log_verbosity ="medium";
hw_log_level ="info";
hw_log_verbosity ="medium";
phy_log_level ="info";
phy_log_verbosity ="medium";
mac_log_level ="info";
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";
};
}
@@ -256,17 +256,10 @@ THREAD_STRUCT = (
log_config :
{
global_log_level ="info";
global_log_verbosity ="medium";
hw_log_level ="info";
hw_log_verbosity ="medium";
phy_log_level ="info";
phy_log_verbosity ="medium";
mac_log_level ="info";
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";
};
@@ -284,17 +284,10 @@ THREAD_STRUCT = (
log_config :
{
global_log_level ="info";
global_log_verbosity ="medium";
hw_log_level ="info";
hw_log_verbosity ="medium";
phy_log_level ="info";
phy_log_verbosity ="medium";
mac_log_level ="info";
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";
};
@@ -212,18 +212,11 @@ THREAD_STRUCT = (
log_config :
{
global_log_level ="info";
global_log_verbosity ="medium";
hw_log_level ="info";
hw_log_verbosity ="medium";
phy_log_level ="info";
phy_log_verbosity ="medium";
mac_log_level ="info";
mac_log_verbosity ="medium";
rlc_log_level ="info";
rlc_log_verbosity ="medium";
pdcp_log_level ="info";
pdcp_log_verbosity ="medium";
rrc_log_level ="info";
rrc_log_verbosity ="medium";
};
@@ -256,17 +256,10 @@ THREAD_STRUCT = (
log_config :
{
global_log_level ="info";
global_log_verbosity ="medium";
hw_log_level ="info";
hw_log_verbosity ="medium";
phy_log_level ="info";
phy_log_verbosity ="medium";
mac_log_level ="info";
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";
};
@@ -251,41 +251,15 @@ THREAD_STRUCT = (
worker_config = "WORKER_ENABLE";
}
);
/*
log_config :
{
global_log_level ="info";
global_log_verbosity ="medium";
hw_log_level ="info";
hw_log_verbosity ="medium";
phy_log_level ="info";
phy_log_verbosity ="medium";
mac_log_level ="info";
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";
};
*/
log_config :
{
global_log_level ="crit";
global_log_verbosity ="crit";
hw_log_level ="crit";
hw_log_verbosity ="crit";
phy_log_level ="crit";
phy_log_verbosity ="crit";
mac_log_level ="crit";
mac_log_verbosity ="crit";
rlc_log_level ="crit";
rlc_log_verbosity ="crit";
pdcp_log_level ="crit";
pdcp_log_verbosity ="crit";
rrc_log_level ="crit";
rrc_log_verbosity ="crit";
};
@@ -244,18 +244,11 @@ THREAD_STRUCT = (
log_config :
{
global_log_level ="info";
global_log_verbosity ="medium";
hw_log_level ="info";
hw_log_verbosity ="medium";
phy_log_level ="info";
phy_log_verbosity ="medium";
mac_log_level ="info";
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";
};
@@ -298,18 +298,11 @@ rfsimulator :
log_config :
{
global_log_level ="info";
global_log_verbosity ="medium";
hw_log_level ="info";
hw_log_verbosity ="medium";
phy_log_level ="info";
phy_log_verbosity ="medium";
mac_log_level ="info";
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";
};
@@ -211,18 +211,11 @@ THREAD_STRUCT = (
log_config :
{
global_log_level ="info";
global_log_verbosity ="medium";
hw_log_level ="info";
hw_log_verbosity ="medium";
phy_log_level ="info";
phy_log_verbosity ="medium";
mac_log_level ="info";
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";
};
@@ -265,18 +265,11 @@ security = {
log_config :
{
global_log_level ="info";
global_log_verbosity ="medium";
hw_log_level ="info";
hw_log_verbosity ="medium";
phy_log_level ="info";
phy_log_verbosity ="medium";
mac_log_level ="info";
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";
};
@@ -251,18 +251,11 @@ security = {
log_config :
{
global_log_level ="info";
global_log_verbosity ="medium";
hw_log_level ="info";
hw_log_verbosity ="medium";
phy_log_level ="info";
phy_log_verbosity ="medium";
mac_log_level ="info";
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";
};
@@ -245,18 +245,11 @@ security = {
log_config :
{
global_log_level ="info";
global_log_verbosity ="medium";
hw_log_level ="info";
hw_log_verbosity ="medium";
phy_log_level ="info";
phy_log_verbosity ="medium";
mac_log_level ="info";
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";
};
@@ -265,18 +265,11 @@ security = {
log_config :
{
global_log_level ="info";
global_log_verbosity ="medium";
hw_log_level ="info";
hw_log_verbosity ="medium";
phy_log_level ="info";
phy_log_verbosity ="medium";
mac_log_level ="info";
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";
};
@@ -257,18 +257,11 @@ security = {
log_config :
{
global_log_level ="info";
global_log_verbosity ="medium";
hw_log_level ="info";
hw_log_verbosity ="medium";
phy_log_level ="info";
phy_log_verbosity ="medium";
mac_log_level ="info";
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";
};
@@ -257,18 +257,11 @@ security = {
log_config :
{
global_log_level ="info";
global_log_verbosity ="medium";
hw_log_level ="info";
hw_log_verbosity ="medium";
phy_log_level ="info";
phy_log_verbosity ="medium";
mac_log_level ="info";
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";
};
@@ -258,18 +258,11 @@ security = {
log_config :
{
global_log_level ="info";
global_log_verbosity ="medium";
hw_log_level ="info";
hw_log_verbosity ="medium";
phy_log_level ="info";
phy_log_verbosity ="medium";
mac_log_level ="info";
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";
};
@@ -262,17 +262,10 @@ security = {
log_config :
{
global_log_level ="info";
global_log_verbosity ="medium";
hw_log_level ="info";
hw_log_verbosity ="medium";
phy_log_level ="info";
phy_log_verbosity ="medium";
mac_log_level ="info";
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";
};
@@ -260,17 +260,10 @@ security = {
log_config :
{
global_log_level ="info";
global_log_verbosity ="medium";
hw_log_level ="info";
hw_log_verbosity ="medium";
phy_log_level ="info";
phy_log_verbosity ="medium";
mac_log_level ="info";
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";
};
@@ -303,17 +303,10 @@ security = {
log_config :
{
global_log_level ="info";
global_log_verbosity ="medium";
hw_log_level ="info";
hw_log_verbosity ="medium";
phy_log_level ="info";
phy_log_verbosity ="medium";
mac_log_level ="info";
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";
};
@@ -254,18 +254,11 @@ security = {
log_config :
{
global_log_level ="info";
global_log_verbosity ="medium";
hw_log_level ="info";
hw_log_verbosity ="medium";
phy_log_level ="info";
phy_log_verbosity ="medium";
mac_log_level ="info";
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";
};
@@ -253,18 +253,11 @@ security = {
log_config :
{
global_log_level ="info";
global_log_verbosity ="medium";
hw_log_level ="info";
hw_log_verbosity ="medium";
phy_log_level ="info";
phy_log_verbosity ="medium";
mac_log_level ="info";
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";
};
@@ -253,18 +253,11 @@ security = {
log_config :
{
global_log_level ="info";
global_log_verbosity ="medium";
hw_log_level ="info";
hw_log_verbosity ="medium";
phy_log_level ="info";
phy_log_verbosity ="medium";
mac_log_level ="info";
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";
};
@@ -270,18 +270,11 @@ security = {
log_config :
{
global_log_level ="info";
global_log_verbosity ="medium";
hw_log_level ="info";
hw_log_verbosity ="medium";
phy_log_level ="info";
phy_log_verbosity ="medium";
mac_log_level ="info";
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";
};
@@ -245,18 +245,11 @@ security = {
log_config :
{
global_log_level ="info";
global_log_verbosity ="medium";
hw_log_level ="info";
hw_log_verbosity ="medium";
phy_log_level ="info";
phy_log_verbosity ="medium";
mac_log_level ="info";
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";
};
@@ -255,18 +255,11 @@ security = {
log_config :
{
global_log_level ="info";
global_log_verbosity ="medium";
hw_log_level ="info";
hw_log_verbosity ="medium";
phy_log_level ="info";
phy_log_verbosity ="medium";
mac_log_level ="info";
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";
};
@@ -253,18 +253,11 @@ security = {
log_config :
{
global_log_level ="info";
global_log_verbosity ="medium";
hw_log_level ="info";
hw_log_verbosity ="medium";
phy_log_level ="info";
phy_log_verbosity ="medium";
mac_log_level ="info";
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";
};
@@ -253,18 +253,11 @@ security = {
log_config :
{
global_log_level ="info";
global_log_verbosity ="medium";
hw_log_level ="info";
hw_log_verbosity ="medium";
phy_log_level ="info";
phy_log_verbosity ="medium";
mac_log_level ="info";
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";
};
@@ -246,18 +246,11 @@ security = {
log_config :
{
global_log_level ="info";
global_log_verbosity ="medium";
hw_log_level ="info";
hw_log_verbosity ="medium";
phy_log_level ="info";
phy_log_verbosity ="medium";
mac_log_level ="info";
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";
};
@@ -1,18 +1,11 @@
log_config = {
global_log_level ="debug";
global_log_verbosity ="medium";
hw_log_level ="info";
hw_log_verbosity ="medium";
phy_log_level ="info";
phy_log_verbosity ="medium";
mac_log_level ="debug";
mac_log_verbosity ="medium";
rlc_log_level ="info";
rlc_log_verbosity ="medium";
pdcp_log_level ="info";
pdcp_log_verbosity ="medium";
rrc_log_level ="debug";
rrc_log_verbosity ="full";
};
@@ -1,18 +1,11 @@
log_config = {
global_log_level ="debug";
global_log_verbosity ="medium";
hw_log_level ="info";
hw_log_verbosity ="medium";
phy_log_level ="info";
phy_log_verbosity ="medium";
mac_log_level ="debug";
mac_log_verbosity ="medium";
rlc_log_level ="info";
rlc_log_verbosity ="medium";
pdcp_log_level ="info";
pdcp_log_verbosity ="medium";
rrc_log_level ="debug";
rrc_log_verbosity ="full";
};
@@ -217,17 +217,10 @@ THREAD_STRUCT = (
log_config = {
global_log_level ="info";
global_log_verbosity ="medium";
hw_log_level ="info";
hw_log_verbosity ="medium";
phy_log_level ="info";
phy_log_verbosity ="medium";
mac_log_level ="info";
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";
};
@@ -200,19 +200,12 @@ THREAD_STRUCT = (
log_config :
{
global_log_level ="debug";
global_log_verbosity ="medium";
hw_log_level ="info";
hw_log_verbosity ="medium";
phy_log_level ="info";
phy_log_verbosity ="medium";
mac_log_level ="debug";
mac_log_verbosity ="high";
rlc_log_level ="debug";
rlc_log_verbosity ="high";
pdcp_log_level ="info";
pdcp_log_verbosity ="medium";
rrc_log_level ="info";
rrc_log_verbosity ="high";
};
@@ -239,17 +239,10 @@ THREAD_STRUCT = (
log_config =
{
global_log_level ="info";
global_log_verbosity ="medium";
hw_log_level ="info";
hw_log_verbosity ="medium";
phy_log_level ="info";
phy_log_verbosity ="medium";
mac_log_level ="info";
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";
};
@@ -217,17 +217,10 @@ THREAD_STRUCT = (
log_config = {
global_log_level ="info";
global_log_verbosity ="medium";
hw_log_level ="info";
hw_log_verbosity ="medium";
phy_log_level ="info";
phy_log_verbosity ="medium";
mac_log_level ="info";
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";
};
@@ -218,17 +218,10 @@ THREAD_STRUCT = (
log_config = {
global_log_level ="debug";
global_log_verbosity ="medium";
hw_log_level ="info";
hw_log_verbosity ="medium";
phy_log_level ="debug";
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";
};
@@ -235,18 +235,11 @@ THREAD_STRUCT = (
log_config =
{
global_log_level ="info";
global_log_verbosity ="medium";
hw_log_level ="info";
hw_log_verbosity ="medium";
phy_log_level ="info";
phy_log_verbosity ="medium";
mac_log_level ="info";
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";
};
@@ -168,19 +168,12 @@ eNBs =
log_config :
{
global_log_level ="debug";
global_log_verbosity ="medium";
hw_log_level ="info";
hw_log_verbosity ="medium";
phy_log_level ="info";
phy_log_verbosity ="medium";
mac_log_level ="info";
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";
};
}
@@ -29,18 +29,11 @@ THREAD_STRUCT = (
log_config = {
global_log_level ="info";
global_log_verbosity ="medium";
hw_log_level ="info";
hw_log_verbosity ="medium";
phy_log_level ="info";
phy_log_verbosity ="medium";
mac_log_level ="info";
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";
};
@@ -29,18 +29,11 @@ THREAD_STRUCT = (
log_config = {
global_log_level ="info";
global_log_verbosity ="medium";
hw_log_level ="info";
hw_log_verbosity ="medium";
phy_log_level ="info";
phy_log_verbosity ="medium";
mac_log_level ="info";
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";
};
@@ -204,25 +204,6 @@ eNBs =
ENB_IPV4_ADDRESS_FOR_X2C = "192.168.18.199/24";
ENB_PORT_FOR_X2C = 36422; # Spec 36422
};
log_config :
{
global_log_level ="info";
global_log_verbosity ="high";
hw_log_level ="info";
hw_log_verbosity ="medium";
phy_log_level ="info";
phy_log_verbosity ="medium";
mac_log_level ="info";
mac_log_verbosity ="high";
rlc_log_level ="debug";
rlc_log_verbosity ="high";
pdcp_log_level ="info";
pdcp_log_verbosity ="high";
rrc_log_level ="info";
rrc_log_verbosity ="medium";
};
}
);
@@ -269,17 +250,10 @@ RUs = (
log_config :
{
global_log_level ="info";
global_log_verbosity ="high";
hw_log_level ="info";
hw_log_verbosity ="medium";
phy_log_level ="info";
phy_log_verbosity ="medium";
mac_log_level ="info";
mac_log_verbosity ="high";
rlc_log_level ="info";
rlc_log_verbosity ="high";
pdcp_log_level ="info";
pdcp_log_verbosity ="high";
rrc_log_level ="info";
rrc_log_verbosity ="medium";
};
@@ -205,25 +205,6 @@ eNBs =
ENB_IPV4_ADDRESS_FOR_X2C = "192.168.18.199/24";
ENB_PORT_FOR_X2C = 36422; # Spec 36422
};
log_config :
{
global_log_level ="info";
global_log_verbosity ="high";
hw_log_level ="info";
hw_log_verbosity ="medium";
phy_log_level ="info";
phy_log_verbosity ="medium";
mac_log_level ="info";
mac_log_verbosity ="high";
rlc_log_level ="debug";
rlc_log_verbosity ="high";
pdcp_log_level ="info";
pdcp_log_verbosity ="high";
rrc_log_level ="info";
rrc_log_verbosity ="medium";
};
}
);
@@ -270,17 +251,10 @@ RUs = (
log_config :
{
global_log_level ="info";
global_log_verbosity ="high";
hw_log_level ="info";
hw_log_verbosity ="medium";
phy_log_level ="info";
phy_log_verbosity ="medium";
mac_log_level ="info";
mac_log_verbosity ="high";
rlc_log_level ="info";
rlc_log_verbosity ="high";
pdcp_log_level ="info";
pdcp_log_verbosity ="high";
rrc_log_level ="info";
rrc_log_verbosity ="medium";
};
@@ -263,18 +263,11 @@ security = {
log_config :
{
global_log_level ="info";
global_log_verbosity ="medium";
hw_log_level ="info";
hw_log_verbosity ="medium";
phy_log_level ="info";
phy_log_verbosity ="medium";
mac_log_level ="info";
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";
};
@@ -272,18 +272,11 @@ security = {
log_config :
{
global_log_level ="info";
global_log_verbosity ="medium";
hw_log_level ="info";
hw_log_verbosity ="medium";
phy_log_level ="info";
phy_log_verbosity ="medium";
mac_log_level ="info";
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";
};
@@ -261,18 +261,11 @@ security = {
log_config :
{
global_log_level ="info";
global_log_verbosity ="medium";
hw_log_level ="info";
hw_log_verbosity ="medium";
phy_log_level ="info";
phy_log_verbosity ="medium";
mac_log_level ="info";
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";
};
@@ -258,18 +258,11 @@ security = {
log_config :
{
global_log_level ="info";
global_log_verbosity ="medium";
hw_log_level ="info";
hw_log_verbosity ="medium";
phy_log_level ="info";
phy_log_verbosity ="medium";
mac_log_level ="info";
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";
};
@@ -78,22 +78,13 @@ gNBs =
log_config :
{
global_log_level ="info";
global_log_verbosity ="medium";
hw_log_level ="info";
hw_log_verbosity ="medium";
phy_log_level ="info";
phy_log_verbosity ="medium";
mac_log_level ="info";
mac_log_verbosity ="high";
rlc_log_level ="debug";
rlc_log_verbosity ="medium";
pdcp_log_level ="info";
pdcp_log_verbosity ="medium";
rrc_log_level ="info";
rrc_log_verbosity ="medium";
f1ap_log_level ="debug";
f1ap_log_verbosity ="medium";
ngap_log_level ="debug";
ngap_log_verbosity ="medium";
};
@@ -254,22 +254,13 @@ THREAD_STRUCT = (
log_config :
{
global_log_level ="info";
global_log_verbosity ="medium";
hw_log_level ="info";
hw_log_verbosity ="medium";
phy_log_level ="info";
phy_log_verbosity ="medium";
mac_log_level ="info";
mac_log_verbosity ="high";
rlc_log_level ="debug";
rlc_log_verbosity ="medium";
pdcp_log_level ="info";
pdcp_log_verbosity ="medium";
rrc_log_level ="info";
rrc_log_verbosity ="medium";
f1ap_log_level ="debug";
f1ap_log_verbosity ="medium";
ngap_log_level ="debug";
ngap_log_verbosity ="medium";
};
@@ -265,20 +265,12 @@ security = {
log_config :
{
global_log_level ="info";
global_log_verbosity ="medium";
hw_log_level ="info";
hw_log_verbosity ="medium";
phy_log_level ="info";
phy_log_verbosity ="medium";
mac_log_level ="info";
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";
ngap_log_level ="info";
ngap_log_verbosity ="medium";
};
@@ -282,22 +282,13 @@ security = {
log_config :
{
global_log_level ="info";
global_log_verbosity ="medium";
hw_log_level ="info";
hw_log_verbosity ="medium";
phy_log_level ="info";
phy_log_verbosity ="medium";
mac_log_level ="info";
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";
ngap_log_level ="debug";
ngap_log_verbosity ="medium";
f1ap_log_level ="debug";
f1ap_log_verbosity ="medium";
};
@@ -280,20 +280,12 @@ security = {
log_config :
{
global_log_level ="info";
global_log_verbosity ="medium";
hw_log_level ="info";
hw_log_verbosity ="medium";
phy_log_level ="info";
phy_log_verbosity ="medium";
mac_log_level ="info";
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";
ngap_log_level ="debug";
ngap_log_verbosity ="medium";
};
@@ -282,21 +282,12 @@ security = {
log_config :
{
global_log_level ="info";
global_log_verbosity ="medium";
hw_log_level ="info";
hw_log_verbosity ="medium";
phy_log_level ="info";
phy_log_verbosity ="medium";
mac_log_level ="info";
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";
ngap_log_level ="debug";
ngap_log_verbosity ="medium";
f1ap_log_level ="debug";
f1ap_log_verbosity ="medium";
};
@@ -281,22 +281,13 @@ security = {
log_config :
{
global_log_level ="info";
global_log_verbosity ="medium";
hw_log_level ="info";
hw_log_verbosity ="medium";
phy_log_level ="info";
phy_log_verbosity ="medium";
mac_log_level ="info";
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";
ngap_log_level ="debug";
ngap_log_verbosity ="medium";
f1ap_log_level ="debug";
f1ap_log_verbosity ="medium";
};
@@ -287,20 +287,12 @@ security = {
log_config :
{
global_log_level ="info";
global_log_verbosity ="medium";
hw_log_level ="info";
hw_log_verbosity ="medium";
phy_log_level ="info";
phy_log_verbosity ="medium";
mac_log_level ="info";
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";
ngap_log_level ="debug";
ngap_log_verbosity ="medium";
};
@@ -310,21 +310,12 @@ security = {
log_config :
{
global_log_level ="info";
global_log_verbosity ="medium";
hw_log_level ="info";
hw_log_verbosity ="medium";
phy_log_level ="info";
phy_log_verbosity ="medium";
mac_log_level ="info";
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";
ngap_log_level ="debug";
ngap_log_verbosity ="medium";
f1ap_log_level ="debug";
f1ap_log_verbosity ="medium";
};
@@ -0,0 +1,301 @@
Active_gNBs = ( "gNB-OAI");
# Asn1_verbosity, choice in: none, info, annoying
Asn1_verbosity = "none";
gNBs =
(
{
////////// Identification parameters:
gNB_ID = 0xe00;
gNB_name = "gNB-OAI";
// Tracking area code, 0x0000 and 0xfffe are reserved values
tracking_area_code = 1;
plmn_list = ({
mcc = 208;
mnc = 99;
mnc_length = 2;
snssaiList = (
{
sst = 1;
sd = 0x1; // 0 false, else true
},
{
sst = 1;
sd = 0x112233; // 0 false, else true
}
);
});
nr_cellid = 12345678L;
////////// Physical parameters:
ssb_SubcarrierOffset = 0;
pdsch_AntennaPorts = 1;
pusch_AntennaPorts = 1;
sib1_tda = 15;
min_rxtxtime = 6;
pdcch_ConfigSIB1 = (
{
controlResourceSetZero = 2;
searchSpaceZero = 0;
}
);
servingCellConfigCommon = (
{
#spCellConfigCommon
physCellId = 0;
# downlinkConfigCommon
#frequencyInfoDL
# this is 3600 MHz + 12 PRBs@30kHz SCS (same as initial BWP)
absoluteFrequencySSB = 640288;
dl_frequencyBand = 78;
# this is 3600 MHz
dl_absoluteFrequencyPointA = 640000;
#scs-SpecificCarrierList
dl_offstToCarrier = 0;
# subcarrierSpacing
# 0=kHz15, 1=kHz30, 2=kHz60, 3=kHz120
dl_subcarrierSpacing = 1;
dl_carrierBandwidth = 24;
#initialDownlinkBWP
#genericParameters
# this is RBstart=27,L=48 (275*(L-1))+RBstart
initialDLBWPlocationAndBandwidth = 6325;
# subcarrierSpacing
# 0=kHz15, 1=kHz30, 2=kHz60, 3=kHz120
initialDLBWPsubcarrierSpacing = 1;
#pdcch-ConfigCommon
initialDLBWPcontrolResourceSetZero = 2;
initialDLBWPsearchSpaceZero = 0;
#uplinkConfigCommon
#frequencyInfoUL
ul_frequencyBand = 78;
#scs-SpecificCarrierList
ul_offstToCarrier = 0;
# subcarrierSpacing
# 0=kHz15, 1=kHz30, 2=kHz60, 3=kHz120
ul_subcarrierSpacing = 1;
ul_carrierBandwidth = 24;
pMax = 20;
#initialUplinkBWP
#genericParameters
initialULBWPlocationAndBandwidth = 6325;
# subcarrierSpacing
# 0=kHz15, 1=kHz30, 2=kHz60, 3=kHz120
initialULBWPsubcarrierSpacing = 1;
#rach-ConfigCommon
#rach-ConfigGeneric
prach_ConfigurationIndex = 98;
#prach_msg1_FDM
#0 = one, 1=two, 2=four, 3=eight
prach_msg1_FDM = 0;
prach_msg1_FrequencyStart = 0;
zeroCorrelationZoneConfig = 13;
preambleReceivedTargetPower = -96;
#preamblTransMax (0...10) = (3,4,5,6,7,8,10,20,50,100,200)
preambleTransMax = 6;
#powerRampingStep
# 0=dB0,1=dB2,2=dB4,3=dB6
powerRampingStep = 1;
#ra_ReponseWindow
#1,2,4,8,10,20,40,80
ra_ResponseWindow = 4;
#ssb_perRACH_OccasionAndCB_PreamblesPerSSB_PR
#1=oneeighth,2=onefourth,3=half,4=one,5=two,6=four,7=eight,8=sixteen
ssb_perRACH_OccasionAndCB_PreamblesPerSSB_PR = 4;
#oneHalf (0..15) 4,8,12,16,...60,64
ssb_perRACH_OccasionAndCB_PreamblesPerSSB = 14;
#ra_ContentionResolutionTimer
#(0..7) 8,16,24,32,40,48,56,64
ra_ContentionResolutionTimer = 7;
rsrp_ThresholdSSB = 19;
#prach-RootSequenceIndex_PR
#1 = 839, 2 = 139
prach_RootSequenceIndex_PR = 2;
prach_RootSequenceIndex = 1;
# SCS for msg1, can only be 15 for 30 kHz < 6 GHz, takes precendence over the one derived from prach-ConfigIndex
#
msg1_SubcarrierSpacing = 1,
# restrictedSetConfig
# 0=unrestricted, 1=restricted type A, 2=restricted type B
restrictedSetConfig = 0,
msg3_DeltaPreamble = 1;
p0_NominalWithGrant =-90;
# pucch-ConfigCommon setup :
# pucchGroupHopping
# 0 = neither, 1= group hopping, 2=sequence hopping
pucchGroupHopping = 0;
hoppingId = 40;
p0_nominal = -90;
# ssb_PositionsInBurs_BitmapPR
# 1=short, 2=medium, 3=long
ssb_PositionsInBurst_PR = 2;
ssb_PositionsInBurst_Bitmap = 1;
# ssb_periodicityServingCell
# 0 = ms5, 1=ms10, 2=ms20, 3=ms40, 4=ms80, 5=ms160, 6=spare2, 7=spare1
ssb_periodicityServingCell = 2;
# dmrs_TypeA_position
# 0 = pos2, 1 = pos3
dmrs_TypeA_Position = 0;
# subcarrierSpacing
# 0=kHz15, 1=kHz30, 2=kHz60, 3=kHz120
subcarrierSpacing = 1;
#tdd-UL-DL-ConfigurationCommon
# subcarrierSpacing
# 0=kHz15, 1=kHz30, 2=kHz60, 3=kHz120
referenceSubcarrierSpacing = 1;
# pattern1
# dl_UL_TransmissionPeriodicity
# 0=ms0p5, 1=ms0p625, 2=ms1, 3=ms1p25, 4=ms2, 5=ms2p5, 6=ms5, 7=ms10
dl_UL_TransmissionPeriodicity = 6;
nrofDownlinkSlots = 7;
nrofDownlinkSymbols = 6;
nrofUplinkSlots = 2;
nrofUplinkSymbols = 4;
ssPBCH_BlockPower = -25;
}
);
# ------- SCTP definitions
SCTP :
{
# Number of streams to use in input/output
SCTP_INSTREAMS = 2;
SCTP_OUTSTREAMS = 2;
};
////////// AMF parameters:
amf_ip_address = ( { ipv4 = "192.168.70.132";
ipv6 = "192:168:30::17";
active = "yes";
preference = "ipv4";
}
);
NETWORK_INTERFACES :
{
GNB_INTERFACE_NAME_FOR_NG_AMF = "demo-oai";
GNB_IPV4_ADDRESS_FOR_NG_AMF = "192.168.70.129/24";
GNB_INTERFACE_NAME_FOR_NGU = "demo-oai";
GNB_IPV4_ADDRESS_FOR_NGU = "192.168.70.129/24";
GNB_PORT_FOR_S1U = 2152; # Spec 2152
};
}
);
MACRLCs = (
{
num_cc = 1;
tr_s_preference = "local_L1";
tr_n_preference = "local_RRC";
pusch_TargetSNRx10 = 150;
pucch_TargetSNRx10 = 200;
ulsch_max_frame_inactivity = 1;
}
);
L1s = (
{
num_cc = 1;
tr_n_preference = "local_mac";
pusch_proc_threads = 8;
prach_dtx_threshold = 120;
pucch0_dtx_threshold = 150;
ofdm_offset_divisor = 8; #set this to UINT_MAX for offset 0
}
);
RUs = (
{
local_rf = "yes"
nb_tx = 1
nb_rx = 1
att_tx = 0
att_rx = 0;
bands = [78];
max_pdschReferenceSignalPower = -27;
max_rxgain = 114;
sf_extension = 0;
eNB_instances = [0];
#beamforming 1x4 matrix:
bf_weights = [0x00007fff, 0x0000, 0x0000, 0x0000];
clock_src = "internal";
}
);
THREAD_STRUCT = (
{
#three config for level of parallelism "PARALLEL_SINGLE_THREAD", "PARALLEL_RU_L1_SPLIT", or "PARALLEL_RU_L1_TRX_SPLIT"
parallel_config = "PARALLEL_SINGLE_THREAD";
#two option for worker "WORKER_DISABLE" or "WORKER_ENABLE"
worker_config = "WORKER_ENABLE";
}
);
rfsimulator :
{
serveraddr = "server";
serverport = "4043";
options = (); #("saviq"); or/and "chanmod"
modelname = "AWGN";
IQfile = "/tmp/rfsimulator.iqs";
};
security = {
# preferred ciphering algorithms
# the first one of the list that an UE supports in chosen
# valid values: nea0, nea1, nea2, nea3
ciphering_algorithms = ( "nea0" );
# preferred integrity algorithms
# the first one of the list that an UE supports in chosen
# valid values: nia0, nia1, nia2, nia3
integrity_algorithms = ( "nia2", "nia0" );
# setting 'drb_ciphering' to "no" disables ciphering for DRBs, no matter
# what 'ciphering_algorithms' configures; same thing for 'drb_integrity'
drb_ciphering = "yes";
drb_integrity = "no";
};
log_config :
{
global_log_level ="info";
global_log_verbosity ="medium";
hw_log_level ="info";
hw_log_verbosity ="medium";
phy_log_level ="info";
phy_log_verbosity ="medium";
mac_log_level ="info";
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";
ngap_log_level ="debug";
ngap_log_verbosity ="medium";
};
-83
View File
@@ -1,83 +0,0 @@
/*
* Licensed to the OpenAirInterface (OAI) Software Alliance under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The OpenAirInterface Software Alliance licenses this file to You under
* the OAI Public License, Version 1.1 (the "License"); you may not use this file
* except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.openairinterface.org/?page_id=698
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*-------------------------------------------------------------------------------
* For more information about the OpenAirInterface (OAI) Software Alliance:
* contact@openairinterface.org
*/
#ifndef __THREAD_IPC_H__
#define __THREAD_IPC_H__
#define SUB_FRAME_LENGTH 7680
#define FRAME_LENGTH 76800
#define UE_UL_DELAY 6 /*设置上行组帧在同步时钟基础上的延时(子帧个数)*/
#define UE_UL_SEND_DELAY 6 /*上行发送子帧号在接收子帧时间戳上的延时(子帧个数)*/
#define BUFFERMAX 5 /*环形缓冲区个数*/
#define LOWBUFFER 3 /*环形缓冲区下限, 不能为0*/
#define HIGHBUFFER 4 /*环形缓冲区上限*/
typedef struct {
long long subframe_num; /*子帧编号*/
int buffer[SUB_FRAME_LENGTH * 2]; /*一子帧数据*/
} buffer_t;
typedef struct {
int packet_num; /*环形缓冲区数据包计数器,表示环形缓冲区有效数据包个数*/
int isfull; /*标记环形缓冲区有效数据包是否达到上限标志*/
int isempty; /*标记环形缓冲区有效数据包是否达到下限标志*/
pthread_mutex_t buffer_mutex; /*环形缓冲区操作保护锁*/
pthread_cond_t full_cond; /*环形缓冲区上限条件变量,配合isfull使用 */
pthread_cond_t empty_cond; /*环形缓冲区下限条件变量,配合isempty使用*/
buffer_t loop_buf[BUFFERMAX]; /*环形缓冲区*/
} loop_buffer_op_t;
typedef struct {
int decoding_subframe_num; /*待解码子帧的编号*/
pthread_mutex_t buffer_mutex; /*对sync_buffer临界区的保护锁*/
int sync_buffer[SUB_FRAME_LENGTH * 10]; /*同步线程与下行解码线程数据共享缓冲区*/
} sync_buffer_t;
typedef struct {
unsigned int rx_timestamp; /*接收数据包第一个sample时间戳*/
unsigned int tx_timestamp; /*待发送数据包的时间戳*/
unsigned long long current_subframe; /*当前子帧编号*/
int ue_sync_state; /*表示UE是否在同步状态,0表示失同步,1表示同步*/
pthread_mutex_t sync_mutex; /*根据ue_sync_state标志,唤醒组帧线程*/
pthread_mutex_t ul_send_mutex; /*用于sync线程唤醒发送线程发送数据*/
pthread_mutex_t dl_decode_mutex;/*下行解码保护锁,用于sync线程唤醒解码线程解码*/
loop_buffer_op_t loop_buffer;
sync_buffer_t sync_buffer;
} g_thread_ipc_t;
void loop_buffer_reset(buffer_t *loop_buf);
int thread_ipc_init(void);
int thread_ipc_deinit(void);
int set_thread_attr(pthread_attr_t *attr, int policy, int priority, int cpuid);
int find_subframe_num(unsigned long long current_subframe_num, buffer_t *buf, int *flag);
int ue_unsync_thread_ipc_reset(void);
extern g_thread_ipc_t thread_ipc;
#endif
-944
View File
@@ -1,944 +0,0 @@
/*
* Licensed to the OpenAirInterface (OAI) Software Alliance under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The OpenAirInterface Software Alliance licenses this file to You under
* the OAI Public License, Version 1.1 (the "License"); you may not use this file
* except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.openairinterface.org/?page_id=698
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*-------------------------------------------------------------------------------
* For more information about the OpenAirInterface (OAI) Software Alliance:
* contact@openairinterface.org
*/
#define _GNU_SOURCE
#include <stdio.h>
#include <stdlib.h>
#include <unistd.h>
#include <string.h>
#include <sys/ioctl.h>
#include <sys/types.h>
#include <sys/mman.h>
#include <sys/stat.h>
#include <fcntl.h>
#include <sched.h>
#include <linux/sched.h>
#include <signal.h>
#include <execinfo.h>
#include <getopt.h>
#include <syscall.h>
#include <sys/sysinfo.h>
#include "assertions.h"
#include "PHY/types.h"
#include "PHY/defs.h"
#include <sys/time.h>
#define GET_TIME_INIT(num) struct timeval _timers[num]
#define GET_TIME_VAL(num) gettimeofday(&_timers[num], NULL)
#define TIME_VAL_TO_MS(num) (((double)_timers[num].tv_sec*1000.0) + ((double)_timers[num].tv_usec/1000.0))
#undef MALLOC //there are two conflicting definitions, so we better make sure we don't use it at all
//#undef FRAME_LENGTH_COMPLEX_SAMPLES //there are two conflicting definitions, so we better make sure we don't use it at all
#include "../../ARCH/COMMON/common_lib.h"
#include "PHY/extern.h"
#include "SCHED/extern.h"
#include "LAYER2/MAC/extern.h"
#include "LAYER2/MAC/proto.h"
#define SYRIQ_CHANNEL_TESTER 0
#define SYRIQ_CHANNEL_TESTER2 0
#define SYRIQ_CHANNEL_DATA1 1
volatile int oai_exit = 0;
openair0_config_t openair0_cfg[MAX_CARDS];
#if 0
#define NB_ANTENNAS_RX 4
#define DevAssert(cOND) _Assert_(cOND, _Assert_Exit_, "")
#define malloc16(x) memalign(16,x)
#ifdef 0
static inline void* malloc16_clear( size_t size )
{
#ifdef __AVX2__
void* ptr = memalign(32, size);
#else
void* ptr = memalign(16, size);
#endif
if(ptr)
memset( ptr, 0, size );
return ptr;
}
#endif
#endif
typedef struct latency_stat {
uint64_t counter;
uint64_t stat250;
uint64_t stat500;
uint64_t stat600;
uint64_t stat700;
uint64_t stat800;
uint64_t stat1300;
uint64_t stat1500;
uint64_t stat2000;
uint64_t stat2500;
uint64_t stat3000;
uint64_t stat880;
uint64_t stat960;
uint64_t stat1040;
uint64_t stat1120;
uint64_t stat1200;
} latency_stat_t;
typedef struct timing_stats {
char *name;
double min;
double max;
double total;
unsigned int count;
} timing_stats_t;
//static struct timespec get_timespec_diff(
// struct timespec *start,
// struct timespec *stop )
//{
// struct timespec result;
//
// if ( ( stop->tv_nsec - start->tv_nsec ) < 0 ) {
// result.tv_sec = stop->tv_sec - start->tv_sec - 1;
// result.tv_nsec = stop->tv_nsec - start->tv_nsec + 1000000000;
// }
// else {
// result.tv_sec = stop->tv_sec - start->tv_sec;
// result.tv_nsec = stop->tv_nsec - start->tv_nsec;
// }
//
// return result;
//}
//static void measure_time (
// openair0_device *rf_device,
// struct timespec *start,
// struct timespec *stop,
// timing_stats_t *stats,
// boolean_t START,
// uint8_t PRINT_INTERVAL )
//{
// if ( START ) {
// clock_gettime( CLOCK_MONOTONIC, start );
// }
// else {
// clock_gettime( CLOCK_MONOTONIC, stop );
//
// struct timespec diff;
// double current = 0;
//// boolean_t show_stats = false;
//
// diff = get_timespec_diff( start, stop );
// current = (double)diff.tv_sec * 1000000 + (double)diff.tv_nsec / 1000;
//
// if ( current > stats->max ) {
// stats->max = current;
//// show_stats = true;
// }
// if ( stats->min == 0 || current < stats->min ) {
// stats->min = current;
//// show_stats = true;
// }
// stats->total += current;
//
//// if ( show_stats ) {
//// rf_device.trx_get_stats_func( &rf_device );
//// }
//
//// if ( stats->count % PRINT_INTERVAL == 0 ) {
//// double avg = stats->total / ( stats->count + 1 );
//// printf( "[%s][%d] Current : %.2lf µs, Min : %.2lf µs, Max : %.2lf µs, Avg : %.2lf µs\n",
//// stats->count, stats->name, current, stats->min, stats->max, avg );
//// }
//
// stats->count++;
// }
//}
int32_t **rxdata;
int32_t **txdata;
int setup_ue_buffers(PHY_VARS_UE **phy_vars_ue, openair0_config_t *openair0_cfg);
static inline void saif_meas(unsigned int frame_rx, unsigned int subframe_rx) {
static latency_stat_t __thread latency_stat;
static struct timespec __thread last= {0};
struct timespec now;
clock_gettime(CLOCK_MONOTONIC_RAW, &now);
if ( last.tv_sec ) {
uint64_t diffTime = ((uint64_t)now.tv_sec *1000 *1000 *1000 + now.tv_nsec) -
((uint64_t)last.tv_sec *1000 *1000 *1000 + last.tv_nsec);
diffTime/=1000;
latency_stat.counter++;
if ( diffTime <= 800 ) {
if (diffTime < 250 )
latency_stat.stat250++;
else if (diffTime < 500 )
latency_stat.stat500++;
else if (diffTime < 600 )
latency_stat.stat600++;
else if (diffTime < 700 )
latency_stat.stat700++;
else
latency_stat.stat800++;
}
else if ( diffTime > 1200 ) {
if (diffTime < 1500 )
latency_stat.stat1300++;
else if ( diffTime < 2000 )
latency_stat.stat1500++;
else if ( diffTime < 2500 )
latency_stat.stat2000++;
else if ( diffTime < 3000 )
latency_stat.stat2500++;
else
latency_stat.stat3000++;
}
else
if (diffTime <= 880 )
latency_stat.stat880++;
else if (diffTime <= 960 )
latency_stat.stat960++;
else if (diffTime <= 1040 )
latency_stat.stat1040++;
else if (diffTime < 1120 )
latency_stat.stat1120++;
else
latency_stat.stat1200++;
if ( (diffTime>=1500) || ( !(frame_rx%1024) && subframe_rx == 0 ) ) {
time_t current=time(NULL);
printf("\n");
printf("%.2f Period stats cnt=%7.7ld 0.. 250=%7.7ld 250.. 500=%7.7ld 500.. 600=%7.7ld 600.. 700=%7.7ld 700.. 800=%7.7ld - (frame_rx=%u) - %s",
now.tv_sec+(double)now.tv_nsec/1e9,
latency_stat.counter,
latency_stat.stat250, latency_stat.stat500,
latency_stat.stat600, latency_stat.stat700,
latency_stat.stat800,
frame_rx,
ctime(&current));
printf("%.2f Period stats cnt=%7.7ld 800.. 880=%7.7ld 880.. 960=%7.7ld 960..1040=%7.7ld 1040..1120=%7.7ld 1120..1200=%7.7ld - (frame_rx=%u) - %s",
now.tv_sec+(double)now.tv_nsec/1e9,
latency_stat.counter,
latency_stat.stat880, latency_stat.stat960,
latency_stat.stat1040, latency_stat.stat1120,
latency_stat.stat1200,
frame_rx,
ctime(&current));
printf("%.2f Period stats cnt=%7.7ld 1200..1300=%7.7ld 1300..1500=%7.7ld 1500..2000=%7.7ld 2000..2500=%7.7ld >3000=%7.7ld - (frame_rx=%u) - %s",
now.tv_sec+(double)now.tv_nsec/1e9,
latency_stat.counter,
latency_stat.stat1300, latency_stat.stat1500,
latency_stat.stat2000, latency_stat.stat2500,
latency_stat.stat3000,
frame_rx,
ctime(&current));
fflush(stdout);
}
}
last=now;
}
/* End of Changed by SYRTEM */
void exit_fun(const char* s)
{
if (s != NULL) {
printf("%s %s() Exiting OAI softmodem: %s\n",__FILE__, __FUNCTION__, s);
}
oai_exit = 1;
}
void init_thread(int sched_runtime, int sched_deadline, int sched_fifo, char * name) {
#ifdef DEADLINE_SCHEDULER
if (sched_runtime!=0) {
struct sched_attr attr= {0};
attr.size = sizeof(attr);
// This creates a .5 ms fpga_recv_cnt reservation
attr.sched_policy = SCHED_DEADLINE;
attr.sched_runtime = sched_runtime;
attr.sched_deadline = sched_deadline;
attr.sched_period = 0;
AssertFatal(sched_setattr(0, &attr, 0) == 0,
"[SCHED] main eNB thread: sched_setattr failed %s \n",perror(errno));
LOG_I(HW,"[SCHED][eNB] eNB main deadline thread %lu started on CPU %d\n",
(unsigned long)gettid(), sched_getcpu());
}
#else
#ifdef CPU_AFFINITY
if (get_nprocs() >2) {
for (j = 1; j < get_nprocs(); j++)
CPU_SET(j, &cpuset);
}
AssertFatal( 0 == pthread_setaffinity_np(pthread_self(), sizeof(cpu_set_t), &cpuset)==0,"");
#endif
struct sched_param sp;
sp.sched_priority = sched_fifo;
AssertFatal(pthread_setschedparam(pthread_self(),SCHED_FIFO,&sp)==0,
"Can't set thread priority, Are you root?\n");
#endif
// Lock memory from swapping. This is a process wide call (not constraint to this thread).
mlockall(MCL_CURRENT | MCL_FUTURE);
pthread_setname_np( pthread_self(), name );
}
int main(void)
{
int ret;
uint64_t i;
openair0_device rf_device;
openair0_timestamp timestamp = 0;
unsigned int sub_frame = 0;
unsigned int frame_rx = 0;
unsigned int nb_antennas_tx = 1;
unsigned int nb_antennas_rx = 1;
openair0_cfg[0].mmapped_dma = 0;
openair0_cfg[0].configFilename = NULL;
openair0_cfg[0].duplex_mode = duplex_mode_FDD;
uint32_t **sendbuff = NULL;
uint32_t **recvbuff = NULL;
uint32_t expected_value = 0;
uint32_t received_value = 0;
int nsamp = 0; // 1 ms
int antenna_id = 1;
int c = 0;
int numIter = 0;
int fpga_loop = 0;
#if SYRIQ_CHANNEL_DATA1
uint64_t first_ts = 0;
uint8_t is_first_ts = 0;
uint64_t trx_read_cnt = 0;
uint32_t j = 0;
uint32_t err_cnt = 0;
#else
int failure = 0;
#endif
#if 0 // 5MHz BW
unsigned int nb_sample_per_tti = 7680;
openair0_cfg[0].sample_rate = 7.68e6;
openair0_cfg[0].samples_per_frame = nb_sample_per_tti*10;
openair0_cfg[0].rx_bw = 2.5e6;
openair0_cfg[0].tx_bw = 2.5e6;
openair0_cfg[0].num_rb_dl = 25;
#endif
#if 0 // 10MHz BW
unsigned int nb_sample_per_tti = 15360;
openair0_cfg[0].sample_rate = 15.36e6;
openair0_cfg[0].samples_per_frame = nb_sample_per_tti*10;
openair0_cfg[0].rx_bw = 5.0e6;
openair0_cfg[0].tx_bw = 5.0e6;
openair0_cfg[0].num_rb_dl = 50;
#endif
#if 1 // 20MHz BW
unsigned int nb_sample_per_tti = 30720;
openair0_cfg[0].sample_rate = 30.72e6;
openair0_cfg[0].samples_per_frame = nb_sample_per_tti*10;
openair0_cfg[0].rx_bw = 10.0e6;
openair0_cfg[0].tx_bw = 10.0e6;
openair0_cfg[0].num_rb_dl = 100;
#endif
const char *openair_dir = getenv("OPENAIR_DIR");
const char *ini_file = "/usr/local/etc/syriq/ue.band7.tm1.PRB100.NR20.dat";
int readBlockSize;
void* rxp[nb_antennas_rx];
void* txp[nb_antennas_tx];
// int32_t rxdata[1][nb_sample_per_tti*10+2048];
#if 0
int32_t **rxdata;
#endif
// init_thread(100000, 500000, sched_get_priority_max(SCHED_FIFO),"main UE");
printf("LTE HARDWARE Latency debug utility \n");
printf("INIT data buffers \n");
#if 0
rxdata = (int32_t**)memalign(32, nb_antennas_rx*sizeof(int32_t*) );
rxdata[0] = (int32_t*)memalign(32,(nb_sample_per_tti*10+2048)*sizeof(int32_t));
#else
rxdata = (int32_t**)malloc16( nb_antennas_rx*sizeof(int32_t*) );
txdata = (int32_t**)malloc16( nb_antennas_tx*sizeof(int32_t*) );
rxdata[0] = (int32_t*)malloc16_clear( 307200*sizeof(int32_t) );
txdata[0] = (int32_t*)malloc16_clear( 307200*sizeof(int32_t) );
#endif
printf("INIT done\n");
memset(&rf_device, 0, sizeof(openair0_device));
rf_device.host_type = BBU_HOST;
openair0_cfg[0].duplex_mode = duplex_mode_FDD;
openair0_cfg[0].rx_num_channels = 1;
openair0_cfg[0].tx_num_channels = 1;
// configure channel 0
for (i=0; i<openair0_cfg[0].rx_num_channels; i++)
{
printf("configure channel %d \n",i);
openair0_cfg[0].autocal[i] = 1;
openair0_cfg[0].rx_freq[i] = 2680000000;
openair0_cfg[0].tx_freq[i] = 2560000000;
openair0_cfg[0].rx_gain[i] = 61;
openair0_cfg[0].tx_gain[i] = 90;
}
if (openair_dir)
{
openair0_cfg[0].configFilename = malloc(strlen(openair_dir) + strlen(ini_file) + 2);
sprintf(openair0_cfg[0].configFilename, "%s/%s", openair_dir, ini_file);
}
// printf("openair0_cfg[0].configFilename:%s\n", openair0_cfg[0].configFilename);
ret = openair0_device_load( &rf_device, &openair0_cfg[0] );
if (ret != 0){
exit_fun("Error loading device library");
exit(-1);
}
/* Runtime test
* 30 720 000 samples (4 bytes) for 1 sec (30 720 for 1 ms)
*/
puts( "* Starting the device" );
// TIMING
// struct timespec start, stop; // tx_start, tx_stop;
// timing_stats_t rx_stats, tx_stats;
// rx_stats.name = strdup( "RX" );
// tx_stats.name = strdup( "TX" );
// TIMING
nsamp = 307200; // 1 ms
sendbuff = memalign( 128, nb_antennas_rx * sizeof( uint32_t * ) );
sendbuff[0] = memalign( 128, nsamp * sizeof( uint32_t ) );
recvbuff = memalign( 128, nb_antennas_rx * sizeof( uint32_t * ) );
recvbuff[0] = memalign( 128, nsamp * sizeof( uint32_t ) );
// Create dummy buffer
for ( c = 0; c < nsamp; c++ ) {
// sendbuff[0][c] = (c+1);
sendbuff[0][c] = (c+1)*16;
// sendbuff[0][c] = (nsamp-c);
recvbuff[0][c] = 0;
}
GET_TIME_INIT(3);
if ( rf_device.trx_start_func( &rf_device ) < 0 ) {
printf( " device could not be started !\n" );
return -1;
}
// read 30720
// write 30720 ts+2*30720
// if tsread >= 2-307200 -> check expected value + status (RxoVer TxUnder)
rxp[0] = (void*)&rxdata[0][0];
txp[0] = (void*)&txdata[0][0];
timestamp = 0;
nsamp = 30720; // 30720 => 1ms buffer
trx_read_cnt = 100000; // 1 loop => 1ms (10sec=10000; 15min = 900000)
antenna_id = 1;
int diff = 0;
int compare_start = 0;
uint32_t looploop=0;
uint64_t error_cnt = 0;
uint64_t error_ts_start;
for (i = 0; i < trx_read_cnt; i++)
{
// printf("\n\n");
// ret = rf_device.trx_read_func( &rf_device, &timestamp, &(rxp[0][(i*30720)%307200]), nsamp, antenna_id );
// ret = rf_device.trx_read_func( &rf_device, &timestamp, recvbuff[0][(i*30720)%307200], nsamp, antenna_id );
rxp[0] = (void*)&rxdata[0][(i*30720)%307200];
GET_TIME_VAL(0);
ret = rf_device.trx_read_func( &rf_device, &timestamp, rxp, nsamp, antenna_id );
GET_TIME_VAL(1);
if (ret != nsamp)
{
printf("Error: nsamp received (%d) != nsamp required (%d)\n", ret, nsamp);
fflush(stdout);
return (-1);
}
if (!is_first_ts)
{
first_ts = timestamp;
is_first_ts = 1;
}
// printf("%d - trx_read_func ret=%d - ts = %d - @=0x%08lx\n", i, ret, timestamp, rxp[0] );
txp[0] = (void*)&(txdata[0][ ((i*30720)%307200+2*30720)%307200 ]);
// printf(" i=%d @txp[0][0] = 0x%016lx\n", i, &(((uint32_t *)txp[0])[0]) );
// printf(" i=%d @txp[0][1] = 0x%016lx\n", i, &(((uint32_t *)txp[0])[1]) );
for ( c = 0; c < nsamp; c++ )
{
(((uint32_t *)txp[0])[c]) = ( (((timestamp+c+2*30720)<<4)&0x0000FFF0) + (((timestamp+c+2*30720)<<8)&0xFFF00000) );
}
// printf(" txp[0][%d] = 0x%x\n",0,((uint32_t *)(txp[0]))[0]);
// printf(" txp[0][%d] = 0x%x\n",1,((uint32_t *)(txp[0]))[1]);
// printf(" ...\n");
// printf(" txp[0][%d] = 0x%x\n",nsamp-2,((uint32_t *)(txp[0]))[nsamp-2]);
// printf(" txp[0][%d] = 0x%x\n",nsamp-1,((uint32_t *)(txp[0]))[nsamp-1]);
ret = rf_device.trx_write_func( &rf_device, (timestamp+2*30720), txp, nsamp, antenna_id, false );
if (ret != nsamp)
{
printf("Error: nsamp sent (%d) != nsamp required (%d)\n", ret, nsamp);
fflush(stdout);
return (-1);
}
// printf("%d - trx_write_func ret=%d - ts = %d - @=0x%08lx\n", i, ret, (timestamp+2*30720), txp[0] );
if (timestamp >= (first_ts + 2 * 307200))
{
// check Rx Overflow
// check Tx Underflow
// check Expected Value
for ( c = 0; c < nsamp; c++ )
{
// LOOPBACK
#if 1
expected_value = ((timestamp + c)&0xFFFFFF);
received_value = ((uint32_t *)(rxp[0]))[c];
received_value = ((received_value)&0xFFF) + ((received_value>>4)&0xFFF000);
if (compare_start == 0)
{
compare_start = 1;
diff = expected_value - received_value;
}
received_value = (received_value + diff)&0xFFFFFF;
#if 1
if (expected_value != received_value)
{
if(!error_cnt)
error_ts_start = (timestamp + c);
else
{
if (looploop < 32)
printf("%d - %d != %d - ts %d - raw 0x%x - diff %d\n",
looploop,
expected_value, received_value,
(timestamp + c), ((uint32_t *)(rxp[0]))[c],
diff);
looploop++;
}
error_cnt++;
if(!(error_cnt%102400))
printf(" -> error detected : cnt=%d - start=%ld - stop=... diff=%d\n",
error_cnt,
error_ts_start,
diff);
}
else
{
if(error_cnt)
{
printf(" -> error detected : cnt=%d - start=%ld - stop=%ld\n\n",
error_cnt,
error_ts_start,
(timestamp + c) );
looploop=0;
}
error_cnt=0;
}
#endif
#endif
// DEBUG mode 0
#if 0
received_value = ((uint32_t *)(rxp[0]))[c];
received_value = ((received_value)&0xFFF) + ((received_value>>4)&0xFFF000);
received_value = (received_value&0xFFFFFF);
if (compare_start == 0)
{
compare_start = 1;
expected_value = received_value;
}
else
{
expected_value++;
expected_value = (expected_value&0xFFFFFF);
}
if (expected_value != received_value)
{
if(!error_cnt)
error_ts_start = (timestamp + c);
error_cnt++;
}
else
{
if(error_cnt)
{
printf(" -> error detected : cnt=%d - start=%ld - stop=%ld\n\n",
error_cnt,
error_ts_start,
(timestamp + c) );
}
error_cnt=0;
}
// if (expected_value != received_value)
// {
// printf("%d -> %d != %d (ts+c=%ld)(raw=0x%08x)\n",
// looploop,
// expected_value, received_value,
// (timestamp + c),
// ((uint32_t *)(rxp[0]))[c] );
//
// if (received_value)
// expected_value = received_value;
// }
#endif
}
}
}
printf("HwLat Application returns !!!\n");
fflush(stdout);
sleep(1);
printf("\n");
rf_device.trx_end_func( &rf_device );
sleep(1);
free(sendbuff[0]);
free(sendbuff);
free(recvbuff[0]);
free(recvbuff);
exit(0);
return(0);
// puts( "* Frequency modification test" );
// rf_device.trx_set_freq_func( &rf_device, &openair0_cfg[0], 0 );
// puts( "* Gain modification test" );
// rf_device.trx_set_gains_func( &rf_device, &openair0_cfg[0] ); // NOT working (cf. initialization)
//#if LTE_UE
// sleep(1);
GET_TIME_VAL(0);
for (i = 0; i < trx_read_cnt; i++)
{
printf("\n");
ret = rf_device.trx_read_func( &rf_device, &timestamp, rxp, nsamp, antenna_id );
printf("* timestamp=%ld\n", timestamp);
#if 1
for (j = 0; j < nsamp; j++)
{
if ( ((uint32_t *)rxp[0])[j] != ((expected_value + j + timestamp)%307200) )
{
err_cnt++;
printf("rxp[%06d]=0x%08x (expected 0x%08lx)\n", j, ((uint32_t *)rxp[0])[j], ((expected_value + j + timestamp)%307200) );
}
if (err_cnt >= 128)
{
printf("Error: more than 128 expected value failed !\n");
i = (trx_read_cnt - 1);
j = nsamp;
break;
}
}
//expected_value = (expected_value + nsamp)%307200;
expected_value = (expected_value)%307200;
#endif
}
GET_TIME_VAL(1);
//#endif
/* ********** ********** */
/* SYRIQ_CHANNEL_DATA1 */
/* ********** ********** */
#if SYRIQ_CHANNEL_DATA1
// rf_device.trx_get_stats_func( &rf_device );
rf_device.trx_end_func( &rf_device );
printf("\n* rf_device.trx_read_func(%d) x %d: %.6lf s\n\n", nsamp, i, ((TIME_VAL_TO_MS(1) - TIME_VAL_TO_MS(0)))/1000.0 );
// rf_device.trx_get_stats_func( &rf_device );
#if 0
for (i = 0; i < nsamp; i++)
{
// if ( ((uint32_t *)rxp[0])[i] != i)
// {
err_cnt++;
printf("rxp[%06d]=0x%08x (expected 0x%08x)\n", i, ((uint32_t *)rxp[0])[i], i);
// }
// if (err_cnt > 256)
// {
// i = 307200;
// break;
// }
}
#endif
// for (i = 1024-32; i < 1024+32; i++)
// {
//// if ( ((uint32_t *)rxp[0])[i] != i)
//// {
// err_cnt++;
// printf("rxp[%06d]=0x%08x (expected 0x%08x)\n", i, ((uint32_t *)rxp[0])[i], i);
//// }
// if (err_cnt > 256)
// {
// i = 307200;
// break;
// }
// }
printf("SYRIQ CHANNEL DATA1 done !!!\n");
sleep(1);
return(0);
#endif
/* ********** ********** */
/* SYRIQ_CHANNEL_DATA1 */
/* ********** ********** */
timestamp = 0;
ret = rf_device.trx_write_func( &rf_device, timestamp, (void**)sendbuff, nsamp, antenna_id, false );
printf("* rf_device.trx_write_func returns %d\n", ret);
sleep(1);
nsamp = 30720;
numIter = 100000;
for ( c = 0; c < numIter; c++ )
{
fpga_loop ++;
if ( !(fpga_loop % 1000) )
{
printf("\rtest loop %d / %d", fpga_loop, numIter);
fflush(stdout);
}
// printf("* TEST : %08d\n", (c+1));
// measure_time( &rf_device, &start, &stop, &tx_stats, true, 10 );
// ret = rf_device.trx_write_func( &rf_device, timestamp, (void**)sendbuff, nsamp, antenna_id, false );
// printf("* rf_device.trx_write_func returns %d\n", ret);
// measure_time( &rf_device, &start, &stop, &tx_stats, false, 10 );
// sleep(1);
// measure_time( &rf_device, &start, &stop, &tx_stats, true, 10 );
ret = rf_device.trx_read_func( &rf_device, &timestamp, (void**)recvbuff, nsamp, antenna_id );
// measure_time( &rf_device, &start, &stop, &tx_stats, false, 10 );
// Check the data
if (ret > 0)
{
/* ********** ********** */
/* SYRIQ_CHANNEL_TESTER */
/* ********** ********** */
#if SYRIQ_CHANNEL_TESTER
failure = 0;
for (i = 0; i < ret; i++)
{
if ( ((i%1024) == 0) || ((i%1024) == 1) || ((i%1024) == 2) || ((i%1024) == 3) )
{
if ( (recvbuff[0])[i] != (1020 + ((i%1024)+1)) )
{
printf("* ERROR (buff[0])[%d]: %d, expected %d\n", i, (uint32_t)(recvbuff[0])[i], ((i%1024)+1) );
failure = 1;
}
}
else if ( (recvbuff[0])[i] != ((i%1024)+1) )
{
printf("* ERROR (buff[0])[%d]: %d, expected %d\n", i, (uint32_t)(recvbuff[0])[i], ((i%1024)+1) );
failure = 1;
}
else
{
printf("* DONE (buff[0])[%d]: %d, expected %d\n", i, (uint32_t)(recvbuff[0])[i], ((i%1024)+1) );
}
if(failure)
break;
}
if (failure)
printf("* ERROR recv %08d checked FAILURE ret=%d\n", (c+1), ret);
else
{
// printf("* DONE recv %08d checked SUCCESSFULLY ret=%d\n", (c+1), ret);
}
#endif
/* ********** ********** */
/* SYRIQ_CHANNEL_TESTER2*/
/* ********** ********** */
#if SYRIQ_CHANNEL_TESTER2
// printf("* ret=%d timestamp=%ld (%ld)\n", ret, timestamp, (timestamp%307200));
failure = 0;
for (i = 0; i < ret; i++)
{
// printf("* (recvbuff[0])[%d]: %d\n", i, (uint32_t)(recvbuff[0])[i]);
// printf("* timestamp+(i/1024+1)*1024 - 3 + i%1024: %d\n", (timestamp-nsamp+(i/1024+1)*1024 - 3 + i%1024)%307200 );
expected_value = ((((i%1024)+1)/*>>4*/)&0x00000FFF);
if ( ((i%1024) == 0) || ((i%1024) == 1) || ((i%1024) == 2) || ((i%1024) == 3) )
{
expected_value = ((((timestamp-nsamp+(i/1024+1)*1024 - 3 + i%1024))%307200));
if ( (recvbuff[0])[i] != expected_value)
{
if ( (expected_value == 0) && ((recvbuff[0])[i] != 4915200) )
{
printf("* ERROR (buff[0])[%d]: %d, expected %d\n", i, (uint32_t)(recvbuff[0])[i], expected_value );
failure = 1;
}
if ( (expected_value == 0) && ((recvbuff[0])[i] == 4915200) )
{
// printf("* DONE loop in circular buffer\n");
}
}
}
else if ( (recvbuff[0])[i] != expected_value )
{
printf("* ERROR (buff[0])[%d]: %d, expected %d\n", i, (uint32_t)(recvbuff[0])[i], ((i%1024)+1) );
failure = 1;
}
else
{
// printf("* DONE (buff[0])[%d]: %d, expected %d\n", i, (uint32_t)(recvbuff[0])[i], ((i%1024)+1) );
}
// if(failure)
// break;
}
if (failure)
printf("* ERROR recv %08d checked FAILURE ret=%d\n", (c+1), ret);
else
{
// printf("* DONE recv %08d checked SUCCESSFULLY ret=%d\n", (c+1), ret);
}
#endif
#if LOOPBACK
#endif
}
else
{
printf("* ERROR rf_device.trx_read_func returns %d\n", ret);
}
}
printf("\n");
rf_device.trx_end_func( &rf_device );
sleep(1);
free(sendbuff[0]);
free(sendbuff);
free(recvbuff[0]);
free(recvbuff);
exit(0);
// END IS HERE !
rf_device.trx_set_freq_func(&rf_device,&openair0_cfg[0],0);
if (rf_device.trx_start_func(&rf_device) != 0 ) {
printf("Could not start the device\n");
oai_exit=1;
}
while(!oai_exit){
rxp[0] = (void*)&rxdata[0][sub_frame*nb_sample_per_tti];
readBlockSize = rf_device.trx_read_func(&rf_device,
&timestamp,
rxp,
nb_sample_per_tti,
0);
if ( readBlockSize != nb_sample_per_tti )
oai_exit = 1;
sub_frame++;
sub_frame%=10;
if( sub_frame == 0)
frame_rx++;
saif_meas(frame_rx, sub_frame);
}
return(0);
}
File diff suppressed because it is too large Load Diff
+1 -3
View File
@@ -48,7 +48,6 @@
#undef MALLOC //there are two conflicting definitions, so we better make sure we don't use it at all
#include "assertions.h"
#include "msc.h"
#include "PHY/defs_common.h"
#include "PHY/types.h"
#include "PHY/INIT/phy_init.h"
@@ -62,7 +61,6 @@
#include "common/utils/LOG/vcd_signal_dumper.h"
#include "targets/ARCH/COMMON/common_lib.h"
#include "targets/ARCH/ETHERNET/USERSPACE/LIB/ethernet_lib.h"
//#include "PHY/TOOLS/time_meas.h"
/* these variables have to be defined before including ENB_APP/enb_paramdef.h */
static int DEFBANDS[] = {7};
@@ -3071,7 +3069,7 @@ RU_t **RCconfig_RU(int nb_RU,int nb_L1_inst,PHY_VARS_eNB ***eNB,uint64_t *ru_mas
ru[j]->nb_rx = *(RUParamList.paramarray[j][RU_NB_RX_IDX].uptr);
ru[j]->att_tx = *(RUParamList.paramarray[j][RU_ATT_TX_IDX].uptr);
ru[j]->att_rx = *(RUParamList.paramarray[j][RU_ATT_RX_IDX].uptr);
ru[j]->sf_ahead = *(RUParamList.paramarray[j][RU_SF_AHEAD_IDX].uptr);
ru[j]->sf_ahead = *(RUParamList.paramarray[j][RU_SF_AHEAD].uptr);
*ru_mask= (*ru_mask)|(1<<j);
}// j=0..num_rus
}
-13
View File
@@ -34,13 +34,9 @@
#define _GNU_SOURCE /* See feature_test_macros(7) */
#include <sched.h>
#include <common/utils/msc/msc.h>
#undef MALLOC //there are two conflicting definitions, so we better make sure we don't use it at all
#include "assertions.h"
#include "msc.h"
#include "PHY/types.h"
@@ -79,7 +75,6 @@ unsigned short config_frames[4] = {2,9,11,13};
#include "common/utils/LOG/vcd_signal_dumper.h"
#include "UTIL/OPT/opt.h"
#include "enb_config.h"
//#include "PHY/TOOLS/time_meas.h"
#include "create_tasks.h"
@@ -498,8 +493,6 @@ static void init_pdcp(void) {
pdcp_set_rlc_data_req_func(rlc_data_req);
pdcp_set_pdcp_data_ind_func(pdcp_data_ind);
}
} else {
pdcp_set_pdcp_data_ind_func(proto_agent_send_pdcp_data_ind);
}
}
@@ -554,13 +547,7 @@ int main ( int argc, char **argv )
cpuf=get_cpu_freq_GHz();
printf("ITTI init, useMME: %i\n",EPC_MODE_ENABLED);
itti_init(TASK_MAX, tasks_info);
// allows to forward in wireshark L2 protocol for decoding
// initialize mscgen log after ITTI
if (get_softmodem_params()->start_msc) {
load_module_shlib("msc",NULL,0,&msc_interface);
}
MSC_INIT(MSC_E_UTRAN, ADDED_QUEUES_MAX+TASK_MAX);
init_opt();
// to make a graceful exit when ctrl-c is pressed
set_softmodem_sighandler();
-2
View File
@@ -23,14 +23,12 @@
#include "../../ARCH/COMMON/common_lib.h"
//#undef MALLOC
#include "assertions.h"
#include "msc.h"
#include "PHY/types.h"
#include "PHY/defs_eNB.h"
#include "PHY/defs_UE.h"
#include "flexran_agent.h"
#include "s1ap_eNB.h"
#include "SIMULATION/ETH_TRANSPORT/proto.h"
#include "proto_agent.h"
#include "executables/softmodem-common.h"
-24
View File
@@ -815,11 +815,6 @@ static void *UE_thread_rxn_txnp4(void *arg)
pthread_cond_wait( &proc->cond_rxtx, &proc->mutex_rxtx );
}
//printf("Processing sub frqme %d in %s\n", proc->subframe_rx, threadname);
initRefTimes(t2);
initRefTimes(t3);
pickTime(current);
updateTimes(proc->gotIQs, &t2, 10000, "Delay to wake up UE_Thread_Rx (case 2)");
// Process Rx data for one sub-frame
lte_subframe_t sf_type = subframe_select( &UE->frame_parms, proc->subframe_rx);
@@ -886,7 +881,6 @@ static void *UE_thread_rxn_txnp4(void *arg)
if (UE->mode != loop_through_memory)
phy_procedures_UE_S_TX(UE,0,0);
updateTimes(current, &t3, 10000, "Delay to process sub-frame (case 3)");
proc->instance_cnt_rxtx--;
if ( IS_SOFTMODEM_BASICSIM || IS_SOFTMODEM_RFSIM ) {
@@ -1470,12 +1464,6 @@ static void *UE_phy_stub_single_thread_rxn_txnp4(void *arg)
oai_subframe_ind(proc->frame_rx, proc->subframe_rx);
}
//Guessing that the next 4 lines are not needed for the phy_stub mode.
/*initRefTimes(t2);
initRefTimes(t3);
pickTime(current);
updateTimes(proc->gotIQs, &t2, 10000, "Delay to wake up UE_Thread_Rx (case 2)");*/
if (pthread_mutex_lock(&phy_stub_ticking->mutex_single_thread) != 0) {
LOG_E( MAC, "[SCHED][UE] error locking mutex for ue_thread_id %d (mutex_single_thread)\n",ue_thread_id);
exit_fun("nothing to add");
@@ -2225,8 +2213,6 @@ void *UE_thread(void *arg)
LOG_E(PHY,"can't compensate: diff =%d\n", first_symbols);
}
pickTime(gotIQs);
/* 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);
@@ -2264,12 +2250,6 @@ void *UE_thread(void *arg)
}
}
//UE->proc.proc_rxtx[0].gotIQs=readTime(gotIQs);
//UE->proc.proc_rxtx[1].gotIQs=readTime(gotIQs);
for (th_id=0; th_id < RX_NB_TH; th_id++) {
UE->proc.proc_rxtx[th_id].gotIQs=readTime(gotIQs);
}
proc->subframe_rx=sub_frame;
proc->subframe_tx=(sub_frame+4)%10;
proc->frame_tx = proc->frame_rx + (proc->subframe_rx>5?1:0);
@@ -2281,10 +2261,6 @@ void *UE_thread(void *arg)
T(T_UE_MASTER_TICK, T_INT(0), T_INT(proc->frame_rx%1024), T_INT(proc->subframe_rx));
AssertFatal (pthread_cond_signal(&proc->cond_rxtx) ==0,"");
AssertFatal(pthread_mutex_unlock(&proc->mutex_rxtx) ==0,"");
initRefTimes(t1);
initStaticTime(lastTime);
updateTimes(lastTime, &t1, 20000, "Delay between two IQ acquisitions (case 1)");
pickStaticTime(lastTime);
} else {
printf("Processing subframe %d",proc->subframe_rx);
getchar();
-7
View File
@@ -37,7 +37,6 @@
#undef MALLOC //there are two conflicting definitions, so we better make sure we don't use it at all
#include "assertions.h"
#include "msc.h"
#include "PHY/types.h"
@@ -596,12 +595,6 @@ int main( int argc, char **argv ) {
printf("ITTI init\n");
itti_init(TASK_MAX, tasks_info);
// initialize mscgen log after ITTI
if (get_softmodem_params()->start_msc) {
load_module_shlib("msc",NULL,0,&msc_interface);
}
MSC_INIT(MSC_E_UTRAN, ADDED_QUEUES_MAX+TASK_MAX);
init_opt();
ue_id_g = (node_number == 0) ? 0 : node_number-2; //ue_id_g = 0, 1, ...,
if(node_number == 0)
-1
View File
@@ -46,7 +46,6 @@
#undef MALLOC //there are two conflicting definitions, so we better make sure we don't use it at all
#include "assertions.h"
#include "msc.h"
#include "PHY/types.h"
-329
View File
@@ -1,329 +0,0 @@
#!/usr/bin/python
# -*- coding: utf-8 -*-
# The aim of this script is to collect some traces from oai stack and generate a sequence diagram image (png or jpeg).
#
# It is supposed that a protocol name (MSC_NEW_STR) starts with...its name (RRC, MAC, NAS, S1AP, etc) then is followed by an underscore and whatever (RRC_UE, RRC_eNB)
# Like this it is possible to distinguish between PDUS, SDUs or other messages only by reading source ans destination
import sys
import subprocess
import re
import socket
import datetime
from datetime import date
import os, errno
import argparse
parser = argparse.ArgumentParser()
parser.add_argument("--diag_rlc_um", "-u", type=str,help="Try to find RLC protocol diagnostics", default="no")
parser.add_argument("--dir", "-d", type=str,help="Directory where msc logs can be found", default="/tmp")
parser.add_argument("--profile", "-p", type=str,help="E_UTRAN, EPC", default="EPC")
parser.add_argument("--no_message", "-M", type=str,help="Trace PDUs, not messages, SDUs", default="no")
parser.add_argument("--no_pdu", "-P", type=str,help="Trace messages, SDUs, not PDUs", default="no")
parser.add_argument("--no_event", "-E", type=str,help="Do not trace events", default="no")
args = parser.parse_args()
MSCGEN_OUTPUT_TYPE = "png"
MAX_MESSAGES_PER_PAGE = 36
MSC_NEW_STR = '[PROTO]'
MSC_MSG_STR = '[MESSAGE]'
MSC_BOX_STR = '[EVENT]'
# This list is filled as follow : g_proto_names[module_id_int] = (proto_name), example RRC_UE
g_proto_names = []
# This list is filled as follow : g_proto_names[module_id_int] = (basename proto_name) example: RRC
g_proto_types = []
# list of messages
g_messages = {}
# Display color of messages of sending entities
g_display_color = ['\"teal\"', # To check in msc.h: MSC_NAS_UE
'\"red\"', # To check in msc.h: MSC_RRC_UE
'\"red\"', # To check in msc.h: MSC_NAS_UE
'\"red\"', # To check in msc.h: MSC_PDCP_UE
'\"red\"', # To check in msc.h: MSC_RLC_UE
'\"red\"', # To check in msc.h: MSC_MAC_UE
'\"red\"', # To check in msc.h: MSC_PHY_UE
'\"indigo\"', # To check in msc.h: MSC_PHY_ENB
'\"indigo\"', # To check in msc.h: MSC_MAC_ENB
'\"indigo\"', # To check in msc.h: MSC_RLC_ENB
'\"indigo\"', # To check in msc.h: MSC_PDCP_ENB
'\"orange\"', # To check in msc.h: MSC_RRC_ENB
'\"black\"', # To check in msc.h: MSC_IP_ENB
'\"black\"', # To check in msc.h: MSC_S1AP_ENB
'\"black\"', # To check in msc.h: MSC_GTPU_ENB
'\"black\"', # To check in msc.h: MSC_GTPU_SGW
'\"black\"', # To check in msc.h: MSC_S1AP_MME
'\"black\"', # To check in msc.h: MSC_MMEAPP_MME
'\"black\"', # To check in msc.h: MSC_NAS_MME
'\"black\"', # To check in msc.h: MSC_NAS_EMM_MME
'\"black\"', # To check in msc.h: MSC_NAS_ESM_MME
'\"black\"',
'\"black\"',
'\"black\"',
'\"black\"',
'\"black\"',
'\"black\"',
'\"black\"',
'\"black\"',
'\"black\"',
'\"black\"',
'\"black\"',
'\"black\"']
# helper for diagnostic of RLC
g_diag_rlc_sn = {}
g_sequence_generator = 0
g_filenames = []
if "E_UTRAN" == args.profile.strip():
g_filenames = [
args.dir+'/openair.msc.0.log',
args.dir+'/openair.msc.1.log']
elif "EPC" == args.profile.strip():
g_filenames = [
args.dir+'/openair.msc.2.log',
args.dir+'/openair.msc.3.log',
args.dir+'/openair.msc.4.log']
def sequence_number_generator():
global g_sequence_generator
l_seq = g_sequence_generator
g_sequence_generator = g_sequence_generator + 1
return l_seq
def file_is_empty(fpath):
return False if os.path.isfile(fpath) and os.path.getsize(fpath) > 0 else True
def parse_oai_log_files():
global g_entities_dic
global g_entities
global g_messages
global g_final_display_order_list
#open TXT file that contain OAI filtered traces for mscgen
# we may insert diagnostic events
event_id_offset = 0
for filename in g_filenames:
if file_is_empty(filename):
continue
try:
fhandle = open(filename, 'r')
fcontent = fhandle.read()
fhandle.close()
# split file content in lines
lines = fcontent.splitlines()
for line in lines:
print ("INPUT LINE: %s " % line)
if line.strip() != "" and not line.strip().startswith('#'):
partition = line.split(' ',3)
event_id = int(partition[0]) + event_id_offset
event_type = partition[1]
entity_id = int(partition[2])
if MSC_NEW_STR == event_type:
entity_name = partition[3]
if len(g_proto_names) <= entity_id:
for i in range(len(g_proto_names),(entity_id +1)):
g_proto_names.append("NotDeclared")
g_proto_types.append("NotDeclared")
g_proto_names[entity_id] = entity_name
partition_name1 = entity_name.split('_',1);
partition_name2 = partition_name1[0].split('-',1);
partition_name3 = partition_name2[0].split();
g_proto_types[entity_id] = partition_name3
print ("entity name %s , entity type %s" % (g_proto_names[entity_id],g_proto_types[entity_id]) )
# if line is a trace of a message between 2 protocol entities or layers
elif MSC_MSG_STR == event_type:
#print ("partition[3]:%s" % partition[3])
sub_partition = partition[3].split(' ',4)
arrow = sub_partition[0]
entity2_id = int(sub_partition[1])
mac = int(sub_partition[2])
time = sub_partition[3]
message = sub_partition[4]
Message = {}
Message['mac'] = mac
Message['time'] = time
Message['message'] = message
Message['line_color'] = g_display_color[entity_id]
Message['text_color'] = g_display_color[entity_id]
if arrow == '<-':
if "yes" == args.diag_rlc_um.strip() and "DATA SN " in message and "RB UM " in message:
rlc_key = re.match(r"[^[]*\[([^]]*)\]", message).groups()[0]
sn_info = message.partition("SN")[2]
if sn_info.strip() != "":
sn_str = sn_info.strip().partition(" ")[0]
sn = int(sn_str)
if rlc_key in g_diag_rlc_sn:
previous_sn = g_diag_rlc_sn[rlc_key]
if (previous_sn + 1) % 1024 != sn:
print ("DIAG missing SN: %s " % line)
MessageDiag = {}
MessageDiag['type'] = "box"
MessageDiag['tx'] = entity_id
MessageDiag['rx'] = entity_id
MessageDiag['discarded'] = False
MessageDiag['time'] = time
MessageDiag['message'] = "Missing SN "+ sn_str + " detected"
MessageDiag['line_color'] = '\"red\"'
MessageDiag['text_color'] = '\"red\"'
g_messages[event_id + event_id_offset] = MessageDiag
event_id_offset = event_id_offset + 1
g_diag_rlc_sn[rlc_key] = int(sn)
Message['type'] = "rx"
Message['tx'] = entity2_id
Message['rx'] = entity_id
Message['discarded'] = False
g_messages[event_id + event_id_offset] = Message
elif arrow == '->':
Message['type'] = "tx"
Message['tx'] = entity_id
Message['rx'] = entity2_id
Message['discarded'] = False
g_messages[event_id + event_id_offset] = Message
elif arrow == 'x-':
Message['type'] = "rx"
Message['tx'] = entity2_id
Message['rx'] = entity_id
Message['discarded'] = True
g_messages[event_id + event_id_offset] = Message
elif arrow == '-x':
Message['type'] = "tx"
Message['tx'] = entity_id
Message['rx'] = entity2_id
Message['discarded'] = True
g_messages[event_id + event_id_offset] = Message
elif MSC_BOX_STR == event_type:
sub_partition = partition[3].split(' ',1)
time = sub_partition[0]
message = sub_partition[1]
Message = {}
Message['type'] = "box"
Message['tx'] = entity_id
Message['rx'] = entity_id
Message['discarded'] = False
Message['time'] = time
Message['message'] = message
Message['line_color'] = g_display_color[entity_id]
Message['text_color'] = g_display_color[entity_id]
g_messages[event_id + event_id_offset] = Message
except IOError, e:
print ("File %s INPUT LINE: %s " % (filename, line))
print 'err message'
#print("------------------------------------")
#print (" %s " % ( g_messages ) )
# for event_id_int in sorted(g_messages.iterkeys()):
def msc_chart_write_header(fileP):
global g_final_display_order_list
fileP.write("msc {\n")
fileP.write("width = \"2048\";\n")
entity_line_list_str = ''
#print (" %s " % ( g_proto_names ) )
for entity in g_proto_names:
if entity != 'NotDeclared':
entity_line_list_str = entity_line_list_str + ' ' + entity + ','
entity_line_list_str = entity_line_list_str.rstrip().strip(',')
fileP.write(" %s;\n" % (entity_line_list_str))
def msc_chart_write_footer(fileP):
fileP.write("\n}\n")
def msc_chart_generate(file_nameP):
global MSCGEN_OUTPUT_TYPE
print "Generating sequence diagram for ",file_nameP
command_line = "mscgen -T " + MSCGEN_OUTPUT_TYPE + " -i " + file_nameP
fi,fo,fe=os.popen3(command_line)
for i in fe.readlines():
print "error:",i
def get_new_file_descriptor():
global g_base_file_name
global g_page_index
l_file_name = g_base_file_name + str(g_page_index)+'.txt'
l_file = open(l_file_name, "wb")
print "Generating mscgen input file ",l_file_name;
return l_file
###### MAIN STAR HERE #################
parse_oai_log_files()
g_page_index = 0
g_message_index = 0
g_now = datetime.datetime.now()
g_now_formated = 'mscgen_' + args.profile.strip() + '_'+ g_now.strftime("%Y-%m-%d_%H.%M.%S")
#g_currentdir = os.curdir
g_resultdir = os.path.join(args.dir, g_now_formated)
os.mkdir(g_resultdir)
os.chdir(g_resultdir)
g_base_file_name = args.profile.strip() + '_mscgen_page_'
g_file = get_new_file_descriptor()
msc_chart_write_header(g_file)
for event_id_int in sorted(g_messages.iterkeys()):
message = g_messages[event_id_int]
if 'tx' in message['type']:
if "yes" == args.no_message.strip():
if g_proto_types[message['tx']] != g_proto_types[message['rx']]:
continue
if "yes" == args.no_pdu.strip():
if g_proto_types[message['tx']] == g_proto_types[message['rx']]:
continue
g_file.write(" %s=>%s [ label = \"(%d|%s) %s\", linecolour=%s , textcolour=%s ] ;\n" % (g_proto_names[message['tx']], g_proto_names[message['rx']], event_id_int, message['time'], message['message'], message['line_color'], message['text_color']))
elif 'rx' in message['type']:
if "yes" == args.no_message.strip():
if g_proto_types[message['tx']] != g_proto_types[message['rx']]:
continue
if "yes" == args.no_pdu.strip():
if g_proto_types[message['tx']] == g_proto_types[message['rx']]:
continue
g_file.write(" %s<=%s [ label = \"(%d|%s) %s\", linecolour=%s , textcolour=%s ] ;\n" % (g_proto_names[message['rx']], g_proto_names[message['tx']], event_id_int, message['time'], message['message'], message['line_color'], message['text_color']))
elif 'box' in message['type']:
if "yes" == args.no_event.strip():
continue
g_file.write(" %s note %s [ label = \"%s\", textcolour=%s ] ;\n" % (g_proto_names[message['tx']], g_proto_names[message['rx']], message['message'], message['text_color']))
g_message_index = g_message_index + 1
if ((g_message_index % MAX_MESSAGES_PER_PAGE) == 0):
msc_chart_write_footer(g_file)
g_file.close()
msc_chart_generate(g_file.name)
g_page_index = g_page_index + 1
g_file = get_new_file_descriptor()
msc_chart_write_header(g_file)
msc_chart_write_footer(g_file)
g_file.close()
msc_chart_generate(g_file.name)