Merge remote-tracking branch 'origin/develop_integration_2019_w06' into develop
merge: - enhancement-ltem
@@ -0,0 +1,443 @@
|
||||
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
|
||||
)
|
||||
|
||||
|
||||
@@ -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;
|
||||
fp->tdd_config_S = cfg->tdd_frame_structure_config.special_subframe_patterns.value;
|
||||
fp->frame_type = TDD;
|
||||
} else {
|
||||
fp->frame_type = FDD;
|
||||
}
|
||||
|
||||
fp->prach_config_common.rootSequenceIndex = cfg->prach_config.root_sequence_index.value;
|
||||
LOG_I(PHY,"prach_config_common.rootSequenceIndex = %d\n",cfg->prach_config.root_sequence_index.value);
|
||||
fp->prach_config_common.rootSequenceIndex = cfg->prach_config.root_sequence_index.value;
|
||||
LOG_I (PHY, "prach_config_common.rootSequenceIndex = %d\n", cfg->prach_config.root_sequence_index.value);
|
||||
|
||||
fp->prach_config_common.prach_Config_enabled=1;
|
||||
fp->prach_config_common.prach_Config_enabled = 1;
|
||||
|
||||
fp->prach_config_common.prach_ConfigInfo.prach_ConfigIndex =cfg->prach_config.configuration_index.value;
|
||||
LOG_I(PHY,"prach_config_common.prach_ConfigInfo.prach_ConfigIndex = %d\n",cfg->prach_config.configuration_index.value);
|
||||
fp->prach_config_common.prach_ConfigInfo.prach_ConfigIndex = cfg->prach_config.configuration_index.value;
|
||||
LOG_I (PHY, "prach_config_common.prach_ConfigInfo.prach_ConfigIndex = %d\n", cfg->prach_config.configuration_index.value);
|
||||
|
||||
fp->prach_config_common.prach_ConfigInfo.highSpeedFlag =cfg->prach_config.high_speed_flag.value;
|
||||
LOG_I(PHY,"prach_config_common.prach_ConfigInfo.highSpeedFlag = %d\n",cfg->prach_config.high_speed_flag.value);
|
||||
fp->prach_config_common.prach_ConfigInfo.zeroCorrelationZoneConfig =cfg->prach_config.zero_correlation_zone_configuration.value;
|
||||
LOG_I(PHY,"prach_config_common.prach_ConfigInfo.zeroCorrelationZoneConfig = %d\n",cfg->prach_config.zero_correlation_zone_configuration.value);
|
||||
fp->prach_config_common.prach_ConfigInfo.prach_FreqOffset =cfg->prach_config.frequency_offset.value;
|
||||
LOG_I(PHY,"prach_config_common.prach_ConfigInfo.prach_FreqOffset = %d\n",cfg->prach_config.frequency_offset.value);
|
||||
fp->prach_config_common.prach_ConfigInfo.highSpeedFlag = cfg->prach_config.high_speed_flag.value;
|
||||
LOG_I (PHY, "prach_config_common.prach_ConfigInfo.highSpeedFlag = %d\n", cfg->prach_config.high_speed_flag.value);
|
||||
fp->prach_config_common.prach_ConfigInfo.zeroCorrelationZoneConfig = cfg->prach_config.zero_correlation_zone_configuration.value;
|
||||
LOG_I (PHY, "prach_config_common.prach_ConfigInfo.zeroCorrelationZoneConfig = %d\n", cfg->prach_config.zero_correlation_zone_configuration.value);
|
||||
fp->prach_config_common.prach_ConfigInfo.prach_FreqOffset = cfg->prach_config.frequency_offset.value;
|
||||
LOG_I (PHY, "prach_config_common.prach_ConfigInfo.prach_FreqOffset = %d\n", cfg->prach_config.frequency_offset.value);
|
||||
|
||||
init_prach_tables (839);
|
||||
compute_prach_seq (fp->prach_config_common.rootSequenceIndex,
|
||||
fp->prach_config_common.prach_ConfigInfo.prach_ConfigIndex,
|
||||
fp->prach_config_common.prach_ConfigInfo.zeroCorrelationZoneConfig, fp->prach_config_common.prach_ConfigInfo.highSpeedFlag, fp->frame_type, RC.eNB[Mod_id][CC_id]->X_u);
|
||||
|
||||
init_prach_tables(839);
|
||||
compute_prach_seq(fp->prach_config_common.rootSequenceIndex,
|
||||
fp->prach_config_common.prach_ConfigInfo.prach_ConfigIndex,
|
||||
fp->prach_config_common.prach_ConfigInfo.zeroCorrelationZoneConfig,
|
||||
fp->prach_config_common.prach_ConfigInfo.highSpeedFlag,
|
||||
fp->frame_type,
|
||||
RC.eNB[Mod_id][CC_id]->X_u);
|
||||
|
||||
#if (LTE_RRC_VERSION >= MAKE_VERSION(14, 0, 0))
|
||||
fp->prach_emtc_config_common.prach_Config_enabled=1;
|
||||
if (cfg->emtc_config.prach_ce_level_0_enable.value == 1) {
|
||||
fp->prach_emtc_config_common.prach_Config_enabled = 1;
|
||||
|
||||
fp->prach_emtc_config_common.rootSequenceIndex = cfg->emtc_config.prach_catm_root_sequence_index.value;
|
||||
fp->prach_emtc_config_common.rootSequenceIndex = cfg->emtc_config.prach_catm_root_sequence_index.value;
|
||||
|
||||
fp->prach_emtc_config_common.prach_ConfigInfo.highSpeedFlag = cfg->emtc_config.prach_catm_high_speed_flag.value;
|
||||
fp->prach_emtc_config_common.prach_ConfigInfo.zeroCorrelationZoneConfig = cfg->emtc_config.prach_catm_zero_correlation_zone_configuration.value;
|
||||
fp->prach_emtc_config_common.prach_ConfigInfo.highSpeedFlag = cfg->emtc_config.prach_catm_high_speed_flag.value;
|
||||
fp->prach_emtc_config_common.prach_ConfigInfo.zeroCorrelationZoneConfig = cfg->emtc_config.prach_catm_zero_correlation_zone_configuration.value;
|
||||
|
||||
// CE Level 3 parameters
|
||||
fp->prach_emtc_config_common.prach_ConfigInfo.prach_CElevel_enable[3] = cfg->emtc_config.prach_ce_level_3_enable.value;
|
||||
fp->prach_emtc_config_common.prach_ConfigInfo.prach_starting_subframe_periodicity[3] = cfg->emtc_config.prach_ce_level_3_starting_subframe_periodicity.value;
|
||||
fp->prach_emtc_config_common.prach_ConfigInfo.prach_numRepetitionPerPreambleAttempt[3] = cfg->emtc_config.prach_ce_level_3_number_of_repetitions_per_attempt.value;
|
||||
AssertFatal(fp->prach_emtc_config_common.prach_ConfigInfo.prach_starting_subframe_periodicity[3]>=fp->prach_emtc_config_common.prach_ConfigInfo.prach_numRepetitionPerPreambleAttempt[3],
|
||||
"prach_starting_subframe_periodicity[3] < prach_numPetitionPerPreambleAttempt[3]\n");
|
||||
// CE Level 3 parameters
|
||||
fp->prach_emtc_config_common.prach_ConfigInfo.prach_CElevel_enable[3] = cfg->emtc_config.prach_ce_level_3_enable.value;
|
||||
fp->prach_emtc_config_common.prach_ConfigInfo.prach_starting_subframe_periodicity[3] = cfg->emtc_config.prach_ce_level_3_starting_subframe_periodicity.value;
|
||||
fp->prach_emtc_config_common.prach_ConfigInfo.prach_numRepetitionPerPreambleAttempt[3] = cfg->emtc_config.prach_ce_level_3_number_of_repetitions_per_attempt.value;
|
||||
AssertFatal (fp->prach_emtc_config_common.prach_ConfigInfo.prach_starting_subframe_periodicity[3] >= fp->prach_emtc_config_common.prach_ConfigInfo.prach_numRepetitionPerPreambleAttempt[3],
|
||||
"prach_starting_subframe_periodicity[3] < prach_numPetitionPerPreambleAttempt[3]\n");
|
||||
|
||||
|
||||
fp->prach_emtc_config_common.prach_ConfigInfo.prach_ConfigIndex[3] = cfg->emtc_config.prach_ce_level_3_configuration_index.value;
|
||||
fp->prach_emtc_config_common.prach_ConfigInfo.prach_FreqOffset[3] = cfg->emtc_config.prach_ce_level_3_frequency_offset.value;
|
||||
fp->prach_emtc_config_common.prach_ConfigInfo.prach_hopping_enable[3] = cfg->emtc_config.prach_ce_level_3_hopping_enable.value;
|
||||
fp->prach_emtc_config_common.prach_ConfigInfo.prach_hopping_offset[3] = cfg->emtc_config.prach_ce_level_3_hopping_offset.value;
|
||||
if (fp->prach_emtc_config_common.prach_ConfigInfo.prach_CElevel_enable[3] == 1)
|
||||
compute_prach_seq(fp->prach_emtc_config_common.rootSequenceIndex,
|
||||
fp->prach_emtc_config_common.prach_ConfigInfo.prach_ConfigIndex[3],
|
||||
fp->prach_emtc_config_common.prach_ConfigInfo.zeroCorrelationZoneConfig,
|
||||
fp->prach_emtc_config_common.prach_ConfigInfo.highSpeedFlag,
|
||||
fp->frame_type,
|
||||
RC.eNB[Mod_id][CC_id]->X_u_br[3]);
|
||||
fp->prach_emtc_config_common.prach_ConfigInfo.prach_ConfigIndex[3] = cfg->emtc_config.prach_ce_level_3_configuration_index.value;
|
||||
fp->prach_emtc_config_common.prach_ConfigInfo.prach_FreqOffset[3] = cfg->emtc_config.prach_ce_level_3_frequency_offset.value;
|
||||
fp->prach_emtc_config_common.prach_ConfigInfo.prach_hopping_enable[3] = cfg->emtc_config.prach_ce_level_3_hopping_enable.value;
|
||||
fp->prach_emtc_config_common.prach_ConfigInfo.prach_hopping_offset[3] = cfg->emtc_config.prach_ce_level_3_hopping_offset.value;
|
||||
if (fp->prach_emtc_config_common.prach_ConfigInfo.prach_CElevel_enable[3] == 1)
|
||||
compute_prach_seq (fp->prach_emtc_config_common.rootSequenceIndex,
|
||||
fp->prach_emtc_config_common.prach_ConfigInfo.prach_ConfigIndex[3],
|
||||
fp->prach_emtc_config_common.prach_ConfigInfo.zeroCorrelationZoneConfig,
|
||||
fp->prach_emtc_config_common.prach_ConfigInfo.highSpeedFlag, fp->frame_type, RC.eNB[Mod_id][CC_id]->X_u_br[3]);
|
||||
|
||||
// CE Level 2 parameters
|
||||
fp->prach_emtc_config_common.prach_ConfigInfo.prach_CElevel_enable[2] = cfg->emtc_config.prach_ce_level_2_enable.value;
|
||||
fp->prach_emtc_config_common.prach_ConfigInfo.prach_starting_subframe_periodicity[2] = cfg->emtc_config.prach_ce_level_2_starting_subframe_periodicity.value;
|
||||
fp->prach_emtc_config_common.prach_ConfigInfo.prach_numRepetitionPerPreambleAttempt[2] = cfg->emtc_config.prach_ce_level_2_number_of_repetitions_per_attempt.value;
|
||||
AssertFatal(fp->prach_emtc_config_common.prach_ConfigInfo.prach_starting_subframe_periodicity[2]>=fp->prach_emtc_config_common.prach_ConfigInfo.prach_numRepetitionPerPreambleAttempt[2],
|
||||
"prach_starting_subframe_periodicity[2] < prach_numPetitionPerPreambleAttempt[2]\n");
|
||||
fp->prach_emtc_config_common.prach_ConfigInfo.prach_ConfigIndex[2] = cfg->emtc_config.prach_ce_level_2_configuration_index.value;
|
||||
fp->prach_emtc_config_common.prach_ConfigInfo.prach_FreqOffset[2] = cfg->emtc_config.prach_ce_level_2_frequency_offset.value;
|
||||
fp->prach_emtc_config_common.prach_ConfigInfo.prach_hopping_enable[2] = cfg->emtc_config.prach_ce_level_2_hopping_enable.value;
|
||||
fp->prach_emtc_config_common.prach_ConfigInfo.prach_hopping_offset[2] = cfg->emtc_config.prach_ce_level_2_hopping_offset.value;
|
||||
if (fp->prach_emtc_config_common.prach_ConfigInfo.prach_CElevel_enable[2] == 1)
|
||||
compute_prach_seq(fp->prach_emtc_config_common.rootSequenceIndex,
|
||||
fp->prach_emtc_config_common.prach_ConfigInfo.prach_ConfigIndex[3],
|
||||
fp->prach_emtc_config_common.prach_ConfigInfo.zeroCorrelationZoneConfig,
|
||||
fp->prach_emtc_config_common.prach_ConfigInfo.highSpeedFlag,
|
||||
fp->frame_type,
|
||||
RC.eNB[Mod_id][CC_id]->X_u_br[2]);
|
||||
// CE Level 2 parameters
|
||||
fp->prach_emtc_config_common.prach_ConfigInfo.prach_CElevel_enable[2] = cfg->emtc_config.prach_ce_level_2_enable.value;
|
||||
fp->prach_emtc_config_common.prach_ConfigInfo.prach_starting_subframe_periodicity[2] = cfg->emtc_config.prach_ce_level_2_starting_subframe_periodicity.value;
|
||||
fp->prach_emtc_config_common.prach_ConfigInfo.prach_numRepetitionPerPreambleAttempt[2] = cfg->emtc_config.prach_ce_level_2_number_of_repetitions_per_attempt.value;
|
||||
AssertFatal (fp->prach_emtc_config_common.prach_ConfigInfo.prach_starting_subframe_periodicity[2] >= fp->prach_emtc_config_common.prach_ConfigInfo.prach_numRepetitionPerPreambleAttempt[2],
|
||||
"prach_starting_subframe_periodicity[2] < prach_numPetitionPerPreambleAttempt[2]\n");
|
||||
fp->prach_emtc_config_common.prach_ConfigInfo.prach_ConfigIndex[2] = cfg->emtc_config.prach_ce_level_2_configuration_index.value;
|
||||
fp->prach_emtc_config_common.prach_ConfigInfo.prach_FreqOffset[2] = cfg->emtc_config.prach_ce_level_2_frequency_offset.value;
|
||||
fp->prach_emtc_config_common.prach_ConfigInfo.prach_hopping_enable[2] = cfg->emtc_config.prach_ce_level_2_hopping_enable.value;
|
||||
fp->prach_emtc_config_common.prach_ConfigInfo.prach_hopping_offset[2] = cfg->emtc_config.prach_ce_level_2_hopping_offset.value;
|
||||
if (fp->prach_emtc_config_common.prach_ConfigInfo.prach_CElevel_enable[2] == 1)
|
||||
compute_prach_seq (fp->prach_emtc_config_common.rootSequenceIndex,
|
||||
fp->prach_emtc_config_common.prach_ConfigInfo.prach_ConfigIndex[3],
|
||||
fp->prach_emtc_config_common.prach_ConfigInfo.zeroCorrelationZoneConfig,
|
||||
fp->prach_emtc_config_common.prach_ConfigInfo.highSpeedFlag, fp->frame_type, RC.eNB[Mod_id][CC_id]->X_u_br[2]);
|
||||
|
||||
// CE Level 1 parameters
|
||||
fp->prach_emtc_config_common.prach_ConfigInfo.prach_CElevel_enable[1] = cfg->emtc_config.prach_ce_level_1_enable.value;
|
||||
fp->prach_emtc_config_common.prach_ConfigInfo.prach_starting_subframe_periodicity[1] = cfg->emtc_config.prach_ce_level_1_starting_subframe_periodicity.value;
|
||||
fp->prach_emtc_config_common.prach_ConfigInfo.prach_numRepetitionPerPreambleAttempt[1] = cfg->emtc_config.prach_ce_level_1_number_of_repetitions_per_attempt.value;
|
||||
AssertFatal(fp->prach_emtc_config_common.prach_ConfigInfo.prach_starting_subframe_periodicity[1]>=fp->prach_emtc_config_common.prach_ConfigInfo.prach_numRepetitionPerPreambleAttempt[1],
|
||||
"prach_starting_subframe_periodicity[1] < prach_numPetitionPerPreambleAttempt[1]\n");
|
||||
// CE Level 1 parameters
|
||||
fp->prach_emtc_config_common.prach_ConfigInfo.prach_CElevel_enable[1] = cfg->emtc_config.prach_ce_level_1_enable.value;
|
||||
fp->prach_emtc_config_common.prach_ConfigInfo.prach_starting_subframe_periodicity[1] = cfg->emtc_config.prach_ce_level_1_starting_subframe_periodicity.value;
|
||||
fp->prach_emtc_config_common.prach_ConfigInfo.prach_numRepetitionPerPreambleAttempt[1] = cfg->emtc_config.prach_ce_level_1_number_of_repetitions_per_attempt.value;
|
||||
AssertFatal (fp->prach_emtc_config_common.prach_ConfigInfo.prach_starting_subframe_periodicity[1] >= fp->prach_emtc_config_common.prach_ConfigInfo.prach_numRepetitionPerPreambleAttempt[1],
|
||||
"prach_starting_subframe_periodicity[1] < prach_numPetitionPerPreambleAttempt[1]\n");
|
||||
|
||||
fp->prach_emtc_config_common.prach_ConfigInfo.prach_ConfigIndex[1] = cfg->emtc_config.prach_ce_level_1_configuration_index.value;
|
||||
fp->prach_emtc_config_common.prach_ConfigInfo.prach_FreqOffset[1] = cfg->emtc_config.prach_ce_level_1_frequency_offset.value;
|
||||
fp->prach_emtc_config_common.prach_ConfigInfo.prach_hopping_enable[1] = cfg->emtc_config.prach_ce_level_1_hopping_enable.value;
|
||||
fp->prach_emtc_config_common.prach_ConfigInfo.prach_hopping_offset[1] = cfg->emtc_config.prach_ce_level_1_hopping_offset.value;
|
||||
if (fp->prach_emtc_config_common.prach_ConfigInfo.prach_CElevel_enable[1] == 1)
|
||||
compute_prach_seq(fp->prach_emtc_config_common.rootSequenceIndex,
|
||||
fp->prach_emtc_config_common.prach_ConfigInfo.prach_ConfigIndex[3],
|
||||
fp->prach_emtc_config_common.prach_ConfigInfo.zeroCorrelationZoneConfig,
|
||||
fp->prach_emtc_config_common.prach_ConfigInfo.highSpeedFlag,
|
||||
fp->frame_type,
|
||||
RC.eNB[Mod_id][CC_id]->X_u_br[1]);
|
||||
|
||||
// CE Level 0 parameters
|
||||
fp->prach_emtc_config_common.prach_ConfigInfo.prach_CElevel_enable[0] = cfg->emtc_config.prach_ce_level_0_enable.value;
|
||||
fp->prach_emtc_config_common.prach_ConfigInfo.prach_starting_subframe_periodicity[0] = cfg->emtc_config.prach_ce_level_0_starting_subframe_periodicity.value;
|
||||
fp->prach_emtc_config_common.prach_ConfigInfo.prach_numRepetitionPerPreambleAttempt[0] = cfg->emtc_config.prach_ce_level_0_number_of_repetitions_per_attempt.value;
|
||||
AssertFatal(fp->prach_emtc_config_common.prach_ConfigInfo.prach_starting_subframe_periodicity[0]>=fp->prach_emtc_config_common.prach_ConfigInfo.prach_numRepetitionPerPreambleAttempt[0],
|
||||
"prach_starting_subframe_periodicity[0] %d < prach_numPetitionPerPreambleAttempt[0] %d\n",
|
||||
fp->prach_emtc_config_common.prach_ConfigInfo.prach_starting_subframe_periodicity[0],
|
||||
fp->prach_emtc_config_common.prach_ConfigInfo.prach_numRepetitionPerPreambleAttempt[0]);
|
||||
fp->prach_emtc_config_common.prach_ConfigInfo.prach_ConfigIndex[1] = cfg->emtc_config.prach_ce_level_1_configuration_index.value;
|
||||
fp->prach_emtc_config_common.prach_ConfigInfo.prach_FreqOffset[1] = cfg->emtc_config.prach_ce_level_1_frequency_offset.value;
|
||||
fp->prach_emtc_config_common.prach_ConfigInfo.prach_hopping_enable[1] = cfg->emtc_config.prach_ce_level_1_hopping_enable.value;
|
||||
fp->prach_emtc_config_common.prach_ConfigInfo.prach_hopping_offset[1] = cfg->emtc_config.prach_ce_level_1_hopping_offset.value;
|
||||
if (fp->prach_emtc_config_common.prach_ConfigInfo.prach_CElevel_enable[1] == 1)
|
||||
compute_prach_seq (fp->prach_emtc_config_common.rootSequenceIndex,
|
||||
fp->prach_emtc_config_common.prach_ConfigInfo.prach_ConfigIndex[3],
|
||||
fp->prach_emtc_config_common.prach_ConfigInfo.zeroCorrelationZoneConfig,
|
||||
fp->prach_emtc_config_common.prach_ConfigInfo.highSpeedFlag, fp->frame_type, RC.eNB[Mod_id][CC_id]->X_u_br[1]);
|
||||
|
||||
// CE Level 0 parameters
|
||||
fp->prach_emtc_config_common.prach_ConfigInfo.prach_CElevel_enable[0] = cfg->emtc_config.prach_ce_level_0_enable.value;
|
||||
fp->prach_emtc_config_common.prach_ConfigInfo.prach_starting_subframe_periodicity[0] = cfg->emtc_config.prach_ce_level_0_starting_subframe_periodicity.value;
|
||||
fp->prach_emtc_config_common.prach_ConfigInfo.prach_numRepetitionPerPreambleAttempt[0] = cfg->emtc_config.prach_ce_level_0_number_of_repetitions_per_attempt.value;
|
||||
AssertFatal (fp->prach_emtc_config_common.prach_ConfigInfo.prach_starting_subframe_periodicity[0] >= fp->prach_emtc_config_common.prach_ConfigInfo.prach_numRepetitionPerPreambleAttempt[0],
|
||||
"prach_starting_subframe_periodicity[0] %d < prach_numPetitionPerPreambleAttempt[0] %d\n",
|
||||
fp->prach_emtc_config_common.prach_ConfigInfo.prach_starting_subframe_periodicity[0], fp->prach_emtc_config_common.prach_ConfigInfo.prach_numRepetitionPerPreambleAttempt[0]);
|
||||
AssertFatal (fp->prach_emtc_config_common.prach_ConfigInfo.prach_numRepetitionPerPreambleAttempt[0] > 0, "prach_emtc_config_common.prach_ConfigInfo.prach_numRepetitionPerPreambleAttempt[0]==0\n");
|
||||
fp->prach_emtc_config_common.prach_ConfigInfo.prach_ConfigIndex[0] = cfg->emtc_config.prach_ce_level_0_configuration_index.value;
|
||||
fp->prach_emtc_config_common.prach_ConfigInfo.prach_FreqOffset[0] = cfg->emtc_config.prach_ce_level_0_frequency_offset.value;
|
||||
fp->prach_emtc_config_common.prach_ConfigInfo.prach_hopping_enable[0] = cfg->emtc_config.prach_ce_level_0_hopping_enable.value;
|
||||
fp->prach_emtc_config_common.prach_ConfigInfo.prach_hopping_offset[0] = cfg->emtc_config.prach_ce_level_0_hopping_offset.value;
|
||||
if (fp->prach_emtc_config_common.prach_ConfigInfo.prach_CElevel_enable[0] == 1) {
|
||||
compute_prach_seq (fp->prach_emtc_config_common.rootSequenceIndex,
|
||||
fp->prach_emtc_config_common.prach_ConfigInfo.prach_ConfigIndex[3],
|
||||
fp->prach_emtc_config_common.prach_ConfigInfo.zeroCorrelationZoneConfig,
|
||||
fp->prach_emtc_config_common.prach_ConfigInfo.highSpeedFlag, fp->frame_type, RC.eNB[Mod_id][CC_id]->X_u_br[0]);
|
||||
init_mpdcch(RC.eNB[Mod_id][CC_id]);
|
||||
}
|
||||
}
|
||||
|
||||
fp->prach_emtc_config_common.prach_ConfigInfo.prach_ConfigIndex[0] = cfg->emtc_config.prach_ce_level_0_configuration_index.value;
|
||||
fp->prach_emtc_config_common.prach_ConfigInfo.prach_FreqOffset[0] = cfg->emtc_config.prach_ce_level_0_frequency_offset.value;
|
||||
fp->prach_emtc_config_common.prach_ConfigInfo.prach_hopping_enable[0] = cfg->emtc_config.prach_ce_level_0_hopping_enable.value;
|
||||
fp->prach_emtc_config_common.prach_ConfigInfo.prach_hopping_offset[0] = cfg->emtc_config.prach_ce_level_0_hopping_offset.value;
|
||||
if (fp->prach_emtc_config_common.prach_ConfigInfo.prach_CElevel_enable[0] == 1)
|
||||
compute_prach_seq(fp->prach_emtc_config_common.rootSequenceIndex,
|
||||
fp->prach_emtc_config_common.prach_ConfigInfo.prach_ConfigIndex[3],
|
||||
fp->prach_emtc_config_common.prach_ConfigInfo.zeroCorrelationZoneConfig,
|
||||
fp->prach_emtc_config_common.prach_ConfigInfo.highSpeedFlag,
|
||||
fp->frame_type,
|
||||
RC.eNB[Mod_id][CC_id]->X_u_br[0]);
|
||||
#endif
|
||||
|
||||
|
||||
|
||||
fp->pucch_config_common.deltaPUCCH_Shift = 1+cfg->pucch_config.delta_pucch_shift.value;
|
||||
fp->pucch_config_common.nRB_CQI = cfg->pucch_config.n_cqi_rb.value;
|
||||
fp->pucch_config_common.nCS_AN = cfg->pucch_config.n_an_cs.value;
|
||||
fp->pucch_config_common.n1PUCCH_AN = cfg->pucch_config.n1_pucch_an.value;
|
||||
fp->pucch_config_common.deltaPUCCH_Shift = 1 + cfg->pucch_config.delta_pucch_shift.value;
|
||||
fp->pucch_config_common.nRB_CQI = cfg->pucch_config.n_cqi_rb.value;
|
||||
fp->pucch_config_common.nCS_AN = cfg->pucch_config.n_an_cs.value;
|
||||
fp->pucch_config_common.n1PUCCH_AN = cfg->pucch_config.n1_pucch_an.value;
|
||||
|
||||
fp->pdsch_config_common.referenceSignalPower = cfg->rf_config.reference_signal_power.value;
|
||||
fp->pdsch_config_common.p_b = cfg->subframe_config.pb.value;
|
||||
fp->pdsch_config_common.referenceSignalPower = cfg->rf_config.reference_signal_power.value;
|
||||
fp->pdsch_config_common.p_b = cfg->subframe_config.pb.value;
|
||||
|
||||
fp->pusch_config_common.n_SB = cfg->pusch_config.number_of_subbands.value;
|
||||
LOG_I(PHY,"pusch_config_common.n_SB = %d\n",fp->pusch_config_common.n_SB );
|
||||
fp->pusch_config_common.n_SB = cfg->pusch_config.number_of_subbands.value;
|
||||
LOG_I (PHY, "pusch_config_common.n_SB = %d\n", fp->pusch_config_common.n_SB);
|
||||
|
||||
fp->pusch_config_common.hoppingMode = cfg->pusch_config.hopping_mode.value;
|
||||
LOG_I(PHY,"pusch_config_common.hoppingMode = %d\n",fp->pusch_config_common.hoppingMode);
|
||||
fp->pusch_config_common.hoppingMode = cfg->pusch_config.hopping_mode.value;
|
||||
LOG_I (PHY, "pusch_config_common.hoppingMode = %d\n", fp->pusch_config_common.hoppingMode);
|
||||
|
||||
fp->pusch_config_common.pusch_HoppingOffset = cfg->pusch_config.hopping_offset.value;
|
||||
LOG_I(PHY,"pusch_config_common.pusch_HoppingOffset = %d\n",fp->pusch_config_common.pusch_HoppingOffset);
|
||||
fp->pusch_config_common.pusch_HoppingOffset = cfg->pusch_config.hopping_offset.value;
|
||||
LOG_I (PHY, "pusch_config_common.pusch_HoppingOffset = %d\n", fp->pusch_config_common.pusch_HoppingOffset);
|
||||
|
||||
fp->pusch_config_common.enable64QAM = 0;//radioResourceConfigCommon->pusch_ConfigCommon.pusch_ConfigBasic.enable64QAM;
|
||||
LOG_I(PHY,"pusch_config_common.enable64QAM = %d\n",fp->pusch_config_common.enable64QAM );
|
||||
@@ -300,29 +295,30 @@ void phy_config_request(PHY_Config_t *phy_config) {
|
||||
fp->pusch_config_common.ul_ReferenceSignalsPUSCH.groupAssignmentPUSCH = cfg->uplink_reference_signal_config.group_assignment.value;
|
||||
LOG_I(PHY,"pusch_config_common.ul_ReferenceSignalsPUSCH.groupAssignmentPUSCH = %d\n",fp->pusch_config_common.ul_ReferenceSignalsPUSCH.groupAssignmentPUSCH);
|
||||
|
||||
LOG_I(PHY,"pusch_config_common.ul_ReferenceSignalsPUSCH.sequenceHoppingEnabled = %d\n",fp->pusch_config_common.ul_ReferenceSignalsPUSCH.sequenceHoppingEnabled);
|
||||
LOG_I (PHY, "pusch_config_common.ul_ReferenceSignalsPUSCH.sequenceHoppingEnabled = %d\n", fp->pusch_config_common.ul_ReferenceSignalsPUSCH.sequenceHoppingEnabled);
|
||||
|
||||
fp->pusch_config_common.ul_ReferenceSignalsPUSCH.cyclicShift = dmrs1_tab[cfg->uplink_reference_signal_config.cyclic_shift_1_for_drms.value];
|
||||
LOG_I(PHY,"pusch_config_common.ul_ReferenceSignalsPUSCH.cyclicShift = %d\n",fp->pusch_config_common.ul_ReferenceSignalsPUSCH.cyclicShift);
|
||||
fp->pusch_config_common.ul_ReferenceSignalsPUSCH.cyclicShift = dmrs1_tab[cfg->uplink_reference_signal_config.cyclic_shift_1_for_drms.value];
|
||||
LOG_I (PHY, "pusch_config_common.ul_ReferenceSignalsPUSCH.cyclicShift = %d\n", fp->pusch_config_common.ul_ReferenceSignalsPUSCH.cyclicShift);
|
||||
|
||||
init_ul_hopping(fp);
|
||||
init_ul_hopping (fp);
|
||||
|
||||
fp->soundingrs_ul_config_common.enabled_flag = 0;// 1; Don't know how to turn this off in NFAPI
|
||||
fp->soundingrs_ul_config_common.srs_BandwidthConfig = cfg->srs_config.bandwidth_configuration.value;
|
||||
fp->soundingrs_ul_config_common.srs_SubframeConfig = cfg->srs_config.srs_subframe_configuration.value;
|
||||
fp->soundingrs_ul_config_common.enabled_flag = 0; // 1; Don't know how to turn this off in NFAPI
|
||||
fp->soundingrs_ul_config_common.srs_BandwidthConfig = cfg->srs_config.bandwidth_configuration.value;
|
||||
fp->soundingrs_ul_config_common.srs_SubframeConfig = cfg->srs_config.srs_subframe_configuration.value;
|
||||
fp->soundingrs_ul_config_common.ackNackSRS_SimultaneousTransmission = cfg->srs_config.srs_acknack_srs_simultaneous_transmission.value;
|
||||
fp->soundingrs_ul_config_common.srs_MaxUpPts = cfg->srs_config.max_up_pts.value;
|
||||
fp->soundingrs_ul_config_common.srs_MaxUpPts = cfg->srs_config.max_up_pts.value;
|
||||
|
||||
fp->num_MBSFN_config = 0;
|
||||
|
||||
init_ncs_cell(fp,RC.eNB[Mod_id][CC_id]->ncs_cell);
|
||||
init_ncs_cell (fp, RC.eNB[Mod_id][CC_id]->ncs_cell);
|
||||
|
||||
|
||||
init_ul_hopping(fp);
|
||||
RC.eNB[Mod_id][CC_id]->configured = 1;
|
||||
LOG_I(PHY,"eNB %d/%d configured\n",Mod_id,CC_id);
|
||||
init_ul_hopping (fp);
|
||||
RC.eNB[Mod_id][CC_id]->configured = 1;
|
||||
LOG_I (PHY, "eNB %d/%d configured\n", Mod_id, CC_id);
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
void phy_config_sib2_eNB(uint8_t Mod_id,
|
||||
int CC_id,
|
||||
@@ -406,9 +402,9 @@ void phy_config_sib2_eNB(uint8_t Mod_id,
|
||||
fp->soundingrs_ul_config_common.ackNackSRS_SimultaneousTransmission = radioResourceConfigCommon->soundingRS_UL_ConfigCommon.choice.setup.ackNackSRS_SimultaneousTransmission;
|
||||
|
||||
if (radioResourceConfigCommon->soundingRS_UL_ConfigCommon.choice.setup.srs_MaxUpPts)
|
||||
fp->soundingrs_ul_config_common.srs_MaxUpPts = 1;
|
||||
fp->soundingrs_ul_config_common.srs_MaxUpPts = 1;
|
||||
else
|
||||
fp->soundingrs_ul_config_common.srs_MaxUpPts = 0;
|
||||
fp->soundingrs_ul_config_common.srs_MaxUpPts = 0;
|
||||
}
|
||||
|
||||
|
||||
@@ -438,16 +434,15 @@ void phy_config_sib2_eNB(uint8_t Mod_id,
|
||||
if (mbsfn_SubframeConfigList != NULL) {
|
||||
fp->num_MBSFN_config = mbsfn_SubframeConfigList->list.count;
|
||||
|
||||
for (i=0; i<mbsfn_SubframeConfigList->list.count; i++) {
|
||||
for (i = 0; i < mbsfn_SubframeConfigList->list.count; i++) {
|
||||
fp->MBSFN_config[i].radioframeAllocationPeriod = mbsfn_SubframeConfigList->list.array[i]->radioframeAllocationPeriod;
|
||||
fp->MBSFN_config[i].radioframeAllocationOffset = mbsfn_SubframeConfigList->list.array[i]->radioframeAllocationOffset;
|
||||
|
||||
if (mbsfn_SubframeConfigList->list.array[i]->subframeAllocation.present == MBSFN_SubframeConfig__subframeAllocation_PR_oneFrame) {
|
||||
fp->MBSFN_config[i].fourFrames_flag = 0;
|
||||
fp->MBSFN_config[i].mbsfn_SubframeConfig = mbsfn_SubframeConfigList->list.array[i]->subframeAllocation.choice.oneFrame.buf[0]; // 6-bit subframe configuration
|
||||
LOG_I(PHY, "[CONFIG] MBSFN_SubframeConfig[%d] pattern is %d\n", i,
|
||||
fp->MBSFN_config[i].mbsfn_SubframeConfig);
|
||||
} else if (mbsfn_SubframeConfigList->list.array[i]->subframeAllocation.present == MBSFN_SubframeConfig__subframeAllocation_PR_fourFrames) { // 24-bit subframe configuration
|
||||
fp->MBSFN_config[i].mbsfn_SubframeConfig = mbsfn_SubframeConfigList->list.array[i]->subframeAllocation.choice.oneFrame.buf[0]; // 6-bit subframe configuration
|
||||
LOG_I (PHY, "[CONFIG] MBSFN_SubframeConfig[%d] pattern is %d\n", i, fp->MBSFN_config[i].mbsfn_SubframeConfig);
|
||||
} else if (mbsfn_SubframeConfigList->list.array[i]->subframeAllocation.present == MBSFN_SubframeConfig__subframeAllocation_PR_fourFrames) { // 24-bit subframe configuration
|
||||
fp->MBSFN_config[i].fourFrames_flag = 1;
|
||||
fp->MBSFN_config[i].mbsfn_SubframeConfig =
|
||||
mbsfn_SubframeConfigList->list.array[i]->subframeAllocation.choice.oneFrame.buf[2]|
|
||||
@@ -466,6 +461,7 @@ void phy_config_sib2_eNB(uint8_t Mod_id,
|
||||
}
|
||||
*/
|
||||
|
||||
|
||||
void phy_config_sib13_eNB(module_id_t Mod_id,int CC_id,int mbsfn_Area_idx,
|
||||
long mbsfn_AreaId_r9)
|
||||
{
|
||||
@@ -473,41 +469,43 @@ void phy_config_sib13_eNB(module_id_t Mod_id,int CC_id,int mbsfn_Area_idx,
|
||||
LTE_DL_FRAME_PARMS *fp = &RC.eNB[Mod_id][CC_id]->frame_parms;
|
||||
|
||||
|
||||
LOG_I(PHY,"[eNB%d] Applying MBSFN_Area_id %ld for index %d\n",Mod_id,mbsfn_AreaId_r9,mbsfn_Area_idx);
|
||||
LOG_I (PHY, "[eNB%d] Applying MBSFN_Area_id %ld for index %d\n", Mod_id, mbsfn_AreaId_r9, mbsfn_Area_idx);
|
||||
|
||||
if (mbsfn_Area_idx == 0) {
|
||||
fp->Nid_cell_mbsfn = (uint16_t)mbsfn_AreaId_r9;
|
||||
LOG_I(PHY,"Fix me: only called when mbsfn_Area_idx == 0)\n");
|
||||
}
|
||||
|
||||
lte_gold_mbsfn(fp,RC.eNB[Mod_id][CC_id]->lte_gold_mbsfn_table,fp->Nid_cell_mbsfn);
|
||||
lte_gold_mbsfn (fp, RC.eNB[Mod_id][CC_id]->lte_gold_mbsfn_table, fp->Nid_cell_mbsfn);
|
||||
}
|
||||
|
||||
|
||||
void phy_config_dedicated_eNB_step2(PHY_VARS_eNB *eNB)
|
||||
void
|
||||
phy_config_dedicated_eNB_step2 (PHY_VARS_eNB * eNB)
|
||||
{
|
||||
uint16_t UE_id;
|
||||
struct LTE_PhysicalConfigDedicated *physicalConfigDedicated;
|
||||
LTE_DL_FRAME_PARMS *fp=&eNB->frame_parms;
|
||||
|
||||
for (UE_id=0; UE_id<NUMBER_OF_UE_MAX; UE_id++) {
|
||||
struct LTE_PhysicalConfigDedicated *physicalConfigDedicated;
|
||||
LTE_DL_FRAME_PARMS *fp = &eNB->frame_parms;
|
||||
|
||||
for (UE_id = 0; UE_id < NUMBER_OF_UE_MAX; UE_id++) {
|
||||
physicalConfigDedicated = eNB->physicalConfigDedicated[UE_id];
|
||||
|
||||
if (physicalConfigDedicated != NULL) {
|
||||
LOG_I(PHY,"[eNB %d] Sent physicalConfigDedicated=%p for UE %d\n",eNB->Mod_id,physicalConfigDedicated,UE_id);
|
||||
LOG_D(PHY,"------------------------------------------------------------------------\n");
|
||||
LOG_I (PHY, "[eNB %d] Sent physicalConfigDedicated=%p for UE %d\n", eNB->Mod_id, physicalConfigDedicated, UE_id);
|
||||
LOG_D (PHY, "------------------------------------------------------------------------\n");
|
||||
|
||||
if (physicalConfigDedicated->pdsch_ConfigDedicated) {
|
||||
eNB->pdsch_config_dedicated[UE_id].p_a=physicalConfigDedicated->pdsch_ConfigDedicated->p_a;
|
||||
LOG_D(PHY,"pdsch_config_dedicated.p_a %d\n",eNB->pdsch_config_dedicated[UE_id].p_a);
|
||||
LOG_D(PHY,"\n");
|
||||
eNB->pdsch_config_dedicated[UE_id].p_a = physicalConfigDedicated->pdsch_ConfigDedicated->p_a;
|
||||
LOG_D (PHY, "pdsch_config_dedicated.p_a %d\n", eNB->pdsch_config_dedicated[UE_id].p_a);
|
||||
LOG_D (PHY, "\n");
|
||||
}
|
||||
|
||||
if (physicalConfigDedicated->pucch_ConfigDedicated) {
|
||||
if (physicalConfigDedicated->pucch_ConfigDedicated->ackNackRepetition.present==LTE_PUCCH_ConfigDedicated__ackNackRepetition_PR_release)
|
||||
eNB->pucch_config_dedicated[UE_id].ackNackRepetition=0;
|
||||
else {
|
||||
eNB->pucch_config_dedicated[UE_id].ackNackRepetition=1;
|
||||
eNB->pucch_config_dedicated[UE_id].ackNackRepetition = 1;
|
||||
}
|
||||
|
||||
if (fp->frame_type == FDD) {
|
||||
@@ -519,10 +517,10 @@ void phy_config_dedicated_eNB_step2(PHY_VARS_eNB *eNB)
|
||||
eNB->pucch_config_dedicated[UE_id].tdd_AckNackFeedbackMode = bundling;
|
||||
}
|
||||
|
||||
if ( eNB->pucch_config_dedicated[UE_id].tdd_AckNackFeedbackMode == multiplexing)
|
||||
LOG_D(PHY,"pucch_config_dedicated.tdd_AckNackFeedbackMode = multiplexing\n");
|
||||
if (eNB->pucch_config_dedicated[UE_id].tdd_AckNackFeedbackMode == multiplexing)
|
||||
LOG_D (PHY, "pucch_config_dedicated.tdd_AckNackFeedbackMode = multiplexing\n");
|
||||
else
|
||||
LOG_D(PHY,"pucch_config_dedicated.tdd_AckNackFeedbackMode = bundling\n");
|
||||
LOG_D (PHY, "pucch_config_dedicated.tdd_AckNackFeedbackMode = bundling\n");
|
||||
|
||||
}
|
||||
|
||||
@@ -542,38 +540,38 @@ void phy_config_dedicated_eNB_step2(PHY_VARS_eNB *eNB)
|
||||
if (physicalConfigDedicated->uplinkPowerControlDedicated) {
|
||||
|
||||
eNB->ul_power_control_dedicated[UE_id].p0_UE_PUSCH = physicalConfigDedicated->uplinkPowerControlDedicated->p0_UE_PUSCH;
|
||||
eNB->ul_power_control_dedicated[UE_id].deltaMCS_Enabled= physicalConfigDedicated->uplinkPowerControlDedicated->deltaMCS_Enabled;
|
||||
eNB->ul_power_control_dedicated[UE_id].accumulationEnabled= physicalConfigDedicated->uplinkPowerControlDedicated->accumulationEnabled;
|
||||
eNB->ul_power_control_dedicated[UE_id].p0_UE_PUCCH= physicalConfigDedicated->uplinkPowerControlDedicated->p0_UE_PUCCH;
|
||||
eNB->ul_power_control_dedicated[UE_id].pSRS_Offset= physicalConfigDedicated->uplinkPowerControlDedicated->pSRS_Offset;
|
||||
eNB->ul_power_control_dedicated[UE_id].filterCoefficient= *physicalConfigDedicated->uplinkPowerControlDedicated->filterCoefficient;
|
||||
LOG_D(PHY,"ul_power_control_dedicated.p0_UE_PUSCH %d\n",eNB->ul_power_control_dedicated[UE_id].p0_UE_PUSCH);
|
||||
LOG_D(PHY,"ul_power_control_dedicated.deltaMCS_Enabled %d\n",eNB->ul_power_control_dedicated[UE_id].deltaMCS_Enabled);
|
||||
LOG_D(PHY,"ul_power_control_dedicated.accumulationEnabled %d\n",eNB->ul_power_control_dedicated[UE_id].accumulationEnabled);
|
||||
LOG_D(PHY,"ul_power_control_dedicated.p0_UE_PUCCH %d\n",eNB->ul_power_control_dedicated[UE_id].p0_UE_PUCCH);
|
||||
LOG_D(PHY,"ul_power_control_dedicated.pSRS_Offset %d\n",eNB->ul_power_control_dedicated[UE_id].pSRS_Offset);
|
||||
LOG_D(PHY,"ul_power_control_dedicated.filterCoefficient %d\n",eNB->ul_power_control_dedicated[UE_id].filterCoefficient);
|
||||
LOG_D(PHY,"\n");
|
||||
eNB->ul_power_control_dedicated[UE_id].deltaMCS_Enabled = physicalConfigDedicated->uplinkPowerControlDedicated->deltaMCS_Enabled;
|
||||
eNB->ul_power_control_dedicated[UE_id].accumulationEnabled = physicalConfigDedicated->uplinkPowerControlDedicated->accumulationEnabled;
|
||||
eNB->ul_power_control_dedicated[UE_id].p0_UE_PUCCH = physicalConfigDedicated->uplinkPowerControlDedicated->p0_UE_PUCCH;
|
||||
eNB->ul_power_control_dedicated[UE_id].pSRS_Offset = physicalConfigDedicated->uplinkPowerControlDedicated->pSRS_Offset;
|
||||
eNB->ul_power_control_dedicated[UE_id].filterCoefficient = *physicalConfigDedicated->uplinkPowerControlDedicated->filterCoefficient;
|
||||
LOG_D (PHY, "ul_power_control_dedicated.p0_UE_PUSCH %d\n", eNB->ul_power_control_dedicated[UE_id].p0_UE_PUSCH);
|
||||
LOG_D (PHY, "ul_power_control_dedicated.deltaMCS_Enabled %d\n", eNB->ul_power_control_dedicated[UE_id].deltaMCS_Enabled);
|
||||
LOG_D (PHY, "ul_power_control_dedicated.accumulationEnabled %d\n", eNB->ul_power_control_dedicated[UE_id].accumulationEnabled);
|
||||
LOG_D (PHY, "ul_power_control_dedicated.p0_UE_PUCCH %d\n", eNB->ul_power_control_dedicated[UE_id].p0_UE_PUCCH);
|
||||
LOG_D (PHY, "ul_power_control_dedicated.pSRS_Offset %d\n", eNB->ul_power_control_dedicated[UE_id].pSRS_Offset);
|
||||
LOG_D (PHY, "ul_power_control_dedicated.filterCoefficient %d\n", eNB->ul_power_control_dedicated[UE_id].filterCoefficient);
|
||||
LOG_D (PHY, "\n");
|
||||
}
|
||||
|
||||
if (physicalConfigDedicated->antennaInfo) {
|
||||
eNB->transmission_mode[UE_id] = 1+(physicalConfigDedicated->antennaInfo->choice.explicitValue.transmissionMode);
|
||||
LOG_D(PHY,"Transmission Mode (phy_config_dedicated_eNB_step2) %d\n",eNB->transmission_mode[UE_id]);
|
||||
LOG_D(PHY,"\n");
|
||||
eNB->transmission_mode[UE_id] = 1 + (physicalConfigDedicated->antennaInfo->choice.explicitValue.transmissionMode);
|
||||
LOG_D (PHY, "Transmission Mode (phy_config_dedicated_eNB_step2) %d\n", eNB->transmission_mode[UE_id]);
|
||||
LOG_D (PHY, "\n");
|
||||
}
|
||||
|
||||
if (physicalConfigDedicated->schedulingRequestConfig) {
|
||||
if (physicalConfigDedicated->schedulingRequestConfig->present == LTE_SchedulingRequestConfig_PR_setup) {
|
||||
eNB->scheduling_request_config[UE_id].sr_PUCCH_ResourceIndex = physicalConfigDedicated->schedulingRequestConfig->choice.setup.sr_PUCCH_ResourceIndex;
|
||||
eNB->scheduling_request_config[UE_id].sr_ConfigIndex=physicalConfigDedicated->schedulingRequestConfig->choice.setup.sr_ConfigIndex;
|
||||
eNB->scheduling_request_config[UE_id].dsr_TransMax=physicalConfigDedicated->schedulingRequestConfig->choice.setup.dsr_TransMax;
|
||||
eNB->scheduling_request_config[UE_id].sr_ConfigIndex = physicalConfigDedicated->schedulingRequestConfig->choice.setup.sr_ConfigIndex;
|
||||
eNB->scheduling_request_config[UE_id].dsr_TransMax = physicalConfigDedicated->schedulingRequestConfig->choice.setup.dsr_TransMax;
|
||||
|
||||
LOG_D(PHY,"scheduling_request_config.sr_PUCCH_ResourceIndex %d\n",eNB->scheduling_request_config[UE_id].sr_PUCCH_ResourceIndex);
|
||||
LOG_D(PHY,"scheduling_request_config.sr_ConfigIndex %d\n",eNB->scheduling_request_config[UE_id].sr_ConfigIndex);
|
||||
LOG_D(PHY,"scheduling_request_config.dsr_TransMax %d\n",eNB->scheduling_request_config[UE_id].dsr_TransMax);
|
||||
LOG_D (PHY, "scheduling_request_config.sr_PUCCH_ResourceIndex %d\n", eNB->scheduling_request_config[UE_id].sr_PUCCH_ResourceIndex);
|
||||
LOG_D (PHY, "scheduling_request_config.sr_ConfigIndex %d\n", eNB->scheduling_request_config[UE_id].sr_ConfigIndex);
|
||||
LOG_D (PHY, "scheduling_request_config.dsr_TransMax %d\n", eNB->scheduling_request_config[UE_id].dsr_TransMax);
|
||||
}
|
||||
|
||||
LOG_D(PHY,"------------------------------------------------------------\n");
|
||||
LOG_D (PHY, "------------------------------------------------------------\n");
|
||||
|
||||
}
|
||||
|
||||
@@ -587,14 +585,14 @@ void phy_config_dedicated_eNB_step2(PHY_VARS_eNB *eNB)
|
||||
eNB->soundingrs_ul_config_dedicated[UE_id].srs_Bandwidth = physicalConfigDedicated->soundingRS_UL_ConfigDedicated->choice.setup.srs_Bandwidth;
|
||||
eNB->soundingrs_ul_config_dedicated[UE_id].srs_ConfigIndex = physicalConfigDedicated->soundingRS_UL_ConfigDedicated->choice.setup.srs_ConfigIndex;
|
||||
eNB->soundingrs_ul_config_dedicated[UE_id].srs_HoppingBandwidth = physicalConfigDedicated->soundingRS_UL_ConfigDedicated->choice.setup.srs_HoppingBandwidth;
|
||||
eNB->soundingrs_ul_config_dedicated[UE_id].transmissionComb = physicalConfigDedicated->soundingRS_UL_ConfigDedicated->choice.setup.transmissionComb;
|
||||
eNB->soundingrs_ul_config_dedicated[UE_id].transmissionComb = physicalConfigDedicated->soundingRS_UL_ConfigDedicated->choice.setup.transmissionComb;
|
||||
|
||||
|
||||
LOG_D(PHY,"soundingrs_ul_config_dedicated.srs_ConfigIndex %d\n",eNB->soundingrs_ul_config_dedicated[UE_id].srs_ConfigIndex);
|
||||
LOG_D (PHY, "soundingrs_ul_config_dedicated.srs_ConfigIndex %d\n", eNB->soundingrs_ul_config_dedicated[UE_id].srs_ConfigIndex);
|
||||
|
||||
}
|
||||
|
||||
LOG_D(PHY,"------------------------------------------------------------\n");
|
||||
LOG_D (PHY, "------------------------------------------------------------\n");
|
||||
|
||||
}
|
||||
|
||||
@@ -651,7 +649,7 @@ void phy_config_dedicated_eNB(uint8_t Mod_id,
|
||||
eNB->transmission_mode[UE_id] = 7;
|
||||
break;
|
||||
default:
|
||||
LOG_E(PHY,"Unknown transmission mode!\n");
|
||||
LOG_E (PHY, "Unknown transmission mode!\n");
|
||||
break;
|
||||
}
|
||||
LOG_I(PHY,"Transmission Mode (phy_config_dedicated_eNB) %d\n",eNB->transmission_mode[UE_id]);
|
||||
@@ -667,6 +665,7 @@ void phy_config_dedicated_eNB(uint8_t Mod_id,
|
||||
}
|
||||
*/
|
||||
|
||||
|
||||
/*
|
||||
void phy_config_dedicated_scell_eNB(uint8_t Mod_id,
|
||||
uint16_t rnti,
|
||||
@@ -716,8 +715,6 @@ void phy_config_dedicated_scell_eNB(uint8_t Mod_id,
|
||||
}
|
||||
*/
|
||||
|
||||
|
||||
|
||||
int phy_init_lte_eNB(PHY_VARS_eNB *eNB,
|
||||
unsigned char is_secondary_eNB,
|
||||
unsigned char abstraction_flag)
|
||||
@@ -732,16 +729,14 @@ int phy_init_lte_eNB(PHY_VARS_eNB *eNB,
|
||||
#if (LTE_RRC_VERSION >= MAKE_VERSION(14, 0, 0))
|
||||
LTE_eNB_PRACH* const prach_vars_br = &eNB->prach_vars_br;
|
||||
#endif
|
||||
int i, UE_id;
|
||||
int i, UE_id;
|
||||
|
||||
LOG_I(PHY,"[eNB %d] %s() About to wait for eNB to be configured", eNB->Mod_id, __FUNCTION__);
|
||||
|
||||
eNB->total_dlsch_bitrate = 0;
|
||||
eNB->total_transmitted_bits = 0;
|
||||
eNB->total_system_throughput = 0;
|
||||
eNB->check_for_MUMIMO_transmissions=0;
|
||||
|
||||
while(eNB->configured == 0) usleep(10000);
|
||||
eNB->check_for_MUMIMO_transmissions = 0;
|
||||
|
||||
LOG_I(PHY,"[eNB %"PRIu8"] Initializing DL_FRAME_PARMS : N_RB_DL %"PRIu8", PHICH Resource %d, PHICH Duration %d nb_antennas_tx:%u nb_antennas_rx:%u nb_antenna_ports_eNB:%u PRACH[rootSequenceIndex:%u prach_Config_enabled:%u configIndex:%u highSpeed:%u zeroCorrelationZoneConfig:%u freqOffset:%u]\n",
|
||||
eNB->Mod_id,
|
||||
@@ -757,18 +752,21 @@ int phy_init_lte_eNB(PHY_VARS_eNB *eNB,
|
||||
);
|
||||
LOG_D(PHY,"[MSC_NEW][FRAME 00000][PHY_eNB][MOD %02"PRIu8"][]\n", eNB->Mod_id);
|
||||
|
||||
LOG_I (PHY, "[eNB %" PRIu8 "] Initializing DL_FRAME_PARMS : N_RB_DL %" PRIu8 ", PHICH Resource %d, PHICH Duration %d\n",
|
||||
eNB->Mod_id, fp->N_RB_DL, fp->phich_config_common.phich_resource, fp->phich_config_common.phich_duration);
|
||||
LOG_D (PHY, "[MSC_NEW][FRAME 00000][PHY_eNB][MOD %02" PRIu8 "][]\n", eNB->Mod_id);
|
||||
|
||||
lte_gold(fp,eNB->lte_gold_table,fp->Nid_cell);
|
||||
generate_pcfich_reg_mapping(fp);
|
||||
generate_phich_reg_mapping(fp);
|
||||
|
||||
for (UE_id=0; UE_id<NUMBER_OF_UE_MAX; UE_id++) {
|
||||
eNB->first_run_timing_advance[UE_id] =
|
||||
1; ///This flag used to be static. With multiple eNBs this does no longer work, hence we put it in the structure. However it has to be initialized with 1, which is performed here.
|
||||
|
||||
lte_gold (fp, eNB->lte_gold_table, fp->Nid_cell);
|
||||
generate_pcfich_reg_mapping (fp);
|
||||
generate_phich_reg_mapping (fp);
|
||||
|
||||
for (UE_id = 0; UE_id < NUMBER_OF_UE_MAX; UE_id++) {
|
||||
eNB->first_run_timing_advance[UE_id] = 1; ///This flag used to be static. With multiple eNBs this does no longer work, hence we put it in the structure. However it has to be initialized with 1, which is performed here.
|
||||
|
||||
// clear whole structure
|
||||
bzero( &eNB->UE_stats[UE_id], sizeof(LTE_eNB_UE_stats) );
|
||||
|
||||
bzero (&eNB->UE_stats[UE_id], sizeof (LTE_eNB_UE_stats));
|
||||
|
||||
eNB->physicalConfigDedicated[UE_id] = NULL;
|
||||
}
|
||||
|
||||
@@ -791,51 +789,53 @@ int phy_init_lte_eNB(PHY_VARS_eNB *eNB,
|
||||
i,common_vars->txdataF[i],
|
||||
fp->ofdm_symbol_size*fp->symbols_per_tti*10*sizeof(int32_t));
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
// Channel estimates for SRS
|
||||
for (UE_id=0; UE_id<NUMBER_OF_UE_MAX; UE_id++) {
|
||||
|
||||
srs_vars[UE_id].srs_ch_estimates = (int32_t**)malloc16( 64*sizeof(int32_t*) );
|
||||
srs_vars[UE_id].srs_ch_estimates_time = (int32_t**)malloc16( 64*sizeof(int32_t*) );
|
||||
|
||||
for (i=0; i<64; i++) {
|
||||
srs_vars[UE_id].srs_ch_estimates[i] = (int32_t*)malloc16_clear( sizeof(int32_t)*fp->ofdm_symbol_size );
|
||||
srs_vars[UE_id].srs_ch_estimates_time[i] = (int32_t*)malloc16_clear( sizeof(int32_t)*fp->ofdm_symbol_size*2 );
|
||||
for (UE_id = 0; UE_id < NUMBER_OF_UE_MAX; UE_id++) {
|
||||
|
||||
srs_vars[UE_id].srs_ch_estimates = (int32_t **) malloc16 (64 * sizeof (int32_t *));
|
||||
srs_vars[UE_id].srs_ch_estimates_time = (int32_t **) malloc16 (64 * sizeof (int32_t *));
|
||||
|
||||
for (i = 0; i < 64; i++) {
|
||||
srs_vars[UE_id].srs_ch_estimates[i] = (int32_t *) malloc16_clear (sizeof (int32_t) * fp->ofdm_symbol_size);
|
||||
srs_vars[UE_id].srs_ch_estimates_time[i] = (int32_t *) malloc16_clear (sizeof (int32_t) * fp->ofdm_symbol_size * 2);
|
||||
}
|
||||
} //UE_id
|
||||
} //UE_id
|
||||
|
||||
|
||||
generate_ul_ref_sigs_rx();
|
||||
|
||||
init_ulsch_power_LUT();
|
||||
generate_ul_ref_sigs_rx ();
|
||||
|
||||
init_ulsch_power_LUT ();
|
||||
|
||||
// SRS
|
||||
for (UE_id=0; UE_id<NUMBER_OF_UE_MAX; UE_id++) {
|
||||
srs_vars[UE_id].srs = (int32_t*)malloc16_clear(2*fp->ofdm_symbol_size*sizeof(int32_t));
|
||||
for (UE_id = 0; UE_id < NUMBER_OF_UE_MAX; UE_id++) {
|
||||
srs_vars[UE_id].srs = (int32_t *) malloc16_clear (2 * fp->ofdm_symbol_size * sizeof (int32_t));
|
||||
}
|
||||
|
||||
// PRACH
|
||||
prach_vars->prachF = (int16_t*)malloc16_clear( 1024*2*sizeof(int16_t) );
|
||||
prach_vars->prachF = (int16_t *) malloc16_clear (1024 * 2 * sizeof (int16_t));
|
||||
|
||||
// assume maximum of 64 RX antennas for PRACH receiver
|
||||
prach_vars->prach_ifft[0] = (int32_t**)malloc16_clear(64*sizeof(int32_t*));
|
||||
for (i=0;i<64;i++) prach_vars->prach_ifft[0][i] = (int32_t*)malloc16_clear(1024*2*sizeof(int32_t));
|
||||
prach_vars->prach_ifft[0] = (int32_t **) malloc16_clear (64 * sizeof (int32_t *));
|
||||
for (i = 0; i < 64; i++)
|
||||
prach_vars->prach_ifft[0][i] = (int32_t *) malloc16_clear (1024 * 2 * sizeof (int32_t));
|
||||
|
||||
prach_vars->rxsigF[0] = (int16_t**)malloc16_clear(64*sizeof(int16_t*));
|
||||
prach_vars->rxsigF[0] = (int16_t **) malloc16_clear (64 * sizeof (int16_t *));
|
||||
// PRACH BR
|
||||
#if (LTE_RRC_VERSION >= MAKE_VERSION(14, 0, 0))
|
||||
prach_vars_br->prachF = (int16_t*)malloc16_clear( 1024*2*sizeof(int32_t) );
|
||||
|
||||
// assume maximum of 64 RX antennas for PRACH receiver
|
||||
for (int ce_level=0;ce_level<4;ce_level++) {
|
||||
prach_vars_br->prach_ifft[ce_level] = (int32_t**)malloc16_clear(64*sizeof(int32_t*));
|
||||
for (i=0;i<64;i++) prach_vars_br->prach_ifft[ce_level][i] = (int32_t*)malloc16_clear(1024*2*sizeof(int32_t));
|
||||
prach_vars->rxsigF[ce_level] = (int16_t**)malloc16_clear(64*sizeof(int16_t*));
|
||||
for (int ce_level = 0; ce_level < 4; ce_level++) {
|
||||
prach_vars_br->prach_ifft[ce_level] = (int32_t **) malloc16_clear (64 * sizeof (int32_t *));
|
||||
for (i = 0; i < 64; i++)
|
||||
prach_vars_br->prach_ifft[ce_level][i] = (int32_t *) malloc16_clear (1024 * 2 * sizeof (int32_t));
|
||||
prach_vars->rxsigF[ce_level] = (int16_t **) malloc16_clear (64 * sizeof (int16_t *));
|
||||
}
|
||||
#endif
|
||||
|
||||
|
||||
/* number of elements of an array X is computed as sizeof(X) / sizeof(X[0])
|
||||
AssertFatal(fp->nb_antennas_rx <= sizeof(prach_vars->rxsigF) / sizeof(prach_vars->rxsigF[0]),
|
||||
"nb_antennas_rx too large");
|
||||
@@ -847,20 +847,20 @@ int phy_init_lte_eNB(PHY_VARS_eNB *eNB,
|
||||
for (UE_id=0; UE_id<NUMBER_OF_UE_MAX; UE_id++) {
|
||||
|
||||
//FIXME
|
||||
pusch_vars[UE_id] = (LTE_eNB_PUSCH*)malloc16_clear( NUMBER_OF_UE_MAX*sizeof(LTE_eNB_PUSCH) );
|
||||
|
||||
pusch_vars[UE_id]->rxdataF_ext = (int32_t**)malloc16( 2*sizeof(int32_t*) );
|
||||
pusch_vars[UE_id]->rxdataF_ext2 = (int32_t**)malloc16( 2*sizeof(int32_t*) );
|
||||
pusch_vars[UE_id]->drs_ch_estimates = (int32_t**)malloc16( 2*sizeof(int32_t*) );
|
||||
pusch_vars[UE_id]->drs_ch_estimates_time = (int32_t**)malloc16( 2*sizeof(int32_t*) );
|
||||
pusch_vars[UE_id]->rxdataF_comp = (int32_t**)malloc16( 2*sizeof(int32_t*) );
|
||||
pusch_vars[UE_id]->ul_ch_mag = (int32_t**)malloc16( 2*sizeof(int32_t*) );
|
||||
pusch_vars[UE_id]->ul_ch_magb = (int32_t**)malloc16( 2*sizeof(int32_t*) );
|
||||
|
||||
AssertFatal(fp->ofdm_symbol_size > 127, "fp->ofdm_symbol_size %d<128\n",fp->ofdm_symbol_size);
|
||||
AssertFatal(fp->symbols_per_tti > 11, "fp->symbols_per_tti %d < 12\n",fp->symbols_per_tti);
|
||||
AssertFatal(fp->N_RB_UL > 5, "fp->N_RB_UL %d < 6\n",fp->N_RB_UL);
|
||||
for (i=0; i<2; i++) {
|
||||
pusch_vars[UE_id] = (LTE_eNB_PUSCH *) malloc16_clear (NUMBER_OF_UE_MAX * sizeof (LTE_eNB_PUSCH));
|
||||
|
||||
pusch_vars[UE_id]->rxdataF_ext = (int32_t **) malloc16 (2 * sizeof (int32_t *));
|
||||
pusch_vars[UE_id]->rxdataF_ext2 = (int32_t **) malloc16 (2 * sizeof (int32_t *));
|
||||
pusch_vars[UE_id]->drs_ch_estimates = (int32_t **) malloc16 (2 * sizeof (int32_t *));
|
||||
pusch_vars[UE_id]->drs_ch_estimates_time = (int32_t **) malloc16 (2 * sizeof (int32_t *));
|
||||
pusch_vars[UE_id]->rxdataF_comp = (int32_t **) malloc16 (2 * sizeof (int32_t *));
|
||||
pusch_vars[UE_id]->ul_ch_mag = (int32_t **) malloc16 (2 * sizeof (int32_t *));
|
||||
pusch_vars[UE_id]->ul_ch_magb = (int32_t **) malloc16 (2 * sizeof (int32_t *));
|
||||
|
||||
AssertFatal (fp->ofdm_symbol_size > 127, "fp->ofdm_symbol_size %d<128\n", fp->ofdm_symbol_size);
|
||||
AssertFatal (fp->symbols_per_tti > 11, "fp->symbols_per_tti %d < 12\n", fp->symbols_per_tti);
|
||||
AssertFatal (fp->N_RB_UL > 5, "fp->N_RB_UL %d < 6\n", fp->N_RB_UL);
|
||||
for (i = 0; i < 2; i++) {
|
||||
// RK 2 times because of output format of FFT!
|
||||
// FIXME We should get rid of this
|
||||
pusch_vars[UE_id]->rxdataF_ext[i] = (int32_t*)malloc16_clear( sizeof(int32_t)*fp->N_RB_UL*12*fp->symbols_per_tti );
|
||||
@@ -875,12 +875,12 @@ int phy_init_lte_eNB(PHY_VARS_eNB *eNB,
|
||||
pusch_vars[UE_id]->llr = (int16_t*)malloc16_clear( (8*((3*8*6144)+12))*sizeof(int16_t) );
|
||||
} //UE_id
|
||||
|
||||
|
||||
for (UE_id=0; UE_id<NUMBER_OF_UE_MAX; UE_id++)
|
||||
|
||||
for (UE_id = 0; UE_id < NUMBER_OF_UE_MAX; UE_id++)
|
||||
eNB->UE_stats_ptr[UE_id] = &eNB->UE_stats[UE_id];
|
||||
|
||||
eNB->pdsch_config_dedicated->p_a = dB0; //defaul value until overwritten by RRCConnectionReconfiguration
|
||||
|
||||
|
||||
eNB->pdsch_config_dedicated->p_a = dB0; //defaul value until overwritten by RRCConnectionReconfiguration
|
||||
|
||||
|
||||
return (0);
|
||||
|
||||
|
||||
@@ -46,12 +46,12 @@ int32_t lte_ul_channel_estimation(PHY_VARS_eNB *eNB,
|
||||
int32_t **ul_ch_estimates_time= pusch_vars->drs_ch_estimates_time;
|
||||
int32_t **rxdataF_ext= pusch_vars->rxdataF_ext;
|
||||
int subframe = proc->subframe_rx;
|
||||
uint8_t harq_pid = subframe2harq_pid(frame_parms,proc->frame_rx,subframe);
|
||||
uint8_t harq_pid;
|
||||
int16_t delta_phase = 0;
|
||||
int16_t *ru1 = ru_90;
|
||||
int16_t *ru2 = ru_90;
|
||||
int16_t current_phase1,current_phase2;
|
||||
uint16_t N_rb_alloc = eNB->ulsch[UE_id]->harq_processes[harq_pid]->nb_rb;
|
||||
|
||||
uint16_t aa,Msc_RS,Msc_RS_idx;
|
||||
uint16_t * Msc_idx_ptr;
|
||||
int k,pilot_pos1 = 3 - frame_parms->Ncp, pilot_pos2 = 10 - 2*frame_parms->Ncp;
|
||||
@@ -65,7 +65,7 @@ int32_t lte_ul_channel_estimation(PHY_VARS_eNB *eNB,
|
||||
uint32_t alpha_ind;
|
||||
uint32_t u=frame_parms->pusch_config_common.ul_ReferenceSignalsPUSCH.grouphop[Ns+(subframe<<1)];
|
||||
uint32_t v=frame_parms->pusch_config_common.ul_ReferenceSignalsPUSCH.seqhop[Ns+(subframe<<1)];
|
||||
int32_t tmp_estimates[N_rb_alloc*12] __attribute__((aligned(16)));
|
||||
|
||||
|
||||
int symbol_offset,i;
|
||||
|
||||
@@ -83,7 +83,19 @@ int32_t lte_ul_channel_estimation(PHY_VARS_eNB *eNB,
|
||||
int32x4_t mmtmp0,mmtmp1,mmtmp_re,mmtmp_im;
|
||||
#endif
|
||||
|
||||
int32_t temp_in_ifft_0[2048*2] __attribute__((aligned(32)));
|
||||
int32_t temp_in_ifft_0[2048*2] __attribute__((aligned(32)));
|
||||
|
||||
|
||||
#ifdef Rel14
|
||||
if (eNB->ulsch[UE_id]->ue_type > 0) harq_pid = 0;
|
||||
else
|
||||
#endif
|
||||
{
|
||||
harq_pid = subframe2harq_pid(frame_parms,proc->frame_rx,subframe);
|
||||
}
|
||||
|
||||
uint16_t N_rb_alloc = eNB->ulsch[UE_id]->harq_processes[harq_pid]->nb_rb;
|
||||
int32_t tmp_estimates[N_rb_alloc*12] __attribute__((aligned(16)));
|
||||
|
||||
Msc_RS = N_rb_alloc*12;
|
||||
|
||||
|
||||
@@ -98,43 +98,25 @@ void dci_encoding(uint8_t *a,
|
||||
#endif
|
||||
RCC = sub_block_interleaving_cc(D,d+96,w);
|
||||
|
||||
#ifdef DEBUG_DCI_ENCODING
|
||||
printf("Doing DCI rate matching for %d channel bits, RCC %d, e %p\n",E,RCC,e);
|
||||
#endif
|
||||
//#ifdef DEBUG_DCI_ENCODING
|
||||
if (E>1000) printf("Doing DCI rate matching for %d channel bits, RCC %d, e %p\n",E,RCC,e);
|
||||
//#endif
|
||||
lte_rate_matching_cc(RCC,E,w,e);
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
uint8_t *generate_dci0(uint8_t *dci,
|
||||
uint8_t *e,
|
||||
uint8_t DCI_LENGTH,
|
||||
uint8_t aggregation_level,
|
||||
uint16_t coded_bits,
|
||||
uint16_t rnti)
|
||||
{
|
||||
|
||||
uint16_t coded_bits;
|
||||
uint8_t dci_flip[8];
|
||||
|
||||
AssertFatal((aggregation_level==1) ||
|
||||
(aggregation_level==2) ||
|
||||
(aggregation_level==4) ||
|
||||
(aggregation_level==8)
|
||||
#if (LTE_RRC_VERSION >= MAKE_VERSION(14, 0, 0)) // Added for EPDCCH/MPDCCH
|
||||
||
|
||||
(aggregation_level==16) ||
|
||||
(aggregation_level==24) ||
|
||||
(aggregation_level==32)
|
||||
#endif
|
||||
,
|
||||
"generate_dci FATAL, illegal aggregation_level %d\n",aggregation_level);
|
||||
|
||||
|
||||
coded_bits = 72 * aggregation_level;
|
||||
|
||||
|
||||
|
||||
#ifdef DEBUG_DCI_ENCODING
|
||||
for (int i=0;i<1+((DCI_LENGTH+16)/8);i++)
|
||||
printf("i %d : %x\n",i,dci[i]);
|
||||
@@ -387,7 +369,7 @@ uint8_t generate_dci_top(uint8_t num_pdcch_symbols,
|
||||
e_ptr = generate_dci0(dci_alloc[i].dci_pdu,
|
||||
e+(72*dci_alloc[i].firstCCE),
|
||||
dci_alloc[i].dci_length,
|
||||
dci_alloc[i].L,
|
||||
72*dci_alloc[i].L,
|
||||
dci_alloc[i].rnti);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -283,29 +283,33 @@ uint16_t get_nCCE_mac(uint8_t Mod_id,uint8_t CC_id,int num_pdcch_symbols,int sub
|
||||
}
|
||||
|
||||
|
||||
void conv_eMTC_rballoc(uint16_t resource_block_coding,
|
||||
uint32_t N_RB_DL,
|
||||
uint32_t *rb_alloc) {
|
||||
void conv_eMTC_rballoc (uint16_t resource_block_coding, uint32_t N_RB_DL, uint32_t * rb_alloc)
|
||||
{
|
||||
|
||||
|
||||
int narrowband = resource_block_coding>>5;
|
||||
int RIV = resource_block_coding&31;
|
||||
int N_NB_DL = N_RB_DL/6;
|
||||
int i0 = (N_RB_DL>>1) - (3*N_NB_DL);
|
||||
int first_rb = (6*narrowband)+i0;
|
||||
int alloc = localRIV2alloc_LUT6[RIV];
|
||||
int ind = first_rb>>5;
|
||||
int ind_mod = first_rb&31;
|
||||
int RIV = resource_block_coding&31;
|
||||
int narrowband = resource_block_coding>>5;
|
||||
int N_NB_DL = N_RB_DL / 6;
|
||||
int i0 = (N_RB_DL >> 1) - (3 * N_NB_DL);
|
||||
int first_rb = (6 * narrowband) + i0;
|
||||
int alloc = localRIV2alloc_LUT6[RIV];
|
||||
int ind = first_rb >> 5;
|
||||
int ind_mod = first_rb & 31;
|
||||
|
||||
if (((N_RB_DL&1) > 0) && (narrowband>=(N_NB_DL>>1))) first_rb++;
|
||||
rb_alloc[0] = 0;
|
||||
rb_alloc[1] = 0;
|
||||
rb_alloc[2] = 0;
|
||||
rb_alloc[3] = 0;
|
||||
rb_alloc[ind] = alloc<<ind_mod;
|
||||
if (ind_mod > 26) rb_alloc[ind+1] = alloc>>(6-(ind_mod-26));
|
||||
AssertFatal(RIV<32,"RIV is %d > 31\n",RIV);
|
||||
|
||||
if (((N_RB_DL & 1) > 0) && (narrowband >= (N_NB_DL >> 1)))
|
||||
first_rb++;
|
||||
rb_alloc[0] = 0;
|
||||
rb_alloc[1] = 0;
|
||||
rb_alloc[2] = 0;
|
||||
rb_alloc[3] = 0;
|
||||
rb_alloc[ind] = alloc << ind_mod;
|
||||
if (ind_mod > 26)
|
||||
rb_alloc[ind + 1] = alloc >> (6 - (ind_mod - 26));
|
||||
}
|
||||
|
||||
|
||||
void conv_rballoc(uint8_t ra_header,uint32_t rb_alloc,uint32_t N_RB_DL,uint32_t *rb_alloc2)
|
||||
{
|
||||
|
||||
|
||||
@@ -615,6 +615,7 @@ int dlsch_encoding_all(PHY_VARS_eNB *eNB,
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
if(get_thread_worker_conf() == WORKER_ENABLE)
|
||||
{
|
||||
if(C >= 8)//one main three worker
|
||||
|
||||
@@ -52,7 +52,6 @@ void dlsch_scrambling(LTE_DL_FRAME_PARMS *frame_parms,
|
||||
{
|
||||
|
||||
int n;
|
||||
|
||||
// uint8_t reset;
|
||||
uint32_t x1, x2, s=0;
|
||||
uint8_t *dlsch_e=dlsch->harq_processes[harq_pid]->e;
|
||||
|
||||
@@ -19,30 +19,32 @@
|
||||
* contact@openairinterface.org
|
||||
*/
|
||||
|
||||
/*! \file PHY/LTE_TRANSPORT/dci.c
|
||||
* \brief Implements PDCCH physical channel TX/RX procedures (36.211) and DCI encoding/decoding (36.212/36.213). Current LTE compliance V8.6 2009-03.
|
||||
* \author R. Knopp
|
||||
* \date 2011
|
||||
* \version 0.1
|
||||
* \company Eurecom
|
||||
* \email: knopp@eurecom.fr
|
||||
* \note
|
||||
* \warning
|
||||
*/
|
||||
|
||||
/*! \file PHY/LTE_TRANSPORT/edci.c
|
||||
* \brief Implements M/EPDCCH physical channel TX/RX procedures (36.211).
|
||||
* \author R. Knopp
|
||||
* \date 2011
|
||||
* \version 0.1
|
||||
* \company Eurecom
|
||||
* \email: knopp@eurecom.fr
|
||||
* \note
|
||||
* \warning
|
||||
*/
|
||||
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
#include "PHY/defs_eNB.h"
|
||||
#include "PHY/phy_extern.h"
|
||||
#include "SCHED/sched_eNB.h"
|
||||
#include "SIMULATION/TOOLS/sim.h" // for taus
|
||||
#include "SIMULATION/TOOLS/sim.h" // for taus
|
||||
#include "PHY/sse_intrin.h"
|
||||
#include "transport_proto.h"
|
||||
#include "transport_common_proto.h"
|
||||
#include "assertions.h"
|
||||
#include "common/utils/LOG/log.h"
|
||||
#include "PHY/LTE_REFSIG/lte_refsig.h"
|
||||
|
||||
#include "assertions.h"
|
||||
#include "T.h"
|
||||
#include "common/utils/LOG/log.h"
|
||||
|
||||
//#define DEBUG_DCI_ENCODING 1
|
||||
//#define DEBUG_DCI_DECODING 1
|
||||
//#define DEBUG_PHY
|
||||
@@ -52,129 +54,300 @@ void generate_edci_top(PHY_VARS_eNB *eNB, int frame, int subframe) {
|
||||
|
||||
}
|
||||
|
||||
void mpdcch_scrambling(LTE_DL_FRAME_PARMS *frame_parms,
|
||||
mDCI_ALLOC_t *mdci,
|
||||
uint16_t i,
|
||||
uint8_t *e,
|
||||
uint32_t length)
|
||||
void mpdcch_scrambling(LTE_DL_FRAME_PARMS * frame_parms, mDCI_ALLOC_t * mdci, uint16_t i, uint8_t * e, uint32_t length)
|
||||
{
|
||||
int n;
|
||||
uint8_t reset;
|
||||
uint32_t x1, x2, s=0;
|
||||
uint8_t Nacc=4;
|
||||
uint16_t j0,j,idelta;
|
||||
uint16_t i0 = mdci->i0;
|
||||
int n;
|
||||
uint8_t reset;
|
||||
uint32_t x1, x2, s = 0;
|
||||
uint8_t Nacc = 4;
|
||||
uint16_t j0, j, idelta;
|
||||
uint16_t i0 = mdci->i0;
|
||||
|
||||
// Note: we could actually not do anything if i-i0 < Nacc, save it for later
|
||||
|
||||
reset = 1;
|
||||
// x1 is set in lte_gold_generic
|
||||
|
||||
if ((mdci->rnti == 0xFFFE) ||
|
||||
(mdci->ce_mode == 2)) // CEModeB Note: also for mdci->rnti==SC_RNTI
|
||||
Nacc=frame_parms->frame_type == FDD ? 4 : 10;
|
||||
else Nacc=1;
|
||||
|
||||
if (frame_parms->frame_type == FDD || Nacc == 1) idelta = 0;
|
||||
else idelta = Nacc-2;
|
||||
|
||||
j0 = (i0+idelta)/Nacc;
|
||||
j = (i - i0)/Nacc;
|
||||
if ((mdci->rnti == 0xFFFE) || (mdci->ce_mode == 2)) // CEModeB Note: also for mdci->rnti==SC_RNTI
|
||||
Nacc = frame_parms->frame_type == FDD ? 4 : 10;
|
||||
else
|
||||
Nacc = 1;
|
||||
|
||||
if (frame_parms->frame_type == FDD || Nacc == 1)
|
||||
idelta = 0;
|
||||
else
|
||||
idelta = Nacc - 2;
|
||||
|
||||
j0 = (i0 + idelta) / Nacc;
|
||||
j = (i - i0) / Nacc;
|
||||
|
||||
|
||||
|
||||
// rule for BL/CE UEs from Section 6.8.B2 in 36.211
|
||||
x2= ((((j0+j)*Nacc)%10)<<9) + mdci->dmrs_scrambling_init;
|
||||
|
||||
for (n=0; n<length; n++) {
|
||||
if ((i&0x1f)==0) {
|
||||
x2 = ((((j0 + j) * Nacc) % 10) << 9) + mdci->dmrs_scrambling_init;
|
||||
LOG_I(PHY,"MPDCCH cinit = %x (mdci->dmrs_scrambling_init = %d), scrambling %d encoded DCI bits\n",
|
||||
x2,mdci->dmrs_scrambling_init,length);
|
||||
for (n = 0; n < length; n++) {
|
||||
if ((n & 0x1f) == 0) {
|
||||
s = lte_gold_generic(&x1, &x2, reset);
|
||||
//printf("lte_gold[%d]=%x\n",i,s);
|
||||
reset = 0;
|
||||
}
|
||||
e[i] = (e[i]&1) ^ ((s>>(i&0x1f))&1);
|
||||
|
||||
e[n] = (e[n] & 1) ^ ((s >> (n & 0x1f)) & 1);
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
// this table is the allocation of modulated MPDCCH format 5 symbols to REs
|
||||
// There are in total 36 REs/ECCE * 4 ECCE/PRB_pair = 144 REs in total/PRB_pair, total is 168 REs => 24 REs for DMRS
|
||||
// For format 5 there are 6 PRB pairs => 864 REs for 24 total ECCE
|
||||
static uint16_t mpdcch5tab[864];
|
||||
// this table is the allocation of modulated MPDCCH format 5 symbols to REs, antenna ports 107,108
|
||||
// start symbol is symbol 1 and L'=24 => all 6 PRBs in the set
|
||||
// 9 symbols without DMRS = 9*12*6 REs = 648 REs
|
||||
// 4 symbols with DMRS (3 REs stolen per symbol = 4*9*6 REs = 216 REs
|
||||
// Total = 648+216 = 864 REs = 1728 bits
|
||||
static uint16_t mpdcch5ss1tab[864];
|
||||
|
||||
void init_mpdcch5tab_normal_regular_subframe_evenNRBDL(PHY_VARS_eNB *eNB) {
|
||||
int l,k,kmod,re;
|
||||
void init_mpdcch5ss1tab_normal_regular_subframe_evenNRBDL(PHY_VARS_eNB * eNB)
|
||||
{
|
||||
int l, k, kmod, re=0;
|
||||
|
||||
LOG_I(PHY,"Inititalizing mpdcch5tab for normal prefix, normal prefix, no PSS/SSS/PBCH, even N_RB_DL\n");
|
||||
for (l=0,re=0;l<14;l++) {
|
||||
for (k=0;k<72;k++){
|
||||
kmod = k % 12;
|
||||
if (((l!=5) && (l!=6) && (l!=12) && (l!=13)) ||
|
||||
(((l==5)||(l==6)||(l==12)||(l==13))&&(kmod!=0)&&(kmod!=5)&&(kmod!=10)))
|
||||
mpdcch5tab[re++]=(l*eNB->frame_parms.ofdm_symbol_size)+k;
|
||||
LOG_I(PHY, "Inititalizing mpdcchss15tab for normal prefix, normal prefix, no PSS/SSS/PBCH, even N_RB_DL\n");
|
||||
|
||||
for (l = 1; l < 14; l++) {
|
||||
for (k = 0; k < 72; k++) {
|
||||
kmod = k % 12;
|
||||
if (((l != 5) && (l != 6) && (l != 12) && (l != 13)) || (kmod == 2) || (kmod == 3) || (kmod == 4) || (kmod == 7) || (kmod == 8) || (kmod == 9)) {
|
||||
mpdcch5ss1tab[re] = (l * eNB->frame_parms.ofdm_symbol_size) + k;
|
||||
re++;
|
||||
printf("l %d, k %d (kmod %d) => re %d\n", l, k, kmod, re);
|
||||
} else if ((kmod == 0) || (kmod == 5) || (kmod == 10)) {
|
||||
mpdcch5ss1tab[re++] = (l * eNB->frame_parms.ofdm_symbol_size) + k;
|
||||
}
|
||||
}
|
||||
}
|
||||
AssertFatal(re==864,"RE count not equal to 864\n");
|
||||
AssertFatal(re == 864, "RE count not equal to 864 (%d)\n", re);
|
||||
}
|
||||
|
||||
extern uint8_t *generate_dci0(uint8_t *dci,
|
||||
uint8_t *e,
|
||||
uint8_t DCI_LENGTH,
|
||||
uint8_t aggregation_level,
|
||||
uint16_t rnti);
|
||||
// this table is the allocation of modulated MPDCCH format 5 symbols to REs, antenna ports 107,108
|
||||
// start symbol is symbol 2 and L'=24 => all 6 PRBs in the set
|
||||
// 8 symbols without DMRS = 8*12*6 REs = 576 REs
|
||||
// 4 symbols with DMRS (3 REs stolen per symbol = 4*9*6 REs = 216 REs
|
||||
// Total = 576+216 = 792 REs = 1584 bits
|
||||
static uint16_t mpdcch5ss2tab[792];
|
||||
|
||||
void generate_mdci_top(PHY_VARS_eNB *eNB, int frame, int subframe,int16_t amp,int32_t **txdataF) {
|
||||
void init_mpdcch5ss2tab_normal_regular_subframe_evenNRBDL(PHY_VARS_eNB * eNB)
|
||||
{
|
||||
int l, k, kmod, re=0;
|
||||
int nushift = eNB->frame_parms.Nid_cell % 6;
|
||||
int nushiftp3 = (eNB->frame_parms.Nid_cell+3) % 6;
|
||||
// NOTE : THIS IS FOR TM1 ONLY FOR NOW!!!!!!!
|
||||
LOG_I(PHY, "Inititalizing mpdcch5ss2tab for normal prefix, normal prefix, no PSS/SSS/PBCH, even N_RB_DL\n");
|
||||
for (l = 2; l < 14; l++) {
|
||||
for (k = 0; k < 72; k++) {
|
||||
kmod = k % 12;
|
||||
if ((((l == 4)||(l==11)) && (kmod != nushiftp3) && (kmod != (nushiftp3+6))) ||
|
||||
((l == 7) && (kmod != nushift) &&(kmod != (nushift+6)))) { // CS RS
|
||||
mpdcch5ss2tab[re] = (l * eNB->frame_parms.ofdm_symbol_size) + k;
|
||||
re++;
|
||||
}
|
||||
if (((l!=4)&&(l!=7)&&(l!=11)) &&
|
||||
(((l != 5) && (l != 6) && (l != 12) && (l != 13)) || (kmod == 2) || (kmod == 3) || (kmod == 4) || (kmod == 7) || (kmod == 8) || (kmod == 9))) {
|
||||
mpdcch5ss2tab[re] = (l * eNB->frame_parms.ofdm_symbol_size) + k;
|
||||
re++;
|
||||
}
|
||||
}
|
||||
}
|
||||
AssertFatal(re == 684, "RE count not equal to 684\n");
|
||||
}
|
||||
|
||||
LTE_eNB_MPDCCH *mpdcch= &eNB->mpdcch_vars[subframe&2];
|
||||
mDCI_ALLOC_t *mdci;
|
||||
int coded_bits;
|
||||
LTE_DL_FRAME_PARMS *fp=&eNB->frame_parms;
|
||||
int i;
|
||||
int gain_lin_QPSK;
|
||||
// this table is the allocation of modulated MPDCCH format 5 symbols to REs, antenna ports 107,108
|
||||
// start symbol is symbol 3 and L'=24 => all 6 PRBs in the set
|
||||
// 7 symbols without DMRS = 7*12*6 REs = 504 REs
|
||||
// 4 symbols with DMRS (3 REs stolen per symbol = 4*9*6 REs = 216 REs
|
||||
// Total = 504+216 = 720 REs = 1440 bits
|
||||
static uint16_t mpdcch5ss3tab[720];
|
||||
void init_mpdcch5ss3tab_normal_regular_subframe_evenNRBDL(PHY_VARS_eNB * eNB)
|
||||
{
|
||||
int l, k, kmod, re=0;
|
||||
|
||||
for (i=0;i<mpdcch->num_dci;i++) {
|
||||
LOG_I(PHY, "Inititalizing mpdcch5ss3tab for normal prefix, normal prefix, no PSS/SSS/PBCH, even N_RB_DL\n");
|
||||
for (l = 3; l < 14; l++) {
|
||||
for (k = 0; k < 72; k++) {
|
||||
kmod = k % 12;
|
||||
if (((l != 5) && (l != 6) && (l != 12) && (l != 13)) || (kmod == 2) || (kmod == 3) || (kmod == 4) || (kmod == 7) || (kmod == 8) || (kmod == 9)) {
|
||||
mpdcch5ss3tab[re] = (l * eNB->frame_parms.ofdm_symbol_size) + k;
|
||||
re++;
|
||||
} else if ((kmod == 0) || (kmod == 5) || (kmod == 10)) {
|
||||
mpdcch5ss3tab[re++] = (l * eNB->frame_parms.ofdm_symbol_size) + k;
|
||||
}
|
||||
}
|
||||
}
|
||||
AssertFatal(re == 720, "RE count not equal to 792\n");
|
||||
}
|
||||
|
||||
// this table is the allocation of modulated MPDCCH format 3 symbols to REs, antenna ports 107,108
|
||||
// with start symbol 1, using L'=16 => first 4 PRBs in the set
|
||||
// 8 symbols without DMRS = 9*12*4 REs = 432 REs
|
||||
// 4 symbols with DMRS (3 REs stolen per symbol = 4*9*4 REs = 144 REs
|
||||
// Total = 432+144 = 576 = 16CCE*36RE/CCE
|
||||
static uint16_t mpdcch3ss1tab[576];
|
||||
|
||||
void init_mpdcch3ss1tab_normal_regular_subframe_evenNRBDL(PHY_VARS_eNB * eNB)
|
||||
{
|
||||
int l, k, kmod, re=0;
|
||||
|
||||
LOG_I(PHY, "Inititalizing mpdcch3ss1tab for normal prefix, normal prefix, no PSS/SSS/PBCH, even N_RB_DL\n");
|
||||
for (l = 1, re = 0; l < 14; l++) {
|
||||
for (k = 0; k < 48; k++) {
|
||||
kmod = k % 12;
|
||||
if (((l != 5) && (l != 6) && (l != 12) && (l != 13)) || (((l == 5) || (l == 6) || (l == 12) || (l == 13)) && (kmod != 0) && (kmod != 5) && (kmod != 10))) {
|
||||
mpdcch3ss1tab[re] = (l * eNB->frame_parms.ofdm_symbol_size) + k;
|
||||
re++;
|
||||
}
|
||||
}
|
||||
}
|
||||
AssertFatal(re == 576, "RE count not equal to 864\n");
|
||||
}
|
||||
|
||||
// this table is the allocation of modulated MPDCCH format 2 symbols to REs, antenna ports 107,108
|
||||
// with start symbol 1, using L'=8 => last 2 PRBs in the set
|
||||
// 8 symbols without DMRS = 9*12*2 REs = 216 REs
|
||||
// 4 symbols with DMRS (3 REs stolen per symbol = 4*9*2 REs = 72 REs
|
||||
// Total = 216+72 = 288 = 8CCE*36RE/CCE
|
||||
static uint16_t mpdcch2ss1tab[288];
|
||||
|
||||
void init_mpdcch2ss1tab_normal_regular_subframe_evenNRBDL(PHY_VARS_eNB * eNB)
|
||||
{
|
||||
int l, k, kmod, re=0;
|
||||
|
||||
LOG_I(PHY, "Inititalizing mpdcch2ss1tab for normal prefix, normal prefix, no PSS/SSS/PBCH, even N_RB_DL\n");
|
||||
for (l = 1, re = 0; l < 14; l++) {
|
||||
for (k = 0; k < 24; k++) {
|
||||
kmod = k % 12;
|
||||
if (((l != 5) && (l != 6) && (l != 12) && (l != 13)) || (((l == 5) || (l == 6) || (l == 12) || (l == 13)) && (kmod != 0) && (kmod != 5) && (kmod != 10))) {
|
||||
mpdcch2ss1tab[re] = (l * eNB->frame_parms.ofdm_symbol_size) + k;
|
||||
re++;
|
||||
}
|
||||
}
|
||||
}
|
||||
AssertFatal(re == 288, "RE count not equal to 288\n");
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
extern uint8_t *generate_dci0(uint8_t * dci, uint8_t * e, uint8_t DCI_LENGTH, uint16_t coded_bits, uint16_t rnti);
|
||||
|
||||
|
||||
uint16_t mpdcch_dmrs_tab[12 * 6];
|
||||
|
||||
void init_mpdcch_dmrs_tab(uint16_t oss)
|
||||
{
|
||||
|
||||
int re = 5 * oss;
|
||||
int pos = 0;
|
||||
|
||||
for (int symb = 0; symb < 4; symb++) {
|
||||
for (int prb = 0; prb < 6; prb++, re += 12) {
|
||||
mpdcch_dmrs_tab[pos++] = re;
|
||||
mpdcch_dmrs_tab[pos++] = re + 5;
|
||||
mpdcch_dmrs_tab[pos++] = re + 10;
|
||||
}
|
||||
if (symb == 0)
|
||||
re = 6 * oss;
|
||||
else if (symb == 1)
|
||||
re = 12 * oss;
|
||||
else if (symb == 2)
|
||||
re = 13 * oss;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
void generate_mdci_top(PHY_VARS_eNB * eNB, int frame, int subframe, int16_t amp, int32_t ** txdataF)
|
||||
{
|
||||
|
||||
LTE_eNB_MPDCCH *mpdcch = &eNB->mpdcch_vars[subframe & 1];
|
||||
mDCI_ALLOC_t *mdci;
|
||||
int coded_bits;
|
||||
LTE_DL_FRAME_PARMS *fp = &eNB->frame_parms;
|
||||
int i;
|
||||
int gain_lin_QPSK;
|
||||
uint16_t *mpdcchtab;
|
||||
|
||||
uint32_t x1, x2, s = 0;
|
||||
uint8_t Nacc = 4;
|
||||
uint16_t j0, j, idelta;
|
||||
uint16_t i0;
|
||||
|
||||
int off=0;
|
||||
|
||||
// Assumption: only handle a single MPDCCH per narrowband
|
||||
|
||||
int nsymb = (fp->Ncp==0) ? 14:12;
|
||||
|
||||
int symbol_offset = (uint32_t)fp->ofdm_symbol_size*(subframe*nsymb);
|
||||
|
||||
int wp[2][4] = {{1,1,1,1},{1,-1,1,-1}};
|
||||
int *w;
|
||||
|
||||
LOG_I(PHY, "generate_mdci_top: num_dci %d\n", mpdcch->num_dci);
|
||||
|
||||
for (i = 0; i < mpdcch->num_dci; i++) {
|
||||
mdci = &mpdcch->mdci_alloc[i];
|
||||
|
||||
|
||||
AssertFatal(fp->frame_type==FDD,"TDD is not yet supported for MPDCCH\n");
|
||||
AssertFatal(fp->Ncp == NORMAL,"Extended Prefix not yet supported for MPDCCH\n");
|
||||
AssertFatal(mdci->L<=24,"L is %d\n",mdci->L);
|
||||
AssertFatal(fp->N_RB_DL==50 || fp->N_RB_DL==100,"Only N_RB_DL=50,100 for MPDCCH\n");
|
||||
AssertFatal(fp->frame_type == FDD, "TDD is not yet supported for MPDCCH\n");
|
||||
AssertFatal(fp->Ncp == NORMAL, "Extended Prefix not yet supported for MPDCCH\n");
|
||||
AssertFatal(mdci->L <= 24, "L is %d\n", mdci->L);
|
||||
AssertFatal(fp->N_RB_DL == 50 || fp->N_RB_DL == 100, "Only N_RB_DL=50,100 for MPDCCH\n");
|
||||
// Force MPDDCH format 5
|
||||
AssertFatal(mdci->number_of_prb_pairs==6,"2 or 4 PRB pairs not support yet for MPDCCH\n");
|
||||
AssertFatal(mdci->reps>0,"mdci->reps==0\n");
|
||||
AssertFatal(mdci->number_of_prb_pairs == 6, "2 or 4 PRB pairs not support yet for MPDCCH\n");
|
||||
|
||||
// 9 REs/EREG * 4 EREG/ECCE => 36 REs/ECCE => 72 bits/ECCE, so same as regular PDCCH channel encoding
|
||||
// These are to avoid unimplemented things
|
||||
AssertFatal(mdci->ce_mode == 1, "CE mode (%d) B not activated yet\n", mdci->ce_mode);
|
||||
AssertFatal(mdci->L == 24, "Only 2+4 and aggregation 24 for now\n");
|
||||
int a_index=mdci->rnti & 3;
|
||||
|
||||
i0 = mdci->i0;
|
||||
// antenna index
|
||||
|
||||
if (mdci->start_symbol == 1) {
|
||||
mpdcchtab = mpdcch5ss1tab;
|
||||
coded_bits = 756*2;
|
||||
} else if (mdci->start_symbol == 2) {
|
||||
mpdcchtab = mpdcch5ss2tab;
|
||||
coded_bits=684*2;
|
||||
} else if (mdci->start_symbol == 3) {
|
||||
mpdcchtab = mpdcch5ss3tab;
|
||||
coded_bits = 612*2;
|
||||
} else
|
||||
AssertFatal(1 == 0, "Illegal combination start_symbol %d, a_index %d\n", mdci->start_symbol, a_index);
|
||||
|
||||
LOG_I(PHY, "mdci %d, length %d: rnti %x, L %d, prb_pairs %d, ce_mode %d, transmission type %s, i0 %d, ss %d ,coded_bits %d\n",
|
||||
i, mdci->dci_length,mdci->rnti,
|
||||
mdci->L, mdci->number_of_prb_pairs,
|
||||
mdci->ce_mode,
|
||||
mdci->transmission_type == 1? "dist" : "loc",
|
||||
mdci->i0, mdci->start_symbol,
|
||||
coded_bits);
|
||||
|
||||
// Note: We only have to run this every Nacc subframes during repetitions, data and scrambling are constant, but we do it for now to simplify during testing
|
||||
|
||||
generate_dci0(mdci->dci_pdu,
|
||||
mpdcch->e+(72*mdci->firstCCE),
|
||||
mdci->dci_length,
|
||||
mdci->L,
|
||||
mdci->rnti);
|
||||
generate_dci0(mdci->dci_pdu, mpdcch->e, mdci->dci_length, coded_bits, mdci->rnti);
|
||||
|
||||
|
||||
|
||||
coded_bits = 72 * mdci->L;
|
||||
|
||||
// scrambling
|
||||
uint16_t absSF = (frame*10)+subframe;
|
||||
uint16_t absSF = (frame * 10) + subframe;
|
||||
|
||||
AssertFatal(absSF < 1024,
|
||||
"Absolute subframe %d = %d*10 + %d > 1023\n",
|
||||
absSF,frame,subframe);
|
||||
|
||||
mpdcch_scrambling(fp,
|
||||
mdci,
|
||||
absSF,
|
||||
mpdcch->e+(72*mdci->firstCCE),
|
||||
coded_bits);
|
||||
AssertFatal(absSF < 10240, "Absolute subframe %d = %d*10 + %d > 10239\n", absSF, frame, subframe);
|
||||
|
||||
mpdcch_scrambling(fp, mdci, absSF, mpdcch->e, coded_bits);
|
||||
|
||||
// Modulation for PDCCH
|
||||
if (fp->nb_antenna_ports_eNB==1)
|
||||
gain_lin_QPSK = (int16_t)((amp*ONE_OVER_SQRT2_Q15)>>15);
|
||||
if (fp->nb_antenna_ports_eNB == 1)
|
||||
gain_lin_QPSK = (int16_t) ((amp * ONE_OVER_SQRT2_Q15) >> 15);
|
||||
else
|
||||
gain_lin_QPSK = amp/2;
|
||||
gain_lin_QPSK = amp / 2;
|
||||
|
||||
uint8_t *e_ptr = mpdcch->e;
|
||||
uint8_t *e_ptr = mpdcch->e;
|
||||
|
||||
// if (mdci->transmission_type==0) nprime=mdci->rnti&3; // for Localized 2+4 we use 6.8B.5 rule
|
||||
// map directly to one antenna port for now
|
||||
@@ -183,20 +356,135 @@ void generate_mdci_top(PHY_VARS_eNB *eNB, int frame, int subframe,int16_t amp,in
|
||||
// first RE of narrowband
|
||||
// mpdcchtab5 below contains the mapping from each coded symbol to relative RE avoiding the DMRS
|
||||
|
||||
int nb_i0;
|
||||
switch (fp->N_RB_DL) {
|
||||
|
||||
int re_offset = fp->first_carrier_offset + 1 + ((fp->N_RB_DL==100)?1:0) + mdci->narrowband*12*6;
|
||||
if (re_offset>fp->ofdm_symbol_size) re_offset-=(fp->ofdm_symbol_size-1);
|
||||
int32_t *txF = &txdataF[0][re_offset];
|
||||
int32_t yIQ;
|
||||
|
||||
for (i=0; i<(coded_bits>>1); i++) {
|
||||
// QPSK modulation to yIQ
|
||||
((int16_t*)&yIQ)[0] = (*e_ptr == 1) ? -gain_lin_QPSK : gain_lin_QPSK; e_ptr++;
|
||||
((int16_t*)&yIQ)[1] = (*e_ptr == 1) ? -gain_lin_QPSK : gain_lin_QPSK; e_ptr++;
|
||||
txF[mpdcch5tab[i+(36*mdci->firstCCE)]] = yIQ;
|
||||
case 6:
|
||||
case 25:
|
||||
nb_i0 = 0;
|
||||
break;
|
||||
case 15:
|
||||
case 50:
|
||||
case 75:
|
||||
nb_i0 = 1;
|
||||
break;
|
||||
case 100:
|
||||
nb_i0 = 2;
|
||||
break;
|
||||
default:
|
||||
AssertFatal(1 == 0, "Illegal N_RB_DL %d\n", fp->N_RB_DL);
|
||||
break;
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
int re_offset = fp->first_carrier_offset + (12 * nb_i0) + (mdci->narrowband * 12 * 6);
|
||||
if (re_offset > fp->ofdm_symbol_size)
|
||||
re_offset -= (fp->ofdm_symbol_size - 1);
|
||||
int32_t *txF = &txdataF[0][symbol_offset+re_offset];
|
||||
int32_t yIQ;
|
||||
|
||||
for (i = 0; i < (coded_bits >> 1); i++) {
|
||||
// QPSK modulation to yIQ
|
||||
((int16_t *) & yIQ)[0] = (*e_ptr == 1) ? -gain_lin_QPSK : gain_lin_QPSK;
|
||||
e_ptr++;
|
||||
((int16_t *) & yIQ)[1] = (*e_ptr == 1) ? -gain_lin_QPSK : gain_lin_QPSK;
|
||||
e_ptr++;
|
||||
txF[mpdcchtab[i]] = yIQ;
|
||||
/*
|
||||
LOG_I(PHY,"Frame %d, subframe %d: mpdcch pos %d (%d,%d) => (%d,%d)\n",
|
||||
frame,subframe,i,mpdcchtab[i]+re_offset,mpdcchtab[i]/fp->ofdm_symbol_size,
|
||||
((int16_t *) & yIQ)[0],((int16_t *) & yIQ)[1]);*/
|
||||
}
|
||||
|
||||
if (mdci->transmission_type == 1) w=0; // distributed
|
||||
else w = wp[a_index&1];
|
||||
// pilot scrambling initiatlization (note: this is for a single repetition)
|
||||
|
||||
// x1 is set in lte_gold_generic
|
||||
|
||||
// rule for BL/CE UEs from Section 6.10.3A.1 in 36.211
|
||||
|
||||
if ((mdci->rnti == 0xFFFE) || (mdci->ce_mode == 2)) // CEModeB Note: also for mdci->rnti==SC_RNTI
|
||||
Nacc = fp->frame_type == FDD ? 4 : 10;
|
||||
else
|
||||
Nacc = 1;
|
||||
|
||||
if (fp->frame_type == FDD || Nacc == 1)
|
||||
idelta = 0;
|
||||
else
|
||||
idelta = Nacc - 2;
|
||||
|
||||
j0 = (i0 + idelta) / Nacc;
|
||||
j = (absSF - i0) / Nacc;
|
||||
|
||||
|
||||
|
||||
uint32_t a = ((((j0 + j) * Nacc) % 10) + 1);
|
||||
uint32_t b = ((mdci->dmrs_scrambling_init << 1) + 1) << 16;
|
||||
x2 = a * b;
|
||||
x2 = x2 + 2;
|
||||
LOG_I(PHY, "mpdcch_dmrs cinit %x (a=%d,b=%d,i0=%d,j0=%d)\n", x2,a,b,i0,j0);
|
||||
|
||||
// add MPDCCH pilots
|
||||
int reset = 1;
|
||||
|
||||
int first_prb = (mdci->narrowband*6) + nb_i0;
|
||||
int last_prb = (mdci->narrowband*6) + nb_i0 + 5;
|
||||
int soffset[4] = {5,6,12,13};
|
||||
|
||||
|
||||
for (int lprime=0,i=0;lprime<4;lprime++) {
|
||||
for (int nprb=0;nprb<110;nprb++) {
|
||||
if (nprb<fp->N_RB_DL) {
|
||||
re_offset = fp->first_carrier_offset + (12 * nprb);
|
||||
if (re_offset > fp->ofdm_symbol_size)
|
||||
re_offset -= (fp->ofdm_symbol_size - 1);
|
||||
txF = &txdataF[0][symbol_offset + re_offset + fp->ofdm_symbol_size*soffset[lprime]];
|
||||
}
|
||||
for (int mprime=0;mprime<3;mprime++,i+=2) {
|
||||
|
||||
if ((i & 0x1f) == 0) {
|
||||
s = lte_gold_generic(&x1, &x2, reset);
|
||||
reset = 0;
|
||||
}
|
||||
|
||||
// select PRBs corresponding to narrowband
|
||||
if ((nprb>= first_prb) &&
|
||||
(nprb<= last_prb)) {
|
||||
((int16_t *) & yIQ)[0] = (((s >> (i & 0x1f)) & 1) == 1) ? -gain_lin_QPSK : gain_lin_QPSK;
|
||||
((int16_t *) & yIQ)[1] = (((s >> ((i + 1) & 0x1f)) & 1) == 1) ? -gain_lin_QPSK : gain_lin_QPSK;
|
||||
AssertFatal(mdci->transmission_type==1,"transmission_type %d!=1, handle this ...\n",mdci->transmission_type);
|
||||
if (mdci->transmission_type==1) { // same thing on both 107 and 109
|
||||
txF[(5*mprime)] = yIQ;
|
||||
txF[1+(5*mprime)] = yIQ;
|
||||
}
|
||||
else { // put on selected antenna port with w sequence
|
||||
|
||||
if (((mprime+nprb)&1) == 0)
|
||||
txF[off+(5*mprime)] = yIQ*w[lprime];
|
||||
else
|
||||
txF[off+(5*mprime)] = yIQ*w[3-lprime];
|
||||
}
|
||||
/*
|
||||
LOG_I(PHY, "mpdcch_dmrs pos (dist %d, l %d,nprb %d,mprime %d) %d => (%d,%d)\n",
|
||||
mdci->transmission_type, soffset[lprime],nprb,mprime,
|
||||
re_offset + fp->ofdm_symbol_size*soffset[lprime]+(5*mprime),
|
||||
((int16_t *) & yIQ)[0], ((int16_t *) & yIQ)[1]);*/
|
||||
} // narrowband condition
|
||||
} // RE (m') loop
|
||||
} // nprb loop
|
||||
} // symbol (l') loop
|
||||
} // num_dci loop
|
||||
}
|
||||
|
||||
void init_mpdcch(PHY_VARS_eNB * eNB)
|
||||
{
|
||||
|
||||
init_mpdcch5ss1tab_normal_regular_subframe_evenNRBDL(eNB);
|
||||
init_mpdcch5ss2tab_normal_regular_subframe_evenNRBDL(eNB);
|
||||
init_mpdcch5ss3tab_normal_regular_subframe_evenNRBDL(eNB);
|
||||
init_mpdcch3ss1tab_normal_regular_subframe_evenNRBDL(eNB);
|
||||
init_mpdcch2ss1tab_normal_regular_subframe_evenNRBDL(eNB);
|
||||
init_mpdcch_dmrs_tab(eNB->frame_parms.ofdm_symbol_size);
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
@@ -150,6 +150,7 @@ void send_IF4p5(RU_t *ru, int frame, int subframe, uint16_t packet_type) {
|
||||
|
||||
for (element_id=0; element_id<db_halflength; element_id+=8) {
|
||||
i = (uint16_t*) &rx0[element_id];
|
||||
|
||||
d = (uint16_t*) &data_block[element_id];
|
||||
d[0] = ((uint16_t) lin2alaw_if4p5[i[0]]) | ((uint16_t)(lin2alaw_if4p5[i[1]]<<8));
|
||||
d[1] = ((uint16_t) lin2alaw_if4p5[i[2]]) | ((uint16_t)(lin2alaw_if4p5[i[3]]<<8));
|
||||
|
||||
@@ -59,7 +59,9 @@ struct DCI6_0A_5MHz {
|
||||
/// Modulation and Coding Scheme and Redundancy Version
|
||||
uint32_t mcs:4;
|
||||
/// RB Assignment (ceil(log2(floor(N_RB_UL/6))) + 5 bits)
|
||||
uint32_t rballoc:7;
|
||||
uint32_t rballoc:5;
|
||||
/// narrowband index log2(floor(N_RB_DL/6))) bits
|
||||
uint32_t narrowband:2;
|
||||
/// Hopping flag
|
||||
uint32_t hopping:1;
|
||||
/// type = 0 => DCI Format 0, type = 1 => DCI Format 1A
|
||||
@@ -92,7 +94,9 @@ struct DCI6_1A_5MHz {
|
||||
/// Modulation and Coding Scheme and Redundancy Version
|
||||
uint32_t mcs:4;
|
||||
/// Resource block assignment (assignment flag = 0 for 5 MHz, ceil(log2(floor(N_RB_DL/6)))+5)
|
||||
uint32_t rballoc:7;
|
||||
uint32_t rballoc:5;
|
||||
/// narrowband index log2(floor(N_RB_DL/6))) bits
|
||||
uint32_t narrowband:2;
|
||||
/// Frequency hopping flag
|
||||
uint32_t hopping:1;
|
||||
/// 0/1A differentiator
|
||||
@@ -125,7 +129,9 @@ struct DCI6_0A_10MHz {
|
||||
/// Modulation and Coding Scheme and Redundancy Version
|
||||
uint32_t mcs:4;
|
||||
/// RB Assignment (ceil(log2(floor(N_RB_UL/6))) + 5 bits)
|
||||
uint32_t rballoc:8;
|
||||
uint32_t rballoc:5;
|
||||
/// narrowband index log2(floor(N_RB_DL/6))) bits
|
||||
uint32_t narrowband:3;
|
||||
/// Hopping flag
|
||||
uint32_t hopping:1;
|
||||
/// type = 0 => DCI Format 0, type = 1 => DCI Format 1A
|
||||
@@ -138,7 +144,7 @@ typedef struct DCI6_0A_10MHz DCI6_0A_10MHz_t;
|
||||
/// basic DCI Format Type 6-1A (10 MHz, FDD primary carrier, 24 bits, 5 bit format, TM!=9,TM!=6, no scheduling enhancement)
|
||||
struct DCI6_1A_10MHz {
|
||||
/// padding to fill 32-bit word
|
||||
uint32_t padding:4;
|
||||
uint32_t padding:3;
|
||||
/// DCI subframe repetition number
|
||||
uint32_t dci_rep:2;
|
||||
/// HARQ-ACK resource offset
|
||||
@@ -157,8 +163,10 @@ struct DCI6_1A_10MHz {
|
||||
uint32_t rep:2;
|
||||
/// Modulation and Coding Scheme and Redundancy Version
|
||||
uint32_t mcs:4;
|
||||
/// Resource block assignment (assignment flag = 0 for 10 MHz, ceil(log2(floor(N_RB_DL/6)))+5)
|
||||
uint32_t rballoc:8;
|
||||
/// Resource block assignment
|
||||
uint32_t rballoc:5;
|
||||
/// narrowband index log2(floor(N_RB_DL/6))) bits
|
||||
uint32_t narrowband:3;
|
||||
/// Frequency hopping flag
|
||||
uint32_t hopping:1;
|
||||
/// 0/1A differentiator
|
||||
@@ -191,7 +199,9 @@ struct DCI6_0A_20MHz {
|
||||
/// Modulation and Coding Scheme and Redundancy Version
|
||||
uint32_t mcs:4;
|
||||
/// RB Assignment (ceil(log2(floor(N_RB_UL/6))) + 5 bits)
|
||||
uint32_t rballoc:9;
|
||||
uint32_t rballoc:5;
|
||||
/// narrowband index log2(floor(N_RB_DL/6))) bits
|
||||
uint32_t narrowband:4;
|
||||
/// Hopping flag
|
||||
uint32_t hopping:1;
|
||||
/// type = 0 => DCI Format 0, type = 1 => DCI Format 1A
|
||||
@@ -224,7 +234,9 @@ struct DCI6_1A_20MHz {
|
||||
/// Modulation and Coding Scheme and Redundancy Version
|
||||
uint32_t mcs:4;
|
||||
/// Resource block assignment (assignment flag = 0 for 20 MHz, ceil(log2(floor(N_RB_DL/6)))+5)
|
||||
uint32_t rballoc:9;
|
||||
uint32_t rballoc:5;
|
||||
/// narrowband index log2(floor(N_RB_DL/6))) bits
|
||||
uint32_t narrowband:4;
|
||||
/// Frequency hopping flag
|
||||
uint32_t hopping:1;
|
||||
/// 0/1A differentiator
|
||||
|
||||
@@ -34,6 +34,7 @@
|
||||
#include "PHY/phy_extern.h"
|
||||
//#include "prach.h"
|
||||
#include "PHY/LTE_TRANSPORT/if4_tools.h"
|
||||
|
||||
#include "SCHED/sched_eNB.h"
|
||||
#include "common/utils/LOG/vcd_signal_dumper.h"
|
||||
#include "prach_extern.h"
|
||||
|
||||
@@ -0,0 +1,804 @@
|
||||
/*
|
||||
* Licensed to the OpenAirInterface (OAI) Software Alliance under one or more
|
||||
* contributor license agreements. See the NOTICE file distributed with
|
||||
* this work for additional information regarding copyright ownership.
|
||||
* The OpenAirInterface Software Alliance licenses this file to You under
|
||||
* the OAI Public License, Version 1.1 (the "License"); you may not use this file
|
||||
* except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.openairinterface.org/?page_id=698
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*-------------------------------------------------------------------------------
|
||||
* For more information about the OpenAirInterface (OAI) Software Alliance:
|
||||
* contact@openairinterface.org
|
||||
*/
|
||||
|
||||
/*! \file PHY/LTE_TRANSPORT/print_stats.c
|
||||
* \brief PHY statstic logging function
|
||||
* \author R. Knopp, F. Kaltenberger, navid nikaein
|
||||
* \date 2011
|
||||
* \version 0.1
|
||||
* \company Eurecom
|
||||
* \email: knopp@eurecom.fr,florian.kaltenberger@eurecom.fr, navid.nikaein@eurecom.fr
|
||||
* \note
|
||||
* \warning
|
||||
*/
|
||||
|
||||
#include "PHY/LTE_TRANSPORT/proto.h"
|
||||
|
||||
#include "PHY/defs.h"
|
||||
#include "PHY/extern.h"
|
||||
#include "SCHED/extern.h"
|
||||
|
||||
#ifdef OPENAIR2
|
||||
#include "openair2/LAYER2/MAC/proto.h"
|
||||
#include "openair2/RRC/L2_INTERFACE/openair_rrc_L2_interface.h"
|
||||
#endif
|
||||
|
||||
extern int mac_get_rrc_status(uint8_t Mod_id,uint8_t eNB_flag,uint8_t index);
|
||||
#if defined(OAI_USRP) || defined(EXMIMO) || defined(OAI_BLADERF) || defined(OAI_LMSSDR)
|
||||
#include "common_lib.h"
|
||||
extern openair0_config_t openair0_cfg[];
|
||||
#endif
|
||||
|
||||
int dump_ue_stats(PHY_VARS_UE *ue, UE_rxtx_proc_t *proc,char* buffer, int length, runmode_t mode, int input_level_dBm)
|
||||
{
|
||||
|
||||
uint8_t eNB=0;
|
||||
uint32_t RRC_status;
|
||||
int len=length;
|
||||
int harq_pid,round;
|
||||
|
||||
if (ue==NULL)
|
||||
return 0;
|
||||
|
||||
if ((mode == normal_txrx) || (mode == no_L2_connect)) {
|
||||
len += sprintf(&buffer[len], "[UE_PROC] UE %d, RNTI %x\n",ue->Mod_id, ue->pdcch_vars[0][0]->crnti);
|
||||
len += sprintf(&buffer[len],"[UE PROC] RSRP[0] %.2f dBm/RE, RSSI %.2f dBm, RSRQ[0] %.2f dB, N0 %d dBm/RE (NF %.1f dB)\n",
|
||||
10*log10(ue->measurements.rsrp[0])-ue->rx_total_gain_dB,
|
||||
10*log10(ue->measurements.rssi)-ue->rx_total_gain_dB,
|
||||
10*log10(ue->measurements.rsrq[0]),
|
||||
ue->measurements.n0_power_tot_dBm,
|
||||
(double)ue->measurements.n0_power_tot_dBm+132.24);
|
||||
|
||||
/*
|
||||
len += sprintf(&buffer[len],
|
||||
"[UE PROC] Frame count: %d\neNB0 RSSI %d dBm/RE (%d dB, %d dB)\neNB1 RSSI %d dBm/RE (%d dB, %d dB)neNB2 RSSI %d dBm/RE (%d dB, %d dB)\nN0 %d dBm/RE, %f dBm/%dPRB (%d dB, %d dB)\n",
|
||||
proc->frame_rx,
|
||||
ue->measurements.rx_rssi_dBm[0],
|
||||
ue->measurements.rx_power_dB[0][0],
|
||||
ue->measurements.rx_power_dB[0][1],
|
||||
ue->measurements.rx_rssi_dBm[1],
|
||||
ue->measurements.rx_power_dB[1][0],
|
||||
ue->measurements.rx_power_dB[1][1],
|
||||
ue->measurements.rx_rssi_dBm[2],
|
||||
ue->measurements.rx_power_dB[2][0],
|
||||
ue->measurements.rx_power_dB[2][1],
|
||||
ue->measurements.n0_power_tot_dBm,
|
||||
ue->measurements.n0_power_tot_dBm+10*log10(12*ue->frame_parms.N_RB_DL),
|
||||
ue->frame_parms.N_RB_DL,
|
||||
ue->measurements.n0_power_dB[0],
|
||||
ue->measurements.n0_power_dB[1]);
|
||||
*/
|
||||
|
||||
#ifdef EXMIMO
|
||||
len += sprintf(&buffer[len], "[UE PROC] RX Gain %d dB (LNA %d, vga %d dB)\n",ue->rx_total_gain_dB, openair0_cfg[0].rxg_mode[0],(int)openair0_cfg[0].rx_gain[0]);
|
||||
#endif
|
||||
#if defined(OAI_USRP) || defined(OAI_BLADERF) || defined(OAI_LMSSDR)
|
||||
len += sprintf(&buffer[len], "[UE PROC] RX Gain %d dB\n",ue->rx_total_gain_dB);
|
||||
#endif
|
||||
#if defined(EXMIMO) || defined(OAI_USRP) || defined(OAI_BLADERF) || defined(OAI_LMSSDR)
|
||||
len += sprintf(&buffer[len], "[UE_PROC] Frequency offset %d Hz, estimated carrier frequency %f Hz\n",ue->common_vars.freq_offset,openair0_cfg[0].rx_freq[0]-ue->common_vars.freq_offset);
|
||||
#endif
|
||||
len += sprintf(&buffer[len], "[UE PROC] UE mode = %s (%d)\n",mode_string[ue->UE_mode[0]],ue->UE_mode[0]);
|
||||
len += sprintf(&buffer[len], "[UE PROC] timing_advance = %d\n",ue->timing_advance);
|
||||
if (ue->UE_mode[0]==PUSCH) {
|
||||
len += sprintf(&buffer[len], "[UE PROC] Po_PUSCH = %d dBm (PL %d dB, Po_NOMINAL_PUSCH %d dBm, PHR %d dB)\n",
|
||||
ue->ulsch[0]->Po_PUSCH,
|
||||
get_PL(ue->Mod_id,ue->CC_id,0),
|
||||
ue->frame_parms.ul_power_control_config_common.p0_NominalPUSCH,
|
||||
ue->ulsch[0]->PHR);
|
||||
len += sprintf(&buffer[len], "[UE PROC] Po_PUCCH = %d dBm (Po_NOMINAL_PUCCH %d dBm, g_pucch %d dB)\n",
|
||||
get_PL(ue->Mod_id,ue->CC_id,0)+
|
||||
ue->frame_parms.ul_power_control_config_common.p0_NominalPUCCH+
|
||||
ue->dlsch[0][0][0]->g_pucch,
|
||||
ue->frame_parms.ul_power_control_config_common.p0_NominalPUCCH,
|
||||
ue->dlsch[0][0][0]->g_pucch);
|
||||
}
|
||||
//for (eNB=0;eNB<NUMBER_OF_eNB_MAX;eNB++) {
|
||||
for (eNB=0; eNB<1; eNB++) {
|
||||
len += sprintf(&buffer[len], "[UE PROC] RX spatial power eNB%d: [%d %d; %d %d] dB\n",
|
||||
eNB,
|
||||
ue->measurements.rx_spatial_power_dB[eNB][0][0],
|
||||
ue->measurements.rx_spatial_power_dB[eNB][0][1],
|
||||
ue->measurements.rx_spatial_power_dB[eNB][1][0],
|
||||
ue->measurements.rx_spatial_power_dB[eNB][1][1]);
|
||||
|
||||
len += sprintf(&buffer[len], "[UE PROC] RX total power eNB%d: %d dB, avg: %d dB\n",eNB,ue->measurements.rx_power_tot_dB[eNB],ue->measurements.rx_power_avg_dB[eNB]);
|
||||
len += sprintf(&buffer[len], "[UE PROC] RX total power lin: %d, avg: %d, RX total noise lin: %d, avg: %d\n",ue->measurements.rx_power_tot[eNB],
|
||||
ue->measurements.rx_power_avg[eNB], ue->measurements.n0_power_tot, ue->measurements.n0_power_avg);
|
||||
len += sprintf(&buffer[len], "[UE PROC] effective SINR %.2f dB\n",ue->sinr_eff);
|
||||
len += sprintf(&buffer[len], "[UE PROC] Wideband CQI eNB %d: %d dB, avg: %d dB\n",eNB,ue->measurements.wideband_cqi_tot[eNB],ue->measurements.wideband_cqi_avg[eNB]);
|
||||
|
||||
switch (ue->frame_parms.N_RB_DL) {
|
||||
case 6:
|
||||
len += sprintf(&buffer[len], "[UE PROC] Subband CQI eNB%d (Ant 0): [%d %d %d %d %d %d] dB\n",
|
||||
eNB,
|
||||
ue->measurements.subband_cqi_dB[eNB][0][0],
|
||||
ue->measurements.subband_cqi_dB[eNB][0][1],
|
||||
ue->measurements.subband_cqi_dB[eNB][0][2],
|
||||
ue->measurements.subband_cqi_dB[eNB][0][3],
|
||||
ue->measurements.subband_cqi_dB[eNB][0][4],
|
||||
ue->measurements.subband_cqi_dB[eNB][0][5]);
|
||||
|
||||
|
||||
len += sprintf(&buffer[len], "[UE PROC] Subband CQI eNB%d (Ant 1): [%d %d %d %d %d %d] dB\n",
|
||||
eNB,
|
||||
ue->measurements.subband_cqi_dB[eNB][1][0],
|
||||
ue->measurements.subband_cqi_dB[eNB][1][1],
|
||||
ue->measurements.subband_cqi_dB[eNB][1][2],
|
||||
ue->measurements.subband_cqi_dB[eNB][1][3],
|
||||
ue->measurements.subband_cqi_dB[eNB][1][4],
|
||||
ue->measurements.subband_cqi_dB[eNB][1][5]);
|
||||
|
||||
|
||||
len += sprintf(&buffer[len], "[UE PROC] Subband PMI eNB%d (Ant 0): [(%d %d) (%d %d) (%d %d) (%d %d) (%d %d) (%d %d)]\n",
|
||||
eNB,
|
||||
ue->measurements.subband_pmi_re[eNB][0][0],
|
||||
ue->measurements.subband_pmi_im[eNB][0][0],
|
||||
ue->measurements.subband_pmi_re[eNB][1][0],
|
||||
ue->measurements.subband_pmi_im[eNB][1][0],
|
||||
ue->measurements.subband_pmi_re[eNB][2][0],
|
||||
ue->measurements.subband_pmi_im[eNB][2][0],
|
||||
ue->measurements.subband_pmi_re[eNB][3][0],
|
||||
ue->measurements.subband_pmi_im[eNB][3][0],
|
||||
ue->measurements.subband_pmi_re[eNB][4][0],
|
||||
ue->measurements.subband_pmi_im[eNB][4][0],
|
||||
ue->measurements.subband_pmi_re[eNB][5][0],
|
||||
ue->measurements.subband_pmi_im[eNB][5][0]);
|
||||
|
||||
len += sprintf(&buffer[len], "[UE PROC] Subband PMI eNB%d (Ant 1): [(%d %d) (%d %d) (%d %d) (%d %d) (%d %d) (%d %d)]\n",
|
||||
eNB,
|
||||
ue->measurements.subband_pmi_re[eNB][0][1],
|
||||
ue->measurements.subband_pmi_im[eNB][0][1],
|
||||
ue->measurements.subband_pmi_re[eNB][1][1],
|
||||
ue->measurements.subband_pmi_im[eNB][1][1],
|
||||
ue->measurements.subband_pmi_re[eNB][2][1],
|
||||
ue->measurements.subband_pmi_im[eNB][2][1],
|
||||
ue->measurements.subband_pmi_re[eNB][3][1],
|
||||
ue->measurements.subband_pmi_im[eNB][3][1],
|
||||
ue->measurements.subband_pmi_re[eNB][4][1],
|
||||
ue->measurements.subband_pmi_im[eNB][4][1],
|
||||
ue->measurements.subband_pmi_re[eNB][5][1],
|
||||
ue->measurements.subband_pmi_im[eNB][5][1]);
|
||||
|
||||
len += sprintf(&buffer[len], "[UE PROC] PMI Antenna selection eNB%d : [%d %d %d %d %d %d]\n",
|
||||
eNB,
|
||||
ue->measurements.selected_rx_antennas[eNB][0],
|
||||
ue->measurements.selected_rx_antennas[eNB][1],
|
||||
ue->measurements.selected_rx_antennas[eNB][2],
|
||||
ue->measurements.selected_rx_antennas[eNB][3],
|
||||
ue->measurements.selected_rx_antennas[eNB][4],
|
||||
ue->measurements.selected_rx_antennas[eNB][5]);
|
||||
|
||||
len += sprintf(&buffer[len], "[UE PROC] Quantized PMI eNB %d (max): %jx\n",eNB,pmi2hex_2Ar1(quantize_subband_pmi(&ue->measurements,eNB,6)));
|
||||
len += sprintf(&buffer[len], "[UE PROC] Quantized PMI eNB %d (both): %jx,%jx\n",eNB,
|
||||
pmi2hex_2Ar1(quantize_subband_pmi2(&ue->measurements,eNB,0,6)),
|
||||
pmi2hex_2Ar1(quantize_subband_pmi2(&ue->measurements,eNB,1,6)));
|
||||
break;
|
||||
|
||||
case 25:
|
||||
len += sprintf(&buffer[len], "[UE PROC] Subband CQI eNB%d (Ant 0): [%d %d %d %d %d %d %d] dB\n",
|
||||
eNB,
|
||||
ue->measurements.subband_cqi_dB[eNB][0][0],
|
||||
ue->measurements.subband_cqi_dB[eNB][0][1],
|
||||
ue->measurements.subband_cqi_dB[eNB][0][2],
|
||||
ue->measurements.subband_cqi_dB[eNB][0][3],
|
||||
ue->measurements.subband_cqi_dB[eNB][0][4],
|
||||
ue->measurements.subband_cqi_dB[eNB][0][5],
|
||||
ue->measurements.subband_cqi_dB[eNB][0][6]);
|
||||
|
||||
len += sprintf(&buffer[len], "[UE PROC] Subband CQI eNB%d (Ant 1): [%d %d %d %d %d %d %d] dB\n",
|
||||
eNB,
|
||||
ue->measurements.subband_cqi_dB[eNB][1][0],
|
||||
ue->measurements.subband_cqi_dB[eNB][1][1],
|
||||
ue->measurements.subband_cqi_dB[eNB][1][2],
|
||||
ue->measurements.subband_cqi_dB[eNB][1][3],
|
||||
ue->measurements.subband_cqi_dB[eNB][1][4],
|
||||
ue->measurements.subband_cqi_dB[eNB][1][5],
|
||||
ue->measurements.subband_cqi_dB[eNB][1][6]);
|
||||
|
||||
|
||||
len += sprintf(&buffer[len], "[UE PROC] Subband PMI eNB%d (Ant 0): [(%d %d) (%d %d) (%d %d) (%d %d) (%d %d) (%d %d) (%d %d)]\n",
|
||||
eNB,
|
||||
ue->measurements.subband_pmi_re[eNB][0][0],
|
||||
ue->measurements.subband_pmi_im[eNB][0][0],
|
||||
ue->measurements.subband_pmi_re[eNB][1][0],
|
||||
ue->measurements.subband_pmi_im[eNB][1][0],
|
||||
ue->measurements.subband_pmi_re[eNB][2][0],
|
||||
ue->measurements.subband_pmi_im[eNB][2][0],
|
||||
ue->measurements.subband_pmi_re[eNB][3][0],
|
||||
ue->measurements.subband_pmi_im[eNB][3][0],
|
||||
ue->measurements.subband_pmi_re[eNB][4][0],
|
||||
ue->measurements.subband_pmi_im[eNB][4][0],
|
||||
ue->measurements.subband_pmi_re[eNB][5][0],
|
||||
ue->measurements.subband_pmi_im[eNB][5][0],
|
||||
ue->measurements.subband_pmi_re[eNB][6][0],
|
||||
ue->measurements.subband_pmi_im[eNB][6][0]);
|
||||
|
||||
len += sprintf(&buffer[len], "[UE PROC] Subband PMI eNB%d (Ant 1): [(%d %d) (%d %d) (%d %d) (%d %d) (%d %d) (%d %d) (%d %d)]\n",
|
||||
eNB,
|
||||
ue->measurements.subband_pmi_re[eNB][0][1],
|
||||
ue->measurements.subband_pmi_im[eNB][0][1],
|
||||
ue->measurements.subband_pmi_re[eNB][1][1],
|
||||
ue->measurements.subband_pmi_im[eNB][1][1],
|
||||
ue->measurements.subband_pmi_re[eNB][2][1],
|
||||
ue->measurements.subband_pmi_im[eNB][2][1],
|
||||
ue->measurements.subband_pmi_re[eNB][3][1],
|
||||
ue->measurements.subband_pmi_im[eNB][3][1],
|
||||
ue->measurements.subband_pmi_re[eNB][4][1],
|
||||
ue->measurements.subband_pmi_im[eNB][4][1],
|
||||
ue->measurements.subband_pmi_re[eNB][5][1],
|
||||
ue->measurements.subband_pmi_im[eNB][5][1],
|
||||
ue->measurements.subband_pmi_re[eNB][6][1],
|
||||
ue->measurements.subband_pmi_im[eNB][6][1]);
|
||||
|
||||
len += sprintf(&buffer[len], "[UE PROC] PMI Antenna selection eNB%d : [%d %d %d %d %d %d %d]\n",
|
||||
eNB,
|
||||
ue->measurements.selected_rx_antennas[eNB][0],
|
||||
ue->measurements.selected_rx_antennas[eNB][1],
|
||||
ue->measurements.selected_rx_antennas[eNB][2],
|
||||
ue->measurements.selected_rx_antennas[eNB][3],
|
||||
ue->measurements.selected_rx_antennas[eNB][4],
|
||||
ue->measurements.selected_rx_antennas[eNB][5],
|
||||
ue->measurements.selected_rx_antennas[eNB][6]);
|
||||
|
||||
len += sprintf(&buffer[len], "[UE PROC] Quantized PMI eNB %d (max): %jx\n",eNB,pmi2hex_2Ar1(quantize_subband_pmi(&ue->measurements,eNB,7)));
|
||||
len += sprintf(&buffer[len], "[UE PROC] Quantized PMI eNB %d (both): %jx,%jx\n",eNB,
|
||||
pmi2hex_2Ar1(quantize_subband_pmi2(&ue->measurements,eNB,0,7)),
|
||||
pmi2hex_2Ar1(quantize_subband_pmi2(&ue->measurements,eNB,1,7)));
|
||||
break;
|
||||
|
||||
case 50:
|
||||
len += sprintf(&buffer[len], "[UE PROC] Subband CQI eNB%d (Ant 0): [%d %d %d %d %d %d %d %d %d] dB\n",
|
||||
eNB,
|
||||
ue->measurements.subband_cqi_dB[eNB][0][0],
|
||||
ue->measurements.subband_cqi_dB[eNB][0][1],
|
||||
ue->measurements.subband_cqi_dB[eNB][0][2],
|
||||
ue->measurements.subband_cqi_dB[eNB][0][3],
|
||||
ue->measurements.subband_cqi_dB[eNB][0][4],
|
||||
ue->measurements.subband_cqi_dB[eNB][0][5],
|
||||
ue->measurements.subband_cqi_dB[eNB][0][6],
|
||||
ue->measurements.subband_cqi_dB[eNB][0][7],
|
||||
ue->measurements.subband_cqi_dB[eNB][0][8]);
|
||||
|
||||
len += sprintf(&buffer[len], "[UE PROC] Subband CQI eNB%d (Ant 1): [%d %d %d %d %d %d %d %d %d] dB\n",
|
||||
eNB,
|
||||
ue->measurements.subband_cqi_dB[eNB][1][0],
|
||||
ue->measurements.subband_cqi_dB[eNB][1][1],
|
||||
ue->measurements.subband_cqi_dB[eNB][1][2],
|
||||
ue->measurements.subband_cqi_dB[eNB][1][3],
|
||||
ue->measurements.subband_cqi_dB[eNB][1][4],
|
||||
ue->measurements.subband_cqi_dB[eNB][1][5],
|
||||
ue->measurements.subband_cqi_dB[eNB][1][6],
|
||||
ue->measurements.subband_cqi_dB[eNB][1][7],
|
||||
ue->measurements.subband_cqi_dB[eNB][1][8]);
|
||||
|
||||
|
||||
len += sprintf(&buffer[len], "[UE PROC] Subband PMI eNB%d (Ant 0): [(%d %d) (%d %d) (%d %d) (%d %d) (%d %d) (%d %d) (%d %d) (%d %d) (%d %d)]\n",
|
||||
eNB,
|
||||
ue->measurements.subband_pmi_re[eNB][0][0],
|
||||
ue->measurements.subband_pmi_im[eNB][0][0],
|
||||
ue->measurements.subband_pmi_re[eNB][1][0],
|
||||
ue->measurements.subband_pmi_im[eNB][1][0],
|
||||
ue->measurements.subband_pmi_re[eNB][2][0],
|
||||
ue->measurements.subband_pmi_im[eNB][2][0],
|
||||
ue->measurements.subband_pmi_re[eNB][3][0],
|
||||
ue->measurements.subband_pmi_im[eNB][3][0],
|
||||
ue->measurements.subband_pmi_re[eNB][4][0],
|
||||
ue->measurements.subband_pmi_im[eNB][4][0],
|
||||
ue->measurements.subband_pmi_re[eNB][5][0],
|
||||
ue->measurements.subband_pmi_im[eNB][5][0],
|
||||
ue->measurements.subband_pmi_re[eNB][6][0],
|
||||
ue->measurements.subband_pmi_im[eNB][6][0],
|
||||
ue->measurements.subband_pmi_re[eNB][7][0],
|
||||
ue->measurements.subband_pmi_im[eNB][7][0],
|
||||
ue->measurements.subband_pmi_re[eNB][8][0],
|
||||
ue->measurements.subband_pmi_im[eNB][8][0]);
|
||||
|
||||
len += sprintf(&buffer[len], "[UE PROC] Subband PMI eNB%d (Ant 1): [(%d %d) (%d %d) (%d %d) (%d %d) (%d %d) (%d %d) (%d %d) (%d %d) (%d %d)]\n",
|
||||
eNB,
|
||||
ue->measurements.subband_pmi_re[eNB][0][1],
|
||||
ue->measurements.subband_pmi_im[eNB][0][1],
|
||||
ue->measurements.subband_pmi_re[eNB][1][1],
|
||||
ue->measurements.subband_pmi_im[eNB][1][1],
|
||||
ue->measurements.subband_pmi_re[eNB][2][1],
|
||||
ue->measurements.subband_pmi_im[eNB][2][1],
|
||||
ue->measurements.subband_pmi_re[eNB][3][1],
|
||||
ue->measurements.subband_pmi_im[eNB][3][1],
|
||||
ue->measurements.subband_pmi_re[eNB][4][1],
|
||||
ue->measurements.subband_pmi_im[eNB][4][1],
|
||||
ue->measurements.subband_pmi_re[eNB][5][1],
|
||||
ue->measurements.subband_pmi_im[eNB][5][1],
|
||||
ue->measurements.subband_pmi_re[eNB][6][1],
|
||||
ue->measurements.subband_pmi_im[eNB][6][1],
|
||||
ue->measurements.subband_pmi_re[eNB][7][1],
|
||||
ue->measurements.subband_pmi_im[eNB][7][1],
|
||||
ue->measurements.subband_pmi_re[eNB][8][1],
|
||||
ue->measurements.subband_pmi_im[eNB][8][1]);
|
||||
|
||||
len += sprintf(&buffer[len], "[UE PROC] PMI Antenna selection eNB%d : [%d %d %d %d %d %d %d %d %d]\n",
|
||||
eNB,
|
||||
ue->measurements.selected_rx_antennas[eNB][0],
|
||||
ue->measurements.selected_rx_antennas[eNB][1],
|
||||
ue->measurements.selected_rx_antennas[eNB][2],
|
||||
ue->measurements.selected_rx_antennas[eNB][3],
|
||||
ue->measurements.selected_rx_antennas[eNB][4],
|
||||
ue->measurements.selected_rx_antennas[eNB][5],
|
||||
ue->measurements.selected_rx_antennas[eNB][6],
|
||||
ue->measurements.selected_rx_antennas[eNB][7],
|
||||
ue->measurements.selected_rx_antennas[eNB][8]);
|
||||
|
||||
len += sprintf(&buffer[len], "[UE PROC] Quantized PMI eNB %d (max): %jx\n",eNB,pmi2hex_2Ar1(quantize_subband_pmi(&ue->measurements,eNB,9)));
|
||||
len += sprintf(&buffer[len], "[UE PROC] Quantized PMI eNB %d (both): %jx,%jx\n",eNB,
|
||||
pmi2hex_2Ar1(quantize_subband_pmi2(&ue->measurements,eNB,0,9)),
|
||||
pmi2hex_2Ar1(quantize_subband_pmi2(&ue->measurements,eNB,1,9)));
|
||||
break;
|
||||
|
||||
case 100:
|
||||
len += sprintf(&buffer[len], "[UE PROC] Subband CQI eNB%d (Ant 0): [%d %d %d %d %d %d %d %d %d %d %d %d %d] dB\n",
|
||||
eNB,
|
||||
ue->measurements.subband_cqi_dB[eNB][0][0],
|
||||
ue->measurements.subband_cqi_dB[eNB][0][1],
|
||||
ue->measurements.subband_cqi_dB[eNB][0][2],
|
||||
ue->measurements.subband_cqi_dB[eNB][0][3],
|
||||
ue->measurements.subband_cqi_dB[eNB][0][4],
|
||||
ue->measurements.subband_cqi_dB[eNB][0][5],
|
||||
ue->measurements.subband_cqi_dB[eNB][0][6],
|
||||
ue->measurements.subband_cqi_dB[eNB][0][7],
|
||||
ue->measurements.subband_cqi_dB[eNB][0][8],
|
||||
ue->measurements.subband_cqi_dB[eNB][0][9],
|
||||
ue->measurements.subband_cqi_dB[eNB][0][10],
|
||||
ue->measurements.subband_cqi_dB[eNB][0][11],
|
||||
ue->measurements.subband_cqi_dB[eNB][0][12]);
|
||||
|
||||
len += sprintf(&buffer[len], "[UE PROC] Subband CQI eNB%d (Ant 1): [%d %d %d %d %d %d %d %d %d %d %d %d %d] dB\n",
|
||||
eNB,
|
||||
ue->measurements.subband_cqi_dB[eNB][1][0],
|
||||
ue->measurements.subband_cqi_dB[eNB][1][1],
|
||||
ue->measurements.subband_cqi_dB[eNB][1][2],
|
||||
ue->measurements.subband_cqi_dB[eNB][1][3],
|
||||
ue->measurements.subband_cqi_dB[eNB][1][4],
|
||||
ue->measurements.subband_cqi_dB[eNB][1][5],
|
||||
ue->measurements.subband_cqi_dB[eNB][1][6],
|
||||
ue->measurements.subband_cqi_dB[eNB][1][7],
|
||||
ue->measurements.subband_cqi_dB[eNB][1][8],
|
||||
ue->measurements.subband_cqi_dB[eNB][1][9],
|
||||
ue->measurements.subband_cqi_dB[eNB][1][10],
|
||||
ue->measurements.subband_cqi_dB[eNB][1][11],
|
||||
ue->measurements.subband_cqi_dB[eNB][1][12]);
|
||||
|
||||
|
||||
len += sprintf(&buffer[len], "[UE PROC] Subband PMI eNB%d (Ant 0): [(%d %d) (%d %d) (%d %d) (%d %d) (%d %d) (%d %d) (%d %d) (%d %d) (%d %d) (%d %d) (%d %d) (%d %d) (%d %d)]\n",
|
||||
eNB,
|
||||
ue->measurements.subband_pmi_re[eNB][0][0],
|
||||
ue->measurements.subband_pmi_im[eNB][0][0],
|
||||
ue->measurements.subband_pmi_re[eNB][1][0],
|
||||
ue->measurements.subband_pmi_im[eNB][1][0],
|
||||
ue->measurements.subband_pmi_re[eNB][2][0],
|
||||
ue->measurements.subband_pmi_im[eNB][2][0],
|
||||
ue->measurements.subband_pmi_re[eNB][3][0],
|
||||
ue->measurements.subband_pmi_im[eNB][3][0],
|
||||
ue->measurements.subband_pmi_re[eNB][4][0],
|
||||
ue->measurements.subband_pmi_im[eNB][4][0],
|
||||
ue->measurements.subband_pmi_re[eNB][5][0],
|
||||
ue->measurements.subband_pmi_im[eNB][5][0],
|
||||
ue->measurements.subband_pmi_re[eNB][6][0],
|
||||
ue->measurements.subband_pmi_im[eNB][6][0],
|
||||
ue->measurements.subband_pmi_re[eNB][7][0],
|
||||
ue->measurements.subband_pmi_im[eNB][7][0],
|
||||
ue->measurements.subband_pmi_re[eNB][8][0],
|
||||
ue->measurements.subband_pmi_im[eNB][8][0],
|
||||
ue->measurements.subband_pmi_re[eNB][9][0],
|
||||
ue->measurements.subband_pmi_im[eNB][9][0],
|
||||
ue->measurements.subband_pmi_re[eNB][10][0],
|
||||
ue->measurements.subband_pmi_im[eNB][10][0],
|
||||
ue->measurements.subband_pmi_re[eNB][11][0],
|
||||
ue->measurements.subband_pmi_im[eNB][11][0],
|
||||
ue->measurements.subband_pmi_re[eNB][12][0],
|
||||
ue->measurements.subband_pmi_im[eNB][12][0]);
|
||||
|
||||
len += sprintf(&buffer[len], "[UE PROC] Subband PMI eNB%d (Ant 1): [(%d %d) (%d %d) (%d %d) (%d %d) (%d %d) (%d %d) (%d %d) (%d %d) (%d %d) (%d %d) (%d %d) (%d %d) (%d %d)]\n",
|
||||
eNB,
|
||||
ue->measurements.subband_pmi_re[eNB][0][1],
|
||||
ue->measurements.subband_pmi_im[eNB][0][1],
|
||||
ue->measurements.subband_pmi_re[eNB][1][1],
|
||||
ue->measurements.subband_pmi_im[eNB][1][1],
|
||||
ue->measurements.subband_pmi_re[eNB][2][1],
|
||||
ue->measurements.subband_pmi_im[eNB][2][1],
|
||||
ue->measurements.subband_pmi_re[eNB][3][1],
|
||||
ue->measurements.subband_pmi_im[eNB][3][1],
|
||||
ue->measurements.subband_pmi_re[eNB][4][1],
|
||||
ue->measurements.subband_pmi_im[eNB][4][1],
|
||||
ue->measurements.subband_pmi_re[eNB][5][1],
|
||||
ue->measurements.subband_pmi_im[eNB][5][1],
|
||||
ue->measurements.subband_pmi_re[eNB][6][1],
|
||||
ue->measurements.subband_pmi_im[eNB][6][1],
|
||||
ue->measurements.subband_pmi_re[eNB][7][1],
|
||||
ue->measurements.subband_pmi_im[eNB][7][1],
|
||||
ue->measurements.subband_pmi_re[eNB][8][1],
|
||||
ue->measurements.subband_pmi_im[eNB][8][1],
|
||||
ue->measurements.subband_pmi_re[eNB][9][1],
|
||||
ue->measurements.subband_pmi_im[eNB][9][1],
|
||||
ue->measurements.subband_pmi_re[eNB][10][1],
|
||||
ue->measurements.subband_pmi_im[eNB][10][1],
|
||||
ue->measurements.subband_pmi_re[eNB][11][1],
|
||||
ue->measurements.subband_pmi_im[eNB][11][1],
|
||||
ue->measurements.subband_pmi_re[eNB][12][1],
|
||||
ue->measurements.subband_pmi_im[eNB][12][1]);
|
||||
|
||||
len += sprintf(&buffer[len], "[UE PROC] PMI Antenna selection eNB%d : [%d %d %d %d %d %d %d %d %d %d %d %d %d]\n",
|
||||
eNB,
|
||||
ue->measurements.selected_rx_antennas[eNB][0],
|
||||
ue->measurements.selected_rx_antennas[eNB][1],
|
||||
ue->measurements.selected_rx_antennas[eNB][2],
|
||||
ue->measurements.selected_rx_antennas[eNB][3],
|
||||
ue->measurements.selected_rx_antennas[eNB][4],
|
||||
ue->measurements.selected_rx_antennas[eNB][5],
|
||||
ue->measurements.selected_rx_antennas[eNB][6],
|
||||
ue->measurements.selected_rx_antennas[eNB][7],
|
||||
ue->measurements.selected_rx_antennas[eNB][8],
|
||||
ue->measurements.selected_rx_antennas[eNB][9],
|
||||
ue->measurements.selected_rx_antennas[eNB][10],
|
||||
ue->measurements.selected_rx_antennas[eNB][11],
|
||||
ue->measurements.selected_rx_antennas[eNB][12]);
|
||||
|
||||
len += sprintf(&buffer[len], "[UE PROC] Quantized PMI eNB %d (max): %jx\n",eNB,pmi2hex_2Ar1(quantize_subband_pmi(&ue->measurements,eNB,13)));
|
||||
len += sprintf(&buffer[len], "[UE PROC] Quantized PMI eNB %d (both): %jx,%jx\n",eNB,
|
||||
pmi2hex_2Ar1(quantize_subband_pmi2(&ue->measurements,eNB,0,13)),
|
||||
pmi2hex_2Ar1(quantize_subband_pmi2(&ue->measurements,eNB,1,13)));
|
||||
break;
|
||||
}
|
||||
|
||||
#ifdef OPENAIR2
|
||||
RRC_status = mac_UE_get_rrc_status(ue->Mod_id, 0);
|
||||
len += sprintf(&buffer[len],"[UE PROC] RRC status = %d\n",RRC_status);
|
||||
#endif
|
||||
|
||||
|
||||
len += sprintf(&buffer[len], "[UE PROC] Transmission Mode %d \n",ue->transmission_mode[eNB]);
|
||||
len += sprintf(&buffer[len], "[UE PROC] PBCH err conseq %d, PBCH error total %d, PBCH FER %d\n",
|
||||
ue->pbch_vars[eNB]->pdu_errors_conseq,
|
||||
ue->pbch_vars[eNB]->pdu_errors,
|
||||
ue->pbch_vars[eNB]->pdu_fer);
|
||||
|
||||
if (ue->transmission_mode[eNB] == 6)
|
||||
len += sprintf(&buffer[len], "[UE PROC] Mode 6 Wideband CQI eNB %d : %d dB\n",eNB,ue->measurements.precoded_cqi_dB[eNB][0]);
|
||||
|
||||
for (harq_pid=0;harq_pid<8;harq_pid++) {
|
||||
len+=sprintf(&buffer[len],"[UE PROC] eNB %d: CW 0 harq_pid %d, mcs %d:",eNB,harq_pid,ue->dlsch[0][0][0]->harq_processes[harq_pid]->mcs);
|
||||
for (round=0;round<8;round++)
|
||||
len+=sprintf(&buffer[len],"%d/%d ",
|
||||
ue->dlsch[0][0][0]->harq_processes[harq_pid]->errors[round],
|
||||
ue->dlsch[0][0][0]->harq_processes[harq_pid]->trials[round]);
|
||||
len+=sprintf(&buffer[len],"\n");
|
||||
}
|
||||
if (ue->dlsch[0][0] && ue->dlsch[0][0][0] && ue->dlsch[0][0][1]) {
|
||||
len += sprintf(&buffer[len], "[UE PROC] Saved PMI for DLSCH eNB %d : %jx (%p)\n",eNB,pmi2hex_2Ar1(ue->dlsch[0][0][0]->pmi_alloc),ue->dlsch[0][0][0]);
|
||||
|
||||
len += sprintf(&buffer[len], "[UE PROC] eNB %d: dl_power_off = %d\n",eNB,ue->dlsch[0][0][0]->harq_processes[0]->dl_power_off);
|
||||
|
||||
for (harq_pid=0;harq_pid<8;harq_pid++) {
|
||||
len+=sprintf(&buffer[len],"[UE PROC] eNB %d: CW 1 harq_pid %d, mcs %d:",eNB,harq_pid,ue->dlsch[0][0][1]->harq_processes[0]->mcs);
|
||||
for (round=0;round<8;round++)
|
||||
len+=sprintf(&buffer[len],"%d/%d ",
|
||||
ue->dlsch[0][0][1]->harq_processes[harq_pid]->errors[round],
|
||||
ue->dlsch[0][0][1]->harq_processes[harq_pid]->trials[round]);
|
||||
len+=sprintf(&buffer[len],"\n");
|
||||
}
|
||||
}
|
||||
|
||||
len += sprintf(&buffer[len], "[UE PROC] DLSCH Total %d, Error %d, FER %d\n",ue->dlsch_received[0],ue->dlsch_errors[0],ue->dlsch_fer[0]);
|
||||
len += sprintf(&buffer[len], "[UE PROC] DLSCH (SI) Total %d, Error %d\n",ue->dlsch_SI_received[0],ue->dlsch_SI_errors[0]);
|
||||
len += sprintf(&buffer[len], "[UE PROC] DLSCH (RA) Total %d, Error %d\n",ue->dlsch_ra_received[0],ue->dlsch_ra_errors[0]);
|
||||
#if defined(Rel10) || defined(Rel14)
|
||||
int i=0;
|
||||
|
||||
//len += sprintf(&buffer[len], "[UE PROC] MCH Total %d\n", ue->dlsch_mch_received[0]);
|
||||
for(i=0; i <ue->frame_parms.num_MBSFN_config; i++ ) {
|
||||
len += sprintf(&buffer[len], "[UE PROC] MCH (MCCH MBSFN %d) Total %d, Error %d, Trials %d\n",
|
||||
i, ue->dlsch_mcch_received[i][0],ue->dlsch_mcch_errors[i][0],ue->dlsch_mcch_trials[i][0]);
|
||||
len += sprintf(&buffer[len], "[UE PROC] MCH (MTCH MBSFN %d) Total %d, Error %d, Trials %d\n",
|
||||
i, ue->dlsch_mtch_received[i][0],ue->dlsch_mtch_errors[i][0],ue->dlsch_mtch_trials[i][0]);
|
||||
}
|
||||
|
||||
#endif
|
||||
len += sprintf(&buffer[len], "[UE PROC] DLSCH Bitrate %dkbps\n",(ue->bitrate[0]/1000));
|
||||
len += sprintf(&buffer[len], "[UE PROC] Total Received Bits %dkbits\n",(ue->total_received_bits[0]/1000));
|
||||
len += sprintf(&buffer[len], "[UE PROC] IA receiver %d\n",ue->use_ia_receiver);
|
||||
|
||||
}
|
||||
|
||||
} else {
|
||||
len += sprintf(&buffer[len], "[UE PROC] Frame count: %d, RSSI %3.2f dB (%d dB, %d dB), N0 %3.2f dB (%d dB, %d dB)\n",
|
||||
proc->frame_rx,
|
||||
10*log10(ue->measurements.rssi),
|
||||
ue->measurements.rx_power_dB[0][0],
|
||||
ue->measurements.rx_power_dB[0][1],
|
||||
10*log10(ue->measurements.n0_power_tot),
|
||||
ue->measurements.n0_power_dB[0],
|
||||
ue->measurements.n0_power_dB[1]);
|
||||
#ifdef EXMIMO
|
||||
ue->rx_total_gain_dB = ((int)(10*log10(ue->measurements.rssi)))-input_level_dBm;
|
||||
len += sprintf(&buffer[len], "[UE PROC] rxg_mode %d, input level (set by user) %d dBm, VGA gain %d dB ==> total gain %3.2f dB, noise figure %3.2f dB\n",
|
||||
openair0_cfg[0].rxg_mode[0],
|
||||
input_level_dBm,
|
||||
(int)openair0_cfg[0].rx_gain[0],
|
||||
10*log10(ue->measurements.rssi)-input_level_dBm,
|
||||
10*log10(ue->measurements.n0_power_tot)-ue->rx_total_gain_dB+105);
|
||||
#endif
|
||||
}
|
||||
|
||||
len += sprintf(&buffer[len],"EOF\n");
|
||||
|
||||
return len;
|
||||
} // is_clusterhead
|
||||
|
||||
/*
|
||||
int dump_eNB_stats(PHY_VARS_eNB *eNB, char* buffer, int length)
|
||||
{
|
||||
|
||||
unsigned int success=0;
|
||||
uint8_t eNB_id,UE_id,i,j,number_of_cards_l=1;
|
||||
uint32_t ulsch_errors=0,dlsch_errors=0;
|
||||
uint32_t ulsch_round_attempts[4]= {0,0,0,0},ulsch_round_errors[4]= {0,0,0,0};
|
||||
uint32_t dlsch_round_attempts[4]= {0,0,0,0},dlsch_round_errors[4]= {0,0,0,0};
|
||||
uint32_t UE_id_mac, RRC_status;
|
||||
eNB_rxtx_proc_t *proc = &eNB->proc.proc_rxtx[0];
|
||||
if (eNB==NULL)
|
||||
return 0;
|
||||
|
||||
int len = length;
|
||||
|
||||
// if(eNB->frame==0){
|
||||
eNB->total_dlsch_bitrate = 0;//eNB->UE_stats[UE_id].dlsch_bitrate + eNB->total_dlsch_bitrate;
|
||||
eNB->total_transmitted_bits = 0;// eNB->UE_stats[UE_id].total_transmitted_bits + eNB->total_transmitted_bits;
|
||||
eNB->total_system_throughput = 0;//eNB->UE_stats[UE_id].total_transmitted_bits + eNB->total_system_throughput;
|
||||
// }
|
||||
|
||||
for (eNB_id=0; eNB_id<number_of_cards_l; eNB_id++) {
|
||||
len += sprintf(&buffer[len],"eNB %d/%d Frame %d: RX Gain %d dB, I0 %d dBm (%d,%d) dB \n",
|
||||
eNB_id,number_of_cards_l,
|
||||
proc->frame_tx,
|
||||
eNB->rx_total_gain_dB,
|
||||
eNB->measurements.n0_power_tot_dBm,
|
||||
eNB->measurements.n0_power_dB[0],
|
||||
eNB->measurements.n0_power_dB[1]);
|
||||
|
||||
len += sprintf(&buffer[len],"PRB I0 (%X.%X.%X.%X): ",
|
||||
eNB->rb_mask_ul[0],
|
||||
eNB->rb_mask_ul[1],eNB->rb_mask_ul[2],eNB->rb_mask_ul[3]);
|
||||
|
||||
for (i=0; i<eNB->frame_parms.N_RB_UL; i++) {
|
||||
len += sprintf(&buffer[len],"%4d ",
|
||||
eNB->measurements.n0_subband_power_tot_dBm[i]);
|
||||
if ((i>0) && ((i%25) == 0))
|
||||
len += sprintf(&buffer[len],"\n");
|
||||
}
|
||||
len += sprintf(&buffer[len],"\n");
|
||||
len += sprintf(&buffer[len],"\nPERFORMANCE PARAMETERS\n");
|
||||
|
||||
for (UE_id=0; UE_id<NUMBER_OF_UE_MAX; UE_id++) {
|
||||
if (eNB &&
|
||||
(eNB->dlsch!=NULL) &&
|
||||
(eNB->dlsch[(uint8_t)UE_id]!=NULL) &&
|
||||
(eNB->dlsch[(uint8_t)UE_id][0]->rnti>0)&&
|
||||
(eNB->UE_stats[UE_id].mode == PUSCH)) {
|
||||
|
||||
eNB->total_dlsch_bitrate = eNB->UE_stats[UE_id].dlsch_bitrate + eNB->total_dlsch_bitrate;
|
||||
eNB->total_transmitted_bits = eNB->UE_stats[UE_id].total_TBS + eNB->total_transmitted_bits;
|
||||
|
||||
//eNB->total_system_throughput = eNB->UE_stats[UE_id].total_transmitted_bits + eNB->total_system_throughput;
|
||||
|
||||
for (i=0; i<8; i++)
|
||||
success = success + (eNB->UE_stats[UE_id].dlsch_trials[i][0] - eNB->UE_stats[UE_id].dlsch_l2_errors[i]);
|
||||
|
||||
|
||||
|
||||
len += sprintf(&buffer[len],"Total DLSCH %d kbits / %d frames ",(eNB->total_transmitted_bits/1000),proc->frame_tx+1);
|
||||
len += sprintf(&buffer[len],"Total DLSCH throughput %d kbps ",(eNB->total_dlsch_bitrate/1000));
|
||||
len += sprintf(&buffer[len],"Total DLSCH trans %d / %d frames\n",success,proc->frame_tx+1);
|
||||
//len += sprintf(&buffer[len],"[eNB PROC] FULL MU-MIMO Transmissions/Total Transmissions = %d/%d\n",eNB->FULL_MUMIMO_transmissions,eNB->check_for_total_transmissions);
|
||||
//len += sprintf(&buffer[len],"[eNB PROC] MU-MIMO Transmissions/Total Transmissions = %d/%d\n",eNB->check_for_MUMIMO_transmissions,eNB->check_for_total_transmissions);
|
||||
//len += sprintf(&buffer[len],"[eNB PROC] SU-MIMO Transmissions/Total Transmissions = %d/%d\n",eNB->check_for_SUMIMO_transmissions,eNB->check_for_total_transmissions);
|
||||
|
||||
len += sprintf(&buffer[len],"UE %d (%x) Power: (%d,%d) dB, Po_PUSCH: (%d,%d) dBm, Po_PUCCH (%d/%d) dBm, Po_PUCCH1 (%d,%d) dBm, PUCCH1 Thres %d dBm \n",
|
||||
UE_id,
|
||||
eNB->UE_stats[UE_id].crnti,
|
||||
dB_fixed(eNB->pusch_vars[UE_id]->ulsch_power[0]),
|
||||
dB_fixed(eNB->pusch_vars[UE_id]->ulsch_power[1]),
|
||||
eNB->UE_stats[UE_id].UL_rssi[0],
|
||||
eNB->UE_stats[UE_id].UL_rssi[1],
|
||||
dB_fixed(eNB->UE_stats[UE_id].Po_PUCCH/eNB->frame_parms.N_RB_UL)-eNB->rx_total_gain_dB,
|
||||
eNB->frame_parms.ul_power_control_config_common.p0_NominalPUCCH,
|
||||
dB_fixed(eNB->UE_stats[UE_id].Po_PUCCH1_below/eNB->frame_parms.N_RB_UL)-eNB->rx_total_gain_dB,
|
||||
dB_fixed(eNB->UE_stats[UE_id].Po_PUCCH1_above/eNB->frame_parms.N_RB_UL)-eNB->rx_total_gain_dB,
|
||||
PUCCH1_THRES+eNB->measurements.n0_power_tot_dBm-dB_fixed(eNB->frame_parms.N_RB_UL));
|
||||
|
||||
len+= sprintf(&buffer[len],"DL mcs %d, UL mcs %d, UL rb %d, delta_TF %d, ",
|
||||
eNB->dlsch[(uint8_t)UE_id][0]->harq_processes[0]->mcs,
|
||||
eNB->ulsch[(uint8_t)UE_id]->harq_processes[0]->mcs,
|
||||
eNB->ulsch[(uint8_t)UE_id]->harq_processes[0]->nb_rb,
|
||||
eNB->ulsch[(uint8_t)UE_id]->harq_processes[0]->delta_TF);
|
||||
|
||||
len += sprintf(&buffer[len],"Wideband CQI: (%d,%d) dB\n",
|
||||
eNB->measurements.wideband_cqi_dB[UE_id][0],
|
||||
eNB->measurements.wideband_cqi_dB[UE_id][1]);
|
||||
|
||||
len += sprintf(&buffer[len],"DL TM %d, DL_cqi %d, DL_pmi_single %jx ",
|
||||
eNB->transmission_mode[UE_id],
|
||||
eNB->UE_stats[UE_id].DL_cqi[0],
|
||||
pmi2hex_2Ar1(eNB->UE_stats[UE_id].DL_pmi_single));
|
||||
|
||||
len += sprintf(&buffer[len],"Timing advance %d samples (%d 16Ts), update %d ",
|
||||
eNB->UE_stats[UE_id].UE_timing_offset,
|
||||
eNB->UE_stats[UE_id].UE_timing_offset>>2,
|
||||
eNB->UE_stats[UE_id].timing_advance_update);
|
||||
|
||||
len += sprintf(&buffer[len],"Mode = %s(%d) ",
|
||||
mode_string[eNB->UE_stats[UE_id].mode],
|
||||
eNB->UE_stats[UE_id].mode);
|
||||
UE_id_mac = find_UE_id(eNB->Mod_id,eNB->dlsch[(uint8_t)UE_id][0]->rnti);
|
||||
|
||||
if (UE_id_mac != -1) {
|
||||
RRC_status = mac_eNB_get_rrc_status(eNB->Mod_id,eNB->dlsch[(uint8_t)UE_id][0]->rnti);
|
||||
len += sprintf(&buffer[len],"UE_id_mac = %d, RRC status = %d\n",UE_id_mac,RRC_status);
|
||||
} else
|
||||
len += sprintf(&buffer[len],"UE_id_mac = -1\n");
|
||||
|
||||
len += sprintf(&buffer[len],"SR received/total: %d/%d (diff %d)\n",
|
||||
eNB->UE_stats[UE_id].sr_received,
|
||||
eNB->UE_stats[UE_id].sr_total,
|
||||
eNB->UE_stats[UE_id].sr_total-eNB->UE_stats[UE_id].sr_received);
|
||||
|
||||
len += sprintf(&buffer[len],"DL Subband CQI: ");
|
||||
|
||||
int nb_sb;
|
||||
switch (eNB->frame_parms.N_RB_DL) {
|
||||
case 6:
|
||||
nb_sb=0;
|
||||
break;
|
||||
case 15:
|
||||
nb_sb = 4;
|
||||
case 25:
|
||||
nb_sb = 7;
|
||||
break;
|
||||
case 50:
|
||||
nb_sb = 9;
|
||||
break;
|
||||
case 75:
|
||||
nb_sb = 10;
|
||||
break;
|
||||
case 100:
|
||||
nb_sb = 13;
|
||||
break;
|
||||
default:
|
||||
nb_sb=0;
|
||||
break;
|
||||
}
|
||||
for (i=0; i<nb_sb; i++)
|
||||
len += sprintf(&buffer[len],"%2d ",
|
||||
eNB->UE_stats[UE_id].DL_subband_cqi[0][i]);
|
||||
len += sprintf(&buffer[len],"\n");
|
||||
|
||||
|
||||
|
||||
ulsch_errors = 0;
|
||||
|
||||
for (j=0; j<4; j++) {
|
||||
ulsch_round_attempts[j]=0;
|
||||
ulsch_round_errors[j]=0;
|
||||
}
|
||||
|
||||
len += sprintf(&buffer[len],"ULSCH errors/attempts per harq (per round): \n");
|
||||
|
||||
for (i=0; i<8; i++) {
|
||||
len += sprintf(&buffer[len]," harq %d: %d/%d (fer %d) (%d/%d, %d/%d, %d/%d, %d/%d) ",
|
||||
i,
|
||||
eNB->UE_stats[UE_id].ulsch_errors[i],
|
||||
eNB->UE_stats[UE_id].ulsch_decoding_attempts[i][0],
|
||||
eNB->UE_stats[UE_id].ulsch_round_fer[i][0],
|
||||
eNB->UE_stats[UE_id].ulsch_round_errors[i][0],
|
||||
eNB->UE_stats[UE_id].ulsch_decoding_attempts[i][0],
|
||||
eNB->UE_stats[UE_id].ulsch_round_errors[i][1],
|
||||
eNB->UE_stats[UE_id].ulsch_decoding_attempts[i][1],
|
||||
eNB->UE_stats[UE_id].ulsch_round_errors[i][2],
|
||||
eNB->UE_stats[UE_id].ulsch_decoding_attempts[i][2],
|
||||
eNB->UE_stats[UE_id].ulsch_round_errors[i][3],
|
||||
eNB->UE_stats[UE_id].ulsch_decoding_attempts[i][3]);
|
||||
if ((i&1) == 1)
|
||||
len += sprintf(&buffer[len],"\n");
|
||||
|
||||
ulsch_errors+=eNB->UE_stats[UE_id].ulsch_errors[i];
|
||||
|
||||
for (j=0; j<4; j++) {
|
||||
ulsch_round_attempts[j]+=eNB->UE_stats[UE_id].ulsch_decoding_attempts[i][j];
|
||||
ulsch_round_errors[j]+=eNB->UE_stats[UE_id].ulsch_round_errors[i][j];
|
||||
}
|
||||
}
|
||||
|
||||
len += sprintf(&buffer[len],"ULSCH errors/attempts total %d/%d (%d/%d, %d/%d, %d/%d, %d/%d)\n",
|
||||
ulsch_errors,ulsch_round_attempts[0],
|
||||
|
||||
ulsch_round_errors[0],ulsch_round_attempts[0],
|
||||
ulsch_round_errors[1],ulsch_round_attempts[1],
|
||||
ulsch_round_errors[2],ulsch_round_attempts[2],
|
||||
ulsch_round_errors[3],ulsch_round_attempts[3]);
|
||||
|
||||
dlsch_errors = 0;
|
||||
|
||||
for (j=0; j<4; j++) {
|
||||
dlsch_round_attempts[j]=0;
|
||||
dlsch_round_errors[j]=0;
|
||||
}
|
||||
|
||||
len += sprintf(&buffer[len],"DLSCH errors/attempts per harq (per round): \n");
|
||||
|
||||
for (i=0; i<8; i++) {
|
||||
len += sprintf(&buffer[len]," harq %d: %d/%d (%d/%d/%d, %d/%d/%d, %d/%d/%d, %d/%d/%d) ",
|
||||
i,
|
||||
eNB->UE_stats[UE_id].dlsch_l2_errors[i],
|
||||
eNB->UE_stats[UE_id].dlsch_trials[i][0],
|
||||
eNB->UE_stats[UE_id].dlsch_ACK[i][0],
|
||||
eNB->UE_stats[UE_id].dlsch_NAK[i][0],
|
||||
eNB->UE_stats[UE_id].dlsch_trials[i][0],
|
||||
eNB->UE_stats[UE_id].dlsch_ACK[i][1],
|
||||
eNB->UE_stats[UE_id].dlsch_NAK[i][1],
|
||||
eNB->UE_stats[UE_id].dlsch_trials[i][1],
|
||||
eNB->UE_stats[UE_id].dlsch_ACK[i][2],
|
||||
eNB->UE_stats[UE_id].dlsch_NAK[i][2],
|
||||
eNB->UE_stats[UE_id].dlsch_trials[i][2],
|
||||
eNB->UE_stats[UE_id].dlsch_ACK[i][3],
|
||||
eNB->UE_stats[UE_id].dlsch_NAK[i][3],
|
||||
eNB->UE_stats[UE_id].dlsch_trials[i][3]);
|
||||
if ((i&1) == 1)
|
||||
len += sprintf(&buffer[len],"\n");
|
||||
|
||||
|
||||
dlsch_errors+=eNB->UE_stats[UE_id].dlsch_l2_errors[i];
|
||||
|
||||
for (j=0; j<4; j++) {
|
||||
dlsch_round_attempts[j]+=eNB->UE_stats[UE_id].dlsch_trials[i][j];
|
||||
dlsch_round_errors[j]+=eNB->UE_stats[UE_id].dlsch_NAK[i][j];
|
||||
}
|
||||
}
|
||||
|
||||
len += sprintf(&buffer[len],"DLSCH errors/attempts total %d/%d (%d/%d, %d/%d, %d/%d, %d/%d): \n",
|
||||
dlsch_errors,dlsch_round_attempts[0],
|
||||
dlsch_round_errors[0],dlsch_round_attempts[0],
|
||||
dlsch_round_errors[1],dlsch_round_attempts[1],
|
||||
dlsch_round_errors[2],dlsch_round_attempts[2],
|
||||
dlsch_round_errors[3],dlsch_round_attempts[3]);
|
||||
|
||||
|
||||
len += sprintf(&buffer[len],"DLSCH total bits from MAC: %dkbit ",(eNB->UE_stats[UE_id].total_TBS_MAC)/1000);
|
||||
len += sprintf(&buffer[len],"DLSCH total bits ack'ed: %dkbit ",(eNB->UE_stats[UE_id].total_TBS)/1000);
|
||||
len += sprintf(&buffer[len],"DLSCH Average throughput (100 frames): %dkbps\n",(eNB->UE_stats[UE_id].dlsch_bitrate/1000));
|
||||
// len += sprintf(&buffer[len],"[eNB PROC] Transmission Mode %d\n",eNB->transmission_mode[UE_id]);
|
||||
}
|
||||
}
|
||||
|
||||
len += sprintf(&buffer[len],"\n");
|
||||
}
|
||||
|
||||
len += sprintf(&buffer[len],"EOF\n");
|
||||
|
||||
return len;
|
||||
}
|
||||
*/
|
||||
@@ -718,7 +718,11 @@ uint32_t rx_pucch(PHY_VARS_eNB *eNB,
|
||||
uint8_t *payload,
|
||||
int frame,
|
||||
uint8_t subframe,
|
||||
uint8_t pucch1_thres)
|
||||
uint8_t pucch1_thres
|
||||
#ifdef Rel14
|
||||
,uint8_t br_flag
|
||||
#endif
|
||||
)
|
||||
{
|
||||
|
||||
|
||||
@@ -727,7 +731,8 @@ uint32_t rx_pucch(PHY_VARS_eNB *eNB,
|
||||
LTE_DL_FRAME_PARMS *frame_parms = &eNB->frame_parms;
|
||||
// PUCCH_CONFIG_DEDICATED *pucch_config_dedicated = &eNB->pucch_config_dedicated[UE_id];
|
||||
|
||||
int8_t sigma2_dB = 20;//eNB->measurements.n0_subband_power_tot_dB[0]-10;
|
||||
int8_t sigma2_dB = max(eNB->measurements.n0_subband_power_tot_dB[0],
|
||||
eNB->measurements.n0_subband_power_tot_dB[eNB->frame_parms.N_RB_UL-1]);
|
||||
|
||||
uint32_t u,v,n,aa;
|
||||
uint32_t z[12*14];
|
||||
@@ -984,14 +989,25 @@ uint32_t rx_pucch(PHY_VARS_eNB *eNB,
|
||||
|
||||
//for (j=0,l=0;l<(nsymb-1);l++) {
|
||||
for (j=0,l=0; l<nsymb; l++) {
|
||||
if ((l<(nsymb>>1)) && ((m&1) == 0))
|
||||
re_offset = (m*6) + frame_parms->first_carrier_offset;
|
||||
else if ((l<(nsymb>>1)) && ((m&1) == 1))
|
||||
re_offset = frame_parms->first_carrier_offset + (frame_parms->N_RB_DL - (m>>1) - 1)*12;
|
||||
else if ((m&1) == 0)
|
||||
re_offset = frame_parms->first_carrier_offset + (frame_parms->N_RB_DL - (m>>1) - 1)*12;
|
||||
#ifdef Rel14
|
||||
if (br_flag > 0 ) {
|
||||
if ((m&1) == 0)
|
||||
re_offset = (m*6) + frame_parms->first_carrier_offset;
|
||||
else
|
||||
re_offset = frame_parms->first_carrier_offset + (frame_parms->N_RB_DL - (m>>1) - 1)*12;
|
||||
}
|
||||
else
|
||||
re_offset = ((m-1)*6) + frame_parms->first_carrier_offset;
|
||||
#endif
|
||||
{
|
||||
if ((l<(nsymb>>1)) && ((m&1) == 0))
|
||||
re_offset = (m*6) + frame_parms->first_carrier_offset;
|
||||
else if ((l<(nsymb>>1)) && ((m&1) == 1))
|
||||
re_offset = frame_parms->first_carrier_offset + (frame_parms->N_RB_DL - (m>>1) - 1)*12;
|
||||
else if ((m&1) == 0)
|
||||
re_offset = frame_parms->first_carrier_offset + (frame_parms->N_RB_DL - (m>>1) - 1)*12;
|
||||
else
|
||||
re_offset = ((m-1)*6) + frame_parms->first_carrier_offset;
|
||||
}
|
||||
|
||||
if (re_offset > frame_parms->ofdm_symbol_size)
|
||||
re_offset -= (frame_parms->ofdm_symbol_size);
|
||||
@@ -1302,7 +1318,7 @@ uint32_t rx_pucch(PHY_VARS_eNB *eNB,
|
||||
#endif
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
#ifdef DEBUG_PUCCH_RX
|
||||
printf("[eNB] PUCCH subframe %d chest1[%d][%d] => (%d,%d)\n",subframe,aa,re,
|
||||
|
||||
@@ -50,6 +50,7 @@
|
||||
|
||||
|
||||
|
||||
|
||||
typedef struct {
|
||||
/// Status Flag indicating for this DLSCH (idle,active,disabled)
|
||||
SCH_status_t status;
|
||||
@@ -443,6 +444,10 @@ typedef struct {
|
||||
} LTE_eNB_UE_stats;
|
||||
|
||||
typedef struct {
|
||||
#if (LTE_RRC_VERSION >= MAKE_VERSION(14, 0, 0))
|
||||
/// UE type (normal, CEModeA, CEModeB)
|
||||
uint8_t ue_type;
|
||||
#endif
|
||||
/// HARQ process mask, indicates which processes are currently active
|
||||
uint16_t harq_mask;
|
||||
/// Pointers to 8 HARQ processes for the ULSCH
|
||||
|
||||
@@ -385,6 +385,8 @@ uint8_t generate_dci_top(uint8_t num_pdcch_symbols,
|
||||
uint32_t sub_frame_offset);
|
||||
|
||||
|
||||
void generate_mdci_top(PHY_VARS_eNB * eNB, int frame, int subframe, int16_t amp, int32_t ** txdataF);
|
||||
|
||||
void generate_64qam_table(void);
|
||||
void generate_16qam_table(void);
|
||||
|
||||
@@ -421,6 +423,8 @@ void fill_dci0(PHY_VARS_eNB *eNB,int frame,int subframe,L1_rxtx_proc_t *proc,DCI
|
||||
|
||||
void fill_ulsch(PHY_VARS_eNB *eNB,int UE_id,nfapi_ul_config_ulsch_pdu *ulsch_pdu,int frame,int subframe);
|
||||
|
||||
void fill_mpdcch_dci0 (PHY_VARS_eNB * eNB, L1_rxtx_proc_t * proc, mDCI_ALLOC_t * dci_alloc, nfapi_hi_dci0_mpdcch_dci_pdu * pdu);
|
||||
|
||||
int generate_eNB_ulsch_params_from_rar(PHY_VARS_eNB *eNB,
|
||||
unsigned char *rar_pdu,
|
||||
uint32_t frame,
|
||||
|
||||
@@ -806,10 +806,16 @@ unsigned int ulsch_decoding(PHY_VARS_eNB *eNB,L1_rxtx_proc_t *proc,
|
||||
|
||||
|
||||
|
||||
harq_pid = subframe2harq_pid(frame_parms,frame,subframe);
|
||||
#if (RRC_VERSION >= MAKE_VERSION(14, 0, 0))
|
||||
if (ulsch->ue_type>0) harq_pid = 0;
|
||||
else
|
||||
#endif
|
||||
{
|
||||
harq_pid = subframe2harq_pid(frame_parms,proc->frame_rx,subframe);
|
||||
}
|
||||
|
||||
VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME(VCD_SIGNAL_DUMPER_FUNCTIONS_PHY_ENB_ULSCH_DECODING0+harq_pid,1);
|
||||
|
||||
|
||||
// x1 is set in lte_gold_generic
|
||||
x2 = ((uint32_t)ulsch->rnti<<14) + ((uint32_t)subframe<<9) + frame_parms->Nid_cell; //this is c_init in 36.211 Sec 6.3.1
|
||||
ulsch_harq = ulsch->harq_processes[harq_pid];
|
||||
|
||||
@@ -1127,17 +1127,20 @@ void rx_ulsch(PHY_VARS_eNB *eNB,
|
||||
int16_t *llrp;
|
||||
int subframe = proc->subframe_rx;
|
||||
|
||||
harq_pid = subframe2harq_pid(frame_parms,proc->frame_rx,subframe);
|
||||
#ifdef Rel14
|
||||
if (ulsch[UE_id]->ue_type > 0) harq_pid =0;
|
||||
else
|
||||
#endif
|
||||
{
|
||||
harq_pid = subframe2harq_pid(frame_parms,proc->frame_rx,subframe);
|
||||
}
|
||||
Qm = ulsch[UE_id]->harq_processes[harq_pid]->Qm;
|
||||
if(LOG_DEBUGFLAG(DEBUG_ULSCH)) {
|
||||
LOG_I(PHY,"rx_ulsch: harq_pid %d, nb_rb %d first_rb %d\n",harq_pid,ulsch[UE_id]->harq_processes[harq_pid]->nb_rb,ulsch[UE_id]->harq_processes[harq_pid]->first_rb);
|
||||
}
|
||||
|
||||
if (ulsch[UE_id]->harq_processes[harq_pid]->nb_rb == 0) {
|
||||
LOG_E(PHY,"PUSCH (%d/%x) nb_rb=0!\n", harq_pid,ulsch[UE_id]->rnti);
|
||||
return;
|
||||
}
|
||||
|
||||
AssertFatal(ulsch[UE_id]->harq_processes[harq_pid]->nb_rb > 0,
|
||||
"PUSCH (%d/%x) nb_rb=0!\n", harq_pid,ulsch[UE_id]->rnti);
|
||||
for (l=0; l<(frame_parms->symbols_per_tti-ulsch[UE_id]->harq_processes[harq_pid]->srs_active); l++) {
|
||||
|
||||
if(LOG_DEBUGFLAG(DEBUG_ULSCH)) {
|
||||
|
||||
@@ -1361,6 +1361,10 @@ void init_ul_hopping(LTE_DL_FRAME_PARMS *frame_parms);
|
||||
@param nB nB from 36.304 (0=4T,1=2T,2=T,3=T/2,4=T/4,5=T/8,6=T/16,7=T/32*/
|
||||
int init_ue_paging_info(PHY_VARS_UE *ue, long defaultPagingCycle, long nB);
|
||||
|
||||
#ifdef Rel14
|
||||
void init_mpdcch(PHY_VARS_eNB *eNB);
|
||||
#endif
|
||||
|
||||
int32_t compareints (const void * a, const void * b);
|
||||
|
||||
|
||||
@@ -1606,7 +1610,6 @@ void generate_pucch3x(int32_t **txdataF,
|
||||
uint8_t subframe,
|
||||
uint16_t rnti);
|
||||
|
||||
|
||||
void init_ulsch_power_LUT(void);
|
||||
|
||||
/*!
|
||||
|
||||
@@ -808,6 +808,8 @@ typedef struct {
|
||||
uint8_t harq_pid;
|
||||
/// Narrowband index
|
||||
uint8_t narrowband;
|
||||
/// number of mdpcch repetitions
|
||||
uint16_t reps;
|
||||
/// number of PRB pairs for MPDCCH
|
||||
uint8_t number_of_prb_pairs;
|
||||
/// mpdcch resource assignment (combinatorial index r)
|
||||
@@ -822,8 +824,6 @@ typedef struct {
|
||||
uint16_t dmrs_scrambling_init;
|
||||
/// Absolute subframe of the initial transmission (0-10239)
|
||||
uint16_t i0;
|
||||
/// number of mdpcch repetitions
|
||||
uint16_t reps;
|
||||
/// current absolute subframe number
|
||||
uint16_t absSF;
|
||||
/// DCI pdu
|
||||
|
||||
@@ -68,4 +68,5 @@ typedef struct {
|
||||
int32_t **tdd_calib_coeffs;
|
||||
} RU_COMMON;
|
||||
|
||||
|
||||
#endif
|
||||
|
||||
@@ -55,6 +55,8 @@ void handle_nfapi_dci_dl_pdu(PHY_VARS_eNB *eNB,
|
||||
LTE_eNB_PDCCH *pdcch_vars = &eNB->pdcch_vars[idx];
|
||||
nfapi_dl_config_dci_dl_pdu *pdu = &dl_config_pdu->dci_dl_pdu;
|
||||
|
||||
if (nfapi_mode==2) return;
|
||||
|
||||
LOG_D(PHY,"Frame %d, Subframe %d: DCI processing - populating pdcch_vars->dci_alloc[%d] proc:subframe_tx:%d idx:%d pdcch_vars->num_dci:%d\n",frame,subframe, pdcch_vars->num_dci, proc->subframe_tx, idx, pdcch_vars->num_dci);
|
||||
|
||||
// copy dci configuration into eNB structure
|
||||
@@ -73,6 +75,8 @@ void handle_nfapi_mpdcch_pdu(PHY_VARS_eNB *eNB,
|
||||
LTE_eNB_MPDCCH *mpdcch_vars = &eNB->mpdcch_vars[idx];
|
||||
nfapi_dl_config_mpdcch_pdu *pdu = &dl_config_pdu->mpdcch_pdu;
|
||||
|
||||
if (nfapi_mode==2) return;
|
||||
|
||||
LOG_D(PHY,"Frame %d, Subframe %d: MDCI processing\n",proc->frame_tx,proc->subframe_tx);
|
||||
|
||||
// copy dci configuration into eNB structure
|
||||
@@ -87,17 +91,35 @@ void handle_nfapi_hi_dci0_dci_pdu(PHY_VARS_eNB *eNB,int frame,int subframe,L1_rx
|
||||
int idx = subframe&1;
|
||||
LTE_eNB_PDCCH *pdcch_vars = &eNB->pdcch_vars[idx];
|
||||
|
||||
if (nfapi_mode==2) return;
|
||||
|
||||
//LOG_D(PHY,"%s() SFN/SF:%04d%d Before num_dci:%d\n", __FUNCTION__,frame,subframe,pdcch_vars->num_dci);
|
||||
|
||||
// copy dci configuration in to eNB structure
|
||||
fill_dci0(eNB,frame,subframe,proc,&pdcch_vars->dci_alloc[pdcch_vars->num_dci], &hi_dci0_config_pdu->dci_pdu);
|
||||
}
|
||||
|
||||
|
||||
|
||||
void handle_nfapi_hi_dci0_mpdcch_dci_pdu(PHY_VARS_eNB *eNB,L1_rxtx_proc_t *proc,
|
||||
nfapi_hi_dci0_request_pdu_t *hi_dci0_config_pdu)
|
||||
{
|
||||
int idx = proc->subframe_tx&1;
|
||||
LTE_eNB_MPDCCH *pdcch_vars = &eNB->mpdcch_vars[idx];
|
||||
if (nfapi_mode==2) return;
|
||||
|
||||
// copy dci configuration in to eNB structure
|
||||
fill_mpdcch_dci0(eNB,proc,&pdcch_vars->mdci_alloc[pdcch_vars->num_dci], &hi_dci0_config_pdu->mpdcch_dci_pdu);
|
||||
}
|
||||
|
||||
|
||||
void handle_nfapi_hi_dci0_hi_pdu(PHY_VARS_eNB *eNB,int frame,int subframe,L1_rxtx_proc_t *proc,
|
||||
nfapi_hi_dci0_request_pdu_t *hi_dci0_config_pdu)
|
||||
{
|
||||
LTE_eNB_PHICH *phich = &eNB->phich_vars[subframe&1];
|
||||
|
||||
if (nfapi_mode==2) return;
|
||||
|
||||
// copy dci configuration in to eNB structure
|
||||
LOG_D(PHY,"Received HI PDU with value %d (rbstart %d,cshift %d)\n",
|
||||
hi_dci0_config_pdu->hi_pdu.hi_pdu_rel8.hi_value,
|
||||
@@ -118,6 +140,8 @@ void handle_nfapi_bch_pdu(PHY_VARS_eNB *eNB,L1_rxtx_proc_t *proc,
|
||||
{
|
||||
nfapi_dl_config_bch_pdu_rel8_t *rel8 = &dl_config_pdu->bch_pdu.bch_pdu_rel8;
|
||||
|
||||
if (nfapi_mode==2) return;
|
||||
|
||||
AssertFatal(rel8->length == 3, "BCH PDU has length %d != 3\n",rel8->length);
|
||||
|
||||
//LOG_D(PHY,"bch_pdu: %x,%x,%x\n",sdu[0],sdu[1],sdu[2]);
|
||||
@@ -156,6 +180,8 @@ void handle_nfapi_dlsch_pdu(PHY_VARS_eNB *eNB,int frame,int subframe,L1_rxtx_pro
|
||||
int UE_id;
|
||||
int harq_pid;
|
||||
|
||||
if (nfapi_mode==2) return;
|
||||
|
||||
UE_id = find_dlsch(rel8->rnti,eNB,SEARCH_EXIST_OR_FREE);
|
||||
if( (UE_id<0) || (UE_id>=NUMBER_OF_UE_MAX) ){
|
||||
LOG_E(PHY,"illegal UE_id found!!! rnti %04x UE_id %d\n",rel8->rnti,UE_id);
|
||||
@@ -168,24 +194,24 @@ void handle_nfapi_dlsch_pdu(PHY_VARS_eNB *eNB,int frame,int subframe,L1_rxtx_pro
|
||||
dlsch1 = eNB->dlsch[UE_id][1];
|
||||
|
||||
#if (LTE_RRC_VERSION >= MAKE_VERSION(13, 0, 0))
|
||||
if ((rel13->pdsch_payload_type < 2) && (rel13->ue_type>0)) dlsch0->harq_ids[frame%2][subframe] = 0;
|
||||
if ((rel13->pdsch_payload_type < 2) && (rel13->ue_type>0)) dlsch0->harq_ids[proc->frame_tx%2][proc->subframe_tx] = 0;
|
||||
#endif
|
||||
|
||||
harq_pid = dlsch0->harq_ids[frame%2][subframe];
|
||||
harq_pid = dlsch0->harq_ids[proc->frame_tx%2][proc->subframe_tx];
|
||||
AssertFatal((harq_pid>=0) && (harq_pid<8),"harq_pid %d not in 0...7 frame:%d subframe:%d subframe(TX):%d rnti:%x UE_id:%d dlsch0[harq_ids:%d:%d:%d:%d:%d:%d:%d:%d:%d:%d]\n",
|
||||
harq_pid,
|
||||
frame,subframe,
|
||||
proc->subframe_tx,rel8->rnti,UE_id,
|
||||
dlsch0->harq_ids[frame%2][0],
|
||||
dlsch0->harq_ids[frame%2][1],
|
||||
dlsch0->harq_ids[frame%2][2],
|
||||
dlsch0->harq_ids[frame%2][3],
|
||||
dlsch0->harq_ids[frame%2][4],
|
||||
dlsch0->harq_ids[frame%2][5],
|
||||
dlsch0->harq_ids[frame%2][6],
|
||||
dlsch0->harq_ids[frame%2][7],
|
||||
dlsch0->harq_ids[frame%2][8],
|
||||
dlsch0->harq_ids[frame%2][9]
|
||||
dlsch0->harq_ids[proc->frame_tx%2][0],
|
||||
dlsch0->harq_ids[proc->frame_tx%2][1],
|
||||
dlsch0->harq_ids[proc->frame_tx%2][2],
|
||||
dlsch0->harq_ids[proc->frame_tx%2][3],
|
||||
dlsch0->harq_ids[proc->frame_tx%2][4],
|
||||
dlsch0->harq_ids[proc->frame_tx%2][5],
|
||||
dlsch0->harq_ids[proc->frame_tx%2][6],
|
||||
dlsch0->harq_ids[proc->frame_tx%2][7],
|
||||
dlsch0->harq_ids[proc->frame_tx%2][8],
|
||||
dlsch0->harq_ids[proc->frame_tx%2][9]
|
||||
);
|
||||
dlsch0_harq = dlsch0->harq_processes[harq_pid];
|
||||
dlsch1_harq = dlsch1->harq_processes[harq_pid];
|
||||
@@ -194,7 +220,7 @@ void handle_nfapi_dlsch_pdu(PHY_VARS_eNB *eNB,int frame,int subframe,L1_rxtx_pro
|
||||
// compute DL power control parameters
|
||||
eNB->pdsch_config_dedicated[UE_id].p_a = rel8->pa;
|
||||
|
||||
#ifdef PHY_TX_THREAD
|
||||
#ifdef PHY_TX_THREAD
|
||||
if (dlsch0->active[proc->subframe_tx]){
|
||||
# else
|
||||
if (dlsch0->active){
|
||||
@@ -211,7 +237,7 @@ void handle_nfapi_dlsch_pdu(PHY_VARS_eNB *eNB,int frame,int subframe,L1_rxtx_pro
|
||||
computeRhoB_eNB(rel8->pa,eNB->frame_parms.pdsch_config_common.p_b,eNB->frame_parms.nb_antenna_ports_eNB,dlsch1,dlsch1_harq->dl_power_off);
|
||||
}
|
||||
|
||||
dlsch0_harq->pdsch_start = eNB->pdcch_vars[subframe & 1].num_pdcch_symbols;
|
||||
dlsch0_harq->pdsch_start = eNB->pdcch_vars[proc->subframe_tx & 1].num_pdcch_symbols;
|
||||
|
||||
if (dlsch0_harq->round==0) { //get pointer to SDU if this a new SDU
|
||||
if(sdu == NULL) {
|
||||
@@ -244,18 +270,36 @@ void handle_nfapi_dlsch_pdu(PHY_VARS_eNB *eNB,int frame,int subframe,L1_rxtx_pro
|
||||
#endif
|
||||
|
||||
if ((rel13->pdsch_payload_type <2) && (rel13->ue_type>0)) { // this is a BR/CE UE and SIB1-BR/SI-BR
|
||||
UE_id = find_dlsch(rel8->rnti,eNB,SEARCH_EXIST_OR_FREE);
|
||||
AssertFatal(UE_id!=-1,"no free or exiting dlsch_context\n");
|
||||
AssertFatal(UE_id<NUMBER_OF_UE_MAX,"returned UE_id %d >= %d(NUMBER_OF_UE_MAX)\n",UE_id,NUMBER_OF_UE_MAX);
|
||||
|
||||
dlsch0 = eNB->dlsch[UE_id][0];
|
||||
dlsch0->harq_mask = 1;
|
||||
dlsch0_harq = dlsch0->harq_processes[0];
|
||||
dlsch0_harq->pdu = sdu;
|
||||
|
||||
if (proc->frame_tx < 200) LOG_D(PHY,"NFAPI: frame %d, subframe %d (TX %d.%d): Programming SI-BR (%d) => %d\n",frame,subframe,proc->frame_tx,proc->subframe_tx,rel13->pdsch_payload_type,UE_id);
|
||||
|
||||
dlsch0->rnti = 0xFFFF;
|
||||
dlsch0->Kmimo = 1;
|
||||
dlsch0->Mdlharq = 4;
|
||||
dlsch0->Nsoft = 25344;
|
||||
|
||||
dlsch0->i0 = rel13->initial_transmission_sf_io;
|
||||
dlsch0_harq->pdsch_start = rel10->pdsch_start;
|
||||
dlsch0->harq_ids[proc->frame_tx%2][proc->subframe_rx] = 0;
|
||||
dlsch0_harq->frame = proc->frame_tx;
|
||||
dlsch0_harq->subframe = proc->subframe_tx;
|
||||
|
||||
|
||||
#ifdef PHY_TX_THREAD
|
||||
if (rel13->pdsch_payload_type == 0) dlsch0_harq->sib1_br_flag=1;
|
||||
#else
|
||||
if (rel13->pdsch_payload_type == 0) dlsch0->sib1_br_flag=1;
|
||||
#endif
|
||||
|
||||
// configure PDSCH
|
||||
// configure PDSCH
|
||||
switch (eNB->frame_parms.N_RB_DL) {
|
||||
case 6:
|
||||
dlsch0_harq->rb_alloc[0] = localRIV2alloc_LUT6[rel8->resource_block_coding];
|
||||
@@ -299,12 +343,19 @@ void handle_nfapi_dlsch_pdu(PHY_VARS_eNB *eNB,int frame,int subframe,L1_rxtx_pro
|
||||
dlsch0_harq->codeword = 0;
|
||||
dlsch0_harq->pdsch_start = rel10->pdsch_start;
|
||||
}
|
||||
#ifdef PHY_TX_THREAD
|
||||
dlsch0_harq->i0 = rel13->initial_transmission_sf_io;
|
||||
#else
|
||||
dlsch0->i0 = rel13->initial_transmission_sf_io;
|
||||
else
|
||||
#endif
|
||||
{
|
||||
UE_id = find_dlsch(rel8->rnti,eNB,SEARCH_EXIST_OR_FREE);
|
||||
AssertFatal(UE_id!=-1,"no free or exiting dlsch_context\n");
|
||||
AssertFatal(UE_id<NUMBER_OF_UE_MAX,"returned UE_id %d >= %d(NUMBER_OF_UE_MAX)\n",UE_id,NUMBER_OF_UE_MAX);
|
||||
|
||||
dlsch0 = eNB->dlsch[UE_id][0];
|
||||
dlsch1 = eNB->dlsch[UE_id][1];
|
||||
|
||||
#if (LTE_RRC_VERSION >= MAKE_VERSION(14, 0, 0))
|
||||
dlsch0->sib1_br_flag=0;
|
||||
dlsch0->i0 = 0xFFFF;
|
||||
#endif
|
||||
|
||||
#if (LTE_RRC_VERSION >= MAKE_VERSION(14, 0, 0))
|
||||
@@ -323,9 +374,52 @@ void handle_nfapi_dlsch_pdu(PHY_VARS_eNB *eNB,int frame,int subframe,L1_rxtx_pro
|
||||
rel8->length
|
||||
);
|
||||
#endif
|
||||
|
||||
dlsch0->active = 1;
|
||||
harq_pid = dlsch0->harq_ids[frame%2][proc->subframe_tx];
|
||||
dlsch0->harq_mask |= (1<<harq_pid);
|
||||
|
||||
AssertFatal((harq_pid>=0) && (harq_pid<8),"subframe %d: harq_pid %d not in 0...7\n",proc->subframe_tx,harq_pid);
|
||||
dlsch0_harq = dlsch0->harq_processes[harq_pid];
|
||||
dlsch1_harq = dlsch1->harq_processes[harq_pid];
|
||||
AssertFatal(dlsch0_harq!=NULL,"dlsch_harq is null\n");
|
||||
|
||||
// compute DL power control parameters
|
||||
|
||||
|
||||
if (dlsch0->active){
|
||||
computeRhoA_eNB(rel8->pa,dlsch0,dlsch0_harq->dl_power_off, eNB->frame_parms.nb_antenna_ports_eNB);
|
||||
computeRhoB_eNB(rel8->pa,eNB->frame_parms.pdsch_config_common.p_b,eNB->frame_parms.nb_antenna_ports_eNB,dlsch0,dlsch0_harq->dl_power_off);
|
||||
}
|
||||
if (dlsch1->active){
|
||||
computeRhoA_eNB(rel8->pa, dlsch1,dlsch1_harq->dl_power_off, eNB->frame_parms.nb_antenna_ports_eNB);
|
||||
computeRhoB_eNB(rel8->pa,eNB->frame_parms.pdsch_config_common.p_b,eNB->frame_parms.nb_antenna_ports_eNB,dlsch1,dlsch1_harq->dl_power_off);
|
||||
}
|
||||
|
||||
#if (LTE_RRC_VERSION >= MAKE_VERSION(14, 0, 0))
|
||||
dlsch0_harq->pdsch_start = eNB->pdcch_vars[proc->subframe_tx & 1].num_pdcch_symbols;
|
||||
#else
|
||||
dlsch0_harq->pdsch_start = rel10->pdsch_start;
|
||||
#endif
|
||||
if (dlsch0_harq->round==0) { //get pointer to SDU if this a new SDU
|
||||
AssertFatal(sdu!=NULL,"NFAPI: frame %d, subframe %d: programming dlsch for round 0, rnti %x, UE_id %d, harq_pid %d : sdu is null for pdu_index %d\n",
|
||||
proc->frame_tx,proc->subframe_tx,rel8->rnti,UE_id,harq_pid,
|
||||
dl_config_pdu->dlsch_pdu.dlsch_pdu_rel8.pdu_index);
|
||||
if (rel8->rnti != 0xFFFF) LOG_D(PHY,"NFAPI: frame %d, subframe %d: programming dlsch for round 0, rnti %x, UE_id %d, harq_pid %d\n",
|
||||
proc->frame_tx,proc->subframe_tx,rel8->rnti,UE_id,harq_pid);
|
||||
if (codeword_index == 0) dlsch0_harq->pdu = sdu;
|
||||
else dlsch1_harq->pdu = sdu;
|
||||
}
|
||||
else {
|
||||
if (rel8->rnti != 0xFFFF) LOG_D(PHY,"NFAPI: frame %d, subframe %d: programming dlsch for round %d, rnti %x, UE_id %d, harq_pid %d\n",
|
||||
proc->frame_tx,proc->subframe_tx,dlsch0_harq->round,
|
||||
rel8->rnti,UE_id,harq_pid);
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
uint16_t to_beta_offset_harqack[16]={16,20,25,32,40,50,64,80,101,127,160,248,400,640,1008,8};
|
||||
int16_t to_beta_offset_harqack[16]={16,20,25,32,40,50,64,80,101,127,160,248,400,640,1008,8};
|
||||
|
||||
void handle_ulsch_harq_pdu(
|
||||
PHY_VARS_eNB *eNB,
|
||||
@@ -340,6 +434,8 @@ void handle_ulsch_harq_pdu(
|
||||
LTE_eNB_ULSCH_t *ulsch=eNB->ulsch[UE_id];
|
||||
LTE_UL_eNB_HARQ_t *ulsch_harq;
|
||||
|
||||
if (nfapi_mode==2) return;
|
||||
|
||||
int harq_pid = rel8->harq_process_number;
|
||||
ulsch_harq = ulsch->harq_processes[harq_pid];
|
||||
ulsch_harq->frame = frame;
|
||||
@@ -363,6 +459,8 @@ void handle_ulsch_cqi_ri_pdu(PHY_VARS_eNB *eNB,int UE_id,nfapi_ul_config_request
|
||||
int harq_pid = ul_config_pdu->ulsch_pdu.ulsch_pdu_rel8.harq_process_number;
|
||||
LTE_UL_eNB_HARQ_t *ulsch_harq = ulsch->harq_processes[harq_pid];
|
||||
|
||||
if (nfapi_mode==2) return;
|
||||
|
||||
ulsch_harq->frame = frame;
|
||||
ulsch_harq->subframe = subframe;
|
||||
ulsch_harq->O_RI = rel9->aperiodic_cqi_pmi_ri_report.cc[0].ri_size;
|
||||
@@ -384,6 +482,8 @@ void handle_ulsch_cqi_harq_ri_pdu(PHY_VARS_eNB *eNB,int UE_id,nfapi_ul_config_re
|
||||
LTE_UL_eNB_HARQ_t *ulsch_harq = ulsch->harq_processes[harq_pid];
|
||||
nfapi_ul_config_ulsch_harq_information *harq_information = &ul_config_pdu->ulsch_cqi_harq_ri_pdu.harq_information;
|
||||
|
||||
if (nfapi_mode==2) return;
|
||||
|
||||
ulsch_harq->frame = frame;
|
||||
ulsch_harq->subframe = subframe;
|
||||
ulsch_harq->O_RI = rel9->aperiodic_cqi_pmi_ri_report.cc[0].ri_size;
|
||||
@@ -399,6 +499,9 @@ void handle_ulsch_cqi_harq_ri_pdu(PHY_VARS_eNB *eNB,int UE_id,nfapi_ul_config_re
|
||||
|
||||
void handle_uci_harq_information(PHY_VARS_eNB *eNB, LTE_eNB_UCI *uci,nfapi_ul_config_harq_information *harq_information)
|
||||
{
|
||||
|
||||
if (nfapi_mode==2) return;
|
||||
|
||||
if (eNB->frame_parms.frame_type == FDD) {
|
||||
uci->num_pucch_resources = harq_information->harq_information_rel9_fdd.number_of_pucch_resources;
|
||||
|
||||
@@ -452,7 +555,7 @@ void handle_uci_harq_information(PHY_VARS_eNB *eNB, LTE_eNB_UCI *uci,nfapi_ul_co
|
||||
uci->n_pucch_3[0] = harq_information->harq_information_rel9_fdd.n_pucch_1_0;
|
||||
uci->n_pucch_3[1] = harq_information->harq_information_rel11.n_pucch_2_0;
|
||||
}
|
||||
else AssertFatal(1==0,"unsupported HARQ mode %d\n",harq_information->harq_information_rel9_fdd.ack_nack_mode);
|
||||
else AssertFatal(1==0,"unsupported FDD HARQ mode %d size %d\n",harq_information->harq_information_rel9_fdd.ack_nack_mode,harq_information->harq_information_rel9_fdd.harq_size);
|
||||
}
|
||||
else { // TDD
|
||||
uci->num_pucch_resources = harq_information->harq_information_rel10_tdd.number_of_pucch_resources;
|
||||
@@ -497,6 +600,8 @@ void handle_uci_sr_pdu(PHY_VARS_eNB *eNB,int UE_id,nfapi_ul_config_request_pdu_t
|
||||
{
|
||||
LTE_eNB_UCI *uci = &eNB->uci_vars[UE_id];
|
||||
|
||||
if (nfapi_mode==2) return;
|
||||
|
||||
uci->frame = frame;
|
||||
uci->subframe = subframe;
|
||||
uci->rnti = ul_config_pdu->uci_sr_pdu.ue_information.ue_information_rel8.rnti;
|
||||
@@ -507,7 +612,11 @@ void handle_uci_sr_pdu(PHY_VARS_eNB *eNB,int UE_id,nfapi_ul_config_request_pdu_t
|
||||
uci->n_pucch_1_0_sr[0] = ul_config_pdu->uci_sr_pdu.sr_information.sr_information_rel8.pucch_index;
|
||||
uci->srs_active = srs_active;
|
||||
uci->active = 1;
|
||||
|
||||
#if (LTE_RRC_VERSION >= MAKE_VERSION(14, 0, 0))
|
||||
uci->ue_type = ul_config_pdu->uci_sr_pdu.ue_information.ue_information_rel13.ue_type;
|
||||
uci->empty_symbols = ul_config_pdu->uci_sr_pdu.ue_information.ue_information_rel13.empty_symbols;
|
||||
uci->total_repetitions = ul_config_pdu->uci_sr_pdu.ue_information.ue_information_rel13.total_number_of_repetitions;
|
||||
#endif
|
||||
LOG_D(PHY,"Programming UCI SR rnti %x, pucch1_0 %d for (%d,%d)\n",
|
||||
uci->rnti,uci->n_pucch_1_0_sr[0],frame,subframe);
|
||||
}
|
||||
@@ -516,6 +625,8 @@ void handle_uci_sr_harq_pdu(PHY_VARS_eNB *eNB,int UE_id,nfapi_ul_config_request_
|
||||
{
|
||||
LTE_eNB_UCI *uci = &eNB->uci_vars[UE_id];
|
||||
|
||||
if (nfapi_mode==2) return;
|
||||
|
||||
uci->frame = frame;
|
||||
uci->subframe = subframe;
|
||||
uci->rnti = ul_config_pdu->uci_sr_harq_pdu.ue_information.ue_information_rel8.rnti;
|
||||
@@ -525,7 +636,11 @@ void handle_uci_sr_harq_pdu(PHY_VARS_eNB *eNB,int UE_id,nfapi_ul_config_request_
|
||||
uci->n_pucch_1_0_sr[0] = ul_config_pdu->uci_sr_harq_pdu.sr_information.sr_information_rel8.pucch_index;
|
||||
uci->srs_active = srs_active;
|
||||
uci->active = 1;
|
||||
|
||||
#if (LTE_RRC_VERSION >= MAKE_VERSION(14, 0, 0))
|
||||
uci->ue_type = ul_config_pdu->uci_sr_harq_pdu.ue_information.ue_information_rel13.ue_type;
|
||||
uci->empty_symbols = ul_config_pdu->uci_sr_harq_pdu.ue_information.ue_information_rel13.empty_symbols;
|
||||
uci->total_repetitions = ul_config_pdu->uci_sr_harq_pdu.ue_information.ue_information_rel13.total_number_of_repetitions;
|
||||
#endif
|
||||
handle_uci_harq_information(eNB,uci,&ul_config_pdu->uci_sr_harq_pdu.harq_information);
|
||||
}
|
||||
|
||||
@@ -533,6 +648,8 @@ void handle_uci_harq_pdu(PHY_VARS_eNB *eNB,int UE_id,nfapi_ul_config_request_pdu
|
||||
{
|
||||
LTE_eNB_UCI *uci = &eNB->uci_vars[UE_id];
|
||||
|
||||
if (nfapi_mode==2) return;
|
||||
|
||||
LOG_D(PHY,"Frame %d, Subframe %d: Programming UCI_HARQ process (type %d)\n",frame,subframe,HARQ);
|
||||
uci->frame = frame;
|
||||
uci->subframe = subframe;
|
||||
@@ -540,7 +657,11 @@ void handle_uci_harq_pdu(PHY_VARS_eNB *eNB,int UE_id,nfapi_ul_config_request_pdu
|
||||
uci->type = HARQ;
|
||||
uci->srs_active = srs_active;
|
||||
uci->num_antenna_ports = ul_config_pdu->uci_harq_pdu.harq_information.harq_information_rel11.num_ant_ports;
|
||||
|
||||
#if (LTE_RRC_VERSION >= MAKE_VERSION(14, 0, 0))
|
||||
uci->ue_type = ul_config_pdu->uci_harq_pdu.ue_information.ue_information_rel13.ue_type;
|
||||
uci->empty_symbols = ul_config_pdu->uci_harq_pdu.ue_information.ue_information_rel13.empty_symbols;
|
||||
uci->total_repetitions = ul_config_pdu->uci_harq_pdu.ue_information.ue_information_rel13.total_number_of_repetitions;
|
||||
#endif
|
||||
handle_uci_harq_information(eNB,uci,&ul_config_pdu->uci_harq_pdu.harq_information);
|
||||
|
||||
uci->active=1;
|
||||
@@ -550,6 +671,8 @@ void handle_srs_pdu(PHY_VARS_eNB *eNB,nfapi_ul_config_request_pdu_t *ul_config_p
|
||||
{
|
||||
int i;
|
||||
|
||||
if (nfapi_mode==2) return;
|
||||
|
||||
for (i=0;i<NUMBER_OF_UE_MAX;i++) {
|
||||
|
||||
if (eNB->soundingrs_ul_config_dedicated[i].active==1) continue;
|
||||
@@ -576,6 +699,8 @@ void handle_nfapi_ul_pdu(PHY_VARS_eNB *eNB,L1_rxtx_proc_t *proc,
|
||||
nfapi_ul_config_ulsch_pdu_rel8_t *rel8 = &ul_config_pdu->ulsch_pdu.ulsch_pdu_rel8;
|
||||
int16_t UE_id;
|
||||
|
||||
if (nfapi_mode==2) return;
|
||||
|
||||
// check if we have received a dci for this ue and ulsch descriptor is configured
|
||||
|
||||
if (ul_config_pdu->pdu_type == NFAPI_UL_CONFIG_ULSCH_PDU_TYPE) {
|
||||
@@ -616,6 +741,9 @@ void handle_nfapi_ul_pdu(PHY_VARS_eNB *eNB,L1_rxtx_proc_t *proc,
|
||||
AssertFatal((UE_id = find_uci(ul_config_pdu->uci_harq_pdu.ue_information.ue_information_rel8.rnti,
|
||||
proc->frame_tx,proc->subframe_tx,eNB,SEARCH_EXIST_OR_FREE))>=0,
|
||||
"No available UE UCI for rnti %x\n",ul_config_pdu->uci_harq_pdu.ue_information.ue_information_rel8.rnti);
|
||||
LOG_D(PHY,"Applying UL UCI_HARQ config for UE %d, rnti %x for frame %d, subframe %d\n",
|
||||
UE_id,ul_config_pdu->uci_harq_pdu.ue_information.ue_information_rel8.rnti,frame,subframe);
|
||||
|
||||
handle_uci_harq_pdu(eNB,UE_id,ul_config_pdu,frame,subframe,srs_present);
|
||||
}
|
||||
else if (ul_config_pdu->pdu_type == NFAPI_UL_CONFIG_UCI_CQI_PDU_TYPE) {
|
||||
@@ -697,6 +825,9 @@ void schedule_response(Sched_Rsp_t *Sched_INFO)
|
||||
eNB->pdcch_vars[subframe&1].num_pdcch_symbols = number_pdcch_ofdm_symbols;
|
||||
eNB->pdcch_vars[subframe&1].num_dci = 0;
|
||||
eNB->phich_vars[subframe&1].num_hi = 0;
|
||||
#if (LTE_RRC_VERSION >= MAKE_VERSION(14, 0, 0))
|
||||
eNB->mpdcch_vars[subframe&1].num_dci = 0;
|
||||
#endif
|
||||
|
||||
LOG_D(PHY,"NFAPI: Sched_INFO:SFN/SF:%04d%d DL_req:SFN/SF:%04d%d:dl_pdu:%d tx_req:SFN/SF:%04d%d:pdus:%d\n",
|
||||
frame,subframe,
|
||||
@@ -722,6 +853,7 @@ void schedule_response(Sched_Rsp_t *Sched_INFO)
|
||||
|
||||
harq_pid = subframe2harq_pid(fp,ul_frame,ul_subframe);
|
||||
|
||||
|
||||
// clear DCI allocation maps for new subframe
|
||||
|
||||
for (i=0; i<NUMBER_OF_UE_MAX; i++) {
|
||||
@@ -852,16 +984,20 @@ void schedule_response(Sched_Rsp_t *Sched_INFO)
|
||||
|
||||
switch (hi_dci0_req_pdu->pdu_type) {
|
||||
|
||||
case NFAPI_HI_DCI0_DCI_PDU_TYPE:
|
||||
case NFAPI_HI_DCI0_DCI_PDU_TYPE:
|
||||
|
||||
handle_nfapi_hi_dci0_dci_pdu(eNB,NFAPI_SFNSF2SFN(HI_DCI0_req->sfn_sf),NFAPI_SFNSF2SF(HI_DCI0_req->sfn_sf),proc,hi_dci0_req_pdu);
|
||||
eNB->pdcch_vars[NFAPI_SFNSF2SF(HI_DCI0_req->sfn_sf)&1].num_dci++;
|
||||
break;
|
||||
|
||||
case NFAPI_HI_DCI0_MPDCCH_DCI_PDU_TYPE:
|
||||
handle_nfapi_hi_dci0_mpdcch_dci_pdu(eNB,proc,hi_dci0_req_pdu);
|
||||
eNB->mpdcch_vars[subframe&1].num_dci++;
|
||||
break;
|
||||
|
||||
handle_nfapi_hi_dci0_dci_pdu(eNB,NFAPI_SFNSF2SFN(HI_DCI0_req->sfn_sf),NFAPI_SFNSF2SF(HI_DCI0_req->sfn_sf),proc,hi_dci0_req_pdu);
|
||||
|
||||
eNB->pdcch_vars[NFAPI_SFNSF2SF(HI_DCI0_req->sfn_sf)&1].num_dci++;
|
||||
break;
|
||||
|
||||
case NFAPI_HI_DCI0_HI_PDU_TYPE:
|
||||
handle_nfapi_hi_dci0_hi_pdu(eNB,NFAPI_SFNSF2SFN(HI_DCI0_req->sfn_sf),NFAPI_SFNSF2SF(HI_DCI0_req->sfn_sf),proc,hi_dci0_req_pdu);
|
||||
break;
|
||||
case NFAPI_HI_DCI0_HI_PDU_TYPE:
|
||||
handle_nfapi_hi_dci0_hi_pdu(eNB,NFAPI_SFNSF2SFN(HI_DCI0_req->sfn_sf),NFAPI_SFNSF2SF(HI_DCI0_req->sfn_sf),proc,hi_dci0_req_pdu);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -123,44 +123,45 @@ void prach_procedures(PHY_VARS_eNB *eNB
|
||||
|
||||
#if (LTE_RRC_VERSION >= MAKE_VERSION(14, 0, 0))
|
||||
if (br_flag==1) {
|
||||
int prach_mask;
|
||||
|
||||
eNB->UL_INFO.rach_ind_br.rach_indication_body.preamble_list = eNB->preamble_list_br;
|
||||
int ind=0;
|
||||
int ce_level=0;
|
||||
/* Save for later, it doesn't work
|
||||
int prach_mask = is_prach_subframe(&eNB->frame_parms,eNB->proc.frame_prach_br,eNB->proc.subframe_prach_br);
|
||||
for (int ind=0,ce_level=0;ce_level<4;ce_level++) {
|
||||
|
||||
if ((eNB->frame_parms.prach_emtc_config_common.prach_ConfigInfo.prach_CElevel_enable[ce_level]==1)&&
|
||||
(prach_mask&(1<<(1+ce_level)) > 0) && // prach is active and CE level has finished its repetitions
|
||||
(eNB->prach_vars_br.repetition_number[ce_level]==
|
||||
eNB->frame_parms.prach_emtc_config_common.prach_ConfigInfo.prach_numRepetitionPerPreambleAttempt[ce_level])) {
|
||||
*/
|
||||
if (eNB->frame_parms.prach_emtc_config_common.prach_ConfigInfo.prach_CElevel_enable[0]==1){
|
||||
if ((eNB->prach_energy_counter == 100) &&
|
||||
(max_preamble_energy[0] > eNB->measurements.prach_I0 + 100)) {
|
||||
eNB->UL_INFO.rach_ind_br.rach_indication_body.number_of_preambles++;
|
||||
|
||||
eNB->preamble_list_br[ind].preamble_rel8.timing_advance = max_preamble_delay[ind];//
|
||||
eNB->preamble_list_br[ind].preamble_rel8.preamble = max_preamble[ind];
|
||||
// note: fid is implicitly 0 here, this is the rule for eMTC RA-RNTI from 36.321, Section 5.1.4
|
||||
eNB->preamble_list_br[ind].preamble_rel8.rnti = 1+subframe+(eNB->prach_vars_br.first_frame[ce_level]%40);
|
||||
eNB->preamble_list_br[ind].instance_length = 0; //don't know exactly what this is
|
||||
eNB->preamble_list_br[ind].preamble_rel13.rach_resource_type = 1+ce_level; // CE Level
|
||||
LOG_D(PHY,"Filling NFAPI indication for RACH %d CELevel %d (mask %x) : TA %d, Preamble %d, rnti %x, rach_resource_type %d\n",
|
||||
ind,
|
||||
ce_level,
|
||||
is_prach_subframe(&eNB->frame_parms,eNB->proc.frame_prach_br,eNB->proc.subframe_prach_br),
|
||||
eNB->preamble_list_br[ind].preamble_rel8.timing_advance,
|
||||
eNB->preamble_list_br[ind].preamble_rel8.preamble,
|
||||
eNB->preamble_list_br[ind].preamble_rel8.rnti,
|
||||
eNB->preamble_list_br[ind].preamble_rel13.rach_resource_type);
|
||||
prach_mask = is_prach_subframe (&eNB->frame_parms, eNB->proc.frame_prach_br, eNB->proc.subframe_prach_br);
|
||||
|
||||
eNB->UL_INFO.rach_ind_br.rach_indication_body.preamble_list = eNB->preamble_list_br;
|
||||
int ind = 0;
|
||||
int ce_level = 0;
|
||||
/* Save for later, it doesn't work
|
||||
for (int ind=0,ce_level=0;ce_level<4;ce_level++) {
|
||||
|
||||
if ((eNB->frame_parms.prach_emtc_config_common.prach_ConfigInfo.prach_CElevel_enable[ce_level]==1)&&
|
||||
(prach_mask&(1<<(1+ce_level)) > 0) && // prach is active and CE level has finished its repetitions
|
||||
(eNB->prach_vars_br.repetition_number[ce_level]==
|
||||
eNB->frame_parms.prach_emtc_config_common.prach_ConfigInfo.prach_numRepetitionPerPreambleAttempt[ce_level])) {
|
||||
|
||||
*/
|
||||
|
||||
if (eNB->frame_parms.prach_emtc_config_common.prach_ConfigInfo.prach_CElevel_enable[0] == 1) {
|
||||
if ((eNB->prach_energy_counter == 100) && (max_preamble_energy[0] > eNB->measurements.prach_I0 + 200)) {
|
||||
eNB->UL_INFO.rach_ind_br.rach_indication_body.number_of_preambles++;
|
||||
|
||||
eNB->preamble_list_br[ind].preamble_rel8.timing_advance = max_preamble_delay[ind]; //
|
||||
eNB->preamble_list_br[ind].preamble_rel8.preamble = max_preamble[ind];
|
||||
// note: fid is implicitly 0 here, this is the rule for eMTC RA-RNTI from 36.321, Section 5.1.4
|
||||
eNB->preamble_list_br[ind].preamble_rel8.rnti = 1 + subframe + (60*(eNB->prach_vars_br.first_frame[ce_level] % 40));
|
||||
eNB->preamble_list_br[ind].instance_length = 0; //don't know exactly what this is
|
||||
eNB->preamble_list_br[ind].preamble_rel13.rach_resource_type = 1 + ce_level; // CE Level
|
||||
LOG_I (PHY, "Filling NFAPI indication for RACH %d CELevel %d (mask %x) : TA %d, Preamble %d, rnti %x, rach_resource_type %d\n",
|
||||
ind,
|
||||
ce_level,
|
||||
prach_mask,
|
||||
eNB->preamble_list_br[ind].preamble_rel8.timing_advance,
|
||||
eNB->preamble_list_br[ind].preamble_rel8.preamble, eNB->preamble_list_br[ind].preamble_rel8.rnti, eNB->preamble_list_br[ind].preamble_rel13.rach_resource_type);
|
||||
}
|
||||
}
|
||||
/*
|
||||
ind++;
|
||||
}
|
||||
} */// ce_level
|
||||
}
|
||||
}
|
||||
} */// ce_level
|
||||
}
|
||||
else
|
||||
#endif
|
||||
|
||||
@@ -413,9 +413,9 @@ int main(int argc, char **argv) {
|
||||
// enable these lines if you need debug info
|
||||
// however itti will catch all signals, so ctrl-c won't work anymore
|
||||
// alternatively you can disable ITTI completely in CMakeLists.txt
|
||||
//itti_init(TASK_MAX, THREAD_MAX, MESSAGES_ID_MAX, tasks_info, messages_info, messages_definition_xml, NULL);
|
||||
//set_comp_log(PHY,LOG_DEBUG,LOG_MED,1);
|
||||
//set_glog(LOG_DEBUG,LOG_MED);
|
||||
// itti_init(TASK_MAX, THREAD_MAX, MESSAGES_ID_MAX, tasks_info, messages_info, messages_definition_xml, NULL);
|
||||
// set_comp_log(PHY,LOG_DEBUG,LOG_HIGH,1);
|
||||
// set_glog(LOG_DEBUG,LOG_HIGH);
|
||||
//hapZEbm:n:Y:X:x:s:w:e:q:d:D:O:c:r:i:f:y:c:oA:C:R:g:N:l:S:T:QB:PI:LF
|
||||
static paramdef_t options[] = {
|
||||
{ "awgn", "Use AWGN channel and not multipath", PARAMFLAG_BOOL, strptr:NULL, defintval:0, TYPE_INT, 0, NULL, NULL },
|
||||
|
||||
@@ -236,6 +236,9 @@ typedef struct protocol_ctxt_s {
|
||||
sub_frame_t subframe; /*!< \brief LTE sub frame number.*/
|
||||
eNB_index_t eNB_index; /*!< \brief valid for UE indicating the index of connected eNB(s) */
|
||||
boolean_t configured; /*!< \brief flag indicating whether the instance is configured or not */
|
||||
#ifdef Rel14
|
||||
boolean_t brOption;
|
||||
#endif
|
||||
} protocol_ctxt_t;
|
||||
// warning time hardcoded
|
||||
#define PROTOCOL_CTXT_TIME_MILLI_SECONDS(CtXt_h) ((CtXt_h)->frame*10+(CtXt_h)->subframe)
|
||||
|
||||
@@ -87,11 +87,81 @@ typedef struct RrcStateInd_s {
|
||||
Rrc_Sub_State_t sub_state;
|
||||
} RrcStateInd;
|
||||
|
||||
typedef struct RadioResourceConfig_s {
|
||||
long prach_root;
|
||||
long prach_config_index;
|
||||
BOOLEAN_t prach_high_speed;
|
||||
long prach_zero_correlation;
|
||||
long prach_freq_offset;
|
||||
long pucch_delta_shift;
|
||||
long pucch_nRB_CQI;
|
||||
long pucch_nCS_AN;
|
||||
long pucch_n1_AN;
|
||||
long pdsch_referenceSignalPower;
|
||||
long pdsch_p_b;
|
||||
long pusch_n_SB;
|
||||
long pusch_hoppingMode;
|
||||
long pusch_hoppingOffset;
|
||||
BOOLEAN_t pusch_enable64QAM;
|
||||
BOOLEAN_t pusch_groupHoppingEnabled;
|
||||
long pusch_groupAssignment;
|
||||
BOOLEAN_t pusch_sequenceHoppingEnabled;
|
||||
long pusch_nDMRS1;
|
||||
long phich_duration;
|
||||
long phich_resource;
|
||||
BOOLEAN_t srs_enable;
|
||||
long srs_BandwidthConfig;
|
||||
long srs_SubframeConfig;
|
||||
BOOLEAN_t srs_ackNackST;
|
||||
BOOLEAN_t srs_MaxUpPts;
|
||||
long pusch_p0_Nominal;
|
||||
long pusch_alpha;
|
||||
long pucch_p0_Nominal;
|
||||
long msg3_delta_Preamble;
|
||||
long ul_CyclicPrefixLength;
|
||||
e_LTE_DeltaFList_PUCCH__deltaF_PUCCH_Format1 pucch_deltaF_Format1;
|
||||
e_LTE_DeltaFList_PUCCH__deltaF_PUCCH_Format1b pucch_deltaF_Format1b;
|
||||
e_LTE_DeltaFList_PUCCH__deltaF_PUCCH_Format2 pucch_deltaF_Format2;
|
||||
e_LTE_DeltaFList_PUCCH__deltaF_PUCCH_Format2a pucch_deltaF_Format2a;
|
||||
e_LTE_DeltaFList_PUCCH__deltaF_PUCCH_Format2b pucch_deltaF_Format2b;
|
||||
long rach_numberOfRA_Preambles;
|
||||
BOOLEAN_t rach_preamblesGroupAConfig;
|
||||
long rach_sizeOfRA_PreamblesGroupA;
|
||||
long rach_messageSizeGroupA;
|
||||
e_LTE_RACH_ConfigCommon__preambleInfo__preamblesGroupAConfig__messagePowerOffsetGroupB rach_messagePowerOffsetGroupB;
|
||||
long rach_powerRampingStep;
|
||||
long rach_preambleInitialReceivedTargetPower;
|
||||
long rach_preambleTransMax;
|
||||
long rach_raResponseWindowSize;
|
||||
long rach_macContentionResolutionTimer;
|
||||
long rach_maxHARQ_Msg3Tx;
|
||||
long bcch_modificationPeriodCoeff;
|
||||
long pcch_defaultPagingCycle;
|
||||
long pcch_nB;
|
||||
long ue_TimersAndConstants_t300;
|
||||
long ue_TimersAndConstants_t301;
|
||||
long ue_TimersAndConstants_t310;
|
||||
long ue_TimersAndConstants_t311;
|
||||
long ue_TimersAndConstants_n310;
|
||||
long ue_TimersAndConstants_n311;
|
||||
long ue_TransmissionMode;
|
||||
long ue_multiple_max;
|
||||
#ifdef Rel14
|
||||
//SIB2 BR Options
|
||||
long* preambleTransMax_CE_r13;
|
||||
BOOLEAN_t prach_ConfigCommon_v1310;
|
||||
BOOLEAN_t* mpdcch_startSF_CSS_RA_r13;
|
||||
long mpdcch_startSF_CSS_RA_r13_val;
|
||||
long* prach_HoppingOffset_r13;
|
||||
#endif
|
||||
} RadioResourceConfig;
|
||||
|
||||
// eNB: ENB_APP -> RRC messages
|
||||
typedef struct RrcConfigurationReq_s {
|
||||
uint32_t cell_identity;
|
||||
uint32_t cell_identity;
|
||||
|
||||
uint16_t tac;
|
||||
|
||||
uint16_t tac;
|
||||
|
||||
uint16_t mcc[PLMN_LIST_MAX_SIZE];
|
||||
uint16_t mnc[PLMN_LIST_MAX_SIZE];
|
||||
@@ -113,68 +183,89 @@ typedef struct RrcConfigurationReq_s {
|
||||
int16_t Nid_cell[MAX_NUM_CCs];// for testing, change later
|
||||
int16_t N_RB_DL[MAX_NUM_CCs];// for testing, change later
|
||||
int nb_antenna_ports[MAX_NUM_CCs];
|
||||
long prach_root[MAX_NUM_CCs];
|
||||
long prach_config_index[MAX_NUM_CCs];
|
||||
BOOLEAN_t prach_high_speed[MAX_NUM_CCs];
|
||||
long prach_zero_correlation[MAX_NUM_CCs];
|
||||
long prach_freq_offset[MAX_NUM_CCs];
|
||||
long pucch_delta_shift[MAX_NUM_CCs];
|
||||
long pucch_nRB_CQI[MAX_NUM_CCs];
|
||||
long pucch_nCS_AN[MAX_NUM_CCs];
|
||||
//#if (LTE_RRC_VERSION < MAKE_VERSION(10, 0, 0))
|
||||
long pucch_n1_AN[MAX_NUM_CCs];
|
||||
//#endif
|
||||
long pdsch_referenceSignalPower[MAX_NUM_CCs];
|
||||
long pdsch_p_b[MAX_NUM_CCs];
|
||||
long pusch_n_SB[MAX_NUM_CCs];
|
||||
long pusch_hoppingMode[MAX_NUM_CCs];
|
||||
long pusch_hoppingOffset[MAX_NUM_CCs];
|
||||
BOOLEAN_t pusch_enable64QAM[MAX_NUM_CCs];
|
||||
BOOLEAN_t pusch_groupHoppingEnabled[MAX_NUM_CCs];
|
||||
long pusch_groupAssignment[MAX_NUM_CCs];
|
||||
BOOLEAN_t pusch_sequenceHoppingEnabled[MAX_NUM_CCs];
|
||||
long pusch_nDMRS1[MAX_NUM_CCs];
|
||||
long phich_duration[MAX_NUM_CCs];
|
||||
long phich_resource[MAX_NUM_CCs];
|
||||
BOOLEAN_t srs_enable[MAX_NUM_CCs];
|
||||
long srs_BandwidthConfig[MAX_NUM_CCs];
|
||||
long srs_SubframeConfig[MAX_NUM_CCs];
|
||||
BOOLEAN_t srs_ackNackST[MAX_NUM_CCs];
|
||||
BOOLEAN_t srs_MaxUpPts[MAX_NUM_CCs];
|
||||
long pusch_p0_Nominal[MAX_NUM_CCs];
|
||||
long pusch_alpha[MAX_NUM_CCs];
|
||||
long pucch_p0_Nominal[MAX_NUM_CCs];
|
||||
long msg3_delta_Preamble[MAX_NUM_CCs];
|
||||
long ul_CyclicPrefixLength[MAX_NUM_CCs];
|
||||
e_LTE_DeltaFList_PUCCH__deltaF_PUCCH_Format1 pucch_deltaF_Format1[MAX_NUM_CCs];
|
||||
e_LTE_DeltaFList_PUCCH__deltaF_PUCCH_Format1b pucch_deltaF_Format1b[MAX_NUM_CCs];
|
||||
e_LTE_DeltaFList_PUCCH__deltaF_PUCCH_Format2 pucch_deltaF_Format2[MAX_NUM_CCs];
|
||||
e_LTE_DeltaFList_PUCCH__deltaF_PUCCH_Format2a pucch_deltaF_Format2a[MAX_NUM_CCs];
|
||||
e_LTE_DeltaFList_PUCCH__deltaF_PUCCH_Format2b pucch_deltaF_Format2b[MAX_NUM_CCs];
|
||||
long rach_numberOfRA_Preambles[MAX_NUM_CCs];
|
||||
BOOLEAN_t rach_preamblesGroupAConfig[MAX_NUM_CCs];
|
||||
long rach_sizeOfRA_PreamblesGroupA[MAX_NUM_CCs];
|
||||
long rach_messageSizeGroupA[MAX_NUM_CCs];
|
||||
e_LTE_RACH_ConfigCommon__preambleInfo__preamblesGroupAConfig__messagePowerOffsetGroupB rach_messagePowerOffsetGroupB[MAX_NUM_CCs];
|
||||
long rach_powerRampingStep[MAX_NUM_CCs];
|
||||
long rach_preambleInitialReceivedTargetPower[MAX_NUM_CCs];
|
||||
long rach_preambleTransMax[MAX_NUM_CCs];
|
||||
long rach_raResponseWindowSize[MAX_NUM_CCs];
|
||||
long rach_macContentionResolutionTimer[MAX_NUM_CCs];
|
||||
long rach_maxHARQ_Msg3Tx[MAX_NUM_CCs];
|
||||
long bcch_modificationPeriodCoeff[MAX_NUM_CCs];
|
||||
long pcch_defaultPagingCycle[MAX_NUM_CCs];
|
||||
long pcch_nB[MAX_NUM_CCs];
|
||||
long ue_TimersAndConstants_t300[MAX_NUM_CCs];
|
||||
long ue_TimersAndConstants_t301[MAX_NUM_CCs];
|
||||
long ue_TimersAndConstants_t310[MAX_NUM_CCs];
|
||||
long ue_TimersAndConstants_t311[MAX_NUM_CCs];
|
||||
long ue_TimersAndConstants_n310[MAX_NUM_CCs];
|
||||
long ue_TimersAndConstants_n311[MAX_NUM_CCs];
|
||||
long ue_TransmissionMode[MAX_NUM_CCs];
|
||||
long ue_multiple_max[MAX_NUM_CCs];
|
||||
int eMBMS_configured;
|
||||
int eMTC_configured;
|
||||
int SL_configured;
|
||||
|
||||
//TTN - for D2D
|
||||
RadioResourceConfig radioresourceconfig[MAX_NUM_CCs];
|
||||
RadioResourceConfig radioresourceconfig_BR[MAX_NUM_CCs];
|
||||
|
||||
#if (LTE_RRC_VERSION >= MAKE_VERSION(13, 0, 0))
|
||||
//MIB
|
||||
long schedulingInfoSIB1_BR_r13[MAX_NUM_CCs];
|
||||
//SIB1 BR options
|
||||
uint16_t* hyperSFN_r13 [MAX_NUM_CCs];
|
||||
long* eDRX_Allowed_r13 [MAX_NUM_CCs];
|
||||
BOOLEAN_t cellSelectionInfoCE_r13 [MAX_NUM_CCs];
|
||||
long q_RxLevMinCE_r13 [MAX_NUM_CCs];
|
||||
long* q_QualMinRSRQ_CE_r13 [MAX_NUM_CCs];
|
||||
BOOLEAN_t bandwidthReducedAccessRelatedInfo_r13 [MAX_NUM_CCs];
|
||||
long si_Narrowband_r13 [MAX_NUM_CCs][32];
|
||||
long si_TBS_r13 [MAX_NUM_CCs][32];
|
||||
int scheduling_info_br_size [MAX_NUM_CCs];
|
||||
long si_WindowLength_BR_r13 [MAX_NUM_CCs];
|
||||
long si_RepetitionPattern_r13 [MAX_NUM_CCs];
|
||||
BOOLEAN_t * fdd_DownlinkOrTddSubframeBitmapBR_r13 [MAX_NUM_CCs];
|
||||
uint64_t fdd_DownlinkOrTddSubframeBitmapBR_val_r13 [MAX_NUM_CCs];
|
||||
uint16_t *fdd_UplinkSubframeBitmapBR_r13 [MAX_NUM_CCs];
|
||||
long startSymbolBR_r13 [MAX_NUM_CCs];
|
||||
long si_HoppingConfigCommon_r13 [MAX_NUM_CCs];
|
||||
long* si_ValidityTime_r13 [MAX_NUM_CCs];
|
||||
long systemInfoValueTagSi_r13 [MAX_NUM_CCs][10];
|
||||
int system_info_value_tag_SI_size [MAX_NUM_CCs];
|
||||
BOOLEAN_t freqHoppingParametersDL_r13 [MAX_NUM_CCs];
|
||||
long* mpdcch_pdsch_HoppingNB_r13 [MAX_NUM_CCs];
|
||||
BOOLEAN_t interval_DLHoppingConfigCommonModeA_r13 [MAX_NUM_CCs];
|
||||
long interval_DLHoppingConfigCommonModeA_r13_val [MAX_NUM_CCs];
|
||||
BOOLEAN_t interval_DLHoppingConfigCommonModeB_r13 [MAX_NUM_CCs];
|
||||
long interval_DLHoppingConfigCommonModeB_r13_val [MAX_NUM_CCs];
|
||||
long* mpdcch_pdsch_HoppingOffset_r13 [MAX_NUM_CCs];
|
||||
long firstPreamble_r13 [MAX_NUM_CCs][4];
|
||||
long lastPreamble_r13 [MAX_NUM_CCs][4];
|
||||
long ra_ResponseWindowSize_r13 [MAX_NUM_CCs][4];
|
||||
long mac_ContentionResolutionTimer_r13 [MAX_NUM_CCs][4];
|
||||
long rar_HoppingConfig_r13 [MAX_NUM_CCs][4];
|
||||
int rach_CE_LevelInfoList_r13_size [MAX_NUM_CCs];
|
||||
// long pcch_defaultPagingCycle_br;
|
||||
long rsrp_range [MAX_NUM_CCs][3];
|
||||
int rsrp_range_list_size [MAX_NUM_CCs];
|
||||
long prach_config_index [MAX_NUM_CCs][4];
|
||||
long prach_freq_offset [MAX_NUM_CCs][4];
|
||||
long *prach_StartingSubframe_r13 [MAX_NUM_CCs][4];
|
||||
long *maxNumPreambleAttemptCE_r13 [MAX_NUM_CCs][4];
|
||||
long numRepetitionPerPreambleAttempt_r13 [MAX_NUM_CCs][4];
|
||||
long mpdcch_NumRepetition_RA_r13 [MAX_NUM_CCs][4];
|
||||
long prach_HoppingConfig_r13 [MAX_NUM_CCs][4];
|
||||
int prach_parameters_list_size [MAX_NUM_CCs];
|
||||
long max_available_narrow_band [MAX_NUM_CCs][4][2];
|
||||
int max_available_narrow_band_size [MAX_NUM_CCs][4];
|
||||
long pucch_info_value [MAX_NUM_CCs][4];
|
||||
int pucch_info_value_size [MAX_NUM_CCs];
|
||||
bool pcch_config_v1310 [MAX_NUM_CCs];
|
||||
long paging_narrowbands_r13 [MAX_NUM_CCs];
|
||||
long mpdcch_numrepetition_paging_r13 [MAX_NUM_CCs];
|
||||
long *nb_v1310 [MAX_NUM_CCs];
|
||||
long *pucch_NumRepetitionCE_Msg4_Level0_r13 [MAX_NUM_CCs];
|
||||
long *pucch_NumRepetitionCE_Msg4_Level1_r13 [MAX_NUM_CCs];
|
||||
long *pucch_NumRepetitionCE_Msg4_Level2_r13 [MAX_NUM_CCs];
|
||||
long *pucch_NumRepetitionCE_Msg4_Level3_r13 [MAX_NUM_CCs];
|
||||
bool sib2_freq_hoppingParameters_r13_exists [MAX_NUM_CCs];
|
||||
long *sib2_mpdcch_pdsch_hoppingNB_r13 [MAX_NUM_CCs];
|
||||
long *sib2_interval_DLHoppingConfigCommonModeA_r13 [MAX_NUM_CCs];
|
||||
long sib2_interval_DLHoppingConfigCommonModeA_r13_val [MAX_NUM_CCs];
|
||||
long *sib2_interval_DLHoppingConfigCommonModeB_r13 [MAX_NUM_CCs];
|
||||
long sib2_interval_DLHoppingConfigCommonModeB_r13_val [MAX_NUM_CCs];
|
||||
long *sib2_interval_ULHoppingConfigCommonModeA_r13 [MAX_NUM_CCs];
|
||||
long sib2_interval_ULHoppingConfigCommonModeA_r13_val [MAX_NUM_CCs];
|
||||
long *sib2_interval_ULHoppingConfigCommonModeB_r13 [MAX_NUM_CCs];
|
||||
long sib2_interval_ULHoppingConfigCommonModeB_r13_val [MAX_NUM_CCs];
|
||||
long *sib2_mpdcch_pdsch_hoppingOffset_r13 [MAX_NUM_CCs];
|
||||
long *pdsch_maxNumRepetitionCEmodeA_r13 [MAX_NUM_CCs];
|
||||
long *pdsch_maxNumRepetitionCEmodeB_r13 [MAX_NUM_CCs];
|
||||
long *pusch_maxNumRepetitionCEmodeA_r13 [MAX_NUM_CCs];
|
||||
long *pusch_maxNumRepetitionCEmodeB_r13 [MAX_NUM_CCs];
|
||||
long *pusch_HoppingOffset_v1310 [MAX_NUM_CCs];
|
||||
#endif
|
||||
//SIB18
|
||||
e_LTE_SL_CP_Len_r12 rxPool_sc_CP_Len[MAX_NUM_CCs];
|
||||
e_LTE_SL_PeriodComm_r12 rxPool_sc_Period[MAX_NUM_CCs];
|
||||
@@ -224,9 +315,7 @@ typedef struct RrcConfigurationReq_s {
|
||||
|
||||
typedef struct NbIoTRrcConfigurationReq_s {
|
||||
uint32_t cell_identity;
|
||||
|
||||
uint16_t tac;
|
||||
|
||||
uint16_t mcc;
|
||||
uint16_t mnc;
|
||||
uint8_t mnc_digit_length;
|
||||
|
||||
|
Before Width: | Height: | Size: 8.2 KiB After Width: | Height: | Size: 8.2 KiB |
|
Before Width: | Height: | Size: 30 KiB After Width: | Height: | Size: 30 KiB |
|
Before Width: | Height: | Size: 13 KiB After Width: | Height: | Size: 13 KiB |
|
Before Width: | Height: | Size: 12 KiB After Width: | Height: | Size: 12 KiB |
|
Before Width: | Height: | Size: 43 KiB After Width: | Height: | Size: 43 KiB |
|
Before Width: | Height: | Size: 52 KiB After Width: | Height: | Size: 52 KiB |
|
Before Width: | Height: | Size: 23 KiB After Width: | Height: | Size: 23 KiB |
|
Before Width: | Height: | Size: 13 KiB After Width: | Height: | Size: 13 KiB |
|
Before Width: | Height: | Size: 49 KiB After Width: | Height: | Size: 49 KiB |
|
Before Width: | Height: | Size: 37 KiB After Width: | Height: | Size: 37 KiB |
|
Before Width: | Height: | Size: 42 KiB After Width: | Height: | Size: 42 KiB |
|
Before Width: | Height: | Size: 11 KiB After Width: | Height: | Size: 11 KiB |
|
Before Width: | Height: | Size: 9.3 KiB After Width: | Height: | Size: 9.3 KiB |
|
Before Width: | Height: | Size: 34 KiB After Width: | Height: | Size: 34 KiB |
|
Before Width: | Height: | Size: 43 KiB After Width: | Height: | Size: 43 KiB |
|
Before Width: | Height: | Size: 3.4 MiB After Width: | Height: | Size: 3.4 MiB |
|
Before Width: | Height: | Size: 625 KiB After Width: | Height: | Size: 625 KiB |
|
Before Width: | Height: | Size: 10 KiB After Width: | Height: | Size: 10 KiB |
|
Before Width: | Height: | Size: 30 KiB After Width: | Height: | Size: 30 KiB |
|
Before Width: | Height: | Size: 54 KiB After Width: | Height: | Size: 54 KiB |
|
Before Width: | Height: | Size: 9.0 KiB After Width: | Height: | Size: 9.0 KiB |
|
Before Width: | Height: | Size: 86 KiB After Width: | Height: | Size: 86 KiB |
|
Before Width: | Height: | Size: 7.4 KiB After Width: | Height: | Size: 7.4 KiB |
|
Before Width: | Height: | Size: 11 KiB After Width: | Height: | Size: 11 KiB |
@@ -35,6 +35,8 @@
|
||||
#define ENB_CONFIG_STRING_ENB_LIST "eNBs"
|
||||
/* component carriers configuration section name */
|
||||
#define ENB_CONFIG_STRING_COMPONENT_CARRIERS "component_carriers"
|
||||
#define ENB_CONFIG_STRING_COMPONENT_BR_PARAMETERS "br_parameters"
|
||||
|
||||
|
||||
#define ENB_CONFIG_STRING_FRAME_TYPE "frame_type"
|
||||
#define ENB_CONFIG_STRING_PBCH_REPETITION "pbch_repetition"
|
||||
|
||||
@@ -44,6 +44,7 @@
|
||||
#include "rrc_messages_types.h"
|
||||
#include "RRC/LTE/rrc_defs.h"
|
||||
#include <intertask_interface.h>
|
||||
#include "enb_paramdef.h"
|
||||
|
||||
#define IPV4_STR_ADDR_TO_INT_NWBO(AdDr_StR,NwBo,MeSsAgE ) do {\
|
||||
struct in_addr inp;\
|
||||
@@ -104,5 +105,8 @@ int RCconfig_RRC(MessageDef *msg_p, uint32_t i, eNB_RRC_INST *rrc);
|
||||
int RCconfig_S1(MessageDef *msg_p, uint32_t i);
|
||||
int RCconfig_X2(MessageDef *msg_p, uint32_t i);
|
||||
|
||||
void fill_SL_configuration(MessageDef *msg_p, ccparams_sidelink_t *SLconfig,int cell_idx,int cc_idx,char *config_fname);
|
||||
void fill_eMTC_configuration(MessageDef *msg_p, ccparams_eMTC_t *eMTCconfig, int cell_idx,int cc_idx,char *config_fname,char *brparamspath);
|
||||
|
||||
#endif /* ENB_CONFIG_H_ */
|
||||
/** @} */
|
||||
|
||||