Commit ebb30df8 authored by Raphael Defosseux's avatar Raphael Defosseux

Merge remote-tracking branch 'origin/421-cdrx-for-lte' into develop_integration_2019_w17

parents 1fea702c 489726d0
......@@ -37,7 +37,7 @@ eNBs =
nb_antennas_tx = 1;
nb_antennas_rx = 1;
tx_gain = 90;
rx_gain = 125;
rx_gain = 115;
prach_root = 0;
prach_config_index = 0;
prach_high_speed = "DISABLE";
......@@ -183,8 +183,8 @@ MACRLCs = (
tr_s_preference = "local_L1";
tr_n_preference = "local_RRC";
scheduler_mode = "fairRR";
puSch10xSnr = 200;
puCch10xSnr = 200;
puSch10xSnr = 150;
puCch10xSnr = 150;
}
);
......
......@@ -183,8 +183,8 @@ MACRLCs = (
tr_s_preference = "local_L1";
tr_n_preference = "local_RRC";
scheduler_mode = "fairRR";
puSch10xSnr = 200;
puCch10xSnr = 200;
puSch10xSnr = 150;
puCch10xSnr = 150;
}
);
......@@ -204,7 +204,7 @@ RUs = (
att_rx = 0;
bands = [38];
max_pdschReferenceSignalPower = -27;
max_rxgain = 115;
max_rxgain = 125;
eNB_instances = [0];
}
......
......@@ -37,7 +37,7 @@ eNBs =
nb_antennas_tx = 1;
nb_antennas_rx = 1;
tx_gain = 90;
rx_gain = 125;
rx_gain = 120;
prach_root = 0;
prach_config_index = 0;
prach_high_speed = "DISABLE";
......@@ -183,8 +183,8 @@ MACRLCs = (
tr_s_preference = "local_L1";
tr_n_preference = "local_RRC";
scheduler_mode = "fairRR";
puSch10xSnr = 200;
puCch10xSnr = 200;
puSch10xSnr = 150;
puCch10xSnr = 150;
}
);
......@@ -204,7 +204,7 @@ RUs = (
att_rx = 0;
bands = [38];
max_pdschReferenceSignalPower = -27;
max_rxgain = 115;
max_rxgain = 120;
eNB_instances = [0];
}
......
......@@ -94,6 +94,14 @@ eNBs =
pcch_default_PagingCycle = 128;
pcch_nB = "oneT";
drx_Config_present = "prSetup"; //"prSetup" "prRelease"
drx_onDurationTimer = "psf1"; // "psfX": X=1,2,3,4,5,6,8,10,20,30,40,50,60,80,100
drx_InactivityTimer = "psf1"; // "psfX": X=1,2,3,4,5,6,8,10,20,30,40,50,60,80,100,200,300,500,750,1280,1920,2560
drx_RetransmissionTimer = "psf1"; // "psfX": X=1,2,4,6,8,16,24,33
drx_longDrx_CycleStartOffset_present = "prSf128"; // "psfX": X=10,20,32,40,64,80,128,160,256,320,512,640,1024,1280,2048,2560
drx_longDrx_CycleStartOffset = 0; // X >= 0 && X < drx_longDrx_CycleStartOffset_present
drx_shortDrx_Cycle = "sf16"; // "sfX": X=2,5,8,10,16,20,32,40,64,80,128,160,256,320,512,640
drx_shortDrx_ShortCycleTimer = 3; // 1..16 integer. Total duration in short cycle = drx_shortDrx_Cycle*drx_shortDrx_ShortCycleTimer [subframe]
bcch_modificationPeriodCoeff = 2;
ue_TimersAndConstants_t300 = 1000;
ue_TimersAndConstants_t301 = 1000;
......
......@@ -2137,6 +2137,7 @@ class SSHConnection():
uciStatMsgCount = 0
pdcpFailure = 0
ulschFailure = 0
cdrxActivationMessageCount = 0
self.htmleNBFailureMsg = ''
for line in enb_log_file.readlines():
if self.rruOptions != '':
......@@ -2188,6 +2189,9 @@ class SSHConnection():
result = re.search('LTE_RRCConnectionReestablishmentReject', str(line))
if result is not None:
rrcReestablishReject += 1
result = re.search('CDRX configuration activated after RRC Connection', str(line))
if result is not None:
cdrxActivationMessageCount += 1
result = re.search('uci->stat', str(line))
if result is not None:
uciStatMsgCount += 1
......@@ -2242,6 +2246,10 @@ class SSHConnection():
rrcMsg = ' -- ' + str(rrcReestablishReject) + ' were rejected'
logging.debug('\u001B[1;30;43m ' + rrcMsg + ' \u001B[0m')
self.htmleNBFailureMsg += rrcMsg + '\n'
if cdrxActivationMessageCount > 0:
rrcMsg = 'eNB activated the CDRX Configuration for ' + str(cdrxActivationMessageCount) + ' time(s)'
logging.debug('\u001B[1;30;43m ' + rrcMsg + ' \u001B[0m')
self.htmleNBFailureMsg += rrcMsg + '\n'
if rachCanceledProcedure > 0:
rachMsg = 'eNB cancelled ' + str(rachCanceledProcedure) + ' RA procedure(s)'
logging.debug('\u001B[1;30;43m ' + rachMsg + ' \u001B[0m')
......
......@@ -26,7 +26,7 @@
<htmlTabIcon>tasks</htmlTabIcon>
<TestCaseRequestedList>
040101
030104 040301 040501 040602 040601 040603 040642 040641 040643 040401 040201 030201
030104 040301 040501 040602 040601 040603 040604 040605 040642 040641 040643 040644 040645 040401 040201 030201
</TestCaseRequestedList>
<TestCaseExclusionList></TestCaseExclusionList>
......@@ -92,6 +92,21 @@
<iperf_profile>unbalanced</iperf_profile>
</testCase>
<testCase id="040604">
<class>Iperf</class>
<desc>iperf (5MHz - DL/TCP)(30 sec)(single-ue profile)</desc>
<iperf_args>-t 30 -i 1 -fm</iperf_args>
<iperf_packetloss_threshold>50</iperf_packetloss_threshold>
<iperf_profile>single-ue</iperf_profile>
</testCase>
<testCase id="040605">
<class>Iperf</class>
<desc>iperf (5MHz - DL/TCP)(30 sec)</desc>
<iperf_args>-t 30 -i 1 -fm</iperf_args>
<iperf_packetloss_threshold>50</iperf_packetloss_threshold>
</testCase>
<testCase id="040641">
<class>Iperf</class>
<desc>iperf (5MHz - UL/2Mbps/UDP)(30 sec)(balanced)</desc>
......@@ -116,4 +131,19 @@
<iperf_profile>unbalanced</iperf_profile>
</testCase>
<testCase id="040644">
<class>Iperf</class>
<desc>iperf (5MHz - UL/TCP)(30 sec)(single-ue)</desc>
<iperf_args>-t 30 -i 1 -fm -R</iperf_args>
<iperf_packetloss_threshold>50</iperf_packetloss_threshold>
<iperf_profile>single-ue</iperf_profile>
</testCase>
<testCase id="040645">
<class>Iperf</class>
<desc>iperf (5MHz - UL/TCP)(30 sec)</desc>
<iperf_args>-t 30 -i 1 -fm -R</iperf_args>
<iperf_packetloss_threshold>50</iperf_packetloss_threshold>
</testCase>
</testCaseList>
......@@ -26,7 +26,7 @@
<htmlTabIcon>tasks</htmlTabIcon>
<TestCaseRequestedList>
040101
030114 040301 040511 040612 040611 040613 040652 040651 040653 040401 040201 030201
030114 040301 040511 040612 040611 040613 040614 040615 040652 040651 040653 040654 040655 040401 040201 030201
</TestCaseRequestedList>
<TestCaseExclusionList></TestCaseExclusionList>
......@@ -92,6 +92,21 @@
<iperf_profile>unbalanced</iperf_profile>
</testCase>
<testCase id="040614">
<class>Iperf</class>
<desc>iperf (10MHz - DL/TCP)(30 sec)(single-ue)</desc>
<iperf_args>-t 30 -i 1 -fm</iperf_args>
<iperf_packetloss_threshold>50</iperf_packetloss_threshold>
<iperf_profile>single-ue</iperf_profile>
</testCase>
<testCase id="040615">
<class>Iperf</class>
<desc>iperf (10MHz - DL/TCP)(30 sec)</desc>
<iperf_args>-t 30 -i 1 -fm</iperf_args>
<iperf_packetloss_threshold>50</iperf_packetloss_threshold>
</testCase>
<testCase id="040651">
<class>Iperf</class>
<desc>iperf (10MHz - UL/2Mbps/UDP)(30 sec)(balanced)</desc>
......@@ -116,4 +131,19 @@
<iperf_profile>unbalanced</iperf_profile>
</testCase>
<testCase id="040654">
<class>Iperf</class>
<desc>iperf (10MHz - UL/TCP)(30 sec)(single-ue)</desc>
<iperf_args>-t 30 -i 1 -fm -R</iperf_args>
<iperf_packetloss_threshold>50</iperf_packetloss_threshold>
<iperf_profile>single-ue</iperf_profile>
</testCase>
<testCase id="040655">
<class>Iperf</class>
<desc>iperf (10MHz - UL/TCP)(30 sec)</desc>
<iperf_args>-t 30 -i 1 -fm -R</iperf_args>
<iperf_packetloss_threshold>50</iperf_packetloss_threshold>
</testCase>
</testCaseList>
......@@ -26,7 +26,7 @@
<htmlTabIcon>tasks</htmlTabIcon>
<TestCaseRequestedList>
040101
030124 040301 040521 040622 040621 040623 040662 040661 040663 040401 040201 030201
030124 040301 040521 040622 040621 040623 040624 040625 040662 040661 040663 040664 040665 040401 040201 030201
</TestCaseRequestedList>
<TestCaseExclusionList></TestCaseExclusionList>
......@@ -92,6 +92,21 @@
<iperf_profile>unbalanced</iperf_profile>
</testCase>
<testCase id="040624">
<class>Iperf</class>
<desc>iperf (20MHz - DL/TCP)(30 sec)(single-ue)</desc>
<iperf_args>-t 30 -i 1 -fm</iperf_args>
<iperf_packetloss_threshold>50</iperf_packetloss_threshold>
<iperf_profile>single-ue</iperf_profile>
</testCase>
<testCase id="040625">
<class>Iperf</class>
<desc>iperf (20MHz - DL/TCP)(30 sec)</desc>
<iperf_args>-t 30 -i 1 -fm</iperf_args>
<iperf_packetloss_threshold>50</iperf_packetloss_threshold>
</testCase>
<testCase id="040661">
<class>Iperf</class>
<desc>iperf (20MHz - UL/2Mbps/UDP)(30 sec)(balanced)</desc>
......@@ -116,4 +131,19 @@
<iperf_profile>unbalanced</iperf_profile>
</testCase>
<testCase id="040664">
<class>Iperf</class>
<desc>iperf (20MHz - UL/TCP)(30 sec)(single-ue)</desc>
<iperf_args>-t 30 -i 1 -fm -R</iperf_args>
<iperf_packetloss_threshold>50</iperf_packetloss_threshold>
<iperf_profile>single-ue</iperf_profile>
</testCase>
<testCase id="040665">
<class>Iperf</class>
<desc>iperf (20MHz - UL/TCP)(30 sec)</desc>
<iperf_args>-t 30 -i 1 -fm -R</iperf_args>
<iperf_packetloss_threshold>50</iperf_packetloss_threshold>
</testCase>
</testCaseList>
......@@ -189,7 +189,15 @@ const char* eurecomVariablesNames[] = {
"ue0_trx_write_ns_missing",
"enb_thread_rxtx_CPUID",
"ru_thread_CPUID",
"ru_thread_tx_CPUID"
"ru_thread_tx_CPUID",
"ue0_on_duration_timer",
"ue0_drx_inactivity",
"ue0_drx_short_cycle",
"ue0_short_drx_cycle_number",
"ue0_drx_long_cycle",
"ue0_drx_retransmission_harq0",
"ue0_drx_active_time",
"ue0_drx_active_time_condition"
};
const char* eurecomFunctionsNames[] = {
......
......@@ -167,6 +167,14 @@ typedef enum {
VCD_SIGNAL_DUMPER_VARIABLES_CPUID_ENB_THREAD_RXTX,
VCD_SIGNAL_DUMPER_VARIABLES_CPUID_RU_THREAD,
VCD_SIGNAL_DUMPER_VARIABLES_CPUID_RU_THREAD_TX,
VCD_SIGNAL_DUMPER_VARIABLES_ON_DURATION_TIMER,
VCD_SIGNAL_DUMPER_VARIABLES_DRX_INACTIVITY,
VCD_SIGNAL_DUMPER_VARIABLES_DRX_SHORT_CYCLE,
VCD_SIGNAL_DUMPER_VARIABLES_SHORT_DRX_CYCLE_NUMBER,
VCD_SIGNAL_DUMPER_VARIABLES_DRX_LONG_CYCLE,
VCD_SIGNAL_DUMPER_VARIABLES_DRX_RETRANSMISSION_HARQ0,
VCD_SIGNAL_DUMPER_VARIABLES_DRX_ACTIVE_TIME,
VCD_SIGNAL_DUMPER_VARIABLES_DRX_ACTIVE_TIME_CONDITION,
VCD_SIGNAL_DUMPER_VARIABLES_END
} vcd_signal_dump_variables;
......
......@@ -44,7 +44,7 @@ typedef struct {
#define VCD_NUM_FUNCTIONS 190
/* number of VCD variables (to be kept up to date! see in T_messages.txt) */
#define VCD_NUM_VARIABLES 128
#define VCD_NUM_VARIABLES 136
/* first VCD function (to be kept up to date! see in T_messages.txt) */
#define VCD_FIRST_FUNCTION ((uintptr_t)T_VCD_FUNCTION_RT_SLEEP)
......
......@@ -1676,6 +1676,46 @@ ID = VCD_VARIABLE_CPUID_RU_THREAD_TX
GROUP = ALL:VCD:ENB:VCD_VARIABLE
FORMAT = ulong,value
VCD_NAME = ru_thread_tx_CPUID
ID = VCD_VARIABLE_ON_DURATION_TIMER
DESC = VCD variable ON_DURATION_TIMER
GROUP = ALL:VCD:ENB:VCD_VARIABLE
FORMAT = ulong,value
VCD_NAME = ue0_on_duration_timer
ID = VCD_VARIABLE_DRX_INACTIVITY
DESC = VCD variable DRX_INACTIVITY
GROUP = ALL:VCD:ENB:VCD_VARIABLE
FORMAT = ulong,value
VCD_NAME = ue0_drx_inactivity
ID = VCD_VARIABLE_DRX_SHORT_CYCLE
DESC = VCD variable DRX_SHORT_CYCLE
GROUP = ALL:VCD:ENB:VCD_VARIABLE
FORMAT = ulong,value
VCD_NAME = ue0_drx_short_cycle
ID = VCD_VARIABLE_SHORT_DRX_CYCLE_NUMBER
DESC = VCD variable SHORT_DRX_CYCLE_NUMBER
GROUP = ALL:VCD:ENB:VCD_VARIABLE
FORMAT = ulong,value
VCD_NAME = ue0_short_drx_cycle_number
ID = VCD_VARIABLE_DRX_LONG_CYCLE
DESC = VCD variable DRX_LONG_CYCLE
GROUP = ALL:VCD:ENB:VCD_VARIABLE
FORMAT = ulong,value
VCD_NAME = ue0_drx_long_cycle
ID = VCD_VARIABLE_DRX_RETRANSMISSION_HARQ0
DESC = VCD variable DRX_RETRANSMISSION_HARQ0
GROUP = ALL:VCD:ENB:VCD_VARIABLE
FORMAT = ulong,value
VCD_NAME = ue0_drx_retransmission_harq0
ID = VCD_VARIABLE_DRX_ACTIVE_TIME
DESC = VCD variable DRX_ACTIVE_TIME
GROUP = ALL:VCD:ENB:VCD_VARIABLE
FORMAT = ulong,value
VCD_NAME = ue0_drx_active_time
ID = VCD_VARIABLE_DRX_ACTIVE_TIME_CONDITION
DESC = VCD variable DRX_ACTIVE_TIME_CONDITION
GROUP = ALL:VCD:ENB:VCD_VARIABLE
FORMAT = ulong,value
VCD_NAME = ue0_drx_active_time_condition
#functions
......
......@@ -72,6 +72,7 @@ The MAC layer implements a subset of the **3GPP 36.321** release v8.6 in support
- RLC interface (AM, UM)
- UL power control
- Link adaptation
- Connected DRX (CDRX) support for FDD LTE UE. Compatible with R13 from 3GPP. Support for Cat-M1 UE comming soon.
## eNB RLC Layer ##
......
......@@ -722,17 +722,13 @@ uint32_t rx_pucch(PHY_VARS_eNB *eNB,
#if (LTE_RRC_VERSION >= MAKE_VERSION(14, 0, 0))
,uint8_t br_flag
#endif
)
)
//-----------------------------------------------------------------------------
{
static int first_call=1;
static int first_call = 1;
LTE_eNB_COMMON *common_vars = &eNB->common_vars;
LTE_DL_FRAME_PARMS *frame_parms = &eNB->frame_parms;
// PUCCH_CONFIG_DEDICATED *pucch_config_dedicated = &eNB->pucch_config_dedicated[UE_id];
int8_t sigma2_dB = max(eNB->measurements.n0_subband_power_tot_dB[0],
eNB->measurements.n0_subband_power_tot_dB[eNB->frame_parms.N_RB_UL-1]);
int8_t sigma2_dB = max(eNB->measurements.n0_subband_power_tot_dB[0], eNB->measurements.n0_subband_power_tot_dB[eNB->frame_parms.N_RB_UL-1]);
uint32_t u,v,n,aa;
uint32_t z[12*14];
......@@ -779,7 +775,6 @@ uint32_t rx_pucch(PHY_VARS_eNB *eNB,
int16_t Fmt3xDataAvgSym[2][12][2]; //[Slot][Subcarrier][Complex]
int16_t IFFTOutData_Fmt3[2][12][2]; //[Slot][Subcarrier][Complex]
int16_t b[48]; //[bit]
//int16_t IP_CsData_allavg[NB_ANTENNAS_RX][12][4][2]; //[Antenna][Symbol][Nouse Cyclic Shift][Complex]
int16_t payload_entity = -1;
int16_t Interpw;
int16_t payload_max;
......
......@@ -329,7 +329,7 @@ typedef struct {
uint8_t subframe;
/// corresponding UE RNTI
uint16_t rnti;
/// Type (SR,HARQ,CQI,HARQ_SR,HARQ_CQI,SR_CQI,HARQ_SR_CQI)
/// Type (SR, HARQ, CQI, HARQ_SR, HARQ_CQI, SR_CQI, HARQ_SR_CQI)
UCI_type_t type;
/// SRS active flag
uint8_t srs_active;
......
......@@ -573,7 +573,13 @@ void handle_uci_harq_information(PHY_VARS_eNB *eNB, LTE_eNB_UCI *uci,nfapi_ul_co
}
}
void handle_uci_sr_pdu(PHY_VARS_eNB *eNB,int UE_id,nfapi_ul_config_request_pdu_t *ul_config_pdu,uint16_t frame,uint8_t subframe,uint8_t srs_active) {
void handle_uci_sr_pdu(PHY_VARS_eNB *eNB,
int UE_id,
nfapi_ul_config_request_pdu_t *ul_config_pdu,
uint16_t frame,
uint8_t subframe,
uint8_t srs_active)
{
LTE_eNB_UCI *uci = &eNB->uci_vars[UE_id];
if (NFAPI_MODE==NFAPI_MODE_VNF) return;
......@@ -594,7 +600,10 @@ void handle_uci_sr_pdu(PHY_VARS_eNB *eNB,int UE_id,nfapi_ul_config_request_pdu_t
uci->total_repetitions = ul_config_pdu->uci_sr_pdu.ue_information.ue_information_rel13.total_number_of_repetitions;
#endif
LOG_D(PHY,"Programming UCI SR rnti %x, pucch1_0 %d for (%d,%d)\n",
uci->rnti,uci->n_pucch_1_0_sr[0],frame,subframe);
uci->rnti,
uci->n_pucch_1_0_sr[0],
frame,
subframe);
}
void handle_uci_sr_harq_pdu(PHY_VARS_eNB *eNB,int UE_id,nfapi_ul_config_request_pdu_t *ul_config_pdu,uint16_t frame,uint8_t subframe,uint8_t srs_active) {
......
This diff is collapsed.
......@@ -36,6 +36,7 @@
#include "LTE_SystemInformationBlockType2.h"
#include "LTE_SL-OffsetIndicator-r12.h"
#include "LTE_SubframeBitmapSL-r12.h"
#include "LTE_DRX-Config.h"
#include "LTE_SL-CP-Len-r12.h"
#include "LTE_SL-PeriodComm-r12.h"
#include "LTE_SL-DiscResourcePool-r12.h"
......@@ -141,6 +142,14 @@ typedef struct RadioResourceConfig_s {
long bcch_modificationPeriodCoeff;
long pcch_defaultPagingCycle;
long pcch_nB;
LTE_DRX_Config_PR drx_Config_present;
long drx_onDurationTimer;
long drx_InactivityTimer;
long drx_RetransmissionTimer;
LTE_DRX_Config__setup__longDRX_CycleStartOffset_PR drx_longDrx_CycleStartOffset_present;
long drx_longDrx_CycleStartOffset;
long drx_shortDrx_Cycle;
long drx_shortDrx_ShortCycleTimer;
long ue_TimersAndConstants_t300;
long ue_TimersAndConstants_t301;
long ue_TimersAndConstants_t310;
......
This diff is collapsed.
......@@ -932,6 +932,7 @@ void fill_eMTC_configuration(MessageDef *msg_p, ccparams_eMTC_t *eMTCconfig, in
break;
}
RRC_CONFIGURATION_REQ (msg_p).rar_HoppingConfig_r13[cc_idx][rachCEInfoIndex] = eMTCconfig->rar_HoppingConfig_r13;
AssertFatal(eMTCconfig->rar_HoppingConfig_r13 == 0 || eMTCconfig->rar_HoppingConfig_r13 == 1,
"illegal rar_HoppingConfig_r13 %d\n",eMTCconfig->rar_HoppingConfig_r13);
} // end for loop (rach ce level info)
......@@ -1101,11 +1102,12 @@ void fill_eMTC_configuration(MessageDef *msg_p, ccparams_eMTC_t *eMTCconfig, in
/** PCCH CONFIG V1310 */
RRC_CONFIGURATION_REQ(msg_p).pcch_config_v1310[cc_idx] = TRUE;
RRC_CONFIGURATION_REQ(msg_p).paging_narrowbands_r13[cc_idx] = eMTCconfig->paging_narrowbands_r13;
RRC_CONFIGURATION_REQ(msg_p).mpdcch_numrepetition_paging_r13[cc_idx] = eMTCconfig->mpdcch_numrepetition_paging_r13;
AssertFatal (eMTCconfig->mpdcch_numrepetition_paging_r13 == 1 ||
AssertFatal (eMTCconfig->mpdcch_numrepetition_paging_r13 == 0 ||
eMTCconfig->mpdcch_numrepetition_paging_r13 == 1 ||
eMTCconfig->mpdcch_numrepetition_paging_r13 == 2 ||
eMTCconfig->mpdcch_numrepetition_paging_r13 == 4 ||
eMTCconfig->mpdcch_numrepetition_paging_r13 == 8 ||
......@@ -1117,7 +1119,6 @@ void fill_eMTC_configuration(MessageDef *msg_p, ccparams_eMTC_t *eMTCconfig, in
"illegal mpdcch_numrepetition_paging_r13 %d\n",
eMTCconfig->mpdcch_numrepetition_paging_r13);
// RRC_CONFIGURATION_REQ(msg_p).nb_v1310[cc_idx] = CALLOC(1, sizeof(long));
// if (!strcmp(nb_v1310, "one64thT")) {
// *RRC_CONFIGURATION_REQ(msg_p).nb_v1310[cc_idx] = 0;
......
......@@ -323,7 +323,6 @@ typedef enum {
#define ENB_CONFIG_STRING_FREQ_HOPPING_PARAMETERS_R13 "sib2_freq_hoppingParameters_r13"
#define ENB_CONFIG_STRING_PDSCH_RS_EPRE "pdsch_referenceSignalPower"
#define ENB_CONFIG_STRING_PDSCH_PB "pdsch_p_b"
#define ENB_CONFIG_STRING_PUSCH_N_SB "pusch_n_SB"
......@@ -364,6 +363,14 @@ typedef enum {
#define ENB_CONFIG_STRING_RACH_MAXHARQMSG3TX "rach_maxHARQ_Msg3Tx"
#define ENB_CONFIG_STRING_PCCH_DEFAULT_PAGING_CYCLE "pcch_default_PagingCycle"
#define ENB_CONFIG_STRING_PCCH_NB "pcch_nB"
#define ENB_CONFIG_STRING_DRX_CONFIG_PRESENT "drx_Config_present"
#define ENB_CONFIG_STRING_DRX_ONDURATIONTIMER "drx_onDurationTimer"
#define ENB_CONFIG_STRING_DRX_INACTIVITYTIMER "drx_InactivityTimer"
#define ENB_CONFIG_STRING_DRX_RETRANSMISSIONTIMER "drx_RetransmissionTimer"
#define ENB_CONFIG_STRING_DRX_LONGDRX_CYCLESTARTOFFSET_PRESENT "drx_longDrx_CycleStartOffset_present"
#define ENB_CONFIG_STRING_DRX_LONGDRX_CYCLESTARTOFFSET "drx_longDrx_CycleStartOffset"
#define ENB_CONFIG_STRING_DRX_SHORTDRX_CYCLE "drx_shortDrx_Cycle"
#define ENB_CONFIG_STRING_DRX_SHORTDRX_SHORTCYCLETIMER "drx_shortDrx_ShortCycleTimer"
#define ENB_CONFIG_STRING_BCCH_MODIFICATIONPERIODCOEFF "bcch_modificationPeriodCoeff"
#define ENB_CONFIG_STRING_UETIMERS_T300 "ue_TimersAndConstants_t300"
#define ENB_CONFIG_STRING_UETIMERS_T301 "ue_TimersAndConstants_t301"
......@@ -496,6 +503,14 @@ typedef struct ccparams_lte_s {
int32_t rach_maxHARQ_Msg3Tx;
int32_t pcch_defaultPagingCycle;
char *pcch_nB;
char *drx_Config_present;
char *drx_onDurationTimer;
char *drx_InactivityTimer;
char *drx_RetransmissionTimer;
char *drx_longDrx_CycleStartOffset_present;
int32_t drx_longDrx_CycleStartOffset;
char *drx_shortDrx_Cycle;
int32_t drx_shortDrx_ShortCycleTimer;
int32_t bcch_modificationPeriodCoeff;
int32_t ue_TimersAndConstants_t300;
int32_t ue_TimersAndConstants_t301;
......@@ -575,6 +590,14 @@ typedef struct ccparams_lte_s {
{ .s5= {NULL }} , \
{ .s5= {NULL }} , \
{ .s5= {NULL }} , \
{ .s5= {NULL }} , \
{ .s5= {NULL }} , \
{ .s5= {NULL }} , \
{ .s5= {NULL }} , \
{ .s5= {NULL }} , \
{ .s5= {NULL }} , \
{ .s5= {NULL }} , \
{ .s5= {NULL }} , \
{ .s1a= { config_check_modify_integer, UETIMER_T300_OKVALUES, UETIMER_T300_MODVALUES,8}} , \
{ .s1a= { config_check_modify_integer, UETIMER_T301_OKVALUES, UETIMER_T301_MODVALUES,8}} , \
{ .s1a= { config_check_modify_integer, UETIMER_T310_OKVALUES, UETIMER_T310_MODVALUES,7}} , \
......@@ -688,6 +711,14 @@ typedef struct ccparams_lte_s {
{ENB_CONFIG_STRING_RACH_MAXHARQMSG3TX, NULL, 0, iptr:&ccparams.rach_maxHARQ_Msg3Tx, defintval:4, TYPE_UINT, 0}, \
{ENB_CONFIG_STRING_PCCH_DEFAULT_PAGING_CYCLE, NULL, 0, iptr:&ccparams.pcch_defaultPagingCycle, defintval:128, TYPE_INT, 0}, \
{ENB_CONFIG_STRING_PCCH_NB, NULL, 0, strptr:&ccparams.pcch_nB, defstrval:"oneT", TYPE_STRING, 0}, \
{ENB_CONFIG_STRING_DRX_CONFIG_PRESENT, NULL, 0, strptr:&ccparams.drx_Config_present, defstrval:"prNothing", TYPE_STRING, 0}, \
{ENB_CONFIG_STRING_DRX_ONDURATIONTIMER, NULL, 0, strptr:&ccparams.drx_onDurationTimer, defstrval:"psf10", TYPE_STRING, 0}, \
{ENB_CONFIG_STRING_DRX_INACTIVITYTIMER, NULL, 0, strptr:&ccparams.drx_InactivityTimer, defstrval:"psf10", TYPE_STRING, 0}, \
{ENB_CONFIG_STRING_DRX_RETRANSMISSIONTIMER, NULL, 0, strptr:&ccparams.drx_RetransmissionTimer, defstrval:"psf8", TYPE_STRING, 0}, \
{ENB_CONFIG_STRING_DRX_LONGDRX_CYCLESTARTOFFSET_PRESENT, NULL, 0, strptr:&ccparams.drx_longDrx_CycleStartOffset_present, defstrval:"prSf128", TYPE_STRING, 0}, \
{ENB_CONFIG_STRING_DRX_LONGDRX_CYCLESTARTOFFSET, NULL, 0, iptr:&ccparams.drx_longDrx_CycleStartOffset, defintval:0, TYPE_UINT, 0}, \
{ENB_CONFIG_STRING_DRX_SHORTDRX_CYCLE, NULL, 0, strptr:&ccparams.drx_shortDrx_Cycle, defstrval:"sf32", TYPE_STRING, 0}, \
{ENB_CONFIG_STRING_DRX_SHORTDRX_SHORTCYCLETIMER, NULL, 0, iptr:&ccparams.drx_shortDrx_ShortCycleTimer, defintval:3, TYPE_UINT, 0}, \
{ENB_CONFIG_STRING_BCCH_MODIFICATIONPERIODCOEFF, NULL, 0, iptr:&ccparams.bcch_modificationPeriodCoeff, defintval:2, TYPE_UINT, 0}, \
{ENB_CONFIG_STRING_UETIMERS_T300, NULL, 0, iptr:&ccparams.ue_TimersAndConstants_t300, defintval:1000, TYPE_UINT, 0}, \
{ENB_CONFIG_STRING_UETIMERS_T301, NULL, 0, iptr:&ccparams.ue_TimersAndConstants_t301, defintval:1000, TYPE_UINT, 0}, \
......@@ -761,14 +792,22 @@ typedef struct ccparams_lte_s {
#define ENB_CONFIG_RACH_MAXHARQMSG3TX_IDX 57
#define ENB_CONFIG_PCCH_DEFAULT_PAGING_CYCLE_IDX 58
#define ENB_CONFIG_PCCH_NB_IDX 59
#define ENB_CONFIG_BCCH_MODIFICATIONPERIODCOEFF_IDX 60
#define ENB_CONFIG_UETIMERS_T300_IDX 61
#define ENB_CONFIG_UETIMERS_T301_IDX 62
#define ENB_CONFIG_UETIMERS_T310_IDX 63
#define ENB_CONFIG_UETIMERS_T311_IDX 64
#define ENB_CONFIG_UETIMERS_N310_IDX 65
#define ENB_CONFIG_UETIMERS_N311_IDX 66
#define ENB_CONFIG_UE_TRANSMISSION_MODE_IDX 67
#define ENB_CONFIG_STRING_DRX_CONFIG_PRESENT_IDX 60
#define ENB_CONFIG_STRING_DRX_ONDURATIONTIMER_IDX 61
#define ENB_CONFIG_STRING_DRX_INACTIVITYTIMER_IDX 62
#define ENB_CONFIG_STRING_DRX_RETRANSMISSIONTIMER_IDX 63
#define ENB_CONFIG_STRING_DRX_LONGDRX_CYCLESTARTOFFSET_PRESENT_IDX 64
#define ENB_CONFIG_STRING_DRX_LONGDRX_CYCLESTARTOFFSET_IDX 65
#define ENB_CONFIG_STRING_DRX_SHORTDRX_CYCLE_IDX 66
#define ENB_CONFIG_STRING_DRX_SHORTDRX_SHORTCYCLETIMER_IDX 67
#define ENB_CONFIG_BCCH_MODIFICATIONPERIODCOEFF_IDX 68
#define ENB_CONFIG_UETIMERS_T300_IDX 69
#define ENB_CONFIG_UETIMERS_T301_IDX 70
#define ENB_CONFIG_UETIMERS_T310_IDX 71
#define ENB_CONFIG_UETIMERS_T311_IDX 72
#define ENB_CONFIG_UETIMERS_N310_IDX 73
#define ENB_CONFIG_UETIMERS_N311_IDX 74
#define ENB_CONFIG_UE_TRANSMISSION_MODE_IDX 75
/*------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------*/
/* SRB1 configuration parameters section name */
......
......@@ -61,7 +61,10 @@
#define ENB_CONFIG_STRING_PREAMBLE_TRANSMAX_CE_R13 "preamble_TransMax_ce_r13"
#define ENB_CONFIG_STRING_PREAMBLE_TRANSMAX_CE_R13_VAL "preamble_TransMax_ce_r13_val"
#define ENB_CONFIG_STRING_PDSCH_MAX_NUM_REPETITION_CE_MODE_A_R13 "pdsch_maxNumRepetitionCEmodeA_r13"
#define ENB_CONFIG_STRING_PDSCH_MAX_NUM_REPETITION_CE_MODE_B_R13 "pdsch_maxNumRepetitionCEmodeB_r13"
#define ENB_CONFIG_STRING_PUSCH_MAX_NUM_REPETITION_CE_MODE_A_R13 "pusch_maxNumRepetitionCEmodeA_r13"
#define ENB_CONFIG_STRING_PUSCH_MAX_NUM_REPETITION_CE_MODE_B_R13 "pusch_maxNumRepetitionCEmodeB_r13"
#define ENB_CONFIG_STRING_PUSCH_HOPPING_OFFSET_V1310 "pusch_HoppingOffset_v1310"
#define ENB_CONFIG_STRING_SYSTEM_INFO_VALUE_TAG_LIST "system_info_value_tag_SI"
#define ENB_CONFIG_STRING_FIRST_PREAMBLE_R13 "firstPreamble_r13"
#define ENB_CONFIG_STRING_LAST_PREAMBLE_R13 "lastPreamble_r13"
......@@ -81,6 +84,9 @@
#define ENB_CONFIG_STRING_PUCCH_INFO_VALUE "pucch_info_value"
#define ENB_CONFIG_STRING_N1PUCCH_AN_INFOLIST_R13 "n1PUCCH_AN_InfoList_r13"
#define ENB_CONFIG_STRING_PCCH_CONFIG_V1310 "pcch_config_v1310"
#define ENB_CONFIG_STRING_PAGING_NARROWBANDS_R13 "paging_narrowbands_r13"
#define ENB_CONFIG_STRING_MPDCCH_NUMREPETITION_PAGING_R13 "mpdcch_numrepetition_paging_r13"
#define ENB_CONFIG_STRING_NB_V1310 "nb_v1310"
#define ENB_CONFIG_STRING_SIB2_FREQ_HOPPINGPARAMETERS_R13 "sib2_freq_hoppingParameters_r13"
typedef struct ccparams_eMTC_s {
......
This diff is collapsed.
This diff is collapsed.
......@@ -329,6 +329,9 @@ void generate_Msg2(module_id_t module_idP,
dl_config_pdu->mpdcch_pdu.mpdcch_pdu_rel13.mpdcch_tansmission_type = 1; // imposed (9.1.5 in 213) for Type 2 Common search space
AssertFatal (cc[CC_idP].sib1_v13ext->bandwidthReducedAccessRelatedInfo_r13 != NULL, "cc[CC_idP].sib1_v13ext->bandwidthReducedAccessRelatedInfo_r13 is null\n");
dl_config_pdu->mpdcch_pdu.mpdcch_pdu_rel13.start_symbol = cc[CC_idP].sib1_v13ext->bandwidthReducedAccessRelatedInfo_r13->startSymbolBR_r13;
LOG_E(MAC, "start_symbol = %d \n", dl_config_pdu->mpdcch_pdu.mpdcch_pdu_rel13.start_symbol);
dl_config_pdu->mpdcch_pdu.mpdcch_pdu_rel13.ecce_index = 0; // Note: this should be dynamic
dl_config_pdu->mpdcch_pdu.mpdcch_pdu_rel13.aggregation_level = 24; // OK for CEModeA r1-3 (9.1.5-1b) or CEModeB r1-4
dl_config_pdu->mpdcch_pdu.mpdcch_pdu_rel13.rnti_type = 2; // RA-RNTI
......
This diff is collapsed.
This diff is collapsed.
......@@ -553,6 +553,7 @@ typedef struct {
uint16_t serving_num;
UE_ULSCH_STATUS status;
} eNB_ULSCH_INFO;
/*! \brief temp struct for DLSCH sched */
typedef struct {
rnti_t rnti;
......@@ -561,6 +562,7 @@ typedef struct {
uint16_t serving_num;
UE_DLSCH_STATUS status;
} eNB_DLSCH_INFO;
/*! \brief eNB overall statistics */
typedef struct {
/// num BCCH PDU per CC
......@@ -635,6 +637,7 @@ typedef struct {
int missed_deadlines;
} eNB_STATS;
/*! \brief eNB statistics for the connected UEs*/
typedef struct {
/// CRNTI of UE
......@@ -778,6 +781,7 @@ typedef struct {
} eNB_UE_STATS;
/*! \brief eNB template for UE context information */
typedef struct {
/// C-RNTI of UE
rnti_t rnti;
......@@ -998,6 +1002,62 @@ typedef struct {
int32_t uplane_inactivity_timer;
uint8_t crnti_reconfigurationcomplete_flag;
uint8_t cqi_req_flag;
/* HARQ RRT Timers */
/// (UL) HARQ RTT timers, especially used for CDRX operations, one timer per cell per harq process (and per user)
uint8_t harq_rtt_timer[NFAPI_CC_MAX][8];
uint8_t ul_harq_rtt_timer[NFAPI_CC_MAX][8]; // Note: UL HARQ RTT timers are only for asynchronous HARQ processes
uint8_t ul_synchronous_harq_timer[NFAPI_CC_MAX][8]; // These timers are used for UL synchronous HARQ processes
/* C-DRX related timers */
/* Note: only valid for FDD and LTE UE when this comment is written (11-01-19)*/
/// is TRUE if the cqi mask feature is activated by RRC configuration
boolean_t cqi_mask_boolean;
/// is TRUE if the following drx parameters are configured for UE
boolean_t cdrx_configured;
/*
* if TRUE, the eNB has configured the CDRX locally, but is waiting for the UE to acknowledge
* the activation. This is needed, during the RRC configuration process, when the context is
* configured on the eNB side, but not yet on the UE side...
*/
boolean_t cdrx_waiting_ack;
/*
* Is set when a ULSCH scheduling is done and run until the first corresponding transmission is done (4 subframes).
* When set, SR cannot be set for the UE. This allows OAI to avoid concidering a SR as uncompleted if the UE sends
* a SR just after a periodic DCI0 ULSCH scheduling. Without CDRX there is no problem, but with CDRX this case would
* create a lost in timers synchronization.
*/
uint8_t dci0_ongoing_timer;
/// is TRUE if the UE is in "Active Time", hence listening to PDCCH
boolean_t in_active_time;
/// OnDurationTimer
uint16_t on_duration_timer;
uint16_t on_duration_timer_thres;
/// drx-InactivityTimer
uint16_t drx_inactivity_timer;
uint16_t drx_inactivity_timer_thres;
/// is TRUE if UE is currently in short DRX cycle
boolean_t in_short_drx_cycle;
/// drxShortCycleTimer int (1..16) (number of short DRX cycles duration before long DRX cycles)
uint8_t drx_shortCycle_timer_value;
/// shortDRX-Cycle (duration of one short DRX cycle)
uint16_t short_drx_cycle_duration;
/// DRX short cycle timer before switching to long DRX cycle = drx_shortCycle_timer_value * short_drx_cycle_duration
uint16_t drx_shortCycle_timer;
uint16_t drx_shortCycle_timer_thres;
/// is TRUE if UE is currently in long DRX cycle
boolean_t in_long_drx_cycle;
/// longDRX-CycleStartOffset (long DRX cycle timer)
uint16_t drx_longCycle_timer;
uint16_t drx_longCycle_timer_thres;
/// longDRX-CycleStartOffset (offset value)
uint16_t drx_start_offset;
/// DRX retransmission timer, one per DL HARQ process
uint8_t drx_retransmission_timer[8];
uint8_t drx_retransmission_timer_thres[8];
/// DRX UL retransmission timer, one per UL HARQ process
/* Not implemented yet */
/* End of C-DRX related timers */
} UE_sched_ctrl;
/*! \brief eNB template for the Random access information */
......@@ -1485,6 +1545,7 @@ typedef struct {
int16_t bucket_size[MAX_NUM_LCID];
} UE_SCHEDULING_INFO;
/*!\brief Top level UE MAC structure */
typedef struct {
uint16_t Node_id;
/// RX frame counter
......
......@@ -1273,11 +1273,15 @@ void pre_scd_nb_rbs_required( module_id_t module_idP,
uint16_t nb_rbs_required[MAX_NUM_CCs][NUMBER_OF_UE_MAX]);
#endif
/*Slice related functions */
/* Slice related functions */
uint16_t nb_rbs_allowed_slice(float rb_percentage, int total_rbs);
int ue_dl_slice_membership(module_id_t mod_id, int UE_id, int slice_idx);
int ue_ul_slice_membership(module_id_t mod_id, int UE_id, int slice_idx);
/* DRX Configuration */
/* Configure local DRX timers and thresholds in UE context, following the drx_configuration input */
void eNB_Config_Local_DRX(module_id_t Mod_id, rnti_t rnti, LTE_DRX_Config_t *drx_Configuration);
/* from here: prototypes to get rid of compilation warnings: doc to be written by function author */
uint8_t ul_subframe2_k_phich(COMMON_channels_t * cc, sub_frame_t ul_subframe);
#endif
......
......@@ -487,21 +487,32 @@ void decode_slice_positioning(module_id_t Mod_idP,
}
}
// This fuction sorts the UE in order their dlsch buffer and CQI
void
sort_UEs(module_id_t Mod_idP,
//-----------------------------------------------------------------------------
/*
* This function sorts the UEs in order, depending on their dlsch buffer and CQI
*/
void sort_UEs(module_id_t Mod_idP,
int slice_idx,
int frameP,
sub_frame_t subframeP)
//-----------------------------------------------------------------------------
{
int i;
int list[MAX_MOBILES_PER_ENB];
int list_size = 0;
struct sort_ue_dl_params params = {Mod_idP, frameP, subframeP, slice_idx};
UE_list_t *UE_list = &RC.mac[Mod_idP]->UE_list;
UE_list_t *UE_list = &(RC.mac[Mod_idP]->UE_list);
UE_sched_ctrl *UE_scheduling_control = NULL;
for (int i = 0; i < MAX_MOBILES_PER_ENB; i++) {
UE_scheduling_control = &(UE_list->UE_sched_ctrl[i]);
for (i = 0; i < MAX_MOBILES_PER_ENB; i++) {
/* Check CDRX configuration and if UE is in active time for this subframe */
if (UE_scheduling_control->cdrx_configured == TRUE) {
if (UE_scheduling_control->in_active_time == FALSE) {
continue;
}
}
if (UE_list->active[i] == TRUE &&
UE_RNTI(Mod_idP, i) != NOT_A_RNTI &&
......@@ -515,8 +526,9 @@ sort_UEs(module_id_t Mod_idP,
qsort_r(list, list_size, sizeof(int), ue_dl_compare, &params);
if (list_size) {
for (i = 0; i < list_size - 1; ++i)
for (int i = 0; i < list_size - 1; ++i) {
UE_list->next[list[i]] = list[i + 1];
}
UE_list->next[list[list_size - 1]] = -1;
UE_list->head = list[0];
......@@ -1666,13 +1678,14 @@ void ulsch_scheduler_pre_processor(module_id_t module_idP,
uint16_t average_rbs_per_user[NFAPI_CC_MAX];
int16_t total_remaining_rbs[NFAPI_CC_MAX];
uint16_t total_ue_count[NFAPI_CC_MAX];
UE_list_t *UE_list = &RC.mac[module_idP]->UE_list;
slice_info_t *sli = &RC.mac[module_idP]->slice_info;
eNB_MAC_INST *eNB = RC.mac[module_idP];
UE_list_t *UE_list = &eNB->UE_list;
slice_info_t *sli = &eNB->slice_info;
UE_TEMPLATE *UE_template = 0;
UE_sched_ctrl *ue_sched_ctl;
int N_RB_UL = 0;
uint16_t available_rbs, first_rb_offset;
rnti_t rntiTable[MAX_MOBILES_PER_ENB]; // Rnti array => Add SSR 12-2018
rnti_t rntiTable[MAX_MOBILES_PER_ENB];
// sort ues
LOG_D(MAC, "In ulsch_preprocessor: sort ue \n");
......@@ -1725,7 +1738,7 @@ void ulsch_scheduler_pre_processor(module_id_t module_idP,
nCCE_to_be_used[CC_id] = nCCE_to_be_used[CC_id] + (1<<aggregation);
max_num_ue_to_be_scheduled+=1;
} */
N_RB_UL = to_prb(RC.mac[module_idP]->common_channels[CC_id].ul_Bandwidth);
N_RB_UL = to_prb(eNB->common_channels[CC_id].ul_Bandwidth);
ue_sched_ctl = &UE_list->UE_sched_ctrl[UE_id];
ue_sched_ctl->max_rbs_allowed_slice_uplink[CC_id][slice_idx] =
nb_rbs_allowed_slice(sli->ul[slice_idx].pct, N_RB_UL);
......@@ -1802,7 +1815,7 @@ void ulsch_scheduler_pre_processor(module_id_t module_idP,
// This is the actual CC_id in the list
CC_id = UE_list->ordered_ULCCids[n][UE_id];
UE_template = &UE_list->UE_template[CC_id][UE_id];
N_RB_UL = to_prb(RC.mac[module_idP]->common_channels[CC_id].ul_Bandwidth);
N_RB_UL = to_prb(eNB->common_channels[CC_id].ul_Bandwidth);
first_rb_offset = UE_list->first_rb_offset[CC_id][slice_idx];
available_rbs = cmin(ue_sched_ctl->max_rbs_allowed_slice_uplink[CC_id][slice_idx], N_RB_UL - first_rb[CC_id] - first_rb_offset);
total_remaining_rbs[CC_id] = available_rbs - total_allocated_rbs[CC_id];
......@@ -2011,20 +2024,34 @@ static int ue_ul_compare(const void *_a, const void *_b, void *_params) {
return 0;
}
void
sort_ue_ul(module_id_t module_idP,
//-----------------------------------------------------------------------------
/*
* This function sorts the UEs in order, depending on their ulsch buffer and CQI
*/
void sort_ue_ul(module_id_t module_idP,
int slice_idx,
int sched_frameP,
sub_frame_t sched_subframeP,
rnti_t *rntiTable)
//-----------------------------------------------------------------------------
{
int i;
int list[MAX_MOBILES_PER_ENB];
int list_size = 0;
struct sort_ue_ul_params params = { module_idP, sched_frameP, sched_subframeP };
UE_list_t *UE_list = &RC.mac[module_idP]->UE_list;
UE_sched_ctrl *UE_scheduling_control = NULL;
for (int i = 0; i < MAX_MOBILES_PER_ENB; i++) {
UE_scheduling_control = &(UE_list->UE_sched_ctrl[i]);
/* Check CDRX configuration and if UE is in active time for this subframe */
if (UE_scheduling_control->cdrx_configured == TRUE) {
if (UE_scheduling_control->in_active_time == FALSE) {
continue;
}
}
for (i = 0; i < MAX_MOBILES_PER_ENB; i++) {
rntiTable[i] = UE_RNTI(module_idP, i);
// Valid element and is not the actual CC_id in the list
if (UE_list->active[i] == TRUE &&
......@@ -2038,11 +2065,14 @@ sort_ue_ul(module_id_t module_idP,
qsort_r(list, list_size, sizeof(int), ue_ul_compare, &params);
if (list_size) { // At mimimum one list element
for (i = 0; i < list_size - 1; i++)
for (int i = 0; i < list_size - 1; i++) {
UE_list->next_ul[list[i]] = list[i + 1];
}
UE_list->next_ul[list[list_size - 1]] = -1;
UE_list->head_ul = list[0];
} else { // No element
UE_list->head_ul = -1;
}
......
......@@ -114,26 +114,25 @@ void handle_cqi(UL_IND_t *UL_info) {
}
void handle_harq(UL_IND_t *UL_info) {
int i;
if (NFAPI_MODE == NFAPI_MODE_PNF && UL_info->harq_ind.harq_indication_body.number_of_harqs>0) { // PNF
if (NFAPI_MODE == NFAPI_MODE_PNF && UL_info->harq_ind.harq_indication_body.number_of_harqs > 0) { // PNF
//LOG_D(PHY, "UL_info->harq_ind.harq_indication_body.number_of_harqs:%d Send to VNF\n", UL_info->harq_ind.harq_indication_body.number_of_harqs);
int retval = oai_nfapi_harq_indication(&UL_info->harq_ind);
if (retval!=0) {
if (retval != 0) {
LOG_E(PHY, "Failed to encode NFAPI HARQ_IND retval:%d\n", retval);
}
UL_info->harq_ind.harq_indication_body.number_of_harqs = 0;
} else {
for (i=0; i<UL_info->harq_ind.harq_indication_body.number_of_harqs; i++)
for (int i=0; i < UL_info->harq_ind.harq_indication_body.number_of_harqs; i++)
harq_indication(UL_info->module_id,
UL_info->CC_id,
NFAPI_SFNSF2SFN(UL_info->harq_ind.sfn_sf),
NFAPI_SFNSF2SF(UL_info->harq_ind.sfn_sf),
&UL_info->harq_ind.harq_indication_body.harq_pdu_list[i]);
UL_info->harq_ind.harq_indication_body.number_of_harqs=0;
UL_info->harq_ind.harq_indication_body.number_of_harqs = 0;
}
}
......
This diff is collapsed.
This diff is collapsed.
......@@ -70,6 +70,15 @@ uint8_t do_MIB(rrc_eNB_carrier_data_t *carrier, uint32_t N_RB_DL, uint32_t phich
#endif
);
/**
\brief Generate configuration structure for DRX_Config
@param Mod_id Instance of eNB
@param CC_id Id of component to configure
@param configuration Pointer Configuration Request structure
@param UEcap Pointer Configuration UE capablities
@return DRX_Config structure pointer or NULL => error */
LTE_DRX_Config_t *do_DrxConfig(uint8_t Mod_id, int CC_id, RrcConfigurationReq *configuration, LTE_UE_EUTRA_Capability_t *UEcap);
/**
\brief Generate configuration for SIB1 (eNB).
@param carrier pointer to Carrier information
......
......@@ -140,8 +140,8 @@ static uint8_t check_trigger_meas_event(
LTE_Q_OffsetRange_t ofs, LTE_Q_OffsetRange_t ocs, long a3_offset, LTE_TimeToTrigger_t ttt);
#if (LTE_RRC_VERSION >= MAKE_VERSION(10, 0, 0))
static void decode_MBSFNAreaConfiguration(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,
static void decode_MBSFNAreaConfiguration(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);
#endif
......
......@@ -46,8 +46,7 @@ int rrc_ue_ral_delete_all_thresholds_type(unsigned int mod_idP, ral_link_param_t
rrc_ral_threshold_key_t *keys = NULL;
unsigned int num_keys = 0;
int return_code = 0;
rc = obj_hashtable_get_keys(UE_rrc_inst[mod_idP].ral_meas_thresholds, (void*)&keys, &num_keys);
rc = obj_hashtable_get_keys(UE_rrc_inst[mod_idP].ral_meas_thresholds, (void *)&keys, &num_keys);
if (rc == HASH_TABLE_OK) {
key = keys;
......@@ -82,10 +81,9 @@ int rrc_ue_ral_delete_threshold(unsigned int mod_idP, ral_link_param_type_t *par
{
hashtable_rc_t rc;
rrc_ral_threshold_key_t ref_key;
memcpy(&ref_key.link_param_type, param_type_pP, sizeof(ral_link_param_type_t));
memcpy(&ref_key.threshold, threshold_pP, sizeof(ral_threshold_t));
rc = obj_hashtable_remove (UE_rrc_inst[mod_idP].ral_meas_thresholds, (void*)&ref_key, sizeof(rrc_ral_threshold_key_t));
rc = obj_hashtable_remove (UE_rrc_inst[mod_idP].ral_meas_thresholds, (void *)&ref_key, sizeof(rrc_ral_threshold_key_t));
if (rc == HASH_TABLE_OK) {
return 0;
......@@ -106,12 +104,9 @@ int rrc_ue_ral_handle_configure_threshold_request(unsigned int mod_idP, MessageD
MessageDef *message_p = NULL;
unsigned int ix_param = 0;
unsigned int ix_thresholds = 0;
DevAssert(msg_pP != NULL);
LOG_I(RRC, "[UE %d] Received %s\n", mod_idP, ITTI_MSG_NAME (msg_pP));
configure_threshold_req_p = &RRC_RAL_CONFIGURE_THRESHOLD_REQ(msg_pP);
transaction_id = configure_threshold_req_p->transaction_id;
for (ix_param = 0; ix_param < configure_threshold_req_p->num_link_cfg_params; ix_param++) {
......@@ -121,7 +116,6 @@ int rrc_ue_ral_handle_configure_threshold_request(unsigned int mod_idP, MessageD
case RAL_TH_ACTION_SET_NORMAL_THRESHOLD:
case RAL_TH_ACTION_SET_ONE_SHOT_THRESHOLD:
switch (link_cfg_param_p->link_param_type.choice) {
case RAL_LINK_PARAM_TYPE_CHOICE_GEN:
switch (link_cfg_param_p->link_param_type._union.link_param_gen) {
case RAL_LINK_PARAM_GEN_DATA_RATE:
......
......@@ -55,9 +55,7 @@ rrc_init_global_param(
)
//-----------------------------------------------------------------------------
{
rrc_rlc_register_rrc (rrc_data_ind, NULL); //register with rlc
DCCH_LCHAN_DESC.transport_block_size = 4;
DCCH_LCHAN_DESC.max_transport_blocks = 16;
DCCH_LCHAN_DESC.Delay_class = 1;
......@@ -67,13 +65,11 @@ rrc_init_global_param(
DTCH_UL_LCHAN_DESC.transport_block_size = 52;
DTCH_UL_LCHAN_DESC.max_transport_blocks = 20;
DTCH_UL_LCHAN_DESC.Delay_class = 1;
Rlc_info_um.rlc_mode = RLC_MODE_UM;
Rlc_info_um.rlc.rlc_um_info.timer_reordering = 5;
Rlc_info_um.rlc.rlc_um_info.sn_field_length = 10;
Rlc_info_um.rlc.rlc_um_info.is_mXch = 0;
//Rlc_info_um.rlc.rlc_um_info.sdu_discard_mode=16;
Rlc_info_am_config.rlc_mode = RLC_MODE_AM;
Rlc_info_am_config.rlc.rlc_am_info.max_retx_threshold = 50;
Rlc_info_am_config.rlc.rlc_am_info.poll_pdu = 8;
......@@ -81,20 +77,18 @@ rrc_init_global_param(
Rlc_info_am_config.rlc.rlc_am_info.t_poll_retransmit = 15;
Rlc_info_am_config.rlc.rlc_am_info.t_reordering = 50;
Rlc_info_am_config.rlc.rlc_am_info.t_status_prohibit = 10;
return 0;
}
//-----------------------------------------------------------------------------
void
rrc_config_buffer(
SRB_INFO* Srb_info,
SRB_INFO *Srb_info,
uint8_t Lchan_type,
uint8_t Role
)
//-----------------------------------------------------------------------------
{
Srb_info->Rx_buffer.payload_size = 0;
Srb_info->Tx_buffer.payload_size = 0;
}
......@@ -279,12 +273,12 @@ static earfcn earfcn_table[] = {
{ 43, 3600000000UL, 43590, 43590, 45589, 3600000000UL, 43590, 43590, 45589 },
};
int freq_to_arfcn10(int band, unsigned long freq)
{
int freq_to_arfcn10(int band, unsigned long freq) {
int N = sizeof(earfcn_table) / sizeof(earfcn_table[0]);
int i;
for (i = 0; i < N; i++) if (bands[i].band == band) break;
if (i == N) return -1;
if (!(bands[i].dl_minfreq < freq && freq < bands[i].dl_maxfreq))
......
......@@ -200,6 +200,8 @@ void *send_UE_status_notification(void *);
/* for ImsiMobileIdentity_t */
#include "MobileIdentity.h"
#include "LTE_DRX-Config.h"
/* correct Rel(8|10)/Rel14 differences
* the code is in favor of Rel14, those defines do the translation
*/
......
This diff is collapsed.
......@@ -41,7 +41,7 @@
//------------------------------------------------------------------------------
void
uid_linear_allocator_init(
uid_allocator_t* const uid_pP
uid_allocator_t *const uid_pP
)
//------------------------------------------------------------------------------
{
......@@ -51,14 +51,14 @@ uid_linear_allocator_init(
//------------------------------------------------------------------------------
uid_t
uid_linear_allocator_new(
eNB_RRC_INST* const rrc_instance_pP
eNB_RRC_INST *const rrc_instance_pP
)
//------------------------------------------------------------------------------
{
unsigned int i;
unsigned int bit_index = 1;
uid_t uid = 0;
uid_allocator_t* uia_p = &rrc_instance_pP->uid_allocator;
uid_allocator_t *uia_p = &rrc_instance_pP->uid_allocator;
for (i=0; i < UID_LINEAR_ALLOCATOR_BITMAP_SIZE; i++) {
if (uia_p->bitmap[i] != UINT_MAX) {
......@@ -82,7 +82,7 @@ uid_linear_allocator_new(
//------------------------------------------------------------------------------
void
uid_linear_allocator_free(
eNB_RRC_INST* rrc_instance_pP,
eNB_RRC_INST *rrc_instance_pP,
uid_t uidP
)
//------------------------------------------------------------------------------
......@@ -99,7 +99,7 @@ uid_linear_allocator_free(
//------------------------------------------------------------------------------
int rrc_eNB_compare_ue_rnti_id(
struct rrc_eNB_ue_context_s* c1_pP, struct rrc_eNB_ue_context_s* c2_pP)
struct rrc_eNB_ue_context_s *c1_pP, struct rrc_eNB_ue_context_s *c2_pP)
//------------------------------------------------------------------------------
{
if (c1_pP->ue_id_rnti > c2_pP->ue_id_rnti) {
......@@ -120,14 +120,14 @@ RB_GENERATE(rrc_ue_tree_s, rrc_eNB_ue_context_s, entries,
//------------------------------------------------------------------------------
struct rrc_eNB_ue_context_s*
struct rrc_eNB_ue_context_s *
rrc_eNB_allocate_new_UE_context(
eNB_RRC_INST* rrc_instance_pP
eNB_RRC_INST *rrc_instance_pP
)
//------------------------------------------------------------------------------
{
struct rrc_eNB_ue_context_s* new_p;
new_p = (struct rrc_eNB_ue_context_s* )malloc(sizeof(struct rrc_eNB_ue_context_s));
struct rrc_eNB_ue_context_s *new_p;
new_p = (struct rrc_eNB_ue_context_s * )malloc(sizeof(struct rrc_eNB_ue_context_s));
if (new_p == NULL) {
LOG_E(RRC, "Cannot allocate new ue context\n");
......@@ -136,18 +136,20 @@ rrc_eNB_allocate_new_UE_context(
memset(new_p, 0, sizeof(struct rrc_eNB_ue_context_s));
new_p->local_uid = uid_linear_allocator_new(rrc_instance_pP);
for(int i = 0; i < NB_RB_MAX; i++) {
new_p->ue_context.e_rab[i].xid = -1;
new_p->ue_context.modify_e_rab[i].xid = -1;
}
return new_p;
}
//------------------------------------------------------------------------------
struct rrc_eNB_ue_context_s*
struct rrc_eNB_ue_context_s *
rrc_eNB_get_ue_context(
eNB_RRC_INST* rrc_instance_pP,
eNB_RRC_INST *rrc_instance_pP,
rnti_t rntiP)
//------------------------------------------------------------------------------
{
......@@ -157,6 +159,7 @@ rrc_eNB_get_ue_context(
temp.ue_id_rnti = rntiP;
struct rrc_eNB_ue_context_s *ue_context_p = NULL;
ue_context_p = RB_FIND(rrc_ue_tree_s, &rrc_instance_pP->rrc_ue_head, &temp);
if ( ue_context_p != NULL) {
return ue_context_p;
} else {
......@@ -172,9 +175,9 @@ rrc_eNB_get_ue_context(
//------------------------------------------------------------------------------
void rrc_eNB_remove_ue_context(
const protocol_ctxt_t* const ctxt_pP,
eNB_RRC_INST* rrc_instance_pP,
struct rrc_eNB_ue_context_s* ue_context_pP)
const protocol_ctxt_t *const ctxt_pP,
eNB_RRC_INST *rrc_instance_pP,
struct rrc_eNB_ue_context_s *ue_context_pP)
//------------------------------------------------------------------------------
{
if (rrc_instance_pP == NULL) {
......@@ -190,12 +193,10 @@ void rrc_eNB_remove_ue_context(
}
RB_REMOVE(rrc_ue_tree_s, &rrc_instance_pP->rrc_ue_head, ue_context_pP);
MSC_LOG_EVENT(
MSC_RRC_ENB,
"0 Removed UE %"PRIx16" ",
ue_context_pP->ue_context.rnti);
rrc_eNB_free_mem_UE_context(ctxt_pP, ue_context_pP);
uid_linear_allocator_free(rrc_instance_pP, ue_context_pP->local_uid);
free(ue_context_pP);
......
......@@ -46,8 +46,7 @@ int rrc_enb_ral_delete_all_thresholds_type(unsigned int mod_idP, ral_link_param_
rrc_ral_threshold_key_t *keys = NULL;
unsigned int num_keys = 0;
int return_code = 0;
rc = obj_hashtable_get_keys(eNB_rrc_inst[mod_idP].ral_meas_thresholds, (void*)&keys, &num_keys);
rc = obj_hashtable_get_keys(eNB_rrc_inst[mod_idP].ral_meas_thresholds, (void *)&keys, &num_keys);
if (rc == HASH_TABLE_OK) {
key = keys;
......@@ -82,10 +81,9 @@ int rrc_enb_ral_delete_threshold(unsigned int mod_idP, ral_link_param_type_t *pa
{
hashtable_rc_t rc;
rrc_ral_threshold_key_t ref_key;
memcpy(&ref_key.link_param_type, param_type_pP, sizeof(ral_link_param_type_t));
memcpy(&ref_key.threshold, threshold_pP, sizeof(ral_threshold_t));
rc = obj_hashtable_remove (eNB_rrc_inst[mod_idP].ral_meas_thresholds, (void*)&ref_key, sizeof(rrc_ral_threshold_key_t));
rc = obj_hashtable_remove (eNB_rrc_inst[mod_idP].ral_meas_thresholds, (void *)&ref_key, sizeof(rrc_ral_threshold_key_t));
if (rc == HASH_TABLE_OK) {
return 0;
......@@ -106,12 +104,9 @@ int rrc_enb_ral_handle_configure_threshold_request(unsigned int mod_idP, Message
MessageDef *message_p = NULL;
unsigned int ix_param = 0;
unsigned int ix_thresholds = 0;
DevAssert(msg_pP != NULL);
LOG_I(RRC, "[eNB %d] Received %s\n", mod_idP, ITTI_MSG_NAME (msg_pP));
configure_threshold_req_p = &RRC_RAL_CONFIGURE_THRESHOLD_REQ(msg_pP);
transaction_id = configure_threshold_req_p->transaction_id;
for (ix_param = 0; ix_param < configure_threshold_req_p->num_link_cfg_params; ix_param++) {
......@@ -121,7 +116,6 @@ int rrc_enb_ral_handle_configure_threshold_request(unsigned int mod_idP, Message
case RAL_TH_ACTION_SET_NORMAL_THRESHOLD:
case RAL_TH_ACTION_SET_ONE_SHOT_THRESHOLD:
switch (link_cfg_param_p->link_param_type.choice) {
case RAL_LINK_PARAM_TYPE_CHOICE_GEN:
switch (link_cfg_param_p->link_param_type._union.link_param_gen) {
case RAL_LINK_PARAM_GEN_DATA_RATE:
......
This diff is collapsed.
......@@ -51,26 +51,22 @@
//#include "openair_rrc_utils.h"
//#include "openair_rrc_main.h"
#ifdef PHY_EMUL
#include "SIMULATION/simulation_defs.h"
extern EMULATION_VARS *Emul_vars;
extern CH_MAC_INST *CH_mac_inst;
extern UE_MAC_INST *UE_mac_inst;
#include "SIMULATION/simulation_defs.h"
extern EMULATION_VARS *Emul_vars;
extern CH_MAC_INST *CH_mac_inst;
extern UE_MAC_INST *UE_mac_inst;
#endif
/******************************************************************************/
void fn_rrc (void)
{
void fn_rrc (void) {
/******************************************************************************/
msg_head_t *Header ;
char *Data;
L2_ID Mac_id;
while(1) {
Header = (msg_head_t *) recv_msg(&S_rrc) ;
if(Header==NULL) {
......@@ -103,7 +99,7 @@ void fn_rrc (void)
case RRM_RB_ESTABLISH_REQ: {
send_msg((void *)&S_rrc,msg_rrc_rb_establish_resp(Header->inst,Header->Trans_id));
msg( "[RRM]>[RRC][Inst %d]:RRM_RB_ESTABLISH_REQ, size %d\n",Header->inst,sizeof(rrm_rb_establish_req_t));
rrc_config_req(Header->inst,(void*)Data,Header->msg_type,Header->Trans_id);
rrc_config_req(Header->inst,(void *)Data,Header->msg_type,Header->Trans_id);
break ;
}
......@@ -139,9 +135,7 @@ void fn_rrc (void)
if(p->L3_info_t == IPv4_ADDR) {
memcpy(&UE_rrc_inst[Header->inst-NB_CH_INST].Srb2[CH_index].Srb_info.IP_addr,p->L3_info,4);
}
else {
} else {
memcpy(&UE_rrc_inst[Header->inst-NB_CH_INST].Srb2[CH_index].Srb_info.IP_addr,p->L3_info,16);
}
}
......@@ -155,20 +149,17 @@ void fn_rrc (void)
}
break ;
case RRM_SENSING_MEAS_RESP: {
msg( "[RRM]>[RRC][Inst %d]:RRM_SENSING_MEAS_RESP\n",Header->inst);
//rrm_rrc_meas_resp(header->inst,header->Trans_id);
}
break ;
case RRM_SCAN_ORD:
msg( "[RRM]>[RRC][Inst %d]:RRM_SCAN_ORD\n",Header->inst);
//memcpy(&CH_rrc_inst[0].Rrm_init_scan_req,(rrm_init_scan_req_t *) Data,sizeof(rrm_init_scan_req_t));
//CH_rrc_inst[0].Last_scan_req=Rrc_xface->Frame_index;
///send over air
break;
case RRM_INIT_SCAN_REQ:
......@@ -176,28 +167,22 @@ void fn_rrc (void)
memcpy(&CH_rrc_inst[0].Rrm_init_scan_req,(rrm_init_scan_req_t *) Data,sizeof(rrm_init_scan_req_t));
CH_rrc_inst[0].Last_scan_req=Rrc_xface->Frame_index;
///send over air
break;
case RRM_END_SCAN_REQ:
msg( "[RRM]>[RRC][Inst %d]:RRM_END_SCAN_REQ\n",Header->inst);
memcpy(&Mac_id.L2_id[0],Data,sizeof(L2_ID));
unsigned char UE_index=Mac_id.L2_id[0]-NB_CH_MAX+1;
UE_rrc_inst[0].Srb2[UE_index].Srb_info.Tx_buffer.Payload[0]=100;
msg("SRB_ID %d\n",CH_rrc_inst[0].Srb2[UE_index].Srb_info.Srb_id);
Mac_rlc_xface->rrc_rlc_data_req(0,CH_rrc_inst[0].Srb2[UE_index].Srb_info.Srb_id,0,0,1,CH_rrc_inst[0].Srb2[UE_index].Srb_info.Tx_buffer.Payload);
//CH_rrc_inst[0].Last_scan_req=Rrc_xface->Frame_index;
///send over air
break;
default :
msg("[L3_xface]WARNING: msg unknown %d\n",Header->msg_type) ;
}
}
}
......
This diff is collapsed.
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment