Merge remote-tracking branch 'origin/fembms-enb-ue' into develop_integration_2020_w34
This commit is contained in:
@@ -105,6 +105,7 @@ eNBs =
|
||||
ue_TimersAndConstants_n310 = 20;
|
||||
ue_TimersAndConstants_n311 = 1;
|
||||
ue_TransmissionMode = 1;
|
||||
mbms_dedicated_serving_cell = "DISABLE"
|
||||
|
||||
//Parameters for SIB18
|
||||
rxPool_sc_CP_Len = "normal";
|
||||
|
||||
@@ -105,6 +105,8 @@ eNBs =
|
||||
ue_TimersAndConstants_n310 = 20;
|
||||
ue_TimersAndConstants_n311 = 1;
|
||||
ue_TransmissionMode = 1;
|
||||
mbms_dedicated_serving_cell = "DISABLE"
|
||||
|
||||
|
||||
//Parameters for SIB18
|
||||
rxPool_sc_CP_Len = "normal";
|
||||
@@ -247,7 +249,6 @@ MCEs = (
|
||||
);
|
||||
|
||||
|
||||
|
||||
NETWORK_INTERFACES :
|
||||
{
|
||||
MCE_INTERFACE_NAME_FOR_M2_ENB = "lo";
|
||||
@@ -271,12 +272,12 @@ MCEs = (
|
||||
mcch_update_time = 10;
|
||||
mbms_area_config_list = (
|
||||
{
|
||||
common_sf_allocation_period = 2; #rf4(0) rf8(1) rf16(2) rf32(3) rf64(4) rf128(5) rf256(6)
|
||||
common_sf_allocation_period = 1; #rf4(0) rf8(1) rf16(2) rf32(3) rf64(4) rf128(5) rf256(6)
|
||||
mbms_area_id = 0;
|
||||
pmch_config_list = (
|
||||
{
|
||||
allocated_sf_end=64;
|
||||
data_mcs=10;
|
||||
allocated_sf_end=40;
|
||||
data_mcs=20;
|
||||
mch_scheduling_period = 0; #rf8(0)
|
||||
mbms_session_list = (
|
||||
{
|
||||
@@ -288,7 +289,7 @@ MCEs = (
|
||||
mnc_length = 2;
|
||||
}
|
||||
service_id=0;
|
||||
lcid=5; #this must be properly defined lcid:8+service:0 -> rab_id:5
|
||||
lcid=5; #this must be properly defined lcid:8+service:0 -> rab_id:5 //with new RLC set lcid either 4 or 5
|
||||
}
|
||||
);
|
||||
}
|
||||
@@ -296,10 +297,10 @@ MCEs = (
|
||||
|
||||
mbms_sf_config_list = (
|
||||
{
|
||||
radioframe_allocation_period=1; #n1(0) n2(1) n4(2) n8(3) n16(4) n32(5)
|
||||
radioframe_allocation_period=0; #n1(0) n2(1) n4(2) n8(3) n16(4) n32(5)
|
||||
radioframe_alloocation_offset=0;
|
||||
num_frame="oneFrame";
|
||||
subframe_allocation=57; #xx100000
|
||||
subframe_allocation=59; #xx111011 #57; #xx111001
|
||||
//num_frame="fourFrame";
|
||||
//subframe_allocation=14548987; #
|
||||
}
|
||||
|
||||
@@ -0,0 +1,426 @@
|
||||
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 = 7;
|
||||
downlink_frequency = 2680000000L;
|
||||
uplink_frequency_offset = -120000000;
|
||||
Nid_cell = 0;
|
||||
N_RB_DL = 25;
|
||||
Nid_cell_mbsfn = 0;
|
||||
nb_antenna_ports = 1;
|
||||
nb_antennas_tx = 1;
|
||||
nb_antennas_rx = 1;
|
||||
tx_gain = 90;
|
||||
rx_gain = 125;
|
||||
pbch_repetition = "FALSE";
|
||||
prach_root = 0;
|
||||
prach_config_index = 0;
|
||||
prach_high_speed = "DISABLE";
|
||||
prach_zero_correlation = 1;
|
||||
prach_freq_offset = 2;
|
||||
pucch_delta_shift = 1;
|
||||
pucch_nRB_CQI = 0;
|
||||
pucch_nCS_AN = 0;
|
||||
pucch_n1_AN = 0;
|
||||
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 = 64;
|
||||
rach_preamblesGroupAConfig = "DISABLE";
|
||||
/*
|
||||
rach_sizeOfRA_PreamblesGroupA = ;
|
||||
rach_messageSizeGroupA = ;
|
||||
rach_messagePowerOffsetGroupB = ;
|
||||
*/
|
||||
rach_powerRampingStep = 4;
|
||||
rach_preambleInitialReceivedTargetPower = -108;
|
||||
rach_preambleTransMax = 10;
|
||||
rach_raResponseWindowSize = 10;
|
||||
rach_macContentionResolutionTimer = 48;
|
||||
rach_maxHARQ_Msg3Tx = 4;
|
||||
|
||||
pcch_default_PagingCycle = 128;
|
||||
pcch_nB = "oneT";
|
||||
bcch_modificationPeriodCoeff = 2;
|
||||
ue_TimersAndConstants_t300 = 1000;
|
||||
ue_TimersAndConstants_t301 = 1000;
|
||||
ue_TimersAndConstants_t310 = 1000;
|
||||
ue_TimersAndConstants_t311 = 10000;
|
||||
ue_TimersAndConstants_n310 = 20;
|
||||
ue_TimersAndConstants_n311 = 1;
|
||||
ue_TransmissionMode = 1;
|
||||
mbms_dedicated_serving_cell = "ENABLE"
|
||||
|
||||
//Parameters for SIB18
|
||||
rxPool_sc_CP_Len = "normal";
|
||||
rxPool_sc_Period = "sf40";
|
||||
rxPool_data_CP_Len = "normal";
|
||||
rxPool_ResourceConfig_prb_Num = 20;
|
||||
rxPool_ResourceConfig_prb_Start = 5;
|
||||
rxPool_ResourceConfig_prb_End = 44;
|
||||
rxPool_ResourceConfig_offsetIndicator_present = "prSmall";
|
||||
rxPool_ResourceConfig_offsetIndicator_choice = 0;
|
||||
rxPool_ResourceConfig_subframeBitmap_present = "prBs40";
|
||||
rxPool_ResourceConfig_subframeBitmap_choice_bs_buf = "00000000000000000000";
|
||||
rxPool_ResourceConfig_subframeBitmap_choice_bs_size = 5;
|
||||
rxPool_ResourceConfig_subframeBitmap_choice_bs_bits_unused = 0;
|
||||
/* rxPool_dataHoppingConfig_hoppingParameter = 0;
|
||||
rxPool_dataHoppingConfig_numSubbands = "ns1";
|
||||
rxPool_dataHoppingConfig_rbOffset = 0;
|
||||
rxPool_commTxResourceUC-ReqAllowed = "TRUE";
|
||||
*/
|
||||
// Parameters for SIB19
|
||||
discRxPool_cp_Len = "normal"
|
||||
discRxPool_discPeriod = "rf32"
|
||||
discRxPool_numRetx = 1;
|
||||
discRxPool_numRepetition = 2;
|
||||
discRxPool_ResourceConfig_prb_Num = 5;
|
||||
discRxPool_ResourceConfig_prb_Start = 3;
|
||||
discRxPool_ResourceConfig_prb_End = 21;
|
||||
discRxPool_ResourceConfig_offsetIndicator_present = "prSmall";
|
||||
discRxPool_ResourceConfig_offsetIndicator_choice = 0;
|
||||
discRxPool_ResourceConfig_subframeBitmap_present = "prBs40";
|
||||
discRxPool_ResourceConfig_subframeBitmap_choice_bs_buf = "f0ffffffff";
|
||||
discRxPool_ResourceConfig_subframeBitmap_choice_bs_size = 5;
|
||||
discRxPool_ResourceConfig_subframeBitmap_choice_bs_bits_unused = 0;
|
||||
|
||||
}
|
||||
);
|
||||
|
||||
|
||||
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";
|
||||
}
|
||||
);
|
||||
|
||||
enable_measurement_reports = "no";
|
||||
|
||||
///X2
|
||||
enable_x2 = "no";
|
||||
t_reloc_prep = 1000; /* unit: millisecond */
|
||||
tx2_reloc_overall = 2000; /* unit: millisecond */
|
||||
|
||||
////////// MCE parameters:
|
||||
target_mce_m2_ip_address = ( { ipv4 = "127.0.0.7";
|
||||
ipv6 = "192:168:30::17";
|
||||
active = "yes";
|
||||
preference = "ipv4";
|
||||
}
|
||||
);
|
||||
|
||||
///M2
|
||||
enable_enb_m2 = "yes";
|
||||
|
||||
|
||||
mbms_configuration_data_list = (
|
||||
{
|
||||
mbsfn_sync_area = 0x0001;
|
||||
mbms_service_area_list=(
|
||||
{
|
||||
mbms_service_area=0x0001;
|
||||
}
|
||||
);
|
||||
}
|
||||
|
||||
);
|
||||
|
||||
|
||||
|
||||
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
|
||||
|
||||
ENB_IPV4_ADDRESS_FOR_M2C = "127.0.0.2/24";
|
||||
ENB_PORT_FOR_M2C = 36443; # Spec 36443
|
||||
};
|
||||
}
|
||||
);
|
||||
|
||||
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";
|
||||
}
|
||||
);
|
||||
|
||||
MCEs = (
|
||||
{
|
||||
MCE_ID = 0xe00;
|
||||
|
||||
MCE_name = "MCE-Vicomtech-LTEBox";
|
||||
|
||||
//M2
|
||||
enable_mce_m2 = "yes";
|
||||
|
||||
//M3
|
||||
enable_mce_m3 = "yes";
|
||||
|
||||
target_mme_m3_ip_address = ( { ipv4 = "127.0.0.18";
|
||||
ipv6 = "192:168:30::17";
|
||||
active = "yes";
|
||||
preference = "ipv4";
|
||||
}
|
||||
);
|
||||
|
||||
|
||||
|
||||
NETWORK_INTERFACES :
|
||||
{
|
||||
MCE_INTERFACE_NAME_FOR_M2_ENB = "lo";
|
||||
MCE_IPV4_ADDRESS_FOR_M2C = "127.0.0.7/24";
|
||||
MCE_PORT_FOR_M2C = 36443; # Spec 36443
|
||||
|
||||
MCE_INTERFACE_NAME_FOR_M3_MME = "lo";
|
||||
MCE_IPV4_ADDRESS_FOR_M3C = "127.0.0.3/24";
|
||||
MCE_PORT_FOR_M3C = 36444; # Spec 36444
|
||||
};
|
||||
|
||||
plnm:
|
||||
{
|
||||
mcc = 208;
|
||||
mnc = 93;
|
||||
mnc_length = 2;
|
||||
};
|
||||
|
||||
mbms_sched_info :
|
||||
{
|
||||
mcch_update_time = 10;
|
||||
mbms_area_config_list = (
|
||||
{
|
||||
common_sf_allocation_period = 1; #rf4(0) rf8(1) rf16(2) rf32(3) rf64(4) rf128(5) rf256(6)
|
||||
mbms_area_id = 0;
|
||||
pmch_config_list = (
|
||||
{
|
||||
allocated_sf_end=512;
|
||||
data_mcs=15;
|
||||
mch_scheduling_period = 0; #rf8(0) rf16(1) rf32(2) rf64(3) rf128(4) rf256(5) rf512(6) rf1024(7)
|
||||
mbms_session_list = (
|
||||
{
|
||||
#plnm + service_id ->tmgi
|
||||
plnm:
|
||||
{
|
||||
mcc = 208;
|
||||
mnc = 93;
|
||||
mnc_length = 2;
|
||||
}
|
||||
service_id=0; #keep this allways as 0 (workaround for TUN if)
|
||||
lcid=5; #this must be properly defined lcid:6+service:0 -> rab_id:5 //with new RLC set lcid either 4 or 5
|
||||
}
|
||||
);
|
||||
}
|
||||
);
|
||||
|
||||
mbms_sf_config_list = (
|
||||
{
|
||||
radioframe_allocation_period=0; #n1(0) n2(1) n4(2) n8(3) n16(4) n32(5)
|
||||
radioframe_alloocation_offset=0;
|
||||
num_frame="oneFrame";
|
||||
subframe_allocation=57; #xx111001
|
||||
//num_frame="fourFrame";
|
||||
//subframe_allocation=14548987; #
|
||||
}
|
||||
);
|
||||
|
||||
}
|
||||
);
|
||||
};
|
||||
|
||||
|
||||
mcch_config_per_mbsfn_area = (
|
||||
{
|
||||
mbsfn_area = 0;
|
||||
pdcch_length = 1; #s1(0), s2(1)
|
||||
repetition_period = 0; #rf32(0), rf64(1), rf128(2), rf256(3)
|
||||
offset = 0;
|
||||
modification_period = 0; #rf512(0; rf1024(1)
|
||||
subframe_allocation_info = 32; #BITSTRING (6bits -> one frame) xx100000
|
||||
mcs = 0; #n2(0), n7(1), n13(2), n19(3)
|
||||
}
|
||||
);
|
||||
|
||||
#); #end mbms_scheduling_info
|
||||
|
||||
}
|
||||
);
|
||||
|
||||
MMEs = (
|
||||
{
|
||||
MME_ID = 0xe00;
|
||||
|
||||
MME_name = "MME-MBMS-Vicomtech-LTEBox";
|
||||
|
||||
//M3
|
||||
enable_mme_m3 = "yes";
|
||||
NETWORK_INTERFACES :
|
||||
{
|
||||
MME_INTERFACE_NAME_FOR_M3_MCE = "lo";
|
||||
MME_IPV4_ADDRESS_FOR_M3C = "127.0.0.18/24";
|
||||
MME_PORT_FOR_M3C = 36444; # Spec 36444
|
||||
|
||||
};
|
||||
}
|
||||
);
|
||||
|
||||
|
||||
RUs = (
|
||||
{
|
||||
local_rf = "yes"
|
||||
nb_tx = 1
|
||||
nb_rx = 1
|
||||
att_tx = 0
|
||||
att_rx = 0;
|
||||
bands = [7];
|
||||
max_pdschReferenceSignalPower = -27;
|
||||
max_rxgain = 125;
|
||||
eNB_instances = [0];
|
||||
|
||||
}
|
||||
);
|
||||
|
||||
THREAD_STRUCT = (
|
||||
{
|
||||
#three config for level of parallelism "PARALLEL_SINGLE_THREAD", "PARALLEL_RU_L1_SPLIT", or "PARALLEL_RU_L1_TRX_SPLIT"
|
||||
parallel_config = "PARALLEL_SINGLE_THREAD";
|
||||
#two option for worker "WORKER_DISABLE" or "WORKER_ENABLE"
|
||||
worker_config = "WORKER_ENABLE";
|
||||
}
|
||||
);
|
||||
|
||||
NETWORK_CONTROLLER :
|
||||
{
|
||||
FLEXRAN_ENABLED = "no";
|
||||
FLEXRAN_INTERFACE_NAME = "ens3";
|
||||
FLEXRAN_IPV4_ADDRESS = "CI_FLEXRAN_CTL_IP_ADDR";
|
||||
FLEXRAN_PORT = 2210;
|
||||
FLEXRAN_CACHE = "/mnt/oai_agent_cache";
|
||||
FLEXRAN_AWAIT_RECONF = "no";
|
||||
};
|
||||
|
||||
log_config :
|
||||
{
|
||||
global_log_level ="info";
|
||||
global_log_verbosity ="medium";
|
||||
hw_log_level ="info";
|
||||
hw_log_verbosity ="medium";
|
||||
phy_log_level ="info";
|
||||
phy_log_verbosity ="medium";
|
||||
mac_log_level ="info";
|
||||
mac_log_verbosity ="high";
|
||||
rlc_log_level ="info";
|
||||
rlc_log_verbosity ="medium";
|
||||
pdcp_log_level ="info";
|
||||
pdcp_log_verbosity ="medium";
|
||||
rrc_log_level ="info";
|
||||
rrc_log_verbosity ="medium";
|
||||
};
|
||||
|
||||
//rfsimulator :
|
||||
//{
|
||||
//options = ("chanmod");
|
||||
//modelname = "AWGN";
|
||||
//};
|
||||
|
||||
@@ -102,6 +102,7 @@ eNBs =
|
||||
ue_TimersAndConstants_n310 = 20;
|
||||
ue_TimersAndConstants_n311 = 1;
|
||||
ue_TransmissionMode = 1;
|
||||
mbms_dedicated_serving_cell = "DISABLE"
|
||||
|
||||
//Parameters for SIB18
|
||||
rxPool_sc_CP_Len = "normal";
|
||||
@@ -295,8 +296,8 @@ MCEs = (
|
||||
pmch_config_list = (
|
||||
{
|
||||
allocated_sf_end=32;
|
||||
data_mcs=14;
|
||||
mch_scheduling_period = 0; #rf8(0)
|
||||
data_mcs=15;
|
||||
mch_scheduling_period = 0; #rf8(0) rf16(1) rf32(2) rf64(3) rf128(4) rf256(5) rf512(6) rf1024(7)
|
||||
mbms_session_list = (
|
||||
{
|
||||
#plnm + service_id ->tmgi
|
||||
@@ -337,7 +338,7 @@ MCEs = (
|
||||
offset = 0;
|
||||
modification_period = 0; #rf512(0; rf1024(1)
|
||||
subframe_allocation_info = 32; #BITSTRING (6bits -> one frame) xx100000
|
||||
mcs = 1; #n2(0), n7(1), n13(2), n19(3)
|
||||
mcs = 0; #n2(0), n7(1), n13(2), n19(3)
|
||||
}
|
||||
);
|
||||
|
||||
@@ -416,3 +417,10 @@ NETWORK_CONTROLLER :
|
||||
rrc_log_level ="info";
|
||||
rrc_log_verbosity ="medium";
|
||||
};
|
||||
|
||||
//rfsimulator :
|
||||
//{
|
||||
//options = ("chanmod");
|
||||
//modelname = "AWGN";
|
||||
//};
|
||||
|
||||
|
||||
@@ -620,6 +620,101 @@ function report_test {
|
||||
#IPERF_TESTS=`ls $ARCHIVES_LOC/${TMODE}_${BW}MHz_${CN_CONFIG}_iperf_ul*client*txt | grep -v mbms 2> /dev/null`
|
||||
#analyzeIperfFiles
|
||||
done
|
||||
|
||||
# FeMBMS Case
|
||||
CN_CONFIG="noS1"
|
||||
TMODE="fdd"
|
||||
BW_CASES=(05)
|
||||
for BW in ${BW_CASES[@]}
|
||||
do
|
||||
echo " <tr bgcolor = \"#8FBC8F\" >" >> ./test_simulator_results.html
|
||||
echo " <td align = \"center\" colspan = 4 >Test FeMBMS without EPC (aka noS1): ${TMODE} -- ${BW}MHz </td>" >> ./test_simulator_results.html
|
||||
echo " </tr>" >> ./test_simulator_results.html
|
||||
ENB_LOG=$ARCHIVES_LOC/${TMODE}_${BW}MHz_${CN_CONFIG}_enb_fembms.log
|
||||
UE_LOG=`echo $ENB_LOG | sed -e "s#enb#ue#"`
|
||||
if [ -f $ENB_LOG ] && [ -f $UE_LOG ]
|
||||
then
|
||||
NAME_ENB=`echo $ENB_LOG | sed -e "s#$ARCHIVES_LOC/##"`
|
||||
NAME_UE=`echo $UE_LOG | sed -e "s#$ARCHIVES_LOC/##"`
|
||||
echo " <tr>" >> ./test_simulator_results.html
|
||||
echo " <td>$NAME_ENB --- $NAME_UE</td>" >> ./test_simulator_results.html
|
||||
echo " <td>N/A</td>" >> ./test_simulator_results.html
|
||||
#NB_ENB_GOT_SYNC=`egrep -c "got sync" $ENB_LOG`
|
||||
NB_ENB_TUNNEL_UP=`egrep -c "Interface oaitun_enb1 successfully configured" $ENB_LOG`
|
||||
NB_ENB_MTUNNEL_UP=`egrep -c "Interface oaitun_enm1 successfully configured" $ENB_LOG`
|
||||
#NB_UE_GOT_SYNC=`egrep -c "rfsimulator: Success" $UE_LOG`
|
||||
#NB_ENB_SYNCED_WITH_UE=`egrep -c "Generating RRCConnectionReconfigurationComplete" $UE_LOG`
|
||||
NB_UE_TUNNEL_UP=`egrep -c "Interface oaitun_ue1 successfully configured" $UE_LOG`
|
||||
NB_UE_MTUNNEL_UP=`egrep -c "Interface oaitun_uem1 successfully configured" $UE_LOG`
|
||||
NB_UE_MBMS_PUSH_MSG=`egrep -c "TRIED TO PUSH MBMS DATA TO" $UE_LOG`
|
||||
#if [ $NB_ENB_GOT_SYNC -gt 0 ] && [ $NB_UE_GOT_SYNC -gt 0 ] && [ $NB_ENB_SYNCED_WITH_UE -gt 0 ] && [ $NB_UE_MBMS_PUSH_MSG -gt 0 ]
|
||||
if [ $NB_UE_MBMS_PUSH_MSG -gt 0 ]
|
||||
then
|
||||
echo " <td bgcolor = \"green\" >OK</td>" >> ./test_simulator_results.html
|
||||
else
|
||||
echo " <td bgcolor = \"red\" >KO</td>" >> ./test_simulator_results.html
|
||||
fi
|
||||
echo " <td><pre>" >> ./test_simulator_results.html
|
||||
#if [ $NB_ENB_GOT_SYNC -gt 0 ]
|
||||
#then
|
||||
# echo "<font color = \"blue\">- eNB --> got sync</font>" >> ./test_simulator_results.html
|
||||
#else
|
||||
# echo "<font color = \"red\"><b>- eNB NEVER got sync</b></font>" >> ./test_simulator_results.html
|
||||
#fi
|
||||
if [ $NB_ENB_TUNNEL_UP -gt 0 ]
|
||||
then
|
||||
echo "<font color = \"blue\">- eNB mounted oaitun_enb1 interface</font>" >> ./test_simulator_results.html
|
||||
else
|
||||
echo "<font color = \"red\"><b>- eNB NEVER mounted oaitun_enb1 interface</b></font>" >> ./test_simulator_results.html
|
||||
fi
|
||||
if [ $NB_ENB_MTUNNEL_UP -gt 0 ]
|
||||
then
|
||||
echo "<font color = \"blue\">- eNB mounted oaitun_enm1 interface</font>" >> ./test_simulator_results.html
|
||||
else
|
||||
echo "<font color = \"red\"><b>- eNB NEVER mounted oaitun_enm1 interface</b></font>" >> ./test_simulator_results.html
|
||||
fi
|
||||
#if [ $NB_UE_GOT_SYNC -gt 0 ]
|
||||
#then
|
||||
# echo "<font color = \"blue\">- LTE UE --> got sync</font>" >> ./test_simulator_results.html
|
||||
#else
|
||||
# echo "<font color = \"red\"><b>- LTE UE NEVER got sync</b></font>" >> ./test_simulator_results.html
|
||||
#fi
|
||||
#if [ $NB_ENB_SYNCED_WITH_UE -gt 0 ]
|
||||
#then
|
||||
# echo "<font color = \"blue\">- LTE UE attached to eNB</font>" >> ./test_simulator_results.html
|
||||
#else
|
||||
# echo "<font color = \"red\"><b>- LTE UE NEVER attached to eNB</b></font>" >> ./test_simulator_results.html
|
||||
#fi
|
||||
if [ $NB_UE_TUNNEL_UP -gt 0 ]
|
||||
then
|
||||
echo "<font color = \"blue\">- LTE UE mounted oaitun_ue1 interface</font>" >> ./test_simulator_results.html
|
||||
else
|
||||
echo "<font color = \"red\"><b>- LTE UE NEVER mounted oaitun_ue1 interface</b></font>" >> ./test_simulator_results.html
|
||||
fi
|
||||
if [ $NB_UE_MTUNNEL_UP -gt 0 ]
|
||||
then
|
||||
echo "<font color = \"blue\">- LTE UE mounted oaitun_uem1 interface</font>" >> ./test_simulator_results.html
|
||||
else
|
||||
echo "<font color = \"red\"><b>- LTE UE NEVER mounted oaitun_uem1 interface</b></font>" >> ./test_simulator_results.html
|
||||
fi
|
||||
if [ $NB_UE_MBMS_PUSH_MSG -gt 0 ]
|
||||
then
|
||||
echo "<font color = \"blue\">- LTE UE tried to push ${NB_UE_MBMS_PUSH_MSG} MBMS DATA</font>" >> ./test_simulator_results.html
|
||||
else
|
||||
echo "<font color = \"red\"><b>- LTE UE NEVER pushed MBMS DATA</b></font>" >> ./test_simulator_results.html
|
||||
fi
|
||||
echo " </pre></td>" >> ./test_simulator_results.html
|
||||
echo " </tr>" >> ./test_simulator_results.html
|
||||
fi
|
||||
#PING_LOGS=`ls $ARCHIVES_LOC/${TMODE}_${BW}MHz_${CN_CONFIG}_ping*.log 2> /dev/null`
|
||||
#analyzePingFiles
|
||||
|
||||
#IPERF_TESTS=`ls $ARCHIVES_LOC/${TMODE}_${BW}MHz_${CN_CONFIG}_iperf_dl*client*txt | grep -v mbms 2> /dev/null`
|
||||
#analyzeIperfFiles
|
||||
|
||||
#IPERF_TESTS=`ls $ARCHIVES_LOC/${TMODE}_${BW}MHz_${CN_CONFIG}_iperf_ul*client*txt | grep -v mbms 2> /dev/null`
|
||||
#analyzeIperfFiles
|
||||
done
|
||||
echo " </table>" >> ./test_simulator_results.html
|
||||
echo " </div>" >> ./test_simulator_results.html
|
||||
|
||||
|
||||
@@ -2050,6 +2050,95 @@ function run_test_on_vm {
|
||||
echo "LTE RFSIM seems to FAIL"
|
||||
echo "LTE: TEST_KO" > $ARCHIVES_LOC/test_final_status.log
|
||||
fi
|
||||
|
||||
####################
|
||||
## FeMBMS CASE noS1 ##
|
||||
####################
|
||||
CONF_FILE=lte-fdd-fembms-basic-sim.conf
|
||||
CN_CONFIG="noS1"
|
||||
S1_NOS1_CFG=0
|
||||
LTEBOX=0
|
||||
TMODE="fdd"
|
||||
FREQUENCY=2680
|
||||
BW_CASES=(05)
|
||||
FeMBMS_STATUS=0
|
||||
|
||||
for BW in ${BW_CASES[@]}
|
||||
do
|
||||
if [[ $BW =~ .*05.* ]]; then PRB=25; fi
|
||||
if [[ $BW =~ .*10.* ]]; then PRB=50; fi
|
||||
if [[ $BW =~ .*20.* ]]; then PRB=100; fi
|
||||
|
||||
echo "############################################################"
|
||||
echo "${CN_CONFIG} : Starting the eNB with MSMS in ${TMODE}-${BW}MHz mode"
|
||||
echo "############################################################"
|
||||
CURRENT_ENB_LOG_FILE=${TMODE}_${BW}MHz_${CN_CONFIG}_enb_fembms.log
|
||||
start_rf_sim_enb $ENB_VM_CMDS "$ENB_VM_IP_ADDR" "$EPC_VM_IP_ADDR" $CURRENT_ENB_LOG_FILE $PRB $CONF_FILE $S1_NOS1_CFG
|
||||
|
||||
echo "############################################################"
|
||||
echo "${CN_CONFIG} : Starting the UE"
|
||||
echo "############################################################"
|
||||
CURRENT_UE_LOG_FILE=${TMODE}_${BW}MHz_${CN_CONFIG}_ue_fembms.log
|
||||
start_rf_sim_ue $UE_VM_CMDS $UE_VM_IP_ADDR $ENB_VM_IP_ADDR $CURRENT_UE_LOG_FILE $PRB $FREQUENCY $S1_NOS1_CFG 1
|
||||
if [ $UE_SYNC -eq 0 ]
|
||||
then
|
||||
echo "Problem w/ eNB and UE not syncing"
|
||||
terminate_enb_ue_basic_sim $ENB_VM_CMDS $ENB_VM_IP_ADDR 1
|
||||
terminate_enb_ue_basic_sim $UE_VM_CMDS $UE_VM_IP_ADDR 2
|
||||
scp -o StrictHostKeyChecking=no ubuntu@$ENB_VM_IP_ADDR:/home/ubuntu/tmp/cmake_targets/log/$CURRENT_ENB_LOG_FILE $ARCHIVES_LOC
|
||||
scp -o StrictHostKeyChecking=no ubuntu@$UE_VM_IP_ADDR:/home/ubuntu/tmp/cmake_targets/log/$CURRENT_UE_LOG_FILE $ARCHIVES_LOC
|
||||
STATUS=-1
|
||||
break
|
||||
fi
|
||||
|
||||
echo "############################################################"
|
||||
echo "${CN_CONFIG} : iperf DL -- UE is server and eNB is client"
|
||||
echo "############################################################"
|
||||
get_enb_mbms_noS1_ip_addr $ENB_VM_CMDS $ENB_VM_IP_ADDR
|
||||
IPERF_LOG_FILE=${TMODE}_${BW}MHz_${CN_CONFIG}_iperf_dl_fembms
|
||||
get_ue_mbms_ip_addr $UE_VM_CMDS $UE_VM_IP_ADDR 1
|
||||
THROUGHPUT=2
|
||||
generic_iperf $UE_VM_CMDS $UE_VM_IP_ADDR $UE_IP_ADDR $ENB_VM_CMDS $ENB_VM_IP_ADDR $ENB_IP_ADDR $THROUGHPUT $IPERF_LOG_FILE 1 0
|
||||
scp -o StrictHostKeyChecking=no ubuntu@$UE_VM_IP_ADDR:/home/ubuntu/${IPERF_LOG_FILE}_server.txt $ARCHIVES_LOC
|
||||
scp -o StrictHostKeyChecking=no ubuntu@$ENB_VM_IP_ADDR:/home/ubuntu/${IPERF_LOG_FILE}_client.txt $ARCHIVES_LOC
|
||||
#check_iperf $ARCHIVES_LOC/$IPERF_LOG_FILE $THROUGHPUT
|
||||
|
||||
echo "############################################################"
|
||||
echo "${CN_CONFIG} : Terminate enb/ue simulators"
|
||||
echo "############################################################"
|
||||
terminate_enb_ue_basic_sim $ENB_VM_CMDS $ENB_VM_IP_ADDR 1
|
||||
terminate_enb_ue_basic_sim $UE_VM_CMDS $UE_VM_IP_ADDR 2
|
||||
scp -o StrictHostKeyChecking=no ubuntu@$ENB_VM_IP_ADDR:/home/ubuntu/tmp/cmake_targets/log/$CURRENT_ENB_LOG_FILE $ARCHIVES_LOC
|
||||
scp -o StrictHostKeyChecking=no ubuntu@$UE_VM_IP_ADDR:/home/ubuntu/tmp/cmake_targets/log/$CURRENT_UE_LOG_FILE $ARCHIVES_LOC
|
||||
NB_UE_FeMBMS_MESSAGES=`egrep -c "TRIED TO PUSH MBMS DATA TO" $ARCHIVES_LOC/$CURRENT_UE_LOG_FILE`
|
||||
if [ $NB_UE_FeMBMS_MESSAGES -eq 0 ]; then FeMBMS_STATUS=-1; fi
|
||||
|
||||
done
|
||||
|
||||
full_l2_sim_destroy
|
||||
|
||||
echo "############################################################"
|
||||
echo "Checking run status"
|
||||
echo "############################################################"
|
||||
|
||||
if [ $PING_STATUS -ne 0 ]; then STATUS=-1; fi
|
||||
if [ $IPERF_STATUS -ne 0 ]; then STATUS=-1; fi
|
||||
if [ $FeMBMS_STATUS -eq 0 ]
|
||||
then
|
||||
echo "LTE FeMBMS RFSIM seems OK"
|
||||
else
|
||||
echo "LTE FeMBMS RFSIM seems to FAIL"
|
||||
STATUS=-1
|
||||
fi
|
||||
if [ $STATUS -eq 0 ]
|
||||
then
|
||||
echo "LTE RFSIM seems OK"
|
||||
echo "LTE: TEST_OK" > $ARCHIVES_LOC/test_final_status.log
|
||||
else
|
||||
echo "LTE RFSIM seems to FAIL"
|
||||
echo "LTE: TEST_KO" > $ARCHIVES_LOC/test_final_status.log
|
||||
fi
|
||||
|
||||
fi
|
||||
|
||||
if [[ "$RUN_OPTIONS" == "complex" ]] && [[ $VM_NAME =~ .*-rf-sim.* ]]
|
||||
|
||||
@@ -0,0 +1,82 @@
|
||||
<!--
|
||||
|
||||
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
|
||||
|
||||
-->
|
||||
<testCaseList>
|
||||
<htmlTabRef>test-05-tm1-mbms-nos1-tunnel</htmlTabRef>
|
||||
<htmlTabName>Test-05MHz-MBMS-TM1-noS1-tunnel</htmlTabName>
|
||||
<htmlTabIcon>tasks</htmlTabIcon>
|
||||
<repeatCount>2</repeatCount>
|
||||
<TestCaseRequestedList>
|
||||
030201 090109
|
||||
030103 000001 090103 000002 040605 000001 090109 030201
|
||||
</TestCaseRequestedList>
|
||||
<TestCaseExclusionList></TestCaseExclusionList>
|
||||
|
||||
<testCase id="000001">
|
||||
<class>IdleSleep</class>
|
||||
<desc>Sleep</desc>
|
||||
<idle_sleep_time_in_sec>10</idle_sleep_time_in_sec>
|
||||
</testCase>
|
||||
|
||||
<testCase id="000002">
|
||||
<class>IdleSleep</class>
|
||||
<desc>Sleep</desc>
|
||||
<idle_sleep_time_in_sec>15</idle_sleep_time_in_sec>
|
||||
</testCase>
|
||||
|
||||
<testCase id="000003">
|
||||
<class>IdleSleep</class>
|
||||
<desc>Sleep</desc>
|
||||
<idle_sleep_time_in_sec>60</idle_sleep_time_in_sec>
|
||||
</testCase>
|
||||
|
||||
<testCase id="030103">
|
||||
<class>Initialize_eNB</class>
|
||||
<desc>Initialize eNB (FDD/Band7/5MHz/MBMS)</desc>
|
||||
<Initialize_eNB_args>-O ci-scripts/conf_files/enb.band17.tm1.mbms.25PRB.usrpb210.conf --noS1 --eNBs.[0].rrc_inactivity_threshold 0 --nokrnmod 1 --eNBs.[0].component_carriers.[0].eutra_band 7 --eNBs.[0].component_carriers.[0].downlink_frequency 2680000000 --eNBs.[0].component_carriers.[0].uplink_frequency_offset -120000000 --eNBs.[0].component_carriers.[0].mbms_dedicated_serving_cell ENABLE --MCEs.[0].mbms_sched_info.mbms_area_config_list.[0].pmch_config_list.[0].allocated_sf_end 512</Initialize_eNB_args>
|
||||
</testCase>
|
||||
|
||||
<testCase id="030201">
|
||||
<class>Terminate_eNB</class>
|
||||
<desc>Terminate eNB</desc>
|
||||
</testCase>
|
||||
|
||||
<testCase id="090103">
|
||||
<class>Initialize_OAI_UE</class>
|
||||
<desc>Initialize OAI UE (FDD/Band7/5MHz/MBMS)</desc>
|
||||
<Initialize_OAI_UE_args>-C 2680000000 -r 25 --ue-rxgain 120 --ue-txgain 0 --ue-max-power 0 --ue-scan-carrier --nokrnmod 1 --noS1</Initialize_OAI_UE_args>
|
||||
</testCase>
|
||||
|
||||
<testCase id="090109">
|
||||
<class>Terminate_OAI_UE</class>
|
||||
<desc>Terminate OAI UE</desc>
|
||||
</testCase>
|
||||
|
||||
<testCase id="040605">
|
||||
<class>Iperf</class>
|
||||
<desc>iperf (5MHz - DL/1.5Mbps/UDP/MBMS-sink)(20 sec)</desc>
|
||||
<iperf_args>-c 10.0.2.2 -u -b 1.5M -t 20 -i 1 -fm -B 10.0.2.1</iperf_args>
|
||||
<iperf_packetloss_threshold>50</iperf_packetloss_threshold>
|
||||
<iperf_options>sink</iperf_options>
|
||||
</testCase>
|
||||
|
||||
</testCaseList>
|
||||
@@ -280,7 +280,7 @@ int init_rf(RU_t *ru);
|
||||
void rx_rf(RU_t *ru, L1_rxtx_proc_t *proc);
|
||||
void tx_rf(RU_t *ru, L1_rxtx_proc_t *proc);
|
||||
void common_signal_procedures (PHY_VARS_eNB *eNB,int frame, int subframe);
|
||||
void pmch_procedures(PHY_VARS_eNB *eNB,L1_rxtx_proc_t *proc);
|
||||
void pmch_procedures(PHY_VARS_eNB *eNB,L1_rxtx_proc_t *proc, int fembms_flag);
|
||||
bool dlsch_procedures(PHY_VARS_eNB *eNB,
|
||||
L1_rxtx_proc_t *proc,
|
||||
int harq_pid,
|
||||
|
||||
@@ -275,6 +275,7 @@ void phy_config_request(PHY_Config_t *phy_config) {
|
||||
fp->soundingrs_ul_config_common.srs_MaxUpPts = cfg->srs_config.max_up_pts.value;
|
||||
fp->num_MBSFN_config = 0;
|
||||
fp->NonMBSFN_config_flag =cfg->fembms_config.non_mbsfn_config_flag.value;
|
||||
fp->FeMBMS_active = fp->NonMBSFN_config_flag;
|
||||
fp->NonMBSFN_config.non_mbsfn_SubframeConfig = cfg->fembms_config.non_mbsfn_subframeconfig.value;
|
||||
fp->NonMBSFN_config.radioframeAllocationPeriod = cfg->fembms_config.radioframe_allocation_period.value;
|
||||
fp->NonMBSFN_config.radioframeAllocationOffset = cfg->fembms_config.radioframe_allocation_offset.value;
|
||||
|
||||
@@ -137,7 +137,7 @@ void phy_config_sib2_ue(module_id_t Mod_id,int CC_id,
|
||||
if (mbsfn_SubframeConfigList->list.array[i]->subframeAllocation.present == LTE_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] LTE_MBSFN_SubframeConfig[%d] pattern is %d\n", i,
|
||||
LOG_I(PHY, "[CONFIG] LTE_MBSFN_SubframeConfig[%d] oneFrame pattern is %d\n", i,
|
||||
fp->MBSFN_config[i].mbsfn_SubframeConfig);
|
||||
} else if (mbsfn_SubframeConfigList->list.array[i]->subframeAllocation.present == LTE_MBSFN_SubframeConfig__subframeAllocation_PR_fourFrames) { // 24-bit subframe configuration
|
||||
fp->MBSFN_config[i].fourFrames_flag = 1;
|
||||
@@ -145,7 +145,7 @@ void phy_config_sib2_ue(module_id_t Mod_id,int CC_id,
|
||||
mbsfn_SubframeConfigList->list.array[i]->subframeAllocation.choice.oneFrame.buf[2]|
|
||||
(mbsfn_SubframeConfigList->list.array[i]->subframeAllocation.choice.oneFrame.buf[1]<<8)|
|
||||
(mbsfn_SubframeConfigList->list.array[i]->subframeAllocation.choice.oneFrame.buf[0]<<16);
|
||||
LOG_I(PHY, "[CONFIG] LTE_MBSFN_SubframeConfig[%d] pattern is %x\n", i,
|
||||
LOG_I(PHY, "[CONFIG] LTE_MBSFN_SubframeConfig[%d] fourFrame pattern is %x\n", i,
|
||||
fp->MBSFN_config[i].mbsfn_SubframeConfig);
|
||||
}
|
||||
}
|
||||
@@ -212,7 +212,7 @@ void phy_config_sib1_fembms_ue(module_id_t Mod_id,int CC_id,
|
||||
LTE_DL_FRAME_PARMS *fp = &ue->frame_parms;
|
||||
|
||||
if (nonMBSFN_SubframeConfig != NULL) {
|
||||
fp->NonMBSFN_config_flag = 0;
|
||||
fp->NonMBSFN_config_flag = 1;
|
||||
fp->NonMBSFN_config.radioframeAllocationPeriod=nonMBSFN_SubframeConfig->radioFrameAllocationPeriod_r14;
|
||||
fp->NonMBSFN_config.radioframeAllocationOffset=nonMBSFN_SubframeConfig->radioFrameAllocationOffset_r14;
|
||||
fp->NonMBSFN_config.non_mbsfn_SubframeConfig=(nonMBSFN_SubframeConfig->subframeAllocation_r14.buf[0]<<1 | nonMBSFN_SubframeConfig->subframeAllocation_r14.buf[0]>>7);
|
||||
|
||||
@@ -93,6 +93,11 @@ int init_frame_parms(LTE_DL_FRAME_PARMS *frame_parms,
|
||||
|
||||
frame_parms->N_RBGS = 4;
|
||||
frame_parms->N_RBG = 25;
|
||||
frame_parms->ofdm_symbol_size_khz_1dot25 = 2*2*6144*osf;
|
||||
frame_parms->first_carrier_offset_khz_1dot25 = frame_parms->ofdm_symbol_size_khz_1dot25 - 1800*2*2;
|
||||
frame_parms->nb_prefix_samples_khz_1dot25>>=(2-log2_osf);
|
||||
frame_parms->nb_prefix_samples0_khz_1dot25>>=(2-log2_osf);
|
||||
|
||||
break;
|
||||
|
||||
case 75:
|
||||
@@ -104,6 +109,12 @@ int init_frame_parms(LTE_DL_FRAME_PARMS *frame_parms,
|
||||
frame_parms->nb_prefix_samples0=(frame_parms->nb_prefix_samples0*3)>>2;
|
||||
frame_parms->N_RBGS = 4;
|
||||
frame_parms->N_RBG = 25;
|
||||
|
||||
frame_parms->ofdm_symbol_size_khz_1dot25 = 2*6144*osf;
|
||||
frame_parms->first_carrier_offset_khz_1dot25 = frame_parms->ofdm_symbol_size_khz_1dot25 - 1800*2;
|
||||
frame_parms->nb_prefix_samples_khz_1dot25>>=(2-log2_osf);
|
||||
frame_parms->nb_prefix_samples0_khz_1dot25>>=(2-log2_osf);
|
||||
|
||||
break;
|
||||
|
||||
case 50:
|
||||
@@ -115,6 +126,10 @@ int init_frame_parms(LTE_DL_FRAME_PARMS *frame_parms,
|
||||
frame_parms->nb_prefix_samples0>>=(1-log2_osf);
|
||||
frame_parms->N_RBGS = 3;
|
||||
frame_parms->N_RBG = 17;
|
||||
frame_parms->ofdm_symbol_size_khz_1dot25 = 2*6144*osf;
|
||||
frame_parms->first_carrier_offset_khz_1dot25 = frame_parms->ofdm_symbol_size_khz_1dot25 - 1800*2;
|
||||
frame_parms->nb_prefix_samples_khz_1dot25>>=(2-log2_osf);
|
||||
frame_parms->nb_prefix_samples0_khz_1dot25>>=(2-log2_osf);
|
||||
break;
|
||||
|
||||
case 25:
|
||||
|
||||
@@ -22,7 +22,7 @@
|
||||
/*! \file config_ue.c
|
||||
* \brief This includes FeMBMS UE Channel Estimation Procedures for FeMBMS 1.25KHz Carrier Spacing
|
||||
* \author Javier Morgade
|
||||
* \date 2019
|
||||
* \date 2020
|
||||
* \version 0.1
|
||||
* \email: javier.morgade@ieee.org
|
||||
* @ingroup _phy
|
||||
@@ -768,8 +768,8 @@ int lte_dl_mbsfn_khz_1dot25_channel_estimation(PHY_VARS_UE *ue,
|
||||
module_id_t eNB_id,
|
||||
uint8_t eNB_offset,
|
||||
int subframe) {
|
||||
int pilot_khz_1dot25[600] __attribute__((aligned(16)));
|
||||
unsigned char aarx/*,aa*/;
|
||||
int pilot_khz_1dot25[2*2*600] __attribute__((aligned(16)));
|
||||
unsigned char aarx,aa;
|
||||
//unsigned int rb;
|
||||
int16_t ch[2];
|
||||
short *pil,*rxF,*dl_ch/*,*ch0,*ch1,*ch11,*chp,*ch_prev*/;
|
||||
@@ -783,7 +783,7 @@ int lte_dl_mbsfn_khz_1dot25_channel_estimation(PHY_VARS_UE *ue,
|
||||
int **rxdataF=ue->common_vars.common_vars_rx_data_per_thread[ue->current_thread_id[subframe]].rxdataF;
|
||||
ch_offset = 0;//(l*(ue->frame_parms.ofdm_symbol_size));
|
||||
symbol_offset = 0;//ch_offset;//phy_vars_ue->lte_frame_parms.ofdm_symbol_size*l;
|
||||
AssertFatal( ue->frame_parms.N_RB_DL==25,"OFDM symbol size %d not yet supported for FeMBMS\n",ue->frame_parms.N_RB_DL);
|
||||
//AssertFatal( ue->frame_parms.N_RB_DL==25,"OFDM symbol size %d not yet supported for FeMBMS\n",ue->frame_parms.N_RB_DL);
|
||||
|
||||
if( (subframe&0x1) == 0) {
|
||||
f=filt24_0_khz_1dot25;
|
||||
@@ -823,7 +823,7 @@ int lte_dl_mbsfn_khz_1dot25_channel_estimation(PHY_VARS_UE *ue,
|
||||
k=3;
|
||||
}
|
||||
|
||||
if(ue->frame_parms.N_RB_DL==25) {
|
||||
if(1/*ue->frame_parms.N_RB_DL==25*/) {
|
||||
ch[0] = (int16_t)(((int32_t)pil[0]*rxF[0] - (int32_t)pil[1]*rxF[1])>>15);
|
||||
ch[1] = (int16_t)(((int32_t)pil[0]*rxF[1] + (int32_t)pil[1]*rxF[0])>>15);
|
||||
multadd_real_vector_complex_scalar(fl,
|
||||
@@ -843,7 +843,7 @@ int lte_dl_mbsfn_khz_1dot25_channel_estimation(PHY_VARS_UE *ue,
|
||||
rxF+=12;
|
||||
dl_ch+=16;
|
||||
|
||||
for(pilot_cnt=2; pilot_cnt<299; pilot_cnt+=2) {
|
||||
for(pilot_cnt=2; pilot_cnt<ue->frame_parms.N_RB_DL*12-1/*299*/; pilot_cnt+=2) {
|
||||
ch[0] = (int16_t)(((int32_t)pil[0]*rxF[0] - (int32_t)pil[1]*rxF[1])>>15);
|
||||
ch[1] = (int16_t)(((int32_t)pil[0]*rxF[1] + (int32_t)pil[1]*rxF[0])>>15);
|
||||
multadd_real_vector_complex_scalar(f,
|
||||
@@ -866,7 +866,7 @@ int lte_dl_mbsfn_khz_1dot25_channel_estimation(PHY_VARS_UE *ue,
|
||||
|
||||
rxF = (int16_t *)&rxdataF[aarx][((symbol_offset+1+k))]; //Skip DC offset
|
||||
|
||||
for(pilot_cnt=0; pilot_cnt<297; pilot_cnt+=2) {
|
||||
for(pilot_cnt=0; pilot_cnt<ue->frame_parms.N_RB_DL*12-3/*297*/; pilot_cnt+=2) {
|
||||
ch[0] = (int16_t)(((int32_t)pil[0]*rxF[0] - (int32_t)pil[1]*rxF[1])>>15);
|
||||
ch[1] = (int16_t)(((int32_t)pil[0]*rxF[1] + (int32_t)pil[1]*rxF[0])>>15);
|
||||
multadd_real_vector_complex_scalar(f,
|
||||
@@ -905,6 +905,32 @@ int lte_dl_mbsfn_khz_1dot25_channel_estimation(PHY_VARS_UE *ue,
|
||||
}
|
||||
}
|
||||
|
||||
// do ifft of channel estimate
|
||||
for (aa=0; aa<ue->frame_parms.nb_antennas_rx*ue->frame_parms.nb_antennas_tx; aa++) {
|
||||
if (ue->common_vars.common_vars_rx_data_per_thread[ue->current_thread_id[subframe]].dl_ch_estimates[0][aa]) {
|
||||
switch (ue->frame_parms.N_RB_DL) {
|
||||
case 25:
|
||||
idft(IDFT_6144,(int16_t*) &ue->common_vars.common_vars_rx_data_per_thread[ue->current_thread_id[subframe]].dl_ch_estimates[0][aa][8],
|
||||
(int16_t*) ue->common_vars.common_vars_rx_data_per_thread[ue->current_thread_id[subframe]].dl_ch_estimates_time[0][aa],
|
||||
1);
|
||||
break;
|
||||
case 50:
|
||||
idft(IDFT_12288,(int16_t*) &ue->common_vars.common_vars_rx_data_per_thread[ue->current_thread_id[subframe]].dl_ch_estimates[0][aa][8],
|
||||
(int16_t*) ue->common_vars.common_vars_rx_data_per_thread[ue->current_thread_id[subframe]].dl_ch_estimates_time[0][aa],
|
||||
1);
|
||||
break;
|
||||
case 100:
|
||||
idft(IDFT_24576,(int16_t*) &ue->common_vars.common_vars_rx_data_per_thread[ue->current_thread_id[subframe]].dl_ch_estimates[0][aa][8],
|
||||
(int16_t*) ue->common_vars.common_vars_rx_data_per_thread[ue->current_thread_id[subframe]].dl_ch_estimates_time[0][aa],
|
||||
1);
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
return(0);
|
||||
}
|
||||
|
||||
|
||||
@@ -106,6 +106,16 @@ int lte_dl_mbsfn(PHY_VARS_eNB *phy_vars_eNB, int32_t *output,
|
||||
short amp,
|
||||
int subframe,
|
||||
unsigned char l);
|
||||
/*! \brief This function generates the 1.25KHz MBSFN reference signal sequence (36-211, Sec 6.10.1.2)
|
||||
@param phy_vars_eNB Pointer to eNB variables
|
||||
@param output Output vector for OFDM symbol (Frequency Domain)
|
||||
@param amp Q15 amplitude
|
||||
*/
|
||||
|
||||
int lte_dl_mbsfn_khz_1dot25(PHY_VARS_eNB *phy_vars_eNB, int32_t *output,
|
||||
short amp,
|
||||
int subframe);
|
||||
|
||||
|
||||
|
||||
/*!\brief This function generates the cell-specific reference signal sequence (36-211, Sec 6.10.1.1) for channel estimation upon reception
|
||||
|
||||
@@ -20,12 +20,12 @@
|
||||
*/
|
||||
|
||||
/*! \file PHY/LTE_TRANSPORT/dlsch_coding.c
|
||||
* \brief Top-level routines for implementing Turbo-coded (DLSCH) transport channels from 36-212, V8.6 2009-03
|
||||
* \author R. Knopp
|
||||
* \brief Top-level routines for implementing Turbo-coded (DLSCH) transport channels from 36-212, V8.6 2009-03, V14.1 2017 (includes FeMBMS support)
|
||||
* \author R. Knopp, J. Morgade
|
||||
* \date 2011
|
||||
* \version 0.1
|
||||
* \company Eurecom
|
||||
* \email: knopp@eurecom.fr
|
||||
* \email: knopp@eurecom.fr, jaiver.morgade@ieee.org
|
||||
* \note
|
||||
* \warning
|
||||
*/
|
||||
@@ -425,3 +425,108 @@ int dlsch_encoding(PHY_VARS_eNB *eNB,
|
||||
VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME(VCD_SIGNAL_DUMPER_FUNCTIONS_ENB_DLSCH_ENCODING, VCD_FUNCTION_OUT);
|
||||
return(0);
|
||||
}
|
||||
|
||||
int dlsch_encoding_fembms_pmch(PHY_VARS_eNB *eNB,
|
||||
L1_rxtx_proc_t *proc,
|
||||
unsigned char *a,
|
||||
uint8_t num_pdcch_symbols,
|
||||
LTE_eNB_DLSCH_t *dlsch,
|
||||
int frame,
|
||||
uint8_t subframe,
|
||||
time_stats_t *rm_stats,
|
||||
time_stats_t *te_stats,
|
||||
time_stats_t *i_stats) {
|
||||
LTE_DL_FRAME_PARMS *frame_parms = &eNB->frame_parms;
|
||||
unsigned char harq_pid = dlsch->harq_ids[frame%2][subframe];
|
||||
if((harq_pid < 0) || (harq_pid >= dlsch->Mdlharq)) {
|
||||
LOG_E(PHY,"dlsch_encoding illegal harq_pid %d %s:%d\n", harq_pid, __FILE__, __LINE__);
|
||||
return(-1);
|
||||
}
|
||||
|
||||
LTE_DL_eNB_HARQ_t *hadlsch=dlsch->harq_processes[harq_pid];
|
||||
uint8_t beamforming_mode=0;
|
||||
VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME(VCD_SIGNAL_DUMPER_FUNCTIONS_ENB_DLSCH_ENCODING, VCD_FUNCTION_IN);
|
||||
|
||||
if(hadlsch->mimo_mode == TM7)
|
||||
beamforming_mode = 7;
|
||||
else if(hadlsch->mimo_mode == TM8)
|
||||
beamforming_mode = 8;
|
||||
else if(hadlsch->mimo_mode == TM9_10)
|
||||
beamforming_mode = 9;
|
||||
|
||||
unsigned int G = get_G_khz_1dot25(frame_parms,hadlsch->nb_rb,
|
||||
hadlsch->rb_alloc,
|
||||
hadlsch->Qm, // mod order
|
||||
hadlsch->Nl,
|
||||
num_pdcch_symbols,
|
||||
frame,subframe,beamforming_mode);
|
||||
|
||||
proc->nbEncode=0;
|
||||
|
||||
// if (hadlsch->Ndi == 1) { // this is a new packet
|
||||
if (hadlsch->round == 0) { // this is a new packet
|
||||
// Add 24-bit crc (polynomial A) to payload
|
||||
unsigned int A=hadlsch->TBS; //6228;
|
||||
unsigned int crc = crc24a(a,
|
||||
A)>>8;
|
||||
a[A>>3] = ((uint8_t *)&crc)[2];
|
||||
a[1+(A>>3)] = ((uint8_t *)&crc)[1];
|
||||
a[2+(A>>3)] = ((uint8_t *)&crc)[0];
|
||||
// printf("CRC %x (A %d)\n",crc,A);
|
||||
hadlsch->B = A+24;
|
||||
// hadlsch->b = a;
|
||||
memcpy(hadlsch->b,a,(A/8)+4);
|
||||
|
||||
if (lte_segmentation(hadlsch->b,
|
||||
hadlsch->c,
|
||||
hadlsch->B,
|
||||
&hadlsch->C,
|
||||
&hadlsch->Cplus,
|
||||
&hadlsch->Cminus,
|
||||
&hadlsch->Kplus,
|
||||
&hadlsch->Kminus,
|
||||
&hadlsch->F)<0)
|
||||
return(-1);
|
||||
}
|
||||
|
||||
for (int r=0, r_offset=0; r<hadlsch->C; r++) {
|
||||
|
||||
union turboReqUnion id= {.s={dlsch->rnti,frame,subframe,r,0}};
|
||||
notifiedFIFO_elt_t *req=newNotifiedFIFO_elt(sizeof(turboEncode_t), id.p, proc->respEncode, TPencode);
|
||||
turboEncode_t * rdata=(turboEncode_t *) NotifiedFifoData(req);
|
||||
rdata->input=hadlsch->c[r];
|
||||
rdata->Kr_bytes= ( r<hadlsch->Cminus ? hadlsch->Kminus : hadlsch->Kplus) >>3;
|
||||
rdata->filler=(r==0) ? hadlsch->F : 0;
|
||||
rdata->r=r;
|
||||
rdata->harq_pid=harq_pid;
|
||||
rdata->dlsch=dlsch;
|
||||
rdata->rm_stats=rm_stats;
|
||||
rdata->te_stats=te_stats;
|
||||
rdata->i_stats=i_stats;
|
||||
rdata->round=hadlsch->round;
|
||||
rdata->r_offset=r_offset;
|
||||
rdata->G=G;
|
||||
|
||||
if ( proc->threadPool->activated ) {
|
||||
pushTpool(proc->threadPool,req);
|
||||
proc->nbEncode++;
|
||||
} else {
|
||||
TPencode(rdata);
|
||||
delNotifiedFIFO_elt(req);
|
||||
}
|
||||
|
||||
int Qm=hadlsch->Qm;
|
||||
int C=hadlsch->C;
|
||||
int Nl=hadlsch->Nl;
|
||||
int Gp = G/Nl/Qm;
|
||||
int GpmodC = Gp%C;
|
||||
if (r < (C-(GpmodC)))
|
||||
r_offset += Nl*Qm * (Gp/C);
|
||||
else
|
||||
r_offset += Nl*Qm * ((GpmodC==0?0:1) + (Gp/C));
|
||||
}
|
||||
|
||||
return(0);
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -20,12 +20,12 @@
|
||||
*/
|
||||
|
||||
/*! \file PHY/LTE_TRANSPORT/dlsch_modulation.c
|
||||
* \brief Top-level routines for generating the PDSCH physical channel from 36-211, V8.6 2009-03
|
||||
* \author R. Knopp, F. Kaltenberger
|
||||
* \brief Top-level routines for generating the PDSCH physical channel from 36-211, V8.6 2009-03, V14.1 2017 (FeMBMS)
|
||||
* \author R. Knopp, F. Kaltenberger, J. Morgade
|
||||
* \date 2011
|
||||
* \version 0.1
|
||||
* \company Eurecom
|
||||
* \email: knopp@eurecom.fr,florian.kaltenberger@eurecom.fr
|
||||
* \email: knopp@eurecom.fr,florian.kaltenberger@eurecom.fr, javier.morgade@ieee.irg
|
||||
* \note
|
||||
* \warning
|
||||
*/
|
||||
@@ -2910,3 +2910,260 @@ int mch_modulation(int32_t **txdataF,
|
||||
|
||||
return (re_allocated);
|
||||
}
|
||||
|
||||
int allocate_REs_in_RB_MCH_khz_1dot25(int32_t **txdataF,
|
||||
uint32_t *jj,
|
||||
uint16_t re_offset,
|
||||
uint32_t symbol_offset,
|
||||
uint8_t *x0,
|
||||
uint8_t subframe,
|
||||
uint8_t mod_order,
|
||||
int16_t amp,
|
||||
int16_t *qam_table_s,
|
||||
uint32_t *re_allocated,
|
||||
uint8_t skip_dc,
|
||||
LTE_DL_FRAME_PARMS *frame_parms)
|
||||
{
|
||||
uint32_t tti_offset;
|
||||
uint8_t re,offset;
|
||||
uint8_t qam64_table_offset_re = 0;
|
||||
uint8_t qam64_table_offset_im = 0;
|
||||
uint8_t qam16_table_offset_re = 0;
|
||||
uint8_t qam16_table_offset_im = 0;
|
||||
int16_t gain_lin_QPSK;//,gain_lin_16QAM1,gain_lin_16QAM2;
|
||||
int16_t re_off=re_offset;
|
||||
gain_lin_QPSK = (int16_t)((amp*ONE_OVER_SQRT2_Q15)>>15);
|
||||
uint8_t first_re,last_re;
|
||||
int inc;
|
||||
#ifdef DEBUG_DLSCH_MODULATION
|
||||
LOG_I(PHY,"allocate_re_MCH khz_1dot25 (mod %d): symbol_offset %d re_offset %d (%d), jj %d -> %d,%d, gain_lin_QPSK %d,txdataF %p\n",mod_order,symbol_offset,re_offset,skip_dc,*jj, x0[*jj], x0[1+*jj],gain_lin_QPSK,&txdataF[0][symbol_offset]);
|
||||
#endif
|
||||
|
||||
/*last_re=12;
|
||||
first_re=0;
|
||||
inc=1;
|
||||
|
||||
if ((l==2)||(l==10)) {
|
||||
inc=2;
|
||||
first_re=1;
|
||||
} else if (l==6) {
|
||||
inc=2;
|
||||
}*/
|
||||
last_re=144; //12*12
|
||||
if ((subframe&0x1)==0){ // n_sf mod 2 == 0: even
|
||||
first_re=1;
|
||||
offset=0;
|
||||
}else{
|
||||
first_re=0;
|
||||
offset=3;
|
||||
}
|
||||
inc=1;
|
||||
|
||||
for (re=first_re; re<last_re; re+=inc) {
|
||||
if( ((re-offset)%6) == 0 )
|
||||
continue; //pilot
|
||||
//if ((subframe&0x1)==0) // n_sf mod 2 == 0: even
|
||||
//k = 6*m;
|
||||
//else
|
||||
//k = 6*m + 3;
|
||||
//if ((skip_dc == 1) && (re==(6+first_re)))
|
||||
if ((skip_dc == 1) && (re==(72+first_re))){
|
||||
re_off=re_off - frame_parms->ofdm_symbol_size_khz_1dot25+1;
|
||||
}
|
||||
|
||||
tti_offset = symbol_offset + re_off + re;
|
||||
|
||||
//LOG_I(PHY,"re %d (jj %d)\n",re,*jj);
|
||||
*re_allocated = *re_allocated + 1;
|
||||
|
||||
|
||||
switch (mod_order) {
|
||||
|
||||
case 2: //QPSK
|
||||
|
||||
LOG_D(PHY,"%d : %d,%d => ",tti_offset,((int16_t*)&txdataF[0][tti_offset])[0],((int16_t*)&txdataF[0][tti_offset])[1]);
|
||||
((int16_t*)&txdataF[0][tti_offset])[0] = (x0[*jj]==1) ? (-gain_lin_QPSK) : gain_lin_QPSK; //I //b_i
|
||||
|
||||
*jj = *jj + 1;
|
||||
|
||||
((int16_t*)&txdataF[0][tti_offset])[1] = (x0[*jj]==1) ? (-gain_lin_QPSK) : gain_lin_QPSK; //Q //b_{i+1}
|
||||
|
||||
*jj = *jj + 1;
|
||||
|
||||
LOG_D(PHY,"subframe%d alloc[%d][%d][%d](%d,%d)\n",subframe,tti_offset,symbol_offset,tti_offset-symbol_offset,((int16_t*)&txdataF[0][tti_offset])[0],((int16_t*)&txdataF[0][tti_offset])[1]);
|
||||
break;
|
||||
|
||||
|
||||
case 4: //16QAM
|
||||
|
||||
qam16_table_offset_re = 0;
|
||||
qam16_table_offset_im = 0;
|
||||
|
||||
if (x0[*jj] == 1)
|
||||
qam16_table_offset_re+=2;
|
||||
|
||||
*jj=*jj+1;
|
||||
|
||||
if (x0[*jj] == 1)
|
||||
qam16_table_offset_im+=2;
|
||||
|
||||
*jj=*jj+1;
|
||||
|
||||
|
||||
if (x0[*jj] == 1)
|
||||
qam16_table_offset_re+=1;
|
||||
|
||||
*jj=*jj+1;
|
||||
|
||||
if (x0[*jj] == 1)
|
||||
qam16_table_offset_im+=1;
|
||||
|
||||
*jj=*jj+1;
|
||||
|
||||
|
||||
((int16_t *)&txdataF[0][tti_offset])[0]=qam_table_s[qam16_table_offset_re];//(int16_t)(((int32_t)amp*qam16_table[qam16_table_offset_re])>>15);
|
||||
((int16_t *)&txdataF[0][tti_offset])[1]=qam_table_s[qam16_table_offset_im];//(int16_t)(((int32_t)amp*qam16_table[qam16_table_offset_im])>>15);
|
||||
|
||||
break;
|
||||
|
||||
case 6: //64QAM
|
||||
|
||||
qam64_table_offset_re = 0;
|
||||
qam64_table_offset_im = 0;
|
||||
|
||||
if (x0[*jj] == 1)
|
||||
qam64_table_offset_re+=4;
|
||||
|
||||
*jj=*jj+1;
|
||||
|
||||
if (x0[*jj] == 1)
|
||||
qam64_table_offset_im+=4;
|
||||
|
||||
*jj=*jj+1;
|
||||
|
||||
if (x0[*jj] == 1)
|
||||
qam64_table_offset_re+=2;
|
||||
|
||||
*jj=*jj+1;
|
||||
|
||||
if (x0[*jj] == 1)
|
||||
qam64_table_offset_im+=2;
|
||||
|
||||
*jj=*jj+1;
|
||||
|
||||
if (x0[*jj] == 1)
|
||||
qam64_table_offset_re+=1;
|
||||
|
||||
*jj=*jj+1;
|
||||
|
||||
if (x0[*jj] == 1)
|
||||
qam64_table_offset_im+=1;
|
||||
|
||||
*jj=*jj+1;
|
||||
|
||||
((int16_t *)&txdataF[0][tti_offset])[0]=qam_table_s[qam64_table_offset_re];//(int16_t)(((int32_t)amp*qam64_table[qam64_table_offset_re])>>15);
|
||||
((int16_t *)&txdataF[0][tti_offset])[1]=qam_table_s[qam64_table_offset_im];//(int16_t)(((int32_t)amp*qam64_table[qam64_table_offset_im])>>15);
|
||||
|
||||
break;
|
||||
|
||||
}
|
||||
}
|
||||
return(0);
|
||||
}
|
||||
|
||||
int mch_modulation_khz_1dot25(int32_t **txdataF,
|
||||
int16_t amp,
|
||||
uint32_t subframe_offset,
|
||||
LTE_DL_FRAME_PARMS *frame_parms,
|
||||
LTE_eNB_DLSCH_t *dlsch)
|
||||
{
|
||||
uint8_t nsymb,nsymb_pmch;
|
||||
uint32_t i,jj,re_allocated,symbol_offset;
|
||||
uint16_t l,rb,re_offset;
|
||||
uint8_t skip_dc=0;
|
||||
uint8_t mod_order = dlsch->harq_processes[0]->Qm;
|
||||
int16_t qam16_table_a[4],qam64_table_a[8];//,qam16_table_b[4],qam64_table_b[8];
|
||||
int16_t *qam_table_s;
|
||||
|
||||
nsymb_pmch = 1;
|
||||
nsymb = (frame_parms->Ncp == NORMAL) ? 14 : 12;
|
||||
|
||||
if (mod_order == 4)
|
||||
for (i=0; i<4; i++) {
|
||||
qam16_table_a[i] = (int16_t)(((int32_t)qam16_table[i]*amp)>>15);
|
||||
}
|
||||
else if (mod_order == 6)
|
||||
for (i=0; i<8; i++) {
|
||||
qam64_table_a[i] = (int16_t)(((int32_t)qam64_table[i]*amp)>>15);
|
||||
}
|
||||
|
||||
jj=0;
|
||||
re_allocated=0;
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
// LOG_I(PHY,"num_pdcch_symbols %d, nsymb %d\n",num_pdcch_symbols,nsymb);
|
||||
for (l=0; l<nsymb_pmch; l++) {
|
||||
|
||||
#ifdef DEBUG_DLSCH_MODULATION
|
||||
LOG_I(PHY,"Generating khz_1dot25 MCH (mod %d) in subframe %d for symbol %d\n",mod_order, subframe_offset,l);
|
||||
#endif
|
||||
|
||||
re_offset = frame_parms->first_carrier_offset_khz_1dot25;
|
||||
symbol_offset = (uint32_t)frame_parms->ofdm_symbol_size*(l+(subframe_offset*nsymb));
|
||||
|
||||
for (rb=0; rb<frame_parms->N_RB_DL; rb++) {
|
||||
|
||||
|
||||
if ((frame_parms->N_RB_DL&1) == 1) { // ODD N_RB_DL
|
||||
|
||||
if (rb==(frame_parms->N_RB_DL>>1))
|
||||
skip_dc = 1;
|
||||
else
|
||||
skip_dc = 0;
|
||||
|
||||
}
|
||||
|
||||
if (mod_order == 4)
|
||||
qam_table_s = qam16_table_a;
|
||||
else if (mod_order == 6)
|
||||
qam_table_s = qam64_table_a;
|
||||
else
|
||||
qam_table_s = NULL;
|
||||
|
||||
//LOG_I(PHY,"Allocated rb %d, subframe_offset %d,amp %d\n",rb,subframe_offset,amp);
|
||||
allocate_REs_in_RB_MCH_khz_1dot25(txdataF,
|
||||
&jj,
|
||||
re_offset,
|
||||
symbol_offset,
|
||||
dlsch->harq_processes[0]->eDL,
|
||||
subframe_offset,
|
||||
mod_order,
|
||||
amp,
|
||||
qam_table_s,
|
||||
&re_allocated,
|
||||
skip_dc,
|
||||
frame_parms);
|
||||
|
||||
re_offset+=144; // go to next RB 12*12
|
||||
|
||||
// check if we crossed the symbol boundary and skip DC
|
||||
if (re_offset >= frame_parms->ofdm_symbol_size_khz_1dot25) {
|
||||
if (skip_dc == 0) //even number of RBs (doesn't straddle DC)
|
||||
re_offset=1;
|
||||
else
|
||||
re_offset=73; // odd number of RBs
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
#ifdef DEBUG_DLSCH_MODULATION
|
||||
LOG_I(PHY,"generate_dlsch(MCH) : jj = %d,re_allocated = %d (G %d)\n",jj,re_allocated,get_G(frame_parms,dlsch->harq_processes[0]->nb_rb,dlsch->harq_processes[0]->rb_alloc,mod_order,1,2,0,subframe_offset,1/*transmission mode*/));
|
||||
LOG_I(PHY,"generate_dlsch(MCH) : jj = %d,re_allocated = %d\n",jj,re_allocated);
|
||||
#endif
|
||||
|
||||
return (re_allocated);
|
||||
}
|
||||
|
||||
|
||||
@@ -20,12 +20,12 @@
|
||||
*/
|
||||
|
||||
/*! \file PHY/LTE_TRANSPORT/pbch.c
|
||||
* \brief Top-level routines for generating and decoding the PBCH/BCH physical/transport channel V8.6 2009-03
|
||||
* \author R. Knopp, F. Kaltenberger
|
||||
* \brief Top-level routines for generating and decoding the PBCH/BCH physical/transport channel V8.6 2009-03, V14.1 (FeMBMS)
|
||||
* \author R. Knopp, F. Kaltenberger, J. Morgade
|
||||
* \date 2011
|
||||
* \version 0.1
|
||||
* \company Eurecom
|
||||
* \email: knopp@eurecom.fr,florian.kaltenberger.fr
|
||||
* \email: knopp@eurecom.fr,florian.kaltenberger.fr, javier.morgade@ieee.org
|
||||
* \note
|
||||
* \warning
|
||||
*/
|
||||
@@ -139,6 +139,285 @@ int allocate_pbch_REs_in_RB(LTE_DL_FRAME_PARMS *frame_parms,
|
||||
return(0);
|
||||
}
|
||||
|
||||
void pbch_scrambling_fembms(LTE_DL_FRAME_PARMS *frame_parms,
|
||||
uint8_t *pbch_e,
|
||||
uint32_t length)
|
||||
{
|
||||
int i;
|
||||
uint8_t reset;
|
||||
uint32_t x1, x2, s=0;
|
||||
|
||||
reset = 1;
|
||||
// x1 is set in lte_gold_generic
|
||||
x2 = frame_parms->Nid_cell + (1<<9); //this is c_init for FeMBMS in 36.211 Sec 6.6.1
|
||||
// msg("pbch_scrambling: Nid_cell = %d\n",x2);
|
||||
|
||||
for (i=0; i<length; i++) {
|
||||
if ((i&0x1f)==0) {
|
||||
s = lte_gold_generic(&x1, &x2, reset);
|
||||
// printf("lte_gold[%d]=%x\n",i,s);
|
||||
reset = 0;
|
||||
}
|
||||
|
||||
pbch_e[i] = (pbch_e[i]&1) ^ ((s>>(i&0x1f))&1);
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
int generate_pbch_fembms(LTE_eNB_PBCH *eNB_pbch,
|
||||
int32_t **txdataF,
|
||||
int amp,
|
||||
LTE_DL_FRAME_PARMS *frame_parms,
|
||||
uint8_t *pbch_pdu,
|
||||
uint8_t frame_mod4)
|
||||
{
|
||||
|
||||
int i, l;
|
||||
|
||||
uint32_t pbch_D,pbch_E;//,pbch_coded_bytes;
|
||||
uint8_t pbch_a[PBCH_A>>3];
|
||||
uint8_t RCC;
|
||||
|
||||
uint32_t nsymb = (frame_parms->Ncp==NORMAL) ? 14:12;
|
||||
uint32_t pilots;
|
||||
#ifdef INTERFERENCE_MITIGATION
|
||||
uint32_t pilots_2;
|
||||
#endif
|
||||
uint32_t second_pilot = (frame_parms->Ncp==NORMAL) ? 4 : 3;
|
||||
uint32_t jj=0;
|
||||
uint32_t re_allocated=0;
|
||||
uint32_t rb, re_offset, symbol_offset;
|
||||
uint16_t amask=0;
|
||||
|
||||
pbch_D = 16+PBCH_A;
|
||||
|
||||
pbch_E = (frame_parms->Ncp==NORMAL) ? 1920 : 1728; //RE/RB * #RB * bits/RB (QPSK)
|
||||
// pbch_E_bytes = pbch_coded_bits>>3;
|
||||
|
||||
LOG_D(PHY,"%s(eNB_pbch:%p txdataF:%p amp:%d frame_parms:%p pbch_pdu:%p frame_mod4:%d)\n", __FUNCTION__, eNB_pbch, txdataF, amp, frame_parms, pbch_pdu, frame_mod4==0);
|
||||
|
||||
if (frame_mod4==0) {
|
||||
bzero(pbch_a,PBCH_A>>3);
|
||||
bzero(eNB_pbch->pbch_e,pbch_E);
|
||||
memset(eNB_pbch->pbch_d,LTE_NULL,96);
|
||||
// Encode data
|
||||
|
||||
// CRC attachment
|
||||
// crc = (uint16_t) (crc16(pbch_pdu, pbch_crc_bits-16) >> 16);
|
||||
|
||||
/*
|
||||
// scramble crc with PBCH CRC mask (Table 5.3.1.1-1 of 3GPP 36.212-860)
|
||||
switch (frame_parms->nb_antenna_ports_eNB) {
|
||||
case 1:
|
||||
crc = crc ^ (uint16_t) 0;
|
||||
break;
|
||||
case 2:
|
||||
crc = crc ^ (uint16_t) 0xFFFF;
|
||||
break;
|
||||
case 4:
|
||||
crc = crc ^ (uint16_t) 0xAAAA;
|
||||
break;
|
||||
default:
|
||||
msg("[PBCH] Unknown number of TX antennas!\n");
|
||||
break;
|
||||
}
|
||||
*/
|
||||
|
||||
// Fix byte endian of PBCH (bit 23 goes in first)
|
||||
for (i=0; i<(PBCH_A>>3); i++)
|
||||
pbch_a[(PBCH_A>>3)-i-1] = pbch_pdu[i];
|
||||
|
||||
// pbch_data[i] = ((char*) &crc)[0];
|
||||
// pbch_data[i+1] = ((char*) &crc)[1];
|
||||
//#ifdef DEBUG_PBCH
|
||||
|
||||
for (i=0; i<(PBCH_A>>3); i++)
|
||||
LOG_D(PHY,"[PBCH] pbch_data[%d] = %x\n",i,pbch_a[i]);
|
||||
|
||||
//#endif
|
||||
|
||||
if (frame_parms->nb_antenna_ports_eNB == 1)
|
||||
amask = 0x0000;
|
||||
else {
|
||||
switch (frame_parms->nb_antenna_ports_eNB) {
|
||||
case 1:
|
||||
amask = 0x0000;
|
||||
break;
|
||||
|
||||
case 2:
|
||||
amask = 0xffff;
|
||||
break;
|
||||
|
||||
case 4:
|
||||
amask = 0x5555;
|
||||
}
|
||||
}
|
||||
|
||||
ccodelte_encode(PBCH_A,2,pbch_a,eNB_pbch->pbch_d+96,amask);
|
||||
|
||||
|
||||
#ifdef DEBUG_PBCH_ENCODING
|
||||
|
||||
for (i=0; i<16+PBCH_A; i++)
|
||||
LOG_D(PHY,"%d : (%d,%d,%d)\n",i,*(eNB_pbch->pbch_d+96+(3*i)),*(eNB_pbch->pbch_d+97+(3*i)),*(eNB_pbch->pbch_d+98+(3*i)));
|
||||
|
||||
#endif //DEBUG_PBCH_ENCODING
|
||||
|
||||
// Bit collection
|
||||
/*
|
||||
j2=0;
|
||||
for (j=0;j<pbch_crc_bits*3+12;j++) {
|
||||
if ((pbch_coded_data[j]&0x80) > 0) { // bit is to be transmitted
|
||||
pbch_coded_data2[j2++] = pbch_coded_data[j]&1;
|
||||
//Bit is repeated
|
||||
if ((pbch_coded_data[j]&0x40)>0)
|
||||
pbch_coded_data2[j2++] = pbch_coded_data[j]&1;
|
||||
}
|
||||
}
|
||||
|
||||
#ifdef DEBUG_PBCH
|
||||
msg("[PBCH] rate matched bits=%d, pbch_coded_bits=%d, pbch_crc_bits=%d\n",j2,pbch_coded_bits,pbch_crc_bits);
|
||||
#endif
|
||||
|
||||
#ifdef DEBUG_PBCH
|
||||
LOG_M"pbch_encoded_output2.m","pbch_encoded_out2",
|
||||
pbch_coded_data2,
|
||||
pbch_coded_bits,
|
||||
1,
|
||||
4);
|
||||
#endif //DEBUG_PBCH
|
||||
*/
|
||||
#ifdef DEBUG_PBCH_ENCODING
|
||||
LOG_D(PHY,"Doing PBCH interleaving for %d coded bits, e %p\n",pbch_D,eNB_pbch->pbch_e);
|
||||
#endif
|
||||
RCC = sub_block_interleaving_cc(pbch_D,eNB_pbch->pbch_d+96,eNB_pbch->pbch_w);
|
||||
|
||||
lte_rate_matching_cc(RCC,pbch_E,eNB_pbch->pbch_w,eNB_pbch->pbch_e);
|
||||
|
||||
#ifdef DEBUG_PBCH_ENCODING
|
||||
LOG_D(PHY,"PBCH_e:\n");
|
||||
|
||||
for (i=0; i<pbch_E; i++)
|
||||
LOG_D(PHY,"%d %d\n",i,*(eNB_pbch->pbch_e+i));
|
||||
|
||||
LOG_D(PHY,"\n");
|
||||
#endif
|
||||
|
||||
|
||||
|
||||
#ifdef DEBUG_PBCH
|
||||
if (frame_mod4==0) {
|
||||
LOG_M("pbch_e.m","pbch_e",
|
||||
eNB_pbch->pbch_e,
|
||||
pbch_E,
|
||||
1,
|
||||
4);
|
||||
|
||||
for (i=0; i<16; i++)
|
||||
printf("e[%d] %d\n",i,eNB_pbch->pbch_e[i]);
|
||||
}
|
||||
#endif //DEBUG_PBCH
|
||||
// scrambling
|
||||
|
||||
pbch_scrambling_fembms(frame_parms,
|
||||
eNB_pbch->pbch_e,
|
||||
pbch_E);
|
||||
#ifdef DEBUG_PBCH
|
||||
if (frame_mod4==0) {
|
||||
LOG_M("pbch_e_s.m","pbch_e_s",
|
||||
eNB_pbch->pbch_e,
|
||||
pbch_E,
|
||||
1,
|
||||
4);
|
||||
|
||||
for (i=0; i<16; i++)
|
||||
printf("e_s[%d] %d\n",i,eNB_pbch->pbch_e[i]);
|
||||
}
|
||||
#endif //DEBUG_PBCH
|
||||
} // frame_mod4==0
|
||||
|
||||
// modulation and mapping (slot 1, symbols 0..3)
|
||||
for (l=(nsymb>>1); l<(nsymb>>1)+4; l++) {
|
||||
|
||||
pilots=0;
|
||||
#ifdef INTERFERENCE_MITIGATION
|
||||
pilots_2 = 0;
|
||||
#endif
|
||||
|
||||
if ((l==0) || (l==(nsymb>>1))) {
|
||||
pilots=1;
|
||||
#ifdef INTERFERENCE_MITIGATION
|
||||
pilots_2=1;
|
||||
#endif
|
||||
}
|
||||
|
||||
if ((l==1) || (l==(nsymb>>1)+1)) {
|
||||
pilots=1;
|
||||
}
|
||||
|
||||
if ((l==second_pilot)||(l==(second_pilot+(nsymb>>1)))) {
|
||||
pilots=1;
|
||||
}
|
||||
|
||||
#ifdef DEBUG_PBCH
|
||||
LOG_D(PHY,"[PBCH] l=%d, pilots=%d\n",l,pilots);
|
||||
#endif
|
||||
|
||||
|
||||
re_offset = frame_parms->ofdm_symbol_size-3*12;
|
||||
symbol_offset = frame_parms->ofdm_symbol_size*l;
|
||||
|
||||
for (rb=0; rb<6; rb++) {
|
||||
|
||||
#ifdef DEBUG_PBCH
|
||||
LOG_D(PHY,"RB %d, jj %d, re_offset %d, symbol_offset %d, pilots %d, nushift %d\n",rb,jj,re_offset, symbol_offset, pilots,frame_parms->nushift);
|
||||
#endif
|
||||
allocate_pbch_REs_in_RB(frame_parms,
|
||||
txdataF,
|
||||
&jj,
|
||||
re_offset,
|
||||
symbol_offset,
|
||||
&eNB_pbch->pbch_e[frame_mod4*(pbch_E>>2)],
|
||||
pilots,
|
||||
#ifdef INTERFERENCE_MITIGATION
|
||||
(pilots_2==1)?(amp/3):amp,
|
||||
#else
|
||||
amp,
|
||||
#endif
|
||||
&re_allocated);
|
||||
|
||||
re_offset+=12; // go to next RB
|
||||
|
||||
// check if we crossed the symbol boundary and skip DC
|
||||
|
||||
if (re_offset >= frame_parms->ofdm_symbol_size)
|
||||
re_offset=1;
|
||||
}
|
||||
|
||||
// }
|
||||
}
|
||||
|
||||
#ifdef DEBUG_PBCH
|
||||
printf("[PBCH] txdataF=\n");
|
||||
|
||||
for (i=0; i<frame_parms->ofdm_symbol_size; i++) {
|
||||
printf("%d=>(%d,%d)",i,((short*)&txdataF[0][frame_parms->ofdm_symbol_size*(nsymb>>1)+i])[0],
|
||||
((short*)&txdataF[0][frame_parms->ofdm_symbol_size*(nsymb>>1)+i])[1]);
|
||||
|
||||
if (frame_parms->nb_antenna_ports_eNB!=1) {
|
||||
printf("(%d,%d)\n",((short*)&txdataF[1][frame_parms->ofdm_symbol_size*(nsymb>>1)+i])[0],
|
||||
((short*)&txdataF[1][frame_parms->ofdm_symbol_size*(nsymb>>1)+i])[1]);
|
||||
} else {
|
||||
printf("\n");
|
||||
}
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
|
||||
return(0);
|
||||
}
|
||||
|
||||
void pbch_scrambling(LTE_DL_FRAME_PARMS *frame_parms,
|
||||
uint8_t *pbch_e,
|
||||
uint32_t length)
|
||||
|
||||
@@ -20,12 +20,12 @@
|
||||
*/
|
||||
|
||||
/*! \file PHY/LTE_TRANSPORT/pilots_mbsfn.c
|
||||
* \brief Top-level routines for generating DL mbsfn reference signals
|
||||
* \authors S. Paranche, R. Knopp
|
||||
* \brief Top-level routines for generating DL mbsfn reference signals / DL mbsfn reference signals for FeMBMS
|
||||
* \authors S. Paranche, R. Knopp, J. Morgade
|
||||
* \date 2012
|
||||
* \version 0.1
|
||||
* \company Eurecom
|
||||
* \email: knopp@eurecom.fr
|
||||
* \email: knopp@eurecom.fr, javier.morgade@ieee.org
|
||||
* \note
|
||||
* \warning
|
||||
*/
|
||||
@@ -85,3 +85,31 @@ int generate_mbsfn_pilot(PHY_VARS_eNB *eNB,
|
||||
}
|
||||
|
||||
|
||||
int generate_mbsfn_pilot_khz_1dot25(PHY_VARS_eNB *eNB,
|
||||
L1_rxtx_proc_t *proc,
|
||||
int32_t **txdataF,
|
||||
int16_t amp)
|
||||
|
||||
{
|
||||
|
||||
LTE_DL_FRAME_PARMS *frame_parms = &eNB->frame_parms;
|
||||
uint32_t subframe_offset,Nsymb;
|
||||
int subframe = proc->subframe_tx;
|
||||
|
||||
|
||||
if (subframe<0 || subframe>= 10) {
|
||||
LOG_E(PHY,"generate_mbsfn_pilots_subframe: subframe not in range (%d)\n",subframe);
|
||||
return(-1);
|
||||
}
|
||||
|
||||
Nsymb = (frame_parms->Ncp==NORMAL) ? 7 : 6;
|
||||
|
||||
subframe_offset = subframe*frame_parms->ofdm_symbol_size*Nsymb<<1;
|
||||
|
||||
lte_dl_mbsfn_khz_1dot25(eNB,
|
||||
&txdataF[0][subframe_offset+0],
|
||||
amp,subframe);
|
||||
|
||||
return(0);
|
||||
}
|
||||
|
||||
|
||||
@@ -128,3 +128,53 @@ void generate_mch(PHY_VARS_eNB *eNB,L1_rxtx_proc_t *proc,uint8_t *a)
|
||||
|
||||
}
|
||||
|
||||
void generate_mch_khz_1dot25(PHY_VARS_eNB *eNB,L1_rxtx_proc_t *proc,uint8_t *a)
|
||||
{
|
||||
|
||||
int G;
|
||||
int subframe = proc->subframe_tx;
|
||||
int frame = proc->frame_tx;
|
||||
//int bits;
|
||||
|
||||
G = get_G_khz_1dot25(&eNB->frame_parms,
|
||||
eNB->frame_parms.N_RB_DL,
|
||||
eNB->dlsch_MCH->harq_processes[0]->rb_alloc,
|
||||
get_Qm(eNB->dlsch_MCH->harq_processes[0]->mcs),1,
|
||||
2,proc->frame_tx,subframe,0);
|
||||
|
||||
//FeMBMS
|
||||
eNB->dlsch_MCH->harq_processes[0]->Qm = get_Qm(eNB->dlsch_MCH->harq_processes[0]->mcs);
|
||||
|
||||
|
||||
generate_mbsfn_pilot_khz_1dot25(eNB,proc,
|
||||
eNB->common_vars.txdataF,
|
||||
AMP);
|
||||
|
||||
|
||||
AssertFatal(dlsch_encoding_fembms_pmch(eNB,
|
||||
proc,
|
||||
// a,
|
||||
eNB->dlsch_MCH->harq_processes[0]->pdu,
|
||||
1,
|
||||
eNB->dlsch_MCH,
|
||||
proc->frame_tx,
|
||||
subframe,
|
||||
&eNB->dlsch_rate_matching_stats,
|
||||
&eNB->dlsch_turbo_encoding_stats,
|
||||
&eNB->dlsch_interleaving_stats)==0,
|
||||
"problem in dlsch_encoding");
|
||||
|
||||
|
||||
/*for(bits=0;bits<G;bits++)
|
||||
printf("%d",eNB->dlsch_MCH->harq_processes[0]->e[bits]);
|
||||
printf("\n");*/
|
||||
|
||||
dlsch_scrambling(&eNB->frame_parms,1,eNB->dlsch_MCH,0,G,0,frame,subframe<<1);
|
||||
|
||||
mch_modulation_khz_1dot25(eNB->common_vars.txdataF,
|
||||
AMP,
|
||||
subframe,
|
||||
&eNB->frame_parms,
|
||||
eNB->dlsch_MCH);
|
||||
}
|
||||
|
||||
|
||||
@@ -37,23 +37,84 @@
|
||||
|
||||
|
||||
int is_fembms_cas_subframe(uint32_t frame, int subframe, LTE_DL_FRAME_PARMS *frame_parms) {
|
||||
uint32_t period;
|
||||
//uint32_t period;
|
||||
|
||||
if(frame_parms->NonMBSFN_config_flag ) {
|
||||
period = 4<<frame_parms->NonMBSFN_config.radioframeAllocationPeriod;
|
||||
//if(frame_parms->NonMBSFN_config_flag ) {
|
||||
// period = 4<<frame_parms->NonMBSFN_config.radioframeAllocationPeriod;
|
||||
|
||||
if ((frame % period) == frame_parms->NonMBSFN_config.radioframeAllocationOffset) {
|
||||
// if ((frame % period) == frame_parms->NonMBSFN_config.radioframeAllocationOffset) {
|
||||
// switch (subframe) {
|
||||
// case 0:
|
||||
// return(1); //This should be CAS
|
||||
// break;
|
||||
// }
|
||||
// }
|
||||
//}
|
||||
if(frame_parms->NonMBSFN_config_flag || frame_parms->FeMBMS_active){
|
||||
if ((frame&3)==0) {
|
||||
switch (subframe) {
|
||||
case 0:
|
||||
return(1); //This should be CAS
|
||||
break;
|
||||
return(1); //This should be CAS
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
return (0);
|
||||
}
|
||||
|
||||
int is_fembms_nonMBSFN_subframe(uint32_t frame, int subframe, LTE_DL_FRAME_PARMS *frame_parms){
|
||||
uint32_t period;
|
||||
if(frame_parms->NonMBSFN_config_flag ) {
|
||||
period = 4<<frame_parms->NonMBSFN_config.radioframeAllocationPeriod;
|
||||
if ((frame % period) == frame_parms->NonMBSFN_config.radioframeAllocationOffset) {
|
||||
switch (subframe) {
|
||||
case 0:
|
||||
return(1); //This should be CAS
|
||||
break;
|
||||
case 1:
|
||||
if ((frame_parms->NonMBSFN_config.non_mbsfn_SubframeConfig & 0x100) > 0)
|
||||
return(1);
|
||||
break;
|
||||
case 2:
|
||||
if ((frame_parms->NonMBSFN_config.non_mbsfn_SubframeConfig & 0x80) > 0)
|
||||
return(1);
|
||||
break;
|
||||
case 3:
|
||||
if ((frame_parms->NonMBSFN_config.non_mbsfn_SubframeConfig & 0x40) > 0)
|
||||
return(1);
|
||||
break;
|
||||
case 4:
|
||||
if ((frame_parms->NonMBSFN_config.non_mbsfn_SubframeConfig & 0x20) > 0)
|
||||
return(1);
|
||||
break;
|
||||
case 5:
|
||||
if ((frame_parms->NonMBSFN_config.non_mbsfn_SubframeConfig & 0x10) > 0)
|
||||
return(1);
|
||||
break;
|
||||
case 6:
|
||||
if ((frame_parms->NonMBSFN_config.non_mbsfn_SubframeConfig & 0x8) > 0)
|
||||
return(1);
|
||||
break;
|
||||
case 7:
|
||||
if ((frame_parms->NonMBSFN_config.non_mbsfn_SubframeConfig & 0x4) > 0)
|
||||
return(1);
|
||||
break;
|
||||
case 8:
|
||||
if ((frame_parms->NonMBSFN_config.non_mbsfn_SubframeConfig & 0x2) > 0)
|
||||
return(1);
|
||||
break;
|
||||
case 9:
|
||||
if ((frame_parms->NonMBSFN_config.non_mbsfn_SubframeConfig & 0x1) > 0)
|
||||
return(1);
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
return (0);
|
||||
}
|
||||
|
||||
int is_fembms_pmch_subframe(uint32_t frame, int subframe, LTE_DL_FRAME_PARMS *frame_parms) {
|
||||
uint32_t period;
|
||||
|
||||
@@ -62,63 +123,67 @@ int is_fembms_pmch_subframe(uint32_t frame, int subframe, LTE_DL_FRAME_PARMS *fr
|
||||
|
||||
if ((frame % period) == frame_parms->NonMBSFN_config.radioframeAllocationOffset) {
|
||||
switch (subframe) {
|
||||
case 0:
|
||||
return(0);
|
||||
break;
|
||||
case 1:
|
||||
if ((frame_parms->NonMBSFN_config.non_mbsfn_SubframeConfig & 0x100) > 0)
|
||||
return(1);
|
||||
return(0);
|
||||
|
||||
break;
|
||||
|
||||
case 2:
|
||||
if ((frame_parms->NonMBSFN_config.non_mbsfn_SubframeConfig & 0x80) > 0)
|
||||
return(1);
|
||||
return(0);
|
||||
|
||||
break;
|
||||
|
||||
case 3:
|
||||
if ((frame_parms->NonMBSFN_config.non_mbsfn_SubframeConfig & 0x40) > 0)
|
||||
return(1);
|
||||
return(0);
|
||||
|
||||
break;
|
||||
|
||||
case 4:
|
||||
if ((frame_parms->NonMBSFN_config.non_mbsfn_SubframeConfig & 0x20) > 0)
|
||||
return(1);
|
||||
return(0);
|
||||
|
||||
break;
|
||||
|
||||
case 5:
|
||||
if ((frame_parms->NonMBSFN_config.non_mbsfn_SubframeConfig & 0x10) > 0)
|
||||
return(1);
|
||||
return(0);
|
||||
|
||||
break;
|
||||
|
||||
case 6:
|
||||
if ((frame_parms->NonMBSFN_config.non_mbsfn_SubframeConfig & 0x8) > 0)
|
||||
return(1);
|
||||
return(0);
|
||||
|
||||
break;
|
||||
|
||||
case 7:
|
||||
if ((frame_parms->NonMBSFN_config.non_mbsfn_SubframeConfig & 0x4) > 0)
|
||||
return(1);
|
||||
return(0);
|
||||
|
||||
break;
|
||||
|
||||
case 8:
|
||||
if ((frame_parms->NonMBSFN_config.non_mbsfn_SubframeConfig & 0x2) > 0)
|
||||
return(1);
|
||||
return(0);
|
||||
|
||||
break;
|
||||
|
||||
case 9:
|
||||
if ((frame_parms->NonMBSFN_config.non_mbsfn_SubframeConfig & 0x1) > 0)
|
||||
return(1);
|
||||
return(0);
|
||||
|
||||
break;
|
||||
}
|
||||
} else { //Then regular MBSFN FeMBMS subframe
|
||||
} else if((frame_parms->FeMBMS_active == 1 || frame_parms->NonMBSFN_config_flag == 1 ) && !is_fembms_cas_subframe(frame,subframe,frame_parms) ) { //Then regular MBSFN FeMBMS subframe
|
||||
return(1);
|
||||
}
|
||||
return(1);
|
||||
}
|
||||
|
||||
return(0);
|
||||
|
||||
@@ -67,6 +67,7 @@
|
||||
|
||||
#if !defined(SI_RNTI)
|
||||
#define SI_RNTI (rnti_t)0xffff
|
||||
#define SI_RNTI_MBMS (rnti_t)0xfff9
|
||||
#endif
|
||||
#if !defined(M_RNTI)
|
||||
#define M_RNTI (rnti_t)0xfffd
|
||||
|
||||
@@ -270,6 +270,9 @@ int is_pmch_subframe(frame_t frame, int subframe, LTE_DL_FRAME_PARMS *frame_parm
|
||||
*/
|
||||
int is_fembms_cas_subframe(frame_t frame, int subframe, LTE_DL_FRAME_PARMS *frame_parms);
|
||||
|
||||
int is_fembms_nonMBSFN_subframe (frame_t frame, int subframe, LTE_DL_FRAME_PARMS *frame_parms);
|
||||
|
||||
|
||||
/*!
|
||||
\brief Return the status of MBSFN in this frame/subframe
|
||||
@param frame Frame index
|
||||
|
||||
@@ -123,6 +123,42 @@ int32_t dlsch_encoding(PHY_VARS_eNB *eNB,
|
||||
time_stats_t *te_stats,
|
||||
time_stats_t *i_stats);
|
||||
|
||||
/** \fn dlsch_encoding(PHY_VARS_eNB *eNB,
|
||||
uint8_t *input_buffer,
|
||||
LTE_DL_FRAME_PARMS *frame_parms,
|
||||
uint8_t num_pdcch_symbols,
|
||||
LTE_eNB_DLSCH_t *dlsch,
|
||||
int frame,
|
||||
uint8_t subframe)
|
||||
\brief This function performs a subset of the bit-coding functions for LTE as described in 36-212, Release 8.Support is limited to turbo-coded channels (DLSCH/ULSCH). The implemented functions are:
|
||||
- CRC computation and addition
|
||||
- Code block segmentation and sub-block CRC addition
|
||||
- Channel coding (Turbo coding)
|
||||
- Rate matching (sub-block interleaving, bit collection, selection and transmission
|
||||
- Code block concatenation
|
||||
@param eNB Pointer to eNB PHY context
|
||||
@param input_buffer Pointer to input buffer for sub-frame
|
||||
@param frame_parms Pointer to frame descriptor structure
|
||||
@param num_pdcch_symbols Number of PDCCH symbols in this subframe
|
||||
@param dlsch Pointer to dlsch to be encoded
|
||||
@param frame Frame number
|
||||
@param subframe Subframe number
|
||||
@param rm_stats Time statistics for rate-matching
|
||||
@param te_stats Time statistics for turbo-encoding
|
||||
@param i_stats Time statistics for interleaving
|
||||
@returns status
|
||||
*/
|
||||
int32_t dlsch_encoding_fembms_pmch(PHY_VARS_eNB *eNB,
|
||||
L1_rxtx_proc_t *proc,
|
||||
uint8_t *a,
|
||||
uint8_t num_pdcch_symbols,
|
||||
LTE_eNB_DLSCH_t *dlsch,
|
||||
int frame,
|
||||
uint8_t subframe,
|
||||
time_stats_t *rm_stats,
|
||||
time_stats_t *te_stats,
|
||||
time_stats_t *i_stats);
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -269,6 +305,30 @@ int mch_modulation(int32_t **txdataF,
|
||||
LTE_DL_FRAME_PARMS *frame_parms,
|
||||
LTE_eNB_DLSCH_t *dlsch);
|
||||
|
||||
/*
|
||||
\brief This function is the top-level routine for generation of the sub-frame signal (frequency-domain) for MCH.
|
||||
@param txdataF Table of pointers for frequency-domain TX signals
|
||||
@param amp Amplitude of signal
|
||||
@param subframe_offset Offset of this subframe in units of subframes (usually 0)
|
||||
@param frame_parms Pointer to frame descriptor
|
||||
@param dlsch Pointer to DLSCH descriptor for this allocation
|
||||
*/
|
||||
int mch_modulation_khz_1dot25(int32_t **txdataF,
|
||||
int16_t amp,
|
||||
uint32_t subframe_offset,
|
||||
LTE_DL_FRAME_PARMS *frame_parms,
|
||||
LTE_eNB_DLSCH_t *dlsch);
|
||||
|
||||
|
||||
/** \brief Top-level generation function for eNB TX of MBSFN
|
||||
@param phy_vars_eNB Pointer to eNB variables
|
||||
@param a Pointer to transport block
|
||||
@param abstraction_flag
|
||||
|
||||
*/
|
||||
void generate_mch_khz_1dot25(PHY_VARS_eNB *phy_vars_eNB,L1_rxtx_proc_t *proc,uint8_t *a);
|
||||
|
||||
|
||||
/** \brief Top-level generation function for eNB TX of MBSFN
|
||||
@param phy_vars_eNB Pointer to eNB variables
|
||||
@param a Pointer to transport block
|
||||
@@ -318,6 +378,12 @@ int32_t generate_pilots_slot(PHY_VARS_eNB *phy_vars_eNB,
|
||||
uint16_t slot,
|
||||
int first_pilot_only);
|
||||
|
||||
int32_t generate_mbsfn_pilot_khz_1dot25(PHY_VARS_eNB *phy_vars_eNB,
|
||||
L1_rxtx_proc_t *proc,
|
||||
int32_t **txdataF,
|
||||
int16_t amp);
|
||||
|
||||
|
||||
int32_t generate_mbsfn_pilot(PHY_VARS_eNB *phy_vars_eNB,
|
||||
L1_rxtx_proc_t *proc,
|
||||
int32_t **txdataF,
|
||||
@@ -350,6 +416,13 @@ int32_t generate_pbch(LTE_eNB_PBCH *eNB_pbch,
|
||||
uint8_t *pbch_pdu,
|
||||
uint8_t frame_mod4);
|
||||
|
||||
int32_t generate_pbch_fembms(LTE_eNB_PBCH *eNB_pbch,
|
||||
int32_t **txdataF,
|
||||
int32_t amp,
|
||||
LTE_DL_FRAME_PARMS *frame_parms,
|
||||
uint8_t *pbch_pdu,
|
||||
uint8_t frame_mod16);
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -88,7 +88,7 @@ void PHY_ofdm_mod(int *input, /// pointer to complex input
|
||||
|
||||
if(nb_symbols == 0) return;
|
||||
|
||||
short temp[4096*4] __attribute__((aligned(32)));
|
||||
short temp[2*2*6144*4] __attribute__((aligned(32)));
|
||||
unsigned short i,j;
|
||||
short k;
|
||||
|
||||
@@ -125,9 +125,23 @@ void PHY_ofdm_mod(int *input, /// pointer to complex input
|
||||
case 3072:
|
||||
idftsize = IDFT_3072;
|
||||
break;
|
||||
|
||||
case 4096:
|
||||
idftsize = IDFT_4096;
|
||||
break;
|
||||
|
||||
case 6144:
|
||||
idftsize= IDFT_6144;
|
||||
break;
|
||||
|
||||
case 12288:
|
||||
idftsize= IDFT_12288;
|
||||
break;
|
||||
|
||||
case 24576:
|
||||
idftsize= IDFT_24576;
|
||||
break;
|
||||
|
||||
default:
|
||||
idftsize = IDFT_512;
|
||||
break;
|
||||
|
||||
@@ -20,12 +20,12 @@
|
||||
*/
|
||||
|
||||
/*! \file phy_procedures_lte_eNB.c
|
||||
* \brief Implementation of eNB procedures from 36.213 LTE specifications
|
||||
* \author R. Knopp, F. Kaltenberger, N. Nikaein, X. Foukas
|
||||
* \brief Implementation of eNB procedures from 36.213 LTE specifications / FeMBMS 36.231 LTE procedures v14.2
|
||||
* \author R. Knopp, F. Kaltenberger, N. Nikaein, X. Foukas, J. Morgade
|
||||
* \date 2011
|
||||
* \version 0.1
|
||||
* \company Eurecom
|
||||
* \email: knopp@eurecom.fr,florian.kaltenberger@eurecom.fr,navid.nikaein@eurecom.fr, x.foukas@sms.ed.ac.uk
|
||||
* \email: knopp@eurecom.fr,florian.kaltenberger@eurecom.fr,navid.nikaein@eurecom.fr, x.foukas@sms.ed.ac.uk, javier.morgade@ieee.org
|
||||
* \note
|
||||
* \warning
|
||||
*/
|
||||
@@ -122,12 +122,32 @@ lte_subframe_t get_subframe_direction(uint8_t Mod_id,uint8_t CC_id,uint8_t subfr
|
||||
}
|
||||
|
||||
#ifdef MBMS_NFAPI_SCHEDULER
|
||||
void pmch_procedures(PHY_VARS_eNB *eNB,L1_rxtx_proc_t *proc) {
|
||||
void pmch_procedures(PHY_VARS_eNB *eNB,L1_rxtx_proc_t *proc, int fembms_flag) {
|
||||
int subframe = proc->subframe_tx;
|
||||
// This is DL-Cell spec pilots in Control region
|
||||
generate_pilots_slot (eNB, eNB->common_vars.txdataF, AMP, subframe << 1, 1);
|
||||
if(eNB->dlsch_MCH->active==1)
|
||||
generate_mch (eNB, proc,NULL/*, eNB->dlsch_MCH->harq_processes[0]->pdu*/);
|
||||
if(!fembms_flag){
|
||||
generate_pilots_slot (eNB, eNB->common_vars.txdataF, AMP, subframe << 1, 1);
|
||||
generate_mbsfn_pilot(eNB,proc,
|
||||
eNB->common_vars.txdataF,
|
||||
AMP);
|
||||
}else
|
||||
generate_mbsfn_pilot_khz_1dot25(eNB,proc,
|
||||
eNB->common_vars.txdataF,
|
||||
AMP);
|
||||
|
||||
if(eNB->dlsch_MCH->active==1){
|
||||
if(!fembms_flag){
|
||||
generate_mch (eNB, proc,NULL/*, eNB->dlsch_MCH->harq_processes[0]->pdu*/);
|
||||
}
|
||||
else{
|
||||
generate_mch_khz_1dot25 (eNB, proc,NULL/*, eNB->dlsch_MCH->harq_processes[0]->pdu*/);
|
||||
}
|
||||
|
||||
LOG_D(PHY,"[eNB%"PRIu8"] Frame %d subframe %d : Got MCH pdu for MBSFN (TBS %d) fembms %d \n",
|
||||
eNB->Mod_id,proc->frame_tx,subframe,
|
||||
eNB->dlsch_MCH->harq_processes[0]->TBS>>3,fembms_flag);
|
||||
|
||||
}
|
||||
eNB->dlsch_MCH->active = 0;
|
||||
}
|
||||
#else
|
||||
@@ -171,6 +191,80 @@ void pmch_procedures(PHY_VARS_eNB *eNB,L1_rxtx_proc_t *proc) {
|
||||
}
|
||||
#endif
|
||||
|
||||
void common_signal_procedures_fembms (PHY_VARS_eNB *eNB,int frame, int subframe) {
|
||||
LTE_DL_FRAME_PARMS *fp=&eNB->frame_parms;
|
||||
int **txdataF = eNB->common_vars.txdataF;
|
||||
uint8_t *pbch_pdu=&eNB->pbch_pdu[0];
|
||||
|
||||
if((frame&3)!=0 /*&& subframe != 0*/)
|
||||
return;
|
||||
|
||||
LOG_I(PHY,"common_signal_procedures: frame %d, subframe %d fdd:%s dir:%s index:%d\n",frame,subframe,fp->frame_type == FDD?"FDD":"TDD", subframe_select(fp,subframe) == SF_DL?"DL":"UL?",(frame&15)/4);
|
||||
// generate Cell-Specific Reference Signals for both slots
|
||||
//VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME(VCD_SIGNAL_DUMPER_FUNCTIONS_PHY_ENB_RS_TX,1);
|
||||
|
||||
|
||||
if(subframe_select(fp,subframe) == SF_S)
|
||||
generate_pilots_slot(eNB,
|
||||
txdataF,
|
||||
AMP,
|
||||
subframe<<1,1);
|
||||
else
|
||||
generate_pilots_slot(eNB,
|
||||
txdataF,
|
||||
AMP,
|
||||
subframe<<1,0);
|
||||
|
||||
// check that 2nd slot is for DL
|
||||
if (subframe_select (fp, subframe) == SF_DL)
|
||||
generate_pilots_slot (eNB, txdataF, AMP, (subframe << 1) + 1, 0);
|
||||
|
||||
//VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME (VCD_SIGNAL_DUMPER_FUNCTIONS_PHY_ENB_RS_TX, 0);
|
||||
|
||||
// First half of PSS/SSS (FDD, slot 0)
|
||||
if (subframe == 0) {
|
||||
//if (fp->frame_type == FDD) {
|
||||
generate_pss (txdataF, AMP, fp, (fp->Ncp == NORMAL) ? 6 : 5, 0);
|
||||
generate_sss (txdataF, AMP, fp, (fp->Ncp == NORMAL) ? 5 : 4, 0);
|
||||
//}
|
||||
|
||||
/// First half of SSS (TDD, slot 1)
|
||||
|
||||
//if (fp->frame_type == TDD) {
|
||||
generate_sss (txdataF, AMP, fp, (fp->Ncp == NORMAL) ? 6 : 5, 1);
|
||||
//}
|
||||
|
||||
// generate PBCH (Physical Broadcast CHannel) info
|
||||
|
||||
/// generate PBCH
|
||||
if ((frame&15)==0) {
|
||||
//AssertFatal(eNB->pbch_configured==1,"PBCH was not configured by MAC\n");
|
||||
if (eNB->pbch_configured!=1) return;
|
||||
|
||||
eNB->pbch_configured=0;
|
||||
}
|
||||
|
||||
T(T_ENB_PHY_MIB, T_INT(eNB->Mod_id), T_INT(frame), T_INT(subframe),
|
||||
T_BUFFER(pbch_pdu, 3));
|
||||
generate_pbch_fembms (&eNB->pbch, txdataF, AMP, fp, pbch_pdu, (frame & 15)/4);
|
||||
} //else if ((subframe == 1) && (fp->frame_type == TDD)) {
|
||||
//generate_pss (txdataF, AMP, fp, 2, 2);
|
||||
// }
|
||||
// Second half of PSS/SSS (FDD, slot 10)
|
||||
else if ((subframe == 5) && (fp->frame_type == FDD) && is_fembms_nonMBSFN_subframe(frame,subframe,fp)) {
|
||||
generate_pss (txdataF, AMP, &eNB->frame_parms, (fp->Ncp == NORMAL) ? 6 : 5, 10);
|
||||
generate_sss (txdataF, AMP, &eNB->frame_parms, (fp->Ncp == NORMAL) ? 5 : 4, 10);
|
||||
}
|
||||
// Second-half of SSS (TDD, slot 11)
|
||||
// else if ((subframe == 5) && (fp->frame_type == TDD)) {
|
||||
// generate_sss (txdataF, AMP, fp, (fp->Ncp == NORMAL) ? 6 : 5, 11);
|
||||
// }
|
||||
// Second half of PSS (TDD, slot 12)
|
||||
// else if ((subframe == 6) && (fp->frame_type == TDD)) {
|
||||
// generate_pss (txdataF, AMP, fp, 2, 12);
|
||||
// }
|
||||
}
|
||||
|
||||
void common_signal_procedures (PHY_VARS_eNB *eNB,int frame, int subframe) {
|
||||
LTE_DL_FRAME_PARMS *fp=&eNB->frame_parms;
|
||||
int **txdataF = eNB->common_vars.txdataF;
|
||||
@@ -417,12 +511,30 @@ void phy_procedures_eNB_TX(PHY_VARS_eNB *eNB,
|
||||
}
|
||||
|
||||
if (NFAPI_MODE==NFAPI_MONOLITHIC || NFAPI_MODE==NFAPI_MODE_PNF) {
|
||||
if (is_fembms_pmch_subframe(frame,subframe,fp)) {
|
||||
#ifdef MBMS_NFAPI_SCHEDULER
|
||||
pmch_procedures(eNB,proc,1);
|
||||
LOG_D(MAC,"frame %d, subframe %d -> PMCH\n",frame,subframe);
|
||||
return;
|
||||
#endif
|
||||
}else if(is_fembms_cas_subframe(frame,subframe,fp) || is_fembms_nonMBSFN_subframe(frame,subframe,fp)){
|
||||
LOG_D(MAC,"frame %d, subframe %d -> CAS\n",frame,subframe);
|
||||
common_signal_procedures_fembms(eNB,proc->frame_tx, proc->subframe_tx);
|
||||
//return;
|
||||
}
|
||||
|
||||
if((!is_fembms_cas_subframe(frame,subframe,fp)) && (!is_fembms_nonMBSFN_subframe(frame,subframe,fp))){
|
||||
if (is_pmch_subframe(frame,subframe,fp)) {
|
||||
#ifdef MBMS_NFAPI_SCHEDULER
|
||||
pmch_procedures(eNB,proc,0);
|
||||
#else
|
||||
pmch_procedures(eNB,proc);
|
||||
#endif
|
||||
} else {
|
||||
// this is not a pmch subframe, so generate PSS/SSS/PBCH
|
||||
common_signal_procedures(eNB,proc->frame_tx, proc->subframe_tx);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// clear existing ulsch dci allocations before applying info from MAC (this is table
|
||||
@@ -508,6 +620,18 @@ void phy_procedures_eNB_TX(PHY_VARS_eNB *eNB,
|
||||
|
||||
if (do_meas==1) start_meas(&eNB->dlsch_ue_specific);
|
||||
|
||||
if (NFAPI_MODE==NFAPI_MONOLITHIC || NFAPI_MODE==NFAPI_MODE_PNF) {
|
||||
if (is_fembms_pmch_subframe(frame,subframe,fp)) {
|
||||
#ifdef MBMS_NFAPI_SCHEDULER
|
||||
pmch_procedures(eNB,proc,1);
|
||||
return;
|
||||
#endif
|
||||
}else if(is_fembms_cas_subframe(frame,subframe,fp)){
|
||||
common_signal_procedures_fembms(eNB,proc->frame_tx, proc->subframe_tx);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME(VCD_SIGNAL_DUMPER_FUNCTIONS_PHY_ENB_PDCCH_TX,0);
|
||||
VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME(VCD_SIGNAL_DUMPER_FUNCTIONS_GENERATE_DLSCH,1);
|
||||
// Now scan UE specific DLSCH
|
||||
|
||||
@@ -41,6 +41,17 @@
|
||||
* \warning
|
||||
*/
|
||||
|
||||
/*! \function feptx0
|
||||
* \brief Implementation of ofdm encoding for FeMBMS profile in one eNB
|
||||
* \author J. Morgade
|
||||
* \date 2020
|
||||
* \version 0.1
|
||||
* \email: javier.morgade@ieee.org
|
||||
* \note
|
||||
* \warning
|
||||
*/
|
||||
|
||||
|
||||
|
||||
#include "PHY/defs_eNB.h"
|
||||
#include "PHY/phy_extern.h"
|
||||
@@ -76,7 +87,7 @@ void feptx0(RU_t *ru,
|
||||
int slot_sizeF = (fp->ofdm_symbol_size) * ((fp->Ncp==1) ? 6 : 7);
|
||||
int subframe = ru->proc.tti_tx;
|
||||
|
||||
//VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME(VCD_SIGNAL_DUMPER_FUNCTIONS_PHY_PROCEDURES_RU_FEPTX_OFDM+slot , 1 );
|
||||
VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME(VCD_SIGNAL_DUMPER_FUNCTIONS_PHY_PROCEDURES_RU_FEPTX_OFDM+(slot&1) , 1 );
|
||||
|
||||
slot_offset = slot*(fp->samples_per_tti>>1); //slot_offset = subframe*fp->samples_per_tti + (slot*(fp->samples_per_tti>>1));
|
||||
|
||||
@@ -91,7 +102,17 @@ void feptx0(RU_t *ru,
|
||||
fp->nb_prefix_samples,
|
||||
CYCLIC_PREFIX);
|
||||
} else {
|
||||
if(is_pmch_subframe(ru->proc.frame_tx,subframe,fp)){
|
||||
if(is_fembms_pmch_subframe(ru->proc.frame_tx,subframe,fp)){
|
||||
if((slot&1)==0){//just use one slot chance
|
||||
PHY_ofdm_mod(&ru->common.txdataF_BF[aa][(slot&1)*slot_sizeF],
|
||||
(int*)&ru->common.txdata[aa][slot_offset],
|
||||
fp->ofdm_symbol_size_khz_1dot25,
|
||||
1,
|
||||
fp->ofdm_symbol_size_khz_1dot25>>2,
|
||||
CYCLIC_PREFIX);
|
||||
LOG_D(HW,"Generating PMCH FeMBMS TX subframe %d %d\n",subframe,fp->ofdm_symbol_size_khz_1dot25);
|
||||
}
|
||||
} else if(is_pmch_subframe(ru->proc.frame_tx,subframe,fp)){
|
||||
if ((slot&1) == 0) {//just use one slot chance
|
||||
normal_prefix_mod(&ru->common.txdataF_BF[aa][(slot&1)*slot_sizeF],
|
||||
(int*)&ru->common.txdata[aa][slot_offset],
|
||||
|
||||
@@ -2383,10 +2383,12 @@ void ue_pbch_procedures(uint8_t eNB_id,
|
||||
if (pbch_phase>=4)
|
||||
pbch_phase=0;
|
||||
|
||||
if((ue->frame_parms.FeMBMS_active == 0)|| is_fembms_cas_subframe(frame_rx,subframe_rx,&ue->frame_parms) || first_run) {
|
||||
|
||||
for (pbch_trials=0; pbch_trials<4; pbch_trials++) {
|
||||
//for (pbch_phase=0;pbch_phase<4;pbch_phase++) {
|
||||
//LOG_I(PHY,"[UE %d] Frame %d, Trying PBCH %d (NidCell %d, eNB_id %d)\n",ue->Mod_id,frame_rx,pbch_phase,ue->frame_parms.Nid_cell,eNB_id);
|
||||
if(is_fembms_cas_subframe(frame_rx,subframe_rx,&ue->frame_parms)) {
|
||||
if(is_fembms_cas_subframe(frame_rx,subframe_rx,&ue->frame_parms) || ue->frame_parms.FeMBMS_active) {
|
||||
pbch_tx_ant = rx_pbch_fembms(&ue->common_vars,
|
||||
ue->pbch_vars[eNB_id],
|
||||
&ue->frame_parms,
|
||||
@@ -2431,9 +2433,10 @@ void ue_pbch_procedures(uint8_t eNB_id,
|
||||
|
||||
ue->pbch_vars[eNB_id]->pdu_errors_conseq = 0;
|
||||
|
||||
if(is_fembms_cas_subframe(frame_rx,subframe_rx,&ue->frame_parms)) {
|
||||
if(is_fembms_cas_subframe(frame_rx,subframe_rx,&ue->frame_parms) || ue->frame_parms.FeMBMS_active) {
|
||||
frame_tx = (int)((ue->pbch_vars[eNB_id]->decoded_output[2]&31)<<1);
|
||||
frame_tx += ue->pbch_vars[eNB_id]->decoded_output[1]>>7;
|
||||
frame_tx = frame_tx<<4;
|
||||
frame_tx +=4*pbch_phase;
|
||||
} else {
|
||||
frame_tx = (((int)(ue->pbch_vars[eNB_id]->decoded_output[2]&0x03))<<8);
|
||||
@@ -2501,6 +2504,17 @@ void ue_pbch_procedures(uint8_t eNB_id,
|
||||
ue->frame_parms.phich_config_common.phich_duration,
|
||||
ue->frame_parms.phich_config_common.phich_resource);
|
||||
}
|
||||
LOG_I(PHY,"[UE %d] frame %d, subframe %d, Received PBCH (MIB): nb_antenna_ports_eNB %d, tx_ant %d, frame_tx %d. N_RB_DL %d, phich_duration %d, phich_resource %d/6!\n",
|
||||
ue->Mod_id,
|
||||
frame_rx,
|
||||
subframe_rx,
|
||||
ue->frame_parms.nb_antenna_ports_eNB,
|
||||
pbch_tx_ant,
|
||||
frame_tx,
|
||||
ue->frame_parms.N_RB_DL,
|
||||
ue->frame_parms.phich_config_common.phich_duration,
|
||||
ue->frame_parms.phich_config_common.phich_resource);
|
||||
|
||||
} else {
|
||||
if (LOG_DUMPFLAG(DEBUG_UE_PHYPROC)) {
|
||||
LOG_E(PHY,"[UE %d] frame %d, subframe %d, Error decoding PBCH!\n",
|
||||
@@ -2533,6 +2547,8 @@ void ue_pbch_procedures(uint8_t eNB_id,
|
||||
ue->pbch_vars[eNB_id]->pdu_errors_conseq);
|
||||
}
|
||||
|
||||
} //if((ue->frame_parms.FeMBMS_active == 0)|| is_fembms_cas_subframe(frame_rx,subframe_rx,&ue->frame_parms) || first_run)
|
||||
|
||||
VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME(VCD_SIGNAL_DUMPER_FUNCTIONS_UE_PBCH_PROCEDURES, VCD_FUNCTION_OUT);
|
||||
}
|
||||
|
||||
@@ -2877,10 +2893,19 @@ void ue_pmch_procedures(PHY_VARS_UE *ue,
|
||||
int l;
|
||||
int ret=0;
|
||||
|
||||
if (is_pmch_subframe(frame_rx,subframe_rx,&ue->frame_parms)) {
|
||||
if (is_pmch_subframe(frame_rx,subframe_rx,&ue->frame_parms) || fembms_flag) {
|
||||
// LOG_D(PHY,"ue calling pmch subframe ..\n ");
|
||||
LOG_D(PHY,"[UE %d] Frame %d, subframe %d: Querying for PMCH demodulation\n",
|
||||
ue->Mod_id,frame_rx,subframe_rx);
|
||||
if(fembms_flag)
|
||||
pmch_mcs = ue_query_mch_fembms(ue->Mod_id,
|
||||
CC_id,
|
||||
frame_rx,
|
||||
subframe_rx,
|
||||
eNB_id,
|
||||
&sync_area,
|
||||
&mcch_active);
|
||||
else
|
||||
pmch_mcs = ue_query_mch(ue->Mod_id,
|
||||
CC_id,
|
||||
frame_rx,
|
||||
@@ -2960,6 +2985,7 @@ void ue_pmch_procedures(PHY_VARS_UE *ue,
|
||||
LOG_D(PHY,"start turbo decode for MCH %d.%d --> Nl %d \n", frame_rx, subframe_rx, ue->dlsch_MCH[0]->harq_processes[0]->Nl);
|
||||
LOG_D(PHY,"start turbo decode for MCH %d.%d --> G %d \n", frame_rx, subframe_rx, ue->dlsch_MCH[0]->harq_processes[0]->G);
|
||||
LOG_D(PHY,"start turbo decode for MCH %d.%d --> Kmimo %d \n", frame_rx, subframe_rx, ue->dlsch_MCH[0]->Kmimo);
|
||||
|
||||
ret = dlsch_decoding(ue,
|
||||
ue->pdsch_vars_MCH[ue->current_thread_id[subframe_rx]][0]->llr[0],
|
||||
&ue->frame_parms,
|
||||
@@ -3007,14 +3033,14 @@ void ue_pmch_procedures(PHY_VARS_UE *ue,
|
||||
// if (subframe_rx==9)
|
||||
// mac_xface->macphy_exit("Why are we exiting here?");
|
||||
} else { // decoding successful
|
||||
LOG_D(PHY,"[UE %d] Frame %d, subframe %d: PMCH OK (%d,%d), passing to L2 (TBS %d, iter %d,G %d)\n",
|
||||
LOG_I(PHY,"[UE %d] Frame %d, subframe %d: PMCH OK (%d,%d), passing to L2 (TBS %d, iter %d,G %d) ret %d\n",
|
||||
ue->Mod_id,
|
||||
frame_rx,subframe_rx,
|
||||
ue->dlsch_mcch_errors[sync_area][0],
|
||||
ue->dlsch_mtch_errors[sync_area][0],
|
||||
ue->dlsch_MCH[0]->harq_processes[0]->TBS>>3,
|
||||
ue->dlsch_MCH[0]->max_turbo_iterations,
|
||||
ue->dlsch_MCH[0]->harq_processes[0]->G);
|
||||
ue->dlsch_MCH[0]->harq_processes[0]->G,ret);
|
||||
ue_send_mch_sdu(ue->Mod_id,
|
||||
CC_id,
|
||||
frame_rx,
|
||||
@@ -3022,6 +3048,8 @@ void ue_pmch_procedures(PHY_VARS_UE *ue,
|
||||
ue->dlsch_MCH[0]->harq_processes[0]->TBS>>3,
|
||||
eNB_id,// not relevant in eMBMS context
|
||||
sync_area);
|
||||
//dump_mch(ue,0,ue->dlsch_MCH[0]->harq_processes[0]->G,subframe_rx);
|
||||
//exit_fun("nothing to add");
|
||||
|
||||
if (mcch_active == 1)
|
||||
ue->dlsch_mcch_received[sync_area][0]++;
|
||||
@@ -4429,6 +4457,15 @@ int phy_procedures_UE_RX(PHY_VARS_UE *ue,
|
||||
ue_pmch_procedures(ue,proc,eNB_id,abstraction_flag,1);
|
||||
return 0;
|
||||
} else { // this gets closed at end
|
||||
if (is_fembms_cas_subframe(frame_rx,subframe_rx,&ue->frame_parms) || is_fembms_nonMBSFN_subframe(frame_rx,subframe_rx,&ue->frame_parms) ) {
|
||||
l=0;
|
||||
slot_fep(ue,
|
||||
l,
|
||||
subframe_rx<<1,
|
||||
0,
|
||||
0,
|
||||
0);
|
||||
}
|
||||
pmch_flag = is_pmch_subframe(frame_rx,subframe_rx,&ue->frame_parms) ? 1 : 0;
|
||||
|
||||
if (do_pdcch_flag) {
|
||||
|
||||
@@ -67,6 +67,11 @@ int ue_query_mch(module_id_t Mod_id, uint8_t CC_id, uint32_t frame,
|
||||
sub_frame_t subframe, uint8_t eNB_index,
|
||||
uint8_t * sync_area, uint8_t * mcch_active){ return(0);}
|
||||
|
||||
|
||||
int ue_query_mch_fembms(module_id_t Mod_id, uint8_t CC_id, uint32_t frame,
|
||||
sub_frame_t subframe, uint8_t eNB_index,
|
||||
uint8_t * sync_area, uint8_t * mcch_active){ return(0);}
|
||||
|
||||
void dl_phy_sync_success(module_id_t module_idP,
|
||||
frame_t frameP,
|
||||
unsigned char eNB_index, uint8_t first_sync){}
|
||||
|
||||
+2205
-391
File diff suppressed because it is too large
Load Diff
@@ -115,6 +115,11 @@ int ue_query_mch(module_id_t Mod_id, uint8_t CC_id, uint32_t frame,
|
||||
sub_frame_t subframe, uint8_t eNB_index,
|
||||
uint8_t * sync_area, uint8_t * mcch_active){ return(0);}
|
||||
|
||||
|
||||
int ue_query_mch_fembms(module_id_t Mod_id, uint8_t CC_id, uint32_t frame,
|
||||
sub_frame_t subframe, uint8_t eNB_index,
|
||||
uint8_t * sync_area, uint8_t * mcch_active){ return(0);}
|
||||
|
||||
void dl_phy_sync_success(module_id_t module_idP,
|
||||
frame_t frameP,
|
||||
unsigned char eNB_index, uint8_t first_sync){}
|
||||
|
||||
@@ -50,6 +50,7 @@ MESSAGE_DEF(M2AP_DEREGISTERED_ENB_IND , MESSAGE_PRIORITY_MED, m2ap_der
|
||||
/* M2AP -> SCTP */
|
||||
|
||||
MESSAGE_DEF(M2AP_MCE_SCTP_REQ , MESSAGE_PRIORITY_MED, m2ap_mce_sctp_req_t , m2ap_mce_sctp_req)
|
||||
MESSAGE_DEF(M2AP_ENB_SCTP_REQ , MESSAGE_PRIORITY_MED, m2ap_enb_sctp_req_t , m2ap_enb_sctp_req)
|
||||
//MESSAGE_DEF(M2AP_ENB_SCTP_REQ , MESSAGE_PRIORITY_MED, m2ap_enb_setup_req_t , f1ap_enb_setup_req)
|
||||
|
||||
/* eNB_DU application layer -> M2AP messages or CU M2AP -> RRC*/
|
||||
|
||||
@@ -480,7 +480,7 @@ typedef struct m2ap_mbms_scheduling_information_s {
|
||||
uint8_t common_sf_allocation_period;
|
||||
uint8_t mbms_area_id;
|
||||
struct{
|
||||
uint8_t allocated_sf_end;
|
||||
uint16_t allocated_sf_end;
|
||||
uint8_t data_mcs;
|
||||
uint8_t mch_scheduling_period;
|
||||
struct{
|
||||
@@ -533,6 +533,15 @@ typedef struct m2ap_mce_sctp_req_s {
|
||||
uint32_t mce_port_for_M2C;
|
||||
}m2ap_mce_sctp_req_t;
|
||||
|
||||
typedef struct m2ap_enb_sctp_req_s {
|
||||
/* The local MCE IP address to bind */
|
||||
net_ip_address_t enb_m2_ip_address;
|
||||
|
||||
/* eNB port for M2C*/
|
||||
uint32_t enb_port_for_M2C;
|
||||
}m2ap_enb_sctp_req_t;
|
||||
|
||||
|
||||
typedef struct m2ap_mbms_scheduling_information_resp_s {
|
||||
} m2ap_mbms_scheduling_information_resp_t;
|
||||
typedef struct m2ap_session_start_req_s {
|
||||
|
||||
+10
-15
@@ -214,7 +214,7 @@ void *eNB_app_task(void *args_p) {
|
||||
long x2_enb_register_retry_timer_id;
|
||||
uint32_t m2_register_enb_pending = 0;
|
||||
uint32_t m2_registered_enb = 0;
|
||||
long m2_enb_register_retry_timer_id;
|
||||
//long m2_enb_register_retry_timer_id;
|
||||
MessageDef *msg_p = NULL;
|
||||
instance_t instance;
|
||||
int result;
|
||||
@@ -236,16 +236,11 @@ void *eNB_app_task(void *args_p) {
|
||||
/* Try to register each eNB with MCE each other */
|
||||
if (is_m2ap_eNB_enabled() /*&& !NODE_IS_DU(RC.rrc[0]->node_type)*/) {
|
||||
//eNB_app_register_MBMS_STA(RC.rrc[0]->node_type, enb_id_start, enb_id_end);
|
||||
//m2_register_enb_pending = eNB_app_register_m2 (enb_id_start, enb_id_end);
|
||||
m2_register_enb_pending = eNB_app_register_m2 (enb_id_start, enb_id_end);
|
||||
|
||||
if (timer_setup (5, 0, TASK_ENB_APP, INSTANCE_DEFAULT, TIMER_ONE_SHOT,
|
||||
NULL, &m2_enb_register_retry_timer_id) < 0) {
|
||||
//LOG_E(ENB_APP, " Can not start eNB register retry timer, use \"sleep\" instead!\n");
|
||||
//sleep(ENB_REGISTER_RETRY_DELAY);
|
||||
/* Restart the registration process */
|
||||
//registered_enb = 0;
|
||||
//register_enb_pending = eNB_app_register (RC.rrc[0]->node_type,enb_id_start, enb_id_end);
|
||||
}
|
||||
//if (timer_setup (5, 0, TASK_ENB_APP, INSTANCE_DEFAULT, TIMER_ONE_SHOT,
|
||||
// NULL, &m2_enb_register_retry_timer_id) < 0) {
|
||||
//}
|
||||
|
||||
}
|
||||
|
||||
@@ -376,11 +371,11 @@ void *eNB_app_task(void *args_p) {
|
||||
}
|
||||
} /* if (EPC_MODE_ENABLED) */
|
||||
|
||||
if(TIMER_HAS_EXPIRED (msg_p).timer_id == m2_enb_register_retry_timer_id) {
|
||||
|
||||
LOG_I(ENB_APP, " Received %s: timer_id %ld M2 register\n", ITTI_MSG_NAME (msg_p), TIMER_HAS_EXPIRED(msg_p).timer_id);
|
||||
m2_register_enb_pending = eNB_app_register_m2 (enb_id_start, enb_id_end);
|
||||
}
|
||||
// if(TIMER_HAS_EXPIRED (msg_p).timer_id == m2_enb_register_retry_timer_id) {
|
||||
//
|
||||
// LOG_I(ENB_APP, " Received %s: timer_id %ld M2 register\n", ITTI_MSG_NAME (msg_p), TIMER_HAS_EXPIRED(msg_p).timer_id);
|
||||
// m2_register_enb_pending = eNB_app_register_m2 (enb_id_start, enb_id_end);
|
||||
// }
|
||||
|
||||
break;
|
||||
|
||||
|
||||
@@ -3052,7 +3052,8 @@ void configure_du_mac(int inst) {
|
||||
(LTE_SchedulingInfo_MBMS_r14_t *) NULL,
|
||||
(struct LTE_NonMBSFN_SubframeConfig_r14 *) NULL,
|
||||
(LTE_SystemInformationBlockType1_MBMS_r14_t *) NULL,
|
||||
(LTE_MBSFN_AreaInfoList_r9_t *) NULL
|
||||
(LTE_MBSFN_AreaInfoList_r9_t *) NULL,
|
||||
(LTE_MBSFNAreaConfiguration_r9_t*) NULL
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
@@ -306,7 +306,8 @@ int DU_handle_DL_RRC_MESSAGE_TRANSFER(instance_t instance,
|
||||
(LTE_SchedulingInfo_MBMS_r14_t *) NULL,
|
||||
(struct LTE_NonMBSFN_SubframeConfig_r14 *) NULL,
|
||||
(LTE_SystemInformationBlockType1_MBMS_r14_t *) NULL,
|
||||
(LTE_MBSFN_AreaInfoList_r9_t *) NULL
|
||||
(LTE_MBSFN_AreaInfoList_r9_t *) NULL,
|
||||
(LTE_MBSFNAreaConfiguration_r9_t*) NULL
|
||||
);
|
||||
break;
|
||||
} // case
|
||||
@@ -480,7 +481,8 @@ int DU_handle_DL_RRC_MESSAGE_TRANSFER(instance_t instance,
|
||||
(LTE_SchedulingInfo_MBMS_r14_t *) NULL,
|
||||
(struct LTE_NonMBSFN_SubframeConfig_r14 *) NULL,
|
||||
(LTE_SystemInformationBlockType1_MBMS_r14_t *) NULL,
|
||||
(LTE_MBSFN_AreaInfoList_r9_t *) NULL
|
||||
(LTE_MBSFN_AreaInfoList_r9_t *) NULL,
|
||||
(LTE_MBSFNAreaConfiguration_r9_t*) NULL
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
@@ -660,7 +660,7 @@ config_sib2_mbsfn_part( int Mod_idP,
|
||||
if (mbsfn_SubframeConfigListP->list.array[i]->subframeAllocation.present == LTE_MBSFN_SubframeConfig__subframeAllocation_PR_oneFrame) {
|
||||
phycfg.cfg->embms_mbsfn_config.fourframes_flag[i] = 0;
|
||||
phycfg.cfg->embms_mbsfn_config.mbsfn_subframeconfig[i] = mbsfn_SubframeConfigListP->list.array[i]->subframeAllocation.choice.oneFrame.buf[0]; // 6-bit subframe configuration
|
||||
LOG_I (MAC, "[CONFIG] MBSFN_SubframeConfig[%d] pattern is %d\n", i, phycfg.cfg->embms_mbsfn_config.mbsfn_subframeconfig[i]);
|
||||
LOG_I (MAC, "[CONFIG] MBSFN_SubframeConfig[%d] oneFrame pattern is %d\n", i, phycfg.cfg->embms_mbsfn_config.mbsfn_subframeconfig[i]);
|
||||
} else if (mbsfn_SubframeConfigListP->list.array[i]->subframeAllocation.present == LTE_MBSFN_SubframeConfig__subframeAllocation_PR_fourFrames) { // 24-bit subframe configuration
|
||||
phycfg.cfg->embms_mbsfn_config.fourframes_flag[i] = 1;
|
||||
phycfg.cfg->embms_mbsfn_config.mbsfn_subframeconfig[i] =
|
||||
@@ -668,7 +668,7 @@ config_sib2_mbsfn_part( int Mod_idP,
|
||||
(mbsfn_SubframeConfigListP->list.array[i]->subframeAllocation.choice.oneFrame.buf[1]<<8)|
|
||||
(mbsfn_SubframeConfigListP->list.array[i]->subframeAllocation.choice.oneFrame.buf[0]<<16);
|
||||
|
||||
LOG_I(MAC, "[CONFIG] MBSFN_SubframeConfig[%d] pattern is %x\n", i,
|
||||
LOG_I(MAC, "[CONFIG] MBSFN_SubframeConfig[%d] fourFrame pattern is %x\n", i,
|
||||
phycfg.cfg->embms_mbsfn_config.mbsfn_subframeconfig[i]);
|
||||
}
|
||||
}
|
||||
@@ -777,7 +777,8 @@ int rrc_mac_config_req_eNB(module_id_t Mod_idP,
|
||||
LTE_SchedulingInfo_MBMS_r14_t *schedulingInfo_fembms,
|
||||
struct LTE_NonMBSFN_SubframeConfig_r14 *nonMBSFN_SubframeConfig,
|
||||
LTE_SystemInformationBlockType1_MBMS_r14_t *sib1_mbms_r14_fembms,
|
||||
LTE_MBSFN_AreaInfoList_r9_t *mbsfn_AreaInfoList_fembms
|
||||
LTE_MBSFN_AreaInfoList_r9_t *mbsfn_AreaInfoList_fembms,
|
||||
LTE_MBSFNAreaConfiguration_r9_t*mbms_AreaConfig
|
||||
) {
|
||||
int i;
|
||||
int UE_id = -1;
|
||||
@@ -989,6 +990,7 @@ int rrc_mac_config_req_eNB(module_id_t Mod_idP,
|
||||
cfg->num_tlv++;
|
||||
//We need to reuse current MCH scheduler
|
||||
//TOCHECK whether we can simply reuse current mbsfn_SubframeConfig stuff
|
||||
RC.mac[Mod_idP]->common_channels[0].FeMBMS_flag = FeMBMS_Flag;
|
||||
}
|
||||
|
||||
if (mbsfn_AreaInfoList != NULL) {
|
||||
@@ -1005,6 +1007,21 @@ int rrc_mac_config_req_eNB(module_id_t Mod_idP,
|
||||
}
|
||||
}
|
||||
|
||||
if(mbms_AreaConfig != NULL) {
|
||||
RC.mac[Mod_idP]->common_channels[0].commonSF_AllocPeriod_r9 = mbms_AreaConfig->commonSF_AllocPeriod_r9;
|
||||
LOG_I(MAC, "[eNB %d][CONFIG] LTE_MBSFNAreaConfiguration_r9_t(%p) commonSF_AllocPeriod_r9(%d)\n",Mod_idP,mbms_AreaConfig, RC.mac[Mod_idP]->common_channels[0].commonSF_AllocPeriod_r9);
|
||||
for(i=0; i < mbms_AreaConfig->commonSF_Alloc_r9.list.count; i++){
|
||||
RC.mac[Mod_idP]->common_channels[0].commonSF_Alloc_r9_mbsfn_SubframeConfig[i] = mbms_AreaConfig->commonSF_Alloc_r9.list.array[i];
|
||||
LOG_I(RRC,"[eNB %d][CONFIG] MBSFNArea[%d] commonSF_Alloc_r9: radioframeAllocationPeriod(%ldn),radioframeAllocationOffset(%ld), subframeAllocation(%x,%x,%x)\n"
|
||||
,Mod_idP,i
|
||||
,RC.mac[Mod_idP]->common_channels[0].commonSF_Alloc_r9_mbsfn_SubframeConfig[i]->radioframeAllocationPeriod
|
||||
,RC.mac[Mod_idP]->common_channels[0].commonSF_Alloc_r9_mbsfn_SubframeConfig[i]->radioframeAllocationOffset
|
||||
,RC.mac[Mod_idP]->common_channels[0].commonSF_Alloc_r9_mbsfn_SubframeConfig[i]->subframeAllocation.choice.oneFrame.buf[0]
|
||||
,RC.mac[Mod_idP]->common_channels[0].commonSF_Alloc_r9_mbsfn_SubframeConfig[i]->subframeAllocation.choice.oneFrame.buf[1]
|
||||
,RC.mac[Mod_idP]->common_channels[0].commonSF_Alloc_r9_mbsfn_SubframeConfig[i]->subframeAllocation.choice.oneFrame.buf[2]);
|
||||
}
|
||||
}
|
||||
|
||||
if (pmch_InfoList != NULL) {
|
||||
// LOG_I(MAC,"DUY: lcid when entering rrc_mac config_req is %02d\n",(pmch_InfoList->list.array[0]->mbms_SessionInfoList_r9.list.array[0]->logicalChannelIdentity_r9));
|
||||
LOG_I(MAC, "[CONFIG] Number of PMCH in this MBSFN Area %d\n",
|
||||
|
||||
@@ -530,6 +530,7 @@ rrc_mac_config_req_ue(module_id_t Mod_idP,
|
||||
LOG_I(MAC, "[UE %d] Configuring LTE_NonMBSFN \n",
|
||||
Mod_idP);
|
||||
phy_config_sib1_fembms_ue(Mod_idP, CC_idP, 0, nonMBSFN_SubframeConfig);
|
||||
UE_mac_inst[Mod_idP].non_mbsfn_SubframeConfig = nonMBSFN_SubframeConfig;
|
||||
}
|
||||
|
||||
VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME
|
||||
|
||||
@@ -921,6 +921,7 @@ eNB_dlsch_ulsch_scheduler(module_id_t module_idP,
|
||||
}
|
||||
#endif
|
||||
|
||||
int do_fembms_si=0;
|
||||
for (CC_id = 0; CC_id < MAX_NUM_CCs; CC_id++) {
|
||||
if (cc[CC_id].MBMS_flag > 0) {
|
||||
start_meas(&RC.mac[module_idP]->schedule_mch);
|
||||
@@ -931,6 +932,10 @@ eNB_dlsch_ulsch_scheduler(module_id_t module_idP,
|
||||
}
|
||||
stop_meas(&RC.mac[module_idP]->schedule_mch);
|
||||
}
|
||||
if (cc[CC_id].FeMBMS_flag > 0) {
|
||||
do_fembms_si = 1;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
static int debug_flag = 0;
|
||||
@@ -952,12 +957,22 @@ eNB_dlsch_ulsch_scheduler(module_id_t module_idP,
|
||||
}
|
||||
|
||||
/* This schedules MIB */
|
||||
if ((subframeP == 0) && (frameP & 3) == 0)
|
||||
schedule_mib(module_idP, frameP, subframeP);
|
||||
if(!do_fembms_si/*get_softmodem_params()->fembms*/){
|
||||
if ((subframeP == 0) && (frameP & 3) == 0)
|
||||
schedule_mib(module_idP, frameP, subframeP);
|
||||
}else{
|
||||
if ((subframeP == 0) && (frameP & 15) == 0 ){
|
||||
schedule_fembms_mib(module_idP, frameP, subframeP);
|
||||
//schedule_SI_MBMS(module_idP, frameP, subframeP);
|
||||
}
|
||||
}
|
||||
|
||||
if (get_softmodem_params()->phy_test == 0) {
|
||||
/* This schedules SI for legacy LTE and eMTC starting in subframeP */
|
||||
schedule_SI(module_idP, frameP, subframeP);
|
||||
if(!do_fembms_si/*get_softmodem_params()->fembms*/)
|
||||
schedule_SI(module_idP, frameP, subframeP);
|
||||
else
|
||||
schedule_SI_MBMS(module_idP, frameP, subframeP);
|
||||
/* This schedules Paging in subframeP */
|
||||
schedule_PCH(module_idP,frameP,subframeP);
|
||||
/* This schedules Random-Access for legacy LTE and eMTC starting in subframeP */
|
||||
|
||||
@@ -731,6 +731,7 @@ schedule_SI_MBMS(module_id_t module_idP, frame_t frameP,
|
||||
if (subframeP == 0) {
|
||||
for (CC_id = 0; CC_id < MAX_NUM_CCs; CC_id++) {
|
||||
cc = &eNB->common_channels[CC_id];
|
||||
//printf("*cc->sib1_MBMS->si_WindowLength_r14 %d \n", *cc->sib1_MBMS->si_WindowLength_r14);
|
||||
vrb_map = (void *) &cc->vrb_map;
|
||||
N_RB_DL = to_prb(cc->mib->message.dl_Bandwidth);
|
||||
dl_config_request = &eNB->DL_req[CC_id];
|
||||
@@ -911,6 +912,64 @@ schedule_SI_MBMS(module_id_t module_idP, frame_t frameP,
|
||||
stop_meas(&eNB->schedule_si_mbms);
|
||||
}
|
||||
|
||||
void
|
||||
schedule_fembms_mib(module_id_t module_idP, frame_t frameP, sub_frame_t subframeP) {
|
||||
eNB_MAC_INST *eNB = RC.mac[module_idP];
|
||||
COMMON_channels_t *cc;
|
||||
nfapi_dl_config_request_pdu_t *dl_config_pdu;
|
||||
nfapi_tx_request_pdu_t *TX_req;
|
||||
int mib_sdu_length;
|
||||
int CC_id;
|
||||
nfapi_dl_config_request_t *dl_config_request;
|
||||
nfapi_dl_config_request_body_t *dl_req;
|
||||
uint16_t sfn_sf = frameP << 4 | subframeP;
|
||||
AssertFatal(subframeP == 0, "Subframe must be 0\n");
|
||||
AssertFatal((frameP & 15) == 0, "Frame must be a multiple of 16\n");
|
||||
|
||||
for (CC_id = 0; CC_id < MAX_NUM_CCs; CC_id++) {
|
||||
dl_config_request = &eNB->DL_req[CC_id];
|
||||
dl_req = &dl_config_request->dl_config_request_body;
|
||||
cc = &eNB->common_channels[CC_id];
|
||||
mib_sdu_length = mac_rrc_data_req(module_idP, CC_id, frameP, MIBCH_MBMS, 0xFFFF, 1, &cc->MIB_pdu.payload[0], 0); // not used in this case
|
||||
LOG_D(MAC, "Frame %d, subframe %d: BCH PDU length %d\n", frameP, subframeP, mib_sdu_length);
|
||||
|
||||
if (mib_sdu_length > 0) {
|
||||
LOG_D(MAC, "Frame %d, subframe %d: Adding BCH PDU in position %d (length %d)\n", frameP, subframeP, dl_req->number_pdu, mib_sdu_length);
|
||||
|
||||
if ((frameP & 1023) < 40)
|
||||
LOG_D(MAC,
|
||||
"[eNB %d] Frame %d : MIB->BCH CC_id %d, Received %d bytes (cc->mib->message.schedulingInfoSIB1_BR_r13 %d)\n",
|
||||
module_idP, frameP, CC_id, mib_sdu_length,
|
||||
(int) cc->mib->message.schedulingInfoSIB1_BR_r13);
|
||||
|
||||
dl_config_pdu = &dl_req->dl_config_pdu_list[dl_req->number_pdu];
|
||||
memset((void *) dl_config_pdu, 0,
|
||||
sizeof(nfapi_dl_config_request_pdu_t));
|
||||
dl_config_pdu->pdu_type = NFAPI_DL_CONFIG_BCH_PDU_TYPE, dl_config_pdu->pdu_size =
|
||||
2 + sizeof(nfapi_dl_config_bch_pdu);
|
||||
dl_config_pdu->bch_pdu.bch_pdu_rel8.tl.tag = NFAPI_DL_CONFIG_REQUEST_BCH_PDU_REL8_TAG;
|
||||
dl_config_pdu->bch_pdu.bch_pdu_rel8.length = mib_sdu_length;
|
||||
dl_config_pdu->bch_pdu.bch_pdu_rel8.pdu_index = eNB->pdu_index[CC_id];
|
||||
dl_config_pdu->bch_pdu.bch_pdu_rel8.transmission_power = 6000;
|
||||
dl_req->tl.tag = NFAPI_DL_CONFIG_REQUEST_BODY_TAG;
|
||||
dl_req->number_pdu++;
|
||||
dl_config_request->header.message_id = NFAPI_DL_CONFIG_REQUEST;
|
||||
dl_config_request->sfn_sf = sfn_sf;
|
||||
LOG_D(MAC, "eNB->DL_req[0].number_pdu %d (%p)\n", dl_req->number_pdu, &dl_req->number_pdu);
|
||||
// DL request
|
||||
TX_req = &eNB->TX_req[CC_id].tx_request_body.tx_pdu_list[eNB->TX_req[CC_id].tx_request_body.number_of_pdus];
|
||||
TX_req->pdu_length = 3;
|
||||
TX_req->pdu_index = eNB->pdu_index[CC_id]++;
|
||||
TX_req->num_segments = 1;
|
||||
TX_req->segments[0].segment_length = 3;
|
||||
TX_req->segments[0].segment_data = cc[CC_id].MIB_pdu.payload;
|
||||
eNB->TX_req[CC_id].tx_request_body.number_of_pdus++;
|
||||
eNB->TX_req[CC_id].sfn_sf = sfn_sf;
|
||||
eNB->TX_req[CC_id].tx_request_body.tl.tag = NFAPI_TX_REQUEST_BODY_TAG;
|
||||
eNB->TX_req[CC_id].header.message_id = NFAPI_TX_REQUEST;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void
|
||||
schedule_mib(module_id_t module_idP, frame_t frameP, sub_frame_t subframeP) {
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -56,6 +56,7 @@
|
||||
#include "LTE_MobilityControlInfo.h"
|
||||
#include "LTE_MBSFN-AreaInfoList-r9.h"
|
||||
#include "LTE_MBSFN-SubframeConfigList.h"
|
||||
#include "LTE_MBSFNAreaConfiguration-r9.h"
|
||||
#include "LTE_PMCH-InfoList-r9.h"
|
||||
#include "LTE_SCellToAddMod-r10.h"
|
||||
#include "LTE_SystemInformationBlockType1-v1310-IEs.h"
|
||||
@@ -409,9 +410,11 @@ typedef struct {
|
||||
/*!\brief Values of BCCH SIB_BR logical channel (fake) */
|
||||
#define BCCH_SI_BR 7 // SI-BR
|
||||
/*!\brief Values of BCCH SIB1_MBMS logical channel (fake) */
|
||||
#define BCCH_SIB1_MBMS 60 // SIB1_MBMS //TODO better armonize index
|
||||
#define MIBCH_MBMS 10 // SIB1_MBMS //TODO better armonize index
|
||||
#define BCCH_SIB1_MBMS 12 // SIB1_MBMS //TODO better armonize index
|
||||
/*!\brief Values of BCCH SI_MBMS logical channel (fake) */
|
||||
#define BCCH_SI_MBMS 61 // SIB_MBMS //TODO better armonize index
|
||||
#define BCCH_SI_MBMS 13 // SIB_MBMS //TODO better armonize index
|
||||
#define MCCH_COUNTING 14
|
||||
/*!\brief Value of CCCH / SRB0 logical channel */
|
||||
#define CCCH 0 // srb0
|
||||
/*!\brief DCCH / SRB1 logical channel */
|
||||
@@ -1286,6 +1289,8 @@ typedef struct {
|
||||
/// MBSFN SubframeConfig
|
||||
struct LTE_MBSFN_SubframeConfig *mbsfn_SubframeConfig[8];
|
||||
struct LTE_NonMBSFN_SubframeConfig_r14 *non_mbsfn_SubframeConfig;
|
||||
struct LTE_MBSFN_SubframeConfig *commonSF_Alloc_r9_mbsfn_SubframeConfig[8]; // FIXME replace 8 by MAX_MBSFN_AREA?
|
||||
uint8_t commonSF_AllocPeriod_r9;
|
||||
/// number of subframe allocation pattern available for MBSFN sync area
|
||||
uint8_t num_sf_allocation_pattern;
|
||||
/// MBMS Flag
|
||||
|
||||
@@ -33,6 +33,16 @@
|
||||
#include "PHY/defs_common.h" // for PRACH_RESOURCES_t and lte_subframe_t
|
||||
#include "openair2/COMMON/mac_messages_types.h"
|
||||
|
||||
/** \fn void schedule_fembms_mib(module_id_t module_idP,frame_t frameP,sub_frame_t subframe);
|
||||
\brief MIB scheduling for PBCH. This function requests the MIB from RRC and provides it to L1.
|
||||
@param Mod_id Instance ID of eNB
|
||||
@param frame Frame index
|
||||
@param subframe Subframe number on which to act
|
||||
|
||||
*/
|
||||
|
||||
void schedule_fembms_mib(module_id_t module_idP,
|
||||
frame_t frameP, sub_frame_t subframeP);
|
||||
|
||||
/** \addtogroup _mac
|
||||
* @{
|
||||
@@ -532,6 +542,10 @@ int ue_query_mch(module_id_t Mod_id, uint8_t CC_id, uint32_t frame,
|
||||
sub_frame_t subframe, uint8_t eNB_index,
|
||||
uint8_t *sync_area, uint8_t *mcch_active);
|
||||
|
||||
int ue_query_mch_fembms(module_id_t Mod_id, uint8_t CC_id, uint32_t frame,
|
||||
sub_frame_t subframe, uint8_t eNB_index,
|
||||
uint8_t * sync_area, uint8_t * mcch_active);
|
||||
|
||||
|
||||
/* \brief Called by PHY to get sdu for PUSCH transmission. It performs the following operations: Checks BSR for DCCH, DCCH1 and DTCH corresponding to previous values computed either in SR or BSR procedures. It gets rlc status indications on DCCH,DCCH1 and DTCH and forms BSR elements and PHR in MAC header. CRNTI element is not supported yet. It computes transport block for up to 3 SDUs and generates header and forms the complete MAC SDU.
|
||||
@param Mod_id Instance id of UE in machine
|
||||
@@ -899,6 +913,7 @@ int generate_dlsch_header(unsigned char *mac_header,
|
||||
@param non_MBSFN_SubframeConfig pointer to FeMBMS Non MBSFN Subframe Config
|
||||
@param sib1_mbms_r14_fembms pointer SI Scheduling infomration for SI-MBMS
|
||||
@param mbsfn_AreaInfoList_fembms pointer to FeMBMS MBSFN Area Info list from SIB1-MBMS
|
||||
@param mbms_AreaConfiguration pointer to eMBMS MBSFN Area Configuration
|
||||
*/
|
||||
|
||||
int rrc_mac_config_req_eNB(module_id_t module_idP,
|
||||
@@ -935,7 +950,8 @@ int rrc_mac_config_req_eNB(module_id_t module_idP,
|
||||
LTE_SchedulingInfo_MBMS_r14_t *schedulingInfo_fembms,
|
||||
struct LTE_NonMBSFN_SubframeConfig_r14 *nonMBSFN_SubframeConfig,
|
||||
LTE_SystemInformationBlockType1_MBMS_r14_t *sib1_mbms_r14_fembms,
|
||||
LTE_MBSFN_AreaInfoList_r9_t *mbsfn_AreaInfoList_fembms
|
||||
LTE_MBSFN_AreaInfoList_r9_t *mbsfn_AreaInfoList_fembms,
|
||||
LTE_MBSFNAreaConfiguration_r9_t * mbms_AreaConfiguration
|
||||
);
|
||||
|
||||
/** \brief RRC eNB Configuration primitive for PHY/MAC. Allows configuration of PHY/MAC resources based on System Information (SI), RRCConnectionSetup and RRCConnectionReconfiguration messages.
|
||||
|
||||
@@ -72,7 +72,10 @@ extern UL_IND_t *UL_INFO;
|
||||
extern int next_ra_frame;
|
||||
extern module_id_t next_Mod_id;
|
||||
|
||||
int mbms_rab_id = 2047;
|
||||
int mbms_rab_id=2047;//[8] = {2047,2047,2047,2047,2047,2047,2047,2047};
|
||||
static int mbms_mch_i=0;
|
||||
//static int num_msi_per_CSA[28];
|
||||
|
||||
|
||||
/*
|
||||
*
|
||||
@@ -753,13 +756,14 @@ ue_send_mch_sdu(module_id_t module_idP, uint8_t CC_id, frame_t frameP,
|
||||
LOG_E(MAC,"MCH Scheduling Information MAC Control Element should have an even size\n");
|
||||
}
|
||||
|
||||
LOG_D(MAC,"MCH Scheduling Information, len(%d)\n",rx_lengths[i]);
|
||||
|
||||
LOG_D(MAC,"MCH Scheduling Information, len(%d)\n",rx_lengths[i]);
|
||||
|
||||
for (j=0; j<rx_lengths[i]/2; j++) {
|
||||
uint16_t stop_mtch_val = ((uint16_t)(payload_ptr[2*j] & 0x07) << 8) | (uint16_t)payload_ptr[2*j+1];
|
||||
UE_mac_inst[module_idP].pmch_lcids[j] = (payload_ptr[2*j] & 0xF8) >> 3;
|
||||
UE_mac_inst[module_idP].pmch_stop_mtch[j] = stop_mtch_val;
|
||||
LOG_D(MAC,"lcid(%d),stop_mtch_val %d frameP(%d)\n", UE_mac_inst[module_idP].pmch_lcids[j], stop_mtch_val, frameP);
|
||||
LOG_I(MAC,"lcid(%d),stop_mtch_val %d frameP(%d)\n", UE_mac_inst[module_idP].pmch_lcids[j], stop_mtch_val, frameP);
|
||||
|
||||
if ((stop_mtch_val >= 2043) && (stop_mtch_val <= 2046)) {
|
||||
LOG_D(MAC,"(reserved)\n");
|
||||
@@ -768,7 +772,7 @@ ue_send_mch_sdu(module_id_t module_idP, uint8_t CC_id, frame_t frameP,
|
||||
UE_mac_inst[module_idP].msi_status_v[j] = 0;
|
||||
|
||||
if (UE_mac_inst[module_idP].mcch_status==1) {
|
||||
LOG_D(MAC,"[UE %d] Frame %d : MCH->MSI for sync area %d (eNB %d, %d bytes), i(%d)\n", module_idP, frameP, sync_area, eNB_index, rx_lengths[i], UE_mac_inst[module_idP].pmch_stop_mtch[j]);
|
||||
LOG_I(MAC,"[UE %d] Frame %d : MCH->MSI for sync area %d (eNB %d, %d bytes), LCID(%d)(%d)\n", module_idP, frameP, sync_area, eNB_index, rx_lengths[i], UE_mac_inst[module_idP].pmch_lcids[j] , UE_mac_inst[module_idP].pmch_stop_mtch[j]);
|
||||
|
||||
if (UE_mac_inst[module_idP].pmch_stop_mtch[j] < 2043) {
|
||||
UE_mac_inst[module_idP].pmch_stop_mtch[j] += UE_mac_inst[module_idP].msi_current_alloc;
|
||||
@@ -777,7 +781,7 @@ ue_send_mch_sdu(module_id_t module_idP, uint8_t CC_id, frame_t frameP,
|
||||
}
|
||||
}
|
||||
} else if (rx_lcids[i] == MCCH_LCHANID) {
|
||||
LOG_D(MAC,"[UE %d] Frame %d : SDU %d MCH->MCCH for sync area %d (eNB %d, %d bytes)\n",module_idP,frameP, i, sync_area, eNB_index, rx_lengths[i]);
|
||||
LOG_I(MAC,"[UE %d] Frame %d : SDU %d MCH->MCCH for sync area %d (eNB %d, %d bytes)\n",module_idP,frameP, i, sync_area, eNB_index, rx_lengths[i]);
|
||||
mac_rrc_data_ind_ue(module_idP,
|
||||
CC_id,
|
||||
frameP,0, // unknown subframe
|
||||
@@ -794,7 +798,7 @@ ue_send_mch_sdu(module_id_t module_idP, uint8_t CC_id, frame_t frameP,
|
||||
}
|
||||
|
||||
if (j<28 && UE_mac_inst[module_idP].msi_status_v[j]==1) {
|
||||
LOG_D(MAC,"[UE %d] Frame %d : MCH->MTCH for sync area %d (eNB %d, %d bytes), j=%d\n", module_idP, frameP, sync_area, eNB_index, rx_lengths[i], j);
|
||||
LOG_D(MAC,"[UE %d] Frame %d : MCH->MTCH for sync area %d (eNB %d, %d bytes), j=%d lcid %d\n", module_idP, frameP, sync_area, eNB_index, rx_lengths[i], j,rx_lcids[i]);
|
||||
//This sucks I know ... workaround !
|
||||
mbms_rab_id = rx_lcids[i];
|
||||
//end sucks :-(
|
||||
@@ -951,7 +955,9 @@ int ue_query_p_mch_info(module_id_t module_idP, uint32_t frameP, uint32_t subfra
|
||||
}
|
||||
} else { //more that one MCH ?? check better this condition
|
||||
//msi and mtch are mutally excluded then the break is safe
|
||||
//TODO
|
||||
if ((num_sf_alloc == UE_mac_inst[module_idP].pmch_Config[i-1]->sf_AllocEnd_r9 + 1) && (sf_AllocEnd_r9 >= (num_sf_alloc+1))) {
|
||||
//if ((num_sf_alloc == UE_mac_inst[module_idP].pmch_Config[i-1]->sf_AllocEnd_r9) && (sf_AllocEnd_r9 >= (num_sf_alloc))) {
|
||||
//msi should be just after
|
||||
msi_flag = 1;
|
||||
LOG_D(MAC,"msi(%d) should be allocated:frame(%d),submframe(%d),num_sf_alloc(%d),sf_AllocEnd_r9(%d),common_num_sf_alloc(%d)\n",i,frameP,subframe,num_sf_alloc,sf_AllocEnd_r9,
|
||||
@@ -986,6 +992,458 @@ int ue_query_p_mch_info(module_id_t module_idP, uint32_t frameP, uint32_t subfra
|
||||
return mtch_mcs;
|
||||
}
|
||||
|
||||
//static int common_num_sf_alloc=0;
|
||||
//static int x=0;
|
||||
int ue_query_mch_fembms(module_id_t module_idP, uint8_t CC_id, uint32_t frameP, uint32_t subframe, uint8_t eNB_index,uint8_t *sync_area, uint8_t *mcch_active) {
|
||||
int i = 0, j = 0,/* ii = 0,*/ msi_pos = -1, mcch_mcs = -1, mtch_mcs = -1, l=0/*,ii=0*/;
|
||||
int mcch_flag = 0, mtch_flag = 0, msi_flag = 0;
|
||||
int alloc_offset=0;
|
||||
uint32_t period;
|
||||
//uint16_t num_non_mbsfn_SubframeConfig=0;
|
||||
long mch_scheduling_period = -1;
|
||||
uint8_t mch_lcid = 0;
|
||||
//int first_pos=0;
|
||||
|
||||
if(UE_mac_inst[module_idP].non_mbsfn_SubframeConfig == NULL )
|
||||
return -1;
|
||||
|
||||
int non_mbsfn_SubframeConfig = (UE_mac_inst[module_idP].non_mbsfn_SubframeConfig->subframeAllocation_r14.buf[0]<<1 | UE_mac_inst[module_idP].non_mbsfn_SubframeConfig->subframeAllocation_r14.buf[0]>>7);
|
||||
|
||||
period = 4<<UE_mac_inst[module_idP].non_mbsfn_SubframeConfig->radioFrameAllocationPeriod_r14;
|
||||
alloc_offset = UE_mac_inst[module_idP].non_mbsfn_SubframeConfig->radioFrameAllocationOffset_r14;
|
||||
|
||||
long mcch_period = 32 << UE_mac_inst[module_idP].mbsfn_AreaInfo[i]->mcch_Config_r9.mcch_RepetitionPeriod_r9;
|
||||
long mcch_offset = UE_mac_inst[module_idP].mbsfn_AreaInfo[i]->mcch_Config_r9.mcch_Offset_r9;
|
||||
|
||||
if (UE_mac_inst[module_idP].pmch_Config[0]) {
|
||||
mch_scheduling_period = 8 << UE_mac_inst[module_idP].pmch_Config[0]->mch_SchedulingPeriod_r9;
|
||||
}
|
||||
|
||||
|
||||
// for(l=0;l<8;l++){
|
||||
// if(UE_mac_inst[module_idP].commonSF_Alloc_r9_mbsfn_SubframeConfig[l]!=NULL){
|
||||
// if(frameP%(4<<UE_mac_inst[module_idP].commonSF_AllocPeriod_r9)==0){
|
||||
// first_pos=0;
|
||||
// if((frameP&3)==0)
|
||||
// first_pos++;
|
||||
// while((non_mbsfn_SubframeConfig & (0x100 >> msi_pos)) == (0x100>>msi_pos))
|
||||
// first_pos++;
|
||||
// if(first_pos == subframe){
|
||||
// ii=0;
|
||||
// while(UE_mac_inst[module_idP].pmch_Config[ii]!=NULL){
|
||||
// num_msi_per_CSA[ii]= ( ( 4 << UE_mac_inst[module_idP].commonSF_AllocPeriod_r9) / (8 << UE_mac_inst[module_idP].pmch_Config[ii]->mch_SchedulingPeriod_r9) );
|
||||
// ii++;
|
||||
// LOG_D(MAC,"frameP %d subframe %d num_msi_per_CSA[%d] %d\n",frameP,subframe,ii,num_msi_per_CSA[ii]);
|
||||
// }
|
||||
// }
|
||||
//
|
||||
// }
|
||||
// }
|
||||
// }
|
||||
//
|
||||
|
||||
// get the real MCS value
|
||||
switch (UE_mac_inst[module_idP].mbsfn_AreaInfo[i]->mcch_Config_r9.signallingMCS_r9) {
|
||||
case 0:
|
||||
mcch_mcs = 2;
|
||||
break;
|
||||
|
||||
case 1:
|
||||
mcch_mcs = 7;
|
||||
break;
|
||||
|
||||
case 2:
|
||||
mcch_mcs = 13;
|
||||
break;
|
||||
|
||||
case 3:
|
||||
mcch_mcs = 19;
|
||||
break;
|
||||
}
|
||||
LOG_D(MAC,"frameP %d subframe %d period %d alloc_offset %d mcch_mcs %d mcch_period %ld mcch_offset %ld buf %x mch_scheduling_period %ld\n",frameP, subframe, period, alloc_offset,mcch_mcs, mcch_period, mcch_offset,(UE_mac_inst[module_idP].mbsfn_AreaInfo[i]->mcch_Config_r9.sf_AllocInfo_r9.buf[0]),mch_scheduling_period);
|
||||
|
||||
if((frameP % period ) == alloc_offset){
|
||||
switch(subframe){
|
||||
case 0:
|
||||
return (-1);
|
||||
break;
|
||||
case 1:
|
||||
if ((non_mbsfn_SubframeConfig & 0x100) > 0)
|
||||
return (-1);
|
||||
break;
|
||||
case 2:
|
||||
if ((non_mbsfn_SubframeConfig & 0x80) > 0)
|
||||
return (-1);
|
||||
break;
|
||||
case 3:
|
||||
if ((non_mbsfn_SubframeConfig & 0x40) > 0)
|
||||
return (-1);
|
||||
break;
|
||||
case 4:
|
||||
if ((non_mbsfn_SubframeConfig & 0x20) > 0)
|
||||
return (-1);
|
||||
break;
|
||||
case 5:
|
||||
if ((non_mbsfn_SubframeConfig & 0x10) > 0)
|
||||
return (-1);
|
||||
break;
|
||||
case 6:
|
||||
if ((non_mbsfn_SubframeConfig & 0x8) > 0)
|
||||
return (-1);
|
||||
break;
|
||||
case 7:
|
||||
if ((non_mbsfn_SubframeConfig & 0x4) > 0)
|
||||
return (-1);
|
||||
break;
|
||||
case 8:
|
||||
if ((non_mbsfn_SubframeConfig & 0x2) > 0)
|
||||
return (-1);
|
||||
break;
|
||||
case 9:
|
||||
if ((non_mbsfn_SubframeConfig & 0x1) > 0)
|
||||
return (-1);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
if (UE_mac_inst[module_idP].pmch_Config[0]) {
|
||||
// Find the first subframe in this MCH to transmit MSI
|
||||
if (frameP % 1 == 0) {
|
||||
if (frameP % mch_scheduling_period == 0) {
|
||||
msi_pos=0;
|
||||
if((frameP&3)==0)
|
||||
msi_pos++;
|
||||
while((non_mbsfn_SubframeConfig & (0x100 >> msi_pos)) == (0x100>>msi_pos))
|
||||
msi_pos++;
|
||||
if(msi_pos == subframe){
|
||||
UE_mac_inst[module_idP].common_num_sf_alloc=0;
|
||||
mbms_mch_i=0;
|
||||
//LOG_W(MAC,"MSP, frameP %d subframeP %d msi_pos(%d) mbms_mch_i %d\n",frameP, subframe, msi_pos,mbms_mch_i);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if(UE_mac_inst[module_idP].pmch_Config[mbms_mch_i+1]!=NULL){
|
||||
if( UE_mac_inst[module_idP].common_num_sf_alloc == UE_mac_inst[module_idP].pmch_Config[mbms_mch_i]->sf_AllocEnd_r9){
|
||||
msi_pos=subframe;
|
||||
mbms_mch_i++;
|
||||
// LOG_W(MAC,"MSP, frameP %d subframeP %d msi_pos(%d) mbms_mch_i %d\n",frameP, subframe, msi_pos,mbms_mch_i);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
// Check if the subframe is for MSI, MCCH or MTCHs and Set the correspoding flag to 1
|
||||
switch (subframe) {
|
||||
case 0:
|
||||
if (msi_pos == 0) {
|
||||
msi_flag = 1;
|
||||
}
|
||||
mtch_flag = 1;
|
||||
break;
|
||||
case 1:
|
||||
if (msi_pos == 1) {
|
||||
msi_flag = 1;
|
||||
}
|
||||
if ((frameP % mcch_period == mcch_offset) &&
|
||||
((UE_mac_inst[module_idP].mbsfn_AreaInfo[i]->mcch_Config_r9.sf_AllocInfo_r9.buf[0] & MBSFN_FDD_SF1) == MBSFN_FDD_SF1)) {
|
||||
mcch_flag = 1;
|
||||
}
|
||||
|
||||
mtch_flag = 1;
|
||||
break;
|
||||
|
||||
case 2:
|
||||
if (msi_pos == 2) {
|
||||
msi_flag = 1;
|
||||
}
|
||||
if ((frameP % mcch_period == mcch_offset) &&
|
||||
((UE_mac_inst[module_idP].mbsfn_AreaInfo[i]->mcch_Config_r9.sf_AllocInfo_r9.buf[0] & MBSFN_FDD_SF2) == MBSFN_FDD_SF2)) {
|
||||
mcch_flag = 1;
|
||||
}
|
||||
|
||||
mtch_flag = 1;
|
||||
|
||||
break;
|
||||
|
||||
case 3:
|
||||
if (msi_pos == 3) {
|
||||
msi_flag = 1;
|
||||
}
|
||||
if ((frameP % mcch_period == mcch_offset) &&
|
||||
((UE_mac_inst[module_idP].mbsfn_AreaInfo[i]->mcch_Config_r9.sf_AllocInfo_r9.buf[0] & MBSFN_FDD_SF3) == MBSFN_FDD_SF3)) {
|
||||
mcch_flag = 1;
|
||||
}
|
||||
|
||||
mtch_flag = 1;
|
||||
|
||||
break;
|
||||
case 4:
|
||||
if (msi_pos == 4) {
|
||||
msi_flag = 1;
|
||||
}
|
||||
mtch_flag = 1;
|
||||
break;
|
||||
case 5:
|
||||
if (msi_pos == 5) {
|
||||
msi_flag = 1;
|
||||
}
|
||||
mtch_flag = 1;
|
||||
break;
|
||||
|
||||
case 6:
|
||||
if (msi_pos == 6) {
|
||||
msi_flag = 1;
|
||||
}
|
||||
if ((frameP % mcch_period == mcch_offset) &&
|
||||
((UE_mac_inst[module_idP].mbsfn_AreaInfo[i]->mcch_Config_r9.sf_AllocInfo_r9.buf[0] & MBSFN_FDD_SF6) == MBSFN_FDD_SF6)) {
|
||||
mcch_flag = 1;
|
||||
}
|
||||
|
||||
mtch_flag = 1;
|
||||
|
||||
break;
|
||||
|
||||
case 7:
|
||||
if (msi_pos == 7) {
|
||||
msi_flag = 1;
|
||||
}
|
||||
if ((frameP % mcch_period == mcch_offset) &&
|
||||
((UE_mac_inst[module_idP].mbsfn_AreaInfo[i]->mcch_Config_r9.sf_AllocInfo_r9.buf[0] & MBSFN_FDD_SF7) == MBSFN_FDD_SF7)) {
|
||||
mcch_flag = 1;
|
||||
}
|
||||
|
||||
mtch_flag = 1;
|
||||
|
||||
break;
|
||||
|
||||
case 8:
|
||||
if (msi_pos == 8) {
|
||||
msi_flag = 1;
|
||||
}
|
||||
if ((frameP % mcch_period == mcch_offset) &&
|
||||
((UE_mac_inst[module_idP].mbsfn_AreaInfo[i]->mcch_Config_r9.sf_AllocInfo_r9.buf[0] & MBSFN_FDD_SF8) == MBSFN_FDD_SF8)) {
|
||||
mcch_flag = 1;
|
||||
}
|
||||
|
||||
mtch_flag = 1;
|
||||
break;
|
||||
|
||||
case 9:
|
||||
if (msi_pos == 9) {
|
||||
msi_flag = 1;
|
||||
}
|
||||
mtch_flag = 1;
|
||||
break;
|
||||
}// end switch
|
||||
|
||||
if( (msi_flag == 1) || (mcch_flag == 1) || (mtch_flag == 1) ){
|
||||
UE_mac_inst[module_idP].common_num_sf_alloc++;
|
||||
//if( (msi_flag!=1 && mcch_flag!=1) || (msi_flag!=1 && mcch_flag!=1 && mtch_flag!=1) ){
|
||||
//UE_mac_inst[module_idP].common_num_sf_alloc++;
|
||||
//if(msi_flag == 1)
|
||||
// if((num_msi_per_CSA[mbms_mch_i]--)==0){
|
||||
// LOG_E(MAC,"Both MSI and MTCH Should be reset?\n");
|
||||
// msi_flag=0;
|
||||
//}
|
||||
//}
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
#ifdef OLD
|
||||
// Acount for sf_allocable in CSA
|
||||
int num_sf_alloc = 0;
|
||||
|
||||
for (l = 0; l < 8; l++) {
|
||||
if (UE_mac_inst[module_idP].commonSF_Alloc_r9_mbsfn_SubframeConfig[l] == NULL)
|
||||
continue;
|
||||
|
||||
if (UE_mac_inst[module_idP].commonSF_Alloc_r9_mbsfn_SubframeConfig[l]->subframeAllocation.present != LTE_MBSFN_SubframeConfig__subframeAllocation_PR_oneFrame)
|
||||
continue;
|
||||
|
||||
uint32_t common_mbsfn_SubframeConfig = UE_mac_inst[module_idP].commonSF_Alloc_r9_mbsfn_SubframeConfig[l]->subframeAllocation.choice.oneFrame.buf[0];
|
||||
|
||||
|
||||
for (j = 0; j < 6; j++)
|
||||
num_sf_alloc += ((common_mbsfn_SubframeConfig & (0x80 >> j)) == (0x80 >> j));
|
||||
//num_sf_alloc=1;
|
||||
}
|
||||
|
||||
num_sf_alloc = 10;
|
||||
|
||||
num_non_mbsfn_SubframeConfig = (UE_mac_inst[module_idP].non_mbsfn_SubframeConfig->subframeAllocation_r14.buf[0]<<1 | UE_mac_inst[module_idP].non_mbsfn_SubframeConfig->subframeAllocation_r14.buf[0]>>7);
|
||||
int ones=0;
|
||||
for(j=0; j < 16; j++){
|
||||
if(num_non_mbsfn_SubframeConfig & 1)
|
||||
ones++;
|
||||
num_non_mbsfn_SubframeConfig>>=1;
|
||||
}
|
||||
|
||||
for (l = 0; l < 28; l++) {
|
||||
if (UE_mac_inst[module_idP].pmch_stop_mtch[l] >= 1/*num_sf_alloc*/) {
|
||||
if (UE_mac_inst[module_idP].pmch_stop_mtch[l] != 2047) {
|
||||
if (UE_mac_inst[module_idP].pmch_Config[UE_mac_inst[module_idP].msi_pmch] != NULL){
|
||||
mtch_mcs = UE_mac_inst[module_idP].pmch_Config[UE_mac_inst[module_idP].msi_pmch]->dataMCS_r9;
|
||||
//int common_mbsfn_alloc_offset = UE_mac_inst[module_idP].commonSF_Alloc_r9_mbsfn_SubframeConfig[0]->radioframeAllocationOffset;
|
||||
long common_mbsfn_period = 1 << UE_mac_inst[module_idP].commonSF_Alloc_r9_mbsfn_SubframeConfig[0]->radioframeAllocationPeriod;
|
||||
long commonSF_AllocPeriod = 4 << UE_mac_inst[module_idP].commonSF_AllocPeriod_r9;
|
||||
if(UE_mac_inst[module_idP].common_num_sf_alloc >= UE_mac_inst[module_idP].pmch_stop_mtch[l]){
|
||||
//LOG_E(MAC,"Attemp to UE_mac_inst[module_idP].common_num_sf_alloc %d\n",UE_mac_inst[module_idP].common_num_sf_alloc);
|
||||
|
||||
mtch_mcs = -1;
|
||||
}/*else
|
||||
OG_W(MAC,"Attemp to UE_mac_inst[module_idP].common_num_sf_alloc %d\n",UE_mac_inst[module_idP].common_num_sf_alloc);*/
|
||||
LOG_D(MAC,"Attemp to UE_mac_inst[module_idP].common_num_sf_alloc %d num_sf_alloc %d commonSF_AllocPeriod %ld, common_mbsfn_period %ld num_non_mbsfn_SubframeConfig %x ones %d\n",UE_mac_inst[module_idP].common_num_sf_alloc,num_sf_alloc, commonSF_AllocPeriod,common_mbsfn_period,num_non_mbsfn_SubframeConfig,ones);
|
||||
UE_mac_inst[module_idP].common_num_sf_alloc++;
|
||||
UE_mac_inst[module_idP].common_num_sf_alloc = UE_mac_inst[module_idP].common_num_sf_alloc % (num_sf_alloc * commonSF_AllocPeriod / common_mbsfn_period-(1+ones)*(commonSF_AllocPeriod/4)); //TODO
|
||||
}
|
||||
else
|
||||
mtch_mcs = -1;
|
||||
|
||||
mch_lcid = (uint8_t)l;
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
{
|
||||
// Acount for sf_allocable in Common SF Allocation
|
||||
int num_sf_alloc = 0;
|
||||
|
||||
for (l = 0; l < 8; l++) {
|
||||
if (UE_mac_inst[module_idP].commonSF_Alloc_r9_mbsfn_SubframeConfig[l] == NULL)
|
||||
continue;
|
||||
|
||||
if (UE_mac_inst[module_idP].commonSF_Alloc_r9_mbsfn_SubframeConfig[l]->subframeAllocation.present != LTE_MBSFN_SubframeConfig__subframeAllocation_PR_oneFrame)
|
||||
continue;
|
||||
|
||||
//int common_mbsfn_alloc_offset = UE_mac_inst[module_idP].commonSF_Alloc_r9_mbsfn_SubframeConfig[l]->radioframeAllocationOffset;
|
||||
long common_mbsfn_period = 1 << UE_mac_inst[module_idP].commonSF_Alloc_r9_mbsfn_SubframeConfig[l]->radioframeAllocationPeriod;
|
||||
long commonSF_AllocPeriod = 4 << UE_mac_inst[module_idP].commonSF_AllocPeriod_r9;
|
||||
|
||||
|
||||
num_sf_alloc =10*commonSF_AllocPeriod/common_mbsfn_period;
|
||||
num_sf_alloc -=1*((commonSF_AllocPeriod/common_mbsfn_period)/4); //CAS sfs
|
||||
uint32_t num_non_mbsfn_SubframeConfig2 = (UE_mac_inst[module_idP].non_mbsfn_SubframeConfig->subframeAllocation_r14.buf[0]<<1 | UE_mac_inst[module_idP].non_mbsfn_SubframeConfig->subframeAllocation_r14.buf[0]>>7);
|
||||
for (j = 0; j < 10; j++)
|
||||
num_sf_alloc -= ((num_non_mbsfn_SubframeConfig2 & (0x200 >> j)) == (0x200 >> j))*((commonSF_AllocPeriod/common_mbsfn_period)/period);
|
||||
|
||||
}
|
||||
|
||||
for (l = 0; l < 8; l++) {
|
||||
if (UE_mac_inst[module_idP].commonSF_Alloc_r9_mbsfn_SubframeConfig[l] == NULL)
|
||||
continue;
|
||||
|
||||
if (UE_mac_inst[module_idP].commonSF_Alloc_r9_mbsfn_SubframeConfig[l]->subframeAllocation.present != LTE_MBSFN_SubframeConfig__subframeAllocation_PR_oneFrame)
|
||||
continue;
|
||||
|
||||
//int common_mbsfn_alloc_offset = UE_mac_inst[module_idP].commonSF_Alloc_r9_mbsfn_SubframeConfig[l]->radioframeAllocationOffset;
|
||||
long common_mbsfn_period = 1 << UE_mac_inst[module_idP].commonSF_Alloc_r9_mbsfn_SubframeConfig[l]->radioframeAllocationPeriod;
|
||||
//long commonSF_AllocPeriod = 4 << UE_mac_inst[module_idP].commonSF_AllocPeriod_r9;
|
||||
|
||||
|
||||
if(msi_flag==1 && UE_mac_inst[module_idP].pmch_Config[mbms_mch_i] != NULL){
|
||||
LOG_D(MAC,"msi(%d) should be allocated:frame(%d),submframe(%d),num_sf_alloc(%d),sf_AllocEnd_r9(%ld),common_num_sf_alloc(%d)\n",mbms_mch_i,frameP,subframe,num_sf_alloc,UE_mac_inst[module_idP].pmch_Config[mbms_mch_i]->sf_AllocEnd_r9,
|
||||
UE_mac_inst[module_idP].common_num_sf_alloc);
|
||||
UE_mac_inst[module_idP].msi_current_alloc = UE_mac_inst[module_idP].common_num_sf_alloc;//num_sf_alloc;
|
||||
UE_mac_inst[module_idP].msi_pmch = mbms_mch_i;
|
||||
}else if(UE_mac_inst[module_idP].pmch_Config[mbms_mch_i] != NULL){
|
||||
if (UE_mac_inst[module_idP].pmch_stop_mtch[mbms_mch_i] >= UE_mac_inst[module_idP].common_num_sf_alloc/*num_sf_alloc*/) {
|
||||
if (UE_mac_inst[module_idP].pmch_stop_mtch[mbms_mch_i] != 2047) {
|
||||
mtch_flag = 1;
|
||||
if (UE_mac_inst[module_idP].pmch_Config[UE_mac_inst[module_idP].msi_pmch] != NULL)
|
||||
mtch_mcs = UE_mac_inst[module_idP].pmch_Config[UE_mac_inst[module_idP].msi_pmch]->dataMCS_r9;
|
||||
else
|
||||
mtch_mcs = -1;
|
||||
mch_lcid = (uint8_t)mbms_mch_i;
|
||||
LOG_D(MAC,"mtch should be allocated:frame(%d),submframe(%d),num_sf_alloc(%d),mtch_mcs(%d),pmch_stop_mtch(%d),lcid(%d),msi_pmch(%d)\n",frameP,subframe,num_sf_alloc,mtch_mcs,
|
||||
UE_mac_inst[module_idP].pmch_stop_mtch[mbms_mch_i],UE_mac_inst[module_idP].pmch_lcids[mbms_mch_i],UE_mac_inst[module_idP].msi_pmch);
|
||||
}
|
||||
}
|
||||
}
|
||||
UE_mac_inst[module_idP].common_num_sf_alloc = UE_mac_inst[module_idP].common_num_sf_alloc % ((num_sf_alloc-mbms_mch_i) /** commonSF_AllocPeriod *// common_mbsfn_period);//48;
|
||||
|
||||
if(mtch_flag)
|
||||
break;
|
||||
}
|
||||
if(msi_flag==1){
|
||||
for (l = 0; l < 8; l++) {
|
||||
if (UE_mac_inst[module_idP].commonSF_Alloc_r9_mbsfn_SubframeConfig[l] == NULL)
|
||||
continue;
|
||||
|
||||
if ( (/*AJ*/ (/*V*/ ( /*U*/ (frameP %(4 << UE_mac_inst[module_idP].commonSF_AllocPeriod_r9)) ) / 8 ) % ((8 <<UE_mac_inst[module_idP].pmch_Config[mbms_mch_i]->mch_SchedulingPeriod_r9) / 8 ) ) != 0 ){
|
||||
msi_flag=0;
|
||||
LOG_D(MAC,"frameP %d subframeP %d reset(%d)\n",frameP, subframe, mbms_mch_i);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// sf allocation is non-overlapping
|
||||
if ((msi_flag==1) || (mcch_flag==1) || (mtch_flag==1)) {
|
||||
LOG_D(MAC,"[UE %d] Frame %d Subframe %d: sync area %d SF alloc %d: msi flag %d, mcch flag %d, mtch flag %d\n",
|
||||
module_idP, frameP, subframe,l,j,msi_flag,mcch_flag,mtch_flag);
|
||||
*sync_area=i;
|
||||
}
|
||||
|
||||
//if(msi_flag == 1)
|
||||
// if((num_msi_per_CSA[mbms_mch_i]--)==0){
|
||||
// LOG_E(MAC,"Both MSI and MTCH Should be reset?\n");
|
||||
// msi_flag=mtch_flag=0;
|
||||
//}
|
||||
|
||||
|
||||
if ((mcch_flag == 1)) { // || (msi_flag==1))
|
||||
*mcch_active = 1;
|
||||
}
|
||||
|
||||
if ( (mcch_flag==1) || ((msi_flag==1) && (UE_mac_inst[module_idP].mcch_status==1)) ) {
|
||||
if (msi_flag!=1) {
|
||||
for (i=0; i<8; i++)
|
||||
UE_mac_inst[module_idP].commonSF_Alloc_r9_mbsfn_SubframeConfig[i] = NULL;
|
||||
|
||||
for (i=0; i<15; i++)
|
||||
UE_mac_inst[module_idP].pmch_Config[i] = NULL;
|
||||
|
||||
for (i=0; i<28 ; i++) {
|
||||
UE_mac_inst[module_idP].pmch_lcids[i] = -1;
|
||||
UE_mac_inst[module_idP].pmch_stop_mtch[i] = 2047;
|
||||
UE_mac_inst[module_idP].msi_status_v[i] = 0;
|
||||
}
|
||||
} else {
|
||||
for (i=0; i<28; i++) {
|
||||
UE_mac_inst[module_idP].pmch_lcids[i] = -1;
|
||||
UE_mac_inst[module_idP].pmch_stop_mtch[i] = 2047;
|
||||
UE_mac_inst[module_idP].msi_status_v[i] = 0;
|
||||
}
|
||||
}
|
||||
|
||||
return mcch_mcs;
|
||||
} else if ((mtch_flag==1) && (UE_mac_inst[module_idP].msi_status_v[(mch_lcid > 27) ? 27 : mch_lcid] == 1)) {
|
||||
return mtch_mcs;
|
||||
} else {
|
||||
return -1;
|
||||
}
|
||||
|
||||
|
||||
|
||||
// if(mcch_flag == 1 || msi_flag == 1 ){
|
||||
// *mcch_active = 1;
|
||||
// return (mcch_mcs);
|
||||
// }else if(mtch_flag == 1){
|
||||
// mtch_mcs=-1;
|
||||
// return (mtch_mcs);
|
||||
// }
|
||||
|
||||
// return -1;
|
||||
|
||||
}
|
||||
|
||||
|
||||
int ue_query_p_mch(module_id_t module_idP, uint32_t frameP, uint32_t subframe, int *mtch_active, int *msi_active, uint8_t *mch_lcid) {
|
||||
int i, j, mtch_mcs = -1;
|
||||
int mtch_flag = 0;
|
||||
@@ -1100,6 +1558,7 @@ int ue_query_p_mch(module_id_t module_idP, uint32_t frameP, uint32_t subframe, i
|
||||
return mtch_mcs;
|
||||
}
|
||||
|
||||
|
||||
int ue_query_mch(module_id_t module_idP, uint8_t CC_id, uint32_t frameP, uint32_t subframe, uint8_t eNB_index,uint8_t *sync_area, uint8_t *mcch_active) {
|
||||
int i = 0, j = 0, ii = 0, jj = 0, msi_pos = 0, mcch_mcs = -1, mtch_mcs = -1;
|
||||
int l =0;
|
||||
@@ -1162,6 +1621,11 @@ int ue_query_mch(module_id_t module_idP, uint8_t CC_id, uint32_t frameP, uint32_
|
||||
ii = UE_mac_inst[module_idP].mbsfn_SubframeConfig[j]->subframeAllocation.choice.oneFrame.buf[0] & (0x80 >> msi_pos);
|
||||
msi_pos++;
|
||||
}
|
||||
if(msi_pos == subframe){
|
||||
UE_mac_inst[module_idP].common_num_sf_alloc=0;
|
||||
mbms_mch_i=0;
|
||||
LOG_D(MAC,"MSP, frameP %d subframeP %d msi_pos(%d) mbms_mch_i %d\n",frameP, subframe, msi_pos,mbms_mch_i);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1170,6 +1634,14 @@ int ue_query_mch(module_id_t module_idP, uint8_t CC_id, uint32_t frameP, uint32_
|
||||
case 1:
|
||||
if (UE_mac_inst[module_idP].tdd_Config == NULL) {
|
||||
if ((UE_mac_inst[module_idP].mbsfn_SubframeConfig[j]->subframeAllocation.choice.oneFrame.buf[0] & MBSFN_FDD_SF1) == MBSFN_FDD_SF1) {
|
||||
if(UE_mac_inst[module_idP].pmch_Config[mbms_mch_i+1]!=NULL){
|
||||
if( UE_mac_inst[module_idP].common_num_sf_alloc == UE_mac_inst[module_idP].pmch_Config[mbms_mch_i]->sf_AllocEnd_r9){
|
||||
msi_pos=1;
|
||||
mbms_mch_i++;
|
||||
LOG_D(MAC,"MSP, frameP %d subframeP %d msi_pos(%d) mbms_mch_i %d\n",frameP, subframe, msi_pos,mbms_mch_i);
|
||||
}
|
||||
}
|
||||
|
||||
if (msi_pos == 1) {
|
||||
msi_flag = 1;
|
||||
}
|
||||
@@ -1188,6 +1660,14 @@ int ue_query_mch(module_id_t module_idP, uint8_t CC_id, uint32_t frameP, uint32_
|
||||
case 2:
|
||||
if (UE_mac_inst[module_idP].tdd_Config == NULL) {
|
||||
if ((UE_mac_inst[module_idP].mbsfn_SubframeConfig[j]->subframeAllocation.choice.oneFrame.buf[0] & MBSFN_FDD_SF2) == MBSFN_FDD_SF2) {
|
||||
if(UE_mac_inst[module_idP].pmch_Config[mbms_mch_i+1]!=NULL){
|
||||
if( UE_mac_inst[module_idP].common_num_sf_alloc == UE_mac_inst[module_idP].pmch_Config[mbms_mch_i]->sf_AllocEnd_r9){
|
||||
msi_pos=2;
|
||||
mbms_mch_i++;
|
||||
LOG_D(MAC,"MSP, frameP %d subframeP %d msi_pos(%d) mbms_mch_i %d\n",frameP, subframe, msi_pos,mbms_mch_i);
|
||||
}
|
||||
}
|
||||
|
||||
if (msi_pos == 2) {
|
||||
msi_flag = 1;
|
||||
}
|
||||
@@ -1219,6 +1699,14 @@ int ue_query_mch(module_id_t module_idP, uint8_t CC_id, uint32_t frameP, uint32_
|
||||
}
|
||||
} else { // FDD
|
||||
if ((UE_mac_inst[module_idP].mbsfn_SubframeConfig[j]->subframeAllocation.choice.oneFrame.buf[0] & MBSFN_FDD_SF3) == MBSFN_FDD_SF3) {
|
||||
if(UE_mac_inst[module_idP].pmch_Config[mbms_mch_i+1]!=NULL){
|
||||
if( UE_mac_inst[module_idP].common_num_sf_alloc == UE_mac_inst[module_idP].pmch_Config[mbms_mch_i]->sf_AllocEnd_r9){
|
||||
msi_pos=3;
|
||||
mbms_mch_i++;
|
||||
LOG_D(MAC,"MSP, frameP %d subframeP %d msi_pos(%d) mbms_mch_i %d\n",frameP, subframe, msi_pos,mbms_mch_i);
|
||||
}
|
||||
}
|
||||
|
||||
if (msi_pos == 3) {
|
||||
msi_flag = 1;
|
||||
}
|
||||
@@ -1255,6 +1743,14 @@ int ue_query_mch(module_id_t module_idP, uint8_t CC_id, uint32_t frameP, uint32_
|
||||
case 6:
|
||||
if (UE_mac_inst[module_idP].tdd_Config == NULL) {
|
||||
if ((UE_mac_inst[module_idP].mbsfn_SubframeConfig[j]->subframeAllocation.choice.oneFrame.buf[0] & MBSFN_FDD_SF6) == MBSFN_FDD_SF6) {
|
||||
if(UE_mac_inst[module_idP].pmch_Config[mbms_mch_i+1]!=NULL){
|
||||
if( UE_mac_inst[module_idP].common_num_sf_alloc == UE_mac_inst[module_idP].pmch_Config[mbms_mch_i]->sf_AllocEnd_r9){
|
||||
msi_pos=6;
|
||||
mbms_mch_i++;
|
||||
LOG_D(MAC,"MSP, frameP %d subframeP %d msi_pos(%d) mbms_mch_i %d\n",frameP, subframe, msi_pos,mbms_mch_i);
|
||||
}
|
||||
}
|
||||
|
||||
if (msi_pos == 4) {
|
||||
msi_flag = 1;
|
||||
}
|
||||
@@ -1286,6 +1782,14 @@ int ue_query_mch(module_id_t module_idP, uint8_t CC_id, uint32_t frameP, uint32_
|
||||
}
|
||||
} else { // FDD
|
||||
if ((UE_mac_inst[module_idP].mbsfn_SubframeConfig[j]->subframeAllocation.choice.oneFrame.buf[0] & MBSFN_FDD_SF7) == MBSFN_FDD_SF7) {
|
||||
if(UE_mac_inst[module_idP].pmch_Config[mbms_mch_i+1]!=NULL){
|
||||
if( UE_mac_inst[module_idP].common_num_sf_alloc == UE_mac_inst[module_idP].pmch_Config[mbms_mch_i]->sf_AllocEnd_r9){
|
||||
msi_pos=5;
|
||||
mbms_mch_i++;
|
||||
LOG_D(MAC,"MSP, frameP %d subframeP %d msi_pos(%d) mbms_mch_i %d\n",frameP, subframe, msi_pos,mbms_mch_i);
|
||||
}
|
||||
}
|
||||
|
||||
if (msi_pos == 5) {
|
||||
msi_flag = 1;
|
||||
}
|
||||
@@ -1317,6 +1821,13 @@ int ue_query_mch(module_id_t module_idP, uint8_t CC_id, uint32_t frameP, uint32_
|
||||
}
|
||||
} else { // FDD
|
||||
if ((UE_mac_inst[module_idP].mbsfn_SubframeConfig[j]->subframeAllocation.choice.oneFrame.buf[0] & MBSFN_FDD_SF8) == MBSFN_FDD_SF8) {
|
||||
if(UE_mac_inst[module_idP].pmch_Config[mbms_mch_i+1]!=NULL){
|
||||
if( UE_mac_inst[module_idP].common_num_sf_alloc == UE_mac_inst[module_idP].pmch_Config[mbms_mch_i]->sf_AllocEnd_r9){
|
||||
msi_pos=6;
|
||||
mbms_mch_i++;
|
||||
LOG_D(MAC,"MSP, frameP %d subframeP %d msi_pos(%d) mbms_mch_i %d\n",frameP, subframe, msi_pos,mbms_mch_i);
|
||||
}
|
||||
}
|
||||
if (msi_pos == 6) {
|
||||
msi_flag = 1;
|
||||
}
|
||||
@@ -1351,6 +1862,14 @@ int ue_query_mch(module_id_t module_idP, uint8_t CC_id, uint32_t frameP, uint32_
|
||||
break;
|
||||
}// end switch
|
||||
|
||||
if( (msi_flag == 1) || (mcch_flag == 1) || (mtch_flag == 1) ){
|
||||
UE_mac_inst[module_idP].common_num_sf_alloc++;
|
||||
//if( (msi_flag!=1 && mcch_flag!=1) || (msi_flag!=1 && mcch_flag!=1 && mtch_flag!=1) ){
|
||||
//UE_mac_inst[module_idP].common_num_sf_alloc++;
|
||||
//}
|
||||
}
|
||||
|
||||
#ifdef OLD
|
||||
// Acount for sf_allocable in CSA
|
||||
int num_sf_alloc = 0;
|
||||
|
||||
@@ -1392,11 +1911,86 @@ int ue_query_mch(module_id_t module_idP, uint8_t CC_id, uint32_t frameP, uint32_
|
||||
}
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
{
|
||||
// Acount for sf_allocable in Common SF Allocation
|
||||
int num_sf_alloc = 0;
|
||||
|
||||
for (l = 0; l < 8; l++) {
|
||||
if (UE_mac_inst[module_idP].commonSF_Alloc_r9_mbsfn_SubframeConfig[l] == NULL)
|
||||
continue;
|
||||
|
||||
if (UE_mac_inst[module_idP].commonSF_Alloc_r9_mbsfn_SubframeConfig[l]->subframeAllocation.present != LTE_MBSFN_SubframeConfig__subframeAllocation_PR_oneFrame)
|
||||
continue;
|
||||
|
||||
//int common_mbsfn_alloc_offset = UE_mac_inst[module_idP].commonSF_Alloc_r9_mbsfn_SubframeConfig[l]->radioframeAllocationOffset;
|
||||
//long common_mbsfn_period = 1 << UE_mac_inst[module_idP].commonSF_Alloc_r9_mbsfn_SubframeConfig[l]->radioframeAllocationPeriod;
|
||||
//long commonSF_AllocPeriod = 4 << UE_mac_inst[module_idP].commonSF_AllocPeriod_r9;
|
||||
|
||||
uint32_t common_mbsfn_SubframeConfig = UE_mac_inst[module_idP].commonSF_Alloc_r9_mbsfn_SubframeConfig[l]->subframeAllocation.choice.oneFrame.buf[0];
|
||||
|
||||
for (j = 0; j < 6; j++)
|
||||
num_sf_alloc += ((common_mbsfn_SubframeConfig & (0x80 >> j)) == (0x80 >> j));
|
||||
}
|
||||
|
||||
|
||||
for (l = 0; l < 8; l++) {
|
||||
if (UE_mac_inst[module_idP].commonSF_Alloc_r9_mbsfn_SubframeConfig[l] == NULL)
|
||||
continue;
|
||||
|
||||
if (UE_mac_inst[module_idP].commonSF_Alloc_r9_mbsfn_SubframeConfig[l]->subframeAllocation.present != LTE_MBSFN_SubframeConfig__subframeAllocation_PR_oneFrame)
|
||||
continue;
|
||||
|
||||
//int common_mbsfn_alloc_offset = UE_mac_inst[module_idP].commonSF_Alloc_r9_mbsfn_SubframeConfig[l]->radioframeAllocationOffset;
|
||||
long common_mbsfn_period = 1 << UE_mac_inst[module_idP].commonSF_Alloc_r9_mbsfn_SubframeConfig[l]->radioframeAllocationPeriod;
|
||||
long commonSF_AllocPeriod = 4 << UE_mac_inst[module_idP].commonSF_AllocPeriod_r9;
|
||||
|
||||
|
||||
if(msi_flag==1 && UE_mac_inst[module_idP].pmch_Config[mbms_mch_i] != NULL){
|
||||
LOG_D(MAC,"msi(%d) should be allocated:frame(%d),submframe(%d),num_sf_alloc(%d),sf_AllocEnd_r9(%ld),common_num_sf_alloc(%d)\n",mbms_mch_i,frameP,subframe,num_sf_alloc,UE_mac_inst[module_idP].pmch_Config[mbms_mch_i]->sf_AllocEnd_r9,
|
||||
UE_mac_inst[module_idP].common_num_sf_alloc);
|
||||
UE_mac_inst[module_idP].msi_current_alloc = UE_mac_inst[module_idP].common_num_sf_alloc;//num_sf_alloc;
|
||||
UE_mac_inst[module_idP].msi_pmch = mbms_mch_i;
|
||||
}else if(UE_mac_inst[module_idP].pmch_Config[mbms_mch_i] != NULL){
|
||||
if (UE_mac_inst[module_idP].pmch_stop_mtch[mbms_mch_i] >= UE_mac_inst[module_idP].common_num_sf_alloc/*num_sf_alloc*/) {
|
||||
if (UE_mac_inst[module_idP].pmch_stop_mtch[mbms_mch_i] != 2047) {
|
||||
mtch_flag = 1;
|
||||
if (UE_mac_inst[module_idP].pmch_Config[UE_mac_inst[module_idP].msi_pmch] != NULL)
|
||||
mtch_mcs = UE_mac_inst[module_idP].pmch_Config[UE_mac_inst[module_idP].msi_pmch]->dataMCS_r9;
|
||||
else
|
||||
mtch_mcs = -1;
|
||||
mch_lcid = (uint8_t)mbms_mch_i;
|
||||
LOG_D(MAC,"mtch should be allocated:frame(%d),submframe(%d),num_sf_alloc(%d),mtch_mcs(%d),pmch_stop_mtch(%d),lcid(%d),msi_pmch(%d)\n",frameP,subframe,num_sf_alloc,mtch_mcs,
|
||||
UE_mac_inst[module_idP].pmch_stop_mtch[mbms_mch_i],UE_mac_inst[module_idP].pmch_lcids[mbms_mch_i],UE_mac_inst[module_idP].msi_pmch);
|
||||
}
|
||||
}
|
||||
}
|
||||
//LOG_D(MAC,"UE_mac_inst[module_idP].common_num_sf_alloc: %d num_sf_alloc %d mbms_mch_i %d commonSF_AllocPeriod %d common_mbsfn_period %d\n",UE_mac_inst[module_idP].common_num_sf_alloc,num_sf_alloc,mbms_mch_i,commonSF_AllocPeriod,common_mbsfn_period);
|
||||
UE_mac_inst[module_idP].common_num_sf_alloc = UE_mac_inst[module_idP].common_num_sf_alloc % ((num_sf_alloc* commonSF_AllocPeriod-mbms_mch_i) / common_mbsfn_period);//48;
|
||||
|
||||
|
||||
if(mtch_flag)
|
||||
break;
|
||||
}
|
||||
if(msi_flag==1){
|
||||
for (l = 0; l < 8; l++) {
|
||||
if (UE_mac_inst[module_idP].commonSF_Alloc_r9_mbsfn_SubframeConfig[l] == NULL)
|
||||
continue;
|
||||
|
||||
if ( (/*AJ*/ (/*V*/ ( /*U*/ (frameP %(4 << UE_mac_inst[module_idP].commonSF_AllocPeriod_r9)) ) / 8 ) % ((8 <<UE_mac_inst[module_idP].pmch_Config[mbms_mch_i]->mch_SchedulingPeriod_r9) / 8 ) ) != 0 ){
|
||||
msi_flag=0;
|
||||
LOG_D(MAC,"frameP %d subframeP %d reset(%d)\n",frameP, subframe, mbms_mch_i);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
// sf allocation is non-overlapping
|
||||
if ((msi_flag==1) || (mcch_flag==1) || (mtch_flag==1)) {
|
||||
LOG_D(MAC,"[UE %d] Frame %d Subframe %d: sync area %d SF alloc %d: msi flag %d, mcch flag %d, mtch flag %d\n",
|
||||
module_idP, frameP, subframe,l,j,msi_flag,mcch_flag,mtch_flag);
|
||||
LOG_D(MAC,"[UE %d] Frame %d Subframe %d: sync area %d SF alloc %d: msi flag %d, mcch flag %d, mtch flag %d x %d\n",
|
||||
module_idP, frameP, subframe,l,j,msi_flag,mcch_flag,mtch_flag,UE_mac_inst[module_idP].common_num_sf_alloc);
|
||||
*sync_area=i;
|
||||
break;
|
||||
}
|
||||
|
||||
@@ -310,7 +310,7 @@ int pdcp_fifo_read_input_mbms_sdus_fromtun (const protocol_ctxt_t *const ctxt_p
|
||||
ctxt.module_id, ctxt.rnti, ctxt.enb_flag);
|
||||
|
||||
if (h_rc == HASH_TABLE_OK) {
|
||||
LOG_I(PDCP, "[FRAME %5u][UE][NETLINK][IP->PDCP] INST %d: Received socket with length %d on Rab %ld \n",
|
||||
LOG_D(PDCP, "[FRAME %5u][UE][NETLINK][IP->PDCP] INST %d: Received socket with length %d on Rab %ld \n",
|
||||
ctxt.frame, ctxt.instance, len, rab_id);
|
||||
LOG_D(PDCP, "[FRAME %5u][UE][IP][INSTANCE %u][RB %ld][--- PDCP_DATA_REQ / %d Bytes --->][PDCP][MOD %u][UE %04x][RB %ld]\n",
|
||||
ctxt.frame, ctxt.instance, rab_id, len, ctxt.module_id,
|
||||
|
||||
@@ -519,7 +519,7 @@ rlc_op_status_t rlc_data_req (const protocol_ctxt_t *const ctxt_pP,
|
||||
// LOG_I(RLC,"DUY rlc_data_req: mbms_rb_id in RLC instant is: %d\n", mbms_rb_id);
|
||||
if (sdu_pP != NULL) {
|
||||
if (sdu_sizeP > 0) {
|
||||
LOG_I(RLC,"received a packet with size %d for MBMS \n", sdu_sizeP);
|
||||
LOG_D(RLC,"received a packet with size %d for MBMS \n", sdu_sizeP);
|
||||
new_sdu_p = get_free_mem_block (sdu_sizeP + sizeof (struct rlc_um_data_req_alloc), __func__);
|
||||
|
||||
if (new_sdu_p != NULL) {
|
||||
|
||||
@@ -640,7 +640,8 @@ rlc_union_t *rrc_rlc_add_rlc (
|
||||
} else if (h_rc == HASH_TABLE_KEY_NOT_EXISTS) {
|
||||
rlc_union_p = calloc(1, sizeof(rlc_union_t));
|
||||
h_rc = hashtable_insert(rlc_coll_p, key, rlc_union_p);
|
||||
h_lcid_rc = hashtable_insert(rlc_coll_p, key_lcid, rlc_union_p);
|
||||
if(MBMS_flagP != TRUE)
|
||||
h_lcid_rc = hashtable_insert(rlc_coll_p, key_lcid, rlc_union_p);
|
||||
|
||||
if ((h_rc == HASH_TABLE_OK) && (h_lcid_rc == HASH_TABLE_OK)) {
|
||||
if (MBMS_flagP == TRUE) {
|
||||
|
||||
@@ -521,6 +521,7 @@ int MCE_send_MBMS_SCHEDULING_INFORMATION(instance_t instance, /*uint32_t assoc_i
|
||||
mbsfn_subframe_configuration->radioframeAllocationPeriod = m2ap_mbms_scheduling_information->mbms_area_config_list[i].mbms_sf_config_list[j].radioframe_allocation_period;
|
||||
mbsfn_subframe_configuration->radioframeAllocationOffset = m2ap_mbms_scheduling_information->mbms_area_config_list[i].mbms_sf_config_list[j].radioframe_allocation_offset;
|
||||
if(m2ap_mbms_scheduling_information->mbms_area_config_list[i].mbms_sf_config_list[j].is_four_sf){
|
||||
LOG_I(M2AP,"is_four_sf\n");
|
||||
mbsfn_subframe_configuration->subframeAllocation.present = M2AP_MBSFN_Subframe_Configuration__subframeAllocation_PR_fourFrames;
|
||||
mbsfn_subframe_configuration->subframeAllocation.choice.oneFrame.buf = MALLOC(3);
|
||||
mbsfn_subframe_configuration->subframeAllocation.choice.oneFrame.buf[2] = ((m2ap_mbms_scheduling_information->mbms_area_config_list[i].mbms_sf_config_list[j].subframe_allocation) & 0xFF);
|
||||
@@ -530,6 +531,7 @@ int MCE_send_MBMS_SCHEDULING_INFORMATION(instance_t instance, /*uint32_t assoc_i
|
||||
mbsfn_subframe_configuration->subframeAllocation.choice.oneFrame.bits_unused = 0;
|
||||
|
||||
}else{
|
||||
LOG_I(M2AP,"is_one_sf\n");
|
||||
mbsfn_subframe_configuration->subframeAllocation.present = M2AP_MBSFN_Subframe_Configuration__subframeAllocation_PR_oneFrame;
|
||||
mbsfn_subframe_configuration->subframeAllocation.choice.oneFrame.buf = MALLOC(1);
|
||||
mbsfn_subframe_configuration->subframeAllocation.choice.oneFrame.size = 1;
|
||||
@@ -1357,11 +1359,10 @@ int MCE_handle_MBMS_SESSION_UPDATE_RESPONSE(instance_t instance,
|
||||
|
||||
|
||||
|
||||
int MCE_handle_MBMS_SESSION_UPDATE_FAILURE(instance_t instance,
|
||||
uint32_t assoc_id,
|
||||
uint32_t stream,
|
||||
M2AP_M2AP_PDU_t *pdu){
|
||||
int MCE_handle_MBMS_SESSION_UPDATE_FAILURE(instance_t instance,module_id_t du_mod_idP){
|
||||
|
||||
AssertFatal(1==0,"Not implemented yet\n");
|
||||
|
||||
}
|
||||
|
||||
/*
|
||||
@@ -1378,16 +1379,138 @@ int MCE_handle_MBMS_SERVICE_COUNTING_RESPONSE(instance_t instance,
|
||||
uint32_t assoc_id,
|
||||
uint32_t stream,
|
||||
M2AP_M2AP_PDU_t *pdu){
|
||||
AssertFatal(1==0,"Not implemented yet\n");
|
||||
//int i;
|
||||
//AssertFatal(1==0,"Not implemented yet\n");
|
||||
LOG_D(M2AP, "MCE_handle_MBMS_SERVICE_COUNTING_RESPONSE\n");
|
||||
|
||||
AssertFatal(pdu->present == M2AP_M2AP_PDU_PR_successfulOutcome,
|
||||
"pdu->present != M2AP_M2AP_PDU_PR_successfulOutcome\n");
|
||||
AssertFatal(pdu->choice.successfulOutcome.procedureCode == M2AP_ProcedureCode_id_mbmsServiceCounting,
|
||||
"pdu->choice.successfulOutcome->procedureCode != M2AP_ProcedureCode_id_mbmsServiceCounting\n");
|
||||
AssertFatal(pdu->choice.successfulOutcome.criticality == M2AP_Criticality_reject,
|
||||
"pdu->choice.successfulOutcome->criticality != M2AP_Criticality_reject\n");
|
||||
AssertFatal(pdu->choice.successfulOutcome.value.present == M2AP_SuccessfulOutcome__value_PR_MbmsServiceCountingResponse,
|
||||
"pdu->choice.successfulOutcome.value.present != M2AP_SuccessfulOutcome__value_PR_MbmsServiceCountingResponse\n");
|
||||
|
||||
|
||||
M2AP_MbmsServiceCountingResponse_t *in = &pdu->choice.successfulOutcome.value.choice.MbmsServiceCountingResponse;
|
||||
//M2AP_MbmsServiceCountingResponse_Ies_t *ie;
|
||||
//int MCE_MBMS_M2AP_ID=-1;
|
||||
//int ENB_MBMS_M2AP_ID=-1;
|
||||
|
||||
|
||||
MessageDef *msg_g = itti_alloc_new_message(TASK_M2AP_MCE,M2AP_MBMS_SERVICE_COUNTING_RESP); //TODO
|
||||
|
||||
LOG_D(M2AP, "M2AP: MbmsServiceCounting-Resp: protocolIEs.list.count %d\n",
|
||||
in->protocolIEs.list.count);
|
||||
for (int i=0;i < in->protocolIEs.list.count; i++) {
|
||||
//ie = in->protocolIEs.list.array[i];
|
||||
// switch (ie->id) {
|
||||
// case M2AP_ProtocolIE_ID_id_MCE_MBMS_M2AP_ID:
|
||||
// AssertFatal(ie->criticality == M2AP_Criticality_reject,
|
||||
// "ie->criticality != M2AP_Criticality_reject\n");
|
||||
// AssertFatal(ie->value.present == M2AP_SessionStartResponse_Ies__value_PR_MCE_MBMS_M2AP_ID,
|
||||
// "ie->value.present != M2AP_sessionStartResponse_IEs__value_PR_MCE_MBMS_M2AP_ID\n");
|
||||
// MCE_MBMS_M2AP_ID=ie->value.choice.MCE_MBMS_M2AP_ID;
|
||||
// LOG_D(M2AP, "M2AP: SessionStart-Resp: MCE_MBMS_M2AP_ID %d\n",
|
||||
// MCE_MBMS_M2AP_ID);
|
||||
// break;
|
||||
// case M2AP_ProtocolIE_ID_id_ENB_MBMS_M2AP_ID:
|
||||
// AssertFatal(ie->criticality == M2AP_Criticality_reject,
|
||||
// "ie->criticality != M2AP_Criticality_reject\n");
|
||||
// AssertFatal(ie->value.present == M2AP_SessionStartResponse_Ies__value_PR_ENB_MBMS_M2AP_ID,
|
||||
// "ie->value.present != M2AP_sessionStartResponse_Ies__value_PR_ENB_MBMS_M2AP_ID\n");
|
||||
// ENB_MBMS_M2AP_ID=ie->value.choice.ENB_MBMS_M2AP_ID;
|
||||
// LOG_D(M2AP, "M2AP: SessionStart-Resp: ENB_MBMS_M2AP_ID %d\n",
|
||||
// ENB_MBMS_M2AP_ID);
|
||||
// break;
|
||||
// }
|
||||
}
|
||||
|
||||
//AssertFatal(MCE_MBMS_M2AP_ID!=-1,"MCE_MBMS_M2AP_ID was not sent\n");
|
||||
//AssertFatal(ENB_MBMS_M2AP_ID!=-1,"ENB_MBMS_M2AP_ID was not sent\n");
|
||||
//M2AP_SESSION_START_RESP(msg_p).
|
||||
// MSC_LOG_RX_MESSAGE(
|
||||
// MSC_M2AP_MCE,
|
||||
// MSC_M2AP_ENB,
|
||||
//return 0;
|
||||
// 0,
|
||||
// 0,
|
||||
// MSC_AS_TIME_FMT" MCE_handle_M2_SESSION_START_RESPONSE successfulOutcome assoc_id %d",
|
||||
// 0,0,//MSC_AS_TIME_ARGS(ctxt_pP),
|
||||
// assoc_id);
|
||||
//
|
||||
//LOG_D(M2AP, "Sending ITTI message to ENB_APP with assoc_id (%d->%d)\n",
|
||||
//assoc_id,ENB_MODULE_ID_TO_INSTANCE(assoc_id));
|
||||
|
||||
itti_send_msg_to_task(TASK_MCE_APP, ENB_MODULE_ID_TO_INSTANCE(assoc_id), msg_g);
|
||||
return 0;
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
int MCE_handle_MBMS_SESSION_COUNTING_FAILURE(instance_t instance,
|
||||
uint32_t assoc_id,
|
||||
uint32_t stream,
|
||||
M2AP_M2AP_PDU_t *pdu){
|
||||
AssertFatal(1==0,"Not implemented yet\n");
|
||||
int MCE_handle_MBMS_SESSION_COUNTING_FAILURE(instance_t instance, module_id_t du_mod_idP){
|
||||
|
||||
M2AP_M2AP_PDU_t pdu;
|
||||
M2AP_MbmsServiceCountingRequest_t *out;
|
||||
M2AP_MbmsServiceCountingRequest_Ies_t *ie;
|
||||
|
||||
uint8_t *buffer;
|
||||
uint32_t len;
|
||||
//int i=0;
|
||||
//int j=0;
|
||||
|
||||
/* Create */
|
||||
/* 0. pdu Type */
|
||||
memset(&pdu, 0, sizeof(pdu));
|
||||
pdu.present = M2AP_M2AP_PDU_PR_initiatingMessage;
|
||||
//pdu.choice.initiatingMessage = (M2AP_InitiatingMessage_t *)calloc(1, sizeof(M2AP_InitiatingMessage_t));
|
||||
pdu.choice.initiatingMessage.procedureCode = M2AP_ProcedureCode_id_mbmsServiceCounting;
|
||||
pdu.choice.initiatingMessage.criticality = M2AP_Criticality_reject;
|
||||
pdu.choice.initiatingMessage.value.present = M2AP_InitiatingMessage__value_PR_MbmsServiceCountingRequest;
|
||||
out = &pdu.choice.initiatingMessage.value.choice.MbmsServiceCountingRequest;
|
||||
|
||||
/* mandatory */
|
||||
/* c1. MCCH_Update_Time */ //long
|
||||
ie=(M2AP_MbmsServiceCountingRequest_Ies_t *)calloc(1,sizeof(M2AP_MbmsSchedulingInformation_Ies_t));
|
||||
ie->id = M2AP_ProtocolIE_ID_id_MCCH_Update_Time;
|
||||
ie->criticality = M2AP_Criticality_reject;
|
||||
ie->value.present = M2AP_MbmsServiceCountingRequest_Ies__value_PR_MCCH_Update_Time;
|
||||
//ie->value.choice.MCCH_Update_Time = ;
|
||||
//ie->value.choice.MCCH_Update_Time = m2ap_mbms_scheduling_information->mcch_update_time;
|
||||
|
||||
ASN_SEQUENCE_ADD(&out->protocolIEs.list, ie);
|
||||
|
||||
|
||||
/* mandatory */
|
||||
/* c1. MCE_MBMS_M2AP_ID (integer value) */ //long
|
||||
ie = (M2AP_MbmsServiceCountingRequest_Ies_t *)calloc(1, sizeof(M2AP_MbmsServiceCountingRequest_Ies_t));
|
||||
ie->id = M2AP_ProtocolIE_ID_id_MBSFN_Area_ID;
|
||||
ie->criticality = M2AP_Criticality_reject;
|
||||
ie->value.present = M2AP_MbmsServiceCountingRequest_Ies__value_PR_MBSFN_Area_ID;
|
||||
//ie->value.choice.MCE_MBMS_M2AP_ID = /*F1AP_get_next_transaction_identifier(enb_mod_idP, du_mod_idP);*/ //?
|
||||
ASN_SEQUENCE_ADD(&out->protocolIEs.list, ie);
|
||||
|
||||
/* mandatory */
|
||||
/* c2. TMGI (integrer value) */
|
||||
ie = (M2AP_MbmsServiceCountingRequest_Ies_t *)calloc(1, sizeof(M2AP_MbmsServiceCountingRequest_Ies_t ));
|
||||
ie->id = M2AP_ProtocolIE_ID_id_MBMS_Counting_Request_Session;
|
||||
ie->criticality = M2AP_Criticality_reject;
|
||||
ie->value.present = M2AP_MbmsServiceCountingRequest_Ies__value_PR_MBMS_Counting_Request_Session;
|
||||
|
||||
//M2AP_MBMS_Counting_Request_Session_t * m2ap_mbms_counting_request_session = &ie->value.choice.MBMS_Counting_Request_Session;
|
||||
|
||||
//&ie->choice.TMGI.pLMN_Identity);
|
||||
//INT16_TO_OCTET_STRING(0,&ie->choice.TMGI.serviceId);
|
||||
ASN_SEQUENCE_ADD(&out->protocolIEs.list, ie);
|
||||
|
||||
if (m2ap_encode_pdu(&pdu, &buffer, &len) < 0) {
|
||||
LOG_E(M2AP, "Failed to encode MBMS Service Counting Results Report\n");
|
||||
return -1;
|
||||
}
|
||||
|
||||
return 0;
|
||||
|
||||
}
|
||||
|
||||
|
||||
@@ -150,10 +150,7 @@ int MCE_handle_MBMS_SESSION_UPDATE_RESPONSE(instance_t instance,
|
||||
uint32_t stream,
|
||||
M2AP_M2AP_PDU_t *pdu);
|
||||
|
||||
int MCE_handle_MBMS_SESSION_UPDATE_FAILURE(instance_t instance,
|
||||
uint32_t assoc_id,
|
||||
uint32_t stream,
|
||||
M2AP_M2AP_PDU_t *pdu);
|
||||
int MCE_handle_MBMS_SESSION_UPDATE_FAILURE(instance_t instance,module_id_t du_mod_idP);
|
||||
|
||||
/*
|
||||
* Service Counting Request
|
||||
@@ -165,10 +162,7 @@ int MCE_handle_MBMS_SERVICE_COUNTING_RESPONSE(instance_t instance,
|
||||
uint32_t stream,
|
||||
M2AP_M2AP_PDU_t *pdu);
|
||||
|
||||
int MCE_handle_MBMS_SESSION_COUNTING_FAILURE(instance_t instance,
|
||||
uint32_t assoc_id,
|
||||
uint32_t stream,
|
||||
M2AP_M2AP_PDU_t *pdu);
|
||||
int MCE_handle_MBMS_SESSION_COUNTING_FAILURE(instance_t instance, module_id_t du_mod_idP);
|
||||
/*
|
||||
* Service Counting Results Report
|
||||
*/
|
||||
|
||||
@@ -142,6 +142,22 @@ void m2ap_eNB_handle_sctp_association_resp(instance_t instance, sctp_new_associa
|
||||
sctp_new_association_resp->ulp_cnx_id);
|
||||
//m2ap_handle_m2_setup_message(instance_p, m2ap_enb_data_p,
|
||||
// sctp_new_association_resp->sctp_state == SCTP_STATE_SHUTDOWN);
|
||||
|
||||
sleep(4);
|
||||
int index;
|
||||
/* Trying to connect to the provided list of eNB ip address */
|
||||
for (index = 0; index < instance_p->nb_m2; index++) {
|
||||
//M2AP_INFO("eNB[%d] eNB id %u acting as an initiator (client)\n",
|
||||
// instance_id, instance->eNB_id);
|
||||
m2ap_eNB_register_eNB(instance_p,
|
||||
&instance_p->target_mce_m2_ip_address[index],
|
||||
&instance_p->enb_m2_ip_address,
|
||||
instance_p->sctp_in_streams,
|
||||
instance_p->sctp_out_streams,
|
||||
instance_p->enb_port_for_M2C,
|
||||
instance_p->multi_sd);
|
||||
}
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -304,6 +320,8 @@ void m2ap_eNB_handle_register_eNB(instance_t instance,
|
||||
DevCheck(new_instance->mcc == m2ap_register_eNB->mcc, new_instance->mcc, m2ap_register_eNB->mcc, 0);
|
||||
DevCheck(new_instance->mnc == m2ap_register_eNB->mnc, new_instance->mnc, m2ap_register_eNB->mnc, 0);
|
||||
M2AP_WARN("eNB[%d] already registered\n", instance);
|
||||
|
||||
|
||||
} else {
|
||||
new_instance = calloc(1, sizeof(m2ap_eNB_instance_t));
|
||||
DevAssert(new_instance != NULL);
|
||||
|
||||
@@ -163,8 +163,12 @@ int eNB_handle_MBMS_SCHEDULING_INFORMATION(instance_t instance,
|
||||
M2AP_MBMS_SCHEDULING_INFORMATION(message_p).mbms_area_config_list[i].mbms_sf_config_list[j].radioframe_allocation_period = m2ap_mbsfn_sf_configuration->radioframeAllocationPeriod;
|
||||
M2AP_MBMS_SCHEDULING_INFORMATION(message_p).mbms_area_config_list[i].mbms_sf_config_list[j].radioframe_allocation_offset = m2ap_mbsfn_sf_configuration->radioframeAllocationOffset;
|
||||
if( m2ap_mbsfn_sf_configuration->subframeAllocation.present == M2AP_MBSFN_Subframe_Configuration__subframeAllocation_PR_fourFrames ) {
|
||||
LOG_I(RRC,"is_four_sf\n");
|
||||
M2AP_MBMS_SCHEDULING_INFORMATION(message_p).mbms_area_config_list[i].mbms_sf_config_list[j].is_four_sf = 1;
|
||||
M2AP_MBMS_SCHEDULING_INFORMATION(message_p).mbms_area_config_list[i].mbms_sf_config_list[j].subframe_allocation = m2ap_mbsfn_sf_configuration->subframeAllocation.choice.oneFrame.buf[0] | (m2ap_mbsfn_sf_configuration->subframeAllocation.choice.oneFrame.buf[1]<<8) | (m2ap_mbsfn_sf_configuration->subframeAllocation.choice.oneFrame.buf[0]<<16);
|
||||
}else{
|
||||
LOG_I(RRC,"is_one_sf\n");
|
||||
M2AP_MBMS_SCHEDULING_INFORMATION(message_p).mbms_area_config_list[i].mbms_sf_config_list[j].is_four_sf = 0;
|
||||
M2AP_MBMS_SCHEDULING_INFORMATION(message_p).mbms_area_config_list[i].mbms_sf_config_list[j].subframe_allocation = (m2ap_mbsfn_sf_configuration->subframeAllocation.choice.oneFrame.buf[0] >> 2) & 0x3F;
|
||||
}
|
||||
}
|
||||
@@ -1262,46 +1266,226 @@ int eNB_handle_MBMS_SERVICE_COUNTING_REQ(instance_t instance,
|
||||
uint32_t stream,
|
||||
M2AP_M2AP_PDU_t *pdu)
|
||||
{
|
||||
LOG_D(M2AP, "eNB_handle_MBMS_SERVICE_COUNTING_REQUEST assoc_id %d\n",assoc_id);
|
||||
|
||||
MessageDef *message_p;
|
||||
LOG_D(M2AP, "eNB_handle_MBMS_SERVICE_COUNTING_REQUEST assoc_id %d\n",assoc_id);
|
||||
|
||||
//MessageDef *message_p;
|
||||
//M2AP_MbmsServiceCountingRequest_t *container;
|
||||
//M2AP_MbmsServiceCountingRequest_Ies_t *ie;
|
||||
M2AP_MbmsServiceCountingRequest_t *in;
|
||||
M2AP_MbmsServiceCountingRequest_Ies_t *ie;
|
||||
//int i = 0;
|
||||
int j;
|
||||
|
||||
DevAssert(pdu != NULL);
|
||||
|
||||
// container = &pdu->choice.initiatingMessage.value.choice.MbmsServiceCountingRequest;
|
||||
in = &pdu->choice.initiatingMessage.value.choice.MbmsServiceCountingRequest;
|
||||
|
||||
/* M2 Setup Request == Non UE-related procedure -> stream 0 */
|
||||
if (stream != 0) {
|
||||
LOG_D(M2AP, "[SCTP %d] Received MMBS session start request on stream != 0 (%d)\n",
|
||||
LOG_D(M2AP, "[SCTP %d] Received MMBS service Counting Request on stream != 0 (%d)\n",
|
||||
assoc_id, stream);
|
||||
}
|
||||
|
||||
message_p = itti_alloc_new_message (TASK_M2AP_ENB, M2AP_MBMS_SERVICE_COUNTING_REQ);
|
||||
for (j=0;j < in->protocolIEs.list.count; j++) {
|
||||
ie = in->protocolIEs.list.array[j];
|
||||
switch (ie->id) {
|
||||
case M2AP_ProtocolIE_ID_id_MCCH_Update_Time:
|
||||
AssertFatal(ie->criticality == M2AP_Criticality_reject,
|
||||
"ie->criticality != M2AP_Criticality_reject\n");
|
||||
AssertFatal(ie->value.present == M2AP_MbmsServiceCountingRequest_Ies__value_PR_MCCH_Update_Time,
|
||||
"ie->value.present != M2AP_MbmsServiceCountingRequest_Ies__value_PR_MCCH_Update_Time\n");
|
||||
LOG_D(M2AP, "M2AP: : MCCH_Update_Time \n");
|
||||
break;
|
||||
case M2AP_ProtocolIE_ID_id_MBSFN_Area_ID:
|
||||
AssertFatal(ie->criticality == M2AP_Criticality_reject,
|
||||
"ie->criticality != M2AP_Criticality_reject\n");
|
||||
AssertFatal(ie->value.present == M2AP_MbmsServiceCountingRequest_Ies__value_PR_MBSFN_Area_ID,
|
||||
"ie->value.present != M2AP_MbmsServiceCountingRequest_Ies__value_PR_MBSFN_Area_ID\n");
|
||||
LOG_D(M2AP, "M2AP: : MBSFN_Area_ID \n");
|
||||
break;
|
||||
case M2AP_ProtocolIE_ID_id_MBMS_Counting_Request_Session:
|
||||
AssertFatal(ie->criticality == M2AP_Criticality_reject,
|
||||
"ie->criticality != M2AP_Criticality_reject\n");
|
||||
AssertFatal(ie->value.present == M2AP_MbmsServiceCountingRequest_Ies__value_PR_MBMS_Counting_Request_Session,
|
||||
"ie->value.present != M2AP_MbmsServiceCountingRequest_Ies__value_PR_MBMS_Counting_Request_Session\n");
|
||||
LOG_D(M2AP, "M2AP: : MBMS_Counting_Request_Session \n");
|
||||
|
||||
//ie->value.choice.MBMS_Counting_Request_Session.list.count;
|
||||
|
||||
break;
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
itti_send_msg_to_task(TASK_ENB_APP, ENB_MODULE_ID_TO_INSTANCE(instance), message_p);
|
||||
|
||||
|
||||
//message_p = itti_alloc_new_message (TASK_M2AP_ENB, M2AP_MBMS_SERVICE_COUNTING_REQ);
|
||||
|
||||
|
||||
return 0;
|
||||
}
|
||||
int eNB_send_MBMS_SERVICE_COUNTING_REPORT(instance_t instance, m2ap_mbms_service_counting_report_t * m2ap_mbms_service_counting_report)
|
||||
{
|
||||
AssertFatal(1==0,"Not implemented yet\n");
|
||||
M2AP_M2AP_PDU_t pdu;
|
||||
M2AP_MbmsServiceCountingResultsReport_t *out;
|
||||
M2AP_MbmsServiceCountingResultsReport_Ies_t *ie;
|
||||
|
||||
uint8_t *buffer;
|
||||
uint32_t len;
|
||||
//int i = 0;
|
||||
//
|
||||
// memset(&pdu, 0, sizeof(pdu));
|
||||
pdu.present = M2AP_M2AP_PDU_PR_initiatingMessage;
|
||||
//pdu.choice.initiatingMessage = (M2AP_InitiatingMessage_t *)calloc(1, sizeof(M2AP_InitiatingMessage_t));
|
||||
pdu.choice.initiatingMessage.procedureCode = M2AP_ProcedureCode_id_mbmsServiceCountingResultsReport;
|
||||
pdu.choice.initiatingMessage.criticality = M2AP_Criticality_reject;
|
||||
pdu.choice.initiatingMessage.value.present = M2AP_InitiatingMessage__value_PR_MbmsServiceCountingResultsReport;
|
||||
out = &pdu.choice.initiatingMessage.value.choice.MbmsServiceCountingResultsReport;
|
||||
|
||||
|
||||
/* Create */
|
||||
/* 0. Message Type */
|
||||
memset(&pdu, 0, sizeof(pdu));
|
||||
pdu.present = M2AP_M2AP_PDU_PR_initiatingMessage;
|
||||
//pdu.choice.successfulOutcome = (M2AP_SuccessfulOutcome_t *)calloc(1, sizeof(M2AP_SuccessfulOutcome_t));
|
||||
pdu.choice.initiatingMessage.procedureCode = M2AP_ProcedureCode_id_mbmsServiceCountingResultsReport;
|
||||
pdu.choice.initiatingMessage.criticality = M2AP_Criticality_reject;
|
||||
pdu.choice.initiatingMessage.value.present = M2AP_InitiatingMessage__value_PR_MbmsServiceCountingResultsReport;
|
||||
out = &pdu.choice.initiatingMessage.value.choice.MbmsServiceCountingResultsReport;
|
||||
|
||||
/* mandatory */
|
||||
/* c1. MBSFN_Area_ID (integer value) */ //long
|
||||
ie = (M2AP_MbmsServiceCountingResultsReport_Ies_t *)calloc(1, sizeof(M2AP_MbmsServiceCountingResultsReport_Ies_t));
|
||||
ie->id = M2AP_ProtocolIE_ID_id_MBSFN_Area_ID;
|
||||
ie->criticality = M2AP_Criticality_reject;
|
||||
ie->value.present = M2AP_MbmsServiceCountingResultsReport_Ies__value_PR_MBSFN_Area_ID;
|
||||
//ie->value.choice.MCE_MBMS_M2AP_ID = /*F1AP_get_next_transaction_identifier(enb_mod_idP, du_mod_idP);*/ //?
|
||||
ASN_SEQUENCE_ADD(&out->protocolIEs.list, ie);
|
||||
|
||||
/* mandatory */
|
||||
/* c1. MBSFN_Area_ID (integer value) */ //long
|
||||
ie = (M2AP_MbmsServiceCountingResultsReport_Ies_t *)calloc(1, sizeof(M2AP_MbmsServiceCountingResultsReport_Ies_t));
|
||||
ie->id = M2AP_ProtocolIE_ID_id_MBMS_Counting_Result_List;
|
||||
ie->criticality = M2AP_Criticality_reject;
|
||||
ie->value.present = M2AP_MbmsServiceCountingResultsReport_Ies__value_PR_MBMS_Counting_Result_List;
|
||||
//ie->value.choice.MCE_MBMS_M2AP_ID = /*F1AP_get_next_transaction_identifier(enb_mod_idP, du_mod_idP);*/ //?
|
||||
M2AP_MBMS_Counting_Result_List_t * m2ap_mbms_counting_result_list = &ie->value.choice.MBMS_Counting_Result_List;
|
||||
|
||||
M2AP_MBMS_Counting_Result_Item_t * m2ap_mbms_counting_result_item = (M2AP_MBMS_Counting_Result_Item_t*)calloc(1,sizeof(M2AP_MBMS_Counting_Result_Item_t));
|
||||
m2ap_mbms_counting_result_item->id = M2AP_ProtocolIE_ID_id_MBMS_Counting_Result_Item;
|
||||
m2ap_mbms_counting_result_item->criticality = M2AP_Criticality_reject;
|
||||
m2ap_mbms_counting_result_item->value.present = M2AP_MBMS_Counting_Result_Item__value_PR_MBMS_Counting_Result;
|
||||
M2AP_MBMS_Counting_Result_t * m2ap_mbms_counting_result = &m2ap_mbms_counting_result_item->value.choice.MBMS_Counting_Result;
|
||||
|
||||
M2AP_TMGI_t * tmgi = &m2ap_mbms_counting_result->tmgi;
|
||||
MCC_MNC_TO_PLMNID(0,0,3,&tmgi->pLMNidentity);/*instance_p->mcc, instance_p->mnc, instance_p->mnc_digit_length,*/
|
||||
uint8_t TMGI[5] = {4,3,2,1,0};
|
||||
OCTET_STRING_fromBuf(&tmgi->serviceID,(const char*)&TMGI[2],3);
|
||||
|
||||
//M2AP_CountingResult_t * m2ap_counting_result = &m2ap_mbms_counting_result->countingResult;
|
||||
|
||||
ASN_SEQUENCE_ADD(&m2ap_mbms_counting_result_list->list,m2ap_mbms_counting_result_item);
|
||||
|
||||
|
||||
|
||||
ASN_SEQUENCE_ADD(&out->protocolIEs.list, ie);
|
||||
|
||||
if (m2ap_encode_pdu(&pdu, &buffer, &len) < 0) {
|
||||
LOG_E(M2AP, "Failed to encode MBMS Service Counting Results Report\n");
|
||||
return -1;
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
||||
int eNB_send_MBMS_SERVICE_COUNTING_RESP(instance_t instance, m2ap_mbms_service_counting_resp_t * m2ap_mbms_service_counting_resp)
|
||||
{
|
||||
AssertFatal(1==0,"Not implemented yet\n");
|
||||
M2AP_M2AP_PDU_t pdu;
|
||||
M2AP_MbmsServiceCountingResponse_t *out;
|
||||
M2AP_MbmsServiceCountingResponse_Ies_t *ie;
|
||||
|
||||
uint8_t *buffer;
|
||||
uint32_t len;
|
||||
//int i = 0;
|
||||
|
||||
/* Create */
|
||||
/* 0. Message Type */
|
||||
memset(&pdu, 0, sizeof(pdu));
|
||||
pdu.present = M2AP_M2AP_PDU_PR_successfulOutcome;
|
||||
//pdu.choice.successfulOutcome = (M2AP_SuccessfulOutcome_t *)calloc(1, sizeof(M2AP_SuccessfulOutcome_t));
|
||||
pdu.choice.successfulOutcome.procedureCode = M2AP_ProcedureCode_id_mbmsServiceCounting;
|
||||
pdu.choice.successfulOutcome.criticality = M2AP_Criticality_reject;
|
||||
pdu.choice.successfulOutcome.value.present = M2AP_SuccessfulOutcome__value_PR_MbmsServiceCountingResponse;
|
||||
out = &pdu.choice.successfulOutcome.value.choice.MbmsServiceCountingResponse;
|
||||
|
||||
|
||||
/* mandatory */
|
||||
/* c1. MCE_MBMS_M2AP_ID (integer value) */ //long
|
||||
ie = (M2AP_MbmsServiceCountingResponse_Ies_t*)calloc(1, sizeof(M2AP_MbmsServiceCountingResponse_Ies_t));
|
||||
ie->id = M2AP_ProtocolIE_ID_id_MCE_MBMS_M2AP_ID;
|
||||
ie->criticality = M2AP_Criticality_reject;
|
||||
ie->value.present = M2AP_MbmsServiceCountingResponse_Ies__value_PR_CriticalityDiagnostics;
|
||||
//ie->value.choice.MCE_MBMS_M2AP_ID = /*F1AP_get_next_transaction_identifier(enb_mod_idP, du_mod_idP);*/ //?
|
||||
ASN_SEQUENCE_ADD(&out->protocolIEs.list, ie);
|
||||
|
||||
if (m2ap_encode_pdu(&pdu, &buffer, &len) < 0) {
|
||||
LOG_E(M2AP, "Failed to encode MBMS Service Counting Results Report\n");
|
||||
return -1;
|
||||
}
|
||||
|
||||
return 0;
|
||||
return 0;
|
||||
}
|
||||
|
||||
int eNB_send_MBMS_SERVICE_COUNTING_FAILURE(instance_t instance, m2ap_mbms_service_counting_failure_t * m2ap_mbms_service_counting_failure)
|
||||
{
|
||||
AssertFatal(1==0,"Not implemented yet\n");
|
||||
M2AP_M2AP_PDU_t pdu;
|
||||
M2AP_MbmsServiceCountingFailure_t *out;
|
||||
M2AP_MbmsServiceCountingFailure_Ies_t *ie;
|
||||
|
||||
uint8_t *buffer;
|
||||
uint32_t len;
|
||||
//int i = 0;
|
||||
|
||||
/* Create */
|
||||
/* 0. Message Type */
|
||||
memset(&pdu, 0, sizeof(pdu));
|
||||
pdu.present = M2AP_M2AP_PDU_PR_unsuccessfulOutcome;
|
||||
//pdu.choice.successfulOutcome = (M2AP_SuccessfulOutcome_t *)calloc(1, sizeof(M2AP_SuccessfulOutcome_t));
|
||||
pdu.choice.unsuccessfulOutcome.procedureCode = M2AP_ProcedureCode_id_mbmsServiceCounting;
|
||||
pdu.choice.unsuccessfulOutcome.criticality = M2AP_Criticality_reject;
|
||||
pdu.choice.unsuccessfulOutcome.value.present = M2AP_UnsuccessfulOutcome__value_PR_MbmsServiceCountingFailure;
|
||||
out = &pdu.choice.unsuccessfulOutcome.value.choice.MbmsServiceCountingFailure;
|
||||
|
||||
|
||||
/* mandatory */
|
||||
/* c1. MCE_MBMS_M2AP_ID (integer value) */ //long
|
||||
ie = (M2AP_MbmsServiceCountingFailure_Ies_t*)calloc(1, sizeof(M2AP_MbmsServiceCountingFailure_Ies_t));
|
||||
ie->id = M2AP_ProtocolIE_ID_id_ENB_MBMS_M2AP_ID;
|
||||
ie->criticality = M2AP_Criticality_reject;
|
||||
ie->value.present = M2AP_MbmsServiceCountingFailure_Ies__value_PR_CriticalityDiagnostics;
|
||||
//ie->value.choice.MCE_MBMS_M2AP_ID = /*F1AP_get_next_transaction_identifier(enb_mod_idP, du_mod_idP);*/ //?
|
||||
ASN_SEQUENCE_ADD(&out->protocolIEs.list, ie);
|
||||
|
||||
/* mandatory */
|
||||
/* c2. Cause */
|
||||
ie = (M2AP_MbmsServiceCountingFailure_Ies_t *)calloc(1, sizeof(M2AP_MbmsServiceCountingFailure_Ies_t));
|
||||
ie->id = M2AP_ProtocolIE_ID_id_Cause;
|
||||
ie->criticality = M2AP_Criticality_ignore;
|
||||
ie->value.present = M2AP_MbmsServiceCountingFailure_Ies__value_PR_Cause;
|
||||
ie->value.choice.Cause.present = M2AP_Cause_PR_radioNetwork;
|
||||
ie->value.choice.Cause.choice.radioNetwork = M2AP_CauseRadioNetwork_unspecified;
|
||||
ASN_SEQUENCE_ADD(&out->protocolIEs.list, ie);
|
||||
|
||||
|
||||
if (m2ap_encode_pdu(&pdu, &buffer, &len) < 0) {
|
||||
LOG_E(M2AP, "Failed to encode MBMS Service Counting Results Report\n");
|
||||
return -1;
|
||||
}
|
||||
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
@@ -372,7 +372,8 @@ void *MCE_app_task(void *args_p) {
|
||||
|
||||
// /* Try to register each MCE with MCE each other */
|
||||
if (is_m3ap_MCE_enabled() /*&& !NODE_IS_DU(RC.rrc[0]->node_type)*/) {
|
||||
///*m3_register_mce_pending =*/ MCE_app_register_m3 (mce_id_start, mce_id_end);
|
||||
///*m3_register_mce_pending =*/
|
||||
MCE_app_register_m3 (mce_id_start, mce_id_end);
|
||||
}
|
||||
|
||||
do {
|
||||
@@ -627,7 +628,7 @@ void *MCE_app_task(void *args_p) {
|
||||
//}
|
||||
|
||||
|
||||
/*m3_register_mce_pending =*/ MCE_app_register_m3 (mce_id_start, mce_id_end);
|
||||
/*m3_register_mce_pending =*/ //MCE_app_register_m3 (mce_id_start, mce_id_end);
|
||||
|
||||
//MCE_app_send_m2ap_session_start_req(0);
|
||||
break;
|
||||
|
||||
@@ -800,7 +800,37 @@ void dl_config_req_UE_MAC_dci(int sfn,
|
||||
UE_mac_inst[ue_id].first_ULSCH_Tx = 1;
|
||||
}
|
||||
}
|
||||
} else {
|
||||
}
|
||||
//else if (dl_config_pdu_list[i].pdu_type == NFAPI_DL_CONFIG_BCH_PDU_TYPE) {
|
||||
// // BCH case: Last parameter is 1 if first time synchronization and zero
|
||||
// // otherwise. Not sure which value to put for our case.
|
||||
// if (UE_mac_inst[Mod_id].UE_mode[0] == NOT_SYNCHED){
|
||||
// dl_phy_sync_success(Mod_id, sfn, 0, 1);
|
||||
// LOG_E(MAC,
|
||||
// "%s(): Received MIB: UE_mode: %d, sfn/sf: %d.%d\n",
|
||||
// __func__,
|
||||
// UE_mac_inst[Mod_id].UE_mode[0],
|
||||
// sfn,
|
||||
// sf);
|
||||
// UE_mac_inst[Mod_id].UE_mode[0] = PRACH;
|
||||
// } else {
|
||||
// dl_phy_sync_success(Mod_id, sfn, 0, 0);
|
||||
// }
|
||||
//} else if (dl_config_pdu_list[i].pdu_type == NFAPI_DL_CONFIG_MCH_PDU_TYPE){
|
||||
// if (UE_mac_inst[Mod_id].UE_mode[0] == NOT_SYNCHED) {
|
||||
// /* this check is in the code before refactoring, but I don't know
|
||||
// * why. Leave it in here for the moment */
|
||||
// continue;
|
||||
// }
|
||||
// nfapi_dl_config_request_pdu_t *dl_config_pdu_tmp = &dl_config_pdu_list[i];
|
||||
// const int pdu_index = dl_config_pdu_tmp->dlsch_pdu.dlsch_pdu_rel8.pdu_index;
|
||||
// ue_send_mch_sdu(Mod_id, 0, sfn,
|
||||
// tx_request_pdu_list[pdu_index].segments[0].segment_data,
|
||||
// tx_request_pdu_list[pdu_index].segments[0].segment_length,
|
||||
// 0,0);
|
||||
|
||||
//}
|
||||
else {
|
||||
LOG_W(MAC, "can not handle special RNTI %x\n", rnti);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -28,6 +28,15 @@
|
||||
* \email: raymond.knopp@eurecom.fr
|
||||
*/
|
||||
|
||||
/*! \file l2_interface.c
|
||||
* \brief layer 2 interface, added support for FeMBMS RRC sublayer
|
||||
* \author Javier Morgade
|
||||
* \date 2020
|
||||
* \version 1.0
|
||||
* \email: javier.morgade@ieee.org
|
||||
*/
|
||||
|
||||
|
||||
#include "platform_types.h"
|
||||
#include "rrc_defs.h"
|
||||
#include "rrc_extern.h"
|
||||
@@ -65,6 +74,9 @@ mac_rrc_data_req(
|
||||
uint8_t Sdu_size = 0;
|
||||
uint8_t sfn = (uint8_t)((frameP>>2)&0xff);
|
||||
|
||||
uint8_t sfn_fembms = (uint8_t)((frameP>>4)&0xff);
|
||||
sfn_fembms = sfn_fembms<<2;
|
||||
|
||||
if (LOG_DEBUGFLAG(DEBUG_RRC)) {
|
||||
LOG_D(RRC,"[eNB %d] mac_rrc_data_req to SRB ID=%ld\n",Mod_idP,Srb_id);
|
||||
}
|
||||
@@ -72,12 +84,14 @@ mac_rrc_data_req(
|
||||
eNB_RRC_INST *rrc;
|
||||
rrc_eNB_carrier_data_t *carrier;
|
||||
LTE_BCCH_BCH_Message_t *mib;
|
||||
LTE_BCCH_BCH_Message_MBMS_t *mib_fembms;
|
||||
rrc = RC.rrc[Mod_idP];
|
||||
carrier = &rrc->carrier[0];
|
||||
mib = &carrier->mib;
|
||||
mib_fembms = &carrier->mib_fembms;
|
||||
|
||||
if((Srb_id & RAB_OFFSET) == BCCH_SI_MBMS){
|
||||
if (frameP%4 == 0) {
|
||||
if (frameP%8 == 0) {
|
||||
memcpy(&buffer_pP[0],
|
||||
RC.rrc[Mod_idP]->carrier[CC_id].SIB1_MBMS,
|
||||
RC.rrc[Mod_idP]->carrier[CC_id].sizeof_SIB1_MBMS);
|
||||
@@ -159,6 +173,22 @@ mac_rrc_data_req(
|
||||
return(3);
|
||||
}
|
||||
|
||||
if( (Srb_id & RAB_OFFSET ) == MIBCH_MBMS) {
|
||||
mib_fembms->message.systemFrameNumber_r14.buf = &sfn_fembms;
|
||||
enc_rval = uper_encode_to_buffer(&asn_DEF_LTE_BCCH_BCH_Message_MBMS,
|
||||
NULL,
|
||||
(void *)mib_fembms,
|
||||
carrier->MIB_FeMBMS,
|
||||
24);
|
||||
LOG_I(RRC,"Encoded MIB MBMS for frame %d (%p), bits %lu %x,%x,%x %x bits_unused %d\n",sfn_fembms>>2,carrier->MIB_FeMBMS,enc_rval.encoded,carrier->MIB_FeMBMS[0],carrier->MIB_FeMBMS[1],carrier->MIB_FeMBMS[2],mib_fembms->message.systemFrameNumber_r14.buf[0],mib_fembms->message.systemFrameNumber_r14.bits_unused);
|
||||
buffer_pP[0]=carrier->MIB_FeMBMS[0];
|
||||
buffer_pP[1]=carrier->MIB_FeMBMS[1];
|
||||
buffer_pP[2]=carrier->MIB_FeMBMS[2];
|
||||
AssertFatal (enc_rval.encoded > 0, "ASN1 message encoding failed (%s, %lu)!\n",
|
||||
enc_rval.failed_type->name, enc_rval.encoded);
|
||||
return(3);
|
||||
}
|
||||
|
||||
if( (Srb_id & RAB_OFFSET ) == CCCH) {
|
||||
struct rrc_eNB_ue_context_s *ue_context_p = rrc_eNB_get_ue_context(RC.rrc[Mod_idP],rnti);
|
||||
|
||||
@@ -203,8 +233,10 @@ mac_rrc_data_req(
|
||||
RC.rrc[Mod_idP]->carrier[CC_id].MCCH_MESSAGE[mbsfn_sync_area],
|
||||
RC.rrc[Mod_idP]->carrier[CC_id].sizeof_MCCH_MESSAGE[mbsfn_sync_area]);
|
||||
|
||||
LOG_D(RRC,"[eNB %d] Frame %d : MCCH request => MCCH_MESSAGE \n",Mod_idP,frameP);
|
||||
|
||||
if (LOG_DEBUGFLAG(DEBUG_RRC)) {
|
||||
LOG_W(RRC,"[eNB %d] Frame %d : MCCH request => MCCH_MESSAGE \n",Mod_idP,frameP);
|
||||
LOG_D(RRC,"[eNB %d] Frame %d : MCCH request => MCCH_MESSAGE \n",Mod_idP,frameP);
|
||||
|
||||
for (int i=0; i<RC.rrc[Mod_idP]->carrier[CC_id].sizeof_MCCH_MESSAGE[mbsfn_sync_area]; i++) {
|
||||
LOG_T(RRC,"%x.",buffer_pP[i]);
|
||||
@@ -216,6 +248,29 @@ mac_rrc_data_req(
|
||||
return (RC.rrc[Mod_idP]->carrier[CC_id].sizeof_MCCH_MESSAGE[mbsfn_sync_area]);
|
||||
}
|
||||
|
||||
if((Srb_id & RAB_OFFSET) == MCCH_COUNTING) {
|
||||
if(RC.rrc[Mod_idP]->carrier[CC_id].MCCH_MESS_COUNTING[mbsfn_sync_area].Active==0) {
|
||||
return 0; // this parameter is set in function init_mcch in rrc_eNB.c
|
||||
}
|
||||
|
||||
memcpy(&buffer_pP[0],
|
||||
RC.rrc[Mod_idP]->carrier[CC_id].MCCH_MESSAGE_COUNTING[mbsfn_sync_area],
|
||||
RC.rrc[Mod_idP]->carrier[CC_id].sizeof_MCCH_MESSAGE_COUNTING[mbsfn_sync_area]);
|
||||
|
||||
if (LOG_DEBUGFLAG(DEBUG_RRC)) {
|
||||
LOG_W(RRC,"[eNB %d] Frame %d : MCCH request => MCCH_MESSAGE_COUNTING \n",Mod_idP,frameP);
|
||||
|
||||
for (int i=0; i<RC.rrc[Mod_idP]->carrier[CC_id].sizeof_MCCH_MESSAGE_COUNTING[mbsfn_sync_area]; i++) {
|
||||
LOG_T(RRC,"%x.",buffer_pP[i]);
|
||||
}
|
||||
|
||||
LOG_T(RRC,"\n");
|
||||
} /* LOG_DEBUGFLAG(DEBUG_RRC) */
|
||||
|
||||
return (RC.rrc[Mod_idP]->carrier[CC_id].sizeof_MCCH_MESSAGE_COUNTING[mbsfn_sync_area]);
|
||||
}
|
||||
|
||||
|
||||
if ((Srb_id & RAB_OFFSET) == BCCH_SIB1_BR) {
|
||||
memcpy(&buffer_pP[0],
|
||||
RC.rrc[Mod_idP]->carrier[CC_id].SIB1_BR,
|
||||
|
||||
@@ -19,7 +19,7 @@
|
||||
* contact@openairinterface.org
|
||||
*/
|
||||
|
||||
/*! \file l2_interface.c
|
||||
/*! \file l2_interface_ue.c
|
||||
* \brief layer 2 interface, used to support different RRC sublayer
|
||||
* \author Raymond Knopp and Navid Nikaein
|
||||
* \date 2010-2014
|
||||
@@ -28,6 +28,16 @@
|
||||
* \email: raymond.knopp@eurecom.fr
|
||||
*/
|
||||
|
||||
|
||||
/*! \file l2_interface_ue.c
|
||||
* \brief layer 2 interface, added support for FeMBMS RRC sublayer
|
||||
* \author J. Morgade
|
||||
* \date 2020
|
||||
* \version 1.0
|
||||
* \email: javier.morgade@ieee.org
|
||||
*/
|
||||
|
||||
|
||||
#include "platform_types.h"
|
||||
#include "rrc_defs.h"
|
||||
#include "rrc_extern.h"
|
||||
@@ -219,6 +229,7 @@ mac_rrc_data_ind_ue(
|
||||
if ((srb_idP & RAB_OFFSET) == MCCH) {
|
||||
LOG_T(RRC,"[UE %d] Frame %d: Received SDU on MBSFN sync area %d for MCCH on SRB %ld from eNB %d\n",
|
||||
module_idP,frameP, mbsfn_sync_areaP, srb_idP & RAB_OFFSET,eNB_indexP);
|
||||
|
||||
{
|
||||
MessageDef *message_p;
|
||||
int msg_sdu_size = sizeof(RRC_MAC_MCCH_DATA_IND (message_p).sdu);
|
||||
|
||||
@@ -28,6 +28,14 @@
|
||||
* \email: raymond.knopp@eurecom.fr and navid.nikaein@eurecom.fr
|
||||
*/
|
||||
|
||||
/*! \file asn1_msg.c
|
||||
* \brief added primitives to build the asn1 messages for FeMBMS
|
||||
* \author Javier Morgade
|
||||
* \date 2019-2020
|
||||
* \version 1.0
|
||||
* \email: javier.morgade@ieee.org
|
||||
*/
|
||||
|
||||
#include <stdio.h>
|
||||
#include <sys/types.h>
|
||||
#include <stdlib.h> /* for atoi(3) */
|
||||
@@ -185,7 +193,8 @@ uint8_t get_adjacent_cell_mod_id(uint16_t phyCellId) {
|
||||
uint8_t do_MIB_FeMBMS(rrc_eNB_carrier_data_t *carrier, uint32_t N_RB_DL, uint32_t additionalNonMBSFN, uint32_t frame) {
|
||||
asn_enc_rval_t enc_rval;
|
||||
LTE_BCCH_BCH_Message_MBMS_t *mib_fembms=&carrier->mib_fembms;
|
||||
uint8_t sfn = (uint8_t)((frame>>2)&0xff);
|
||||
frame=198;
|
||||
uint8_t sfn = (uint8_t)((frame>>4)&0xff);
|
||||
uint16_t *spare = calloc(1,sizeof(uint16_t));
|
||||
|
||||
if( spare == NULL ) abort();
|
||||
@@ -223,15 +232,16 @@ uint8_t do_MIB_FeMBMS(rrc_eNB_carrier_data_t *carrier, uint32_t N_RB_DL, uint32_
|
||||
(uint32_t)mib_fembms->message.dl_Bandwidth_MBMS_r14,
|
||||
(uint32_t)additionalNonMBSFN,
|
||||
(uint32_t)sfn);
|
||||
sfn = sfn<<2;
|
||||
mib_fembms->message.systemFrameNumber_r14.buf = &sfn;
|
||||
mib_fembms->message.systemFrameNumber_r14.size = 1;
|
||||
mib_fembms->message.systemFrameNumber_r14.bits_unused=0;
|
||||
mib_fembms->message.systemFrameNumber_r14.bits_unused=2;
|
||||
mib_fembms->message.spare.buf = (uint8_t *)spare;
|
||||
mib_fembms->message.spare.size = 2;
|
||||
mib_fembms->message.spare.bits_unused = 6; // This makes a spare of 10 bits
|
||||
mib_fembms->message.spare.bits_unused = 3; // This makes a spare of 10 bits
|
||||
//TODO additionalNonBMSFNSubframes-r14 INTEGER (0..3) ?
|
||||
//if ( LOG_DEBUGFLAG(DEBUG_ASN1) ) {
|
||||
//xer_fprint(stdout, &asn_DEF_LTE_BCCH_BCH_Message_MBMS, (void *)mib_fembms);
|
||||
xer_fprint(stdout, &asn_DEF_LTE_BCCH_BCH_Message_MBMS, (void *)mib_fembms);
|
||||
//}
|
||||
enc_rval = uper_encode_to_buffer(&asn_DEF_LTE_BCCH_BCH_Message_MBMS,
|
||||
NULL,
|
||||
@@ -387,7 +397,11 @@ uint8_t do_SIB1_MBMS(rrc_eNB_carrier_data_t *carrier,
|
||||
// SystemInformation_t systemInformation;
|
||||
int num_plmn = configuration->num_plmn;
|
||||
|
||||
LTE_PLMN_IdentityInfo_t *PLMN_identity_info;
|
||||
//LTE_PLMN_IdentityInfo_t *PLMN_identity_info;
|
||||
LTE_PLMN_IdentityInfo_t * PLMN_identity_info = &carrier->PLMN_identity_info_MBMS[0];
|
||||
//LTE_MCC_MNC_Digit_t dummy_mcc[num_plmn][3], dummy_mnc[num_plmn][3];
|
||||
//LTE_MCC_MNC_Digit_t *dummy_mcc = &carrier->dummy_mcc_MBMS[0][0];
|
||||
//LTE_MCC_MNC_Digit_t *dummy_mnc = &carrier->dummy_mnc_MBMS[0][0];
|
||||
LTE_MCC_MNC_Digit_t *dummy_mcc_0;
|
||||
LTE_MCC_MNC_Digit_t *dummy_mcc_1;
|
||||
LTE_MCC_MNC_Digit_t *dummy_mcc_2;
|
||||
@@ -395,7 +409,9 @@ uint8_t do_SIB1_MBMS(rrc_eNB_carrier_data_t *carrier,
|
||||
LTE_MCC_MNC_Digit_t *dummy_mnc_1;
|
||||
LTE_MCC_MNC_Digit_t *dummy_mnc_2;
|
||||
asn_enc_rval_t enc_rval;
|
||||
LTE_SchedulingInfo_MBMS_r14_t *schedulingInfo;
|
||||
//LTE_SchedulingInfo_MBMS_r14_t *schedulingInfo;
|
||||
//LTE_SchedulingInfo_MBMS_r14_t schedulingInfo;
|
||||
LTE_SchedulingInfo_MBMS_r14_t *schedulingInfo = &carrier->schedulingInfo_MBMS;
|
||||
LTE_SIB_Type_t *sib_type;
|
||||
uint8_t *buffer = carrier->SIB1_MBMS;
|
||||
LTE_BCCH_DL_SCH_Message_MBMS_t *bcch_message = &carrier->siblock1_MBMS;
|
||||
@@ -408,6 +424,8 @@ uint8_t do_SIB1_MBMS(rrc_eNB_carrier_data_t *carrier,
|
||||
// memcpy(&bcch_message.message.choice.c1.choice.systemInformationBlockType1,sib1,sizeof(SystemInformationBlockType1_t));
|
||||
*sib1_MBMS = &bcch_message->message.choice.c1.choice.systemInformationBlockType1_MBMS_r14;
|
||||
PLMN_identity_info = CALLOC(1, sizeof(LTE_PLMN_IdentityInfo_t) * num_plmn);
|
||||
//memset(&schedulingInfo,0,sizeof(LTE_SchedulingInfo_MBMS_r14_t));
|
||||
memset(schedulingInfo,0,sizeof(LTE_SchedulingInfo_MBMS_r14_t));
|
||||
|
||||
if (PLMN_identity_info == NULL)
|
||||
exit(1);
|
||||
@@ -528,7 +546,7 @@ uint8_t do_SIB1_MBMS(rrc_eNB_carrier_data_t *carrier,
|
||||
MBSFN_Area1->mcch_Config_r9.sf_AllocInfo_r9.size= 1;
|
||||
MBSFN_Area1->mcch_Config_r9.sf_AllocInfo_r9.buf[0]=0x20<<2; // FDD: SF1
|
||||
MBSFN_Area1->mcch_Config_r9.sf_AllocInfo_r9.bits_unused= 2;
|
||||
MBSFN_Area1->mcch_Config_r9.signallingMCS_r9= LTE_MBSFN_AreaInfo_r9__mcch_Config_r9__signallingMCS_r9_n7;
|
||||
MBSFN_Area1->mcch_Config_r9.signallingMCS_r9= LTE_MBSFN_AreaInfo_r9__mcch_Config_r9__signallingMCS_r9_n2;
|
||||
(MBSFN_Area1)->ext1 = CALLOC (1, sizeof(*(MBSFN_Area1)->ext1));
|
||||
memset((MBSFN_Area1)->ext1,0,sizeof(*(MBSFN_Area1)->ext1));
|
||||
MBSFN_Area1->ext1->subcarrierSpacingMBMS_r14 = CALLOC(1,sizeof(*( MBSFN_Area1->ext1)->subcarrierSpacingMBMS_r14));
|
||||
@@ -541,18 +559,18 @@ uint8_t do_SIB1_MBMS(rrc_eNB_carrier_data_t *carrier,
|
||||
if(1) {
|
||||
(*sib1_MBMS)->nonMBSFN_SubframeConfig_r14 = CALLOC(1,sizeof(struct LTE_NonMBSFN_SubframeConfig_r14));
|
||||
memset((*sib1_MBMS)->nonMBSFN_SubframeConfig_r14,0,sizeof(struct LTE_NonMBSFN_SubframeConfig_r14));
|
||||
(*sib1_MBMS)->nonMBSFN_SubframeConfig_r14->radioFrameAllocationPeriod_r14 = LTE_NonMBSFN_SubframeConfig_r14__radioFrameAllocationPeriod_r14_rf8;
|
||||
(*sib1_MBMS)->nonMBSFN_SubframeConfig_r14->radioFrameAllocationPeriod_r14 = LTE_NonMBSFN_SubframeConfig_r14__radioFrameAllocationPeriod_r14_rf4;
|
||||
(*sib1_MBMS)->nonMBSFN_SubframeConfig_r14->radioFrameAllocationOffset_r14 = 0;
|
||||
(*sib1_MBMS)->nonMBSFN_SubframeConfig_r14->subframeAllocation_r14.buf = MALLOC(2);
|
||||
//100000001 byte(0)=10000000 byte(1)=xxxxxxx1
|
||||
(*sib1_MBMS)->nonMBSFN_SubframeConfig_r14->subframeAllocation_r14.buf[0] = 0x80<<0;
|
||||
(*sib1_MBMS)->nonMBSFN_SubframeConfig_r14->subframeAllocation_r14.buf[1] = 0x1<<7;
|
||||
(*sib1_MBMS)->nonMBSFN_SubframeConfig_r14->subframeAllocation_r14.buf[0] = 0x8<<0;
|
||||
(*sib1_MBMS)->nonMBSFN_SubframeConfig_r14->subframeAllocation_r14.buf[1] = 0;
|
||||
(*sib1_MBMS)->nonMBSFN_SubframeConfig_r14->subframeAllocation_r14.size = 2;
|
||||
(*sib1_MBMS)->nonMBSFN_SubframeConfig_r14->subframeAllocation_r14.bits_unused = 7;
|
||||
}
|
||||
|
||||
//if ( LOG_DEBUGFLAG(DEBUG_ASN1) ) {
|
||||
//xer_fprint(stdout, &asn_DEF_LTE_BCCH_DL_SCH_Message_MBMS, (void *)bcch_message);
|
||||
xer_fprint(stdout, &asn_DEF_LTE_BCCH_DL_SCH_Message_MBMS, (void *)bcch_message);
|
||||
//}
|
||||
enc_rval = uper_encode_to_buffer(&asn_DEF_LTE_BCCH_DL_SCH_Message_MBMS,
|
||||
NULL,
|
||||
|
||||
+106
-11
@@ -155,14 +155,19 @@ static uint8_t check_trigger_meas_event(
|
||||
LTE_Q_OffsetRange_t ofs, LTE_Q_OffsetRange_t ocs, long a3_offset, LTE_TimeToTrigger_t ttt);
|
||||
|
||||
static void decode_MBSFNAreaConfiguration(module_id_t module_idP, uint8_t eNB_index, frame_t frameP,uint8_t mbsfn_sync_area);
|
||||
static void decode_MBMSCountingRequest(module_id_t module_idP, uint8_t eNB_index, frame_t frameP,uint8_t mbsfn_sync_area);
|
||||
|
||||
uint8_t rrc_ue_generate_SidelinkUEInformation( const protocol_ctxt_t *const ctxt_pP, const uint8_t eNB_index,LTE_SL_DestinationInfoList_r12_t *destinationInfoList, long *discTxResourceReq,
|
||||
SL_TRIGGER_t mode);
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
void
|
||||
rrc_ue_process_MBMSCountingRequest(
|
||||
const protocol_ctxt_t *const ctxt_pP,
|
||||
LTE_MBMSCountingRequest_r10_t *MBMSCountingRequest,
|
||||
uint8_t eNB_index
|
||||
);
|
||||
|
||||
protocol_ctxt_t ctxt_pP_local;
|
||||
|
||||
|
||||
/*------------------------------------------------------------------------------*/
|
||||
@@ -520,6 +525,7 @@ static void rrc_ue_generate_RRCConnectionSetupComplete(
|
||||
LOG_D(RLC,
|
||||
"[FRAME %05d][RRC_UE][MOD %02d][][--- PDCP_DATA_REQ/%d Bytes (RRCConnectionSetupComplete to eNB %d MUI %d) --->][PDCP][MOD %02d][RB %02d]\n",
|
||||
ctxt_pP->frame, ctxt_pP->module_id+NB_eNB_INST, size, eNB_index, rrc_mui, ctxt_pP->module_id+NB_eNB_INST, DCCH);
|
||||
ctxt_pP_local.rnti = ctxt_pP->rnti;
|
||||
rrc_data_req_ue (
|
||||
ctxt_pP,
|
||||
DCCH,
|
||||
@@ -1572,6 +1578,65 @@ rrc_ue_process_securityModeCommand(
|
||||
securityModeCommand->criticalExtensions.present);
|
||||
}
|
||||
|
||||
void
|
||||
rrc_ue_process_MBMSCountingRequest(
|
||||
const protocol_ctxt_t *const ctxt_pP,
|
||||
LTE_MBMSCountingRequest_r10_t *MBMSCountingRequest,
|
||||
uint8_t eNB_index
|
||||
)
|
||||
{
|
||||
asn_enc_rval_t enc_rval;
|
||||
LTE_UL_DCCH_Message_t ul_dcch_msg;
|
||||
struct LTE_CountingResponseInfo_r10 CountingResponse;
|
||||
uint8_t buffer[200];
|
||||
//int i;
|
||||
LOG_I(RRC,"[UE %d] Frame %d: Receiving from (MCCH), Processing MBMSCoutingRequest (eNB %d)\n",
|
||||
ctxt_pP->module_id,
|
||||
ctxt_pP->frame,
|
||||
eNB_index);
|
||||
memset((void *)&ul_dcch_msg,0,sizeof(LTE_UL_DCCH_Message_t));
|
||||
memset((void *)&CountingResponse,0,sizeof(struct LTE_CountingResponseInfo_r10));
|
||||
|
||||
|
||||
ul_dcch_msg.message.present = LTE_UL_DCCH_MessageType_PR_c1;
|
||||
ul_dcch_msg.message.choice.c1.present = LTE_UL_DCCH_MessageType__c1_PR_mbmsCountingResponse_r10;
|
||||
LTE_MBMSCountingResponse_r10_t *MBMSCountingResponse = &ul_dcch_msg.message.choice.c1.choice.mbmsCountingResponse_r10;
|
||||
|
||||
MBMSCountingResponse->criticalExtensions.present = LTE_MBMSCountingResponse_r10__criticalExtensions_PR_c1;
|
||||
MBMSCountingResponse->criticalExtensions.choice.c1.present = LTE_MBMSCountingResponse_r10__criticalExtensions__c1_PR_countingResponse_r10;
|
||||
LTE_MBMSCountingResponse_r10_IEs_t *MBMSCountingResponse_r10_IEs = &MBMSCountingResponse->criticalExtensions.choice.c1.choice.countingResponse_r10;
|
||||
|
||||
MBMSCountingResponse_r10_IEs->mbsfn_AreaIndex_r10 = calloc(1,sizeof(long));
|
||||
// MBMSCountingResponse_r10_IEs->countingResponseList_r10 = calloc(1,sizeof(struct LTE_CountingResponseList_r10));
|
||||
//
|
||||
// ASN_SEQUENCE_ADD(
|
||||
// &MBMSCountingResponse->criticalExtensions.choice.c1.choice.countingResponse_r10.countingResponseList_r10.list,
|
||||
// &CountingResponse);
|
||||
//
|
||||
|
||||
enc_rval = uper_encode_to_buffer(&asn_DEF_LTE_UL_DCCH_Message, NULL, (void *) &ul_dcch_msg, buffer, 100);
|
||||
AssertFatal (enc_rval.encoded > 0, "ASN1 message encoding failed (%s, %jd)!\n",
|
||||
enc_rval.failed_type->name, enc_rval.encoded);
|
||||
|
||||
if ( LOG_DEBUGFLAG(DEBUG_ASN1) ) {
|
||||
xer_fprint(stdout, &asn_DEF_LTE_UL_DCCH_Message, (void *)&ul_dcch_msg);
|
||||
}
|
||||
xer_fprint(stdout, &asn_DEF_LTE_UL_DCCH_Message, (void *)&ul_dcch_msg);
|
||||
|
||||
|
||||
LOG_I(RRC,"MBMSCountingResponse Encoded %zd bits (%zd bytes)\n",enc_rval.encoded,(enc_rval.encoded+7)/8);
|
||||
rrc_data_req_ue (
|
||||
&ctxt_pP_local,
|
||||
DCCH,
|
||||
rrc_mui++,
|
||||
SDU_CONFIRM_NO,
|
||||
(enc_rval.encoded + 7) / 8,
|
||||
buffer,
|
||||
PDCP_TRANSMISSION_MODE_CONTROL);
|
||||
|
||||
}
|
||||
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
void
|
||||
rrc_ue_process_ueCapabilityEnquiry(
|
||||
@@ -2189,8 +2254,8 @@ rrc_ue_decode_dcch(
|
||||
#endif
|
||||
}
|
||||
|
||||
const char siWindowLength[8][5] = {"1ms","2ms","5ms","10ms","15ms","20ms","40ms","ERR"};
|
||||
const char siWindowLength_int[7] = {1,2,5,10,15,20,40};
|
||||
const char siWindowLength[9][5] = {"1ms","2ms","5ms","10ms","15ms","20ms","40ms","80ms","ERR"};
|
||||
const char siWindowLength_int[8] = {1,2,5,10,15,20,40,80};
|
||||
|
||||
const char SIBType[12][6] = {"SIB3","SIB4","SIB5","SIB6","SIB7","SIB8","SIB9","SIB10","SIB11","SIB12","SIB13","Spare"};
|
||||
const char SIBPeriod[8][6]= {"rf8","rf16","rf32","rf64","rf128","rf256","rf512","ERR"};
|
||||
@@ -2700,7 +2765,7 @@ int decode_SIB1_MBMS( const protocol_ctxt_t *const ctxt_pP, const uint8_t eNB_in
|
||||
//LOG_I( RRC, "TDD subframeAssignment : %ld\n", sib1_MBMS->tdd_Config->subframeAssignment );
|
||||
//LOG_I( RRC, "TDD specialSubframePatterns : %ld\n", sib1_MBMS->tdd_Config->specialSubframePatterns );
|
||||
//}
|
||||
LOG_I( RRC, "siWindowLength : %s\n", siWindowLength[min(sib1_MBMS->si_WindowLength_r14,7)] );
|
||||
LOG_I( RRC, "siWindowLength : %s\n", siWindowLength[min(sib1_MBMS->si_WindowLength_r14,8)] );
|
||||
LOG_I( RRC, "systemInfoValueTag : %ld\n", sib1_MBMS->systemInfoValueTag_r14 );
|
||||
UE_rrc_inst[ctxt_pP->module_id].Info[eNB_index].SIperiod_MBMS = siPeriod_int[sib1_MBMS->schedulingInfoList_MBMS_r14.list.array[0]->si_Periodicity_r14];
|
||||
UE_rrc_inst[ctxt_pP->module_id].Info[eNB_index].SIwindowsize_MBMS = siWindowLength_int[sib1_MBMS->si_WindowLength_r14];
|
||||
@@ -2898,7 +2963,7 @@ int decode_SIB1( const protocol_ctxt_t *const ctxt_pP, const uint8_t eNB_index,
|
||||
LOG_I( RRC, "TDD specialSubframePatterns : %ld\n", sib1->tdd_Config->specialSubframePatterns );
|
||||
}
|
||||
|
||||
LOG_I( RRC, "siWindowLength : %s\n", siWindowLength[min(sib1->si_WindowLength,7)] );
|
||||
LOG_I( RRC, "siWindowLength : %s\n", siWindowLength[min(sib1->si_WindowLength,8)] );
|
||||
LOG_I( RRC, "systemInfoValueTag : %ld\n", sib1->systemInfoValueTag );
|
||||
UE_rrc_inst[ctxt_pP->module_id].Info[eNB_index].SIperiod = siPeriod_int[sib1->schedulingInfoList.list.array[0]->si_Periodicity];
|
||||
UE_rrc_inst[ctxt_pP->module_id].Info[eNB_index].SIwindowsize = siWindowLength_int[sib1->si_WindowLength];
|
||||
@@ -4225,7 +4290,7 @@ int decode_MCCH_Message( const protocol_ctxt_t *const ctxt_pP, const uint8_t eNB
|
||||
ctxt_pP->frame,
|
||||
mbsfn_sync_area);
|
||||
return 0; // avoid decoding to prevent memory bloating
|
||||
} else if(UE_rrc_inst[ctxt_pP->module_id].Info[eNB_index].State >= RRC_CONNECTED /*|| UE_rrc_inst[ctxt_pP->module_id].Info[eNB_index].State == RRC_RECONFIGURED*/){
|
||||
} else if(1/*UE_rrc_inst[ctxt_pP->module_id].Info[eNB_index].State >= RRC_CONNECTED*/ /*|| UE_rrc_inst[ctxt_pP->module_id].Info[eNB_index].State == RRC_RECONFIGURED*/){
|
||||
dec_rval = uper_decode_complete(NULL,
|
||||
&asn_DEF_LTE_MCCH_Message,
|
||||
(void **)&mcch,
|
||||
@@ -4244,6 +4309,7 @@ int decode_MCCH_Message( const protocol_ctxt_t *const ctxt_pP, const uint8_t eNB
|
||||
if ( LOG_DEBUGFLAG(DEBUG_ASN1) ) {
|
||||
xer_fprint(stdout, &asn_DEF_LTE_MCCH_Message, (void *)mcch);
|
||||
}
|
||||
xer_fprint(stdout, &asn_DEF_LTE_MCCH_Message, (void *)mcch);
|
||||
|
||||
if (mcch->message.present == LTE_MCCH_MessageType_PR_c1) {
|
||||
LOG_D(RRC,"[UE %d] Found mcch message \n",
|
||||
@@ -4265,7 +4331,29 @@ int decode_MCCH_Message( const protocol_ctxt_t *const ctxt_pP, const uint8_t eNB
|
||||
ctxt_pP->frame,
|
||||
mbsfn_sync_area);
|
||||
}
|
||||
}else if(mcch->message.present == LTE_MCCH_MessageType_PR_later){
|
||||
LOG_D(RRC,"[UE %d] Found mcch message \n",
|
||||
ctxt_pP->module_id);
|
||||
if(mcch->message.choice.later.present == LTE_MCCH_MessageType__later_PR_c2){
|
||||
if(mcch->message.choice.later.choice.c2.present == LTE_MCCH_MessageType__later__c2_PR_mbmsCountingRequest_r10){
|
||||
LOG_I(RRC,"[UE %d] Frame %d : Found MBMSCountingRequest from eNB %d %p\n",
|
||||
ctxt_pP->module_id,
|
||||
ctxt_pP->frame,
|
||||
eNB_index,&mcch->message.choice.later.choice.c2.choice.mbmsCountingRequest_r10);
|
||||
|
||||
rrc_ue_process_MBMSCountingRequest(ctxt_pP,&mcch->message.choice.later.choice.c2.choice.mbmsCountingRequest_r10,eNB_index);
|
||||
|
||||
decode_MBMSCountingRequest(
|
||||
ctxt_pP->module_id,
|
||||
eNB_index,
|
||||
ctxt_pP->frame,
|
||||
mbsfn_sync_area);
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
return 0;
|
||||
@@ -4323,7 +4411,7 @@ void decode_MBSFNAreaConfiguration( module_id_t ue_mod_idP, uint8_t eNB_index, f
|
||||
(struct LTE_NonMBSFN_SubframeConfig_r14 *)NULL,
|
||||
(LTE_MBSFN_AreaInfoList_r9_t *)NULL
|
||||
);
|
||||
if(UE_rrc_inst[ue_mod_idP].Info[eNB_index].State >= RRC_CONNECTED /*|| UE_rrc_inst[ue_mod_idP].Info[eNB_index].State == RRC_RECONFIGURED*/)
|
||||
if(1/*UE_rrc_inst[ue_mod_idP].Info[eNB_index].State >= RRC_CONNECTED*/ /*|| UE_rrc_inst[ue_mod_idP].Info[eNB_index].State == RRC_RECONFIGURED*/)
|
||||
UE_rrc_inst[ue_mod_idP].Info[eNB_index].MCCHStatus[mbsfn_sync_area] = 1;
|
||||
PROTOCOL_CTXT_SET_BY_MODULE_ID(&ctxt, ue_mod_idP, ENB_FLAG_NO, UE_rrc_inst[ue_mod_idP].Info[eNB_index].rnti, frameP, 0,eNB_index);
|
||||
// Config Radio Bearer for MBMS user data (similar way to configure for eNB side in init_MBMS function)
|
||||
@@ -4347,6 +4435,13 @@ void decode_MBSFNAreaConfiguration( module_id_t ue_mod_idP, uint8_t eNB_index, f
|
||||
// */
|
||||
}
|
||||
|
||||
void decode_MBMSCountingRequest( module_id_t ue_mod_idP, uint8_t eNB_index, frame_t frameP, uint8_t mbsfn_sync_area ) {
|
||||
//uint8_t i;
|
||||
//protocol_ctxt_t ctxt;
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
void *rrc_ue_task( void *args_p ) {
|
||||
|
||||
@@ -716,6 +716,9 @@ typedef struct {
|
||||
LTE_BCCH_BCH_Message_MBMS_t mib_fembms;
|
||||
LTE_BCCH_DL_SCH_Message_MBMS_t siblock1_MBMS;
|
||||
LTE_BCCH_DL_SCH_Message_MBMS_t systemInformation_MBMS;
|
||||
LTE_SchedulingInfo_MBMS_r14_t schedulingInfo_MBMS;
|
||||
LTE_PLMN_IdentityInfo_t PLMN_identity_info_MBMS[6];
|
||||
LTE_MCC_MNC_Digit_t dummy_mcc_MBMS[6][3], dummy_mnc_MBMS[6][3];
|
||||
LTE_SystemInformationBlockType1_t *sib1;
|
||||
LTE_SystemInformationBlockType2_t *sib2;
|
||||
LTE_SystemInformationBlockType3_t *sib3;
|
||||
@@ -732,6 +735,12 @@ typedef struct {
|
||||
LTE_MCCH_Message_t mcch;
|
||||
LTE_MBSFNAreaConfiguration_r9_t *mcch_message;
|
||||
SRB_INFO MCCH_MESS[8];// MAX_MBSFN_AREA
|
||||
uint8_t **MCCH_MESSAGE_COUNTING; // MAX_MBSFN_AREA
|
||||
uint8_t sizeof_MCCH_MESSAGE_COUNTING[8];// MAX_MBSFN_AREA
|
||||
LTE_MCCH_Message_t mcch_counting;
|
||||
LTE_MBMSCountingRequest_r10_t *mcch_message_counting;
|
||||
SRB_INFO MCCH_MESS_COUNTING[8];// MAX_MBSFN_AREA
|
||||
|
||||
//TTN - SIB 18,19,21 for D2D
|
||||
LTE_SystemInformationBlockType18_r12_t *sib18;
|
||||
LTE_SystemInformationBlockType19_r12_t *sib19;
|
||||
|
||||
+26
-12
@@ -155,6 +155,7 @@ init_SI(
|
||||
LOG_D(RRC,"%s()\n\n\n\n",__FUNCTION__);
|
||||
|
||||
if(configuration->radioresourceconfig[CC_id].mbms_dedicated_serving_cell == TRUE) {
|
||||
|
||||
LOG_I(RRC, "Configuring MIB FeMBMS (N_RB_DL %d)\n",
|
||||
(int)configuration->N_RB_DL[CC_id]);
|
||||
RC.rrc[ctxt_pP->module_id]->carrier[CC_id].MIB_FeMBMS = (uint8_t *) malloc16(4);
|
||||
@@ -231,6 +232,7 @@ init_SI(
|
||||
RC.rrc[ctxt_pP->module_id]->carrier[CC_id].sib1_MBMS->nonMBSFN_SubframeConfig_r14->subframeAllocation_r14.buf);
|
||||
}
|
||||
|
||||
RC.rrc[ctxt_pP->module_id]->carrier[CC_id].FeMBMS_flag=1;
|
||||
//AssertFatal(RC.rrc[ctxt_pP->module_id]->carrier[CC_id].sizeof_SIB1 != 255,"FATAL, RC.rrc[enb_mod_idP].carrier[CC_id].sizeof_SIB1 == 255");
|
||||
}
|
||||
|
||||
@@ -496,12 +498,15 @@ init_SI(
|
||||
(LTE_PMCH_InfoList_r9_t *) NULL,
|
||||
sib1_v13ext,
|
||||
RC.rrc[ctxt_pP->module_id]->carrier[CC_id].FeMBMS_flag,
|
||||
(LTE_BCCH_DL_SCH_Message_MBMS_t *) NULL,
|
||||
(carrier->sib1_MBMS==NULL?(LTE_BCCH_DL_SCH_Message_MBMS_t *) NULL:(LTE_BCCH_DL_SCH_Message_MBMS_t *)carrier->sib1_MBMS),//(LTE_BCCH_DL_SCH_Message_MBMS_t *) NULL,
|
||||
(LTE_SchedulingInfo_MBMS_r14_t *) NULL,
|
||||
(struct LTE_NonMBSFN_SubframeConfig_r14 *) NULL,
|
||||
(LTE_SystemInformationBlockType1_MBMS_r14_t *) NULL,
|
||||
(LTE_MBSFN_AreaInfoList_r9_t *) NULL
|
||||
);
|
||||
(carrier->sib1_MBMS==NULL?(struct LTE_NonMBSFN_SubframeConfig_r14 *) NULL:(struct LTE_NonMBSFN_SubframeConfig_r14 *)carrier->sib1_MBMS->nonMBSFN_SubframeConfig_r14),//(struct LTE_NonMBSFN_SubframeConfig_r14 *) NULL,
|
||||
(carrier->sib1_MBMS==NULL?(LTE_SystemInformationBlockType1_MBMS_r14_t *) NULL:(LTE_SystemInformationBlockType1_MBMS_r14_t *)carrier->sib1_MBMS->systemInformationBlockType13_r14),//(LTE_SystemInformationBlockType1_MBMS_r14_t *) NULL,
|
||||
(carrier->sib1_MBMS==NULL?(LTE_MBSFN_AreaInfoList_r9_t *) NULL:(LTE_MBSFN_AreaInfoList_r9_t *)&carrier->sib1_MBMS->systemInformationBlockType13_r14->mbsfn_AreaInfoList_r9)//(LTE_MBSFN_AreaInfoList_r9_t *) NULL
|
||||
|
||||
,(LTE_MBSFNAreaConfiguration_r9_t*) NULL
|
||||
|
||||
);
|
||||
}
|
||||
|
||||
/* set flag to indicate that cell information is configured. This is required
|
||||
@@ -584,7 +589,8 @@ init_MCCH(
|
||||
(LTE_SchedulingInfo_MBMS_r14_t *) NULL,
|
||||
(struct LTE_NonMBSFN_SubframeConfig_r14 *) NULL,
|
||||
(LTE_SystemInformationBlockType1_MBMS_r14_t *) NULL,
|
||||
(LTE_MBSFN_AreaInfoList_r9_t *) NULL
|
||||
(LTE_MBSFN_AreaInfoList_r9_t *) NULL,
|
||||
(LTE_MBSFNAreaConfiguration_r9_t*) NULL
|
||||
);
|
||||
}
|
||||
|
||||
@@ -1481,7 +1487,8 @@ rrc_eNB_generate_RRCConnectionReestablishment(
|
||||
(LTE_SchedulingInfo_MBMS_r14_t *) NULL,
|
||||
(struct LTE_NonMBSFN_SubframeConfig_r14 *) NULL,
|
||||
(LTE_SystemInformationBlockType1_MBMS_r14_t *) NULL,
|
||||
(LTE_MBSFN_AreaInfoList_r9_t *) NULL
|
||||
(LTE_MBSFN_AreaInfoList_r9_t *) NULL,
|
||||
(LTE_MBSFNAreaConfiguration_r9_t*) NULL
|
||||
);
|
||||
break;
|
||||
}
|
||||
@@ -5781,7 +5788,8 @@ rrc_eNB_generate_HO_RRCConnectionReconfiguration(const protocol_ctxt_t *const ct
|
||||
(LTE_SchedulingInfo_MBMS_r14_t *) NULL,
|
||||
(struct LTE_NonMBSFN_SubframeConfig_r14 *) NULL,
|
||||
(LTE_SystemInformationBlockType1_MBMS_r14_t *) NULL,
|
||||
(LTE_MBSFN_AreaInfoList_r9_t *) NULL
|
||||
(LTE_MBSFN_AreaInfoList_r9_t *) NULL,
|
||||
(LTE_MBSFNAreaConfiguration_r9_t*) NULL
|
||||
);
|
||||
// Configure target eNB SRB2
|
||||
/// SRB2
|
||||
@@ -6461,7 +6469,8 @@ rrc_eNB_configure_rbs_handover(struct rrc_eNB_ue_context_s *ue_context_p, protoc
|
||||
(LTE_SchedulingInfo_MBMS_r14_t *) NULL,
|
||||
(struct LTE_NonMBSFN_SubframeConfig_r14 *) NULL,
|
||||
(LTE_SystemInformationBlockType1_MBMS_r14_t *) NULL,
|
||||
(LTE_MBSFN_AreaInfoList_r9_t *) NULL
|
||||
(LTE_MBSFN_AreaInfoList_r9_t *) NULL,
|
||||
(LTE_MBSFNAreaConfiguration_r9_t*) NULL
|
||||
);
|
||||
}
|
||||
|
||||
@@ -6677,7 +6686,8 @@ rrc_eNB_process_RRCConnectionReconfigurationComplete(
|
||||
(LTE_SchedulingInfo_MBMS_r14_t *) NULL,
|
||||
(struct LTE_NonMBSFN_SubframeConfig_r14 *) NULL,
|
||||
(LTE_SystemInformationBlockType1_MBMS_r14_t *) NULL,
|
||||
(LTE_MBSFN_AreaInfoList_r9_t *) NULL
|
||||
(LTE_MBSFN_AreaInfoList_r9_t *) NULL,
|
||||
(LTE_MBSFNAreaConfiguration_r9_t*) NULL
|
||||
);
|
||||
}
|
||||
} else { // remove LCHAN from MAC/PHY
|
||||
@@ -6736,7 +6746,8 @@ rrc_eNB_process_RRCConnectionReconfigurationComplete(
|
||||
(LTE_SchedulingInfo_MBMS_r14_t *) NULL,
|
||||
(struct LTE_NonMBSFN_SubframeConfig_r14 *) NULL,
|
||||
(LTE_SystemInformationBlockType1_MBMS_r14_t *) NULL,
|
||||
(LTE_MBSFN_AreaInfoList_r9_t *) NULL
|
||||
(LTE_MBSFN_AreaInfoList_r9_t *) NULL,
|
||||
(LTE_MBSFNAreaConfiguration_r9_t*) NULL
|
||||
);
|
||||
}
|
||||
} // end else of if (ue_context_pP->ue_context.DRB_active[drb_id] == 0)
|
||||
@@ -6898,7 +6909,8 @@ rrc_eNB_generate_RRCConnectionSetup(
|
||||
(LTE_SchedulingInfo_MBMS_r14_t *) NULL,
|
||||
(struct LTE_NonMBSFN_SubframeConfig_r14 *) NULL,
|
||||
(LTE_SystemInformationBlockType1_MBMS_r14_t *) NULL,
|
||||
(LTE_MBSFN_AreaInfoList_r9_t *) NULL
|
||||
(LTE_MBSFN_AreaInfoList_r9_t *) NULL,
|
||||
(LTE_MBSFNAreaConfiguration_r9_t*) NULL
|
||||
);
|
||||
break;
|
||||
}
|
||||
@@ -8371,6 +8383,8 @@ rrc_eNB_decode_dcch(
|
||||
case LTE_UL_DCCH_MessageType__c1_PR_mbmsCountingResponse_r10:
|
||||
T(T_ENB_RRC_MBMS_COUNTING_RESPONSE_R10, T_INT(ctxt_pP->module_id), T_INT(ctxt_pP->frame),
|
||||
T_INT(ctxt_pP->subframe), T_INT(ctxt_pP->rnti));
|
||||
LOG_E(RRC, "THINH [LTE_UL_DCCH_MessageType__c1_PR_mbmsCountingResponse_r10]\n");
|
||||
|
||||
break;
|
||||
|
||||
case LTE_UL_DCCH_MessageType__c1_PR_interFreqRSTDMeasurementIndication_r10:
|
||||
|
||||
+446
-17
@@ -63,6 +63,71 @@ rrc_M2AP_openair_rrc_top_init_MBMS(int eMBMS_active){
|
||||
}
|
||||
|
||||
|
||||
static uint8_t rrc_M2AP_do_MBSFNCountingRequest(
|
||||
uint8_t Mod_id,
|
||||
uint8_t sync_area,
|
||||
uint8_t *buffer,
|
||||
LTE_MCCH_Message_t *mcch_message,
|
||||
LTE_MBMSCountingRequest_r10_t **mbsfnCoutingRequest,
|
||||
const m2ap_mbms_service_counting_req_t *const m2ap_mbms_service_counting_req
|
||||
) {
|
||||
//int i,j,k;
|
||||
|
||||
asn_enc_rval_t enc_rval;
|
||||
//LTE_MBSFN_SubframeConfig_t *mbsfn_SubframeConfig1;
|
||||
//LTE_PMCH_Info_r9_t *pmch_Info_1;
|
||||
//LTE_MBMS_SessionInfo_r9_t *mbms_Session_1;
|
||||
// MBMS_SessionInfo_r9_t *mbms_Session_2;
|
||||
//eNB_RRC_INST *rrc = RC.rrc[Mod_id];
|
||||
//rrc_eNB_carrier_data_t *carrier = &rrc->carrier[0];
|
||||
memset(mcch_message,0,sizeof(LTE_MCCH_Message_t));
|
||||
//mcch_message->message.present = LTE_MCCH_MessageType_PR_c1;
|
||||
mcch_message->message.present = LTE_MCCH_MessageType_PR_later;
|
||||
//mcch_message->message.choice.c1.present = LTE_MCCH_MessageType__c1_PR_mbsfnAreaConfiguration_r9;
|
||||
mcch_message->message.choice.later.present = LTE_MCCH_MessageType__later_PR_c2;
|
||||
mcch_message->message.choice.later.choice.c2.present = LTE_MCCH_MessageType__later__c2_PR_mbmsCountingRequest_r10;
|
||||
*mbsfnCoutingRequest = &mcch_message->message.choice.later.choice.c2.choice.mbmsCountingRequest_r10;
|
||||
|
||||
|
||||
//LTE_CountingRequestList_r10_t countingRequestList_r10; // A_SEQUENCE_OF(struct LTE_CountingRequestInfo_r10) list;
|
||||
struct LTE_CountingRequestInfo_r10 *lte_counting_request_info; //LTE_TMGI_r9_t tmgi_r10;
|
||||
lte_counting_request_info = CALLOC(1,sizeof(struct LTE_CountingRequestInfo_r10));
|
||||
uint8_t TMGI[5] = {4,3,2,1,0};
|
||||
lte_counting_request_info->tmgi_r10.plmn_Id_r9.present = LTE_TMGI_r9__plmn_Id_r9_PR_plmn_Index_r9;
|
||||
lte_counting_request_info->tmgi_r10.plmn_Id_r9.choice.plmn_Index_r9= 1;
|
||||
memset(<e_counting_request_info->tmgi_r10.serviceId_r9,0,sizeof(OCTET_STRING_t));
|
||||
OCTET_STRING_fromBuf(<e_counting_request_info->tmgi_r10.serviceId_r9,(const char*)&TMGI[2],3);
|
||||
ASN_SEQUENCE_ADD(&(*mbsfnCoutingRequest)->countingRequestList_r10.list,lte_counting_request_info);
|
||||
|
||||
if ( LOG_DEBUGFLAG(DEBUG_ASN1) ) {
|
||||
xer_fprint(stdout,&asn_DEF_LTE_MCCH_Message,(void *)mcch_message);
|
||||
}
|
||||
|
||||
xer_fprint(stdout,&asn_DEF_LTE_MCCH_Message,(void *)mcch_message);
|
||||
|
||||
enc_rval = uper_encode_to_buffer(&asn_DEF_LTE_MCCH_Message,
|
||||
NULL,
|
||||
(void *)mcch_message,
|
||||
buffer,
|
||||
100);
|
||||
|
||||
if(enc_rval.encoded == -1) {
|
||||
LOG_I(RRC, "[eNB AssertFatal]ASN1 message encoding failed (%s, %lu)!\n",
|
||||
enc_rval.failed_type->name, enc_rval.encoded);
|
||||
return -1;
|
||||
}
|
||||
|
||||
LOG_I(RRC,"[eNB] MCCH Message Encoded %zd bits (%zd bytes)\n",enc_rval.encoded,(enc_rval.encoded+7)/8);
|
||||
|
||||
if (enc_rval.encoded==-1) {
|
||||
msg("[RRC] ASN1 : MCCH encoding failed for MBSFNAreaConfiguration\n");
|
||||
return(-1);
|
||||
}
|
||||
|
||||
return((enc_rval.encoded+7)/8);
|
||||
|
||||
}
|
||||
|
||||
|
||||
static uint8_t rrc_M2AP_do_MBSFNAreaConfig(
|
||||
uint8_t Mod_id,
|
||||
@@ -96,6 +161,7 @@ static uint8_t rrc_M2AP_do_MBSFNAreaConfig(
|
||||
mbsfn_SubframeConfig1->radioframeAllocationPeriod= m2ap_mbms_scheduling_information->mbms_area_config_list[i].mbms_sf_config_list[j].radioframe_allocation_period;//LTE_MBSFN_SubframeConfig__radioframeAllocationPeriod_n4;
|
||||
mbsfn_SubframeConfig1->radioframeAllocationOffset= m2ap_mbms_scheduling_information->mbms_area_config_list[i].mbms_sf_config_list[j].radioframe_allocation_offset;
|
||||
if(m2ap_mbms_scheduling_information->mbms_area_config_list[i].mbms_sf_config_list[j].is_four_sf){
|
||||
LOG_I(RRC,"is_four_sf\n");
|
||||
mbsfn_SubframeConfig1->subframeAllocation.present= LTE_MBSFN_SubframeConfig__subframeAllocation_PR_fourFrames;
|
||||
mbsfn_SubframeConfig1->subframeAllocation.choice.oneFrame.buf= MALLOC(3);
|
||||
mbsfn_SubframeConfig1->subframeAllocation.choice.oneFrame.buf[2] = ((m2ap_mbms_scheduling_information->mbms_area_config_list[i].mbms_sf_config_list[j].subframe_allocation) & 0xFF);
|
||||
@@ -106,6 +172,7 @@ static uint8_t rrc_M2AP_do_MBSFNAreaConfig(
|
||||
|
||||
|
||||
}else {
|
||||
LOG_I(RRC,"is_one_sf\n");
|
||||
mbsfn_SubframeConfig1->subframeAllocation.present= LTE_MBSFN_SubframeConfig__subframeAllocation_PR_oneFrame;
|
||||
mbsfn_SubframeConfig1->subframeAllocation.choice.oneFrame.buf= MALLOC(1);
|
||||
mbsfn_SubframeConfig1->subframeAllocation.choice.oneFrame.size= 1;
|
||||
@@ -128,7 +195,8 @@ static uint8_t rrc_M2AP_do_MBSFNAreaConfig(
|
||||
*/
|
||||
pmch_Info_1->pmch_Config_r9.sf_AllocEnd_r9= m2ap_mbms_scheduling_information->mbms_area_config_list[i].pmch_config_list[j].allocated_sf_end;
|
||||
pmch_Info_1->pmch_Config_r9.dataMCS_r9= m2ap_mbms_scheduling_information->mbms_area_config_list[i].pmch_config_list[j].data_mcs;
|
||||
pmch_Info_1->pmch_Config_r9.mch_SchedulingPeriod_r9= LTE_PMCH_Config_r9__mch_SchedulingPeriod_r9_rf16;
|
||||
//pmch_Info_1->pmch_Config_r9.mch_SchedulingPeriod_r9= LTE_PMCH_Config_r9__mch_SchedulingPeriod_r9_rf16;
|
||||
pmch_Info_1->pmch_Config_r9.mch_SchedulingPeriod_r9 = m2ap_mbms_scheduling_information->mbms_area_config_list[i].pmch_config_list[j].mch_scheduling_period;
|
||||
// MBMSs-SessionInfoList-r9
|
||||
for(k=0; k < m2ap_mbms_scheduling_information->mbms_area_config_list[i].pmch_config_list[j].num_mbms_session_list; k++){
|
||||
// pmch_Info_1->mbms_SessionInfoList_r9 = CALLOC(1,sizeof(struct MBMS_SessionInfoList_r9));
|
||||
@@ -240,6 +308,9 @@ static void rrc_M2AP_init_MCCH(
|
||||
|
||||
RC.rrc[enb_mod_idP]->carrier[CC_id].MCCH_MESSAGE =
|
||||
malloc(RC.rrc[enb_mod_idP]->carrier[CC_id].num_mbsfn_sync_area * sizeof(uint8_t *));
|
||||
|
||||
RC.rrc[enb_mod_idP]->carrier[CC_id].MCCH_MESSAGE_COUNTING =
|
||||
malloc(RC.rrc[enb_mod_idP]->carrier[CC_id].num_mbsfn_sync_area * sizeof(uint8_t *));
|
||||
|
||||
for (sync_area = 0; sync_area < RC.rrc[enb_mod_idP]->carrier[CC_id].num_mbsfn_sync_area; sync_area++) {
|
||||
RC.rrc[enb_mod_idP]->carrier[CC_id].sizeof_MCCH_MESSAGE[sync_area] = 0;
|
||||
@@ -253,6 +324,20 @@ static void rrc_M2AP_init_MCCH(
|
||||
&RC.rrc[enb_mod_idP]->carrier[CC_id].mcch_message,
|
||||
m2ap_mbms_scheduling_information
|
||||
);
|
||||
|
||||
RC.rrc[enb_mod_idP]->carrier[CC_id].sizeof_MCCH_MESSAGE_COUNTING[sync_area] = 0;
|
||||
RC.rrc[enb_mod_idP]->carrier[CC_id].MCCH_MESSAGE_COUNTING[sync_area] = (uint8_t *) malloc16(32);
|
||||
AssertFatal(RC.rrc[enb_mod_idP]->carrier[CC_id].MCCH_MESSAGE_COUNTING[sync_area] != NULL,
|
||||
"[eNB %d]init_MCCH: FATAL, no memory for MCCH MESSAGE allocated \n", enb_mod_idP);
|
||||
|
||||
RC.rrc[enb_mod_idP]->carrier[CC_id].sizeof_MCCH_MESSAGE_COUNTING[sync_area] = rrc_M2AP_do_MBSFNCountingRequest(enb_mod_idP,
|
||||
sync_area,
|
||||
(uint8_t *)RC.rrc[enb_mod_idP]->carrier[CC_id].MCCH_MESSAGE_COUNTING[sync_area],
|
||||
&RC.rrc[enb_mod_idP]->carrier[CC_id].mcch_counting,
|
||||
&RC.rrc[enb_mod_idP]->carrier[CC_id].mcch_message_counting,
|
||||
NULL//m2ap_mbms_scheduling_information
|
||||
);
|
||||
|
||||
LOG_I(RRC, "mcch message pointer %p for sync area %d \n",
|
||||
RC.rrc[enb_mod_idP]->carrier[CC_id].MCCH_MESSAGE[sync_area],
|
||||
sync_area);
|
||||
@@ -269,6 +354,8 @@ static void rrc_M2AP_init_MCCH(
|
||||
AssertFatal(RC.rrc[enb_mod_idP]->carrier[CC_id].sizeof_MCCH_MESSAGE[sync_area] != 255,
|
||||
"RC.rrc[enb_mod_idP]->carrier[CC_id].sizeof_MCCH_MESSAGE[sync_area] == 255");
|
||||
RC.rrc[enb_mod_idP]->carrier[CC_id].MCCH_MESS[sync_area].Active = 1;
|
||||
|
||||
RC.rrc[enb_mod_idP]->carrier[CC_id].MCCH_MESS_COUNTING[sync_area].Active = 1;
|
||||
}
|
||||
|
||||
|
||||
@@ -297,17 +384,348 @@ static void rrc_M2AP_init_MCCH(
|
||||
(LTE_MBSFN_AreaInfoList_r9_t *) NULL,
|
||||
(LTE_PMCH_InfoList_r9_t *) & (RC.rrc[enb_mod_idP]->carrier[CC_id].mcch_message->pmch_InfoList_r9),
|
||||
(LTE_SystemInformationBlockType1_v1310_IEs_t *)NULL,
|
||||
0,
|
||||
(LTE_BCCH_DL_SCH_Message_MBMS_t *) NULL,
|
||||
(LTE_SchedulingInfo_MBMS_r14_t *) NULL,
|
||||
(struct LTE_NonMBSFN_SubframeConfig_r14 *) NULL,
|
||||
(LTE_SystemInformationBlockType1_MBMS_r14_t *) NULL,
|
||||
(LTE_MBSFN_AreaInfoList_r9_t *) NULL
|
||||
0,
|
||||
(LTE_BCCH_DL_SCH_Message_MBMS_t *) NULL,
|
||||
(LTE_SchedulingInfo_MBMS_r14_t *) NULL,
|
||||
(struct LTE_NonMBSFN_SubframeConfig_r14 *) NULL,
|
||||
(LTE_SystemInformationBlockType1_MBMS_r14_t *) NULL,
|
||||
(LTE_MBSFN_AreaInfoList_r9_t *) NULL,
|
||||
(LTE_MBSFNAreaConfiguration_r9_t*)(RC.rrc[enb_mod_idP]->carrier[CC_id].mcch_message)
|
||||
);
|
||||
}
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
static uint8_t rrc_M2AP_do_SIB1_MBMS_SIB13(
|
||||
const protocol_ctxt_t *const ctxt_pP,
|
||||
uint8_t Mod_id,
|
||||
int CC_id,
|
||||
const m2ap_setup_resp_t *const m2ap_setup_resp,
|
||||
const m2ap_mbms_scheduling_information_t *const m2ap_mbms_scheduling_information
|
||||
){
|
||||
|
||||
int i,j,l;
|
||||
|
||||
eNB_RRC_INST *rrc = RC.rrc[ctxt_pP->module_id];
|
||||
rrc_eNB_carrier_data_t *carrier=&rrc->carrier[CC_id];
|
||||
|
||||
|
||||
struct LTE_SystemInformation_r8_IEs__sib_TypeAndInfo__Member *sib13_part=NULL;
|
||||
LTE_MBSFN_SubframeConfigList_t *MBSFNSubframeConfigList/*,*MBSFNSubframeConfigList_copy*/;
|
||||
|
||||
asn_enc_rval_t enc_rval;
|
||||
|
||||
LTE_BCCH_DL_SCH_Message_t *bcch_message = &RC.rrc[Mod_id]->carrier[CC_id].systemInformation;
|
||||
LTE_BCCH_DL_SCH_Message_MBMS_t *bcch_message_fembms = &RC.rrc[Mod_id]->carrier[CC_id].siblock1_MBMS;
|
||||
uint8_t *buffer;
|
||||
uint8_t *buffer_fembms;
|
||||
LTE_SystemInformationBlockType2_t **sib2;
|
||||
|
||||
|
||||
LTE_MBSFN_AreaInfoList_r9_t *MBSFNArea_list/*,*MBSFNArea_list_copy*/;
|
||||
LTE_SystemInformationBlockType13_r9_t **sib13 = &RC.rrc[Mod_id]->carrier[CC_id].sib13;
|
||||
struct LTE_MBSFN_AreaInfo_r9 *MBSFN_Area1;
|
||||
|
||||
LTE_SystemInformationBlockType1_MBMS_r14_t **sib1_MBMS = &RC.rrc[Mod_id]->carrier[CC_id].sib1_MBMS;
|
||||
|
||||
|
||||
|
||||
if(ctxt_pP->brOption){
|
||||
buffer = RC.rrc[Mod_id]->carrier[CC_id].SIB23_BR;
|
||||
sib2 = &RC.rrc[Mod_id]->carrier[CC_id].sib2_BR;
|
||||
LOG_I(RRC,"Running SIB2/3 Encoding for eMTC\n");
|
||||
|
||||
|
||||
}else
|
||||
{
|
||||
buffer = RC.rrc[Mod_id]->carrier[CC_id].SIB23;
|
||||
sib2 = &RC.rrc[Mod_id]->carrier[CC_id].sib2;
|
||||
}
|
||||
|
||||
buffer_fembms = RC.rrc[Mod_id]->carrier[CC_id].SIB1_MBMS;
|
||||
|
||||
|
||||
if (bcch_message) {
|
||||
//memset(bcch_message,0,sizeof(LTE_BCCH_DL_SCH_Message_t));
|
||||
} else {
|
||||
LOG_E(RRC,"[eNB %d] BCCH_MESSAGE is null, exiting\n", Mod_id);
|
||||
exit(-1);
|
||||
}
|
||||
|
||||
if (!sib2) {
|
||||
LOG_E(RRC,"[eNB %d] sib2 is null, exiting\n", Mod_id);
|
||||
exit(-1);
|
||||
}
|
||||
|
||||
if(!sib13){
|
||||
LOG_I(RRC,"[eNB %d] sib13 is null, it should get created\n",Mod_id);
|
||||
}
|
||||
|
||||
|
||||
if(!sib1_MBMS){
|
||||
LOG_I(RRC,"[eNB %d] sib1_MBMS is null, it should get created\n",Mod_id);
|
||||
}
|
||||
|
||||
//if (!sib3) {
|
||||
// LOG_E(RRC,"[eNB %d] sib3 is null, exiting\n", Mod_id);
|
||||
// exit(-1);
|
||||
//}
|
||||
|
||||
for (i=0; i < bcch_message->message.choice.c1.choice.systemInformation.criticalExtensions.choice.systemInformation_r8.sib_TypeAndInfo.list.count; i++) {
|
||||
struct LTE_SystemInformation_r8_IEs__sib_TypeAndInfo__Member *typeandinfo;
|
||||
typeandinfo = bcch_message->message.choice.c1.choice.systemInformation.criticalExtensions.choice.systemInformation_r8.sib_TypeAndInfo.list.array[i];
|
||||
switch(typeandinfo->present) {
|
||||
case LTE_SystemInformation_r8_IEs__sib_TypeAndInfo__Member_PR_NOTHING:
|
||||
break;
|
||||
case LTE_SystemInformation_r8_IEs__sib_TypeAndInfo__Member_PR_sib3:
|
||||
break;
|
||||
case LTE_SystemInformation_r8_IEs__sib_TypeAndInfo__Member_PR_sib4:
|
||||
break;
|
||||
case LTE_SystemInformation_r8_IEs__sib_TypeAndInfo__Member_PR_sib5:
|
||||
break;
|
||||
case LTE_SystemInformation_r8_IEs__sib_TypeAndInfo__Member_PR_sib6:
|
||||
break;
|
||||
case LTE_SystemInformation_r8_IEs__sib_TypeAndInfo__Member_PR_sib7:
|
||||
break;
|
||||
case LTE_SystemInformation_r8_IEs__sib_TypeAndInfo__Member_PR_sib8:
|
||||
break;
|
||||
case LTE_SystemInformation_r8_IEs__sib_TypeAndInfo__Member_PR_sib9:
|
||||
break;
|
||||
case LTE_SystemInformation_r8_IEs__sib_TypeAndInfo__Member_PR_sib10:
|
||||
break;
|
||||
case LTE_SystemInformation_r8_IEs__sib_TypeAndInfo__Member_PR_sib11:
|
||||
break;
|
||||
case LTE_SystemInformation_r8_IEs__sib_TypeAndInfo__Member_PR_sib12_v920:
|
||||
break;
|
||||
case LTE_SystemInformation_r8_IEs__sib_TypeAndInfo__Member_PR_sib13_v920:
|
||||
*sib13=&typeandinfo->choice.sib13_v920;
|
||||
(*sib13)->notificationConfig_r9.notificationRepetitionCoeff_r9=LTE_MBMS_NotificationConfig_r9__notificationRepetitionCoeff_r9_n2;
|
||||
(*sib13)->notificationConfig_r9.notificationOffset_r9=0;
|
||||
(*sib13)->notificationConfig_r9.notificationSF_Index_r9=1;
|
||||
// MBSFN-AreaInfoList
|
||||
MBSFNArea_list= &(*sib13)->mbsfn_AreaInfoList_r9;//CALLOC(1,sizeof(*MBSFNArea_list));
|
||||
memset(MBSFNArea_list,0,sizeof(*MBSFNArea_list));
|
||||
|
||||
for( j=0; j < m2ap_setup_resp->num_mcch_config_per_mbsfn; j++){
|
||||
// MBSFN Area 1
|
||||
MBSFN_Area1= CALLOC(1, sizeof(*MBSFN_Area1));
|
||||
MBSFN_Area1->mbsfn_AreaId_r9= m2ap_setup_resp->mcch_config_per_mbsfn[j].mbsfn_area;
|
||||
MBSFN_Area1->non_MBSFNregionLength= m2ap_setup_resp->mcch_config_per_mbsfn[j].pdcch_length;
|
||||
MBSFN_Area1->notificationIndicator_r9= 0;
|
||||
MBSFN_Area1->mcch_Config_r9.mcch_RepetitionPeriod_r9= m2ap_setup_resp->mcch_config_per_mbsfn[j].repetition_period;//LTE_MBSFN_AreaInfo_r9__mcch_Config_r9__mcch_RepetitionPeriod_r9_rf32;
|
||||
MBSFN_Area1->mcch_Config_r9.mcch_Offset_r9= m2ap_setup_resp->mcch_config_per_mbsfn[j].offset; // in accordance with mbsfn subframe configuration in sib2
|
||||
MBSFN_Area1->mcch_Config_r9.mcch_ModificationPeriod_r9= m2ap_setup_resp->mcch_config_per_mbsfn[j].modification_period;
|
||||
|
||||
// Subframe Allocation Info
|
||||
MBSFN_Area1->mcch_Config_r9.sf_AllocInfo_r9.buf= MALLOC(1);
|
||||
MBSFN_Area1->mcch_Config_r9.sf_AllocInfo_r9.size= 1;
|
||||
MBSFN_Area1->mcch_Config_r9.sf_AllocInfo_r9.buf[0]=m2ap_setup_resp->mcch_config_per_mbsfn[j].subframe_allocation_info<<2; // FDD: SF1
|
||||
MBSFN_Area1->mcch_Config_r9.sf_AllocInfo_r9.bits_unused= 2;
|
||||
MBSFN_Area1->mcch_Config_r9.signallingMCS_r9= m2ap_setup_resp->mcch_config_per_mbsfn[j].mcs;
|
||||
ASN_SEQUENCE_ADD(&MBSFNArea_list->list,MBSFN_Area1);
|
||||
}
|
||||
break;
|
||||
case LTE_SystemInformation_r8_IEs__sib_TypeAndInfo__Member_PR_sib14_v1130:
|
||||
break;
|
||||
case LTE_SystemInformation_r8_IEs__sib_TypeAndInfo__Member_PR_sib15_v1130:
|
||||
break;
|
||||
case LTE_SystemInformation_r8_IEs__sib_TypeAndInfo__Member_PR_sib16_v1130:
|
||||
break;
|
||||
case LTE_SystemInformation_r8_IEs__sib_TypeAndInfo__Member_PR_sib17_v1250:
|
||||
break;
|
||||
case LTE_SystemInformation_r8_IEs__sib_TypeAndInfo__Member_PR_sib18_v1250:
|
||||
break;
|
||||
case LTE_SystemInformation_r8_IEs__sib_TypeAndInfo__Member_PR_sib19_v1250:
|
||||
break;
|
||||
case LTE_SystemInformation_r8_IEs__sib_TypeAndInfo__Member_PR_sib20_v1310:
|
||||
break;
|
||||
case LTE_SystemInformation_r8_IEs__sib_TypeAndInfo__Member_PR_sib21_v1430:
|
||||
break;
|
||||
case LTE_SystemInformation_r8_IEs__sib_TypeAndInfo__Member_PR_sib24_v1530:
|
||||
break;
|
||||
case LTE_SystemInformation_r8_IEs__sib_TypeAndInfo__Member_PR_sib25_v1530:
|
||||
break;
|
||||
case LTE_SystemInformation_r8_IEs__sib_TypeAndInfo__Member_PR_sib26_v1530:
|
||||
break;
|
||||
case LTE_SystemInformation_r8_IEs__sib_TypeAndInfo__Member_PR_sib2:
|
||||
|
||||
LOG_I(RRC,"Adding MBSFN subframe Configuration 1 to SIB2, %p %p\n",&typeandinfo->choice.sib2,*sib2);
|
||||
|
||||
for(j=0; j < m2ap_mbms_scheduling_information->num_mbms_area_config_list ; j++) {
|
||||
|
||||
(&typeandinfo->choice.sib2)->mbsfn_SubframeConfigList = CALLOC(1,sizeof(struct LTE_MBSFN_SubframeConfigList));
|
||||
MBSFNSubframeConfigList = (&typeandinfo->choice.sib2)->mbsfn_SubframeConfigList;
|
||||
|
||||
for(l=0; l < m2ap_mbms_scheduling_information->mbms_area_config_list[j].num_mbms_sf_config_list; l++){
|
||||
LTE_MBSFN_SubframeConfig_t *sib2_mbsfn_SubframeConfig1;
|
||||
sib2_mbsfn_SubframeConfig1= CALLOC(1,sizeof(*sib2_mbsfn_SubframeConfig1));
|
||||
memset((void *)sib2_mbsfn_SubframeConfig1,0,sizeof(*sib2_mbsfn_SubframeConfig1));
|
||||
|
||||
sib2_mbsfn_SubframeConfig1->radioframeAllocationPeriod = m2ap_mbms_scheduling_information->mbms_area_config_list[j].mbms_sf_config_list[l].radioframe_allocation_period;
|
||||
sib2_mbsfn_SubframeConfig1->radioframeAllocationOffset = m2ap_mbms_scheduling_information->mbms_area_config_list[j].mbms_sf_config_list[l].radioframe_allocation_offset;
|
||||
|
||||
|
||||
if(m2ap_mbms_scheduling_information->mbms_area_config_list[j].mbms_sf_config_list[l].is_four_sf){
|
||||
LOG_I(RRC,"is_four_sf\n");
|
||||
sib2_mbsfn_SubframeConfig1->subframeAllocation.present= LTE_MBSFN_SubframeConfig__subframeAllocation_PR_fourFrames;
|
||||
|
||||
sib2_mbsfn_SubframeConfig1->subframeAllocation.choice.oneFrame.buf= MALLOC(3);
|
||||
sib2_mbsfn_SubframeConfig1->subframeAllocation.choice.oneFrame.size= 3;
|
||||
sib2_mbsfn_SubframeConfig1->subframeAllocation.choice.oneFrame.bits_unused= 0;
|
||||
sib2_mbsfn_SubframeConfig1->subframeAllocation.choice.oneFrame.buf[2] = ((m2ap_mbms_scheduling_information->mbms_area_config_list[j].mbms_sf_config_list[l].subframe_allocation) & 0xFF);
|
||||
sib2_mbsfn_SubframeConfig1->subframeAllocation.choice.oneFrame.buf[1] = ((m2ap_mbms_scheduling_information->mbms_area_config_list[j].mbms_sf_config_list[l].subframe_allocation>>8) & 0xFF);
|
||||
sib2_mbsfn_SubframeConfig1->subframeAllocation.choice.oneFrame.buf[0] = ((m2ap_mbms_scheduling_information->mbms_area_config_list[j].mbms_sf_config_list[l].subframe_allocation>>16) & 0xFF);
|
||||
|
||||
}else{
|
||||
LOG_I(RRC,"is_one_sf\n");
|
||||
sib2_mbsfn_SubframeConfig1->subframeAllocation.present= LTE_MBSFN_SubframeConfig__subframeAllocation_PR_oneFrame;
|
||||
sib2_mbsfn_SubframeConfig1->subframeAllocation.choice.oneFrame.buf= MALLOC(1);
|
||||
sib2_mbsfn_SubframeConfig1->subframeAllocation.choice.oneFrame.size= 1;
|
||||
sib2_mbsfn_SubframeConfig1->subframeAllocation.choice.oneFrame.bits_unused= 2;
|
||||
sib2_mbsfn_SubframeConfig1->subframeAllocation.choice.oneFrame.buf[0]=(m2ap_mbms_scheduling_information->mbms_area_config_list[j].mbms_sf_config_list[l].subframe_allocation<<2);
|
||||
|
||||
|
||||
}
|
||||
|
||||
ASN_SEQUENCE_ADD(&MBSFNSubframeConfigList->list,sib2_mbsfn_SubframeConfig1);
|
||||
}
|
||||
}
|
||||
|
||||
break;
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
if(*sib13==NULL){
|
||||
sib13_part = CALLOC(1,sizeof(struct LTE_SystemInformation_r8_IEs__sib_TypeAndInfo__Member));
|
||||
memset(sib13_part,0,sizeof(struct LTE_SystemInformation_r8_IEs__sib_TypeAndInfo__Member));
|
||||
sib13_part->present = LTE_SystemInformation_r8_IEs__sib_TypeAndInfo__Member_PR_sib13_v920;
|
||||
|
||||
*sib13 = &sib13_part->choice.sib13_v920;
|
||||
|
||||
(*sib13)->notificationConfig_r9.notificationRepetitionCoeff_r9=LTE_MBMS_NotificationConfig_r9__notificationRepetitionCoeff_r9_n2;
|
||||
(*sib13)->notificationConfig_r9.notificationOffset_r9=0;
|
||||
(*sib13)->notificationConfig_r9.notificationSF_Index_r9=1;
|
||||
|
||||
// MBSFN-AreaInfoList
|
||||
MBSFNArea_list= &(*sib13)->mbsfn_AreaInfoList_r9;//CALLOC(1,sizeof(*MBSFNArea_list));
|
||||
memset(MBSFNArea_list,0,sizeof(*MBSFNArea_list));
|
||||
|
||||
for( i=0; i < m2ap_setup_resp->num_mcch_config_per_mbsfn; i++){
|
||||
// MBSFN Area 1
|
||||
MBSFN_Area1= CALLOC(1, sizeof(*MBSFN_Area1));
|
||||
MBSFN_Area1->mbsfn_AreaId_r9= m2ap_setup_resp->mcch_config_per_mbsfn[i].mbsfn_area;
|
||||
MBSFN_Area1->non_MBSFNregionLength= m2ap_setup_resp->mcch_config_per_mbsfn[i].pdcch_length;
|
||||
MBSFN_Area1->notificationIndicator_r9= 0;
|
||||
MBSFN_Area1->mcch_Config_r9.mcch_RepetitionPeriod_r9= m2ap_setup_resp->mcch_config_per_mbsfn[i].repetition_period;//LTE_MBSFN_AreaInfo_r9__mcch_Config_r9__mcch_RepetitionPeriod_r9_rf32;
|
||||
MBSFN_Area1->mcch_Config_r9.mcch_Offset_r9= m2ap_setup_resp->mcch_config_per_mbsfn[i].offset; // in accordance with mbsfn subframe configuration in sib2
|
||||
MBSFN_Area1->mcch_Config_r9.mcch_ModificationPeriod_r9= m2ap_setup_resp->mcch_config_per_mbsfn[i].modification_period;
|
||||
|
||||
// Subframe Allocation Info
|
||||
MBSFN_Area1->mcch_Config_r9.sf_AllocInfo_r9.buf= MALLOC(1);
|
||||
MBSFN_Area1->mcch_Config_r9.sf_AllocInfo_r9.size= 1;
|
||||
MBSFN_Area1->mcch_Config_r9.sf_AllocInfo_r9.buf[0]=m2ap_setup_resp->mcch_config_per_mbsfn[i].subframe_allocation_info<<2; // FDD: SF1
|
||||
MBSFN_Area1->mcch_Config_r9.sf_AllocInfo_r9.bits_unused= 2;
|
||||
MBSFN_Area1->mcch_Config_r9.signallingMCS_r9= m2ap_setup_resp->mcch_config_per_mbsfn[i].mcs;
|
||||
ASN_SEQUENCE_ADD(&MBSFNArea_list->list,MBSFN_Area1);
|
||||
}
|
||||
|
||||
ASN_SEQUENCE_ADD(&bcch_message->message.choice.c1.choice.systemInformation.criticalExtensions.choice.systemInformation_r8.sib_TypeAndInfo.list, sib13_part);
|
||||
|
||||
}
|
||||
|
||||
*sib1_MBMS = &bcch_message_fembms->message.choice.c1.choice.systemInformationBlockType1_MBMS_r14;
|
||||
|
||||
|
||||
if((*sib1_MBMS)->systemInformationBlockType13_r14==NULL){
|
||||
(*sib1_MBMS)->systemInformationBlockType13_r14 = CALLOC(1,sizeof(struct LTE_SystemInformationBlockType13_r9));
|
||||
memset((*sib1_MBMS)->systemInformationBlockType13_r14,0,sizeof(struct LTE_SystemInformationBlockType13_r9));
|
||||
}
|
||||
|
||||
|
||||
memcpy((*sib1_MBMS)->systemInformationBlockType13_r14,*sib13,sizeof(struct LTE_SystemInformationBlockType13_r9));
|
||||
|
||||
enc_rval = uper_encode_to_buffer(&asn_DEF_LTE_BCCH_DL_SCH_Message_MBMS,
|
||||
NULL,
|
||||
(void *)bcch_message_fembms,
|
||||
buffer_fembms,
|
||||
100);
|
||||
AssertFatal (enc_rval.encoded > 0, "ASN1 message encoding failed (%s, %lu)!\n",
|
||||
enc_rval.failed_type->name, enc_rval.encoded);
|
||||
|
||||
LOG_I(RRC,"[eNB] MBMS SIB1_MBMS SystemInformation Encoded %zd bits (%zd bytes)\n",enc_rval.encoded,(enc_rval.encoded+7)/8);
|
||||
|
||||
if (enc_rval.encoded==-1) {
|
||||
msg("[RRC] ASN1 : SI encoding failed for SIB23\n");
|
||||
return(-1);
|
||||
}
|
||||
|
||||
|
||||
|
||||
//xer_fprint(stdout, &asn_DEF_LTE_BCCH_DL_SCH_Message, (void *)bcch_message);
|
||||
|
||||
enc_rval = uper_encode_to_buffer(&asn_DEF_LTE_BCCH_DL_SCH_Message,
|
||||
NULL,
|
||||
(void *)bcch_message,
|
||||
buffer,
|
||||
900);
|
||||
AssertFatal (enc_rval.encoded > 0, "ASN1 message encoding failed (%s, %lu)!\n",
|
||||
enc_rval.failed_type->name, enc_rval.encoded);
|
||||
|
||||
LOG_I(RRC,"[eNB] MBMS SIB2 SystemInformation Encoded %zd bits (%zd bytes)\n",enc_rval.encoded,(enc_rval.encoded+7)/8);
|
||||
|
||||
if (enc_rval.encoded==-1) {
|
||||
msg("[RRC] ASN1 : SI encoding failed for SIB23\n");
|
||||
return(-1);
|
||||
}
|
||||
|
||||
carrier->MBMS_flag =1;
|
||||
|
||||
if (NODE_IS_MONOLITHIC(rrc->node_type)) {
|
||||
rrc_mac_config_req_eNB(ctxt_pP->module_id, CC_id,
|
||||
0,0,0,0,0,
|
||||
0,
|
||||
0xfffd,//rnti
|
||||
(LTE_BCCH_BCH_Message_t *)NULL,
|
||||
(LTE_RadioResourceConfigCommonSIB_t *) NULL,
|
||||
(LTE_RadioResourceConfigCommonSIB_t *) NULL,
|
||||
(struct LTE_PhysicalConfigDedicated *)NULL,
|
||||
(LTE_SCellToAddMod_r10_t *)NULL,
|
||||
//(struct LTE_PhysicalConfigDedicatedSCell_r10 *)NULL,
|
||||
(LTE_MeasObjectToAddMod_t **) NULL,
|
||||
(LTE_MAC_MainConfig_t *) NULL,
|
||||
0,
|
||||
(struct LTE_LogicalChannelConfig *)NULL,
|
||||
(LTE_MeasGapConfig_t *) NULL,
|
||||
(LTE_TDD_Config_t *) NULL,
|
||||
(LTE_MobilityControlInfo_t *)NULL,
|
||||
(LTE_SchedulingInfoList_t *) NULL,
|
||||
0, NULL,
|
||||
(LTE_AdditionalSpectrumEmission_t *)NULL,
|
||||
(LTE_MBSFN_SubframeConfigList_t *) carrier->sib2->mbsfn_SubframeConfigList,
|
||||
carrier->MBMS_flag,
|
||||
(LTE_MBSFN_AreaInfoList_r9_t *) & carrier->sib13->mbsfn_AreaInfoList_r9,
|
||||
(LTE_PMCH_InfoList_r9_t *) NULL
|
||||
,
|
||||
(LTE_SystemInformationBlockType1_v1310_IEs_t *)NULL
|
||||
,
|
||||
carrier->FeMBMS_flag,
|
||||
(LTE_BCCH_DL_SCH_Message_MBMS_t *) NULL,
|
||||
(LTE_SchedulingInfo_MBMS_r14_t *) NULL,
|
||||
(struct LTE_NonMBSFN_SubframeConfig_r14 *) NULL,
|
||||
(LTE_SystemInformationBlockType1_MBMS_r14_t *) NULL,
|
||||
(LTE_MBSFN_AreaInfoList_r9_t *) NULL,
|
||||
(LTE_MBSFNAreaConfiguration_r9_t*) NULL
|
||||
);
|
||||
}
|
||||
|
||||
RC.rrc[ctxt_pP->module_id]->carrier[CC_id].sizeof_SIB23 = ((enc_rval.encoded+7)/8);
|
||||
|
||||
return 0;
|
||||
}
|
||||
//static uint8_t rrc_M2AP_do_SIB1(
|
||||
// const protocol_ctxt_t *const ctxt_pP,
|
||||
// uint8_t Mod_id,
|
||||
@@ -501,21 +919,23 @@ static uint8_t rrc_M2AP_do_SIB23_SIB2(
|
||||
|
||||
|
||||
if(m2ap_mbms_scheduling_information->mbms_area_config_list[j].mbms_sf_config_list[l].is_four_sf){
|
||||
LOG_I(RRC,"is_four_sf\n");
|
||||
sib2_mbsfn_SubframeConfig1->subframeAllocation.present= LTE_MBSFN_SubframeConfig__subframeAllocation_PR_fourFrames;
|
||||
|
||||
sib2_mbsfn_SubframeConfig1->subframeAllocation.choice.oneFrame.buf= MALLOC(3);
|
||||
sib2_mbsfn_SubframeConfig1->subframeAllocation.choice.oneFrame.size= 3;
|
||||
sib2_mbsfn_SubframeConfig1->subframeAllocation.choice.oneFrame.bits_unused= 0;
|
||||
sib2_mbsfn_SubframeConfig1->subframeAllocation.choice.oneFrame.buf[2] = ((m2ap_mbms_scheduling_information->mbms_area_config_list[j].mbms_sf_config_list[j].subframe_allocation) & 0xFF);
|
||||
sib2_mbsfn_SubframeConfig1->subframeAllocation.choice.oneFrame.buf[1] = ((m2ap_mbms_scheduling_information->mbms_area_config_list[j].mbms_sf_config_list[j].subframe_allocation>>8) & 0xFF);
|
||||
sib2_mbsfn_SubframeConfig1->subframeAllocation.choice.oneFrame.buf[2] = ((m2ap_mbms_scheduling_information->mbms_area_config_list[j].mbms_sf_config_list[l].subframe_allocation) & 0xFF);
|
||||
sib2_mbsfn_SubframeConfig1->subframeAllocation.choice.oneFrame.buf[1] = ((m2ap_mbms_scheduling_information->mbms_area_config_list[j].mbms_sf_config_list[l].subframe_allocation>>8) & 0xFF);
|
||||
sib2_mbsfn_SubframeConfig1->subframeAllocation.choice.oneFrame.buf[0] = ((m2ap_mbms_scheduling_information->mbms_area_config_list[j].mbms_sf_config_list[l].subframe_allocation>>16) & 0xFF);
|
||||
|
||||
}else{
|
||||
LOG_I(RRC,"is_one_sf\n");
|
||||
sib2_mbsfn_SubframeConfig1->subframeAllocation.present= LTE_MBSFN_SubframeConfig__subframeAllocation_PR_oneFrame;
|
||||
sib2_mbsfn_SubframeConfig1->subframeAllocation.choice.oneFrame.buf= MALLOC(1);
|
||||
sib2_mbsfn_SubframeConfig1->subframeAllocation.choice.oneFrame.size= 1;
|
||||
sib2_mbsfn_SubframeConfig1->subframeAllocation.choice.oneFrame.bits_unused= 2;
|
||||
sib2_mbsfn_SubframeConfig1->subframeAllocation.choice.oneFrame.buf[0]=(m2ap_mbms_scheduling_information->mbms_area_config_list[j].mbms_sf_config_list[j].subframe_allocation<<2);
|
||||
sib2_mbsfn_SubframeConfig1->subframeAllocation.choice.oneFrame.buf[0]=(m2ap_mbms_scheduling_information->mbms_area_config_list[j].mbms_sf_config_list[l].subframe_allocation<<2);
|
||||
|
||||
|
||||
}
|
||||
@@ -580,7 +1000,8 @@ static uint8_t rrc_M2AP_do_SIB23_SIB2(
|
||||
(LTE_SchedulingInfo_MBMS_r14_t *) NULL,
|
||||
(struct LTE_NonMBSFN_SubframeConfig_r14 *) NULL,
|
||||
(LTE_SystemInformationBlockType1_MBMS_r14_t *) NULL,
|
||||
(LTE_MBSFN_AreaInfoList_r9_t *) NULL
|
||||
(LTE_MBSFN_AreaInfoList_r9_t *) NULL,
|
||||
(LTE_MBSFNAreaConfiguration_r9_t*) NULL
|
||||
);
|
||||
}
|
||||
|
||||
@@ -752,7 +1173,8 @@ for( i=0; i < m2ap_setup_resp->num_mcch_config_per_mbsfn; i++){
|
||||
(LTE_SchedulingInfo_MBMS_r14_t *) NULL,
|
||||
(struct LTE_NonMBSFN_SubframeConfig_r14 *) NULL,
|
||||
(LTE_SystemInformationBlockType1_MBMS_r14_t *) NULL,
|
||||
(LTE_MBSFN_AreaInfoList_r9_t *) NULL
|
||||
(LTE_MBSFN_AreaInfoList_r9_t *) NULL,
|
||||
(LTE_MBSFNAreaConfiguration_r9_t*) NULL
|
||||
);
|
||||
}
|
||||
|
||||
@@ -917,20 +1339,22 @@ static uint8_t rrc_M2AP_do_SIB23_SIB2_SIB13(
|
||||
|
||||
if(m2ap_mbms_scheduling_information->mbms_area_config_list[j].mbms_sf_config_list[l].is_four_sf){
|
||||
sib2_mbsfn_SubframeConfig1->subframeAllocation.present= LTE_MBSFN_SubframeConfig__subframeAllocation_PR_fourFrames;
|
||||
LOG_I(RRC,"rrc_M2AP_do_SIB23_SIB2_SIB13 is_four_sf\n");
|
||||
|
||||
sib2_mbsfn_SubframeConfig1->subframeAllocation.choice.oneFrame.buf= MALLOC(3);
|
||||
sib2_mbsfn_SubframeConfig1->subframeAllocation.choice.oneFrame.size= 3;
|
||||
sib2_mbsfn_SubframeConfig1->subframeAllocation.choice.oneFrame.bits_unused= 0;
|
||||
sib2_mbsfn_SubframeConfig1->subframeAllocation.choice.oneFrame.buf[2] = ((m2ap_mbms_scheduling_information->mbms_area_config_list[j].mbms_sf_config_list[j].subframe_allocation) & 0xFF);
|
||||
sib2_mbsfn_SubframeConfig1->subframeAllocation.choice.oneFrame.buf[1] = ((m2ap_mbms_scheduling_information->mbms_area_config_list[j].mbms_sf_config_list[j].subframe_allocation>>8) & 0xFF);
|
||||
sib2_mbsfn_SubframeConfig1->subframeAllocation.choice.oneFrame.buf[2] = ((m2ap_mbms_scheduling_information->mbms_area_config_list[j].mbms_sf_config_list[l].subframe_allocation) & 0xFF);
|
||||
sib2_mbsfn_SubframeConfig1->subframeAllocation.choice.oneFrame.buf[1] = ((m2ap_mbms_scheduling_information->mbms_area_config_list[j].mbms_sf_config_list[l].subframe_allocation>>8) & 0xFF);
|
||||
sib2_mbsfn_SubframeConfig1->subframeAllocation.choice.oneFrame.buf[0] = ((m2ap_mbms_scheduling_information->mbms_area_config_list[j].mbms_sf_config_list[l].subframe_allocation>>16) & 0xFF);
|
||||
|
||||
}else{
|
||||
LOG_I(RRC,"rrc_M2AP_do_SIB23_SIB2_SIB13 rs_one_sf\n");
|
||||
sib2_mbsfn_SubframeConfig1->subframeAllocation.present= LTE_MBSFN_SubframeConfig__subframeAllocation_PR_oneFrame;
|
||||
sib2_mbsfn_SubframeConfig1->subframeAllocation.choice.oneFrame.buf= MALLOC(1);
|
||||
sib2_mbsfn_SubframeConfig1->subframeAllocation.choice.oneFrame.size= 1;
|
||||
sib2_mbsfn_SubframeConfig1->subframeAllocation.choice.oneFrame.bits_unused= 2;
|
||||
sib2_mbsfn_SubframeConfig1->subframeAllocation.choice.oneFrame.buf[0]=(m2ap_mbms_scheduling_information->mbms_area_config_list[j].mbms_sf_config_list[j].subframe_allocation<<2);
|
||||
sib2_mbsfn_SubframeConfig1->subframeAllocation.choice.oneFrame.buf[0]=(m2ap_mbms_scheduling_information->mbms_area_config_list[j].mbms_sf_config_list[l].subframe_allocation<<2);
|
||||
|
||||
|
||||
}
|
||||
@@ -1030,7 +1454,8 @@ static uint8_t rrc_M2AP_do_SIB23_SIB2_SIB13(
|
||||
(LTE_SchedulingInfo_MBMS_r14_t *) NULL,
|
||||
(struct LTE_NonMBSFN_SubframeConfig_r14 *) NULL,
|
||||
(LTE_SystemInformationBlockType1_MBMS_r14_t *) NULL,
|
||||
(LTE_MBSFN_AreaInfoList_r9_t *) NULL
|
||||
(LTE_MBSFN_AreaInfoList_r9_t *) NULL,
|
||||
(LTE_MBSFNAreaConfiguration_r9_t*) NULL
|
||||
);
|
||||
}
|
||||
|
||||
@@ -1122,7 +1547,11 @@ rrc_eNB_process_M2AP_MBMS_SESSION_START_REQ(
|
||||
rrc_M2AP_do_SIB23_SIB2(ctxt_pP,ctxt_pP->module_id,CC_id,m2ap_mbms_scheduling_information_g);
|
||||
rrc_M2AP_do_SIB23_SIB13(ctxt_pP,ctxt_pP->module_id,CC_id,m2ap_setup_resp_g);
|
||||
}else{
|
||||
rrc_M2AP_do_SIB23_SIB2_SIB13(ctxt_pP,ctxt_pP->module_id,CC_id,m2ap_setup_resp_g,m2ap_mbms_scheduling_information_g);
|
||||
if(RC.rrc[ctxt_pP->module_id]->carrier[CC_id].FeMBMS_flag){
|
||||
rrc_M2AP_do_SIB1_MBMS_SIB13(ctxt_pP,ctxt_pP->module_id,CC_id,m2ap_setup_resp_g,m2ap_mbms_scheduling_information_g);
|
||||
}else{
|
||||
rrc_M2AP_do_SIB23_SIB2_SIB13(ctxt_pP,ctxt_pP->module_id,CC_id,m2ap_setup_resp_g,m2ap_mbms_scheduling_information_g);
|
||||
}
|
||||
}
|
||||
rrc_M2AP_init_MCCH(ctxt_pP,ctxt_pP->module_id,CC_id,m2ap_mbms_scheduling_information_g);
|
||||
rrc_M2AP_init_MBMS(ctxt_pP->module_id, CC_id, 0);
|
||||
|
||||
@@ -142,6 +142,20 @@ void m3ap_MCE_handle_sctp_association_resp(instance_t instance, sctp_new_associa
|
||||
sctp_new_association_resp->ulp_cnx_id);
|
||||
//m3ap_handle_m3_setup_message(instance_p, m3ap_enb_data_p,
|
||||
//sctp_new_association_resp->sctp_state == SCTP_STATE_SHUTDOWN);
|
||||
sleep(4);
|
||||
int index;
|
||||
/* Trying to connect to the provided list of eNB ip address */
|
||||
for (index = 0; index < instance_p->nb_m3; index++) {
|
||||
//M2AP_INFO("eNB[%d] eNB id %u acting as an initiator (client)\n",
|
||||
// instance_id, instance->eNB_id);
|
||||
m3ap_MCE_register_MCE(instance_p,
|
||||
&instance_p->target_mme_m3_ip_address[index],
|
||||
&instance_p->mme_m3_ip_address,
|
||||
instance_p->sctp_in_streams,
|
||||
instance_p->sctp_out_streams,
|
||||
instance_p->mce_port_for_M3C,
|
||||
instance_p->multi_sd);
|
||||
}
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
@@ -712,9 +712,12 @@ int main ( int argc, char **argv )
|
||||
sync_var=0;
|
||||
pthread_cond_broadcast(&sync_cond);
|
||||
pthread_mutex_unlock(&sync_mutex);
|
||||
create_tasks_mbms(1);
|
||||
config_check_unknown_cmdlineopt(CONFIG_CHECKALLSECTIONS);
|
||||
}
|
||||
create_tasks_mbms(1);
|
||||
else
|
||||
create_tasks_mbms(1);
|
||||
//create_tasks_mbms(1);
|
||||
|
||||
// wait for end of program
|
||||
LOG_UI(ENB_APP,"TYPE <CTRL-C> TO TERMINATE\n");
|
||||
|
||||
Reference in New Issue
Block a user