Commit d14ed1d5 authored by Laurent THOMAS's avatar Laurent THOMAS

merge with harmony main branch

parents 6da3f494 bf220352
......@@ -965,7 +965,7 @@ int phy_init_lte_ue(PHY_VARS_UE *ue,
int i,j,k;
int eNB_id;
msg("Initializing UE vars (abstraction %"PRIu8") for eNB TXant %"PRIu8", UE RXant %"PRIu8"\n",abstraction_flag,frame_parms->nb_antennas_tx,frame_parms->nb_antennas_rx);
printf("Initializing UE vars (abstraction %"PRIu8") for eNB TXant %"PRIu8", UE RXant %"PRIu8"\n",abstraction_flag,frame_parms->nb_antennas_tx,frame_parms->nb_antennas_rx);
LOG_D(PHY,"[MSC_NEW][FRAME 00000][PHY_UE][MOD %02u][]\n", ue->Mod_id+NB_eNB_INST);
// many memory allocation sizes are hard coded
......@@ -1199,8 +1199,8 @@ int phy_init_lte_eNB(PHY_VARS_eNB *eNB,
common_vars->txdata[eNB_id][i] = (int32_t*)malloc16_clear( FRAME_LENGTH_COMPLEX_SAMPLES*sizeof(int32_t) );
common_vars->txdataF[eNB_id][i] = (int32_t*)malloc16_clear( FRAME_LENGTH_COMPLEX_SAMPLES_NO_PREFIX*sizeof(int32_t) );
#ifdef DEBUG_PHY
msg("[openair][LTE_PHY][INIT] common_vars->txdata[%d][%d] = %p\n",eNB_id,i,common_vars->txdata[eNB_id][i]);
msg("[openair][LTE_PHY][INIT] common_vars->txdataF[%d][%d] = %p (%d bytes)\n",
printf("[openair][LTE_PHY][INIT] common_vars->txdata[%d][%d] = %p\n",eNB_id,i,common_vars->txdata[eNB_id][i]);
printf("[openair][LTE_PHY][INIT] common_vars->txdataF[%d][%d] = %p (%d bytes)\n",
eNB_id,i,common_vars->txdataF[eNB_id][i],
FRAME_LENGTH_COMPLEX_SAMPLES_NO_PREFIX*sizeof(int32_t));
#endif
......@@ -1221,8 +1221,8 @@ int phy_init_lte_eNB(PHY_VARS_eNB *eNB,
common_vars->rxdataF[eNB_id][i] = (int32_t*)malloc16_clear(sizeof(int32_t)*(frame_parms->ofdm_symbol_size*frame_parms->symbols_per_tti) );
#ifdef DEBUG_PHY
msg("[openair][LTE_PHY][INIT] common_vars->rxdata[%d][%d] = %p\n",eNB_id,i,common_vars->rxdata[eNB_id][i]);
msg("[openair][LTE_PHY][INIT] common_vars->rxdata_7_5kHz[%d][%d] = %p\n",eNB_id,i,common_vars->rxdata_7_5kHz[eNB_id][i]);
printf("[openair][LTE_PHY][INIT] common_vars->rxdata[%d][%d] = %p\n",eNB_id,i,common_vars->rxdata[eNB_id][i]);
printf("[openair][LTE_PHY][INIT] common_vars->rxdata_7_5kHz[%d][%d] = %p\n",eNB_id,i,common_vars->rxdata_7_5kHz[eNB_id][i]);
#endif
}
......@@ -1272,7 +1272,7 @@ int phy_init_lte_eNB(PHY_VARS_eNB *eNB,
for (i=0; i<frame_parms->nb_antennas_rx; i++) {
prach_vars->rxsigF[i] = (int16_t*)malloc16_clear( frame_parms->ofdm_symbol_size*12*2*sizeof(int16_t) );
#ifdef DEBUG_PHY
msg("[openair][LTE_PHY][INIT] prach_vars->rxsigF[%d] = %p\n",i,prach_vars->rxsigF[i]);
printf("[openair][LTE_PHY][INIT] prach_vars->rxsigF[%d] = %p\n",i,prach_vars->rxsigF[i]);
#endif
}
......@@ -1282,7 +1282,7 @@ int phy_init_lte_eNB(PHY_VARS_eNB *eNB,
for (i=0; i<frame_parms->nb_antennas_rx; i++) {
prach_vars->prach_ifft[i] = (int16_t*)malloc16_clear(1024*2*sizeof(int16_t));
#ifdef DEBUG_PHY
msg("[openair][LTE_PHY][INIT] prach_vars->prach_ifft[%d] = %p\n",i,prach_vars->prach_ifft[i]);
printf("[openair][LTE_PHY][INIT] prach_vars->prach_ifft[%d] = %p\n",i,prach_vars->prach_ifft[i]);
#endif
}
......@@ -1365,11 +1365,11 @@ int phy_init_lte_eNB(PHY_VARS_eNB *eNB,
if (eNB->dl_precoder_SeNB[eNB_id]) {
#ifdef DEBUG_PHY
msg("[openair][SECSYS_PHY][INIT] eNB->dl_precoder_SeNB[%d] allocated at %p\n",eNB_id,
printf("[openair][SECSYS_PHY][INIT] eNB->dl_precoder_SeNB[%d] allocated at %p\n",eNB_id,
eNB->dl_precoder_SeNB[eNB_id]);
#endif
} else {
msg("[openair][SECSYS_PHY][INIT] eNB->dl_precoder_SeNB[%d] not allocated\n",eNB_id);
printf("[openair][SECSYS_PHY][INIT] eNB->dl_precoder_SeNB[%d] not allocated\n",eNB_id);
return(-1);
}
......@@ -1378,12 +1378,12 @@ int phy_init_lte_eNB(PHY_VARS_eNB *eNB,
if (eNB->dl_precoder_SeNB[eNB_id][j]) {
#ifdef DEBUG_PHY
msg("[openair][LTE_PHY][INIT] eNB->dl_precoder_SeNB[%d][%d] allocated at %p\n",eNB_id,j,
printf("[openair][LTE_PHY][INIT] eNB->dl_precoder_SeNB[%d][%d] allocated at %p\n",eNB_id,j,
eNB->dl_precoder_SeNB[eNB_id][j]);
#endif
memset(eNB->dl_precoder_SeNB[eNB_id][j],0,2*sizeof(int)*(eNB->frame_parms.ofdm_symbol_size));
} else {
msg("[openair][LTE_PHY][INIT] eNB->dl_precoder_SeNB[%d][%d] not allocated\n",eNB_id,j);
printf("[openair][LTE_PHY][INIT] eNB->dl_precoder_SeNB[%d][%d] not allocated\n",eNB_id,j);
return(-1);
}
} //for(j=...nb_antennas_tx
......
......@@ -256,6 +256,8 @@ typedef struct eNB_proc_t_s {
int instance_cnt_asynch_rxtx;
/// pthread structure for FH processing thread
pthread_t pthread_FH;
/// pthread structure for eNB single processing thread
pthread_t pthread_single;
/// pthread structure for asychronous RX/TX processing thread
pthread_t pthread_asynch_rxtx;
/// flag to indicate first RX acquisition
......@@ -264,12 +266,16 @@ typedef struct eNB_proc_t_s {
int first_tx;
/// pthread attributes for FH processing thread
pthread_attr_t attr_FH;
/// pthread attributes for single eNB processing thread
pthread_attr_t attr_single;
/// pthread attributes for prach processing thread
pthread_attr_t attr_prach;
/// pthread attributes for asynchronous RX thread
pthread_attr_t attr_asynch_rxtx;
/// scheduling parameters for FH thread
struct sched_param sched_param_FH;
/// scheduling parameters for single eNB thread
struct sched_param sched_param_single;
/// scheduling parameters for prach thread
struct sched_param sched_param_prach;
/// scheduling parameters for asynch_rxtx thread
......@@ -363,6 +369,7 @@ typedef struct PHY_VARS_eNB_s {
eNB_proc_t proc;
eNB_func_t node_function;
eNB_timing_t node_timing;
int single_thread_flag;
openair0_rf_map rf_map;
int abstraction_flag;
void (*do_prach)(struct PHY_VARS_eNB_s *eNB);
......
......@@ -1101,15 +1101,18 @@ void phy_procedures_eNB_TX(PHY_VARS_eNB *eNB,
LTE_DL_FRAME_PARMS *fp=&eNB->frame_parms;
DCI_ALLOC_t *dci_alloc=(DCI_ALLOC_t *)NULL;
int offset = proc == &eNB->proc.proc_rxtx[0] ? 0 : 1;
#if defined(SMBV)
// counts number of allocations in subframe
// there is at least one allocation for PDCCH
uint8_t smbv_alloc_cnt = 1;
uint8_t smbv_alloc_cnt = 1;Exiting eNB thread RXn_TXnp4
#endif
if ((fp->frame_type == TDD) && (subframe_select(fp,subframe)!=SF_DL)) return;
VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME(VCD_SIGNAL_DUMPER_FUNCTIONS_PHY_PROCEDURES_ENB_TX+(subframe&1),1);
VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME(VCD_SIGNAL_DUMPER_FUNCTIONS_PHY_PROCEDURES_ENB_TX+offset,1);
start_meas(&eNB->phy_proc_tx);
T(T_ENB_PHY_DL_TICK, T_INT(eNB->Mod_id), T_INT(frame), T_INT(subframe));
......@@ -1395,7 +1398,7 @@ void phy_procedures_eNB_TX(PHY_VARS_eNB *eNB,
phy_procedures_emos_eNB_TX(subframe, eNB);
#endif
VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME(VCD_SIGNAL_DUMPER_FUNCTIONS_PHY_PROCEDURES_ENB_TX+(subframe&1),0);
VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME(VCD_SIGNAL_DUMPER_FUNCTIONS_PHY_PROCEDURES_ENB_TX+offset,0);
stop_meas(&eNB->phy_proc_tx);
}
......@@ -2584,19 +2587,18 @@ void phy_procedures_eNB_common_RX(PHY_VARS_eNB *eNB){
eNB_proc_t *proc = &eNB->proc;
LTE_DL_FRAME_PARMS *fp=&eNB->frame_parms;
LTE_DL_FRAME_PARMS *fp = &eNB->frame_parms;
const int subframe = proc->subframe_rx;
const int frame = proc->frame_rx;
int offset = (eNB->single_thread_flag==1) ? 0 : (subframe&1);
if ((fp->frame_type == TDD) && (subframe_select(fp,subframe)!=SF_UL)) return;
VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME( VCD_SIGNAL_DUMPER_FUNCTIONS_PHY_PROCEDURES_ENB_RX_COMMON+(subframe&1), 1 );
VCD_SIGNAL_DUMPER_DUMP_VARIABLE_BY_NAME( VCD_SIGNAL_DUMPER_VARIABLES_FRAME_NUMBER_RX0_ENB+offset, proc->frame_rx );
VCD_SIGNAL_DUMPER_DUMP_VARIABLE_BY_NAME( VCD_SIGNAL_DUMPER_VARIABLES_SUBFRAME_NUMBER_RX0_ENB+offset, proc->subframe_rx );
VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME( VCD_SIGNAL_DUMPER_FUNCTIONS_PHY_PROCEDURES_ENB_RX_COMMON+offset, 1 );
start_meas(&eNB->phy_proc_rx);
LOG_D(PHY,"[eNB %d] Frame %d: Doing phy_procedures_eNB_common_RX(%d)\n",eNB->Mod_id,frame,subframe);
......@@ -2604,9 +2606,7 @@ void phy_procedures_eNB_common_RX(PHY_VARS_eNB *eNB){
if (eNB->do_prach) eNB->do_prach(eNB);
VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME( VCD_SIGNAL_DUMPER_FUNCTIONS_PHY_PROCEDURES_ENB_RX_COMMON+(subframe&1), 0 );
VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME( VCD_SIGNAL_DUMPER_FUNCTIONS_PHY_PROCEDURES_ENB_RX_COMMON+offset, 0 );
}
......@@ -2624,10 +2624,11 @@ void phy_procedures_eNB_uespec_RX(PHY_VARS_eNB *eNB,eNB_rxtx_proc_t *proc,const
const int subframe = proc->subframe_rx;
const int frame = proc->frame_rx;
int offset = (proc == &eNB->proc.proc_rxtx[0]) ? 0 : 1;
if ((fp->frame_type == TDD) && (subframe_select(fp,subframe)!=SF_UL)) return;
VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME( VCD_SIGNAL_DUMPER_FUNCTIONS_PHY_PROCEDURES_ENB_RX_UESPEC+(subframe&1), 1 );
VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME( VCD_SIGNAL_DUMPER_FUNCTIONS_PHY_PROCEDURES_ENB_RX_UESPEC+offset, 1 );
start_meas(&eNB->phy_proc_rx);
#ifdef DEBUG_PHY_PROC
LOG_D(PHY,"[eNB %d] Frame %d: Doing phy_procedures_eNB_uespec_RX(%d)\n",eNB->Mod_id,frame, subframe);
......@@ -3189,7 +3190,7 @@ void phy_procedures_eNB_uespec_RX(PHY_VARS_eNB *eNB,eNB_rxtx_proc_t *proc,const
phy_procedures_emos_eNB_RX(subframe,eNB);
#endif
VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME( VCD_SIGNAL_DUMPER_FUNCTIONS_PHY_PROCEDURES_ENB_RX_UESPEC+(subframe&1), 0 );
VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME( VCD_SIGNAL_DUMPER_FUNCTIONS_PHY_PROCEDURES_ENB_RX_UESPEC+offset, 0 );
stop_meas(&eNB->phy_proc_rx);
......
......@@ -2515,8 +2515,9 @@ int main(int argc, char **argv)
proc_eNB->subframe_tx = subframe;
eNB->abstraction_flag=0;
phy_procedures_eNB_TX(eNB,proc_eNB,0,no_relay,NULL);
phy_procedures_eNB_TX(eNB,proc_eNB,no_relay,NULL);
start_meas(&eNB->ofdm_mod_stats);
......@@ -2538,7 +2539,7 @@ int main(int argc, char **argv)
proc_eNB->subframe_tx = subframe+1;
phy_procedures_eNB_TX(eNB,proc_eNB,0,no_relay,NULL);
phy_procedures_eNB_TX(eNB,proc_eNB,no_relay,NULL);
do_OFDM_mod_l(eNB->common_vars.txdataF[eNB_id],
eNB->common_vars.txdata[eNB_id],
......
......@@ -367,6 +367,22 @@ int rrc_mac_remove_ue(module_id_t mod_idP,rnti_t rntiP)
mac_phy_remove_ue(mod_idP,rntiP);
// check if this has an RA process active
RA_TEMPLATE *RA_template;
for (i=0;i<NB_RA_PROC_MAX;i++) {
RA_template = (RA_TEMPLATE *)&eNB_mac_inst[mod_idP].common_channels[pCC_id].RA_template[i];
if ((RA_template->RA_active == TRUE) &&
(RA_template->rnti == rntiP)){
RA_template->RA_active=FALSE;
RA_template->generate_rar=0;
RA_template->generate_Msg4=0;
RA_template->wait_ack_Msg4=0;
RA_template->timing_offset=0;
RA_template->RRC_timer=20;
RA_template->rnti = 0;
break;
}
}
if (ret == 0) {
return (0);
}
......
......@@ -3880,6 +3880,7 @@ rrc_eNB_decode_ccch(
LOG_I(RRC, PROTOCOL_RRC_CTXT_UE_FMT" Can't create new context for UE random UE identity (0x%" PRIx64 ")\n",
PROTOCOL_RRC_CTXT_UE_ARGS(ctxt_pP),
random_value);
rrc_mac_remove_ue(ctxt_pP->module_id,ctxt_pP->rnti);
return -1;
}
}
......@@ -4220,7 +4221,7 @@ rrc_eNB_decode_dcch(
#ifdef RRC_MSG_PRINT
LOG_F(RRC,"[MSG] RRC Security Mode Complete\n");
for (i = 0; i < sdu_sizeP; i++) {
for (i = 0; i < sdu_sizeP; i++) eNB->pusch_vars[UE_id]{
LOG_F(RRC,"%02x ", ((uint8_t*)Rx_sdu)[i]);
}
......
......@@ -31,7 +31,7 @@ eNBs =
tdd_config_s = 0;
prefix_type = "NORMAL";
eutra_band = 7;
downlink_frequency = 2660000000L;
downlink_frequency = 2645000000L;
uplink_frequency_offset = -120000000;
Nid_cell = 0;
N_RB_DL = 100;
......
......@@ -31,7 +31,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;
......
Active_eNBs = ( "eNB_Eurecom_LTEBox");
# Asn1_verbosity, choice in: none, info, annoying
Asn1_verbosity = "none";
eNBs =
(
{
////////// Identification parameters:
eNB_ID = 0xe00;
cell_type = "CELL_MACRO_ENB";
eNB_name = "eNB_Eurecom_LTEBox";
// Tracking area code, 0x0000 and 0xfffe are reserved values
tracking_area_code = "1";
mobile_country_code = "208";
mobile_network_code = "93";
////////// Physical parameters:
component_carriers = (
{
node_function = "NGFI_RRU_IF4p5";
node_timing = "synch_to_ext_device";
node_synch_ref = 0;
frame_type = "FDD";
tdd_config = 3;
tdd_config_s = 0;
prefix_type = "NORMAL";
eutra_band = 7;
downlink_frequency = 2660000000L;
uplink_frequency_offset = -120000000;
Nid_cell = 0;
N_RB_DL = 100;
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";
pucch_p0_Nominal = -96;
msg3_delta_Preamble = 6;
pucch_deltaF_Format1 = "deltaF2";
pucch_deltaF_Format1b = "deltaF3";
pucch_deltaF_Format2 = "deltaF0";
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;
}
);
srb1_parameters :
{
# timer_poll_retransmit = (ms) [5, 10, 15, 20,... 250, 300, 350, ... 500]
timer_poll_retransmit = 80;
# timer_reordering = (ms) [0,5, ... 100, 110, 120, ... ,200]
timer_reordering = 35;
# timer_reordering = (ms) [0,5, ... 250, 300, 350, ... ,500]
timer_status_prohibit = 0;
# poll_pdu = [4, 8, 16, 32 , 64, 128, 256, infinity(>10000)]
poll_pdu = 4;
# poll_byte = (kB) [25,50,75,100,125,250,375,500,750,1000,1250,1500,2000,3000,infinity(>10000)]
poll_byte = 99999;
# max_retx_threshold = [1, 2, 3, 4 , 6, 8, 16, 32]
max_retx_threshold = 4;
}
# ------- SCTP definitions
SCTP :
{
# Number of streams to use in input/output
SCTP_INSTREAMS = 2;
SCTP_OUTSTREAMS = 2;
};
////////// MME parameters:
mme_ip_address = ( { ipv4 = "192.168.12.11";
ipv6 = "192:168:30::17";
active = "yes";
preference = "ipv4";
}
);
NETWORK_INTERFACES :
{
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 = "34:e6:d7:3c:ae:fc";
local_address = "74:d4:35:cc:8d:15";
local_port = 50000; #for raw option local port must be the same to remote
remote_port = 50000;
rrh_gw_active = "yes";
tr_preference = "raw_if4p5";
rf_preference = "usrp_b200";
iq_txshift = 4;
tx_sample_advance = 80;
tx_scheduling_advance = 9;
}
);
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";
};
}
);
Active_eNBs = ( "eNB_Eurecom_LTEBox");
# Asn1_verbosity, choice in: none, info, annoying
Asn1_verbosity = "none";
eNBs =
(
{
////////// Identification parameters:
eNB_ID = 0xe00;
cell_type = "CELL_MACRO_ENB";
eNB_name = "eNB_Eurecom_LTEBox";
// Tracking area code, 0x0000 and 0xfffe are reserved values
tracking_area_code = "1";
mobile_country_code = "208";
mobile_network_code = "93";
////////// Physical parameters:
component_carriers = (
{
node_function = "NGFI_RRU_IF4p5";
node_timing = "synch_to_ext_device";
node_synch_ref = 0;
frame_type = "FDD";
tdd_config = 3;
tdd_config_s = 0;
prefix_type = "NORMAL";
eutra_band = 7;
downlink_frequency = 2660000000L;
uplink_frequency_offset = -120000000;
Nid_cell = 0;
N_RB_DL = 50;
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";
pucch_p0_Nominal = -96;
msg3_delta_Preamble = 6;
pucch_deltaF_Format1 = "deltaF2";
pucch_deltaF_Format1b = "deltaF3";
pucch_deltaF_Format2 = "deltaF0";
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;
}
);
srb1_parameters :
{
# timer_poll_retransmit = (ms) [5, 10, 15, 20,... 250, 300, 350, ... 500]
timer_poll_retransmit = 80;
# timer_reordering = (ms) [0,5, ... 100, 110, 120, ... ,200]
timer_reordering = 35;
# timer_reordering = (ms) [0,5, ... 250, 300, 350, ... ,500]
timer_status_prohibit = 0;
# poll_pdu = [4, 8, 16, 32 , 64, 128, 256, infinity(>10000)]
poll_pdu = 4;
# poll_byte = (kB) [25,50,75,100,125,250,375,500,750,1000,1250,1500,2000,3000,infinity(>10000)]
poll_byte = 99999;
# max_retx_threshold = [1, 2, 3, 4 , 6, 8, 16, 32]
max_retx_threshold = 4;
}
# ------- SCTP definitions
SCTP :
{
# Number of streams to use in input/output
SCTP_INSTREAMS = 2;
SCTP_OUTSTREAMS = 2;
};
////////// MME parameters:
mme_ip_address = ( { ipv4 = "192.168.12.11";
ipv6 = "192:168:30::17";
active = "yes";
preference = "ipv4";
}
);
NETWORK_INTERFACES :
{
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 = "34:e6:d7:3c:ae:fc";
local_address = "74:d4:35:cc:8d:15";
local_port = 50000; #for raw option local port must be the same to remote
remote_port = 50000;
rrh_gw_active = "yes";
tr_preference = "raw_if4p5";
rf_preference = "usrp_b200";
iq_txshift = 4;
tx_sample_advance = 80;
tx_scheduling_advance = 9;
}
);
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";
};
}
);
This diff is collapsed.
......@@ -119,7 +119,7 @@ unsigned short config_frames[4] = {2,9,11,13};
// In lte-enb.c
extern int setup_eNB_buffers(PHY_VARS_eNB **phy_vars_eNB, openair0_config_t *openair0_cfg);
extern void init_eNB(eNB_func_t *, eNB_timing_t *,int,eth_params_t *);
extern void init_eNB(eNB_func_t *, eNB_timing_t *,int,eth_params_t *,int);
extern void stop_eNB(int);
extern void kill_eNB_proc(void);
......@@ -170,7 +170,7 @@ volatile int oai_exit = 0;
static char UE_flag=0;
unsigned int mmapped_dma=0;
//static uint8_t eNB_id=0,UE_id=0;
int single_thread_flag=0;
static char threequarter_fs=0;
......@@ -682,6 +682,7 @@ static void get_options (int argc, char **argv)
LONG_OPTION_LOOPMEMORY,
LONG_OPTION_PHYTEST,
LONG_OPTION_MMAPPED_DMA,
LONG_OPTION_SINGLE_THREAD,
#if T_TRACER
LONG_OPTION_T_PORT,
LONG_OPTION_T_NOWAIT,
......@@ -706,6 +707,7 @@ static void get_options (int argc, char **argv)
{"loop-memory", required_argument, NULL, LONG_OPTION_LOOPMEMORY},
{"phy-test", no_argument, NULL, LONG_OPTION_PHYTEST},
{"mmapped-dma", no_argument, NULL, LONG_OPTION_MMAPPED_DMA},
{"single-thread", no_argument, NULL, LONG_OPTION_SINGLE_THREAD},
#if T_TRACER
{"T_port", required_argument, 0, LONG_OPTION_T_PORT},
{"T_nowait", no_argument, 0, LONG_OPTION_T_NOWAIT},
......@@ -803,6 +805,10 @@ static void get_options (int argc, char **argv)
mmapped_dma = 1;
break;
case LONG_OPTION_SINGLE_THREAD:
single_thread_flag = 1;
break;
#if T_TRACER
case LONG_OPTION_T_PORT: {
extern int T_port;
......@@ -1773,7 +1779,7 @@ int main( int argc, char **argv )
// start the main thread
if (UE_flag == 1) init_UE(1);
else init_eNB(node_function,node_timing,1,eth_params);
else init_eNB(node_function,node_timing,1,eth_params,single_thread_flag);
// Sleep to allow all threads to setup
number_of_cards = 1;
......
[*]
[*] GTKWave Analyzer v3.3.58 (w)1999-2014 BSI
[*] Mon Aug 1 18:43:22 2016
[*]
[dumpfile] "/tmp/openair_dump_eNB.vcd"
[dumpfile_mtime] "Mon Aug 1 18:41:49 2016"
[dumpfile_size] 22622
[savefile] "/home/papillon/openairinterface5g/targets/RT/USER/rru_if4p5_usrp.gtkw"
[timestart] 0
[size] 1301 716
[pos] 309 0
*-19.793451 29983948856 -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] 262
[sst_expanded] 1
[sst_vpaned_height] 294
@28
functions.trx_read
functions.trx_write
functions.trx_write_if
functions.send_if4
functions.trx_read_if
@29
functions.recv_if4
@24
variables.trx_ts[63:0]
variables.trx_tst[63:0]
@28
functions.eNB_thread_rxtx0
@24
variables.frame_number_RX0_eNB[63:0]
variables.subframe_number_RX0_eNB[63:0]
variables.frame_number_TX0_eNB[63:0]
variables.subframe_number_TX0_eNB[63:0]
@28
functions.eNB_thread_rxtx1
@24
variables.frame_number_RX1_eNB[63:0]
variables.subframe_number_RX1_eNB[63:0]
variables.frame_number_TX1_eNB[63:0]
variables.subframe_number_TX1_eNB[63:0]
@28
functions.phy_enb_sfgen
functions.phy_eNB_slot_fep
functions.phy_enb_prach_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]
@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_rs_tx
functions.rrc_mac_config_req
functions.rlc_data_req
functions.udp_enb_task
[pattern_trace] 1
[pattern_trace] 0
[*]
[*] GTKWave Analyzer v3.3.58 (w)1999-2014 BSI
[*] Sun Jul 31 17:45:23 2016
[*]
[dumpfile] "/tmp/openair_dump_eNB.vcd"
[dumpfile_mtime] "Sun Jul 31 17:44:51 2016"
[dumpfile_size] 26766405
[savefile] "/home/papillon/openairinterface5g/targets/RT/USER/rru_if5_usrp.gtkw"
[timestart] 0
[size] 1301 716
[pos] 309 0
*-19.793451 29983948856 -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] 262
[sst_expanded] 1
[sst_vpaned_height] 294
@28
functions.trx_read
functions.trx_write
functions.send_if5
@29
functions.trx_write_if
@28
functions.recv_if5
functions.trx_read_if
@24
variables.trx_ts[63:0]
variables.trx_tst[63:0]
@28
functions.eNB_thread_rxtx0
@24
variables.frame_number_RX0_eNB[63:0]
variables.subframe_number_RX0_eNB[63:0]
variables.frame_number_TX0_eNB[63:0]
variables.subframe_number_TX0_eNB[63:0]
@28
functions.eNB_thread_rxtx1
@24
variables.frame_number_RX1_eNB[63:0]
variables.subframe_number_RX1_eNB[63:0]
variables.frame_number_TX1_eNB[63:0]
variables.subframe_number_TX1_eNB[63:0]
@28
functions.phy_enb_sfgen
functions.phy_eNB_slot_fep
functions.phy_enb_prach_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]
@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_rs_tx
functions.rrc_mac_config_req
functions.rlc_data_req
functions.udp_enb_task
[pattern_trace] 1
[pattern_trace] 0
......@@ -78,8 +78,6 @@ void set_latency_target(void) {
}
#ifndef RTAI
struct timespec interval, next, now, res;
clockid_t clock_id = CLOCK_MONOTONIC; //other options are CLOCK_MONOTONIC, CLOCK_REALTIME, CLOCK_PROCESS_CPUTIME_ID, CLOCK_THREAD_CPUTIME_ID
RTIME rt_get_time_ns (void)
......@@ -257,12 +255,7 @@ int sched_getattr(pid_t pid,struct sched_attr *attr,unsigned int size, unsigned
#endif
#else
int rt_sleep_ns(RTIME x)
{
rt_sleep(nano2count(x));
return(0);
}
#endif
......@@ -28,7 +28,7 @@
*******************************************************************************/
/*! \file rt_wrapper.h
* \brief provides a wrapper for the timing function for real-time opeartions depending on weather RTAI is used or not. It also implements an API for the SCHED_DEADLINE kernel scheduler.
* \brief provides a wrapper for the timing function for real-time opeartions. It also implements an API for the SCHED_DEADLINE kernel scheduler.
* \author F. Kaltenberger and Navid Nikaein
* \date 2013
* \version 0.1
......@@ -39,9 +39,8 @@
*/
void set_latency_target(void);
#ifndef RTAI
#define _GNU_SOURCE
#include <time.h>
#include <errno.h>
#include <stdint.h>
......@@ -52,11 +51,26 @@ void set_latency_target(void);
#include <linux/types.h>
#include <syscall.h>
#include <math.h>
#include <sched.h>
#include <sys/ioctl.h>
#include <sys/types.h>
#include <sys/mman.h>
#include <sched.h>
#include <linux/sched.h>
#include <signal.h>
#include <execinfo.h>
#include <getopt.h>
#include <sys/sysinfo.h>
#include "UTIL/LOG/log_extern.h"
#include "msc.h"
#define RTIME long long int
#define rt_printk printf
void set_latency_target(void);
RTIME rt_get_time_ns (void);
int rt_sleep_ns (RTIME x);
......@@ -115,12 +129,3 @@ int sched_getattr(pid_t pid,struct sched_attr *attr,unsigned int size, unsigned
#define gettid() syscall(__NR_gettid) // for gettid
#else
#include <rtai_hal.h>
#include <rtai_lxrt.h>
#include <rtai_sem.h>
#include <rtai_msg.h>
int rt_sleep_ns(RTIME x);
#endif
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment