Commit 81f04d29 authored by Louis Adrien Dufrene's avatar Louis Adrien Dufrene

Apply diff between ssr (CDRX) branch and develop

parent ee547c1d
...@@ -189,7 +189,15 @@ const char* eurecomVariablesNames[] = { ...@@ -189,7 +189,15 @@ const char* eurecomVariablesNames[] = {
"ue0_trx_write_ns_missing", "ue0_trx_write_ns_missing",
"enb_thread_rxtx_CPUID", "enb_thread_rxtx_CPUID",
"ru_thread_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[] = { const char* eurecomFunctionsNames[] = {
......
...@@ -167,6 +167,14 @@ typedef enum { ...@@ -167,6 +167,14 @@ typedef enum {
VCD_SIGNAL_DUMPER_VARIABLES_CPUID_ENB_THREAD_RXTX, VCD_SIGNAL_DUMPER_VARIABLES_CPUID_ENB_THREAD_RXTX,
VCD_SIGNAL_DUMPER_VARIABLES_CPUID_RU_THREAD, VCD_SIGNAL_DUMPER_VARIABLES_CPUID_RU_THREAD,
VCD_SIGNAL_DUMPER_VARIABLES_CPUID_RU_THREAD_TX, 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_DUMPER_VARIABLES_END
} vcd_signal_dump_variables; } vcd_signal_dump_variables;
......
...@@ -44,7 +44,7 @@ typedef struct { ...@@ -44,7 +44,7 @@ typedef struct {
#define VCD_NUM_FUNCTIONS 190 #define VCD_NUM_FUNCTIONS 190
/* number of VCD variables (to be kept up to date! see in T_messages.txt) */ /* 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) */ /* 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) #define VCD_FIRST_FUNCTION ((uintptr_t)T_VCD_FUNCTION_RT_SLEEP)
......
...@@ -1676,6 +1676,46 @@ ID = VCD_VARIABLE_CPUID_RU_THREAD_TX ...@@ -1676,6 +1676,46 @@ ID = VCD_VARIABLE_CPUID_RU_THREAD_TX
GROUP = ALL:VCD:ENB:VCD_VARIABLE GROUP = ALL:VCD:ENB:VCD_VARIABLE
FORMAT = ulong,value FORMAT = ulong,value
VCD_NAME = ru_thread_tx_CPUID 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 #functions
......
...@@ -115,8 +115,8 @@ void init_mpdcch5ss1tab_normal_regular_subframe_evenNRBDL(PHY_VARS_eNB * eNB) ...@@ -115,8 +115,8 @@ void init_mpdcch5ss1tab_normal_regular_subframe_evenNRBDL(PHY_VARS_eNB * eNB)
for (k = 0; k < 72; k++) { for (k = 0; k < 72; k++) {
kmod = k % 12; kmod = k % 12;
if (((l != 5) && (l != 6) && (l != 12) && (l != 13)) || (kmod == 2) || (kmod == 3) || (kmod == 4) || (kmod == 7) || (kmod == 8) || (kmod == 9)) { if (((l != 5) && (l != 6) && (l != 12) && (l != 13)) || (kmod == 2) || (kmod == 3) || (kmod == 4) || (kmod == 7) || (kmod == 8) || (kmod == 9)) {
mpdcch5ss1tab[re] = (l * eNB->frame_parms.ofdm_symbol_size) + k; mpdcch5ss1tab[re] = (l * eNB->frame_parms.ofdm_symbol_size) + k;
re++; re++;
} else if ((kmod == 0) || (kmod == 5) || (kmod == 10)) { } else if ((kmod == 0) || (kmod == 5) || (kmod == 10)) {
mpdcch5ss1tab[re++] = (l * eNB->frame_parms.ofdm_symbol_size) + k; mpdcch5ss1tab[re++] = (l * eNB->frame_parms.ofdm_symbol_size) + k;
} }
......
...@@ -722,17 +722,13 @@ uint32_t rx_pucch(PHY_VARS_eNB *eNB, ...@@ -722,17 +722,13 @@ uint32_t rx_pucch(PHY_VARS_eNB *eNB,
#if (LTE_RRC_VERSION >= MAKE_VERSION(14, 0, 0)) #if (LTE_RRC_VERSION >= MAKE_VERSION(14, 0, 0))
,uint8_t br_flag ,uint8_t br_flag
#endif #endif
) )
//-----------------------------------------------------------------------------
{ {
static int first_call = 1;
LTE_eNB_COMMON *common_vars = &eNB->common_vars;
static int first_call=1; LTE_DL_FRAME_PARMS *frame_parms = &eNB->frame_parms;
LTE_eNB_COMMON *common_vars = &eNB->common_vars; 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]);
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]);
uint32_t u,v,n,aa; uint32_t u,v,n,aa;
uint32_t z[12*14]; uint32_t z[12*14];
...@@ -770,7 +766,7 @@ uint32_t rx_pucch(PHY_VARS_eNB *eNB, ...@@ -770,7 +766,7 @@ uint32_t rx_pucch(PHY_VARS_eNB *eNB,
uint16_t Ret = 0; uint16_t Ret = 0;
int16_t SubCarrierDeMapData[NB_ANTENNAS_RX][14][12][2]; //[Antenna][Symbol][Subcarrier][Complex] int16_t SubCarrierDeMapData[NB_ANTENNAS_RX][14][12][2]; //[Antenna][Symbol][Subcarrier][Complex]
int16_t CshData_fmt3[NB_ANTENNAS_RX][14][12][2]; //[Antenna][Symbol][Subcarrier][Complex] int16_t CshData_fmt3[NB_ANTENNAS_RX][14][12][2]; //[Antenna][Symbol][Subcarrier][Complex]
double delta_theta[NB_ANTENNAS_RX][12]; //[Antenna][Subcarrier][Complex] double delta_theta[NB_ANTENNAS_RX][12]; //[Antenna][Subcarrier][Complex]
int16_t ChestValue[NB_ANTENNAS_RX][2][12][2]; //[Antenna][Slot][Subcarrier][Complex] int16_t ChestValue[NB_ANTENNAS_RX][2][12][2]; //[Antenna][Slot][Subcarrier][Complex]
int16_t ChdetAfterValue_fmt3[NB_ANTENNAS_RX][14][12][2]; //[Antenna][Symbol][Subcarrier][Complex] int16_t ChdetAfterValue_fmt3[NB_ANTENNAS_RX][14][12][2]; //[Antenna][Symbol][Subcarrier][Complex]
int16_t RemoveFrqDev_fmt3[NB_ANTENNAS_RX][2][5][12][2]; //[Antenna][Slot][PUCCH_Symbol][Subcarrier][Complex] int16_t RemoveFrqDev_fmt3[NB_ANTENNAS_RX][2][5][12][2]; //[Antenna][Slot][PUCCH_Symbol][Subcarrier][Complex]
...@@ -779,7 +775,6 @@ uint32_t rx_pucch(PHY_VARS_eNB *eNB, ...@@ -779,7 +775,6 @@ uint32_t rx_pucch(PHY_VARS_eNB *eNB,
int16_t Fmt3xDataAvgSym[2][12][2]; //[Slot][Subcarrier][Complex] int16_t Fmt3xDataAvgSym[2][12][2]; //[Slot][Subcarrier][Complex]
int16_t IFFTOutData_Fmt3[2][12][2]; //[Slot][Subcarrier][Complex] int16_t IFFTOutData_Fmt3[2][12][2]; //[Slot][Subcarrier][Complex]
int16_t b[48]; //[bit] 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 payload_entity = -1;
int16_t Interpw; int16_t Interpw;
int16_t payload_max; int16_t payload_max;
......
...@@ -329,7 +329,7 @@ typedef struct { ...@@ -329,7 +329,7 @@ typedef struct {
uint8_t subframe; uint8_t subframe;
/// corresponding UE RNTI /// corresponding UE RNTI
uint16_t 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; UCI_type_t type;
/// SRS active flag /// SRS active flag
uint8_t srs_active; uint8_t srs_active;
......
...@@ -598,7 +598,12 @@ void handle_uci_harq_information(PHY_VARS_eNB *eNB, LTE_eNB_UCI *uci,nfapi_ul_co ...@@ -598,7 +598,12 @@ 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]; LTE_eNB_UCI *uci = &eNB->uci_vars[UE_id];
...@@ -620,7 +625,10 @@ void handle_uci_sr_pdu(PHY_VARS_eNB *eNB,int UE_id,nfapi_ul_config_request_pdu_t ...@@ -620,7 +625,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; uci->total_repetitions = ul_config_pdu->uci_sr_pdu.ue_information.ue_information_rel13.total_number_of_repetitions;
#endif #endif
LOG_D(PHY,"Programming UCI SR rnti %x, pucch1_0 %d for (%d,%d)\n", 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) 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 @@ ...@@ -36,6 +36,7 @@
#include "LTE_SystemInformationBlockType2.h" #include "LTE_SystemInformationBlockType2.h"
#include "LTE_SL-OffsetIndicator-r12.h" #include "LTE_SL-OffsetIndicator-r12.h"
#include "LTE_SubframeBitmapSL-r12.h" #include "LTE_SubframeBitmapSL-r12.h"
#include "LTE_DRX-Config.h" // Add DRX SSR 2018-10
#include "LTE_SL-CP-Len-r12.h" #include "LTE_SL-CP-Len-r12.h"
#include "LTE_SL-PeriodComm-r12.h" #include "LTE_SL-PeriodComm-r12.h"
#include "LTE_SL-DiscResourcePool-r12.h" #include "LTE_SL-DiscResourcePool-r12.h"
...@@ -141,6 +142,14 @@ typedef struct RadioResourceConfig_s { ...@@ -141,6 +142,14 @@ typedef struct RadioResourceConfig_s {
long bcch_modificationPeriodCoeff; long bcch_modificationPeriodCoeff;
long pcch_defaultPagingCycle; long pcch_defaultPagingCycle;
long pcch_nB; long pcch_nB;
LTE_DRX_Config_PR drx_Config_present; // Add DRX SSR 2018-10
long drx_onDurationTimer; // Add DRX SSR 2018-10
long drx_InactivityTimer; // Add DRX SSR 2018-10
long drx_RetransmissionTimer; // Add DRX SSR 2018-10
LTE_DRX_Config__setup__longDRX_CycleStartOffset_PR drx_longDrx_CycleStartOffset_present; // Add DRX SSR 2018-10
long drx_longDrx_CycleStartOffset; // Add DRX SSR 2018-10
long drx_shortDrx_Cycle; // Add DRX SSR 2018-10
long drx_shortDrx_ShortCycleTimer; // Add DRX SSR 2018-10
long ue_TimersAndConstants_t300; long ue_TimersAndConstants_t300;
long ue_TimersAndConstants_t301; long ue_TimersAndConstants_t301;
long ue_TimersAndConstants_t310; long ue_TimersAndConstants_t310;
......
This diff is collapsed.
...@@ -932,8 +932,9 @@ void fill_eMTC_configuration(MessageDef *msg_p, ccparams_eMTC_t *eMTCconfig, in ...@@ -932,8 +932,9 @@ void fill_eMTC_configuration(MessageDef *msg_p, ccparams_eMTC_t *eMTCconfig, in
break; break;
} }
RRC_CONFIGURATION_REQ (msg_p).rar_HoppingConfig_r13[cc_idx][rachCEInfoIndex] = eMTCconfig->rar_HoppingConfig_r13; 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, AssertFatal(eMTCconfig->rar_HoppingConfig_r13 == 0 || eMTCconfig->rar_HoppingConfig_r13 == 1,
"illegal rar_HoppingConfig_r13 %d\n",eMTCconfig->rar_HoppingConfig_r13); "illegal rar_HoppingConfig_r13 %d\n",eMTCconfig->rar_HoppingConfig_r13);
} // end for loop (rach ce level info) } // end for loop (rach ce level info)
char rsrpRangeListPath[MAX_OPTNAME_SIZE * 2]; char rsrpRangeListPath[MAX_OPTNAME_SIZE * 2];
...@@ -1101,11 +1102,12 @@ void fill_eMTC_configuration(MessageDef *msg_p, ccparams_eMTC_t *eMTCconfig, in ...@@ -1101,11 +1102,12 @@ void fill_eMTC_configuration(MessageDef *msg_p, ccparams_eMTC_t *eMTCconfig, in
/** PCCH CONFIG V1310 */ /** PCCH CONFIG V1310 */
RRC_CONFIGURATION_REQ(msg_p).pcch_config_v1310[cc_idx] = TRUE; 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).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; 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 == 2 ||
eMTCconfig->mpdcch_numrepetition_paging_r13 == 4 || eMTCconfig->mpdcch_numrepetition_paging_r13 == 4 ||
eMTCconfig->mpdcch_numrepetition_paging_r13 == 8 || eMTCconfig->mpdcch_numrepetition_paging_r13 == 8 ||
...@@ -1117,7 +1119,6 @@ void fill_eMTC_configuration(MessageDef *msg_p, ccparams_eMTC_t *eMTCconfig, in ...@@ -1117,7 +1119,6 @@ void fill_eMTC_configuration(MessageDef *msg_p, ccparams_eMTC_t *eMTCconfig, in
"illegal mpdcch_numrepetition_paging_r13 %d\n", "illegal mpdcch_numrepetition_paging_r13 %d\n",
eMTCconfig->mpdcch_numrepetition_paging_r13); eMTCconfig->mpdcch_numrepetition_paging_r13);
// RRC_CONFIGURATION_REQ(msg_p).nb_v1310[cc_idx] = CALLOC(1, sizeof(long)); // RRC_CONFIGURATION_REQ(msg_p).nb_v1310[cc_idx] = CALLOC(1, sizeof(long));
// if (!strcmp(nb_v1310, "one64thT")) { // if (!strcmp(nb_v1310, "one64thT")) {
// *RRC_CONFIGURATION_REQ(msg_p).nb_v1310[cc_idx] = 0; // *RRC_CONFIGURATION_REQ(msg_p).nb_v1310[cc_idx] = 0;
......
This diff is collapsed.
...@@ -61,7 +61,10 @@ ...@@ -61,7 +61,10 @@
#define ENB_CONFIG_STRING_PREAMBLE_TRANSMAX_CE_R13 "preamble_TransMax_ce_r13" #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_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_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_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_SYSTEM_INFO_VALUE_TAG_LIST "system_info_value_tag_SI"
#define ENB_CONFIG_STRING_FIRST_PREAMBLE_R13 "firstPreamble_r13" #define ENB_CONFIG_STRING_FIRST_PREAMBLE_R13 "firstPreamble_r13"
#define ENB_CONFIG_STRING_LAST_PREAMBLE_R13 "lastPreamble_r13" #define ENB_CONFIG_STRING_LAST_PREAMBLE_R13 "lastPreamble_r13"
...@@ -81,6 +84,9 @@ ...@@ -81,6 +84,9 @@
#define ENB_CONFIG_STRING_PUCCH_INFO_VALUE "pucch_info_value" #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_N1PUCCH_AN_INFOLIST_R13 "n1PUCCH_AN_InfoList_r13"
#define ENB_CONFIG_STRING_PCCH_CONFIG_V1310 "pcch_config_v1310" #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" #define ENB_CONFIG_STRING_SIB2_FREQ_HOPPINGPARAMETERS_R13 "sib2_freq_hoppingParameters_r13"
typedef struct ccparams_eMTC_s { typedef struct ccparams_eMTC_s {
......
This diff is collapsed.
This diff is collapsed.
...@@ -353,6 +353,9 @@ void generate_Msg2(module_id_t module_idP, ...@@ -353,6 +353,9 @@ void generate_Msg2(module_id_t module_idP,
AssertFatal (cc[CC_idP].sib1_v13ext->bandwidthReducedAccessRelatedInfo_r13 != NULL, "cc[CC_idP].sib1_v13ext->bandwidthReducedAccessRelatedInfo_r13 is null\n"); 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; 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.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.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 dl_config_pdu->mpdcch_pdu.mpdcch_pdu_rel13.rnti_type = 2; // RA-RNTI
......
...@@ -477,7 +477,7 @@ schedule_ue_spec(module_id_t module_idP, ...@@ -477,7 +477,7 @@ schedule_ue_spec(module_id_t module_idP,
int TBS, j, padding = 0, post_padding = 0; int TBS, j, padding = 0, post_padding = 0;
rnti_t rnti; rnti_t rnti;
unsigned char dlsch_buffer[MAX_DLSCH_PAYLOAD_BYTES]; unsigned char dlsch_buffer[MAX_DLSCH_PAYLOAD_BYTES];
int round = 0; int round_DL = 0;
int harq_pid = 0; int harq_pid = 0;
uint16_t release_num; uint16_t release_num;
uint8_t ra_ii; uint8_t ra_ii;
...@@ -636,12 +636,15 @@ schedule_ue_spec(module_id_t module_idP, ...@@ -636,12 +636,15 @@ schedule_ue_spec(module_id_t module_idP,
LOG_D(MAC, "doing schedule_ue_spec for CC_id %d UE %d\n", LOG_D(MAC, "doing schedule_ue_spec for CC_id %d UE %d\n",
CC_id, CC_id,
UE_id); UE_id);
continue_flag = 0; // reset the flag to allow allocation for the remaining UEs continue_flag = 0; // reset the flag to allow allocation for the remaining UEs
rnti = UE_RNTI(module_idP, UE_id); rnti = UE_RNTI(module_idP, UE_id);
ue_sched_ctrl = &UE_list->UE_sched_ctrl[UE_id]; ue_sched_ctrl = &UE_list->UE_sched_ctrl[UE_id];
ue_template = &UE_list->UE_template[CC_id][UE_id]; ue_template = &UE_list->UE_template[CC_id][UE_id];
if (ue_template->rach_resource_type > 0) continue_flag = 1; if (ue_template->rach_resource_type > 0) {
continue_flag = 1;
}
if (&(UE_list->eNB_UE_stats[CC_id][UE_id]) == NULL) { if (&(UE_list->eNB_UE_stats[CC_id][UE_id]) == NULL) {
LOG_D(MAC, "[eNB] Cannot find eNB_UE_stats\n"); LOG_D(MAC, "[eNB] Cannot find eNB_UE_stats\n");
...@@ -722,11 +725,11 @@ schedule_ue_spec(module_id_t module_idP, ...@@ -722,11 +725,11 @@ schedule_ue_spec(module_id_t module_idP,
harq_pid = frame_subframe2_dl_harq_pid(cc->tdd_Config, harq_pid = frame_subframe2_dl_harq_pid(cc->tdd_Config,
frameP, frameP,
subframeP); subframeP);
round = ue_sched_ctrl->round[CC_id][harq_pid]; round_DL = ue_sched_ctrl->round[CC_id][harq_pid];
eNB_UE_stats->crnti = rnti; eNB_UE_stats->crnti = rnti;
eNB_UE_stats->rrc_status = mac_eNB_get_rrc_status(module_idP, rnti); eNB_UE_stats->rrc_status = mac_eNB_get_rrc_status(module_idP, rnti);
eNB_UE_stats->harq_pid = harq_pid; eNB_UE_stats->harq_pid = harq_pid;
eNB_UE_stats->harq_round = round; eNB_UE_stats->harq_round = round_DL;
if (eNB_UE_stats->rrc_status < RRC_CONNECTED) { if (eNB_UE_stats->rrc_status < RRC_CONNECTED) {
LOG_D(MAC, "UE %d is not in RRC_CONNECTED\n", LOG_D(MAC, "UE %d is not in RRC_CONNECTED\n",
...@@ -760,24 +763,55 @@ schedule_ue_spec(module_id_t module_idP, ...@@ -760,24 +763,55 @@ schedule_ue_spec(module_id_t module_idP,
LOG_D(MAC, "[eNB %d] Frame %d: Scheduling UE %d on CC_id %d (rnti %x, harq_pid %d, round %d, rb %d, cqi %d, mcs %d, rrc %d)\n", LOG_D(MAC, "[eNB %d] Frame %d: Scheduling UE %d on CC_id %d (rnti %x, harq_pid %d, round %d, rb %d, cqi %d, mcs %d, rrc %d)\n",
module_idP, module_idP,
frameP, UE_id, frameP,
UE_id,
CC_id, CC_id,
rnti, rnti,
harq_pid, harq_pid,
round, round_DL,
nb_available_rb, nb_available_rb,
ue_sched_ctrl->dl_cqi[CC_id], ue_sched_ctrl->dl_cqi[CC_id],
eNB_UE_stats->dlsch_mcs1, eNB_UE_stats->dlsch_mcs1,
eNB_UE_stats->rrc_status); eNB_UE_stats->rrc_status);
/* process retransmission */ /* Process retransmission */
if (round != 8) { if (round_DL != 8) {
//if (round_DL > 0) {
// get freq_allocation // get freq_allocation
nb_rb = ue_template->nb_rb[harq_pid]; nb_rb = ue_template->nb_rb[harq_pid];
TBS = get_TBS_DL(ue_template->oldmcs1[harq_pid], TBS = get_TBS_DL(ue_template->oldmcs1[harq_pid],
nb_rb); nb_rb);
if (nb_rb <= nb_available_rb) { if (nb_rb <= nb_available_rb) {
/* CDRX */
ue_sched_ctrl->harq_rtt_timer[CC_id][harq_pid] = 1; // restart HARQ RTT timer
/*
LOG_W(MAC, "HELLO : round!=8 UE_id = %d, frame = %d; subframe = %d; CC_id %d, harq_pid = %d , RTT_timer = %d,%d,%d,%d,%d,%d,%d,%d\n",
UE_id,
frameP,
subframeP,
CC_id,
harq_pid,
ue_sched_ctrl->harq_rtt_timer[CC_id][0],
ue_sched_ctrl->harq_rtt_timer[CC_id][1],
ue_sched_ctrl->harq_rtt_timer[CC_id][2],
ue_sched_ctrl->harq_rtt_timer[CC_id][3],
ue_sched_ctrl->harq_rtt_timer[CC_id][4],
ue_sched_ctrl->harq_rtt_timer[CC_id][5],
ue_sched_ctrl->harq_rtt_timer[CC_id][6],
ue_sched_ctrl->harq_rtt_timer[CC_id][7]);
*/
if (ue_sched_ctrl->cdrx_configured) {
ue_sched_ctrl->drx_retransmission_timer[harq_pid] = 0; // stop drx retransmission
/* May be a problem with drx_retransmission_timer[harq_pid]. Here the timer is reset not stop.
* Can create a problem with several CC_id with the same UE??
*/
if (harq_pid == 0) {
VCD_SIGNAL_DUMPER_DUMP_VARIABLE_BY_NAME(VCD_SIGNAL_DUMPER_VARIABLES_DRX_RETRANSMISSION_HARQ0, (unsigned long) ue_sched_ctrl->drx_retransmission_timer[0]);
}
}
if (cc[CC_id].tdd_Config != NULL) { if (cc[CC_id].tdd_Config != NULL) {
ue_template->DAI++; ue_template->DAI++;
update_ul_dci(module_idP, update_ul_dci(module_idP,
...@@ -852,7 +886,7 @@ schedule_ue_spec(module_id_t module_idP, ...@@ -852,7 +886,7 @@ schedule_ue_spec(module_id_t module_idP,
dl_config_pdu->dci_dl_pdu.dci_dl_pdu_rel8.tpc = 1; // Don't adjust power when retransmitting dl_config_pdu->dci_dl_pdu.dci_dl_pdu_rel8.tpc = 1; // Don't adjust power when retransmitting
dl_config_pdu->dci_dl_pdu.dci_dl_pdu_rel8.new_data_indicator_1 = ue_template->oldNDI[harq_pid]; dl_config_pdu->dci_dl_pdu.dci_dl_pdu_rel8.new_data_indicator_1 = ue_template->oldNDI[harq_pid];
dl_config_pdu->dci_dl_pdu.dci_dl_pdu_rel8.mcs_1 = ue_template->oldmcs1[harq_pid]; dl_config_pdu->dci_dl_pdu.dci_dl_pdu_rel8.mcs_1 = ue_template->oldmcs1[harq_pid];
dl_config_pdu->dci_dl_pdu.dci_dl_pdu_rel8.redundancy_version_1 = round & 3; dl_config_pdu->dci_dl_pdu.dci_dl_pdu_rel8.redundancy_version_1 = round_DL & 3;
// TDD // TDD
if (cc[CC_id].tdd_Config != NULL) { if (cc[CC_id].tdd_Config != NULL) {
...@@ -861,7 +895,7 @@ schedule_ue_spec(module_id_t module_idP, ...@@ -861,7 +895,7 @@ schedule_ue_spec(module_id_t module_idP,
module_idP, module_idP,
CC_id, CC_id,
harq_pid, harq_pid,
round, round_DL,
ue_template->DAI - 1, ue_template->DAI - 1,
ue_template->oldmcs1[harq_pid]); ue_template->oldmcs1[harq_pid]);
} else { } else {
...@@ -869,7 +903,7 @@ schedule_ue_spec(module_id_t module_idP, ...@@ -869,7 +903,7 @@ schedule_ue_spec(module_id_t module_idP,
module_idP, module_idP,
CC_id, CC_id,
harq_pid, harq_pid,
round, round_DL,
ue_template->oldmcs1[harq_pid]); ue_template->oldmcs1[harq_pid]);
} }
...@@ -893,7 +927,7 @@ schedule_ue_spec(module_id_t module_idP, ...@@ -893,7 +927,7 @@ schedule_ue_spec(module_id_t module_idP,
0, // virtual_resource_block_assignment_flag, unused here 0, // virtual_resource_block_assignment_flag, unused here
0, // resource_block_coding, to be filled in later 0, // resource_block_coding, to be filled in later
getQm(ue_template->oldmcs1[harq_pid]), getQm(ue_template->oldmcs1[harq_pid]),
round & 3, // redundancy version round_DL & 3, // redundancy version
1, // transport blocks 1, // transport blocks
0, // transport block to codeword swap flag 0, // transport block to codeword swap flag
cc[CC_id].p_eNB == 1 ? 0 : 1, // transmission_scheme cc[CC_id].p_eNB == 1 ? 0 : 1, // transmission_scheme
...@@ -911,7 +945,7 @@ schedule_ue_spec(module_id_t module_idP, ...@@ -911,7 +945,7 @@ schedule_ue_spec(module_id_t module_idP,
LOG_D(MAC, "Filled NFAPI configuration for DCI/DLSCH %d, retransmission round %d\n", LOG_D(MAC, "Filled NFAPI configuration for DCI/DLSCH %d, retransmission round %d\n",
eNB->pdu_index[CC_id], eNB->pdu_index[CC_id],
round); round_DL);
program_dlsch_acknak(module_idP, program_dlsch_acknak(module_idP,
CC_id, CC_id,
UE_id, UE_id,
...@@ -946,7 +980,8 @@ schedule_ue_spec(module_id_t module_idP, ...@@ -946,7 +980,8 @@ schedule_ue_spec(module_id_t module_idP,
CC_id, CC_id,
UE_id); UE_id);
} }
} else { /* This is a potentially new SDU opportunity */ } else {
/* This is a potentially new SDU opportunity */
rlc_status.bytes_in_buffer = 0; rlc_status.bytes_in_buffer = 0;
// Now check RLC information to compute number of required RBs // Now check RLC information to compute number of required RBs
// get maximum TBS size for RLC request // get maximum TBS size for RLC request
...@@ -1265,7 +1300,7 @@ schedule_ue_spec(module_id_t module_idP, ...@@ -1265,7 +1300,7 @@ schedule_ue_spec(module_id_t module_idP,
} }
} }
/* last header does not have length field */ /* Last header does not have length field */
if (header_length_total) { if (header_length_total) {
header_length_total -= header_length_last; header_length_total -= header_length_last;
header_length_total++; header_length_total++;
...@@ -1569,6 +1604,38 @@ schedule_ue_spec(module_id_t module_idP, ...@@ -1569,6 +1604,38 @@ schedule_ue_spec(module_id_t module_idP,
dl_req->tl.tag = NFAPI_DL_CONFIG_REQUEST_BODY_TAG; dl_req->tl.tag = NFAPI_DL_CONFIG_REQUEST_BODY_TAG;
eNB->DL_req[CC_id].sfn_sf = frameP << 4 | subframeP; eNB->DL_req[CC_id].sfn_sf = frameP << 4 | subframeP;
eNB->DL_req[CC_id].header.message_id = NFAPI_DL_CONFIG_REQUEST; eNB->DL_req[CC_id].header.message_id = NFAPI_DL_CONFIG_REQUEST;
/* CDRX */
ue_sched_ctrl->harq_rtt_timer[CC_id][harq_pid] = 1; // restart HARQ RTT timer
/*
LOG_W(MAC, "HELLO : round=8, UE_id = %d, frame = %d; subframe = %d ; CC_id %d, harq_pid = %d , RTT_timer = %d,%d,%d,%d,%d,%d,%d,%d\n",
UE_id,
frameP,
subframeP,
CC_id,
harq_pid,
ue_sched_ctrl->harq_rtt_timer[CC_id][0],
ue_sched_ctrl->harq_rtt_timer[CC_id][1],
ue_sched_ctrl->harq_rtt_timer[CC_id][2],
ue_sched_ctrl->harq_rtt_timer[CC_id][3],
ue_sched_ctrl->harq_rtt_timer[CC_id][4],
ue_sched_ctrl->harq_rtt_timer[CC_id][5],
ue_sched_ctrl->harq_rtt_timer[CC_id][6],
ue_sched_ctrl->harq_rtt_timer[CC_id][7]);
*/
if (ue_sched_ctrl->cdrx_configured) {
ue_sched_ctrl->drx_inactivity_timer = 1; // restart drx inactivity timer when new transmission
ue_sched_ctrl->drx_retransmission_timer[harq_pid] = 0; // stop drx retransmission
/* May be a problem with drx_retransmission_timer[harq_pid]. Here the timer is reset not stop.
* Can create a problem with several CC_id with the same UE??
*/
VCD_SIGNAL_DUMPER_DUMP_VARIABLE_BY_NAME(VCD_SIGNAL_DUMPER_VARIABLES_DRX_INACTIVITY, (unsigned long) ue_sched_ctrl->drx_inactivity_timer);
if (harq_pid == 0) {
VCD_SIGNAL_DUMPER_DUMP_VARIABLE_BY_NAME(VCD_SIGNAL_DUMPER_VARIABLES_DRX_RETRANSMISSION_HARQ0, (unsigned long) ue_sched_ctrl->drx_retransmission_timer[0]);
}
}
// Toggle NDI for next time // Toggle NDI for next time
LOG_D(MAC, "CC_id %d Frame %d, subframeP %d: Toggling Format1 NDI for UE %d (rnti %x/%d) oldNDI %d\n", LOG_D(MAC, "CC_id %d Frame %d, subframeP %d: Toggling Format1 NDI for UE %d (rnti %x/%d) oldNDI %d\n",
CC_id, CC_id,
...@@ -1983,6 +2050,13 @@ schedule_ue_spec_br(module_id_t module_idP, ...@@ -1983,6 +2050,13 @@ schedule_ue_spec_br(module_id_t module_idP,
continue; continue;
} }
/* CDRX LTE-M */
if (ue_sched_ctl->cdrx_configured == TRUE) {
if ((ue_sched_ctl->bypass_cdrx == FALSE) && (ue_sched_ctl->in_active_time == FALSE)) {
continue;
}
}
round_DL = ue_sched_ctl->round[CC_id][harq_pid]; round_DL = ue_sched_ctl->round[CC_id][harq_pid];
AssertFatal (UE_template->physicalConfigDedicated != NULL, "UE_template->physicalConfigDedicated is null\n"); AssertFatal (UE_template->physicalConfigDedicated != NULL, "UE_template->physicalConfigDedicated is null\n");
......
This diff is collapsed.
...@@ -553,6 +553,7 @@ typedef struct { ...@@ -553,6 +553,7 @@ typedef struct {
uint16_t serving_num; uint16_t serving_num;
UE_ULSCH_STATUS status; UE_ULSCH_STATUS status;
} eNB_ULSCH_INFO; } eNB_ULSCH_INFO;
/*! \brief temp struct for DLSCH sched */ /*! \brief temp struct for DLSCH sched */
typedef struct { typedef struct {
rnti_t rnti; rnti_t rnti;
...@@ -561,6 +562,7 @@ typedef struct { ...@@ -561,6 +562,7 @@ typedef struct {
uint16_t serving_num; uint16_t serving_num;
UE_DLSCH_STATUS status; UE_DLSCH_STATUS status;
} eNB_DLSCH_INFO; } eNB_DLSCH_INFO;
/*! \brief eNB overall statistics */ /*! \brief eNB overall statistics */
typedef struct { typedef struct {
/// num BCCH PDU per CC /// num BCCH PDU per CC
...@@ -635,6 +637,7 @@ typedef struct { ...@@ -635,6 +637,7 @@ typedef struct {
int missed_deadlines; int missed_deadlines;
} eNB_STATS; } eNB_STATS;
/*! \brief eNB statistics for the connected UEs*/ /*! \brief eNB statistics for the connected UEs*/
typedef struct { typedef struct {
/// CRNTI of UE /// CRNTI of UE
...@@ -778,6 +781,7 @@ typedef struct { ...@@ -778,6 +781,7 @@ typedef struct {
} eNB_UE_STATS; } eNB_UE_STATS;
/*! \brief eNB template for UE context information */ /*! \brief eNB template for UE context information */
typedef struct { typedef struct {
/// C-RNTI of UE /// C-RNTI of UE
rnti_t rnti; rnti_t rnti;
...@@ -995,6 +999,49 @@ typedef struct { ...@@ -995,6 +999,49 @@ typedef struct {
int32_t uplane_inactivity_timer; int32_t uplane_inactivity_timer;
uint8_t crnti_reconfigurationcomplete_flag; uint8_t crnti_reconfigurationcomplete_flag;
uint8_t cqi_req_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];
/* C-DRX related timers */
/* Note: only valid for FDD 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 scheduler should bypass in_active_time and consider the UE as active
boolean_t bypass_cdrx;
/// 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 a 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];
/* End of C-DRX related timers */
} UE_sched_ctrl; } UE_sched_ctrl;
/*! \brief eNB template for the Random access information */ /*! \brief eNB template for the Random access information */
...@@ -1482,6 +1529,7 @@ typedef struct { ...@@ -1482,6 +1529,7 @@ typedef struct {
int16_t bucket_size[MAX_NUM_LCID]; int16_t bucket_size[MAX_NUM_LCID];
} UE_SCHEDULING_INFO; } UE_SCHEDULING_INFO;
/*!\brief Top level UE MAC structure */ /*!\brief Top level UE MAC structure */
typedef struct { typedef struct {
uint16_t Node_id; uint16_t Node_id;
/// RX frame counter /// RX frame counter
......
...@@ -1280,6 +1280,10 @@ uint16_t nb_rbs_allowed_slice(float rb_percentage, int total_rbs); ...@@ -1280,6 +1280,10 @@ 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_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); int ue_ul_slice_membership(module_id_t mod_id, int UE_id, int slice_idx);
/* DRX Configuration */
/* Configure local DRX timers and thresh 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 */ /* 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); uint8_t ul_subframe2_k_phich(COMMON_channels_t * cc, sub_frame_t ul_subframe);
#endif #endif
......
...@@ -459,7 +459,7 @@ void decode_slice_positioning(module_id_t Mod_idP, ...@@ -459,7 +459,7 @@ void decode_slice_positioning(module_id_t Mod_idP,
} }
// This fuction sorts the UE in order their dlsch buffer and CQI // This function sorts the UE in order their dlsch buffer and CQI
void void
sort_UEs(module_id_t Mod_idP, sort_UEs(module_id_t Mod_idP,
int slice_idx, int slice_idx,
...@@ -471,9 +471,19 @@ sort_UEs(module_id_t Mod_idP, ...@@ -471,9 +471,19 @@ sort_UEs(module_id_t Mod_idP,
int list_size = 0; int list_size = 0;
struct sort_ue_dl_params params = {Mod_idP, frameP, subframeP, slice_idx}; 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 (i = 0; i < MAX_MOBILES_PER_ENB; i++) { for (i = 0; i < MAX_MOBILES_PER_ENB; i++) {
UE_scheduling_control = &(UE_list->UE_sched_ctrl[i]);
if (UE_scheduling_control->cdrx_configured == TRUE) {
if ((UE_scheduling_control->bypass_cdrx == FALSE) && (UE_scheduling_control->in_active_time == FALSE)) {
continue;
}
}
if (UE_list->active[i] == TRUE && if (UE_list->active[i] == TRUE &&
UE_RNTI(Mod_idP, i) != NOT_A_RNTI && UE_RNTI(Mod_idP, i) != NOT_A_RNTI &&
UE_list->UE_sched_ctrl[i].ul_out_of_sync != 1 && UE_list->UE_sched_ctrl[i].ul_out_of_sync != 1 &&
...@@ -1636,8 +1646,9 @@ void ulsch_scheduler_pre_processor(module_id_t module_idP, ...@@ -1636,8 +1646,9 @@ void ulsch_scheduler_pre_processor(module_id_t module_idP,
uint16_t average_rbs_per_user[NFAPI_CC_MAX]; uint16_t average_rbs_per_user[NFAPI_CC_MAX];
int16_t total_remaining_rbs[NFAPI_CC_MAX]; int16_t total_remaining_rbs[NFAPI_CC_MAX];
uint16_t total_ue_count[NFAPI_CC_MAX]; uint16_t total_ue_count[NFAPI_CC_MAX];
UE_list_t *UE_list = &RC.mac[module_idP]->UE_list; eNB_MAC_INST *eNB = RC.mac[module_idP];
slice_info_t *sli = &RC.mac[module_idP]->slice_info; UE_list_t *UE_list = &eNB->UE_list;
slice_info_t *sli = &eNB->slice_info;
UE_TEMPLATE *UE_template = 0; UE_TEMPLATE *UE_template = 0;
UE_sched_ctrl *ue_sched_ctl; UE_sched_ctrl *ue_sched_ctl;
int N_RB_UL = 0; int N_RB_UL = 0;
...@@ -1695,7 +1706,7 @@ void ulsch_scheduler_pre_processor(module_id_t module_idP, ...@@ -1695,7 +1706,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); nCCE_to_be_used[CC_id] = nCCE_to_be_used[CC_id] + (1<<aggregation);
max_num_ue_to_be_scheduled+=1; 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 = &UE_list->UE_sched_ctrl[UE_id];
ue_sched_ctl->max_rbs_allowed_slice_uplink[CC_id][slice_idx] = ue_sched_ctl->max_rbs_allowed_slice_uplink[CC_id][slice_idx] =
nb_rbs_allowed_slice(sli->ul[slice_idx].pct, N_RB_UL); nb_rbs_allowed_slice(sli->ul[slice_idx].pct, N_RB_UL);
...@@ -1740,7 +1751,7 @@ void ulsch_scheduler_pre_processor(module_id_t module_idP, ...@@ -1740,7 +1751,7 @@ void ulsch_scheduler_pre_processor(module_id_t module_idP,
// This is the actual CC_id in the list // This is the actual CC_id in the list
CC_id = UE_list->ordered_ULCCids[n][UE_id]; CC_id = UE_list->ordered_ULCCids[n][UE_id];
UE_template = &UE_list->UE_template[CC_id][UE_id]; UE_template = &UE_list->UE_template[CC_id][UE_id];
harq_pid = subframe2harqpid(&RC.mac[module_idP]->common_channels[CC_id], harq_pid = subframe2harqpid(&eNB->common_channels[CC_id],
frameP, sched_subframeP); frameP, sched_subframeP);
// mac_xface->get_ue_active_harq_pid(module_idP,CC_id,rnti,frameP,subframeP,&harq_pid,&round,openair_harq_UL); // mac_xface->get_ue_active_harq_pid(module_idP,CC_id,rnti,frameP,subframeP,&harq_pid,&round,openair_harq_UL);
...@@ -1772,7 +1783,7 @@ void ulsch_scheduler_pre_processor(module_id_t module_idP, ...@@ -1772,7 +1783,7 @@ void ulsch_scheduler_pre_processor(module_id_t module_idP,
// This is the actual CC_id in the list // This is the actual CC_id in the list
CC_id = UE_list->ordered_ULCCids[n][UE_id]; CC_id = UE_list->ordered_ULCCids[n][UE_id];
UE_template = &UE_list->UE_template[CC_id][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]; 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); 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]; total_remaining_rbs[CC_id] = available_rbs - total_allocated_rbs[CC_id];
...@@ -1993,8 +2004,19 @@ sort_ue_ul(module_id_t module_idP, ...@@ -1993,8 +2004,19 @@ sort_ue_ul(module_id_t module_idP,
int list_size = 0; int list_size = 0;
struct sort_ue_ul_params params = { module_idP, frameP, subframeP }; struct sort_ue_ul_params params = { module_idP, frameP, subframeP };
UE_list_t *UE_list = &RC.mac[module_idP]->UE_list; UE_list_t *UE_list = &RC.mac[module_idP]->UE_list;
UE_sched_ctrl *UE_scheduling_control = NULL;
for (i = 0; i < MAX_MOBILES_PER_ENB; i++) { for (i = 0; i < MAX_MOBILES_PER_ENB; i++) {
UE_scheduling_control = &(UE_list->UE_sched_ctrl[i]);
if (UE_scheduling_control->cdrx_configured == TRUE) {
if ((UE_scheduling_control->bypass_cdrx == FALSE) && (UE_scheduling_control->in_active_time == FALSE)) {
continue;
}
}
rntiTable[i] = UE_RNTI(module_idP, i); rntiTable[i] = UE_RNTI(module_idP, i);
// Valid element and is not the actual CC_id in the list // Valid element and is not the actual CC_id in the list
if (UE_list->active[i] == TRUE && if (UE_list->active[i] == TRUE &&
......
...@@ -38,7 +38,7 @@ ...@@ -38,7 +38,7 @@
#include "common/ran_context.h" #include "common/ran_context.h"
#if defined(ENABLE_ITTI) #if defined(ENABLE_ITTI)
# include "intertask_interface.h" #include "intertask_interface.h"
#endif #endif
//#define RRC_DATA_REQ_DEBUG //#define RRC_DATA_REQ_DEBUG
...@@ -49,21 +49,21 @@ extern RAN_CONTEXT_t RC; ...@@ -49,21 +49,21 @@ extern RAN_CONTEXT_t RC;
//------------------------------------------------------------------------------ //------------------------------------------------------------------------------
uint8_t uint8_t
rrc_data_req( rrc_data_req(
const protocol_ctxt_t* const ctxt_pP, const protocol_ctxt_t *const ctxt_pP,
const rb_id_t rb_idP, const rb_id_t rb_idP,
const mui_t muiP, const mui_t muiP,
const confirm_t confirmP, const confirm_t confirmP,
const sdu_size_t sdu_sizeP, const sdu_size_t sdu_sizeP,
uint8_t* const buffer_pP, uint8_t *const buffer_pP,
const pdcp_transmission_mode_t modeP const pdcp_transmission_mode_t modeP
) )
//------------------------------------------------------------------------------ //------------------------------------------------------------------------------
{ {
if(sdu_sizeP == 255) if(sdu_sizeP == 255) {
{
LOG_I(RRC,"sdu_sizeP == 255"); LOG_I(RRC,"sdu_sizeP == 255");
return FALSE; return FALSE;
} }
MSC_LOG_TX_MESSAGE( MSC_LOG_TX_MESSAGE(
ctxt_pP->enb_flag ? MSC_RRC_ENB : MSC_RRC_UE, ctxt_pP->enb_flag ? MSC_RRC_ENB : MSC_RRC_UE,
ctxt_pP->enb_flag ? MSC_PDCP_ENB : MSC_PDCP_UE, ctxt_pP->enb_flag ? MSC_PDCP_ENB : MSC_PDCP_UE,
...@@ -74,20 +74,16 @@ rrc_data_req( ...@@ -74,20 +74,16 @@ rrc_data_req(
ctxt_pP->rnti, ctxt_pP->rnti,
muiP, muiP,
sdu_sizeP); sdu_sizeP);
#if defined(ENABLE_ITTI) #if defined(ENABLE_ITTI)
{ {
MessageDef *message_p; MessageDef *message_p;
// Uses a new buffer to avoid issue with PDCP buffer content that could be changed by PDCP (asynchronous message handling). // Uses a new buffer to avoid issue with PDCP buffer content that could be changed by PDCP (asynchronous message handling).
uint8_t *message_buffer; uint8_t *message_buffer;
message_buffer = itti_malloc ( message_buffer = itti_malloc (
ctxt_pP->enb_flag ? TASK_RRC_ENB : TASK_RRC_UE, ctxt_pP->enb_flag ? TASK_RRC_ENB : TASK_RRC_UE,
ctxt_pP->enb_flag ? TASK_PDCP_ENB : TASK_PDCP_UE, ctxt_pP->enb_flag ? TASK_PDCP_ENB : TASK_PDCP_UE,
sdu_sizeP); sdu_sizeP);
memcpy (message_buffer, buffer_pP, sdu_sizeP); memcpy (message_buffer, buffer_pP, sdu_sizeP);
message_p = itti_alloc_new_message (ctxt_pP->enb_flag ? TASK_RRC_ENB : TASK_RRC_UE, RRC_DCCH_DATA_REQ); message_p = itti_alloc_new_message (ctxt_pP->enb_flag ? TASK_RRC_ENB : TASK_RRC_UE, RRC_DCCH_DATA_REQ);
RRC_DCCH_DATA_REQ (message_p).frame = ctxt_pP->frame; RRC_DCCH_DATA_REQ (message_p).frame = ctxt_pP->frame;
RRC_DCCH_DATA_REQ (message_p).enb_flag = ctxt_pP->enb_flag; RRC_DCCH_DATA_REQ (message_p).enb_flag = ctxt_pP->enb_flag;
...@@ -102,7 +98,6 @@ rrc_data_req( ...@@ -102,7 +98,6 @@ rrc_data_req(
RRC_DCCH_DATA_REQ (message_p).module_id = ctxt_pP->module_id; RRC_DCCH_DATA_REQ (message_p).module_id = ctxt_pP->module_id;
RRC_DCCH_DATA_REQ (message_p).rnti = ctxt_pP->rnti; RRC_DCCH_DATA_REQ (message_p).rnti = ctxt_pP->rnti;
RRC_DCCH_DATA_REQ (message_p).eNB_index = ctxt_pP->eNB_index; RRC_DCCH_DATA_REQ (message_p).eNB_index = ctxt_pP->eNB_index;
itti_send_msg_to_task ( itti_send_msg_to_task (
ctxt_pP->enb_flag ? TASK_PDCP_ENB : TASK_PDCP_UE, ctxt_pP->enb_flag ? TASK_PDCP_ENB : TASK_PDCP_UE,
ctxt_pP->instance, ctxt_pP->instance,
...@@ -117,7 +112,6 @@ rrc_data_req( ...@@ -117,7 +112,6 @@ rrc_data_req(
#endif #endif
return TRUE; // TODO should be changed to a CNF message later, currently RRC lite does not used the returned value anyway. return TRUE; // TODO should be changed to a CNF message later, currently RRC lite does not used the returned value anyway.
} }
#else #else
return pdcp_data_req ( return pdcp_data_req (
...@@ -135,10 +129,10 @@ rrc_data_req( ...@@ -135,10 +129,10 @@ rrc_data_req(
//------------------------------------------------------------------------------ //------------------------------------------------------------------------------
void void
rrc_data_ind( rrc_data_ind(
const protocol_ctxt_t* const ctxt_pP, const protocol_ctxt_t *const ctxt_pP,
const rb_id_t Srb_id, const rb_id_t Srb_id,
const sdu_size_t sdu_sizeP, const sdu_size_t sdu_sizeP,
const uint8_t* const buffer_pP const uint8_t *const buffer_pP
) )
//------------------------------------------------------------------------------ //------------------------------------------------------------------------------
{ {
...@@ -162,10 +156,8 @@ rrc_data_ind( ...@@ -162,10 +156,8 @@ rrc_data_ind(
MessageDef *message_p; MessageDef *message_p;
// Uses a new buffer to avoid issue with PDCP buffer content that could be changed by PDCP (asynchronous message handling). // Uses a new buffer to avoid issue with PDCP buffer content that could be changed by PDCP (asynchronous message handling).
uint8_t *message_buffer; uint8_t *message_buffer;
message_buffer = itti_malloc (ctxt_pP->enb_flag ? TASK_PDCP_ENB : TASK_PDCP_UE, ctxt_pP->enb_flag ? TASK_RRC_ENB : TASK_RRC_UE, sdu_sizeP); message_buffer = itti_malloc (ctxt_pP->enb_flag ? TASK_PDCP_ENB : TASK_PDCP_UE, ctxt_pP->enb_flag ? TASK_RRC_ENB : TASK_RRC_UE, sdu_sizeP);
memcpy (message_buffer, buffer_pP, sdu_sizeP); memcpy (message_buffer, buffer_pP, sdu_sizeP);
message_p = itti_alloc_new_message (ctxt_pP->enb_flag ? TASK_PDCP_ENB : TASK_PDCP_UE, RRC_DCCH_DATA_IND); message_p = itti_alloc_new_message (ctxt_pP->enb_flag ? TASK_PDCP_ENB : TASK_PDCP_UE, RRC_DCCH_DATA_IND);
RRC_DCCH_DATA_IND (message_p).frame = ctxt_pP->frame; RRC_DCCH_DATA_IND (message_p).frame = ctxt_pP->frame;
RRC_DCCH_DATA_IND (message_p).dcch_index = DCCH_index; RRC_DCCH_DATA_IND (message_p).dcch_index = DCCH_index;
...@@ -174,16 +166,13 @@ rrc_data_ind( ...@@ -174,16 +166,13 @@ rrc_data_ind(
RRC_DCCH_DATA_IND (message_p).rnti = ctxt_pP->rnti; RRC_DCCH_DATA_IND (message_p).rnti = ctxt_pP->rnti;
RRC_DCCH_DATA_IND (message_p).module_id = ctxt_pP->module_id; RRC_DCCH_DATA_IND (message_p).module_id = ctxt_pP->module_id;
RRC_DCCH_DATA_IND (message_p).eNB_index = ctxt_pP->eNB_index; RRC_DCCH_DATA_IND (message_p).eNB_index = ctxt_pP->eNB_index;
itti_send_msg_to_task (ctxt_pP->enb_flag ? TASK_RRC_ENB : TASK_RRC_UE, ctxt_pP->instance, message_p); itti_send_msg_to_task (ctxt_pP->enb_flag ? TASK_RRC_ENB : TASK_RRC_UE, ctxt_pP->instance, message_p);
} }
#else #else
rrc_eNB_decode_dcch(
rrc_eNB_decode_dcch( ctxt_pP,
ctxt_pP, DCCH_index,
DCCH_index, buffer_pP,
buffer_pP, sdu_sizeP);
sdu_sizeP);
#endif #endif
} }
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
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