Merge remote-tracking branch 'oai/develop' into oai-integration
Conflicts: openair1/SCHED/phy_procedures_lte_eNb.c openair2/LAYER2/MAC/eNB_scheduler.c
This commit is contained in:
@@ -99,6 +99,7 @@ int load_lib(openair0_device *device, openair0_config_t *openair0_cfg, eth_param
|
||||
void *lib_handle;
|
||||
oai_device_initfunc_t dp ;
|
||||
oai_transport_initfunc_t tp ;
|
||||
int ret=0;
|
||||
|
||||
if (flag == BBU_LOCAL_RADIO_HEAD) {
|
||||
lib_handle = dlopen(OAI_RF_LIBNAME, RTLD_LAZY);
|
||||
@@ -111,9 +112,9 @@ int load_lib(openair0_device *device, openair0_config_t *openair0_cfg, eth_param
|
||||
dp = dlsym(lib_handle,"device_init");
|
||||
|
||||
if (dp != NULL ) {
|
||||
if (dp(device,openair0_cfg)!=0) {
|
||||
fprintf(stderr,"Error initializing device\n");
|
||||
return -1;
|
||||
ret = dp(device,openair0_cfg);
|
||||
if (ret<0) {
|
||||
fprintf(stderr, "%s %d:oai device intialization failed %s\n", __FILE__, __LINE__, dlerror());
|
||||
}
|
||||
} else {
|
||||
fprintf(stderr, "%s %d:oai device intializing function not found %s\n", __FILE__, __LINE__, dlerror());
|
||||
@@ -137,14 +138,14 @@ int load_lib(openair0_device *device, openair0_config_t *openair0_cfg, eth_param
|
||||
}
|
||||
}
|
||||
|
||||
return 0;
|
||||
return ret;
|
||||
}
|
||||
|
||||
|
||||
|
||||
int openair0_device_load(openair0_device *device, openair0_config_t *openair0_cfg) {
|
||||
|
||||
int rc;
|
||||
int rc=0;
|
||||
//ToDo: EXMIMO harmonization is not complete. That is the reason for this ifdef
|
||||
#ifdef EXMIMO
|
||||
int device_init(openair0_device *device, openair0_config_t *openair0_cfg);
|
||||
|
||||
@@ -55,6 +55,10 @@
|
||||
# include <immintrin.h>
|
||||
#endif
|
||||
|
||||
#ifdef __arm__
|
||||
# include <arm_neon.h>
|
||||
#endif
|
||||
|
||||
/** @addtogroup _USRP_PHY_RF_INTERFACE_
|
||||
* @{
|
||||
*/
|
||||
@@ -313,6 +317,7 @@ int trx_usrp_set_freq(openair0_device* device, openair0_config_t *openair0_cfg,
|
||||
|
||||
usrp_state_t *s = (usrp_state_t*)device->priv;
|
||||
|
||||
printf("Setting USRP TX Freq %f, RX Freq %f\n",openair0_cfg[0].tx_freq[0],openair0_cfg[0].rx_freq[0]);
|
||||
s->usrp->set_tx_freq(openair0_cfg[0].tx_freq[0]);
|
||||
s->usrp->set_rx_freq(openair0_cfg[0].rx_freq[0]);
|
||||
|
||||
@@ -597,10 +602,10 @@ extern "C" {
|
||||
openair0_cfg[0].rx_gain_calib_table = calib_table_b210_38;
|
||||
bw_gain_adjust=1;
|
||||
}
|
||||
|
||||
switch ((int)openair0_cfg[0].sample_rate) {
|
||||
case 30720000:
|
||||
s->usrp->set_master_clock_rate(30.72e6);
|
||||
// from usrp_time_offset
|
||||
openair0_cfg[0].samples_per_packet = 4096;
|
||||
openair0_cfg[0].tx_sample_advance = 115;
|
||||
openair0_cfg[0].tx_bw = 20e6;
|
||||
@@ -608,7 +613,7 @@ extern "C" {
|
||||
openair0_cfg[0].tx_scheduling_advance = 11*openair0_cfg[0].samples_per_packet;
|
||||
break;
|
||||
case 23040000:
|
||||
s->usrp->set_master_clock_rate(46.08e6);
|
||||
s->usrp->set_master_clock_rate(23.04e6); //to be checked
|
||||
openair0_cfg[0].samples_per_packet = 2048;
|
||||
openair0_cfg[0].tx_sample_advance = 113;
|
||||
openair0_cfg[0].tx_bw = 20e6;
|
||||
@@ -616,27 +621,27 @@ extern "C" {
|
||||
openair0_cfg[0].tx_scheduling_advance = 8*openair0_cfg[0].samples_per_packet;
|
||||
break;
|
||||
case 15360000:
|
||||
s->usrp->set_master_clock_rate(30.72e6);
|
||||
s->usrp->set_master_clock_rate(30.72e06);
|
||||
openair0_cfg[0].samples_per_packet = 2048;
|
||||
openair0_cfg[0].tx_sample_advance = 113;
|
||||
openair0_cfg[0].tx_bw = 10e6;
|
||||
openair0_cfg[0].rx_bw = 10e6;
|
||||
openair0_cfg[0].tx_scheduling_advance = 5*openair0_cfg[0].samples_per_packet;
|
||||
openair0_cfg[0].tx_sample_advance = 103;
|
||||
openair0_cfg[0].tx_bw = 20e6;
|
||||
openair0_cfg[0].rx_bw = 20e6;
|
||||
openair0_cfg[0].tx_scheduling_advance = 10240;
|
||||
break;
|
||||
case 7680000:
|
||||
s->usrp->set_master_clock_rate(30.72e6);
|
||||
openair0_cfg[0].samples_per_packet = 1024;
|
||||
openair0_cfg[0].tx_sample_advance = 70;//103;
|
||||
openair0_cfg[0].tx_bw = 5e6;
|
||||
openair0_cfg[0].rx_bw = 5e6;
|
||||
openair0_cfg[0].tx_sample_advance = 80;
|
||||
openair0_cfg[0].tx_bw = 20e6;
|
||||
openair0_cfg[0].rx_bw = 20e6;
|
||||
openair0_cfg[0].tx_scheduling_advance = 5*openair0_cfg[0].samples_per_packet;
|
||||
break;
|
||||
case 1920000:
|
||||
s->usrp->set_master_clock_rate(30.72e6);
|
||||
s->usrp->set_master_clock_rate(7.68e6);
|
||||
openair0_cfg[0].samples_per_packet = 256;
|
||||
openair0_cfg[0].tx_sample_advance = 40;
|
||||
openair0_cfg[0].tx_bw = 1.25e6;
|
||||
openair0_cfg[0].rx_bw = 1.25e6;
|
||||
openair0_cfg[0].tx_bw = 20e6;
|
||||
openair0_cfg[0].rx_bw = 20e6;
|
||||
openair0_cfg[0].tx_scheduling_advance = 8*openair0_cfg[0].samples_per_packet;
|
||||
break;
|
||||
default:
|
||||
@@ -655,8 +660,8 @@ extern "C" {
|
||||
for(i=0;i<s->usrp->get_rx_num_channels();i++) {
|
||||
if (i<openair0_cfg[0].rx_num_channels) {
|
||||
s->usrp->set_rx_rate(openair0_cfg[0].sample_rate,i);
|
||||
s->usrp->set_rx_bandwidth(openair0_cfg[0].rx_bw,i);
|
||||
printf("Setting rx freq/gain on channel %lu/%lu : BW %f (readback %f)\n",i,s->usrp->get_rx_num_channels(),openair0_cfg[0].rx_bw/1e6,s->usrp->get_rx_bandwidth(i)/1e6);
|
||||
//s->usrp->set_rx_bandwidth(openair0_cfg[0].rx_bw,i);
|
||||
//printf("Setting rx freq/gain on channel %lu/%lu : BW %f (readback %f)\n",i,s->usrp->get_rx_num_channels(),openair0_cfg[0].rx_bw/1e6,s->usrp->get_rx_bandwidth(i)/1e6);
|
||||
s->usrp->set_rx_freq(openair0_cfg[0].rx_freq[i],i);
|
||||
set_rx_gain_offset(&openair0_cfg[0],i,bw_gain_adjust);
|
||||
|
||||
@@ -676,8 +681,8 @@ extern "C" {
|
||||
for(i=0;i<s->usrp->get_tx_num_channels();i++) {
|
||||
if (i<openair0_cfg[0].tx_num_channels) {
|
||||
s->usrp->set_tx_rate(openair0_cfg[0].sample_rate,i);
|
||||
s->usrp->set_tx_bandwidth(openair0_cfg[0].tx_bw,i);
|
||||
printf("Setting tx freq/gain on channel %lu/%lu: BW %f (readback %f)\n",i,s->usrp->get_tx_num_channels(),openair0_cfg[0].tx_bw/1e6,s->usrp->get_tx_bandwidth(i)/1e6);
|
||||
//s->usrp->set_tx_bandwidth(openair0_cfg[0].tx_bw,i);
|
||||
//printf("Setting tx freq/gain on channel %lu/%lu: BW %f (readback %f)\n",i,s->usrp->get_tx_num_channels(),openair0_cfg[0].tx_bw/1e6,s->usrp->get_tx_bandwidth(i)/1e6);
|
||||
s->usrp->set_tx_freq(openair0_cfg[0].tx_freq[i],i);
|
||||
s->usrp->set_tx_gain(openair0_cfg[0].tx_gain[i],i);
|
||||
}
|
||||
@@ -686,6 +691,8 @@ extern "C" {
|
||||
|
||||
// display USRP settings
|
||||
std::cout << boost::format("Actual master clock: %fMHz...") % (s->usrp->get_master_clock_rate()/1e6) << std::endl;
|
||||
|
||||
sleep(1);
|
||||
|
||||
// create tx & rx streamer
|
||||
uhd::stream_args_t stream_args_rx("sc16", "sc16");
|
||||
@@ -704,6 +711,20 @@ extern "C" {
|
||||
std::cout << boost::format("tx_max_num_samps %u") % (s->tx_stream->get_max_num_samps()) << std::endl;
|
||||
|
||||
|
||||
/* Setting TX/RX BW after streamers are created due to USRP calibration issue */
|
||||
for(i=0;i<s->usrp->get_tx_num_channels();i++) {
|
||||
if (i<openair0_cfg[0].tx_num_channels) {
|
||||
s->usrp->set_tx_bandwidth(openair0_cfg[0].tx_bw,i);
|
||||
printf("Setting tx freq/gain on channel %lu/%lu: BW %f (readback %f)\n",i,s->usrp->get_tx_num_channels(),openair0_cfg[0].tx_bw/1e6,s->usrp->get_tx_bandwidth(i)/1e6);
|
||||
}
|
||||
}
|
||||
for(i=0;i<s->usrp->get_rx_num_channels();i++) {
|
||||
if (i<openair0_cfg[0].rx_num_channels) {
|
||||
s->usrp->set_rx_bandwidth(openair0_cfg[0].rx_bw,i);
|
||||
printf("Setting rx freq/gain on channel %lu/%lu : BW %f (readback %f)\n",i,s->usrp->get_rx_num_channels(),openair0_cfg[0].rx_bw/1e6,s->usrp->get_rx_bandwidth(i)/1e6);
|
||||
}
|
||||
}
|
||||
|
||||
s->usrp->set_time_now(uhd::time_spec_t(0.0));
|
||||
|
||||
|
||||
|
||||
@@ -133,7 +133,7 @@ eNBs =
|
||||
|
||||
|
||||
////////// MME parameters:
|
||||
mme_ip_address = ( { ipv4 = "192.168.12.11";
|
||||
mme_ip_address = ( { ipv4 = "127.0.0.3";
|
||||
ipv6 = "192:168:30::17";
|
||||
active = "yes";
|
||||
preference = "ipv4";
|
||||
@@ -142,11 +142,11 @@ eNBs =
|
||||
|
||||
NETWORK_INTERFACES :
|
||||
{
|
||||
ENB_INTERFACE_NAME_FOR_S1_MME = "eth0";
|
||||
ENB_IPV4_ADDRESS_FOR_S1_MME = "192.168.12.212/24";
|
||||
ENB_INTERFACE_NAME_FOR_S1_MME = "lo";
|
||||
ENB_IPV4_ADDRESS_FOR_S1_MME = "127.0.0.2/24";
|
||||
|
||||
ENB_INTERFACE_NAME_FOR_S1U = "eth0";
|
||||
ENB_IPV4_ADDRESS_FOR_S1U = "192.168.12.212/24";
|
||||
ENB_INTERFACE_NAME_FOR_S1U = "lo";
|
||||
ENB_IPV4_ADDRESS_FOR_S1U = "127.0.0.4/24";
|
||||
ENB_PORT_FOR_S1U = 2152; # Spec 2152
|
||||
};
|
||||
|
||||
|
||||
@@ -17,7 +17,7 @@ eNBs =
|
||||
|
||||
mobile_country_code = "208";
|
||||
|
||||
mobile_network_code = "92";
|
||||
mobile_network_code = "93";
|
||||
|
||||
////////// Physical parameters:
|
||||
|
||||
@@ -36,7 +36,7 @@ eNBs =
|
||||
nb_antennas_tx = 1;
|
||||
nb_antennas_rx = 1;
|
||||
tx_gain = 90;
|
||||
rx_gain = 135;
|
||||
rx_gain = 125;
|
||||
prach_root = 0;
|
||||
prach_config_index = 0;
|
||||
prach_high_speed = "DISABLE";
|
||||
@@ -131,7 +131,7 @@ eNBs =
|
||||
};
|
||||
|
||||
////////// MME parameters:
|
||||
mme_ip_address = ( { ipv4 = "192.168.13.11";
|
||||
mme_ip_address = ( { ipv4 = "192.168.12.11";
|
||||
ipv6 = "192:168:30::17";
|
||||
active = "yes";
|
||||
preference = "ipv4";
|
||||
@@ -141,10 +141,10 @@ eNBs =
|
||||
NETWORK_INTERFACES :
|
||||
{
|
||||
ENB_INTERFACE_NAME_FOR_S1_MME = "eth0";
|
||||
ENB_IPV4_ADDRESS_FOR_S1_MME = "192.168.13.10/24";
|
||||
ENB_IPV4_ADDRESS_FOR_S1_MME = "192.168.12.215/24";
|
||||
|
||||
ENB_INTERFACE_NAME_FOR_S1U = "eth0";
|
||||
ENB_IPV4_ADDRESS_FOR_S1U = "192.168.13.10/24";
|
||||
ENB_IPV4_ADDRESS_FOR_S1U = "192.168.12.215/24";
|
||||
ENB_PORT_FOR_S1U = 2152; # Spec 2152
|
||||
};
|
||||
|
||||
|
||||
@@ -30,7 +30,7 @@ eNBs =
|
||||
downlink_frequency = 2660000000L;
|
||||
uplink_frequency_offset = -120000000;
|
||||
Nid_cell = 0;
|
||||
N_RB_DL = 25;
|
||||
N_RB_DL = 50;
|
||||
Nid_cell_mbsfn = 0;
|
||||
nb_antennas_tx = 1;
|
||||
nb_antennas_rx = 1;
|
||||
|
||||
@@ -36,7 +36,7 @@ eNBs =
|
||||
nb_antennas_tx = 1;
|
||||
nb_antennas_rx = 1;
|
||||
tx_gain = 90;
|
||||
rx_gain = 127;
|
||||
rx_gain = 125;
|
||||
prach_root = 0;
|
||||
prach_config_index = 0;
|
||||
prach_high_speed = "DISABLE";
|
||||
@@ -66,7 +66,7 @@ eNBs =
|
||||
|
||||
pusch_p0_Nominal = -90;
|
||||
pusch_alpha = "AL1";
|
||||
pucch_p0_Nominal = -108;
|
||||
pucch_p0_Nominal = -100;
|
||||
msg3_delta_Preamble = 6;
|
||||
pucch_deltaF_Format1 = "deltaF2";
|
||||
pucch_deltaF_Format1b = "deltaF3";
|
||||
@@ -140,10 +140,10 @@ eNBs =
|
||||
NETWORK_INTERFACES :
|
||||
{
|
||||
ENB_INTERFACE_NAME_FOR_S1_MME = "eth0";
|
||||
ENB_IPV4_ADDRESS_FOR_S1_MME = "192.168.12.213/24";
|
||||
ENB_IPV4_ADDRESS_FOR_S1_MME = "192.168.12.215/24";
|
||||
|
||||
ENB_INTERFACE_NAME_FOR_S1U = "eth0";
|
||||
ENB_IPV4_ADDRESS_FOR_S1U = "192.168.12.213/24";
|
||||
ENB_IPV4_ADDRESS_FOR_S1U = "192.168.12.215/24";
|
||||
ENB_PORT_FOR_S1U = 2152; # Spec 2152
|
||||
};
|
||||
|
||||
|
||||
@@ -28,7 +28,7 @@ eNBs =
|
||||
tdd_config_s = 0;
|
||||
prefix_type = "NORMAL";
|
||||
eutra_band = 7;
|
||||
downlink_frequency = 2680000000L;
|
||||
downlink_frequency = 2660000000L;
|
||||
uplink_frequency_offset = -120000000;
|
||||
Nid_cell = 0;
|
||||
N_RB_DL = 50;
|
||||
@@ -64,9 +64,9 @@ eNBs =
|
||||
srs_ackNackST =;
|
||||
srs_MaxUpPts =;*/
|
||||
|
||||
pusch_p0_Nominal = -90;
|
||||
pusch_p0_Nominal = -96;
|
||||
pusch_alpha = "AL1";
|
||||
pucch_p0_Nominal = -96;
|
||||
pucch_p0_Nominal = -103;
|
||||
msg3_delta_Preamble = 6;
|
||||
pucch_deltaF_Format1 = "deltaF2";
|
||||
pucch_deltaF_Format1b = "deltaF3";
|
||||
@@ -82,7 +82,7 @@ eNBs =
|
||||
rach_messagePowerOffsetGroupB = ;
|
||||
*/
|
||||
rach_powerRampingStep = 4;
|
||||
rach_preambleInitialReceivedTargetPower = -108;
|
||||
rach_preambleInitialReceivedTargetPower = -104;
|
||||
rach_preambleTransMax = 10;
|
||||
rach_raResponseWindowSize = 10;
|
||||
rach_macContentionResolutionTimer = 48;
|
||||
@@ -130,7 +130,7 @@ eNBs =
|
||||
};
|
||||
|
||||
////////// MME parameters:
|
||||
mme_ip_address = ( { ipv4 = "192.168.12.11";
|
||||
mme_ip_address = ( { ipv4 = "127.0.0.3";
|
||||
ipv6 = "192:168:30::17";
|
||||
active = "yes";
|
||||
preference = "ipv4";
|
||||
@@ -139,11 +139,11 @@ eNBs =
|
||||
|
||||
NETWORK_INTERFACES :
|
||||
{
|
||||
ENB_INTERFACE_NAME_FOR_S1_MME = "eth0";
|
||||
ENB_IPV4_ADDRESS_FOR_S1_MME = "192.168.12.215/24";
|
||||
ENB_INTERFACE_NAME_FOR_S1_MME = "lo";
|
||||
ENB_IPV4_ADDRESS_FOR_S1_MME = "127.0.0.2/24";
|
||||
|
||||
ENB_INTERFACE_NAME_FOR_S1U = "eth0";
|
||||
ENB_IPV4_ADDRESS_FOR_S1U = "192.168.12.215/24";
|
||||
ENB_INTERFACE_NAME_FOR_S1U = "lo";
|
||||
ENB_IPV4_ADDRESS_FOR_S1U = "127.0.0.4/24";
|
||||
ENB_PORT_FOR_S1U = 2152; # Spec 2152
|
||||
};
|
||||
|
||||
|
||||
@@ -64,9 +64,9 @@ eNBs =
|
||||
srs_ackNackST =;
|
||||
srs_MaxUpPts =;*/
|
||||
|
||||
pusch_p0_Nominal = -80; /*-85;*/
|
||||
pusch_p0_Nominal = -90; /*-85;*/
|
||||
pusch_alpha = "AL1";
|
||||
pucch_p0_Nominal = -108; /* -108 */
|
||||
pucch_p0_Nominal = -100; /* -108 */
|
||||
msg3_delta_Preamble = 6;
|
||||
pucch_deltaF_Format1 = "deltaF2";
|
||||
pucch_deltaF_Format1b = "deltaF3";
|
||||
|
||||
@@ -17,7 +17,7 @@ eNBs =
|
||||
|
||||
mobile_country_code = "208";
|
||||
|
||||
mobile_network_code = "92";
|
||||
mobile_network_code = "93";
|
||||
|
||||
////////// Physical parameters:
|
||||
|
||||
@@ -133,43 +133,41 @@ eNBs =
|
||||
|
||||
|
||||
////////// MME parameters:
|
||||
mme_ip_address = ( { ipv4 = "192.168.12.170";
|
||||
mme_ip_address = ( { ipv4 = "192.168.12.11";
|
||||
ipv6 = "192:168:30::17";
|
||||
active = "yes";
|
||||
preference = "ipv4";
|
||||
}
|
||||
);
|
||||
|
||||
rrh_gw_config = (
|
||||
{
|
||||
local_if_name = "eth0";
|
||||
#remote_address = "169.254.10.158";
|
||||
#local_address = "169.254.8.15";
|
||||
remote_address = "74:d4:35:cc:88:e3";
|
||||
local_address = "74:d4:35:cc:88:d1";
|
||||
local_port = 50000; #for raw option local port must be the same to remote
|
||||
remote_port = 50000;
|
||||
rrh_gw_active = "yes";
|
||||
tr_preference = "raw";
|
||||
rf_preference = "usrp_b200";
|
||||
iq_txshift = 4;
|
||||
tx_sample_advance = 70;
|
||||
tx_scheduling_advance = 9;
|
||||
|
||||
}
|
||||
);
|
||||
|
||||
NETWORK_INTERFACES :
|
||||
{
|
||||
ENB_INTERFACE_NAME_FOR_S1_MME = "eth4";
|
||||
ENB_IPV4_ADDRESS_FOR_S1_MME = "192.168.12.240/24";
|
||||
|
||||
ENB_INTERFACE_NAME_FOR_S1U = "eth4";
|
||||
|
||||
ENB_IPV4_ADDRESS_FOR_S1U = "192.168.12.240/24";
|
||||
ENB_INTERFACE_NAME_FOR_S1_MME = "eth3";
|
||||
ENB_IPV4_ADDRESS_FOR_S1_MME = "192.168.12.215/24";
|
||||
ENB_INTERFACE_NAME_FOR_S1U = "eth3";
|
||||
ENB_IPV4_ADDRESS_FOR_S1U = "192.168.12.215/24";
|
||||
ENB_PORT_FOR_S1U = 2152; # Spec 2152
|
||||
};
|
||||
|
||||
rrh_gw_config = (
|
||||
{
|
||||
local_if_name = "eth0";
|
||||
#remote_address = "169.254.10.158";
|
||||
#local_address = "169.254.8.15";
|
||||
remote_address = "74:d4:35:cc:88:e3";
|
||||
local_address = "74:d4:35:cc:88:d1";
|
||||
local_port = 50000; #for raw option local port must be the same to remote
|
||||
remote_port = 50000;
|
||||
rrh_gw_active = "yes";
|
||||
tr_preference = "raw";
|
||||
rf_preference = "usrp_b200";
|
||||
iq_txshift = 4;
|
||||
tx_sample_advance = 70;
|
||||
tx_scheduling_advance = 9;
|
||||
}
|
||||
);
|
||||
|
||||
log_config :
|
||||
{
|
||||
global_log_level ="info";
|
||||
|
||||
@@ -17,52 +17,52 @@ eNBs =
|
||||
|
||||
mobile_country_code = "208";
|
||||
|
||||
mobile_network_code = "95";
|
||||
mobile_network_code = "93";
|
||||
|
||||
////////// Physical parameters:
|
||||
|
||||
component_carriers = (
|
||||
{
|
||||
frame_type = "FDD";
|
||||
tdd_config = 3;
|
||||
tdd_config_s = 0;
|
||||
prefix_type = "NORMAL";
|
||||
eutra_band = 7;
|
||||
downlink_frequency = 2685000000L;
|
||||
uplink_frequency_offset = -120000000;
|
||||
Nid_cell = 0;
|
||||
N_RB_DL = 25;
|
||||
Nid_cell_mbsfn = 0;
|
||||
nb_antennas_tx = 1;
|
||||
nb_antennas_rx = 1;
|
||||
tx_gain = 90;
|
||||
rx_gain = 125;
|
||||
prach_root = 0;
|
||||
prach_config_index = 0;
|
||||
prach_high_speed = "DISABLE";
|
||||
prach_zero_correlation = 1;
|
||||
prach_freq_offset = 2;
|
||||
pucch_delta_shift = 1;
|
||||
pucch_nRB_CQI = 1;
|
||||
pucch_nCS_AN = 0;
|
||||
pucch_n1_AN = 32;
|
||||
pdsch_referenceSignalPower = -29;
|
||||
pdsch_p_b = 0;
|
||||
pusch_n_SB = 1;
|
||||
pusch_enable64QAM = "DISABLE";
|
||||
pusch_hoppingMode = "interSubFrame";
|
||||
pusch_hoppingOffset = 0;
|
||||
pusch_groupHoppingEnabled = "ENABLE";
|
||||
pusch_groupAssignment = 0;
|
||||
pusch_sequenceHoppingEnabled = "DISABLE";
|
||||
pusch_nDMRS1 = 1;
|
||||
phich_duration = "NORMAL";
|
||||
phich_resource = "ONESIXTH";
|
||||
srs_enable = "DISABLE";
|
||||
/* srs_BandwidthConfig =;
|
||||
srs_SubframeConfig =;
|
||||
srs_ackNackST =;
|
||||
srs_MaxUpPts =;*/
|
||||
frame_type = "FDD";
|
||||
tdd_config = 3;
|
||||
tdd_config_s = 0;
|
||||
prefix_type = "NORMAL";
|
||||
eutra_band = 7;
|
||||
downlink_frequency = 2680000000L;
|
||||
uplink_frequency_offset = -120000000;
|
||||
Nid_cell = 0;
|
||||
N_RB_DL = 25;
|
||||
Nid_cell_mbsfn = 0;
|
||||
nb_antennas_tx = 1;
|
||||
nb_antennas_rx = 1;
|
||||
tx_gain = 90;
|
||||
rx_gain = 125;
|
||||
prach_root = 0;
|
||||
prach_config_index = 0;
|
||||
prach_high_speed = "DISABLE";
|
||||
prach_zero_correlation = 1;
|
||||
prach_freq_offset = 2;
|
||||
pucch_delta_shift = 1;
|
||||
pucch_nRB_CQI = 1;
|
||||
pucch_nCS_AN = 0;
|
||||
pucch_n1_AN = 32;
|
||||
pdsch_referenceSignalPower = -29;
|
||||
pdsch_p_b = 0;
|
||||
pusch_n_SB = 1;
|
||||
pusch_enable64QAM = "DISABLE";
|
||||
pusch_hoppingMode = "interSubFrame";
|
||||
pusch_hoppingOffset = 0;
|
||||
pusch_groupHoppingEnabled = "ENABLE";
|
||||
pusch_groupAssignment = 0;
|
||||
pusch_sequenceHoppingEnabled = "DISABLE";
|
||||
pusch_nDMRS1 = 1;
|
||||
phich_duration = "NORMAL";
|
||||
phich_resource = "ONESIXTH";
|
||||
srs_enable = "DISABLE";
|
||||
/* srs_BandwidthConfig =;
|
||||
srs_SubframeConfig =;
|
||||
srs_ackNackST =;
|
||||
srs_MaxUpPts =;*/
|
||||
|
||||
pusch_p0_Nominal = -90;
|
||||
pusch_alpha = "AL1";
|
||||
@@ -74,34 +74,32 @@ eNBs =
|
||||
pucch_deltaF_Format2a = "deltaF0";
|
||||
pucch_deltaF_Format2b = "deltaF0";
|
||||
|
||||
rach_numberOfRA_Preambles = 64;
|
||||
rach_preamblesGroupAConfig = "DISABLE";
|
||||
/*
|
||||
rach_sizeOfRA_PreamblesGroupA = ;
|
||||
rach_messageSizeGroupA = ;
|
||||
rach_messagePowerOffsetGroupB = ;
|
||||
*/
|
||||
rach_powerRampingStep = 4;
|
||||
rach_preambleInitialReceivedTargetPower = -108;
|
||||
rach_preambleTransMax = 10;
|
||||
rach_raResponseWindowSize = 10;
|
||||
rach_macContentionResolutionTimer = 48;
|
||||
rach_maxHARQ_Msg3Tx = 4;
|
||||
|
||||
pcch_default_PagingCycle = 128;
|
||||
pcch_nB = "oneT";
|
||||
bcch_modificationPeriodCoeff = 2;
|
||||
ue_TimersAndConstants_t300 = 1000;
|
||||
ue_TimersAndConstants_t301 = 1000;
|
||||
ue_TimersAndConstants_t310 = 1000;
|
||||
ue_TimersAndConstants_t311 = 10000;
|
||||
ue_TimersAndConstants_n310 = 20;
|
||||
ue_TimersAndConstants_n311 = 1;
|
||||
rach_numberOfRA_Preambles = 64;
|
||||
rach_preamblesGroupAConfig = "DISABLE";
|
||||
/*
|
||||
rach_sizeOfRA_PreamblesGroupA = ;
|
||||
rach_messageSizeGroupA = ;
|
||||
rach_messagePowerOffsetGroupB = ;
|
||||
*/
|
||||
rach_powerRampingStep = 4;
|
||||
rach_preambleInitialReceivedTargetPower = -108;
|
||||
rach_preambleTransMax = 10;
|
||||
rach_raResponseWindowSize = 10;
|
||||
rach_macContentionResolutionTimer = 48;
|
||||
rach_maxHARQ_Msg3Tx = 4;
|
||||
|
||||
pcch_default_PagingCycle = 128;
|
||||
pcch_nB = "oneT";
|
||||
bcch_modificationPeriodCoeff = 2;
|
||||
ue_TimersAndConstants_t300 = 1000;
|
||||
ue_TimersAndConstants_t301 = 1000;
|
||||
ue_TimersAndConstants_t310 = 1000;
|
||||
ue_TimersAndConstants_t311 = 10000;
|
||||
ue_TimersAndConstants_n310 = 20;
|
||||
ue_TimersAndConstants_n311 = 1;
|
||||
}
|
||||
);
|
||||
|
||||
|
||||
srb1_parameters :
|
||||
{
|
||||
# timer_poll_retransmit = (ms) [5, 10, 15, 20,... 250, 300, 350, ... 500]
|
||||
@@ -131,9 +129,8 @@ eNBs =
|
||||
SCTP_OUTSTREAMS = 2;
|
||||
};
|
||||
|
||||
|
||||
////////// MME parameters:
|
||||
mme_ip_address = ( { ipv4 = "172.27.8.52";
|
||||
mme_ip_address = ( { ipv4 = "192.168.12.11";
|
||||
ipv6 = "192:168:30::17";
|
||||
active = "yes";
|
||||
preference = "ipv4";
|
||||
@@ -143,10 +140,10 @@ eNBs =
|
||||
NETWORK_INTERFACES :
|
||||
{
|
||||
ENB_INTERFACE_NAME_FOR_S1_MME = "eth0";
|
||||
ENB_IPV4_ADDRESS_FOR_S1_MME = "172.27.8.51/23";
|
||||
ENB_IPV4_ADDRESS_FOR_S1_MME = "192.168.12.213/24";
|
||||
|
||||
ENB_INTERFACE_NAME_FOR_S1U = "eth0";
|
||||
ENB_IPV4_ADDRESS_FOR_S1U = "172.27.8.51/23";
|
||||
ENB_IPV4_ADDRESS_FOR_S1U = "192.168.12.213/24";
|
||||
ENB_PORT_FOR_S1U = 2152; # Spec 2152
|
||||
};
|
||||
|
||||
|
||||
+117
-13
@@ -1,17 +1,17 @@
|
||||
[*]
|
||||
[*] GTKWave Analyzer v3.3.58 (w)1999-2014 BSI
|
||||
[*] Wed Sep 9 13:51:16 2015
|
||||
[*] Sun Apr 10 20:34:38 2016
|
||||
[*]
|
||||
[dumpfile] "/homes/kaltenbe/openair_dump_eNB_usrp_note4.gtk"
|
||||
[dumpfile_mtime] "Wed Sep 9 13:39:25 2015"
|
||||
[dumpfile_size] 323681028
|
||||
[savefile] "/homes/kaltenbe/Devel/openair/openair4G/trunk/targets/RT/USER/eNB.gtkw"
|
||||
[timestart] 63022760000
|
||||
[size] 1855 1056
|
||||
[pos] -851 -429
|
||||
*-22.793451 63031840000 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1
|
||||
[sst_width] 224
|
||||
[signals_width] 230
|
||||
[dumpfile] "/tmp/openair_dump_eNB.vcd"
|
||||
[dumpfile_mtime] "Sun Apr 10 20:26:57 2016"
|
||||
[dumpfile_size] 181182776
|
||||
[savefile] "/home/papillon/openairinterface5g/targets/RT/USER/eNB_usrp.gtkw"
|
||||
[timestart] 19787100000
|
||||
[size] 1535 876
|
||||
[pos] -1 -1
|
||||
*-21.793451 19795882832 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1
|
||||
[sst_width] 284
|
||||
[signals_width] 238
|
||||
[sst_expanded] 1
|
||||
[sst_vpaned_height] 294
|
||||
@24
|
||||
@@ -50,16 +50,120 @@ functions.eNB_thread_rx9
|
||||
functions.eNB_thread_tx9
|
||||
functions.phy_procedures_eNb_tx
|
||||
functions.phy_procedures_eNb_rx
|
||||
@24
|
||||
variables.dci_info[63:0]
|
||||
variables.ue0_BO[63:0]
|
||||
@420
|
||||
variables.ue0_BSR[63:0]
|
||||
variables.ue0_timing_advance[63:0]
|
||||
@28
|
||||
functions.macxface_initiate_ra_proc
|
||||
functions.macxface_terminate_ra_proc
|
||||
functions.phy_enb_ulsch_msg3
|
||||
functions.macxface_SR_indication
|
||||
@420
|
||||
variables.ue0_SR_ENERGY[63:0]
|
||||
variables.ue0_SR_THRES[63:0]
|
||||
@25
|
||||
variables.dci_info[63:0]
|
||||
@28
|
||||
functions.phy_enb_ulsch_decoding0
|
||||
@24
|
||||
variables.ue0_res0[63:0]
|
||||
@420
|
||||
variables.ue0_rssi0[63:0]
|
||||
variables.ue0_MCS0[63:0]
|
||||
variables.ue0_RB0[63:0]
|
||||
@24
|
||||
variables.ue0_ROUND0[63:0]
|
||||
variables.ue0_SFN0[63:0]
|
||||
@28
|
||||
functions.phy_enb_ulsch_decoding1
|
||||
@24
|
||||
variables.ue0_res1[63:0]
|
||||
@420
|
||||
variables.ue0_rssi1[63:0]
|
||||
variables.ue0_MCS1[63:0]
|
||||
variables.ue0_RB1[63:0]
|
||||
@24
|
||||
variables.ue0_ROUND1[63:0]
|
||||
variables.ue0_SFN1[63:0]
|
||||
@28
|
||||
functions.phy_enb_ulsch_decoding2
|
||||
@24
|
||||
variables.ue0_res2[63:0]
|
||||
@420
|
||||
variables.ue0_rssi2[63:0]
|
||||
variables.ue0_MCS2[63:0]
|
||||
variables.ue0_RB2[63:0]
|
||||
@24
|
||||
variables.ue0_ROUND2[63:0]
|
||||
variables.ue0_SFN2[63:0]
|
||||
@28
|
||||
functions.phy_enb_ulsch_decoding3
|
||||
@24
|
||||
variables.ue0_res3[63:0]
|
||||
@420
|
||||
variables.ue0_rssi3[63:0]
|
||||
variables.ue0_MCS3[63:0]
|
||||
variables.ue0_RB3[63:0]
|
||||
@24
|
||||
variables.ue0_ROUND3[63:0]
|
||||
variables.ue0_SFN3[63:0]
|
||||
@28
|
||||
functions.phy_enb_ulsch_decoding4
|
||||
@420
|
||||
variables.ue0_rssi4[63:0]
|
||||
@24
|
||||
variables.ue0_res4[63:0]
|
||||
@420
|
||||
variables.ue0_MCS4[63:0]
|
||||
variables.ue0_RB4[63:0]
|
||||
@24
|
||||
variables.ue0_ROUND4[63:0]
|
||||
variables.ue0_SFN4[63:0]
|
||||
@28
|
||||
functions.phy_enb_ulsch_decoding5
|
||||
@24
|
||||
variables.ue0_res5[63:0]
|
||||
@420
|
||||
variables.ue0_rssi5[63:0]
|
||||
variables.ue0_MCS5[63:0]
|
||||
variables.ue0_RB5[63:0]
|
||||
@24
|
||||
variables.ue0_ROUND5[63:0]
|
||||
variables.ue0_SFN5[63:0]
|
||||
@28
|
||||
functions.phy_enb_ulsch_decoding6
|
||||
@24
|
||||
variables.ue0_res6[63:0]
|
||||
@420
|
||||
variables.ue0_rssi6[63:0]
|
||||
variables.ue0_MCS6[63:0]
|
||||
variables.ue0_RB6[63:0]
|
||||
@24
|
||||
variables.ue0_ROUND6[63:0]
|
||||
variables.ue0_SFN6[63:0]
|
||||
@28
|
||||
functions.phy_enb_ulsch_decoding7
|
||||
@24
|
||||
variables.ue0_res7[63:0]
|
||||
@420
|
||||
variables.ue0_rssi7[63:0]
|
||||
variables.ue0_MCS7[63:0]
|
||||
variables.ue0_RB7[63:0]
|
||||
@24
|
||||
variables.ue0_ROUND7[63:0]
|
||||
variables.ue0_SFN7[63:0]
|
||||
@28
|
||||
functions.phy_enb_prach_rx
|
||||
functions.phy_eNB_dlsch_encoding
|
||||
functions.phy_eNB_dlsch_modulation
|
||||
functions.phy_eNB_dlsch_scrambling
|
||||
functions.phy_enb_pdcch_tx
|
||||
functions.phy_enb_ulsch_decoding
|
||||
functions.phy_enb_rs_tx
|
||||
functions.rrc_mac_config_req
|
||||
functions.rlc_data_req
|
||||
@29
|
||||
functions.udp_enb_task
|
||||
[pattern_trace] 1
|
||||
[pattern_trace] 0
|
||||
|
||||
+275
-50
@@ -50,8 +50,9 @@
|
||||
#include <signal.h>
|
||||
#include <execinfo.h>
|
||||
#include <getopt.h>
|
||||
|
||||
#include <sys/sysinfo.h>
|
||||
#include "rt_wrapper.h"
|
||||
|
||||
#undef MALLOC //there are two conflicting definitions, so we better make sure we don't use it at all
|
||||
|
||||
#include "assertions.h"
|
||||
@@ -77,8 +78,6 @@ struct gps_fix_t dummy_gps_data;
|
||||
//#undef FRAME_LENGTH_COMPLEX_SAMPLES //there are two conflicting definitions, so we better make sure we don't use it at all
|
||||
|
||||
#include "PHY/vars.h"
|
||||
#include "MAC_INTERFACE/vars.h"
|
||||
//#include "SCHED/defs.h"
|
||||
#include "SCHED/vars.h"
|
||||
#include "LAYER2/MAC/vars.h"
|
||||
|
||||
@@ -88,13 +87,11 @@ struct gps_fix_t dummy_gps_data;
|
||||
#include "SCHED/phy_procedures_emos.h"
|
||||
#endif
|
||||
|
||||
#ifdef OPENAIR2
|
||||
#include "LAYER2/MAC/defs.h"
|
||||
#include "LAYER2/MAC/vars.h"
|
||||
#include "LAYER2/MAC/proto.h"
|
||||
#include "RRC/LITE/vars.h"
|
||||
#include "PHY_INTERFACE/vars.h"
|
||||
#endif
|
||||
|
||||
#ifdef SMBV
|
||||
#include "PHY/TOOLS/smbv.h"
|
||||
@@ -164,7 +161,7 @@ FD_lte_phy_scope_ue *form_ue[NUMBER_OF_UE_MAX];
|
||||
FD_lte_phy_scope_enb *form_enb[MAX_NUM_CCs][NUMBER_OF_UE_MAX];
|
||||
FD_stats_form *form_stats=NULL,*form_stats_l2=NULL;
|
||||
char title[255];
|
||||
unsigned char scope_enb_num_ue = 1;
|
||||
unsigned char scope_enb_num_ue = 2;
|
||||
#endif //XFORMS
|
||||
|
||||
#ifdef RTAI
|
||||
@@ -319,7 +316,7 @@ static LTE_DL_FRAME_PARMS *frame_parms[MAX_NUM_CCs];
|
||||
|
||||
int multi_thread=1;
|
||||
uint32_t target_dl_mcs = 28; //maximum allowed mcs
|
||||
uint32_t target_ul_mcs = 10;
|
||||
uint32_t target_ul_mcs = 20;
|
||||
uint32_t timing_advance = 0;
|
||||
uint8_t exit_missed_slots=1;
|
||||
uint64_t num_missed_slots=0; // counter for the number of missed slots
|
||||
@@ -517,7 +514,7 @@ void reset_stats(FL_OBJECT *button, long arg)
|
||||
|
||||
for (i=0; i<NUMBER_OF_UE_MAX; i++) {
|
||||
for (k=0; k<8; k++) { //harq_processes
|
||||
for (j=0; j<phy_vars_eNB->dlsch_eNB[i][0]->Mdlharq; j++) {
|
||||
for (j=0; j<phy_vars_eNB->dlsch_eNB[i][0]->Mlimit; j++) {
|
||||
phy_vars_eNB->eNB_UE_stats[i].dlsch_NAK[k][j]=0;
|
||||
phy_vars_eNB->eNB_UE_stats[i].dlsch_ACK[k][j]=0;
|
||||
phy_vars_eNB->eNB_UE_stats[i].dlsch_trials[k][j]=0;
|
||||
@@ -527,7 +524,7 @@ void reset_stats(FL_OBJECT *button, long arg)
|
||||
phy_vars_eNB->eNB_UE_stats[i].ulsch_errors[k]=0;
|
||||
phy_vars_eNB->eNB_UE_stats[i].ulsch_consecutive_errors=0;
|
||||
|
||||
for (j=0; j<phy_vars_eNB->ulsch_eNB[i]->Mdlharq; j++) {
|
||||
for (j=0; j<phy_vars_eNB->ulsch_eNB[i]->Mlimit; j++) {
|
||||
phy_vars_eNB->eNB_UE_stats[i].ulsch_decoding_attempts[k][j]=0;
|
||||
phy_vars_eNB->eNB_UE_stats[i].ulsch_decoding_attempts_last[k][j]=0;
|
||||
phy_vars_eNB->eNB_UE_stats[i].ulsch_round_errors[k][j]=0;
|
||||
@@ -550,6 +547,7 @@ static void *scope_thread(void *arg)
|
||||
int len = 0;
|
||||
struct sched_param sched_param;
|
||||
int UE_id, CC_id;
|
||||
int ue_cnt=0;
|
||||
|
||||
sched_param.sched_priority = sched_get_priority_min(SCHED_FIFO)+1;
|
||||
sched_setscheduler(0, SCHED_FIFO,&sched_param);
|
||||
@@ -593,11 +591,15 @@ static void *scope_thread(void *arg)
|
||||
fl_clear_browser(form_stats->stats_text);
|
||||
fl_add_browser_line(form_stats->stats_text, stats_buffer);
|
||||
|
||||
for(UE_id=0; UE_id<scope_enb_num_ue; UE_id++) {
|
||||
ue_cnt=0;
|
||||
for(UE_id=0; UE_id<NUMBER_OF_UE_MAX; UE_id++) {
|
||||
for(CC_id=0; CC_id<MAX_NUM_CCs; CC_id++) {
|
||||
phy_scope_eNB(form_enb[CC_id][UE_id],
|
||||
PHY_vars_eNB_g[0][CC_id],
|
||||
UE_id);
|
||||
if ((PHY_vars_eNB_g[0][CC_id]->dlsch_eNB[UE_id][0]->rnti>0) && (ue_cnt<scope_enb_num_ue)) {
|
||||
phy_scope_eNB(form_enb[CC_id][ue_cnt],
|
||||
PHY_vars_eNB_g[0][CC_id],
|
||||
UE_id);
|
||||
ue_cnt++;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -937,7 +939,7 @@ void do_OFDM_mod_rt(int subframe,PHY_VARS_eNB *phy_vars_eNB)
|
||||
{
|
||||
|
||||
unsigned int aa,slot_offset, slot_offset_F;
|
||||
int dummy_tx_b[7680*4] __attribute__((aligned(16)));
|
||||
int dummy_tx_b[7680*4] __attribute__((aligned(32)));
|
||||
int i, tx_offset;
|
||||
int slot_sizeF = (phy_vars_eNB->lte_frame_parms.ofdm_symbol_size)*
|
||||
((phy_vars_eNB->lte_frame_parms.Ncp==1) ? 6 : 7);
|
||||
@@ -1088,13 +1090,9 @@ static void* eNB_thread_tx( void* param )
|
||||
#ifdef LOWLATENCY
|
||||
struct sched_attr attr;
|
||||
unsigned int flags = 0;
|
||||
uint64_t runtime = (uint64_t) (get_runtime_tx(proc->subframe, runtime_phy_tx, target_dl_mcs,frame_parms[0]->N_RB_DL,cpuf,PHY_vars_eNB_g[0][0]->lte_frame_parms.nb_antennas_tx) * 1000000);
|
||||
uint64_t deadline = 1 * 1000000; // each tx thread will finish within 1ms
|
||||
uint64_t runtime = 850000 ;
|
||||
uint64_t deadline = 1 * 1000000 ; // each tx thread will finish within 1ms
|
||||
uint64_t period = 1 * 10000000; // each tx thread has a period of 10ms from the starting point
|
||||
if (runtime > 1000000 ){
|
||||
LOG_W(HW,"estimated runtime %d is larger than 1ms, adjusting\n",runtime);
|
||||
runtime = (0.97 * 100) * 10000;
|
||||
}
|
||||
|
||||
attr.size = sizeof(attr);
|
||||
attr.sched_flags = 0;
|
||||
@@ -1113,7 +1111,74 @@ static void* eNB_thread_tx( void* param )
|
||||
|
||||
LOG_I( HW, "[SCHED] eNB TX deadline thread %d(TID %ld) started on CPU %d\n", proc->subframe, gettid(), sched_getcpu() );
|
||||
#else
|
||||
LOG_I( HW, "[SCHED][eNB] TX thread %d started on CPU %d TID %d\n", proc->subframe, sched_getcpu(),gettid() );
|
||||
int policy, s, j;
|
||||
struct sched_param sparam;
|
||||
char cpu_affinity[1024];
|
||||
cpu_set_t cpuset;
|
||||
|
||||
/* Set affinity mask to include CPUs 1 to MAX_CPUS */
|
||||
/* CPU 0 is reserved for UHD threads */
|
||||
/* CPU 1 is reserved for all TX threads */
|
||||
/* Enable CPU Affinity only if number of CPUs >2 */
|
||||
CPU_ZERO(&cpuset);
|
||||
|
||||
#ifdef CPU_AFFINITY
|
||||
if (get_nprocs() > 2)
|
||||
{
|
||||
for (j = 1; j < get_nprocs(); j++)
|
||||
CPU_SET(j, &cpuset);
|
||||
s = pthread_setaffinity_np(pthread_self(), sizeof(cpu_set_t), &cpuset);
|
||||
if (s != 0)
|
||||
{
|
||||
perror( "pthread_setaffinity_np");
|
||||
exit_fun("Error setting processor affinity");
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
/* Check the actual affinity mask assigned to the thread */
|
||||
|
||||
s = pthread_getaffinity_np(pthread_self(), sizeof(cpu_set_t), &cpuset);
|
||||
if (s != 0)
|
||||
{
|
||||
perror( "pthread_getaffinity_np");
|
||||
exit_fun("Error getting processor affinity ");
|
||||
}
|
||||
memset(cpu_affinity,0,sizeof(cpu_affinity));
|
||||
for (j = 0; j < CPU_SETSIZE; j++)
|
||||
if (CPU_ISSET(j, &cpuset))
|
||||
{
|
||||
char temp[1024];
|
||||
sprintf (temp, " CPU_%d", j);
|
||||
strcat(cpu_affinity, temp);
|
||||
}
|
||||
|
||||
memset(&sparam, 0 , sizeof (sparam));
|
||||
sparam.sched_priority = sched_get_priority_max(SCHED_FIFO)-1;
|
||||
policy = SCHED_FIFO ;
|
||||
|
||||
s = pthread_setschedparam(pthread_self(), policy, &sparam);
|
||||
if (s != 0)
|
||||
{
|
||||
perror("pthread_setschedparam : ");
|
||||
exit_fun("Error setting thread priority");
|
||||
}
|
||||
s = pthread_getschedparam(pthread_self(), &policy, &sparam);
|
||||
if (s != 0)
|
||||
{
|
||||
perror("pthread_getschedparam : ");
|
||||
exit_fun("Error getting thread priority");
|
||||
|
||||
}
|
||||
|
||||
LOG_I( HW, "[SCHED][eNB] TX thread %d started on CPU %d TID %ld, sched_policy = %s , priority = %d, CPU Affinity=%s \n", proc->subframe, sched_getcpu(),gettid(),
|
||||
(policy == SCHED_FIFO) ? "SCHED_FIFO" :
|
||||
(policy == SCHED_RR) ? "SCHED_RR" :
|
||||
(policy == SCHED_OTHER) ? "SCHED_OTHER" :
|
||||
"???",
|
||||
sparam.sched_priority, cpu_affinity );
|
||||
|
||||
|
||||
#endif
|
||||
|
||||
#endif
|
||||
@@ -1200,7 +1265,7 @@ static void* eNB_thread_tx( void* param )
|
||||
/*
|
||||
short *txdata = (short*)&PHY_vars_eNB_g[0][proc->CC_id]->lte_eNB_common_vars.txdata[0][0][proc->subframe_tx*PHY_vars_eNB_g[0][proc->CC_id]->lte_frame_parms.samples_per_tti];
|
||||
int i;
|
||||
for (i=0;i<7680*2;i+=8) {
|
||||
for (i=0;i<PHY_vars_eNB_g[0][proc->CC_id]->lte_frame_parms.samples_per_tti*2;i+=8) {
|
||||
txdata[i] = 2047;
|
||||
txdata[i+1] = 0;
|
||||
txdata[i+2] = 0;
|
||||
@@ -1308,15 +1373,10 @@ static void* eNB_thread_rx( void* param )
|
||||
#ifdef LOWLATENCY
|
||||
struct sched_attr attr;
|
||||
unsigned int flags = 0;
|
||||
uint64_t runtime = get_runtime_rx(proc->subframe, runtime_phy_rx, target_ul_mcs,frame_parms[0]->N_RB_DL,cpuf,PHY_vars_eNB_g[0][0]->lte_frame_parms.nb_antennas_rx) * 1000000;
|
||||
uint64_t runtime = 870000 ;
|
||||
uint64_t deadline = 1 * 1000000;
|
||||
uint64_t period = 1 * 10000000; // each rx thread has a period of 10ms from the starting point
|
||||
if (runtime > 2300000 ) {
|
||||
LOG_W(HW,"estimated rx runtime %d is larger than expected, adjusting\n",runtime);
|
||||
runtime = 2300000;
|
||||
deadline = runtime + 100000;
|
||||
}
|
||||
|
||||
|
||||
attr.size = sizeof(attr);
|
||||
attr.sched_flags = 0;
|
||||
attr.sched_nice = 0;
|
||||
@@ -1334,7 +1394,79 @@ static void* eNB_thread_rx( void* param )
|
||||
|
||||
LOG_I( HW, "[SCHED] eNB RX deadline thread %d(TID %ld) started on CPU %d\n", proc->subframe, gettid(), sched_getcpu() );
|
||||
#else
|
||||
LOG_I( HW, "[SCHED][eNB] RX thread %d started on CPU %d TID %d\n", proc->subframe, sched_getcpu(),gettid() );
|
||||
int policy, s, j;
|
||||
struct sched_param sparam;
|
||||
char cpu_affinity[1024];
|
||||
cpu_set_t cpuset;
|
||||
|
||||
/* Set affinity mask to include CPUs 1 to MAX_CPUS */
|
||||
/* CPU 0 is reserved for UHD */
|
||||
/* CPU 1 is reserved for all TX threads */
|
||||
/* CPU 2..MAX_CPUS is reserved for all RX threads */
|
||||
/* Set CPU Affinity only if number of CPUs >2 */
|
||||
CPU_ZERO(&cpuset);
|
||||
#ifdef CPU_AFFINITY
|
||||
if (get_nprocs() >2)
|
||||
{
|
||||
for (j = 1; j < get_nprocs(); j++)
|
||||
CPU_SET(j, &cpuset);
|
||||
|
||||
s = pthread_setaffinity_np(pthread_self(), sizeof(cpu_set_t), &cpuset);
|
||||
if (s != 0)
|
||||
{
|
||||
perror( "pthread_setaffinity_np");
|
||||
exit_fun (" Error setting processor affinity :");
|
||||
}
|
||||
}
|
||||
#endif
|
||||
/* Check the actual affinity mask assigned to the thread */
|
||||
|
||||
s = pthread_getaffinity_np(pthread_self(), sizeof(cpu_set_t), &cpuset);
|
||||
if (s != 0)
|
||||
{
|
||||
perror ("pthread_getaffinity_np");
|
||||
exit_fun (" Error getting processor affinity :");
|
||||
}
|
||||
memset(cpu_affinity,0, sizeof(cpu_affinity));
|
||||
|
||||
for (j = 0; j < CPU_SETSIZE; j++)
|
||||
if (CPU_ISSET(j, &cpuset))
|
||||
{
|
||||
char temp[1024];
|
||||
sprintf (temp, " CPU_%d", j);
|
||||
strcat(cpu_affinity, temp);
|
||||
}
|
||||
|
||||
|
||||
memset(&sparam, 0 , sizeof (sparam));
|
||||
sparam.sched_priority = sched_get_priority_max(SCHED_FIFO)-1;
|
||||
|
||||
policy = SCHED_FIFO ;
|
||||
s = pthread_setschedparam(pthread_self(), policy, &sparam);
|
||||
if (s != 0)
|
||||
{
|
||||
perror("pthread_setschedparam : ");
|
||||
exit_fun("Error setting thread priority");
|
||||
}
|
||||
|
||||
memset(&sparam, 0 , sizeof (sparam));
|
||||
|
||||
s = pthread_getschedparam(pthread_self(), &policy, &sparam);
|
||||
if (s != 0)
|
||||
{
|
||||
perror("pthread_getschedparam");
|
||||
exit_fun("Error getting thread priority");
|
||||
}
|
||||
|
||||
|
||||
LOG_I( HW, "[SCHED][eNB] RX thread %d started on CPU %d TID %ld, sched_policy = %s, priority = %d, CPU Affinity = %s\n", proc->subframe, sched_getcpu(),gettid(),
|
||||
(policy == SCHED_FIFO) ? "SCHED_FIFO" :
|
||||
(policy == SCHED_RR) ? "SCHED_RR" :
|
||||
(policy == SCHED_OTHER) ? "SCHED_OTHER" :
|
||||
"???",
|
||||
sparam.sched_priority, cpu_affinity);
|
||||
|
||||
|
||||
#endif
|
||||
#endif // RTAI
|
||||
|
||||
@@ -1661,12 +1793,6 @@ static void* eNB_thread( void* arg )
|
||||
attr.sched_deadline = (0.9 * 100) * 10000;
|
||||
attr.sched_period = 1 * 1000000;
|
||||
|
||||
|
||||
/* pin the eNB main thread to CPU0*/
|
||||
/* if (pthread_setaffinity_np(pthread_self(), sizeof(mask),&mask) <0) {
|
||||
perror("[MAIN_ENB_THREAD] pthread_setaffinity_np failed\n");
|
||||
}*/
|
||||
|
||||
if (sched_setattr(0, &attr, flags) < 0 ) {
|
||||
perror("[SCHED] main eNB thread: sched_setattr failed\n");
|
||||
exit_fun("Nothing to add");
|
||||
@@ -1675,6 +1801,75 @@ static void* eNB_thread( void* arg )
|
||||
gettid(),sched_getcpu());
|
||||
}
|
||||
|
||||
#else
|
||||
|
||||
int policy, s, j;
|
||||
struct sched_param sparam;
|
||||
char cpu_affinity[1024];
|
||||
cpu_set_t cpuset;
|
||||
|
||||
/* Set affinity mask to include CPUs 1 to MAX_CPUS */
|
||||
/* CPU 0 is reserved for UHD threads */
|
||||
CPU_ZERO(&cpuset);
|
||||
#ifdef CPU_AFFINITY
|
||||
if (get_nprocs() >2)
|
||||
{
|
||||
for (j = 1; j < get_nprocs(); j++)
|
||||
CPU_SET(j, &cpuset);
|
||||
|
||||
s = pthread_setaffinity_np(pthread_self(), sizeof(cpu_set_t), &cpuset);
|
||||
if (s != 0)
|
||||
{
|
||||
perror( "pthread_setaffinity_np");
|
||||
exit_fun("Error setting processor affinity");
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
/* Check the actual affinity mask assigned to the thread */
|
||||
|
||||
s = pthread_getaffinity_np(pthread_self(), sizeof(cpu_set_t), &cpuset);
|
||||
if (s != 0)
|
||||
{
|
||||
perror( "pthread_getaffinity_np");
|
||||
exit_fun("Error getting processor affinity ");
|
||||
}
|
||||
memset(cpu_affinity, 0 , sizeof(cpu_affinity));
|
||||
for (j = 0; j < CPU_SETSIZE; j++)
|
||||
if (CPU_ISSET(j, &cpuset))
|
||||
{
|
||||
char temp[1024];
|
||||
sprintf(temp, " CPU_%d ", j);
|
||||
strcat(cpu_affinity, temp);
|
||||
}
|
||||
|
||||
memset(&sparam, 0 , sizeof (sparam));
|
||||
sparam.sched_priority = sched_get_priority_max(SCHED_FIFO);
|
||||
policy = SCHED_FIFO ;
|
||||
|
||||
s = pthread_setschedparam(pthread_self(), policy, &sparam);
|
||||
if (s != 0)
|
||||
{
|
||||
perror("pthread_setschedparam : ");
|
||||
exit_fun("Error setting thread priority");
|
||||
}
|
||||
s = pthread_getschedparam(pthread_self(), &policy, &sparam);
|
||||
if (s != 0)
|
||||
{
|
||||
perror("pthread_getschedparam : ");
|
||||
exit_fun("Error getting thread priority");
|
||||
|
||||
}
|
||||
|
||||
|
||||
LOG_I( HW, "[SCHED][eNB] Started eNB main thread on CPU %d TID %ld , sched_policy = %s, priority = %d, CPU Affinity = %s \n", (int)sched_getcpu(), gettid(),
|
||||
(policy == SCHED_FIFO) ? "SCHED_FIFO" :
|
||||
(policy == SCHED_RR) ? "SCHED_RR" :
|
||||
(policy == SCHED_OTHER) ? "SCHED_OTHER" :
|
||||
"???",
|
||||
(int) sparam.sched_priority, cpu_affinity);
|
||||
|
||||
|
||||
#endif
|
||||
#endif
|
||||
|
||||
@@ -1684,9 +1879,7 @@ static void* eNB_thread( void* arg )
|
||||
goto eNB_thread_cleanup;
|
||||
|
||||
#ifdef RTAI
|
||||
printf( "[SCHED][eNB] Started eNB main thread (id %p)\n", task );
|
||||
#else
|
||||
printf( "[SCHED][eNB] Started eNB main thread on CPU %d TID %ld\n", sched_getcpu(), gettid());
|
||||
LOG_I( HW, "[SCHED][eNB] Started eNB main thread (id %p)\n", task );
|
||||
#endif
|
||||
|
||||
#ifdef HARD_RT
|
||||
@@ -3111,6 +3304,49 @@ int main( int argc, char **argv )
|
||||
|
||||
#endif
|
||||
}
|
||||
|
||||
#ifndef LOWLATENCY
|
||||
|
||||
/* Currently we set affinity for UHD to CPU 0 for eNB/UE and only if number of CPUS >2 */
|
||||
|
||||
cpu_set_t cpuset;
|
||||
int s;
|
||||
char cpu_affinity[1024];
|
||||
CPU_ZERO(&cpuset);
|
||||
#ifdef CPU_AFFINITY
|
||||
if (get_nprocs() > 2)
|
||||
{
|
||||
CPU_SET(0, &cpuset);
|
||||
s = pthread_setaffinity_np(pthread_self(), sizeof(cpu_set_t), &cpuset);
|
||||
if (s != 0)
|
||||
{
|
||||
perror( "pthread_setaffinity_np");
|
||||
exit_fun("Error setting processor affinity");
|
||||
}
|
||||
LOG_I(HW, "Setting the affinity of main function to CPU 0, for device library to use CPU 0 only!\n");
|
||||
}
|
||||
#endif
|
||||
|
||||
/* Check the actual affinity mask assigned to the thread */
|
||||
s = pthread_getaffinity_np(pthread_self(), sizeof(cpu_set_t), &cpuset);
|
||||
if (s != 0)
|
||||
{
|
||||
perror( "pthread_getaffinity_np");
|
||||
exit_fun("Error getting processor affinity ");
|
||||
}
|
||||
memset(cpu_affinity, 0 , sizeof(cpu_affinity));
|
||||
for (int j = 0; j < CPU_SETSIZE; j++)
|
||||
{
|
||||
if (CPU_ISSET(j, &cpuset))
|
||||
{
|
||||
char temp[1024];
|
||||
sprintf(temp, " CPU_%d ", j);
|
||||
strcat(cpu_affinity, temp);
|
||||
}
|
||||
}
|
||||
LOG_I(HW, "CPU Affinity of main() function is... %s\n", cpu_affinity);
|
||||
#endif
|
||||
|
||||
/* device host type is set*/
|
||||
openair0.host_type = BBU_HOST;
|
||||
/* device type is initialized NONE_DEV (no RF device) when the RF device will be initiated device type will be set */
|
||||
@@ -3293,17 +3529,6 @@ int main( int argc, char **argv )
|
||||
pthread_cond_init(&sync_cond,NULL);
|
||||
pthread_mutex_init(&sync_mutex, NULL);
|
||||
|
||||
/* this is moved to the eNB main thread */
|
||||
|
||||
//#if defined(ENABLE_ITTI)
|
||||
// Wait for eNB application initialization to be complete (eNB registration to MME)
|
||||
// if (UE_flag==0) {
|
||||
// printf("Waiting for eNB application to be ready\n");
|
||||
//wait_system_ready ("Waiting for eNB application to be ready %s\r", &start_eNB);
|
||||
// }
|
||||
//#endif
|
||||
|
||||
|
||||
// this starts the DMA transfers
|
||||
#ifdef EXMIMO
|
||||
|
||||
|
||||
+217
-14
@@ -53,6 +53,7 @@
|
||||
#include <execinfo.h>
|
||||
#include <getopt.h>
|
||||
#include <syscall.h>
|
||||
#include <sys/sysinfo.h>
|
||||
|
||||
#include "rt_wrapper.h"
|
||||
#include "assertions.h"
|
||||
@@ -75,13 +76,9 @@
|
||||
#endif
|
||||
|
||||
#include "PHY/extern.h"
|
||||
#include "MAC_INTERFACE/extern.h"
|
||||
//#include "SCHED/defs.h"
|
||||
#include "SCHED/extern.h"
|
||||
#ifdef OPENAIR2
|
||||
#include "LAYER2/MAC/extern.h"
|
||||
#include "LAYER2/MAC/proto.h"
|
||||
#endif
|
||||
|
||||
#include "UTIL/LOG/log_extern.h"
|
||||
#include "UTIL/OTG/otg_tx.h"
|
||||
@@ -215,6 +212,76 @@ static void *UE_thread_synch(void *arg)
|
||||
printf("UE_thread_sync in with PHY_vars_UE %p\n",arg);
|
||||
printf("waiting for sync (UE_thread_synch) \n");
|
||||
|
||||
#ifndef LOWLATENCY
|
||||
int policy, s, j;
|
||||
struct sched_param sparam;
|
||||
char cpu_affinity[1024];
|
||||
cpu_set_t cpuset;
|
||||
|
||||
/* Set affinity mask to include CPUs 1 to MAX_CPUS */
|
||||
/* CPU 0 is reserved for UHD threads */
|
||||
CPU_ZERO(&cpuset);
|
||||
|
||||
#ifdef CPU_AFFINITY
|
||||
if (get_nprocs() >2)
|
||||
{
|
||||
for (j = 1; j < get_nprocs(); j++)
|
||||
CPU_SET(j, &cpuset);
|
||||
|
||||
s = pthread_setaffinity_np(pthread_self(), sizeof(cpu_set_t), &cpuset);
|
||||
if (s != 0)
|
||||
{
|
||||
perror( "pthread_setaffinity_np");
|
||||
exit_fun("Error setting processor affinity");
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
/* Check the actual affinity mask assigned to the thread */
|
||||
|
||||
s = pthread_getaffinity_np(pthread_self(), sizeof(cpu_set_t), &cpuset);
|
||||
if (s != 0)
|
||||
{
|
||||
perror( "pthread_getaffinity_np");
|
||||
exit_fun("Error getting processor affinity ");
|
||||
}
|
||||
memset(cpu_affinity, 0 , sizeof(cpu_affinity));
|
||||
for (j = 0; j < CPU_SETSIZE; j++)
|
||||
if (CPU_ISSET(j, &cpuset))
|
||||
{
|
||||
char temp[1024];
|
||||
sprintf(temp, " CPU_%d ", j);
|
||||
strcat(cpu_affinity, temp);
|
||||
}
|
||||
|
||||
memset(&sparam, 0 , sizeof (sparam));
|
||||
sparam.sched_priority = sched_get_priority_max(SCHED_FIFO)-1;
|
||||
policy = SCHED_FIFO ;
|
||||
|
||||
s = pthread_setschedparam(pthread_self(), policy, &sparam);
|
||||
if (s != 0)
|
||||
{
|
||||
perror("pthread_setschedparam : ");
|
||||
exit_fun("Error setting thread priority");
|
||||
}
|
||||
s = pthread_getschedparam(pthread_self(), &policy, &sparam);
|
||||
if (s != 0)
|
||||
{
|
||||
perror("pthread_getschedparam : ");
|
||||
exit_fun("Error getting thread priority");
|
||||
|
||||
}
|
||||
|
||||
LOG_I( HW, "[SCHED][UE] Started UE synch thread on CPU %d TID %ld , sched_policy = %s, priority = %d, CPU Affinity = %s \n", (int)sched_getcpu(), gettid(),
|
||||
(policy == SCHED_FIFO) ? "SCHED_FIFO" :
|
||||
(policy == SCHED_RR) ? "SCHED_RR" :
|
||||
(policy == SCHED_OTHER) ? "SCHED_OTHER" :
|
||||
"???",
|
||||
(int) sparam.sched_priority, cpu_affinity);
|
||||
|
||||
#endif
|
||||
|
||||
|
||||
pthread_mutex_lock(&sync_mutex);
|
||||
printf("Locked sync_mutex, waiting (UE_sync_thread)\n");
|
||||
|
||||
@@ -447,8 +514,8 @@ static void *UE_thread_synch(void *arg)
|
||||
}
|
||||
#ifndef EXMIMO
|
||||
openair0.trx_set_freq_func(&openair0,&openair0_cfg[0],0);
|
||||
openair0.trx_set_gains_func(&openair0,&openair0_cfg[0]);
|
||||
openair0.trx_stop_func(0);
|
||||
//openair0.trx_set_gains_func(&openair0,&openair0_cfg[0]);
|
||||
//openair0.trx_stop_func(0);
|
||||
#else
|
||||
openair0_set_frequencies(&openair0,&openair0_cfg[0],0);
|
||||
openair0_set_gains(&openair0,&openair0_cfg[0]);
|
||||
@@ -504,6 +571,16 @@ static void *UE_thread_synch(void *arg)
|
||||
|
||||
if (abs(freq_offset) > 7500) {
|
||||
LOG_I( PHY, "[initial_sync] No cell synchronization found, abandoning\n" );
|
||||
FILE *fd;
|
||||
if ((fd = fopen("rxsig_frame0.dat","w"))!=NULL) {
|
||||
fwrite((void*)&UE->lte_ue_common_vars.rxdata[0][0],
|
||||
sizeof(int32_t),
|
||||
10*UE->lte_frame_parms.samples_per_tti,
|
||||
fd);
|
||||
LOG_I(PHY,"Dummping Frame ... bye bye \n");
|
||||
fclose(fd);
|
||||
exit(0);
|
||||
}
|
||||
mac_xface->macphy_exit("No cell synchronization found, abandoning");
|
||||
return &UE_thread_synch_retval; // not reached
|
||||
}
|
||||
@@ -646,9 +723,72 @@ static void *UE_thread_tx(void *arg)
|
||||
}
|
||||
|
||||
#else
|
||||
struct sched_param sp;
|
||||
sp.sched_priority = sched_get_priority_max(SCHED_FIFO)-1;
|
||||
pthread_setschedparam(pthread_self(),SCHED_FIFO,&sp);
|
||||
int policy, s, j;
|
||||
struct sched_param sparam;
|
||||
char cpu_affinity[1024];
|
||||
cpu_set_t cpuset;
|
||||
|
||||
/* Set affinity mask to include CPUs 1 to MAX_CPUS */
|
||||
/* CPU 0 is reserved for UHD threads */
|
||||
CPU_ZERO(&cpuset);
|
||||
|
||||
#ifdef CPU_AFFINITY
|
||||
if (get_nprocs() >2)
|
||||
{
|
||||
for (j = 1; j < get_nprocs(); j++)
|
||||
CPU_SET(j, &cpuset);
|
||||
|
||||
s = pthread_setaffinity_np(pthread_self(), sizeof(cpu_set_t), &cpuset);
|
||||
if (s != 0)
|
||||
{
|
||||
perror( "pthread_setaffinity_np");
|
||||
exit_fun("Error setting processor affinity");
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
/* Check the actual affinity mask assigned to the thread */
|
||||
|
||||
s = pthread_getaffinity_np(pthread_self(), sizeof(cpu_set_t), &cpuset);
|
||||
if (s != 0)
|
||||
{
|
||||
perror( "pthread_getaffinity_np");
|
||||
exit_fun("Error getting processor affinity ");
|
||||
}
|
||||
memset(cpu_affinity, 0 , sizeof(cpu_affinity));
|
||||
for (j = 0; j < CPU_SETSIZE; j++)
|
||||
if (CPU_ISSET(j, &cpuset))
|
||||
{
|
||||
char temp[1024];
|
||||
sprintf(temp, " CPU_%d ", j);
|
||||
strcat(cpu_affinity, temp);
|
||||
}
|
||||
|
||||
memset(&sparam, 0 , sizeof (sparam));
|
||||
sparam.sched_priority = sched_get_priority_max(SCHED_FIFO)-1;
|
||||
policy = SCHED_FIFO ;
|
||||
|
||||
s = pthread_setschedparam(pthread_self(), policy, &sparam);
|
||||
if (s != 0)
|
||||
{
|
||||
perror("pthread_setschedparam : ");
|
||||
exit_fun("Error setting thread priority");
|
||||
}
|
||||
s = pthread_getschedparam(pthread_self(), &policy, &sparam);
|
||||
if (s != 0)
|
||||
{
|
||||
perror("pthread_getschedparam : ");
|
||||
exit_fun("Error getting thread priority");
|
||||
|
||||
}
|
||||
|
||||
LOG_I( HW, "[SCHED][UE] Started UE thread TX on CPU %d TID %ld , sched_policy = %s, priority = %d, CPU Affinity = %s \n", (int)sched_getcpu(), gettid(),
|
||||
(policy == SCHED_FIFO) ? "SCHED_FIFO" :
|
||||
(policy == SCHED_RR) ? "SCHED_RR" :
|
||||
(policy == SCHED_OTHER) ? "SCHED_OTHER" :
|
||||
"???",
|
||||
(int) sparam.sched_priority, cpu_affinity);
|
||||
|
||||
|
||||
#endif
|
||||
#endif
|
||||
@@ -801,9 +941,72 @@ static void *UE_thread_rx(void *arg)
|
||||
}
|
||||
|
||||
#else
|
||||
struct sched_param sp;
|
||||
sp.sched_priority = sched_get_priority_max(SCHED_FIFO)-1;
|
||||
pthread_setschedparam(pthread_self(),SCHED_FIFO,&sp);
|
||||
int policy, s, j;
|
||||
struct sched_param sparam;
|
||||
char cpu_affinity[1024];
|
||||
cpu_set_t cpuset;
|
||||
|
||||
/* Set affinity mask to include CPUs 1 to MAX_CPUS */
|
||||
/* CPU 0 is reserved for UHD threads */
|
||||
CPU_ZERO(&cpuset);
|
||||
|
||||
#ifdef CPU_AFFINITY
|
||||
if (get_nprocs() >2)
|
||||
{
|
||||
for (j = 1; j < get_nprocs(); j++)
|
||||
CPU_SET(j, &cpuset);
|
||||
|
||||
s = pthread_setaffinity_np(pthread_self(), sizeof(cpu_set_t), &cpuset);
|
||||
if (s != 0)
|
||||
{
|
||||
perror( "pthread_setaffinity_np");
|
||||
exit_fun("Error setting processor affinity");
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
/* Check the actual affinity mask assigned to the thread */
|
||||
|
||||
s = pthread_getaffinity_np(pthread_self(), sizeof(cpu_set_t), &cpuset);
|
||||
if (s != 0)
|
||||
{
|
||||
perror( "pthread_getaffinity_np");
|
||||
exit_fun("Error getting processor affinity ");
|
||||
}
|
||||
memset(cpu_affinity, 0 , sizeof(cpu_affinity));
|
||||
for (j = 0; j < CPU_SETSIZE; j++)
|
||||
if (CPU_ISSET(j, &cpuset))
|
||||
{
|
||||
char temp[1024];
|
||||
sprintf(temp, " CPU_%d ", j);
|
||||
strcat(cpu_affinity, temp);
|
||||
}
|
||||
|
||||
memset(&sparam, 0 , sizeof (sparam));
|
||||
sparam.sched_priority = sched_get_priority_max(SCHED_FIFO)-1;
|
||||
policy = SCHED_FIFO ;
|
||||
|
||||
s = pthread_setschedparam(pthread_self(), policy, &sparam);
|
||||
if (s != 0)
|
||||
{
|
||||
perror("pthread_setschedparam : ");
|
||||
exit_fun("Error setting thread priority");
|
||||
}
|
||||
s = pthread_getschedparam(pthread_self(), &policy, &sparam);
|
||||
if (s != 0)
|
||||
{
|
||||
perror("pthread_getschedparam : ");
|
||||
exit_fun("Error getting thread priority");
|
||||
|
||||
}
|
||||
|
||||
LOG_I( HW, "[SCHED][UE] Started UE RX thread on CPU %d TID %ld , sched_policy = %s, priority = %d, CPU Affinity = %s \n", (int)sched_getcpu(), gettid(),
|
||||
(policy == SCHED_FIFO) ? "SCHED_FIFO" :
|
||||
(policy == SCHED_RR) ? "SCHED_RR" :
|
||||
(policy == SCHED_OTHER) ? "SCHED_OTHER" :
|
||||
"???",
|
||||
(int) sparam.sched_priority, cpu_affinity);
|
||||
|
||||
|
||||
#endif
|
||||
#endif
|
||||
@@ -1226,7 +1429,7 @@ void *UE_thread(void *arg)
|
||||
}
|
||||
} else {
|
||||
LOG_E( PHY, "[SCHED][UE] UE RX thread busy (IC %d)!!\n", instance_cnt_rx);
|
||||
if (instance_cnt_rx > 1) {
|
||||
if (instance_cnt_rx > 2) {
|
||||
exit_fun("instance_cnt_rx > 1");
|
||||
return &UE_thread_retval;
|
||||
}
|
||||
@@ -1262,7 +1465,7 @@ void *UE_thread(void *arg)
|
||||
|
||||
} else {
|
||||
LOG_E( PHY, "[SCHED][UE] UE TX thread busy (IC %d)!!\n" );
|
||||
if (instance_cnt_tx>1) {
|
||||
if (instance_cnt_tx>2) {
|
||||
exit_fun("instance_cnt_tx > 1");
|
||||
return &UE_thread_retval;
|
||||
}
|
||||
|
||||
@@ -51,14 +51,6 @@
|
||||
|
||||
#include "SCHED/defs.h"
|
||||
|
||||
#include "MAC_INTERFACE/extern.h"
|
||||
|
||||
#ifdef CBMIMO1
|
||||
#include "ARCH/CBMIMO1/DEVICE_DRIVER/cbmimo1_device.h"
|
||||
#include "ARCH/CBMIMO1/DEVICE_DRIVER/extern.h"
|
||||
#include "ARCH/CBMIMO1/DEVICE_DRIVER/defs.h"
|
||||
#endif // CBMIMO1
|
||||
|
||||
#include "UTIL/LOG/vcd_signal_dumper.h"
|
||||
|
||||
#define DEBUG_PHY
|
||||
|
||||
@@ -51,8 +51,6 @@
|
||||
#include "SCHED/defs.h"
|
||||
#include "SCHED/extern.h"
|
||||
|
||||
#include "MAC_INTERFACE/extern.h"
|
||||
|
||||
#include "UTIL/LOG/vcd_signal_dumper.h"
|
||||
|
||||
RTIME time0,time1;
|
||||
|
||||
@@ -0,0 +1,53 @@
|
||||
[*]
|
||||
[*] GTKWave Analyzer v3.3.58 (w)1999-2014 BSI
|
||||
[*] Sun Mar 20 18:27:06 2016
|
||||
[*]
|
||||
[dumpfile] "/tmp/openair_dump_UE.vcd"
|
||||
[dumpfile_mtime] "Sun Mar 20 18:14:17 2016"
|
||||
[dumpfile_size] 92262400
|
||||
[savefile] "/home/papillon/openairinterface5g/targets/RT/USER/ue_usrp.gtkw"
|
||||
[timestart] 30032830000
|
||||
[size] 1215 640
|
||||
[pos] 105 102
|
||||
*-22.292629 30041590000 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1
|
||||
[sst_width] 224
|
||||
[signals_width] 262
|
||||
[sst_expanded] 1
|
||||
[sst_vpaned_height] 155
|
||||
@24
|
||||
variables.hw_subframe[63:0]
|
||||
@28
|
||||
functions.trx_read
|
||||
functions.trx_write
|
||||
@24
|
||||
variables.subframe_number_RX_UE[63:0]
|
||||
variables.subframe_number_TX_UE[63:0]
|
||||
@28
|
||||
functions.ue_thread_rx
|
||||
functions.ue_thread_tx
|
||||
@420
|
||||
variables.ue_inst_cnt_rx[63:0]
|
||||
variables.ue_inst_cnt_tx[63:0]
|
||||
@28
|
||||
functions.phy_procedures_ue_rx
|
||||
functions.phy_procedures_ue_tx
|
||||
@24
|
||||
variables.frame_number_RX_UE[63:0]
|
||||
variables.frame_number_TX_UE[63:0]
|
||||
@28
|
||||
functions.ue_slot_fep
|
||||
functions.lte_ue_measurement_procedures
|
||||
functions.ue_rrc_measurements
|
||||
functions.ue_gain_control
|
||||
functions.ue_adjust_synch
|
||||
functions.lte_ue_pbch_procedures
|
||||
functions.lte_ue_pdcch_procedures
|
||||
functions.rx_pdcch
|
||||
functions.dci_decoding
|
||||
functions.phy_ue_generate_prach
|
||||
functions.phy_ue_ulsch_encoding
|
||||
functions.phy_ue_ulsch_modulation
|
||||
functions.phy_ue_ulsch_scrambling
|
||||
functions.phy_ue_config_sib2
|
||||
[pattern_trace] 1
|
||||
[pattern_trace] 0
|
||||
@@ -39,7 +39,6 @@
|
||||
#include "PHY/types.h"
|
||||
#include "PHY/defs.h"
|
||||
#include "PHY/extern.h"
|
||||
#include "MAC_INTERFACE/extern.h"
|
||||
|
||||
#ifdef OPENAIR2
|
||||
#include "LAYER2/MAC/defs.h"
|
||||
|
||||
@@ -38,14 +38,11 @@
|
||||
#include "init_lte.h"
|
||||
|
||||
#include "PHY/extern.h"
|
||||
#include "MAC_INTERFACE/extern.h"
|
||||
|
||||
#ifdef OPENAIR2
|
||||
#include "LAYER2/MAC/defs.h"
|
||||
#include "LAYER2/MAC/extern.h"
|
||||
#include "UTIL/LOG/log_if.h"
|
||||
#include "PHY_INTERFACE/extern.h"
|
||||
#endif
|
||||
|
||||
|
||||
|
||||
@@ -76,7 +73,7 @@ PHY_VARS_eNB* init_lte_eNB(LTE_DL_FRAME_PARMS *frame_parms,
|
||||
|
||||
for (i=0; i<NUMBER_OF_UE_MAX; i++) {
|
||||
for (j=0; j<2; j++) {
|
||||
PHY_vars_eNB->dlsch_eNB[i][j] = new_eNB_dlsch(1,NUMBER_OF_HARQ_PID_MAX,NSOFT,frame_parms->N_RB_DL,abstraction_flag);
|
||||
PHY_vars_eNB->dlsch_eNB[i][j] = new_eNB_dlsch(1,8,NSOFT,frame_parms->N_RB_DL,abstraction_flag);
|
||||
|
||||
if (!PHY_vars_eNB->dlsch_eNB[i][j]) {
|
||||
LOG_E(PHY,"Can't get eNB dlsch structures for UE %d \n", i);
|
||||
@@ -87,7 +84,7 @@ PHY_VARS_eNB* init_lte_eNB(LTE_DL_FRAME_PARMS *frame_parms,
|
||||
}
|
||||
}
|
||||
|
||||
PHY_vars_eNB->ulsch_eNB[1+i] = new_eNB_ulsch(NUMBER_OF_HARQ_PID_MAX,MAX_TURBO_ITERATIONS, frame_parms->N_RB_UL, abstraction_flag);
|
||||
PHY_vars_eNB->ulsch_eNB[1+i] = new_eNB_ulsch(MAX_TURBO_ITERATIONS,frame_parms->N_RB_UL, abstraction_flag);
|
||||
|
||||
if (!PHY_vars_eNB->ulsch_eNB[1+i]) {
|
||||
LOG_E(PHY,"Can't get eNB ulsch structures\n");
|
||||
@@ -121,18 +118,18 @@ PHY_VARS_eNB* init_lte_eNB(LTE_DL_FRAME_PARMS *frame_parms,
|
||||
}
|
||||
|
||||
// ULSCH for RA
|
||||
PHY_vars_eNB->ulsch_eNB[0] = new_eNB_ulsch(NUMBER_OF_HARQ_PID_MAX,MAX_TURBO_ITERATIONS, frame_parms->N_RB_UL, abstraction_flag);
|
||||
PHY_vars_eNB->ulsch_eNB[0] = new_eNB_ulsch(MAX_TURBO_ITERATIONS, frame_parms->N_RB_UL, abstraction_flag);
|
||||
|
||||
if (!PHY_vars_eNB->ulsch_eNB[0]) {
|
||||
LOG_E(PHY,"Can't get eNB ulsch structures\n");
|
||||
exit(-1);
|
||||
}
|
||||
|
||||
PHY_vars_eNB->dlsch_eNB_SI = new_eNB_dlsch(1,1,NSOFT,frame_parms->N_RB_DL, abstraction_flag);
|
||||
PHY_vars_eNB->dlsch_eNB_SI = new_eNB_dlsch(1,8,NSOFT,frame_parms->N_RB_DL, abstraction_flag);
|
||||
LOG_D(PHY,"eNB %d : SI %p\n",eNB_id,PHY_vars_eNB->dlsch_eNB_SI);
|
||||
PHY_vars_eNB->dlsch_eNB_ra = new_eNB_dlsch(1,1,NSOFT,frame_parms->N_RB_DL, abstraction_flag);
|
||||
PHY_vars_eNB->dlsch_eNB_ra = new_eNB_dlsch(1,8,NSOFT,frame_parms->N_RB_DL, abstraction_flag);
|
||||
LOG_D(PHY,"eNB %d : RA %p\n",eNB_id,PHY_vars_eNB->dlsch_eNB_ra);
|
||||
PHY_vars_eNB->dlsch_eNB_MCH = new_eNB_dlsch(1,NUMBER_OF_HARQ_PID_MAX,NSOFT,frame_parms->N_RB_DL, 0);
|
||||
PHY_vars_eNB->dlsch_eNB_MCH = new_eNB_dlsch(1,8,NSOFT,frame_parms->N_RB_DL, 0);
|
||||
LOG_D(PHY,"eNB %d : MCH %p\n",eNB_id,PHY_vars_eNB->dlsch_eNB_MCH);
|
||||
|
||||
|
||||
@@ -180,7 +177,7 @@ PHY_VARS_UE* init_lte_UE(LTE_DL_FRAME_PARMS *frame_parms,
|
||||
|
||||
|
||||
|
||||
PHY_vars_UE->ulsch_ue[i] = new_ue_ulsch(NUMBER_OF_HARQ_PID_MAX,frame_parms->N_RB_UL, abstraction_flag);
|
||||
PHY_vars_UE->ulsch_ue[i] = new_ue_ulsch(frame_parms->N_RB_UL, abstraction_flag);
|
||||
|
||||
if (!PHY_vars_UE->ulsch_ue[i]) {
|
||||
LOG_E(PHY,"Can't get ue ulsch structures\n");
|
||||
@@ -250,6 +247,7 @@ void init_lte_vars(LTE_DL_FRAME_PARMS *frame_parms[MAX_NUM_CCs],
|
||||
(frame_parms[CC_id])->phich_config_common.phich_resource = oneSixth;
|
||||
(frame_parms[CC_id])->phich_config_common.phich_duration = normal;
|
||||
(frame_parms[CC_id])->Ncp = extended_prefix_flag;
|
||||
(frame_parms[CC_id])->Ncp_UL = extended_prefix_flag;
|
||||
(frame_parms[CC_id])->Nid_cell = Nid_cell;
|
||||
(frame_parms[CC_id])->nushift = (Nid_cell%6);
|
||||
(frame_parms[CC_id])->nb_antennas_tx = (transmission_mode == 1) ? 1 : 2;
|
||||
|
||||
@@ -53,7 +53,6 @@
|
||||
#include "PHY/defs.h"
|
||||
#include "PHY/LTE_TRANSPORT/proto.h"
|
||||
#include "PHY/vars.h"
|
||||
#include "MAC_INTERFACE/vars.h"
|
||||
|
||||
#include "SIMULATION/ETH_TRANSPORT/proto.h"
|
||||
|
||||
|
||||
@@ -73,7 +73,7 @@ int ulsch_abstraction(double* sinr_dB,uint8_t TM, uint8_t mcs,uint16_t nb_rb, ui
|
||||
|
||||
void calc_path_loss(node_desc_t* node_tx, node_desc_t* node_rx, channel_desc_t *ch_desc, Environment_System_Config env_desc, double **SF);
|
||||
|
||||
void do_OFDM_mod(mod_sym_t **txdataF, int32_t **txdata, frame_t frame, uint16_t next_slot, LTE_DL_FRAME_PARMS *frame_parms);
|
||||
void do_OFDM_mod(int32_t **txdataF, int32_t **txdata, frame_t frame, uint16_t next_slot, LTE_DL_FRAME_PARMS *frame_parms);
|
||||
|
||||
void reset_opp_meas(void);
|
||||
void print_opp_meas(void);
|
||||
|
||||
@@ -51,7 +51,6 @@
|
||||
#include "oaisim_functions.h"
|
||||
|
||||
#include "PHY/extern.h"
|
||||
#include "MAC_INTERFACE/extern.h"
|
||||
#include "LAYER2/MAC/extern.h"
|
||||
#ifdef OPENAIR2
|
||||
#include "LAYER2/MAC/proto.h"
|
||||
|
||||
@@ -40,7 +40,6 @@
|
||||
#include "PHY/types.h"
|
||||
#include "PHY/defs.h"
|
||||
#include "PHY/extern.h"
|
||||
#include "MAC_INTERFACE/extern.h"
|
||||
#include "oaisim_config.h"
|
||||
|
||||
#ifdef OPENAIR2
|
||||
|
||||
Reference in New Issue
Block a user