Commit 52754797 authored by Cedric Roux's avatar Cedric Roux
Browse files

Merge remote-tracking branch 'origin/develop_integration_2019_w06' into develop

merge:
- enhancement-ltem
parents 05f395b2 26e9fe81
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";
plmn_list = ( { mcc = 208; mnc = 93; mnc_length = 2;} );
tr_s_preference = "local_mac"
////////// Physical parameters:
component_carriers = (
{
node_function = "3GPP_eNodeB";
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 = 13;
downlink_frequency = 751000000L;
uplink_frequency_offset = 31000000;
Nid_cell = 0;
N_RB_DL = 50;
Nid_cell_mbsfn = 0;
nb_antenna_ports = 1;
nb_antennas_tx = 1;
nb_antennas_rx = 1;
tx_gain = 90;
rx_gain = 110;
pbch_repetition = "FALSE";
prach_root = 0;
prach_config_index = 0;
prach_high_speed = "DISABLE";
prach_zero_correlation = 1;
prach_freq_offset = 1;
pucch_delta_shift = 1;
pucch_nRB_CQI = 1;
pucch_nCS_AN = 0;
pucch_n1_AN = 32;
pdsch_referenceSignalPower = -27;
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 = -96;
pusch_alpha = "AL1";
pucch_p0_Nominal = -104;
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 = "n64"; #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 = "rf128"; #128
pcch_nB = "oneT";
bcch_modificationPeriodCoeff = 2;
ue_TimersAndConstants_t300 = "ms1000";
ue_TimersAndConstants_t301 = "ms1000";
ue_TimersAndConstants_t310 = "ms1000";
ue_TimersAndConstants_t311 = "ms10000";
ue_TimersAndConstants_n310 = "n20";
ue_TimersAndConstants_n311 = "n1";
ue_TransmissionMode = "tm1";
# eMTC Parameters
emtc_parameters :
{
eMTC_configured = 1;
#hyperSFN_r13 = 0;
#eDRX_Allowed_r13 = 0;
#q_QualMinRSRQ_CE_r13 = ;
#SIB1
schedulingInfoSIB1_BR_r13 = 4;
#system_info_value_tag_SI =
#(
# {
# systemInfoValueTagSi_r13 = 0;
# }
#);
cellSelectionInfoCE_r13 = "ENABLE";
q_RxLevMinCE_r13 = -70;
bandwidthReducedAccessRelatedInfo_r13 = "ENABLE"
si_WindowLength_BR_r13 = "ms20"; #0
si_RepetitionPattern_r13 = "everyRF"; #0
scheduling_info_br =
(
{
si_Narrowband_r13 = 8;
si_TBS_r13 = 5;
}
);
fdd_DownlinkOrTddSubframeBitmapBR_r13 = "subframePattern40-r13";
fdd_DownlinkOrTddSubframeBitmapBR_val_r13 = 0xFFFFFFFFFF;
startSymbolBR_r13 = 2;
si_HoppingConfigCommon_r13 = "off"; #1; # Note: 1==OFF !
si_ValidityTime_r13 = "true"; #0
freqHoppingParametersDL_r13 = "DISABLE"
mpdcch_pdsch_HoppingNB_r13 = "nb2"; #0
interval_DLHoppingConfigCommonModeA_r13 = "interval-FDD-r13"
interval_DLHoppingConfigCommonModeA_r13_val = 0;
interval_DLHoppingConfigCommonModeB_r13 = "interval-FDD-r13"
interval_DLHoppingConfigCommonModeB_r13_val = 0;
mpdcch_pdsch_HoppingOffset_r13 = 1;
# SIB23
frame_type = "FDD";
preambleTransMax_CE_r13 = 10; #6
rach_numberOfRA_Preambles = 60; #14
rach_powerRampingStep = 4;
rach_preambleInitialReceivedTargetPower = -110;
rach_preambleTransMax = 10;
rach_raResponseWindowSize = 10;
rach_macContentionResolutionTimer = 64;
rach_maxHARQ_Msg3Tx = 4;
# max size for this array is 4
rach_CE_LevelInfoList_r13 =
(
{
firstPreamble_r13 = 60;
lastPreamble_r13 = 63;
ra_ResponseWindowSize_r13 = 20; #0
mac_ContentionResolutionTimer_r13 = 80; #0
rar_HoppingConfig_r13 = "off"; #1;
}
);
# BCCH CONFIG
bcch_modificationPeriodCoeff = 2;
#PCCH Config
pcch_default_PagingCycle = "rf128"; #128
pcch_nB = "oneT";
#PRACH Config
prach_root = 89;
prach_config_index = 0;
prach_high_speed = "DISABLE";
prach_zero_correlation = 1;
prach_freq_offset = 1;
#PDSCH Config Common
pdsch_referenceSignalPower = -27
pdsch_p_b = 0;
# PUSCH Config Common
pusch_n_SB = 1;
pusch_hoppingMode = "interSubFrame";
pusch_hoppingOffset = 0;
pusch_enable64QAM = "DISABLE";
pusch_groupHoppingEnabled = "ENABLE";
pusch_groupAssignment = 0;
pusch_sequenceHoppingEnabled = "DISABLE";
pusch_nDMRS1 = 1;
# PUCCH Config Common
pucch_delta_shift = 1;
pucch_nRB_CQI = 0;
pucch_nCS_AN = 0;
pucch_n1_AN = 32;
pusch_p0_Nominal = -96;
pusch_alpha = "AL1";
pucch_p0_Nominal = -104;
pucch_deltaF_Format1 = "deltaF0";
pucch_deltaF_Format1b = "deltaF3";
pucch_deltaF_Format2 = "deltaF0";
pucch_deltaF_Format2a = "deltaF0";
pucch_deltaF_Format2b = "deltaF0";
msg3_delta_Preamble = 6;
prach_ConfigCommon_v1310 = "ENABLE";
mpdcch_startSF_CSS_RA_r13 = "fdd-r13";
mpdcch_startSF_CSS_RA_r13_val = "v1"; #0
prach_HoppingOffset_r13 = 0;
pdsch_maxNumRepetitionCEmodeA_r13 = "r16"; #0
#pdsch_maxNumRepetitionCEmodeB_r13 = "r384"; # NULL - 2
pusch_maxNumRepetitionCEmodeA_r13 = "r8"; #0
#pusch_maxNumRepetitionCEmodeB_r13 = "r768"; #4 #NULL
#pusch_HoppingOffset_v1310 = 5; #NULL
# max size for this array is 3
rsrp_range_list =
(
{
rsrp_range_br = 0;
}
);
# max size for this array is 4
prach_parameters_ce_r13 =
(
{
prach_config_index_br = 3;
prach_freq_offset_br = 2;
prach_StartingSubframe_r13 = 2;
maxNumPreambleAttemptCE_r13 = 10; #6
numRepetitionPerPreambleAttempt_r13 = 1; #0
mpdcch_NumRepetition_RA_r13 = 1; #0
prach_HoppingConfig_r13 = 0; #1
max_available_narrow_band = [3];
}
);
n1PUCCH_AN_InfoList_r13 =
(
{
pucch_info_value = 0;
}
);
ue_TimersAndConstants_t300 = "ms1000";
ue_TimersAndConstants_t301 = "ms400";
ue_TimersAndConstants_t310 = "ms50";
ue_TimersAndConstants_t311 = "ms30000";
ue_TimersAndConstants_n310 = "n1";
ue_TimersAndConstants_n311 = "n10";
ue_TransmissionMode = "tm1";
pcch_config_v1310 :
{
paging_narrowbands_r13 = 1;
mpdcch_numrepetition_paging_r13 = "r1"; #0
#nb_v1310 = "one256thT"; #2
}
pucch_NumRepetitionCE_Msg4_Level0_r13 = "n1"; #0
#pucch_NumRepetitionCE_Msg4_Level1_r13 = "n2"; #1
#pucch_NumRepetitionCE_Msg4_Level2_r13 = "n16"; #2
#pucch_NumRepetitionCE_Msg4_Level3_r13 = "n32"; #3
sib2_freq_hoppingParameters_r13 :
{
#sib2_mpdcch_pdsch_hoppingNB_r13 = "nb2"; #0
#sib2_interval_DLHoppingConfigCommonModeA_r13 = "FDD"; # choice -> (0, FDD) (1, TDD)
#sib2_interval_DLHoppingConfigCommonModeA_r13_val = "int1";
#sib2_interval_DLHoppingConfigCommonModeB_r13 = "FDD"; # choice -> (0, FDD) (1, TDD)
#sib2_interval_DLHoppingConfigCommonModeB_r13_val = "int2";
sib2_interval_ULHoppingConfigCommonModeA_r13 = "FDD"; # choice -> (0, FDD) (1, TDD)
sib2_interval_ULHoppingConfigCommonModeA_r13_val = "int4"; #2
# sib2_interval_ULHoppingConfigCommonModeB_r13 = "FDD"; # choice -> (0, FDD) (1, TDD)
# sib2_interval_ULHoppingConfigCommonModeB_r13_val = "int2"; #0
# sib2_mpdcch_pdsch_hoppingOffset_r13 = 1;
}
rach_preamblesGroupAConfig = "DISABLE";
phich_duration = "NORMAL";
phich_resource = "ONESIXTH";
srs_enable = "DISABLE";
}
}
);
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 = "CI_MME_IP_ADDR";
ipv6 = "192:168:30::17";
active = "yes";
preference = "ipv4";
}
);
NETWORK_INTERFACES :
{
ENB_INTERFACE_NAME_FOR_S1_MME = "eth0";
ENB_IPV4_ADDRESS_FOR_S1_MME = "CI_ENB_IP_ADDR";
ENB_INTERFACE_NAME_FOR_S1U = "eth0";
ENB_IPV4_ADDRESS_FOR_S1U = "CI_ENB_IP_ADDR";
ENB_PORT_FOR_S1U = 2152; # Spec 2152
ENB_IPV4_ADDRESS_FOR_X2C = "CI_ENB_IP_ADDR";
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";
};
}
);
MACRLCs = (
{
num_cc = 1;
tr_s_preference = "local_L1";
tr_n_preference = "local_RRC";
phy_test_mode = 0;
puSch10xSnr = 200;
puCch10xSnr = 200;
}
);
L1s = (
{
num_cc = 1;
tr_n_preference = "local_mac";
}
);
RUs = (
{
local_rf = "yes"
nb_tx = 1
nb_rx = 1
att_tx = 0
att_rx = 0;
bands = [13];
max_pdschReferenceSignalPower = -27;
max_rxgain = 125;
eNB_instances = [0];
}
);
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";
};
......@@ -1372,6 +1372,8 @@ set (MAC_SRC_UE
set (ENB_APP_SRC
${OPENAIR2_DIR}/ENB_APP/enb_app.c
${OPENAIR2_DIR}/ENB_APP/enb_config.c
${OPENAIR2_DIR}/ENB_APP/enb_config_SL.c
${OPENAIR2_DIR}/ENB_APP/enb_config_eMTC.c
${OPENAIR2_DIR}/ENB_APP/RRC_config_tools.c
)
......
File mode changed from 100755 to 100644
File mode changed from 100644 to 100755
File mode changed from 100755 to 100644
File mode changed from 100644 to 100755
File mode changed from 100755 to 100644
File mode changed from 100755 to 100644
......@@ -32,21 +32,6 @@
#include "PHY/types.h"
// For initialization && verification purposes, bit by bit implementation with any polynomial
// The first bit is in the MSB of each byte
// Reference 38.212 V15.1.1 Section 5.1 (36-212 v8.6.0 , pp 8-9)
// The highest degree is set by default
/** 1000 0110 0100 1100 1111 1011 D^24 + D^23 + D^18 + D^17 + D^14 + D^11 + D^10 + D^7 + D^6 + D^5 + D^4 + D^3 + D + 1 */
static const uint32_t poly24a = 0x864cfb00;
/** 1000 0000 0000 0000 0110 0011 D^24 + D^23 + D^6 + D^5 + D + 1 */
static const uint32_t poly24b = 0x80006300;
/** 0001 0000 0010 0001 D^16 + D^12 + D^5 + 1 */
static const uint32_t poly16 = 0x10210000;
/** 1000 0000 1111 D^12 + D^11 + D^3 + D^2 + D + 1 */
static const uint32_t poly12 = 0x80F00000;
/** 1001 1011 D^8 + D^7 + D^4 + D^3 + D + 1 */
static const uint32_t poly8 = 0x9B000000;
// The following arrays are generated with the function 'crcTableInit'
/** Encoding table for CRC 24A */
......@@ -96,6 +81,24 @@ uint32_t crcbit (uint8_t * inputptr, int32_t octetlen, uint32_t poly)
// CRC table initialization
/*
RK: Note that this should be brought back and use crcTableInit instead of static declaration
Commented out to remove warning
// For initialization && verification purposes, bit by bit implementation with any polynomial
// The first bit is in the MSB of each byte
// Reference 38.212 V15.1.1 Section 5.1 (36-212 v8.6.0 , pp 8-9)
// The highest degree is set by default
// 1000 0110 0100 1100 1111 1011 D^24 + D^23 + D^18 + D^17 + D^14 + D^11 + D^10 + D^7 + D^6 + D^5 + D^4 + D^3 + D + 1
static const uint32_t poly24a = 0x864cfb00;
// 1000 0000 0000 0000 0110 0011 D^24 + D^23 + D^6 + D^5 + D + 1
static const uint32_t poly24b = 0x80006300;
// 0001 0000 0010 0001 D^16 + D^12 + D^5 + 1
static const uint32_t poly16 = 0x10210000;
// 1000 0000 1111 D^12 + D^11 + D^3 + D^2 + D + 1
static const uint32_t poly12 = 0x80F00000;
// 1001 1011 D^8 + D^7 + D^4 + D^3 + D + 1
static const uint32_t poly8 = 0x9B000000;
void crcTableInit (void)
{
uint8_t c = 0;
......
......@@ -492,7 +492,7 @@ uint32_t lte_rate_matching_turbo(uint32_t RTC,
Gp = G/Nl/Qm;
GpmodC = Gp%C;
#ifdef RM_DEBUG
printf("lte_rate_matching_turbo: Ncb %d, Kw %d, Nir/C %d, rvidx %d, G %d, Qm %d, Nl%d, r %d\n",Ncb,3*(RTC<<5),Nir/C,rvidx, G, Qm,Nl,r);
LOG_D(PHY,"lte_rate_matching_turbo: Ncb %d, Kw %d, Nir/C %d, rvidx %d, G %d, Qm %d, Nl%d, r %d\n",Ncb,3*(RTC<<5),Nir/C,rvidx, G, Qm,Nl,r);
#endif
if (r < (C-(GpmodC)))
......
......@@ -40,12 +40,14 @@ extern int32_t get_uldl_offset(int eutra_bandP);
extern uint16_t prach_root_sequence_map0_3[838];
extern uint16_t prach_root_sequence_map4[138];
uint8_t dmrs1_tab[8] = {0,2,3,4,6,8,9,10};
uint8_t dmrs1_tab[8] = { 0, 2, 3, 4, 6, 8, 9, 10 };
int N_RB_DL_array[6] = {6,15,25,50,75,100};
int N_RB_DL_array[6] = { 6, 15, 25, 50, 75, 100 };
int l1_north_init_eNB() {
int
l1_north_init_eNB ()
{
int i,j;
......@@ -85,8 +87,8 @@ int l1_north_init_eNB() {
void phy_config_request(PHY_Config_t *phy_config) {
uint8_t Mod_id = phy_config->Mod_id;
int CC_id = phy_config->CC_id;
uint8_t Mod_id = phy_config->Mod_id;
int CC_id = phy_config->CC_id;
nfapi_config_request_t *cfg = phy_config->cfg;
......@@ -105,9 +107,9 @@ void phy_config_request(PHY_Config_t *phy_config) {
cfg->phich_config.phich_resource.value,
cfg->phich_config.phich_duration.value);
AssertFatal(RC.eNB != NULL, "PHY instance pointer doesn't exist\n");
AssertFatal(RC.eNB[Mod_id] != NULL, "PHY instance %d doesn't exist\n",Mod_id);
AssertFatal(RC.eNB[Mod_id][CC_id] != NULL, "PHY instance %d, CCid %d doesn't exist\n",Mod_id,CC_id);
AssertFatal (RC.eNB != NULL, "PHY instance pointer doesn't exist\n");
AssertFatal (RC.eNB[Mod_id] != NULL, "PHY instance %d doesn't exist\n", Mod_id);
AssertFatal (RC.eNB[Mod_id][CC_id] != NULL, "PHY instance %d, CCid %d doesn't exist\n", Mod_id, CC_id);
if (RC.eNB[Mod_id][CC_id]->configured == 1)
......@@ -116,7 +118,7 @@ void phy_config_request(PHY_Config_t *phy_config) {
return;
}
RC.eNB[Mod_id][CC_id]->mac_enabled = 1;
RC.eNB[Mod_id][CC_id]->mac_enabled = 1;
fp = &RC.eNB[Mod_id][CC_id]->frame_parms;
......@@ -129,164 +131,157 @@ void phy_config_request(PHY_Config_t *phy_config) {
fp->Ncp_UL = Ncp;
fp->nb_antenna_ports_eNB = p_eNB;
fp->threequarter_fs = 0;
fp->threequarter_fs = 0;
AssertFatal(cfg->phich_config.phich_resource.value<4, "Illegal phich_Resource\n");
AssertFatal (cfg->phich_config.phich_resource.value < 4, "Illegal phich_Resource\n");
fp->phich_config_common.phich_resource = phich_resource_table[cfg->phich_config.phich_resource.value];
fp->phich_config_common.phich_duration = cfg->phich_config.phich_duration.value;
// Note: "from_earfcn" has to be in a common library with MACRLC
fp->dl_CarrierFreq = from_earfcn(eutra_band,dl_CarrierFreq);
fp->ul_CarrierFreq = fp->dl_CarrierFreq - (get_uldl_offset(eutra_band)*100000);
fp->dl_CarrierFreq = from_earfcn (eutra_band, dl_CarrierFreq);
fp->ul_CarrierFreq = fp->dl_CarrierFreq - (get_uldl_offset (eutra_band) * 100000);
fp->tdd_config = 0;
fp->tdd_config_S = 0;
fp->tdd_config = 0;
fp->tdd_config_S = 0;
if (fp->dl_CarrierFreq==fp->ul_CarrierFreq)
if (fp->dl_CarrierFreq == fp->ul_CarrierFreq)
fp->frame_type = TDD;
else
fp->frame_type = FDD;
init_frame_parms(fp,1);
init_lte_top(fp);
init_frame_parms (fp, 1);
init_lte_top (fp);
if (cfg->subframe_config.duplex_mode.value == 0) {
fp->tdd_config = cfg->tdd_frame_structure_config.subframe_assignment.value;
fp->tdd_config_S = cfg->tdd_frame_structure_config.special_subframe_patterns.value;
fp->frame_type = TDD;
}
else {
fp->frame_type = FDD;
fp->tdd_config = cfg->tdd_frame_structure_config.subframe_assignment.value;