Merge branch 'develop' into feature-merge-merge-f68

This commit is contained in:
Robert Schmidt
2018-02-09 17:10:41 +01:00
36 changed files with 7192 additions and 8410 deletions
@@ -1,4 +1,4 @@
Active_eNBs = ( "eNB_Eurecom_LTEBox"); Active_eNBs = ( "eNB-Eurecom-LTEBox");
# Asn1_verbosity, choice in: none, info, annoying # Asn1_verbosity, choice in: none, info, annoying
Asn1_verbosity = "none"; Asn1_verbosity = "none";
@@ -10,7 +10,7 @@ eNBs =
cell_type = "CELL_MACRO_ENB"; cell_type = "CELL_MACRO_ENB";
eNB_name = "eNB_Eurecom_LTEBox"; eNB_name = "eNB-Eurecom-LTEBox";
// Tracking area code, 0x0000 and 0xfffe are reserved values // Tracking area code, 0x0000 and 0xfffe are reserved values
tracking_area_code = "1"; tracking_area_code = "1";
@@ -1,4 +1,4 @@
Active_eNBs = ( "eNB_Eurecom_LTEBox"); Active_eNBs = ( "eNB-Eurecom-LTEBox");
# Asn1_verbosity, choice in: none, info, annoying # Asn1_verbosity, choice in: none, info, annoying
Asn1_verbosity = "none"; Asn1_verbosity = "none";
@@ -10,7 +10,7 @@ eNBs =
cell_type = "CELL_MACRO_ENB"; cell_type = "CELL_MACRO_ENB";
eNB_name = "eNB_Eurecom_LTEBox"; eNB_name = "eNB-Eurecom-LTEBox";
// Tracking area code, 0x0000 and 0xfffe are reserved values // Tracking area code, 0x0000 and 0xfffe are reserved values
tracking_area_code = "1"; tracking_area_code = "1";
@@ -1,4 +1,4 @@
Active_eNBs = ( "eNB_Eurecom_LTEBox"); Active_eNBs = ( "eNB-Eurecom-LTEBox");
# Asn1_verbosity, choice in: none, info, annoying # Asn1_verbosity, choice in: none, info, annoying
Asn1_verbosity = "none"; Asn1_verbosity = "none";
@@ -10,7 +10,7 @@ eNBs =
cell_type = "CELL_MACRO_ENB"; cell_type = "CELL_MACRO_ENB";
eNB_name = "eNB_Eurecom_LTEBox"; eNB_name = "eNB-Eurecom-LTEBox";
// Tracking area code, 0x0000 and 0xfffe are reserved values // Tracking area code, 0x0000 and 0xfffe are reserved values
tracking_area_code = "1"; tracking_area_code = "1";
@@ -1,4 +1,4 @@
Active_eNBs = ( "eNB_Eurecom_LTEBox"); Active_eNBs = ( "eNB-Eurecom-LTEBox");
# Asn1_verbosity, choice in: none, info, annoying # Asn1_verbosity, choice in: none, info, annoying
Asn1_verbosity = "none"; Asn1_verbosity = "none";
@@ -10,7 +10,7 @@ eNBs =
cell_type = "CELL_MACRO_ENB"; cell_type = "CELL_MACRO_ENB";
eNB_name = "eNB_Eurecom_LTEBox"; eNB_name = "eNB-Eurecom-LTEBox";
// Tracking area code, 0x0000 and 0xfffe are reserved values // Tracking area code, 0x0000 and 0xfffe are reserved values
tracking_area_code = "1"; tracking_area_code = "1";
@@ -1,4 +1,4 @@
Active_eNBs = ( "eNB_Eurecom_LTEBox"); Active_eNBs = ( "eNB-Eurecom-LTEBox");
# Asn1_verbosity, choice in: none, info, annoying # Asn1_verbosity, choice in: none, info, annoying
Asn1_verbosity = "none"; Asn1_verbosity = "none";
@@ -10,7 +10,7 @@ eNBs =
cell_type = "CELL_MACRO_ENB"; cell_type = "CELL_MACRO_ENB";
eNB_name = "eNB_Eurecom_LTEBox"; eNB_name = "eNB-Eurecom-LTEBox";
// Tracking area code, 0x0000 and 0xfffe are reserved values // Tracking area code, 0x0000 and 0xfffe are reserved values
tracking_area_code = "1"; tracking_area_code = "1";
@@ -1,4 +1,4 @@
Active_eNBs = ( "eNB_Eurecom_LTEBox"); Active_eNBs = ( "eNB-Eurecom-LTEBox");
# Asn1_verbosity, choice in: none, info, annoying # Asn1_verbosity, choice in: none, info, annoying
Asn1_verbosity = "none"; Asn1_verbosity = "none";
@@ -10,7 +10,7 @@ eNBs =
cell_type = "CELL_MACRO_ENB"; cell_type = "CELL_MACRO_ENB";
eNB_name = "eNB_Eurecom_LTEBox"; eNB_name = "eNB-Eurecom-LTEBox";
// Tracking area code, 0x0000 and 0xfffe are reserved values // Tracking area code, 0x0000 and 0xfffe are reserved values
tracking_area_code = "1"; tracking_area_code = "1";
@@ -1,4 +1,4 @@
Active_eNBs = ( "eNB_Eurecom_LTEBox"); Active_eNBs = ( "eNB-Eurecom-LTEBox");
# Asn1_verbosity, choice in: none, info, annoying # Asn1_verbosity, choice in: none, info, annoying
Asn1_verbosity = "none"; Asn1_verbosity = "none";
@@ -10,7 +10,7 @@ eNBs =
cell_type = "CELL_MACRO_ENB"; cell_type = "CELL_MACRO_ENB";
eNB_name = "eNB_Eurecom_LTEBox"; eNB_name = "eNB-Eurecom-LTEBox";
// Tracking area code, 0x0000 and 0xfffe are reserved values // Tracking area code, 0x0000 and 0xfffe are reserved values
tracking_area_code = "1"; tracking_area_code = "1";
@@ -1,4 +1,4 @@
Active_eNBs = ( "eNB_Eurecom_LTEBox"); Active_eNBs = ( "eNB-Eurecom-LTEBox");
# Asn1_verbosity, choice in: none, info, annoying # Asn1_verbosity, choice in: none, info, annoying
Asn1_verbosity = "none"; Asn1_verbosity = "none";
@@ -10,7 +10,7 @@ eNBs =
cell_type = "CELL_MACRO_ENB"; cell_type = "CELL_MACRO_ENB";
eNB_name = "eNB_Eurecom_LTEBox"; eNB_name = "eNB-Eurecom-LTEBox";
// Tracking area code, 0x0000 and 0xfffe are reserved values // Tracking area code, 0x0000 and 0xfffe are reserved values
tracking_area_code = "1"; tracking_area_code = "1";
@@ -1,4 +1,4 @@
Active_eNBs = ( "eNB_Eurecom_LTEBox"); Active_eNBs = ( "eNB-Eurecom-LTEBox");
# Asn1_verbosity, choice in: none, info, annoying # Asn1_verbosity, choice in: none, info, annoying
Asn1_verbosity = "none"; Asn1_verbosity = "none";
@@ -10,7 +10,7 @@ eNBs =
cell_type = "CELL_MACRO_ENB"; cell_type = "CELL_MACRO_ENB";
eNB_name = "eNB_Eurecom_LTEBox"; eNB_name = "eNB-Eurecom-LTEBox";
// Tracking area code, 0x0000 and 0xfffe are reserved values // Tracking area code, 0x0000 and 0xfffe are reserved values
tracking_area_code = "1"; tracking_area_code = "1";
@@ -1,4 +1,4 @@
Active_eNBs = ( "eNB_Eurecom_LTEBox"); Active_eNBs = ( "eNB-Eurecom-LTEBox");
# Asn1_verbosity, choice in: none, info, annoying # Asn1_verbosity, choice in: none, info, annoying
Asn1_verbosity = "none"; Asn1_verbosity = "none";
@@ -10,7 +10,7 @@ eNBs =
cell_type = "CELL_MACRO_ENB"; cell_type = "CELL_MACRO_ENB";
eNB_name = "eNB_Eurecom_LTEBox"; eNB_name = "eNB-Eurecom-LTEBox";
// Tracking area code, 0x0000 and 0xfffe are reserved values // Tracking area code, 0x0000 and 0xfffe are reserved values
tracking_area_code = "1"; tracking_area_code = "1";
@@ -1,4 +1,4 @@
Active_eNBs = ( "eNB_Eurecom_LTEBox"); Active_eNBs = ( "eNB-Eurecom-LTEBox");
# Asn1_verbosity, choice in: none, info, annoying # Asn1_verbosity, choice in: none, info, annoying
Asn1_verbosity = "none"; Asn1_verbosity = "none";
@@ -10,7 +10,7 @@ eNBs =
cell_type = "CELL_MACRO_ENB"; cell_type = "CELL_MACRO_ENB";
eNB_name = "eNB_Eurecom_LTEBox"; eNB_name = "eNB-Eurecom-LTEBox";
// Tracking area code, 0x0000 and 0xfffe are reserved values // Tracking area code, 0x0000 and 0xfffe are reserved values
tracking_area_code = "1"; tracking_area_code = "1";
@@ -1,4 +1,4 @@
Active_eNBs = ( "eNB_Eurecom_LTEBox"); Active_eNBs = ( "eNB-Eurecom-LTEBox");
# Asn1_verbosity, choice in: none, info, annoying # Asn1_verbosity, choice in: none, info, annoying
Asn1_verbosity = "none"; Asn1_verbosity = "none";
@@ -10,7 +10,7 @@ eNBs =
cell_type = "CELL_MACRO_ENB"; cell_type = "CELL_MACRO_ENB";
eNB_name = "eNB_Eurecom_LTEBox"; eNB_name = "eNB-Eurecom-LTEBox";
// Tracking area code, 0x0000 and 0xfffe are reserved values // Tracking area code, 0x0000 and 0xfffe are reserved values
tracking_area_code = "1"; tracking_area_code = "1";
+8 -4
View File
@@ -1089,6 +1089,10 @@ int32_t generate_prach( PHY_VARS_UE *ue, uint8_t eNB_id, uint8_t subframe, uint1
} }
//__m128i mmtmpX0,mmtmpX1,mmtmpX2,mmtmpX3; //__m128i mmtmpX0,mmtmpX1,mmtmpX2,mmtmpX3;
#ifndef Rel14
#define rx_prach0 rx_prach
#endif
void rx_prach0(PHY_VARS_eNB *eNB, void rx_prach0(PHY_VARS_eNB *eNB,
RU_t *ru, RU_t *ru,
uint16_t *max_preamble, uint16_t *max_preamble,
@@ -1764,9 +1768,8 @@ void rx_prach0(PHY_VARS_eNB *eNB,
#ifndef Rel14 #ifdef Rel14
#define rx_prach rx_prach0
#else
void rx_prach(PHY_VARS_eNB *eNB, void rx_prach(PHY_VARS_eNB *eNB,
RU_t *ru, RU_t *ru,
uint16_t *max_preamble, uint16_t *max_preamble,
@@ -1806,7 +1809,8 @@ void rx_prach(PHY_VARS_eNB *eNB,
} }
} }
} }
#endif
#endif /* Rel14 */
void init_prach_tables(int N_ZC) void init_prach_tables(int N_ZC)
{ {
+3 -4
View File
@@ -2157,11 +2157,10 @@ void rx_prach(PHY_VARS_eNB *phy_vars_eNB,RU_t *ru,
uint16_t *max_preamble, uint16_t *max_preamble,
uint16_t *max_preamble_energy, uint16_t *max_preamble_energy,
uint16_t *max_preamble_delay, uint16_t *max_preamble_delay,
#ifdef Rel14
uint16_t Nf, uint8_t tdd_mapindex,
uint8_t br_flag
#else
uint16_t Nf, uint8_t tdd_mapindex uint16_t Nf, uint8_t tdd_mapindex
#ifdef Rel14
,
uint8_t br_flag
#endif #endif
); );
/*! /*!
+2
View File
@@ -750,8 +750,10 @@ typedef struct RU_t_s{
int (*wakeup_rxtx)(struct PHY_VARS_eNB_s *eNB, struct RU_t_s *ru); int (*wakeup_rxtx)(struct PHY_VARS_eNB_s *eNB, struct RU_t_s *ru);
/// function pointer to wakeup routine in lte-enb. /// function pointer to wakeup routine in lte-enb.
void (*wakeup_prach_eNB)(struct PHY_VARS_eNB_s *eNB,struct RU_t_s *ru,int frame,int subframe); void (*wakeup_prach_eNB)(struct PHY_VARS_eNB_s *eNB,struct RU_t_s *ru,int frame,int subframe);
#ifdef Rel14
/// function pointer to wakeup routine in lte-enb. /// function pointer to wakeup routine in lte-enb.
void (*wakeup_prach_eNB_br)(struct PHY_VARS_eNB_s *eNB,struct RU_t_s *ru,int frame,int subframe); void (*wakeup_prach_eNB_br)(struct PHY_VARS_eNB_s *eNB,struct RU_t_s *ru,int frame,int subframe);
#endif
/// function pointer to eNB entry routine /// function pointer to eNB entry routine
void (*eNB_top)(struct PHY_VARS_eNB_s *eNB, int frame_rx, int subframe_rx, char *string); void (*eNB_top)(struct PHY_VARS_eNB_s *eNB, int frame_rx, int subframe_rx, char *string);
/// Timing statistics /// Timing statistics
+2 -2
View File
@@ -144,8 +144,6 @@ typedef struct {
uint8_t prach_hopping_offset[4]; uint8_t prach_hopping_offset[4];
} PRACH_eMTC_CONFIG_INFO; } PRACH_eMTC_CONFIG_INFO;
#endif
/// PRACH-ConfigSIB or PRACH-Config from 36.331 RRC spec /// PRACH-ConfigSIB or PRACH-Config from 36.331 RRC spec
typedef struct { typedef struct {
/// Parameter: RACH_ROOT_SEQUENCE, see TS 36.211 (5.7.1). \vr{[0..837]} /// Parameter: RACH_ROOT_SEQUENCE, see TS 36.211 (5.7.1). \vr{[0..837]}
@@ -158,6 +156,8 @@ typedef struct {
#endif #endif
} PRACH_eMTC_CONFIG_COMMON; } PRACH_eMTC_CONFIG_COMMON;
#endif
/// Enumeration for parameter \f$N_\text{ANRep}\f$ \ref PUCCH_CONFIG_DEDICATED::repetitionFactor. /// Enumeration for parameter \f$N_\text{ANRep}\f$ \ref PUCCH_CONFIG_DEDICATED::repetitionFactor.
typedef enum { typedef enum {
n2=0, n2=0,
+12 -1
View File
@@ -63,6 +63,7 @@ void handle_nfapi_dci_dl_pdu(PHY_VARS_eNB *eNB,
} }
#ifdef Rel14 #ifdef Rel14
void handle_nfapi_mpdcch_pdu(PHY_VARS_eNB *eNB, void handle_nfapi_mpdcch_pdu(PHY_VARS_eNB *eNB,
eNB_rxtx_proc_t *proc, eNB_rxtx_proc_t *proc,
nfapi_dl_config_request_pdu_t *dl_config_pdu) nfapi_dl_config_request_pdu_t *dl_config_pdu)
@@ -76,6 +77,7 @@ void handle_nfapi_mpdcch_pdu(PHY_VARS_eNB *eNB,
// copy dci configuration into eNB structure // copy dci configuration into eNB structure
fill_mdci_and_dlsch(eNB,proc,&mpdcch_vars->mdci_alloc[mpdcch_vars->num_dci],pdu); fill_mdci_and_dlsch(eNB,proc,&mpdcch_vars->mdci_alloc[mpdcch_vars->num_dci],pdu);
} }
#endif #endif
void handle_nfapi_hi_dci0_dci_pdu(PHY_VARS_eNB *eNB,int frame,int subframe,eNB_rxtx_proc_t *proc, void handle_nfapi_hi_dci0_dci_pdu(PHY_VARS_eNB *eNB,int frame,int subframe,eNB_rxtx_proc_t *proc,
@@ -265,14 +267,21 @@ void handle_nfapi_dlsch_pdu(PHY_VARS_eNB *eNB,int frame,int subframe,eNB_rxtx_pr
dlsch0_harq->codeword = 0; dlsch0_harq->codeword = 0;
dlsch0_harq->pdsch_start = rel10->pdsch_start; dlsch0_harq->pdsch_start = rel10->pdsch_start;
} }
#endif
dlsch0->i0 = rel13->initial_transmission_sf_io; dlsch0->i0 = rel13->initial_transmission_sf_io;
#endif
#ifdef Rel14
LOG_D(PHY,"dlsch->i0:%04x dlsch0_harq[pdsch_start:%d nb_rb:%d vrb_type:%d rvidx:%d Nl:%d mimo_mode:%d dl_power_off:%d round:%d status:%d TBS:%d Qm:%d codeword:%d rb_alloc:%d] rel8[length:%d]\n", LOG_D(PHY,"dlsch->i0:%04x dlsch0_harq[pdsch_start:%d nb_rb:%d vrb_type:%d rvidx:%d Nl:%d mimo_mode:%d dl_power_off:%d round:%d status:%d TBS:%d Qm:%d codeword:%d rb_alloc:%d] rel8[length:%d]\n",
dlsch0->i0, dlsch0->i0,
dlsch0_harq->pdsch_start, dlsch0_harq->nb_rb, dlsch0_harq->vrb_type, dlsch0_harq->rvidx, dlsch0_harq->Nl, dlsch0_harq->mimo_mode, dlsch0_harq->dl_power_off, dlsch0_harq->round, dlsch0_harq->status, dlsch0_harq->TBS, dlsch0_harq->Qm, dlsch0_harq->codeword, dlsch0_harq->rb_alloc[0], dlsch0_harq->pdsch_start, dlsch0_harq->nb_rb, dlsch0_harq->vrb_type, dlsch0_harq->rvidx, dlsch0_harq->Nl, dlsch0_harq->mimo_mode, dlsch0_harq->dl_power_off, dlsch0_harq->round, dlsch0_harq->status, dlsch0_harq->TBS, dlsch0_harq->Qm, dlsch0_harq->codeword, dlsch0_harq->rb_alloc[0],
rel8->length rel8->length
); );
#else
LOG_D(PHY,"dlsch0_harq[pdsch_start:%d nb_rb:%d vrb_type:%d rvidx:%d Nl:%d mimo_mode:%d dl_power_off:%d round:%d status:%d TBS:%d Qm:%d codeword:%d rb_alloc:%d] rel8[length:%d]\n",
dlsch0_harq->pdsch_start, dlsch0_harq->nb_rb, dlsch0_harq->vrb_type, dlsch0_harq->rvidx, dlsch0_harq->Nl, dlsch0_harq->mimo_mode, dlsch0_harq->dl_power_off, dlsch0_harq->round, dlsch0_harq->status, dlsch0_harq->TBS, dlsch0_harq->Qm, dlsch0_harq->codeword, dlsch0_harq->rb_alloc[0],
rel8->length
);
#endif
} }
uint16_t to_beta_offset_harqack[16]={16,20,25,32,40,50,64,80,101,127,160,248,400,640,1008,8}; uint16_t to_beta_offset_harqack[16]={16,20,25,32,40,50,64,80,101,127,160,248,400,640,1008,8};
@@ -764,8 +773,10 @@ void schedule_response(Sched_Rsp_t *Sched_INFO)
break; break;
#ifdef Rel14 #ifdef Rel14
case NFAPI_DL_CONFIG_MPDCCH_PDU_TYPE: case NFAPI_DL_CONFIG_MPDCCH_PDU_TYPE:
#ifdef Rel14
handle_nfapi_mpdcch_pdu(eNB,proc,dl_config_pdu); handle_nfapi_mpdcch_pdu(eNB,proc,dl_config_pdu);
eNB->mpdcch_vars[subframe&1].num_dci++; eNB->mpdcch_vars[subframe&1].num_dci++;
#endif
break; break;
#endif #endif
} }
+2 -1
View File
@@ -52,8 +52,9 @@
extern uint32_t nfapi_mode; extern uint32_t nfapi_mode;
void prach_procedures(PHY_VARS_eNB *eNB, void prach_procedures(PHY_VARS_eNB *eNB
#ifdef Rel14 #ifdef Rel14
,
int br_flag int br_flag
#endif #endif
) { ) {
+14 -10
View File
@@ -193,8 +193,12 @@ void config_mib(int Mod_idP,
int NcpP, int NcpP,
int p_eNBP, int p_eNBP,
uint32_t dl_CarrierFreqP, uint32_t dl_CarrierFreqP,
uint32_t ul_CarrierFreqP, uint32_t ul_CarrierFreqP
uint32_t pbch_repetitionP) { #ifdef Rel14
,
uint32_t pbch_repetitionP
#endif
) {
nfapi_config_request_t *cfg = &RC.mac[Mod_idP]->config[CC_idP]; nfapi_config_request_t *cfg = &RC.mac[Mod_idP]->config[CC_idP];
@@ -267,10 +271,10 @@ LOG_E(PHY,"%s() dl_BandwidthP:%d\n", __FUNCTION__, dl_BandwidthP);
cfg->emtc_config.pbch_repetitions_enable_r13.tl.tag = NFAPI_EMTC_CONFIG_PBCH_REPETITIONS_ENABLE_R13_TAG; cfg->emtc_config.pbch_repetitions_enable_r13.tl.tag = NFAPI_EMTC_CONFIG_PBCH_REPETITIONS_ENABLE_R13_TAG;
cfg->num_tlv++; cfg->num_tlv++;
#endif #endif
LOG_I(MAC, LOG_I(MAC,
"%s() NFAPI_CONFIG_REQUEST(num_tlv:%u) DL_BW:%u UL_BW:%u Ncp %d,p_eNB %d,earfcn %d,band %d,phich_resource %u phich_duration %u phich_power_offset %u PSS %d SSS %d PCI %d" "%s() NFAPI_CONFIG_REQUEST(num_tlv:%u) DL_BW:%u UL_BW:%u Ncp %d,p_eNB %d,earfcn %d,band %d,phich_resource %u phich_duration %u phich_power_offset %u PSS %d SSS %d PCI %d"
#ifdef Rel14 #ifdef Rel14
" PBCH repetition %d" " PBCH repetition %d"
#endif #endif
"\n" "\n"
@@ -296,6 +300,7 @@ LOG_E(PHY,"%s() dl_BandwidthP:%d\n", __FUNCTION__, dl_BandwidthP);
void config_sib1(int Mod_idP, int CC_idP, TDD_Config_t * tdd_ConfigP) void config_sib1(int Mod_idP, int CC_idP, TDD_Config_t * tdd_ConfigP)
{ {
nfapi_config_request_t *cfg = &RC.mac[Mod_idP]->config[CC_idP]; nfapi_config_request_t *cfg = &RC.mac[Mod_idP]->config[CC_idP];
if (tdd_ConfigP) { //TDD if (tdd_ConfigP) { //TDD
@@ -396,16 +401,13 @@ config_sib2(int Mod_idP,
cfg->pucch_config.n1_pucch_an.tl.tag = NFAPI_PUCCH_CONFIG_N1_PUCCH_AN_TAG; cfg->pucch_config.n1_pucch_an.tl.tag = NFAPI_PUCCH_CONFIG_N1_PUCCH_AN_TAG;
cfg->num_tlv++; cfg->num_tlv++;
if (radioResourceConfigCommonP->pusch_ConfigCommon.ul_ReferenceSignalsPUSCH.groupHoppingEnabled == true) if (radioResourceConfigCommonP->pusch_ConfigCommon.ul_ReferenceSignalsPUSCH.groupHoppingEnabled == true) {
{
cfg->uplink_reference_signal_config.uplink_rs_hopping.value = 1; cfg->uplink_reference_signal_config.uplink_rs_hopping.value = 1;
} }
else if (radioResourceConfigCommonP->pusch_ConfigCommon.ul_ReferenceSignalsPUSCH.sequenceHoppingEnabled == true) else if (radioResourceConfigCommonP->pusch_ConfigCommon.ul_ReferenceSignalsPUSCH.sequenceHoppingEnabled == true) {
{
cfg->uplink_reference_signal_config.uplink_rs_hopping.value = 2; cfg->uplink_reference_signal_config.uplink_rs_hopping.value = 2;
} }
else // No hopping else {
{
cfg->uplink_reference_signal_config.uplink_rs_hopping.value = 0; cfg->uplink_reference_signal_config.uplink_rs_hopping.value = 0;
} }
cfg->uplink_reference_signal_config.uplink_rs_hopping.tl.tag = NFAPI_UPLINK_REFERENCE_SIGNAL_CONFIG_UPLINK_RS_HOPPING_TAG; cfg->uplink_reference_signal_config.uplink_rs_hopping.tl.tag = NFAPI_UPLINK_REFERENCE_SIGNAL_CONFIG_UPLINK_RS_HOPPING_TAG;
@@ -704,7 +706,6 @@ rrc_mac_config_req_eNB(module_id_t Mod_idP,
#endif #endif
); );
mac_init_cell_params(Mod_idP,CC_idP); mac_init_cell_params(Mod_idP,CC_idP);
if (schedulingInfoList!=NULL) { if (schedulingInfoList!=NULL) {
@@ -777,6 +778,7 @@ rrc_mac_config_req_eNB(module_id_t Mod_idP,
NULL, ul_Bandwidth, additionalSpectrumEmission, NULL, ul_Bandwidth, additionalSpectrumEmission,
mbsfn_SubframeConfigList); mbsfn_SubframeConfigList);
} }
} // mib != NULL } // mib != NULL
@@ -926,3 +928,5 @@ rrc_mac_config_req_eNB(module_id_t Mod_idP,
return(0); return(0);
} }
+6 -6
View File
@@ -665,7 +665,7 @@ typedef struct {
/// mcs from last UL scheduling /// mcs from last UL scheduling
uint8_t mcs_UL[8]; uint8_t mcs_UL[8];
/// TBS from last UL scheduling /// TBS from last UL scheduling
uint8_t TBS_UL[8]; int TBS_UL[8];
/// Flag to indicate UL has been scheduled at least once /// Flag to indicate UL has been scheduled at least once
boolean_t ul_active; boolean_t ul_active;
/// Flag to indicate UE has been configured (ACK from RRCConnectionSetup received) /// Flag to indicate UE has been configured (ACK from RRCConnectionSetup received)
@@ -720,9 +720,6 @@ typedef struct {
// Logical channel info for link with RLC // Logical channel info for link with RLC
/// Last received UE BSR info for each logical channel group id
uint8_t bsr_info[MAX_NUM_LCGID];
/// LCGID mapping /// LCGID mapping
long lcgidmap[11]; long lcgidmap[11];
@@ -749,8 +746,6 @@ typedef struct {
/// size of remaining size to send for the downlink head SDU /// size of remaining size to send for the downlink head SDU
uint32_t dl_buffer_head_sdu_remaining_size_to_send[MAX_NUM_LCID]; uint32_t dl_buffer_head_sdu_remaining_size_to_send[MAX_NUM_LCID];
/// total uplink buffer size
uint32_t ul_total_buffer;
/// uplink buffer creation time for each LCID /// uplink buffer creation time for each LCID
uint32_t ul_buffer_creation_time[MAX_NUM_LCGID]; uint32_t ul_buffer_creation_time[MAX_NUM_LCGID];
/// maximum uplink buffer creation time across all the LCIDs /// maximum uplink buffer creation time across all the LCIDs
@@ -758,6 +753,11 @@ typedef struct {
/// uplink buffer size per LCID /// uplink buffer size per LCID
uint32_t ul_buffer_info[MAX_NUM_LCGID]; uint32_t ul_buffer_info[MAX_NUM_LCGID];
/// uplink bytes that are currently scheduled
int scheduled_ul_bytes;
/// estimation of the UL buffer size
int estimated_ul_buffer;
/// UE tx power /// UE tx power
int32_t ue_tx_power; int32_t ue_tx_power;
+110 -239
View File
@@ -73,6 +73,8 @@ uint16_t pdcch_order_table[6] = { 31, 31, 511, 2047, 2047, 8191 };
void void
schedule_SRS(module_id_t module_idP, frame_t frameP, sub_frame_t subframeP) schedule_SRS(module_id_t module_idP, frame_t frameP, sub_frame_t subframeP)
{ {
eNB_MAC_INST *eNB = RC.mac[module_idP]; eNB_MAC_INST *eNB = RC.mac[module_idP];
UE_list_t *UE_list = &eNB->UE_list; UE_list_t *UE_list = &eNB->UE_list;
nfapi_ul_config_request_body_t *ul_req; nfapi_ul_config_request_body_t *ul_req;
@@ -91,14 +93,10 @@ schedule_SRS(module_id_t module_idP, frame_t frameP, sub_frame_t subframeP)
uint16_t srsPeriodicity, srsOffset; uint16_t srsPeriodicity, srsOffset;
for (CC_id = 0; CC_id < MAX_NUM_CCs; CC_id++) { for (CC_id = 0; CC_id < MAX_NUM_CCs; CC_id++) {
soundingRS_UL_ConfigCommon = soundingRS_UL_ConfigCommon = &cc[CC_id].radioResourceConfigCommon->soundingRS_UL_ConfigCommon;
&cc[CC_id].radioResourceConfigCommon->
soundingRS_UL_ConfigCommon;
// check if SRS is enabled in this frame/subframe // check if SRS is enabled in this frame/subframe
if (soundingRS_UL_ConfigCommon) { if (soundingRS_UL_ConfigCommon) {
srs_SubframeConfig = srs_SubframeConfig = soundingRS_UL_ConfigCommon->choice.setup.srs_SubframeConfig;
soundingRS_UL_ConfigCommon->choice.setup.
srs_SubframeConfig;
if (cc[CC_id].tdd_Config == NULL) { // FDD if (cc[CC_id].tdd_Config == NULL) { // FDD
deltaTSFC = deltaTSFCTabType1[srs_SubframeConfig][0]; deltaTSFC = deltaTSFCTabType1[srs_SubframeConfig][0];
TSFC = deltaTSFCTabType1[srs_SubframeConfig][1]; TSFC = deltaTSFCTabType1[srs_SubframeConfig][1];
@@ -114,88 +112,38 @@ schedule_SRS(module_id_t module_idP, frame_t frameP, sub_frame_t subframeP)
for (UE_id = 0; UE_id < NUMBER_OF_UE_MAX; UE_id++) { for (UE_id = 0; UE_id < NUMBER_OF_UE_MAX; UE_id++) {
if (RC.mac[module_idP]->UE_list.active[UE_id] != TRUE) if (RC.mac[module_idP]->UE_list.active[UE_id] != TRUE)
continue; continue;
ul_req = ul_req = &RC.mac[module_idP]->UL_req[CC_id].ul_config_request_body;
&RC.mac[module_idP]->UL_req[CC_id].
ul_config_request_body;
// drop the allocation if the UE hasn't send RRCConnectionSetupComplete yet // drop the allocation if the UE hasn't send RRCConnectionSetupComplete yet
if (mac_eNB_get_rrc_status if (mac_eNB_get_rrc_status(module_idP,UE_RNTI(module_idP, UE_id)) < RRC_CONNECTED) continue;
(module_idP,
UE_RNTI(module_idP, UE_id)) < RRC_CONNECTED)
continue;
AssertFatal(UE_list->UE_template[CC_id] AssertFatal(UE_list->UE_template[CC_id][UE_id].physicalConfigDedicated != NULL,
[UE_id].physicalConfigDedicated != NULL,
"physicalConfigDedicated is null for UE %d\n", "physicalConfigDedicated is null for UE %d\n",
UE_id); UE_id);
if ((soundingRS_UL_ConfigDedicated = if ((soundingRS_UL_ConfigDedicated = UE_list->UE_template[CC_id][UE_id].physicalConfigDedicated->soundingRS_UL_ConfigDedicated) != NULL) {
UE_list->UE_template[CC_id] if (soundingRS_UL_ConfigDedicated->present == SoundingRS_UL_ConfigDedicated_PR_setup) {
[UE_id].
physicalConfigDedicated->soundingRS_UL_ConfigDedicated)
!= NULL) {
if (soundingRS_UL_ConfigDedicated->present ==
SoundingRS_UL_ConfigDedicated_PR_setup) {
get_srs_pos(&cc[CC_id], get_srs_pos(&cc[CC_id],
soundingRS_UL_ConfigDedicated->choice. soundingRS_UL_ConfigDedicated->choice.
setup.srs_ConfigIndex, setup.srs_ConfigIndex,
&srsPeriodicity, &srsOffset); &srsPeriodicity, &srsOffset);
if (((10 * frameP + if (((10 * frameP + subframeP) % srsPeriodicity) == srsOffset) {
subframeP) % srsPeriodicity) ==
srsOffset) {
// Program SRS // Program SRS
ul_req->srs_present = 1; ul_req->srs_present = 1;
nfapi_ul_config_request_pdu_t nfapi_ul_config_request_pdu_t * ul_config_pdu = &ul_req->ul_config_pdu_list[ul_req->number_of_pdus];
* ul_config_pdu = memset((void *) ul_config_pdu, 0, sizeof(nfapi_ul_config_request_pdu_t));
&ul_req-> ul_config_pdu->pdu_type = NFAPI_UL_CONFIG_SRS_PDU_TYPE;
ul_config_pdu_list ul_config_pdu->pdu_size = 2 + (uint8_t) (2 + sizeof(nfapi_ul_config_srs_pdu));
[ul_req->number_of_pdus];
memset((void *) ul_config_pdu, 0,
sizeof
(nfapi_ul_config_request_pdu_t));
ul_config_pdu->pdu_type =
NFAPI_UL_CONFIG_SRS_PDU_TYPE;
ul_config_pdu->pdu_size =
2 + (uint8_t) (2 +
sizeof
(nfapi_ul_config_srs_pdu));
ul_config_pdu->srs_pdu.srs_pdu_rel8.tl.tag = NFAPI_UL_CONFIG_REQUEST_SRS_PDU_REL8_TAG; ul_config_pdu->srs_pdu.srs_pdu_rel8.tl.tag = NFAPI_UL_CONFIG_REQUEST_SRS_PDU_REL8_TAG;
ul_config_pdu->srs_pdu.srs_pdu_rel8.size = ul_config_pdu->srs_pdu.srs_pdu_rel8.size = (uint8_t)sizeof(nfapi_ul_config_srs_pdu);
(uint8_t) ul_config_pdu->srs_pdu.srs_pdu_rel8.rnti = UE_list->UE_template[CC_id][UE_id].rnti;
sizeof(nfapi_ul_config_srs_pdu); ul_config_pdu->srs_pdu.srs_pdu_rel8.srs_bandwidth = soundingRS_UL_ConfigDedicated->choice.setup.srs_Bandwidth;
ul_config_pdu->srs_pdu.srs_pdu_rel8.rnti = ul_config_pdu->srs_pdu.srs_pdu_rel8.frequency_domain_position = soundingRS_UL_ConfigDedicated->choice.setup.freqDomainPosition;
UE_list->UE_template[CC_id][UE_id]. ul_config_pdu->srs_pdu.srs_pdu_rel8.srs_hopping_bandwidth = soundingRS_UL_ConfigDedicated->choice.setup.srs_HoppingBandwidth;;
rnti; ul_config_pdu->srs_pdu.srs_pdu_rel8.transmission_comb = soundingRS_UL_ConfigDedicated->choice.setup.transmissionComb;
ul_config_pdu->srs_pdu. ul_config_pdu->srs_pdu.srs_pdu_rel8.i_srs = soundingRS_UL_ConfigDedicated->choice.setup.srs_ConfigIndex;
srs_pdu_rel8.srs_bandwidth = ul_config_pdu->srs_pdu.srs_pdu_rel8.sounding_reference_cyclic_shift = soundingRS_UL_ConfigDedicated->choice.setup.cyclicShift; // ul_config_pdu->srs_pdu.srs_pdu_rel10.antenna_port = ;//
soundingRS_UL_ConfigDedicated->
choice.setup.srs_Bandwidth;
ul_config_pdu->srs_pdu.
srs_pdu_rel8.frequency_domain_position
=
soundingRS_UL_ConfigDedicated->
choice.setup.freqDomainPosition;
ul_config_pdu->srs_pdu.
srs_pdu_rel8.srs_hopping_bandwidth =
soundingRS_UL_ConfigDedicated->
choice.setup.srs_HoppingBandwidth;;
ul_config_pdu->srs_pdu.
srs_pdu_rel8.transmission_comb =
soundingRS_UL_ConfigDedicated->
choice.setup.transmissionComb;
ul_config_pdu->srs_pdu.srs_pdu_rel8.i_srs =
soundingRS_UL_ConfigDedicated->
choice.setup.srs_ConfigIndex;
ul_config_pdu->srs_pdu.
srs_pdu_rel8.sounding_reference_cyclic_shift
=
soundingRS_UL_ConfigDedicated->
choice.setup.cyclicShift;
// ul_config_pdu->srs_pdu.srs_pdu_rel10.antenna_port = ;//
// ul_config_pdu->srs_pdu.srs_pdu_rel13.number_of_combs = ;// // ul_config_pdu->srs_pdu.srs_pdu_rel13.number_of_combs = ;//
RC.mac[module_idP]->UL_req[CC_id].sfn_sf = RC.mac[module_idP]->UL_req[CC_id].sfn_sf = (frameP << 4) + subframeP;
(frameP << 4) + subframeP;
RC.mac[module_idP]->UL_req[CC_id].header.message_id = NFAPI_UL_CONFIG_REQUEST; RC.mac[module_idP]->UL_req[CC_id].header.message_id = NFAPI_UL_CONFIG_REQUEST;
ul_req->number_of_pdus++; ul_req->number_of_pdus++;
} // if (((10*frameP+subframeP) % srsPeriodicity) == srsOffset) } // if (((10*frameP+subframeP) % srsPeriodicity) == srsOffset)
@@ -227,13 +175,10 @@ schedule_CSI(module_id_t module_idP, frame_t frameP, sub_frame_t subframeP)
if (UE_list->active[UE_id] != TRUE) if (UE_list->active[UE_id] != TRUE)
continue; continue;
ul_req = ul_req = &RC.mac[module_idP]->UL_req[CC_id].ul_config_request_body;
&RC.mac[module_idP]->UL_req[CC_id].ul_config_request_body;
// drop the allocation if the UE hasn't send RRCConnectionSetupComplete yet // drop the allocation if the UE hasn't send RRCConnectionSetupComplete yet
if (mac_eNB_get_rrc_status if (mac_eNB_get_rrc_status(module_idP, UE_RNTI(module_idP, UE_id)) < RRC_CONNECTED) continue;
(module_idP, UE_RNTI(module_idP, UE_id)) < RRC_CONNECTED)
continue;
AssertFatal(UE_list-> AssertFatal(UE_list->
UE_template[CC_id][UE_id].physicalConfigDedicated UE_template[CC_id][UE_id].physicalConfigDedicated
@@ -241,50 +186,27 @@ schedule_CSI(module_id_t module_idP, frame_t frameP, sub_frame_t subframeP)
"physicalConfigDedicated is null for UE %d\n", "physicalConfigDedicated is null for UE %d\n",
UE_id); UE_id);
if (UE_list-> if (UE_list->UE_template[CC_id][UE_id].physicalConfigDedicated->cqi_ReportConfig) {
UE_template[CC_id][UE_id].physicalConfigDedicated-> if ((cqi_ReportPeriodic = UE_list->UE_template[CC_id][UE_id].physicalConfigDedicated->cqi_ReportConfig->cqi_ReportPeriodic) != NULL
cqi_ReportConfig) { && (cqi_ReportPeriodic->present != CQI_ReportPeriodic_PR_release)) {
if ((cqi_ReportPeriodic =
UE_list->
UE_template[CC_id][UE_id].physicalConfigDedicated->
cqi_ReportConfig->cqi_ReportPeriodic) != NULL
&& (cqi_ReportPeriodic->present !=
CQI_ReportPeriodic_PR_release)) {
//Rel8 Periodic CQI/PMI/RI reporting //Rel8 Periodic CQI/PMI/RI reporting
get_csi_params(cc, cqi_ReportPeriodic, &Npd, get_csi_params(cc, cqi_ReportPeriodic, &Npd,
&N_OFFSET_CQI, &H); &N_OFFSET_CQI, &H);
if ((((frameP * 10) + subframeP) % Npd) == N_OFFSET_CQI) { // CQI opportunity if ((((frameP * 10) + subframeP) % Npd) == N_OFFSET_CQI) { // CQI opportunity
UE_list->UE_sched_ctrl[UE_id].feedback_cnt[CC_id] = UE_list->UE_sched_ctrl[UE_id].feedback_cnt[CC_id] = (((frameP * 10) + subframeP) / Npd) % H;
(((frameP * 10) + subframeP) / Npd) % H;
// Program CQI // Program CQI
nfapi_ul_config_request_pdu_t *ul_config_pdu = nfapi_ul_config_request_pdu_t *ul_config_pdu = &ul_req->ul_config_pdu_list[ul_req->number_of_pdus];
&ul_req->ul_config_pdu_list[ul_req->
number_of_pdus];
memset((void *) ul_config_pdu, 0, memset((void *) ul_config_pdu, 0,
sizeof(nfapi_ul_config_request_pdu_t)); sizeof(nfapi_ul_config_request_pdu_t));
ul_config_pdu->pdu_type = ul_config_pdu->pdu_type = NFAPI_UL_CONFIG_UCI_CQI_PDU_TYPE;
NFAPI_UL_CONFIG_UCI_CQI_PDU_TYPE; ul_config_pdu->pdu_size = 2 + (uint8_t) (2 + sizeof(nfapi_ul_config_uci_cqi_pdu));
ul_config_pdu->pdu_size =
2 + (uint8_t) (2 +
sizeof
(nfapi_ul_config_uci_cqi_pdu));
ul_config_pdu->uci_cqi_pdu.ue_information.ue_information_rel8.tl.tag = NFAPI_UL_CONFIG_REQUEST_UE_INFORMATION_REL8_TAG; ul_config_pdu->uci_cqi_pdu.ue_information.ue_information_rel8.tl.tag = NFAPI_UL_CONFIG_REQUEST_UE_INFORMATION_REL8_TAG;
ul_config_pdu->uci_cqi_pdu. ul_config_pdu->uci_cqi_pdu.ue_information.ue_information_rel8.rnti = UE_list->UE_template[CC_id][UE_id].rnti;
ue_information.ue_information_rel8.rnti =
UE_list->UE_template[CC_id][UE_id].rnti;
ul_config_pdu->uci_cqi_pdu.cqi_information.cqi_information_rel8.tl.tag = NFAPI_UL_CONFIG_REQUEST_CQI_INFORMATION_REL8_TAG; ul_config_pdu->uci_cqi_pdu.cqi_information.cqi_information_rel8.tl.tag = NFAPI_UL_CONFIG_REQUEST_CQI_INFORMATION_REL8_TAG;
ul_config_pdu->uci_cqi_pdu. ul_config_pdu->uci_cqi_pdu.cqi_information.cqi_information_rel8.pucch_index = cqi_ReportPeriodic->choice.setup.cqi_PUCCH_ResourceIndex;
cqi_information.cqi_information_rel8. ul_config_pdu->uci_cqi_pdu.cqi_information.cqi_information_rel8.dl_cqi_pmi_size = get_rel8_dl_cqi_pmi_size(&UE_list->UE_sched_ctrl[UE_id], CC_id, cc,
pucch_index =
cqi_ReportPeriodic->choice.
setup.cqi_PUCCH_ResourceIndex;
ul_config_pdu->uci_cqi_pdu.
cqi_information.cqi_information_rel8.
dl_cqi_pmi_size =
get_rel8_dl_cqi_pmi_size
(&UE_list->UE_sched_ctrl[UE_id], CC_id, cc,
get_tmode(module_idP, CC_id, UE_id), get_tmode(module_idP, CC_id, UE_id),
cqi_ReportPeriodic); cqi_ReportPeriodic);
ul_req->number_of_pdus++; ul_req->number_of_pdus++;
@@ -294,40 +216,23 @@ schedule_CSI(module_id_t module_idP, frame_t frameP, sub_frame_t subframeP)
// PUT rel10-13 UCI options here // PUT rel10-13 UCI options here
#endif #endif
} else } else
if ((cqi_ReportPeriodic->choice.setup. if ((cqi_ReportPeriodic->choice.setup.ri_ConfigIndex)
ri_ConfigIndex)
&& ((((frameP * 10) + subframeP) % ((H * Npd) << (*cqi_ReportPeriodic->choice.setup.ri_ConfigIndex / 161))) == N_OFFSET_CQI + (*cqi_ReportPeriodic->choice.setup.ri_ConfigIndex % 161))) { // RI opportunity && ((((frameP * 10) + subframeP) % ((H * Npd) << (*cqi_ReportPeriodic->choice.setup.ri_ConfigIndex / 161))) == N_OFFSET_CQI + (*cqi_ReportPeriodic->choice.setup.ri_ConfigIndex % 161))) { // RI opportunity
// Program RI // Program RI
nfapi_ul_config_request_pdu_t *ul_config_pdu = nfapi_ul_config_request_pdu_t *ul_config_pdu = &ul_req->ul_config_pdu_list[ul_req->number_of_pdus];
&ul_req->ul_config_pdu_list[ul_req->
number_of_pdus];
memset((void *) ul_config_pdu, 0, memset((void *) ul_config_pdu, 0,
sizeof(nfapi_ul_config_request_pdu_t)); sizeof(nfapi_ul_config_request_pdu_t));
ul_config_pdu->pdu_type = ul_config_pdu->pdu_type = NFAPI_UL_CONFIG_UCI_CQI_PDU_TYPE;
NFAPI_UL_CONFIG_UCI_CQI_PDU_TYPE; ul_config_pdu->pdu_size = 2 + (uint8_t) (2 + sizeof(nfapi_ul_config_uci_cqi_pdu));
ul_config_pdu->pdu_size =
2 + (uint8_t) (2 +
sizeof
(nfapi_ul_config_uci_cqi_pdu));
ul_config_pdu->uci_cqi_pdu.ue_information.ue_information_rel8.tl.tag = NFAPI_UL_CONFIG_REQUEST_UE_INFORMATION_REL8_TAG; ul_config_pdu->uci_cqi_pdu.ue_information.ue_information_rel8.tl.tag = NFAPI_UL_CONFIG_REQUEST_UE_INFORMATION_REL8_TAG;
ul_config_pdu->uci_cqi_pdu. ul_config_pdu->uci_cqi_pdu.ue_information.ue_information_rel8.rnti = UE_list->UE_template[CC_id][UE_id].rnti;
ue_information.ue_information_rel8.rnti =
UE_list->UE_template[CC_id][UE_id].rnti;
ul_config_pdu->uci_cqi_pdu.cqi_information.cqi_information_rel8.tl.tag = NFAPI_UL_CONFIG_REQUEST_CQI_INFORMATION_REL8_TAG; ul_config_pdu->uci_cqi_pdu.cqi_information.cqi_information_rel8.tl.tag = NFAPI_UL_CONFIG_REQUEST_CQI_INFORMATION_REL8_TAG;
ul_config_pdu->uci_cqi_pdu. ul_config_pdu->uci_cqi_pdu.cqi_information.cqi_information_rel8.pucch_index = cqi_ReportPeriodic->choice.setup.cqi_PUCCH_ResourceIndex;
cqi_information.cqi_information_rel8. ul_config_pdu->uci_cqi_pdu.cqi_information.cqi_information_rel8.dl_cqi_pmi_size = (cc->p_eNB == 2) ? 1 : 2;
pucch_index = RC.mac[module_idP]->UL_req[CC_id].sfn_sf = (frameP << 4) + subframeP;
cqi_ReportPeriodic->choice.
setup.cqi_PUCCH_ResourceIndex;
ul_config_pdu->uci_cqi_pdu.
cqi_information.cqi_information_rel8.
dl_cqi_pmi_size = (cc->p_eNB == 2) ? 1 : 2;
RC.mac[module_idP]->UL_req[CC_id].sfn_sf =
(frameP << 4) + subframeP;
ul_req->number_of_pdus++; ul_req->number_of_pdus++;
ul_req->tl.tag = NFAPI_UL_CONFIG_REQUEST_BODY_TAG; ul_req->tl.tag = NFAPI_UL_CONFIG_REQUEST_BODY_TAG;
} }
} // if ((cqi_ReportPeriodic = cqi_ReportConfig->cqi_ReportPeriodic)!=NULL) { } // if ((cqi_ReportPeriodic = cqi_ReportConfig->cqi_ReportPeriodic)!=NULL) {
} // if (UE_list->UE_template[CC_id][UE_id].physicalConfigDedicated->cqi_ReportConfig) } // if (UE_list->UE_template[CC_id][UE_id].physicalConfigDedicated->cqi_ReportConfig)
} // for (UE_id=UE_list->head; UE_id>=0; UE_id=UE_list->next[UE_id]) { } // for (UE_id=UE_list->head; UE_id>=0; UE_id=UE_list->next[UE_id]) {
@@ -350,52 +255,34 @@ schedule_SR(module_id_t module_idP, frame_t frameP, sub_frame_t subframeP)
int i; int i;
for (CC_id = 0; CC_id < MAX_NUM_CCs; CC_id++) { for (CC_id = 0; CC_id < MAX_NUM_CCs; CC_id++) {
RC.mac[module_idP]->UL_req[CC_id].sfn_sf = RC.mac[module_idP]->UL_req[CC_id].sfn_sf = (frameP << 4) + subframeP;
(frameP << 4) + subframeP;
for (UE_id = 0; UE_id < NUMBER_OF_UE_MAX; UE_id++) { for (UE_id = 0; UE_id < NUMBER_OF_UE_MAX; UE_id++) {
if (RC.mac[module_idP]->UE_list.active[UE_id] != TRUE) if (RC.mac[module_idP]->UE_list.active[UE_id] != TRUE) continue;
continue;
ul_req = &RC.mac[module_idP]->UL_req[CC_id]; ul_req = &RC.mac[module_idP]->UL_req[CC_id];
ul_req_body = &ul_req->ul_config_request_body; ul_req_body = &ul_req->ul_config_request_body;
// drop the allocation if the UE hasn't send RRCConnectionSetupComplete yet // drop the allocation if the UE hasn't send RRCConnectionSetupComplete yet
if (mac_eNB_get_rrc_status if (mac_eNB_get_rrc_status(module_idP, UE_RNTI(module_idP, UE_id)) < RRC_CONNECTED) continue;
(module_idP, UE_RNTI(module_idP, UE_id)) < RRC_CONNECTED)
continue;
AssertFatal(UE_list-> AssertFatal(UE_list->
UE_template[CC_id][UE_id].physicalConfigDedicated UE_template[CC_id][UE_id].physicalConfigDedicated!= NULL,
!= NULL,
"physicalConfigDedicated is null for UE %d\n", "physicalConfigDedicated is null for UE %d\n",
UE_id); UE_id);
if ((SRconfig = if ((SRconfig = UE_list->UE_template[CC_id][UE_id].physicalConfigDedicated->schedulingRequestConfig) != NULL) {
UE_list->
UE_template[CC_id][UE_id].physicalConfigDedicated->
schedulingRequestConfig) != NULL) {
if (SRconfig->present == SchedulingRequestConfig_PR_setup) { if (SRconfig->present == SchedulingRequestConfig_PR_setup) {
if (SRconfig->choice.setup.sr_ConfigIndex <= 4) { // 5 ms SR period if (SRconfig->choice.setup.sr_ConfigIndex <= 4) { // 5 ms SR period
if ((subframeP % 5) != if ((subframeP % 5) != SRconfig->choice.setup.sr_ConfigIndex) continue;
SRconfig->choice.setup.sr_ConfigIndex)
continue;
} else if (SRconfig->choice.setup.sr_ConfigIndex <= 14) { // 10 ms SR period } else if (SRconfig->choice.setup.sr_ConfigIndex <= 14) { // 10 ms SR period
if (subframeP != if (subframeP != (SRconfig->choice.setup.sr_ConfigIndex - 5)) continue;
(SRconfig->choice.setup.sr_ConfigIndex - 5))
continue;
} else if (SRconfig->choice.setup.sr_ConfigIndex <= 34) { // 20 ms SR period } else if (SRconfig->choice.setup.sr_ConfigIndex <= 34) { // 20 ms SR period
if ((10 * (frameP & 1) + subframeP) != if ((10 * (frameP & 1) + subframeP) != (SRconfig->choice.setup.sr_ConfigIndex - 15)) continue;
(SRconfig->choice.setup.sr_ConfigIndex - 15))
continue;
} else if (SRconfig->choice.setup.sr_ConfigIndex <= 74) { // 40 ms SR period } else if (SRconfig->choice.setup.sr_ConfigIndex <= 74) { // 40 ms SR period
if ((10 * (frameP & 3) + subframeP) != if ((10 * (frameP & 3) + subframeP) != (SRconfig->choice.setup.sr_ConfigIndex - 35)) continue;
(SRconfig->choice.setup.sr_ConfigIndex - 35))
continue;
} else if (SRconfig->choice.setup.sr_ConfigIndex <= 154) { // 80 ms SR period } else if (SRconfig->choice.setup.sr_ConfigIndex <= 154) { // 80 ms SR period
if ((10 * (frameP & 7) + subframeP) != if ((10 * (frameP & 7) + subframeP) != (SRconfig->choice.setup.sr_ConfigIndex - 75)) continue;
(SRconfig->choice.setup.sr_ConfigIndex - 75))
continue;
} }
} // SRconfig->present == SchedulingRequestConfig_PR_setup) } // SRconfig->present == SchedulingRequestConfig_PR_setup)
} // SRconfig = UE_list->UE_template[CC_id][UE_id].physicalConfigDedicated->schedulingRequestConfig)!=NULL) } // SRconfig = UE_list->UE_template[CC_id][UE_id].physicalConfigDedicated->schedulingRequestConfig)!=NULL)
@@ -423,38 +310,24 @@ schedule_SR(module_id_t module_idP, frame_t frameP, sub_frame_t subframeP)
} }
// drop the allocation because ULSCH with handle it with BSR // drop the allocation because ULSCH with handle it with BSR
if (skip_ue == 1) if (skip_ue == 1) continue;
continue;
LOG_D(MAC,"Frame %d, Subframe %d : Scheduling SR for UE %d/%x is_harq:%d\n",frameP,subframeP,UE_id,UE_list->UE_template[CC_id][UE_id].rnti, is_harq); LOG_D(MAC,"Frame %d, Subframe %d : Scheduling SR for UE %d/%x is_harq:%d\n",frameP,subframeP,UE_id,UE_list->UE_template[CC_id][UE_id].rnti, is_harq);
// check Rel10 or Rel8 SR // check Rel10 or Rel8 SR
#if defined(Rel10) || defined(Rel14) #if defined(Rel10) || defined(Rel14)
if ((UE_list-> if ((UE_list-> UE_template[CC_id][UE_id].physicalConfigDedicated->ext2)
UE_template[CC_id][UE_id].physicalConfigDedicated->ext2) && (UE_list->UE_template[CC_id][UE_id].physicalConfigDedicated->ext2->schedulingRequestConfig_v1020)
&& (UE_list-> && (UE_list->UE_template[CC_id][UE_id].physicalConfigDedicated->ext2->schedulingRequestConfig_v1020)) {
UE_template[CC_id][UE_id].physicalConfigDedicated->
ext2->schedulingRequestConfig_v1020)
&& (UE_list->
UE_template[CC_id][UE_id].physicalConfigDedicated->
ext2->schedulingRequestConfig_v1020)) {
sr.sr_information_rel10.tl.tag = NFAPI_UL_CONFIG_REQUEST_SR_INFORMATION_REL10_TAG; sr.sr_information_rel10.tl.tag = NFAPI_UL_CONFIG_REQUEST_SR_INFORMATION_REL10_TAG;
sr.sr_information_rel10.number_of_pucch_resources = 1; sr.sr_information_rel10.number_of_pucch_resources = 1;
sr.sr_information_rel10.pucch_index_p1 = sr.sr_information_rel10.pucch_index_p1 = *UE_list->UE_template[CC_id][UE_id].physicalConfigDedicated->ext2->schedulingRequestConfig_v1020->sr_PUCCH_ResourceIndexP1_r10;
*UE_list->
UE_template[CC_id][UE_id].physicalConfigDedicated->
ext2->
schedulingRequestConfig_v1020->sr_PUCCH_ResourceIndexP1_r10;
LOG_D(MAC,"REL10 PUCCH INDEX P1:%d\n", sr.sr_information_rel10.pucch_index_p1); LOG_D(MAC,"REL10 PUCCH INDEX P1:%d\n", sr.sr_information_rel10.pucch_index_p1);
} else } else
#endif #endif
{ {
sr.sr_information_rel8.tl.tag = NFAPI_UL_CONFIG_REQUEST_SR_INFORMATION_REL8_TAG; sr.sr_information_rel8.tl.tag = NFAPI_UL_CONFIG_REQUEST_SR_INFORMATION_REL8_TAG;
sr.sr_information_rel8.pucch_index = sr.sr_information_rel8.pucch_index = UE_list->UE_template[CC_id][UE_id].physicalConfigDedicated->schedulingRequestConfig->choice.setup.sr_PUCCH_ResourceIndex;
UE_list->
UE_template[CC_id][UE_id].physicalConfigDedicated->
schedulingRequestConfig->choice.setup.
sr_PUCCH_ResourceIndex;
LOG_D(MAC,"REL8 PUCCH INDEX:%d\n", sr.sr_information_rel8.pucch_index); LOG_D(MAC,"REL8 PUCCH INDEX:%d\n", sr.sr_information_rel8.pucch_index);
} }
@@ -498,33 +371,23 @@ check_ul_failure(module_id_t module_idP, int CC_id, int UE_id,
UE_list->UE_sched_ctrl[UE_id].ra_pdcch_order_sent = 1; UE_list->UE_sched_ctrl[UE_id].ra_pdcch_order_sent = 1;
// add a format 1A dci for this UE to request an RA procedure (only one UE per subframe) // add a format 1A dci for this UE to request an RA procedure (only one UE per subframe)
nfapi_dl_config_request_pdu_t *dl_config_pdu = nfapi_dl_config_request_pdu_t *dl_config_pdu = &DL_req[CC_id].dl_config_request_body.dl_config_pdu_list[DL_req[CC_id].dl_config_request_body.number_pdu];
&DL_req[CC_id]. memset((void *) dl_config_pdu, 0,sizeof(nfapi_dl_config_request_pdu_t));
dl_config_request_body.dl_config_pdu_list[DL_req[CC_id].
dl_config_request_body.number_pdu];
memset((void *) dl_config_pdu, 0,
sizeof(nfapi_dl_config_request_pdu_t));
dl_config_pdu->pdu_type = NFAPI_DL_CONFIG_DCI_DL_PDU_TYPE; dl_config_pdu->pdu_type = NFAPI_DL_CONFIG_DCI_DL_PDU_TYPE;
dl_config_pdu->pdu_size = dl_config_pdu->pdu_size = (uint8_t) (2 + sizeof(nfapi_dl_config_dci_dl_pdu));
(uint8_t) (2 + sizeof(nfapi_dl_config_dci_dl_pdu));
dl_config_pdu->dci_dl_pdu.dci_dl_pdu_rel8.tl.tag = NFAPI_DL_CONFIG_REQUEST_DCI_DL_PDU_REL8_TAG; dl_config_pdu->dci_dl_pdu.dci_dl_pdu_rel8.tl.tag = NFAPI_DL_CONFIG_REQUEST_DCI_DL_PDU_REL8_TAG;
dl_config_pdu->dci_dl_pdu.dci_dl_pdu_rel8.dci_format = dl_config_pdu->dci_dl_pdu.dci_dl_pdu_rel8.dci_format = NFAPI_DL_DCI_FORMAT_1A;
NFAPI_DL_DCI_FORMAT_1A; dl_config_pdu->dci_dl_pdu.dci_dl_pdu_rel8.aggregation_level = get_aggregation(get_bw_index(module_idP, CC_id),
dl_config_pdu->dci_dl_pdu.dci_dl_pdu_rel8.aggregation_level =
get_aggregation(get_bw_index(module_idP, CC_id),
UE_list->UE_sched_ctrl[UE_id]. UE_list->UE_sched_ctrl[UE_id].
dl_cqi[CC_id], format1A); dl_cqi[CC_id], format1A);
dl_config_pdu->dci_dl_pdu.dci_dl_pdu_rel8.rnti = rnti; dl_config_pdu->dci_dl_pdu.dci_dl_pdu_rel8.rnti = rnti;
dl_config_pdu->dci_dl_pdu.dci_dl_pdu_rel8.rnti_type = 1; // CRNTI : see Table 4-10 from SCF082 - nFAPI specifications dl_config_pdu->dci_dl_pdu.dci_dl_pdu_rel8.rnti_type = 1; // CRNTI : see Table 4-10 from SCF082 - nFAPI specifications
dl_config_pdu->dci_dl_pdu.dci_dl_pdu_rel8.transmission_power = 6000; // equal to RS power dl_config_pdu->dci_dl_pdu.dci_dl_pdu_rel8.transmission_power = 6000; // equal to RS power
AssertFatal((cc[CC_id].mib->message.dl_Bandwidth >= 0) AssertFatal((cc[CC_id].mib->message.dl_Bandwidth >= 0) && (cc[CC_id].mib->message.dl_Bandwidth < 6),
&& (cc[CC_id].mib->message.dl_Bandwidth < 6),
"illegal dl_Bandwidth %d\n", "illegal dl_Bandwidth %d\n",
(int) cc[CC_id].mib->message.dl_Bandwidth); (int) cc[CC_id].mib->message.dl_Bandwidth);
dl_config_pdu->dci_dl_pdu.dci_dl_pdu_rel8. dl_config_pdu->dci_dl_pdu.dci_dl_pdu_rel8.resource_block_coding = pdcch_order_table[cc[CC_id].mib->message.dl_Bandwidth];
resource_block_coding =
pdcch_order_table[cc[CC_id].mib->message.dl_Bandwidth];
DL_req[CC_id].dl_config_request_body.number_dci++; DL_req[CC_id].dl_config_request_body.number_dci++;
DL_req[CC_id].dl_config_request_body.number_pdu++; DL_req[CC_id].dl_config_request_body.number_pdu++;
DL_req[CC_id].dl_config_request_body.tl.tag = NFAPI_DL_CONFIG_REQUEST_BODY_TAG; DL_req[CC_id].dl_config_request_body.tl.tag = NFAPI_DL_CONFIG_REQUEST_BODY_TAG;
@@ -539,8 +402,7 @@ check_ul_failure(module_id_t module_idP, int CC_id, int UE_id,
"UE %d rnti %x: sent PDCCH order for RAPROC waiting (failure timer %d) \n", "UE %d rnti %x: sent PDCCH order for RAPROC waiting (failure timer %d) \n",
UE_id, rnti, UE_id, rnti,
UE_list->UE_sched_ctrl[UE_id].ul_failure_timer); UE_list->UE_sched_ctrl[UE_id].ul_failure_timer);
if ((UE_list->UE_sched_ctrl[UE_id].ul_failure_timer % 40) == 0) if ((UE_list->UE_sched_ctrl[UE_id].ul_failure_timer % 40) == 0) UE_list->UE_sched_ctrl[UE_id].ra_pdcch_order_sent = 0; // resend every 4 frames
UE_list->UE_sched_ctrl[UE_id].ra_pdcch_order_sent = 0; // resend every 4 frames
} }
UE_list->UE_sched_ctrl[UE_id].ul_failure_timer++; UE_list->UE_sched_ctrl[UE_id].ul_failure_timer++;
@@ -550,20 +412,19 @@ check_ul_failure(module_id_t module_idP, int CC_id, int UE_id,
LOG_I(MAC, LOG_I(MAC,
"UE %d rnti %x: UL Failure after repeated PDCCH orders: Triggering RRC \n", "UE %d rnti %x: UL Failure after repeated PDCCH orders: Triggering RRC \n",
UE_id, rnti); UE_id, rnti);
mac_eNB_rrc_ul_failure(module_idP, CC_id, frameP, subframeP, mac_eNB_rrc_ul_failure(module_idP, CC_id, frameP, subframeP,rnti);
rnti);
UE_list->UE_sched_ctrl[UE_id].ul_failure_timer = 0; UE_list->UE_sched_ctrl[UE_id].ul_failure_timer = 0;
UE_list->UE_sched_ctrl[UE_id].ul_out_of_sync = 1; UE_list->UE_sched_ctrl[UE_id].ul_out_of_sync = 1;
}
} // ul_failure_timer>0
//Inform the controller about the UE deactivation. Should be moved to RRC agent in the future //Inform the controller about the UE deactivation. Should be moved to RRC agent in the future
#if defined(FLEXRAN_AGENT_SB_IF) #if defined(FLEXRAN_AGENT_SB_IF)
if (rrc_agent_registered[module_idP]) { if (rrc_agent_registered[module_idP]) {
agent_rrc_xface[module_idP]->flexran_agent_notify_ue_state_change(module_idP, agent_rrc_xface[module_idP]->flexran_agent_notify_ue_state_change(module_idP,
rnti, rnti, PROTOCOL__FLEX_UE_STATE_CHANGE_TYPE__FLUESC_DEACTIVATED);
PROTOCOL__FLEX_UE_STATE_CHANGE_TYPE__FLUESC_DEACTIVATED);
} }
#endif #endif
}
} // ul_failure_timer>0
UE_list->UE_sched_ctrl[UE_id].uplane_inactivity_timer++; UE_list->UE_sched_ctrl[UE_id].uplane_inactivity_timer++;
if(UE_list->UE_sched_ctrl[UE_id].uplane_inactivity_timer > (U_PLANE_INACTIVITY_VALUE*subframe_num(&RC.eNB[module_idP][CC_id]->frame_parms))){ if(UE_list->UE_sched_ctrl[UE_id].uplane_inactivity_timer > (U_PLANE_INACTIVITY_VALUE*subframe_num(&RC.eNB[module_idP][CC_id]->frame_parms))){
@@ -621,9 +482,7 @@ copy_ulreq(module_id_t module_idP, frame_t frameP, sub_frame_t subframeP)
// Restore the pointer // Restore the pointer
ul_req->ul_config_request_body.ul_config_pdu_list = ul_req_pdu; ul_req->ul_config_request_body.ul_config_pdu_list = ul_req_pdu;
ul_req->sfn_sf = (frameP<<4) + subframeP; ul_req->sfn_sf = (frameP<<4) + subframeP;
ul_req_tmp->ul_config_request_body.number_of_pdus = 0; ul_req_tmp->ul_config_request_body.number_of_pdus = 0;
if (ul_req->ul_config_request_body.number_of_pdus>0) if (ul_req->ul_config_request_body.number_of_pdus>0)
@@ -645,7 +504,7 @@ eNB_dlsch_ulsch_scheduler(module_id_t module_idP, frame_t frameP,
int mbsfn_status[MAX_NUM_CCs]; int mbsfn_status[MAX_NUM_CCs];
protocol_ctxt_t ctxt; protocol_ctxt_t ctxt;
int CC_id, i; //,next_i; int CC_id, i;
UE_list_t *UE_list = &RC.mac[module_idP]->UE_list; UE_list_t *UE_list = &RC.mac[module_idP]->UE_list;
rnti_t rnti; rnti_t rnti;
@@ -675,29 +534,6 @@ eNB_dlsch_ulsch_scheduler(module_id_t module_idP, frame_t frameP,
RC.mac[module_idP]->frame = frameP; RC.mac[module_idP]->frame = frameP;
RC.mac[module_idP]->subframe = subframeP; RC.mac[module_idP]->subframe = subframeP;
clear_nfapi_information(RC.mac[module_idP], CC_id, frameP,
subframeP);
}
// refresh UE list based on UEs dropped by PHY in previous subframe
for (i = 0; i < NUMBER_OF_UE_MAX; i++) {
if (UE_list->active[i] != TRUE)
continue;
rnti = UE_RNTI(module_idP, i);
CC_id = UE_PCCID(module_idP, i);
if ((frameP == 0) && (subframeP == 0)) {
LOG_I(MAC,
"UE rnti %x : %s, PHR %d dB DL CQI %d PUSCH SNR %d PUCCH SNR %d\n",
rnti,
UE_list->UE_sched_ctrl[i].ul_out_of_sync ==
0 ? "in synch" : "out of sync",
UE_list->UE_template[CC_id][i].phr_info,
UE_list->UE_sched_ctrl[i].dl_cqi[CC_id],
(UE_list->UE_sched_ctrl[i].pusch_snr[CC_id] - 128) / 2,
(UE_list->UE_sched_ctrl[i].pucch1_snr[CC_id] - 128) / 2);
}
RC.eNB[module_idP][CC_id]->pusch_stats_bsr[i][(frameP * 10) + RC.eNB[module_idP][CC_id]->pusch_stats_bsr[i][(frameP * 10) +
subframeP] = -63; subframeP] = -63;
@@ -763,7 +599,42 @@ eNB_dlsch_ulsch_scheduler(module_id_t module_idP, frame_t frameP,
rrc_mac_remove_ue(module_idP,rnti); rrc_mac_remove_ue(module_idP,rnti);
} }
} }
}
// refresh UE list based on UEs dropped by PHY in previous subframe
for (i = 0; i < NUMBER_OF_UE_MAX; i++) {
if (UE_list->active[i] != TRUE) continue;
rnti = UE_RNTI(module_idP, i);
CC_id = UE_PCCID(module_idP, i);
if ((frameP == 0) && (subframeP == 0)) {
LOG_I(MAC,
"UE rnti %x : %s, PHR %d dB DL CQI %d PUSCH SNR %d PUCCH SNR %d\n",
rnti,
UE_list->UE_sched_ctrl[i].ul_out_of_sync ==
0 ? "in synch" : "out of sync",
UE_list->UE_template[CC_id][i].phr_info,
UE_list->UE_sched_ctrl[i].dl_cqi[CC_id],
(UE_list->UE_sched_ctrl[i].pusch_snr[CC_id] - 128) / 2,
(UE_list->UE_sched_ctrl[i].pucch1_snr[CC_id] - 128) / 2);
}
RC.eNB[module_idP][CC_id]->pusch_stats_bsr[i][(frameP * 10) + subframeP] = -63;
if (i == UE_list->head)
VCD_SIGNAL_DUMPER_DUMP_VARIABLE_BY_NAME
(VCD_SIGNAL_DUMPER_VARIABLES_UE0_BSR,
RC.eNB[module_idP][CC_id]->
pusch_stats_bsr[i][(frameP * 10) + subframeP]);
// increment this, it is cleared when we receive an sdu
RC.mac[module_idP]->UE_list.UE_sched_ctrl[i].ul_inactivity_timer++;
RC.mac[module_idP]->UE_list.UE_sched_ctrl[i].cqi_req_timer++;
LOG_D(MAC, "UE %d/%x : ul_inactivity %d, cqi_req %d\n", i, rnti,
RC.mac[module_idP]->UE_list.UE_sched_ctrl[i].
ul_inactivity_timer,
RC.mac[module_idP]->UE_list.UE_sched_ctrl[i].cqi_req_timer);
check_ul_failure(module_idP, CC_id, i, frameP, subframeP);
} }
PROTOCOL_CTXT_SET_BY_MODULE_ID(&ctxt, module_idP, ENB_FLAG_YES, PROTOCOL_CTXT_SET_BY_MODULE_ID(&ctxt, module_idP, ENB_FLAG_YES,
@@ -771,6 +642,7 @@ eNB_dlsch_ulsch_scheduler(module_id_t module_idP, frame_t frameP,
module_idP); module_idP);
pdcp_run(&ctxt); pdcp_run(&ctxt);
rrc_rx_tx(&ctxt, CC_id); rrc_rx_tx(&ctxt, CC_id);
#if defined(Rel10) || defined(Rel14) #if defined(Rel10) || defined(Rel14)
@@ -778,8 +650,7 @@ eNB_dlsch_ulsch_scheduler(module_id_t module_idP, frame_t frameP,
for (CC_id = 0; CC_id < MAX_NUM_CCs; CC_id++) { for (CC_id = 0; CC_id < MAX_NUM_CCs; CC_id++) {
if (cc[CC_id].MBMS_flag > 0) { if (cc[CC_id].MBMS_flag > 0) {
start_meas(&RC.mac[module_idP]->schedule_mch); start_meas(&RC.mac[module_idP]->schedule_mch);
mbsfn_status[CC_id] = mbsfn_status[CC_id] = schedule_MBMS(module_idP, CC_id, frameP, subframeP);
schedule_MBMS(module_idP, CC_id, frameP, subframeP);
stop_meas(&RC.mac[module_idP]->schedule_mch); stop_meas(&RC.mac[module_idP]->schedule_mch);
} }
} }
File diff suppressed because it is too large Load Diff
+85 -194
View File
@@ -235,35 +235,28 @@ schedule_SIB1_BR(module_id_t module_idP,
memset((void *) dl_config_pdu, 0, memset((void *) dl_config_pdu, 0,
sizeof(nfapi_dl_config_request_pdu_t)); sizeof(nfapi_dl_config_request_pdu_t));
dl_config_pdu->pdu_type = NFAPI_DL_CONFIG_DLSCH_PDU_TYPE; dl_config_pdu->pdu_type = NFAPI_DL_CONFIG_DLSCH_PDU_TYPE;
dl_config_pdu->pdu_size = dl_config_pdu->pdu_size = (uint8_t) (2 + sizeof(nfapi_dl_config_dlsch_pdu));
(uint8_t) (2 + sizeof(nfapi_dl_config_dlsch_pdu));
dl_config_pdu->dlsch_pdu.dlsch_pdu_rel8.tl.tag = NFAPI_DL_CONFIG_REQUEST_DLSCH_PDU_REL8_TAG; dl_config_pdu->dlsch_pdu.dlsch_pdu_rel8.tl.tag = NFAPI_DL_CONFIG_REQUEST_DLSCH_PDU_REL8_TAG;
dl_config_pdu->dlsch_pdu.dlsch_pdu_rel8.length = TBS; dl_config_pdu->dlsch_pdu.dlsch_pdu_rel8.length = TBS;
dl_config_pdu->dlsch_pdu.dlsch_pdu_rel8.pdu_index = dl_config_pdu->dlsch_pdu.dlsch_pdu_rel8.pdu_index = eNB->pdu_index[CC_id];
eNB->pdu_index[CC_id];
dl_config_pdu->dlsch_pdu.dlsch_pdu_rel8.rnti = 0xFFFF; dl_config_pdu->dlsch_pdu.dlsch_pdu_rel8.rnti = 0xFFFF;
dl_config_pdu->dlsch_pdu.dlsch_pdu_rel8.resource_allocation_type = 2; // format 1A/1B/1D dl_config_pdu->dlsch_pdu.dlsch_pdu_rel8.resource_allocation_type = 2; // format 1A/1B/1D
dl_config_pdu->dlsch_pdu.dlsch_pdu_rel8.virtual_resource_block_assignment_flag = 0; // localized dl_config_pdu->dlsch_pdu.dlsch_pdu_rel8.virtual_resource_block_assignment_flag = 0; // localized
dl_config_pdu->dlsch_pdu.dlsch_pdu_rel8.resource_block_coding = dl_config_pdu->dlsch_pdu.dlsch_pdu_rel8.resource_block_coding = getRIV(N_RB_DL, first_rb, 6);
getRIV(N_RB_DL, first_rb, 6);
dl_config_pdu->dlsch_pdu.dlsch_pdu_rel8.modulation = 2; //QPSK dl_config_pdu->dlsch_pdu.dlsch_pdu_rel8.modulation = 2; //QPSK
dl_config_pdu->dlsch_pdu.dlsch_pdu_rel8.redundancy_version = rvidx; dl_config_pdu->dlsch_pdu.dlsch_pdu_rel8.redundancy_version = rvidx;
dl_config_pdu->dlsch_pdu.dlsch_pdu_rel8.transport_blocks = 1; // first block dl_config_pdu->dlsch_pdu.dlsch_pdu_rel8.transport_blocks = 1; // first block
dl_config_pdu->dlsch_pdu. dl_config_pdu->dlsch_pdu.dlsch_pdu_rel8.transport_block_to_codeword_swap_flag = 0;
dlsch_pdu_rel8.transport_block_to_codeword_swap_flag = 0; dl_config_pdu->dlsch_pdu.dlsch_pdu_rel8.transmission_scheme = (cc->p_eNB == 1) ? 0 : 1;
dl_config_pdu->dlsch_pdu.dlsch_pdu_rel8.transmission_scheme =
(cc->p_eNB == 1) ? 0 : 1;
dl_config_pdu->dlsch_pdu.dlsch_pdu_rel8.number_of_layers = 1; dl_config_pdu->dlsch_pdu.dlsch_pdu_rel8.number_of_layers = 1;
dl_config_pdu->dlsch_pdu.dlsch_pdu_rel8.number_of_subbands = 1; dl_config_pdu->dlsch_pdu.dlsch_pdu_rel8.number_of_subbands = 1;
// dl_config_pdu->dlsch_pdu.dlsch_pdu_rel8.codebook_index = ; // dl_config_pdu->dlsch_pdu.dlsch_pdu_rel8.codebook_index = ;
dl_config_pdu->dlsch_pdu.dlsch_pdu_rel8.ue_category_capacity = 1; dl_config_pdu->dlsch_pdu.dlsch_pdu_rel8.ue_category_capacity = 1;
dl_config_pdu->dlsch_pdu.dlsch_pdu_rel8.pa = 4; // 0 dB dl_config_pdu->dlsch_pdu.dlsch_pdu_rel8.pa = 4; // 0 dB
dl_config_pdu->dlsch_pdu.dlsch_pdu_rel8.delta_power_offset_index = dl_config_pdu->dlsch_pdu.dlsch_pdu_rel8.delta_power_offset_index = 0;
0;
dl_config_pdu->dlsch_pdu.dlsch_pdu_rel8.ngap = 0; dl_config_pdu->dlsch_pdu.dlsch_pdu_rel8.ngap = 0;
dl_config_pdu->dlsch_pdu.dlsch_pdu_rel8.nprb = get_subbandsize(cc->mib->message.dl_Bandwidth); // ignored dl_config_pdu->dlsch_pdu.dlsch_pdu_rel8.nprb = get_subbandsize(cc->mib->message.dl_Bandwidth); // ignored
dl_config_pdu->dlsch_pdu.dlsch_pdu_rel8.transmission_mode = dl_config_pdu->dlsch_pdu.dlsch_pdu_rel8.transmission_mode = (cc->p_eNB == 1) ? 1 : 2;
(cc->p_eNB == 1) ? 1 : 2;
dl_config_pdu->dlsch_pdu.dlsch_pdu_rel8.num_bf_prb_per_subband = 1; dl_config_pdu->dlsch_pdu.dlsch_pdu_rel8.num_bf_prb_per_subband = 1;
dl_config_pdu->dlsch_pdu.dlsch_pdu_rel8.num_bf_vector = 1; dl_config_pdu->dlsch_pdu.dlsch_pdu_rel8.num_bf_vector = 1;
// Rel10 fields // Rel10 fields
@@ -280,10 +273,7 @@ schedule_SIB1_BR(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;
// Program TX Request // Program TX Request
TX_req = TX_req = &eNB->TX_req[CC_id].tx_request_body.tx_pdu_list[eNB->TX_req[CC_id].tx_request_body.number_of_pdus];
&eNB->TX_req[CC_id].tx_request_body.tx_pdu_list[eNB->
TX_req
[CC_id].tx_request_body.number_of_pdus];
TX_req->pdu_length = bcch_sdu_length; TX_req->pdu_length = bcch_sdu_length;
TX_req->pdu_index = eNB->pdu_index[CC_id]++; TX_req->pdu_index = eNB->pdu_index[CC_id]++;
TX_req->num_segments = 1; TX_req->num_segments = 1;
@@ -315,11 +305,8 @@ schedule_SIB1_BR(module_id_t module_idP,
} }
} }
int si_WindowLength_BR_r13tab int si_WindowLength_BR_r13tab[SystemInformationBlockType1_v1310_IEs__bandwidthReducedAccessRelatedInfo_r13__si_WindowLength_BR_r13_spare] = { 20, 40, 60, 80, 120, 160, 200 };
[SystemInformationBlockType1_v1310_IEs__bandwidthReducedAccessRelatedInfo_r13__si_WindowLength_BR_r13_spare] int si_TBS_r13tab[SchedulingInfo_BR_r13__si_TBS_r13_b936 + 1] = { 152, 208, 256, 328, 408, 504, 600, 712, 808, 936 };
= { 20, 40, 60, 80, 120, 160, 200 };
int si_TBS_r13tab[SchedulingInfo_BR_r13__si_TBS_r13_b936 + 1] =
{ 152, 208, 256, 328, 408, 504, 600, 712, 808, 936 };
//------------------------------------------------------------------------------ //------------------------------------------------------------------------------
void void
@@ -354,65 +341,40 @@ schedule_SI_BR(module_id_t module_idP, frame_t frameP,
if (cc->mib->message.schedulingInfoSIB1_BR_r13 == 0) if (cc->mib->message.schedulingInfoSIB1_BR_r13 == 0)
continue; continue;
else { else {
AssertFatal(cc->sib1_v13ext->bandwidthReducedAccessRelatedInfo_r13 != NULL,
AssertFatal(cc->
sib1_v13ext->bandwidthReducedAccessRelatedInfo_r13
!= NULL,
"sib_v13ext->bandwidthReducedAccessRelatedInfo_r13 is null\n"); "sib_v13ext->bandwidthReducedAccessRelatedInfo_r13 is null\n");
SchedulingInfoList_BR_r13_t *schedulingInfoList_BR_r13 = SchedulingInfoList_BR_r13_t *schedulingInfoList_BR_r13 = cc->sib1_v13ext->bandwidthReducedAccessRelatedInfo_r13->schedulingInfoList_BR_r13;
cc->sib1_v13ext->
bandwidthReducedAccessRelatedInfo_r13->schedulingInfoList_BR_r13;
AssertFatal(schedulingInfoList_BR_r13 != NULL, AssertFatal(schedulingInfoList_BR_r13 != NULL,
"sib_v13ext->schedulingInfoList_BR_r13 is null\n"); "sib_v13ext->schedulingInfoList_BR_r13 is null\n");
SchedulingInfoList_t *schedulingInfoList = SchedulingInfoList_t *schedulingInfoList = cc->schedulingInfoList;
cc->schedulingInfoList; AssertFatal(schedulingInfoList_BR_r13->list.count == schedulingInfoList->list.count,
AssertFatal(schedulingInfoList_BR_r13->list.count ==
schedulingInfoList->list.count,
"schedulingInfolist_BR.r13->list.count %d != schedulingInfoList.list.count %d\n", "schedulingInfolist_BR.r13->list.count %d != schedulingInfoList.list.count %d\n",
schedulingInfoList_BR_r13->list.count, schedulingInfoList_BR_r13->list.count,
schedulingInfoList->list.count); schedulingInfoList->list.count);
AssertFatal(cc-> AssertFatal(cc->sib1_v13ext->bandwidthReducedAccessRelatedInfo_r13->si_WindowLength_BR_r13<=SystemInformationBlockType1_v1310_IEs__bandwidthReducedAccessRelatedInfo_r13__si_WindowLength_BR_r13_ms200,
sib1_v13ext->bandwidthReducedAccessRelatedInfo_r13->si_WindowLength_BR_r13
<=
SystemInformationBlockType1_v1310_IEs__bandwidthReducedAccessRelatedInfo_r13__si_WindowLength_BR_r13_ms200,
"si_WindowLength_BR_r13 %d > %d\n", "si_WindowLength_BR_r13 %d > %d\n",
(int) cc-> (int) cc->sib1_v13ext->bandwidthReducedAccessRelatedInfo_r13->si_WindowLength_BR_r13,
sib1_v13ext->bandwidthReducedAccessRelatedInfo_r13->si_WindowLength_BR_r13,
SystemInformationBlockType1_v1310_IEs__bandwidthReducedAccessRelatedInfo_r13__si_WindowLength_BR_r13_ms200); SystemInformationBlockType1_v1310_IEs__bandwidthReducedAccessRelatedInfo_r13__si_WindowLength_BR_r13_ms200);
// check that SI frequency-hopping is disabled // check that SI frequency-hopping is disabled
AssertFatal(cc-> AssertFatal(cc->sib1_v13ext->bandwidthReducedAccessRelatedInfo_r13->si_HoppingConfigCommon_r13 == SystemInformationBlockType1_v1310_IEs__bandwidthReducedAccessRelatedInfo_r13__si_HoppingConfigCommon_r13_off,
sib1_v13ext->bandwidthReducedAccessRelatedInfo_r13->si_HoppingConfigCommon_r13
==
SystemInformationBlockType1_v1310_IEs__bandwidthReducedAccessRelatedInfo_r13__si_HoppingConfigCommon_r13_off,
"Deactivate SI_HoppingConfigCommon_r13 in configuration file, not supported for now\n"); "Deactivate SI_HoppingConfigCommon_r13 in configuration file, not supported for now\n");
long si_WindowLength_BR_r13 = long si_WindowLength_BR_r13 = si_WindowLength_BR_r13tab[cc->sib1_v13ext->bandwidthReducedAccessRelatedInfo_r13->si_WindowLength_BR_r13];
si_WindowLength_BR_r13tab[cc->
sib1_v13ext->bandwidthReducedAccessRelatedInfo_r13->si_WindowLength_BR_r13];
long si_RepetitionPattern_r13 = long si_RepetitionPattern_r13 = cc->sib1_v13ext->bandwidthReducedAccessRelatedInfo_r13->si_RepetitionPattern_r13;
cc->sib1_v13ext-> AssertFatal(si_RepetitionPattern_r13<=SystemInformationBlockType1_v1310_IEs__bandwidthReducedAccessRelatedInfo_r13__si_RepetitionPattern_r13_every8thRF,
bandwidthReducedAccessRelatedInfo_r13->si_RepetitionPattern_r13;
AssertFatal(si_RepetitionPattern_r13 <=
SystemInformationBlockType1_v1310_IEs__bandwidthReducedAccessRelatedInfo_r13__si_RepetitionPattern_r13_every8thRF,
"si_RepetitionPattern_r13 %d > %d\n", "si_RepetitionPattern_r13 %d > %d\n",
(int) si_RepetitionPattern_r13, (int) si_RepetitionPattern_r13,
SystemInformationBlockType1_v1310_IEs__bandwidthReducedAccessRelatedInfo_r13__si_RepetitionPattern_r13_every8thRF); SystemInformationBlockType1_v1310_IEs__bandwidthReducedAccessRelatedInfo_r13__si_RepetitionPattern_r13_every8thRF);
// cycle through SIB list // cycle through SIB list
for (i = 0; i < schedulingInfoList_BR_r13->list.count; i++) { for (i = 0; i < schedulingInfoList_BR_r13->list.count; i++) {
long si_Periodicity = long si_Periodicity = schedulingInfoList->list.array[i]->si_Periodicity;
schedulingInfoList->list.array[i]->si_Periodicity; long si_Narrowband_r13 = schedulingInfoList_BR_r13->list.array[i]->si_Narrowband_r13;
long si_Narrowband_r13 = long si_TBS_r13 = si_TBS_r13tab[schedulingInfoList_BR_r13->list.array[i]->si_TBS_r13];
schedulingInfoList_BR_r13->list.array[i]->
si_Narrowband_r13;
long si_TBS_r13 =
si_TBS_r13tab[schedulingInfoList_BR_r13->
list.array[i]->si_TBS_r13];
// check if the SI is to be scheduled now // check if the SI is to be scheduled now
int period_in_sf = 80 << si_Periodicity; // 2^i * 80 subframes, note: si_Periodicity is 2^i * 80ms int period_in_sf = 80 << si_Periodicity; // 2^i * 80 subframes, note: si_Periodicity is 2^i * 80ms
@@ -434,18 +396,14 @@ schedule_SI_BR(module_id_t module_idP, frame_t frameP,
"RRC provided bcch with length %d > %d (si_TBS_r13 %d)\n", "RRC provided bcch with length %d > %d (si_TBS_r13 %d)\n",
bcch_sdu_length, bcch_sdu_length,
(int) (si_TBS_r13 >> 3), (int) (si_TBS_r13 >> 3),
(int) schedulingInfoList_BR_r13-> (int) schedulingInfoList_BR_r13->list.array[i]->si_TBS_r13);
list.array[i]->si_TBS_r13);
// allocate all 6 PRBs in narrowband for SIB1_BR // allocate all 6 PRBs in narrowband for SIB1_BR
// check that SIB1 didn't take this narrowband // check that SIB1 didn't take this narrowband
if (vrb_map[first_rb] > 0) if (vrb_map[first_rb] > 0) continue;
continue;
first_rb = first_rb = narrowband_to_first_rb(cc,si_Narrowband_r13 - 1);
narrowband_to_first_rb(cc,
si_Narrowband_r13 - 1);
vrb_map[first_rb] = 1; vrb_map[first_rb] = 1;
vrb_map[first_rb + 1] = 1; vrb_map[first_rb + 1] = 1;
vrb_map[first_rb + 2] = 1; vrb_map[first_rb + 2] = 1;
@@ -465,89 +423,54 @@ schedule_SI_BR(module_id_t module_idP, frame_t frameP,
dl_config_pdu = dl_config_pdu = &dl_req->dl_config_pdu_list[dl_req->number_pdu];
&dl_req->dl_config_pdu_list[dl_req-> memset((void *) dl_config_pdu, 0, sizeof(nfapi_dl_config_request_pdu_t));
number_pdu]; dl_config_pdu->pdu_type = NFAPI_DL_CONFIG_DLSCH_PDU_TYPE;
memset((void *) dl_config_pdu, 0, dl_config_pdu->pdu_size = (uint8_t) (2 + sizeof(nfapi_dl_config_dlsch_pdu));
sizeof(nfapi_dl_config_request_pdu_t));
dl_config_pdu->pdu_type =
NFAPI_DL_CONFIG_DLSCH_PDU_TYPE;
dl_config_pdu->pdu_size =
(uint8_t) (2 +
sizeof(nfapi_dl_config_dlsch_pdu));
dl_config_pdu->dlsch_pdu.dlsch_pdu_rel8.tl.tag = NFAPI_DL_CONFIG_REQUEST_DLSCH_PDU_REL8_TAG; dl_config_pdu->dlsch_pdu.dlsch_pdu_rel8.tl.tag = NFAPI_DL_CONFIG_REQUEST_DLSCH_PDU_REL8_TAG;
dl_config_pdu->dlsch_pdu.dlsch_pdu_rel8.length = dl_config_pdu->dlsch_pdu.dlsch_pdu_rel8.length = si_TBS_r13 >> 3;
si_TBS_r13 >> 3; dl_config_pdu->dlsch_pdu.dlsch_pdu_rel8.pdu_index = eNB->pdu_index[CC_id];
dl_config_pdu->dlsch_pdu.dlsch_pdu_rel8.pdu_index = dl_config_pdu->dlsch_pdu.dlsch_pdu_rel8.rnti = 0xFFFF;
eNB->pdu_index[CC_id];
dl_config_pdu->dlsch_pdu.dlsch_pdu_rel8.rnti =
0xFFFF;
dl_config_pdu->dlsch_pdu.dlsch_pdu_rel8.resource_allocation_type = 2; // format 1A/1B/1D dl_config_pdu->dlsch_pdu.dlsch_pdu_rel8.resource_allocation_type = 2; // format 1A/1B/1D
dl_config_pdu->dlsch_pdu.dlsch_pdu_rel8.virtual_resource_block_assignment_flag = 0; // localized dl_config_pdu->dlsch_pdu.dlsch_pdu_rel8.virtual_resource_block_assignment_flag = 0; // localized
dl_config_pdu->dlsch_pdu. dl_config_pdu->dlsch_pdu.dlsch_pdu_rel8.resource_block_coding = getRIV(N_RB_DL, first_rb, 6);
dlsch_pdu_rel8.resource_block_coding =
getRIV(N_RB_DL, first_rb, 6);
dl_config_pdu->dlsch_pdu.dlsch_pdu_rel8.modulation = 2; //QPSK dl_config_pdu->dlsch_pdu.dlsch_pdu_rel8.modulation = 2; //QPSK
dl_config_pdu->dlsch_pdu. dl_config_pdu->dlsch_pdu.dlsch_pdu_rel8.redundancy_version = rvidx;
dlsch_pdu_rel8.redundancy_version = rvidx;
dl_config_pdu->dlsch_pdu.dlsch_pdu_rel8.transport_blocks = 1; // first block dl_config_pdu->dlsch_pdu.dlsch_pdu_rel8.transport_blocks = 1; // first block
dl_config_pdu->dlsch_pdu. dl_config_pdu->dlsch_pdu.dlsch_pdu_rel8.transport_block_to_codeword_swap_flag = 0;
dlsch_pdu_rel8.transport_block_to_codeword_swap_flag dl_config_pdu->dlsch_pdu.dlsch_pdu_rel8.transmission_scheme = (cc->p_eNB == 1) ? 0 : 1;
= 0; dl_config_pdu->dlsch_pdu.dlsch_pdu_rel8.number_of_layers = 1;
dl_config_pdu->dlsch_pdu. dl_config_pdu->dlsch_pdu.dlsch_pdu_rel8.number_of_subbands = 1;
dlsch_pdu_rel8.transmission_scheme =
(cc->p_eNB == 1) ? 0 : 1;
dl_config_pdu->dlsch_pdu.
dlsch_pdu_rel8.number_of_layers = 1;
dl_config_pdu->dlsch_pdu.
dlsch_pdu_rel8.number_of_subbands = 1;
// dl_config_pdu->dlsch_pdu.dlsch_pdu_rel8.codebook_index = ; // dl_config_pdu->dlsch_pdu.dlsch_pdu_rel8.codebook_index = ;
dl_config_pdu->dlsch_pdu. dl_config_pdu->dlsch_pdu.dlsch_pdu_rel8.ue_category_capacity = 1;
dlsch_pdu_rel8.ue_category_capacity = 1;
dl_config_pdu->dlsch_pdu.dlsch_pdu_rel8.pa = 4; // 0 dB dl_config_pdu->dlsch_pdu.dlsch_pdu_rel8.pa = 4; // 0 dB
dl_config_pdu->dlsch_pdu. dl_config_pdu->dlsch_pdu.dlsch_pdu_rel8.delta_power_offset_index = 0;
dlsch_pdu_rel8.delta_power_offset_index = 0;
dl_config_pdu->dlsch_pdu.dlsch_pdu_rel8.ngap = 0; dl_config_pdu->dlsch_pdu.dlsch_pdu_rel8.ngap = 0;
dl_config_pdu->dlsch_pdu.dlsch_pdu_rel8.nprb = get_subbandsize(cc->mib->message.dl_Bandwidth); // ignored dl_config_pdu->dlsch_pdu.dlsch_pdu_rel8.nprb = get_subbandsize(cc->mib->message.dl_Bandwidth); // ignored
dl_config_pdu->dlsch_pdu. dl_config_pdu->dlsch_pdu.dlsch_pdu_rel8.transmission_mode = (cc->p_eNB == 1) ? 1 : 2;
dlsch_pdu_rel8.transmission_mode = dl_config_pdu->dlsch_pdu.dlsch_pdu_rel8.num_bf_prb_per_subband = 1;
(cc->p_eNB == 1) ? 1 : 2; dl_config_pdu->dlsch_pdu.dlsch_pdu_rel8.num_bf_vector = 1;
dl_config_pdu->dlsch_pdu.
dlsch_pdu_rel8.num_bf_prb_per_subband = 1;
dl_config_pdu->dlsch_pdu.dlsch_pdu_rel8.
num_bf_vector = 1;
// Rel10 fields (for PDSCH starting symbol) // Rel10 fields (for PDSCH starting symbol)
dl_config_pdu->dlsch_pdu.dlsch_pdu_rel10.tl.tag = NFAPI_DL_CONFIG_REQUEST_DLSCH_PDU_REL10_TAG; dl_config_pdu->dlsch_pdu.dlsch_pdu_rel10.tl.tag = NFAPI_DL_CONFIG_REQUEST_DLSCH_PDU_REL10_TAG;
dl_config_pdu->dlsch_pdu.dlsch_pdu_rel10. dl_config_pdu->dlsch_pdu.dlsch_pdu_rel10.pdsch_start = cc[CC_id].sib1_v13ext->bandwidthReducedAccessRelatedInfo_r13->startSymbolBR_r13;
pdsch_start =
cc[CC_id].
sib1_v13ext->bandwidthReducedAccessRelatedInfo_r13->startSymbolBR_r13;
// Rel13 fields // Rel13 fields
dl_config_pdu->dlsch_pdu.dlsch_pdu_rel13.tl.tag = NFAPI_DL_CONFIG_REQUEST_DLSCH_PDU_REL13_TAG; dl_config_pdu->dlsch_pdu.dlsch_pdu_rel13.tl.tag = NFAPI_DL_CONFIG_REQUEST_DLSCH_PDU_REL13_TAG;
dl_config_pdu->dlsch_pdu.dlsch_pdu_rel13.ue_type = 1; // CEModeA UE dl_config_pdu->dlsch_pdu.dlsch_pdu_rel13.ue_type = 1; // CEModeA UE
dl_config_pdu->dlsch_pdu.dlsch_pdu_rel13.pdsch_payload_type = 1; // SI-BR dl_config_pdu->dlsch_pdu.dlsch_pdu_rel13.pdsch_payload_type = 1; // SI-BR
dl_config_pdu->dlsch_pdu. dl_config_pdu->dlsch_pdu.dlsch_pdu_rel13.initial_transmission_sf_io = absSF - sf_mod_period;
dlsch_pdu_rel13.initial_transmission_sf_io =
absSF - sf_mod_period;
// dl_config_pdu->dlsch_pdu.dlsch_pdu_rel8.bf_vector = ; // dl_config_pdu->dlsch_pdu.dlsch_pdu_rel8.bf_vector = ;
dl_req->number_pdu++; dl_req->number_pdu++;
dl_req->tl.tag = NFAPI_DL_CONFIG_REQUEST_BODY_TAG; dl_req->tl.tag = NFAPI_DL_CONFIG_REQUEST_BODY_TAG;
// Program TX Request // Program TX Request
TX_req = TX_req = &eNB->TX_req[CC_id].tx_request_body.tx_pdu_list[eNB->TX_req[CC_id].tx_request_body.number_of_pdus];
&eNB->TX_req[CC_id].
tx_request_body.tx_pdu_list[eNB->TX_req[CC_id].
tx_request_body.number_of_pdus];
TX_req->pdu_length = bcch_sdu_length; TX_req->pdu_length = bcch_sdu_length;
TX_req->pdu_index = eNB->pdu_index[CC_id]++; TX_req->pdu_index = eNB->pdu_index[CC_id]++;
TX_req->num_segments = 1; TX_req->num_segments = 1;
TX_req->segments[0].segment_length = TX_req->segments[0].segment_length = bcch_sdu_length;
bcch_sdu_length; TX_req->segments[0].segment_data = cc->BCCH_BR_pdu[i + 1].payload;
TX_req->segments[0].segment_data = eNB->TX_req[CC_id].tx_request_body.number_of_pdus++;
cc->BCCH_BR_pdu[i + 1].payload;
eNB->TX_req[CC_id].tx_request_body.
number_of_pdus++;
eNB->TX_req[CC_id].sfn_sf = sfn_sf; eNB->TX_req[CC_id].sfn_sf = sfn_sf;
eNB->TX_req[CC_id].tx_request_body.tl.tag = NFAPI_TX_REQUEST_BODY_TAG; eNB->TX_req[CC_id].tx_request_body.tl.tag = NFAPI_TX_REQUEST_BODY_TAG;
eNB->TX_req[CC_id].header.message_id = NFAPI_TX_REQUEST; eNB->TX_req[CC_id].header.message_id = NFAPI_TX_REQUEST;
@@ -615,22 +538,25 @@ schedule_mib(module_id_t module_idP, frame_t frameP, sub_frame_t subframeP)
LOG_D(MAC, "Frame %d, subframe %d: Adding BCH PDU in position %d (length %d)\n", frameP, subframeP, dl_req->number_pdu, mib_sdu_length); LOG_D(MAC, "Frame %d, subframe %d: Adding BCH PDU in position %d (length %d)\n", frameP, subframeP, dl_req->number_pdu, mib_sdu_length);
if ((frameP & 1023) < 40) if ((frameP & 1023) < 40)
#ifdef Rel14
LOG_D(MAC, LOG_D(MAC,
"[eNB %d] Frame %d : MIB->BCH CC_id %d, Received %d bytes (cc->mib->message.schedulingInfoSIB1_BR_r13 %d)\n", "[eNB %d] Frame %d : MIB->BCH CC_id %d, Received %d bytes (cc->mib->message.schedulingInfoSIB1_BR_r13 %d)\n",
module_idP, frameP, CC_id, mib_sdu_length, module_idP, frameP, CC_id, mib_sdu_length,
(int) cc->mib->message.schedulingInfoSIB1_BR_r13); (int) cc->mib->message.schedulingInfoSIB1_BR_r13);
#else
LOG_D(MAC,
"[eNB %d] Frame %d : MIB->BCH CC_id %d, Received %d bytes\n",
module_idP, frameP, CC_id, mib_sdu_length);
#endif
dl_config_pdu = dl_config_pdu = &dl_req->dl_config_pdu_list[dl_req->number_pdu];
&dl_req->dl_config_pdu_list[dl_req->number_pdu];
memset((void *) dl_config_pdu, 0, memset((void *) dl_config_pdu, 0,
sizeof(nfapi_dl_config_request_pdu_t)); sizeof(nfapi_dl_config_request_pdu_t));
dl_config_pdu->pdu_type = dl_config_pdu->pdu_type = NFAPI_DL_CONFIG_BCH_PDU_TYPE, dl_config_pdu->pdu_size =
NFAPI_DL_CONFIG_BCH_PDU_TYPE, dl_config_pdu->pdu_size =
2 + sizeof(nfapi_dl_config_bch_pdu); 2 + sizeof(nfapi_dl_config_bch_pdu);
dl_config_pdu->bch_pdu.bch_pdu_rel8.tl.tag = NFAPI_DL_CONFIG_REQUEST_BCH_PDU_REL8_TAG; dl_config_pdu->bch_pdu.bch_pdu_rel8.tl.tag = NFAPI_DL_CONFIG_REQUEST_BCH_PDU_REL8_TAG;
dl_config_pdu->bch_pdu.bch_pdu_rel8.length = mib_sdu_length; dl_config_pdu->bch_pdu.bch_pdu_rel8.length = mib_sdu_length;
dl_config_pdu->bch_pdu.bch_pdu_rel8.pdu_index = dl_config_pdu->bch_pdu.bch_pdu_rel8.pdu_index = eNB->pdu_index[CC_id];
eNB->pdu_index[CC_id];
dl_config_pdu->bch_pdu.bch_pdu_rel8.transmission_power = 6000; dl_config_pdu->bch_pdu.bch_pdu_rel8.transmission_power = 6000;
dl_req->tl.tag = NFAPI_DL_CONFIG_REQUEST_BODY_TAG; dl_req->tl.tag = NFAPI_DL_CONFIG_REQUEST_BODY_TAG;
dl_req->number_pdu++; dl_req->number_pdu++;
@@ -641,9 +567,7 @@ schedule_mib(module_id_t module_idP, frame_t frameP, sub_frame_t subframeP)
LOG_D(MAC, "eNB->DL_req[0].number_pdu %d (%p)\n", dl_req->number_pdu, &dl_req->number_pdu); LOG_D(MAC, "eNB->DL_req[0].number_pdu %d (%p)\n", dl_req->number_pdu, &dl_req->number_pdu);
// DL request // DL request
TX_req = TX_req = &eNB->TX_req[CC_id].tx_request_body.tx_pdu_list[eNB->TX_req[CC_id].tx_request_body.number_of_pdus];
&eNB->TX_req[CC_id].tx_request_body.tx_pdu_list[eNB->TX_req
[CC_id].tx_request_body.number_of_pdus];
TX_req->pdu_length = 3; TX_req->pdu_length = 3;
TX_req->pdu_index = eNB->pdu_index[CC_id]++; TX_req->pdu_index = eNB->pdu_index[CC_id]++;
TX_req->num_segments = 1; TX_req->num_segments = 1;
@@ -753,88 +677,59 @@ schedule_SI(module_id_t module_idP, frame_t frameP, sub_frame_t subframeP)
} }
dl_config_pdu = dl_config_pdu = &dl_req->dl_config_pdu_list[dl_req->number_pdu];
&dl_req->dl_config_pdu_list[dl_req->number_pdu];
memset((void *) dl_config_pdu, 0, memset((void *) dl_config_pdu, 0,
sizeof(nfapi_dl_config_request_pdu_t)); sizeof(nfapi_dl_config_request_pdu_t));
dl_config_pdu->pdu_type = NFAPI_DL_CONFIG_DCI_DL_PDU_TYPE; dl_config_pdu->pdu_type = NFAPI_DL_CONFIG_DCI_DL_PDU_TYPE;
dl_config_pdu->pdu_size = dl_config_pdu->pdu_size = (uint8_t) (2 + sizeof(nfapi_dl_config_dci_dl_pdu));
(uint8_t) (2 + sizeof(nfapi_dl_config_dci_dl_pdu));
dl_config_pdu->dci_dl_pdu.dci_dl_pdu_rel8.tl.tag = NFAPI_DL_CONFIG_REQUEST_DCI_DL_PDU_REL8_TAG; dl_config_pdu->dci_dl_pdu.dci_dl_pdu_rel8.tl.tag = NFAPI_DL_CONFIG_REQUEST_DCI_DL_PDU_REL8_TAG;
dl_config_pdu->dci_dl_pdu.dci_dl_pdu_rel8.dci_format = dl_config_pdu->dci_dl_pdu.dci_dl_pdu_rel8.dci_format = NFAPI_DL_DCI_FORMAT_1A;
NFAPI_DL_DCI_FORMAT_1A; dl_config_pdu->dci_dl_pdu.dci_dl_pdu_rel8.aggregation_level = 4;
dl_config_pdu->dci_dl_pdu.dci_dl_pdu_rel8.
aggregation_level = 4;
dl_config_pdu->dci_dl_pdu.dci_dl_pdu_rel8.rnti = 0xFFFF; dl_config_pdu->dci_dl_pdu.dci_dl_pdu_rel8.rnti = 0xFFFF;
dl_config_pdu->dci_dl_pdu.dci_dl_pdu_rel8.rnti_type = 2; // S-RNTI : see Table 4-10 from SCF082 - nFAPI specifications dl_config_pdu->dci_dl_pdu.dci_dl_pdu_rel8.rnti_type = 2; // S-RNTI : see Table 4-10 from SCF082 - nFAPI specifications
dl_config_pdu->dci_dl_pdu.dci_dl_pdu_rel8.transmission_power = 6000; // equal to RS power dl_config_pdu->dci_dl_pdu.dci_dl_pdu_rel8.transmission_power = 6000; // equal to RS power
dl_config_pdu->dci_dl_pdu.dci_dl_pdu_rel8.harq_process = 0; dl_config_pdu->dci_dl_pdu.dci_dl_pdu_rel8.harq_process = 0;
dl_config_pdu->dci_dl_pdu.dci_dl_pdu_rel8.tpc = 1; // no TPC dl_config_pdu->dci_dl_pdu.dci_dl_pdu_rel8.tpc = 1; // no TPC
dl_config_pdu->dci_dl_pdu.dci_dl_pdu_rel8. dl_config_pdu->dci_dl_pdu.dci_dl_pdu_rel8.new_data_indicator_1 = 0;
new_data_indicator_1 = 0;
dl_config_pdu->dci_dl_pdu.dci_dl_pdu_rel8.mcs_1 = mcs; dl_config_pdu->dci_dl_pdu.dci_dl_pdu_rel8.mcs_1 = mcs;
dl_config_pdu->dci_dl_pdu.dci_dl_pdu_rel8. dl_config_pdu->dci_dl_pdu.dci_dl_pdu_rel8.redundancy_version_1 = 0;
redundancy_version_1 = 0;
dl_config_pdu->dci_dl_pdu. dl_config_pdu->dci_dl_pdu.dci_dl_pdu_rel8.resource_block_coding = getRIV(N_RB_DL, first_rb, 4);
dci_dl_pdu_rel8.resource_block_coding =
getRIV(N_RB_DL, first_rb, 4);
dl_config_request->sfn_sf = sfn_sf; dl_config_request->sfn_sf = sfn_sf;
if (!CCE_allocation_infeasible if (!CCE_allocation_infeasible(module_idP, CC_id, 0, subframeP,dl_config_pdu->dci_dl_pdu.dci_dl_pdu_rel8.aggregation_level, SI_RNTI)) {
(module_idP, CC_id, 0, subframeP,
dl_config_pdu->dci_dl_pdu.
dci_dl_pdu_rel8.aggregation_level, SI_RNTI)) {
LOG_D(MAC, "Frame %d: Subframe %d : Adding common DCI for S_RNTI\n", frameP, subframeP); LOG_D(MAC, "Frame %d: Subframe %d : Adding common DCI for S_RNTI\n", frameP, subframeP);
dl_req->number_dci++; dl_req->number_dci++;
dl_req->number_pdu++; dl_req->number_pdu++;
dl_config_pdu = dl_config_pdu = &dl_req->dl_config_pdu_list[dl_req->number_pdu];
&dl_req->dl_config_pdu_list[dl_req->number_pdu];
memset((void *) dl_config_pdu, 0, memset((void *) dl_config_pdu, 0,
sizeof(nfapi_dl_config_request_pdu_t)); sizeof(nfapi_dl_config_request_pdu_t));
dl_config_pdu->pdu_type = dl_config_pdu->pdu_type = NFAPI_DL_CONFIG_DLSCH_PDU_TYPE;
NFAPI_DL_CONFIG_DLSCH_PDU_TYPE; dl_config_pdu->pdu_size = (uint8_t) (2 + sizeof(nfapi_dl_config_dlsch_pdu));
dl_config_pdu->pdu_size = dl_config_pdu->dlsch_pdu.dlsch_pdu_rel8.pdu_index = eNB->pdu_index[CC_id];
(uint8_t) (2 + sizeof(nfapi_dl_config_dlsch_pdu));
dl_config_pdu->dlsch_pdu.dlsch_pdu_rel8.pdu_index =
eNB->pdu_index[CC_id];
dl_config_pdu->dlsch_pdu.dlsch_pdu_rel8.tl.tag = NFAPI_DL_CONFIG_REQUEST_DLSCH_PDU_REL8_TAG; dl_config_pdu->dlsch_pdu.dlsch_pdu_rel8.tl.tag = NFAPI_DL_CONFIG_REQUEST_DLSCH_PDU_REL8_TAG;
dl_config_pdu->dlsch_pdu.dlsch_pdu_rel8.length = bcch_sdu_length; dl_config_pdu->dlsch_pdu.dlsch_pdu_rel8.length = bcch_sdu_length;
dl_config_pdu->dlsch_pdu.dlsch_pdu_rel8.rnti = 0xFFFF; dl_config_pdu->dlsch_pdu.dlsch_pdu_rel8.rnti = 0xFFFF;
dl_config_pdu->dlsch_pdu.dlsch_pdu_rel8.resource_allocation_type = 2; // format 1A/1B/1D dl_config_pdu->dlsch_pdu.dlsch_pdu_rel8.resource_allocation_type = 2; // format 1A/1B/1D
dl_config_pdu->dlsch_pdu.dlsch_pdu_rel8.virtual_resource_block_assignment_flag = 0; // localized dl_config_pdu->dlsch_pdu.dlsch_pdu_rel8.virtual_resource_block_assignment_flag = 0; // localized
dl_config_pdu->dlsch_pdu. dl_config_pdu->dlsch_pdu.dlsch_pdu_rel8.resource_block_coding = getRIV(N_RB_DL, first_rb, 4);
dlsch_pdu_rel8.resource_block_coding =
getRIV(N_RB_DL, first_rb, 4);
dl_config_pdu->dlsch_pdu.dlsch_pdu_rel8.modulation = 2; //QPSK dl_config_pdu->dlsch_pdu.dlsch_pdu_rel8.modulation = 2; //QPSK
dl_config_pdu->dlsch_pdu.dlsch_pdu_rel8. dl_config_pdu->dlsch_pdu.dlsch_pdu_rel8.redundancy_version = 0;
redundancy_version = 0;
dl_config_pdu->dlsch_pdu.dlsch_pdu_rel8.transport_blocks = 1; // first block dl_config_pdu->dlsch_pdu.dlsch_pdu_rel8.transport_blocks = 1; // first block
dl_config_pdu->dlsch_pdu. dl_config_pdu->dlsch_pdu.dlsch_pdu_rel8.transport_block_to_codeword_swap_flag = 0;
dlsch_pdu_rel8.transport_block_to_codeword_swap_flag dl_config_pdu->dlsch_pdu.dlsch_pdu_rel8.transmission_scheme = (cc->p_eNB == 1) ? 0 : 1;
= 0; dl_config_pdu->dlsch_pdu.dlsch_pdu_rel8.number_of_layers = 1;
dl_config_pdu->dlsch_pdu. dl_config_pdu->dlsch_pdu.dlsch_pdu_rel8.number_of_subbands = 1;
dlsch_pdu_rel8.transmission_scheme =
(cc->p_eNB == 1) ? 0 : 1;
dl_config_pdu->dlsch_pdu.dlsch_pdu_rel8.
number_of_layers = 1;
dl_config_pdu->dlsch_pdu.dlsch_pdu_rel8.
number_of_subbands = 1;
// dl_config_pdu->dlsch_pdu.dlsch_pdu_rel8.codebook_index = ; // dl_config_pdu->dlsch_pdu.dlsch_pdu_rel8.codebook_index = ;
dl_config_pdu->dlsch_pdu. dl_config_pdu->dlsch_pdu.dlsch_pdu_rel8.ue_category_capacity = 1;
dlsch_pdu_rel8.ue_category_capacity = 1;
dl_config_pdu->dlsch_pdu.dlsch_pdu_rel8.pa = 4; // 0 dB dl_config_pdu->dlsch_pdu.dlsch_pdu_rel8.pa = 4; // 0 dB
dl_config_pdu->dlsch_pdu. dl_config_pdu->dlsch_pdu.dlsch_pdu_rel8.delta_power_offset_index = 0;
dlsch_pdu_rel8.delta_power_offset_index = 0;
dl_config_pdu->dlsch_pdu.dlsch_pdu_rel8.ngap = 0; dl_config_pdu->dlsch_pdu.dlsch_pdu_rel8.ngap = 0;
dl_config_pdu->dlsch_pdu.dlsch_pdu_rel8.nprb = get_subbandsize(cc->mib->message.dl_Bandwidth); // ignored dl_config_pdu->dlsch_pdu.dlsch_pdu_rel8.nprb = get_subbandsize(cc->mib->message.dl_Bandwidth); // ignored
dl_config_pdu->dlsch_pdu.dlsch_pdu_rel8. dl_config_pdu->dlsch_pdu.dlsch_pdu_rel8.transmission_mode = (cc->p_eNB == 1) ? 1 : 2;
transmission_mode = (cc->p_eNB == 1) ? 1 : 2; dl_config_pdu->dlsch_pdu.dlsch_pdu_rel8.num_bf_prb_per_subband = 1;
dl_config_pdu->dlsch_pdu. dl_config_pdu->dlsch_pdu.dlsch_pdu_rel8.num_bf_vector = 1;
dlsch_pdu_rel8.num_bf_prb_per_subband = 1;
dl_config_pdu->dlsch_pdu.dlsch_pdu_rel8.num_bf_vector =
1;
// dl_config_pdu->dlsch_pdu.dlsch_pdu_rel8.bf_vector = ; // dl_config_pdu->dlsch_pdu.dlsch_pdu_rel8.bf_vector = ;
dl_req->number_pdu++; dl_req->number_pdu++;
@@ -851,16 +746,12 @@ schedule_SI(module_id_t module_idP, frame_t frameP, sub_frame_t subframeP)
dl_config_request->sfn_sf = sfn_sf; dl_config_request->sfn_sf = sfn_sf;
// Program TX Request // Program TX Request
TX_req = TX_req = &eNB->TX_req[CC_id].tx_request_body.tx_pdu_list[eNB->TX_req[CC_id].tx_request_body.number_of_pdus];
&eNB->TX_req[CC_id].
tx_request_body.tx_pdu_list[eNB->TX_req[CC_id].
tx_request_body.number_of_pdus];
TX_req->pdu_length = bcch_sdu_length; TX_req->pdu_length = bcch_sdu_length;
TX_req->pdu_index = eNB->pdu_index[CC_id]++; TX_req->pdu_index = eNB->pdu_index[CC_id]++;
TX_req->num_segments = 1; TX_req->num_segments = 1;
TX_req->segments[0].segment_length = bcch_sdu_length; TX_req->segments[0].segment_length = bcch_sdu_length;
TX_req->segments[0].segment_data = TX_req->segments[0].segment_data = cc->BCCH_pdu.payload;
cc->BCCH_pdu.payload;
eNB->TX_req[CC_id].tx_request_body.number_of_pdus++; eNB->TX_req[CC_id].tx_request_body.number_of_pdus++;
eNB->TX_req[CC_id].sfn_sf = sfn_sf; eNB->TX_req[CC_id].sfn_sf = sfn_sf;
eNB->TX_req[CC_id].tx_request_body.tl.tag = NFAPI_TX_REQUEST_BODY_TAG; eNB->TX_req[CC_id].tx_request_body.tl.tag = NFAPI_TX_REQUEST_BODY_TAG;
+110 -275
View File
@@ -142,10 +142,8 @@ schedule_next_dlue(module_id_t module_idP, int CC_id,
for (next_ue = UE_list->head; next_ue >= 0; for (next_ue = UE_list->head; next_ue >= 0;
next_ue = UE_list->next[next_ue]) { next_ue = UE_list->next[next_ue]) {
if (eNB_dlsch_info[module_idP][CC_id][next_ue].status == if (eNB_dlsch_info[module_idP][CC_id][next_ue].status == S_DL_BUFFERED) {
S_DL_BUFFERED) { eNB_dlsch_info[module_idP][CC_id][next_ue].status = S_DL_WAITING;
eNB_dlsch_info[module_idP][CC_id][next_ue].status =
S_DL_WAITING;
} }
} }
@@ -167,8 +165,7 @@ generate_dlsch_header(unsigned char *mac_header,
//------------------------------------------------------------------------------ //------------------------------------------------------------------------------
{ {
SCH_SUBHEADER_FIXED *mac_header_ptr = SCH_SUBHEADER_FIXED *mac_header_ptr = (SCH_SUBHEADER_FIXED *) mac_header;
(SCH_SUBHEADER_FIXED *) mac_header;
uint8_t first_element = 0, last_size = 0, i; uint8_t first_element = 0, last_size = 0, i;
uint8_t mac_header_control_elements[16], *ce_ptr; uint8_t mac_header_control_elements[16], *ce_ptr;
@@ -282,18 +279,15 @@ generate_dlsch_header(unsigned char *mac_header,
((SCH_SUBHEADER_SHORT *) mac_header_ptr)->E = 0; ((SCH_SUBHEADER_SHORT *) mac_header_ptr)->E = 0;
((SCH_SUBHEADER_SHORT *) mac_header_ptr)->F = 0; ((SCH_SUBHEADER_SHORT *) mac_header_ptr)->F = 0;
((SCH_SUBHEADER_SHORT *) mac_header_ptr)->LCID = sdu_lcids[i]; ((SCH_SUBHEADER_SHORT *) mac_header_ptr)->LCID = sdu_lcids[i];
((SCH_SUBHEADER_SHORT *) mac_header_ptr)->L = ((SCH_SUBHEADER_SHORT *) mac_header_ptr)->L = (unsigned char) sdu_lengths[i];
(unsigned char) sdu_lengths[i];
last_size = 2; last_size = 2;
} else { } else {
((SCH_SUBHEADER_LONG *) mac_header_ptr)->R = 0; ((SCH_SUBHEADER_LONG *) mac_header_ptr)->R = 0;
((SCH_SUBHEADER_LONG *) mac_header_ptr)->E = 0; ((SCH_SUBHEADER_LONG *) mac_header_ptr)->E = 0;
((SCH_SUBHEADER_LONG *) mac_header_ptr)->F = 1; ((SCH_SUBHEADER_LONG *) mac_header_ptr)->F = 1;
((SCH_SUBHEADER_LONG *) mac_header_ptr)->LCID = sdu_lcids[i]; ((SCH_SUBHEADER_LONG *) mac_header_ptr)->LCID = sdu_lcids[i];
((SCH_SUBHEADER_LONG *) mac_header_ptr)->L_MSB = ((SCH_SUBHEADER_LONG *) mac_header_ptr)->L_MSB = ((unsigned short) sdu_lengths[i] >> 8) & 0x7f;
((unsigned short) sdu_lengths[i] >> 8) & 0x7f; ((SCH_SUBHEADER_LONG *) mac_header_ptr)->L_LSB = (unsigned short) sdu_lengths[i] & 0xff;
((SCH_SUBHEADER_LONG *) mac_header_ptr)->L_LSB =
(unsigned short) sdu_lengths[i] & 0xff;
((SCH_SUBHEADER_LONG *) mac_header_ptr)->padding = 0x00; ((SCH_SUBHEADER_LONG *) mac_header_ptr)->padding = 0x00;
last_size = 3; last_size = 3;
#ifdef DEBUG_HEADER_PARSING #ifdef DEBUG_HEADER_PARSING
@@ -669,10 +663,8 @@ schedule_ue_spec(module_id_t module_idP,slice_id_t slice_idP,
// store the global enb stats: // store the global enb stats:
eNB->eNB_stats[CC_id].num_dlactive_UEs = UE_list->num_UEs; eNB->eNB_stats[CC_id].num_dlactive_UEs = UE_list->num_UEs;
eNB->eNB_stats[CC_id].available_prbs = eNB->eNB_stats[CC_id].available_prbs = total_nb_available_rb[CC_id];
total_nb_available_rb[CC_id]; eNB->eNB_stats[CC_id].total_available_prbs += total_nb_available_rb[CC_id];
eNB->eNB_stats[CC_id].total_available_prbs +=
total_nb_available_rb[CC_id];
eNB->eNB_stats[CC_id].dlsch_bytes_tx = 0; eNB->eNB_stats[CC_id].dlsch_bytes_tx = 0;
eNB->eNB_stats[CC_id].dlsch_pdus_tx = 0; eNB->eNB_stats[CC_id].dlsch_pdus_tx = 0;
} }
@@ -779,23 +771,18 @@ schedule_ue_spec(module_id_t module_idP,slice_id_t slice_idP,
nb_available_rb = ue_sched_ctl->pre_nb_available_rbs[CC_id]; nb_available_rb = ue_sched_ctl->pre_nb_available_rbs[CC_id];
if (cc->tdd_Config) if (cc->tdd_Config) harq_pid = ((frameP * 10) + subframeP) % 10;
harq_pid = ((frameP * 10) + subframeP) % 10; else harq_pid = ((frameP * 10) + subframeP) & 7;
else
harq_pid = ((frameP * 10) + subframeP) & 7;
round = ue_sched_ctl->round[CC_id][harq_pid]; round = ue_sched_ctl->round[CC_id][harq_pid];
UE_list->eNB_UE_stats[CC_id][UE_id].crnti = rnti; UE_list->eNB_UE_stats[CC_id][UE_id].crnti = rnti;
UE_list->eNB_UE_stats[CC_id][UE_id].rrc_status = UE_list->eNB_UE_stats[CC_id][UE_id].rrc_status = mac_eNB_get_rrc_status(module_idP, rnti);
mac_eNB_get_rrc_status(module_idP, rnti);
UE_list->eNB_UE_stats[CC_id][UE_id].harq_pid = harq_pid; UE_list->eNB_UE_stats[CC_id][UE_id].harq_pid = harq_pid;
UE_list->eNB_UE_stats[CC_id][UE_id].harq_round = round; UE_list->eNB_UE_stats[CC_id][UE_id].harq_round = round;
if (UE_list->eNB_UE_stats[CC_id][UE_id].rrc_status < if (UE_list->eNB_UE_stats[CC_id][UE_id].rrc_status < RRC_CONNECTED) continue;
RRC_CONNECTED)
continue;
sdu_length_total = 0; sdu_length_total = 0;
num_sdus = 0; num_sdus = 0;
@@ -818,9 +805,7 @@ schedule_ue_spec(module_id_t module_idP,slice_id_t slice_idP,
// initializing the rb allocation indicator for each UE // initializing the rb allocation indicator for each UE
for (j = 0; j < N_RBG[CC_id]; j++) { for (j = 0; j < N_RBG[CC_id]; j++) {
UE_list-> UE_list->UE_template[CC_id][UE_id].rballoc_subband[harq_pid][j] = 0;
UE_template[CC_id][UE_id].rballoc_subband[harq_pid][j]
= 0;
} }
LOG_D(MAC, LOG_D(MAC,
@@ -838,9 +823,7 @@ schedule_ue_spec(module_id_t module_idP,slice_id_t slice_idP,
// get freq_allocation // get freq_allocation
nb_rb = UE_list->UE_template[CC_id][UE_id].nb_rb[harq_pid]; nb_rb = UE_list->UE_template[CC_id][UE_id].nb_rb[harq_pid];
TBS = TBS = get_TBS_DL(UE_list->UE_template[CC_id][UE_id].oldmcs1[harq_pid],
get_TBS_DL(UE_list->
UE_template[CC_id][UE_id].oldmcs1[harq_pid],
nb_rb); nb_rb);
if (nb_rb <= nb_available_rb) { if (nb_rb <= nb_available_rb) {
@@ -857,36 +840,24 @@ schedule_ue_spec(module_id_t module_idP,slice_id_t slice_idP,
if (nb_rb == ue_sched_ctl->pre_nb_available_rbs[CC_id]) { if (nb_rb == ue_sched_ctl->pre_nb_available_rbs[CC_id]) {
for (j = 0; j < N_RBG[CC_id]; j++) { // for indicating the rballoc for each sub-band for (j = 0; j < N_RBG[CC_id]; j++) { // for indicating the rballoc for each sub-band
UE_list->UE_template[CC_id][UE_id]. UE_list->UE_template[CC_id][UE_id].rballoc_subband[harq_pid][j] = ue_sched_ctl->rballoc_sub_UE[CC_id][j];
rballoc_subband[harq_pid][j] =
ue_sched_ctl->rballoc_sub_UE[CC_id][j];
} }
} else { } else {
nb_rb_temp = nb_rb; nb_rb_temp = nb_rb;
j = 0; j = 0;
while ((nb_rb_temp > 0) && (j < N_RBG[CC_id])) { while ((nb_rb_temp > 0) && (j < N_RBG[CC_id])) {
if (ue_sched_ctl->rballoc_sub_UE[CC_id][j] == if (ue_sched_ctl->rballoc_sub_UE[CC_id][j] == 1) {
1) { if (UE_list->UE_template[CC_id][UE_id].rballoc_subband[harq_pid][j])
if (UE_list-> printf("WARN: rballoc_subband not free for retrans?\n");
UE_template[CC_id] UE_list->UE_template[CC_id][UE_id].rballoc_subband[harq_pid][j] = ue_sched_ctl->rballoc_sub_UE[CC_id][j];
[UE_id].rballoc_subband[harq_pid][j])
printf
("WARN: rballoc_subband not free for retrans?\n");
UE_list->
UE_template[CC_id]
[UE_id].rballoc_subband[harq_pid][j] =
ue_sched_ctl->rballoc_sub_UE[CC_id][j];
if ((j == N_RBG[CC_id] - 1) && if ((j == N_RBG[CC_id] - 1) &&
((N_RB_DL[CC_id] == 25) || ((N_RB_DL[CC_id] == 25) ||
(N_RB_DL[CC_id] == 50))) { (N_RB_DL[CC_id] == 50))) {
nb_rb_temp = nb_rb_temp = nb_rb_temp - min_rb_unit[CC_id] + 1;
nb_rb_temp - min_rb_unit[CC_id] +
1;
} else { } else {
nb_rb_temp = nb_rb_temp = nb_rb_temp - min_rb_unit[CC_id];
nb_rb_temp - min_rb_unit[CC_id];
} }
} }
@@ -911,70 +882,42 @@ schedule_ue_spec(module_id_t module_idP,slice_id_t slice_idP,
default: default:
LOG_D(MAC,"retransmission DL_REQ: rnti:%x\n",rnti); LOG_D(MAC,"retransmission DL_REQ: rnti:%x\n",rnti);
dl_config_pdu = dl_config_pdu = &dl_req->dl_config_pdu_list[dl_req->number_pdu];
&dl_req->dl_config_pdu_list[dl_req->
number_pdu];
memset((void *) dl_config_pdu, 0, memset((void *) dl_config_pdu, 0,
sizeof(nfapi_dl_config_request_pdu_t)); sizeof(nfapi_dl_config_request_pdu_t));
dl_config_pdu->pdu_type = dl_config_pdu->pdu_type = NFAPI_DL_CONFIG_DCI_DL_PDU_TYPE;
NFAPI_DL_CONFIG_DCI_DL_PDU_TYPE; dl_config_pdu->pdu_size = (uint8_t) (2 + sizeof(nfapi_dl_config_dci_dl_pdu));
dl_config_pdu->pdu_size =
(uint8_t) (2 +
sizeof(nfapi_dl_config_dci_dl_pdu));
dl_config_pdu->dci_dl_pdu.dci_dl_pdu_rel8.tl.tag = NFAPI_DL_CONFIG_REQUEST_DCI_DL_PDU_REL8_TAG; dl_config_pdu->dci_dl_pdu.dci_dl_pdu_rel8.tl.tag = NFAPI_DL_CONFIG_REQUEST_DCI_DL_PDU_REL8_TAG;
dl_config_pdu->dci_dl_pdu.dci_dl_pdu_rel8. dl_config_pdu->dci_dl_pdu.dci_dl_pdu_rel8.dci_format = NFAPI_DL_DCI_FORMAT_1;
dci_format = NFAPI_DL_DCI_FORMAT_1; dl_config_pdu->dci_dl_pdu.dci_dl_pdu_rel8.aggregation_level = get_aggregation(get_bw_index(module_idP, CC_id),
dl_config_pdu->dci_dl_pdu.
dci_dl_pdu_rel8.aggregation_level =
get_aggregation(get_bw_index
(module_idP, CC_id),
ue_sched_ctl->dl_cqi[CC_id], ue_sched_ctl->dl_cqi[CC_id],
format1); format1);
dl_config_pdu->dci_dl_pdu.dci_dl_pdu_rel8.rnti = dl_config_pdu->dci_dl_pdu.dci_dl_pdu_rel8.rnti = rnti;
rnti;
dl_config_pdu->dci_dl_pdu.dci_dl_pdu_rel8.rnti_type = 1; // CRNTI : see Table 4-10 from SCF082 - nFAPI specifications dl_config_pdu->dci_dl_pdu.dci_dl_pdu_rel8.rnti_type = 1; // CRNTI : see Table 4-10 from SCF082 - nFAPI specifications
dl_config_pdu->dci_dl_pdu.dci_dl_pdu_rel8.transmission_power = 6000; // equal to RS power dl_config_pdu->dci_dl_pdu.dci_dl_pdu_rel8.transmission_power = 6000; // equal to RS power
dl_config_pdu->dci_dl_pdu.dci_dl_pdu_rel8. dl_config_pdu->dci_dl_pdu.dci_dl_pdu_rel8.harq_process = harq_pid;
harq_process = harq_pid;
dl_config_pdu->dci_dl_pdu.dci_dl_pdu_rel8.tpc = 1; // dont adjust power when retransmitting dl_config_pdu->dci_dl_pdu.dci_dl_pdu_rel8.tpc = 1; // dont adjust power when retransmitting
dl_config_pdu->dci_dl_pdu. dl_config_pdu->dci_dl_pdu.dci_dl_pdu_rel8.new_data_indicator_1 = UE_list->UE_template[CC_id][UE_id].oldNDI[harq_pid];
dci_dl_pdu_rel8.new_data_indicator_1 = dl_config_pdu->dci_dl_pdu.dci_dl_pdu_rel8.mcs_1 = UE_list->UE_template[CC_id][UE_id].oldmcs1[harq_pid];
UE_list->UE_template[CC_id][UE_id]. dl_config_pdu->dci_dl_pdu.dci_dl_pdu_rel8.redundancy_version_1 = round & 3;
oldNDI[harq_pid];
dl_config_pdu->dci_dl_pdu.dci_dl_pdu_rel8.mcs_1 =
UE_list->UE_template[CC_id][UE_id].
oldmcs1[harq_pid];
dl_config_pdu->dci_dl_pdu.
dci_dl_pdu_rel8.redundancy_version_1 =
round & 3;
if (cc[CC_id].tdd_Config != NULL) { //TDD if (cc[CC_id].tdd_Config != NULL) { //TDD
dl_config_pdu->dci_dl_pdu. dl_config_pdu->dci_dl_pdu.dci_dl_pdu_rel8.downlink_assignment_index = (UE_list->UE_template[CC_id][UE_id].DAI - 1) & 3;
dci_dl_pdu_rel8.downlink_assignment_index =
(UE_list->UE_template[CC_id][UE_id].DAI -
1) & 3;
LOG_D(MAC, LOG_D(MAC,
"[eNB %d] Retransmission CC_id %d : harq_pid %d, round %d, dai %d, mcs %d\n", "[eNB %d] Retransmission CC_id %d : harq_pid %d, round %d, dai %d, mcs %d\n",
module_idP, CC_id, harq_pid, round, module_idP, CC_id, harq_pid, round,
(UE_list->UE_template[CC_id][UE_id].DAI - (UE_list->UE_template[CC_id][UE_id].DAI - 1),
1), UE_list->UE_template[CC_id][UE_id].oldmcs1[harq_pid]);
UE_list->
UE_template[CC_id][UE_id].oldmcs1
[harq_pid]);
} else { } else {
LOG_D(MAC, LOG_D(MAC,
"[eNB %d] Retransmission CC_id %d : harq_pid %d, round %d, mcs %d\n", "[eNB %d] Retransmission CC_id %d : harq_pid %d, round %d, mcs %d\n",
module_idP, CC_id, harq_pid, round, module_idP, CC_id, harq_pid, round,
UE_list-> UE_list->UE_template[CC_id][UE_id].oldmcs1[harq_pid]);
UE_template[CC_id][UE_id].oldmcs1
[harq_pid]);
} }
if (!CCE_allocation_infeasible if (!CCE_allocation_infeasible(module_idP, CC_id, 1, subframeP,
(module_idP, CC_id, 1, subframeP, dl_config_pdu->dci_dl_pdu.dci_dl_pdu_rel8.aggregation_level, rnti)) {
dl_config_pdu->dci_dl_pdu.
dci_dl_pdu_rel8.aggregation_level, rnti)) {
dl_req->number_dci++; dl_req->number_dci++;
dl_req->number_pdu++; dl_req->number_pdu++;
dl_req->tl.tag = NFAPI_DL_CONFIG_REQUEST_BODY_TAG; dl_req->tl.tag = NFAPI_DL_CONFIG_REQUEST_BODY_TAG;
@@ -1026,16 +969,11 @@ schedule_ue_spec(module_id_t module_idP,slice_id_t slice_idP,
S_DL_SCHEDULED); S_DL_SCHEDULED);
//eNB_UE_stats->dlsch_trials[round]++; //eNB_UE_stats->dlsch_trials[round]++;
UE_list->eNB_UE_stats[CC_id][UE_id]. UE_list->eNB_UE_stats[CC_id][UE_id].num_retransmission += 1;
num_retransmission += 1; UE_list->eNB_UE_stats[CC_id][UE_id].rbs_used_retx = nb_rb;
UE_list->eNB_UE_stats[CC_id][UE_id].rbs_used_retx = UE_list->eNB_UE_stats[CC_id][UE_id].total_rbs_used_retx += nb_rb;
nb_rb; UE_list->eNB_UE_stats[CC_id][UE_id].dlsch_mcs1 = eNB_UE_stats->dlsch_mcs1;
UE_list->eNB_UE_stats[CC_id][UE_id]. UE_list->eNB_UE_stats[CC_id][UE_id].dlsch_mcs2 = eNB_UE_stats->dlsch_mcs1;
total_rbs_used_retx += nb_rb;
UE_list->eNB_UE_stats[CC_id][UE_id].dlsch_mcs1 =
eNB_UE_stats->dlsch_mcs1;
UE_list->eNB_UE_stats[CC_id][UE_id].dlsch_mcs2 =
eNB_UE_stats->dlsch_mcs1;
} else { } else {
LOG_D(MAC, LOG_D(MAC,
"[eNB %d] Frame %d CC_id %d : don't schedule UE %d, its retransmission takes more resources than we have\n", "[eNB %d] Frame %d CC_id %d : don't schedule UE %d, its retransmission takes more resources than we have\n",
@@ -1054,8 +992,7 @@ schedule_ue_spec(module_id_t module_idP,slice_id_t slice_idP,
if (ue_sched_ctl->ta_timer == 0) { if (ue_sched_ctl->ta_timer == 0) {
ta_update = ue_sched_ctl->ta_update; ta_update = ue_sched_ctl->ta_update;
/* if we send TA then set timer to not send it for a while */ /* if we send TA then set timer to not send it for a while */
if (ta_update != 31) if (ta_update != 31) ue_sched_ctl->ta_timer = 20;
ue_sched_ctl->ta_timer = 20;
/* reset ta_update */ /* reset ta_update */
ue_sched_ctl->ta_update = 31; ue_sched_ctl->ta_update = 31;
} else { } else {
@@ -1091,11 +1028,8 @@ schedule_ue_spec(module_id_t module_idP,slice_id_t slice_idP,
module_idP, CC_id, sdu_lengths[0]); module_idP, CC_id, sdu_lengths[0]);
sdu_length_total = sdu_lengths[0]; sdu_length_total = sdu_lengths[0];
sdu_lcids[0] = DCCH; sdu_lcids[0] = DCCH;
UE_list->eNB_UE_stats[CC_id][UE_id]. UE_list->eNB_UE_stats[CC_id][UE_id].num_pdu_tx[DCCH] += 1;
num_pdu_tx[DCCH] += 1; UE_list->eNB_UE_stats[CC_id][UE_id].num_bytes_tx[DCCH] += sdu_lengths[0];
UE_list->
eNB_UE_stats[CC_id][UE_id].num_bytes_tx[DCCH]
+= sdu_lengths[0];
num_sdus = 1; num_sdus = 1;
#ifdef DEBUG_eNB_SCHEDULER #ifdef DEBUG_eNB_SCHEDULER
LOG_T(MAC, LOG_T(MAC,
@@ -1139,9 +1073,7 @@ schedule_ue_spec(module_id_t module_idP,slice_id_t slice_idP,
header_len_dcch += 2; header_len_dcch += 2;
UE_list->eNB_UE_stats[CC_id][UE_id]. UE_list->eNB_UE_stats[CC_id][UE_id].
num_pdu_tx[DCCH1] += 1; num_pdu_tx[DCCH1] += 1;
UE_list-> UE_list->eNB_UE_stats[CC_id][UE_id].num_bytes_tx[DCCH1] += sdu_lengths[num_sdus];
eNB_UE_stats[CC_id][UE_id].num_bytes_tx[DCCH1]
+= sdu_lengths[num_sdus];
num_sdus++; num_sdus++;
#ifdef DEBUG_eNB_SCHEDULER #ifdef DEBUG_eNB_SCHEDULER
LOG_T(MAC, LOG_T(MAC,
@@ -1280,31 +1212,22 @@ schedule_ue_spec(module_id_t module_idP,slice_id_t slice_idP,
if (nb_rb == ue_sched_ctl->pre_nb_available_rbs[CC_id]) { if (nb_rb == ue_sched_ctl->pre_nb_available_rbs[CC_id]) {
for (j = 0; j < N_RBG[CC_id]; j++) { // for indicating the rballoc for each sub-band for (j = 0; j < N_RBG[CC_id]; j++) { // for indicating the rballoc for each sub-band
UE_list->UE_template[CC_id][UE_id]. UE_list->UE_template[CC_id][UE_id].rballoc_subband[harq_pid][j] = ue_sched_ctl->rballoc_sub_UE[CC_id][j];
rballoc_subband[harq_pid][j] =
ue_sched_ctl->rballoc_sub_UE[CC_id][j];
} }
} else { } else {
nb_rb_temp = nb_rb; nb_rb_temp = nb_rb;
j = 0; j = 0;
while ((nb_rb_temp > 0) && (j < N_RBG[CC_id])) { while ((nb_rb_temp > 0) && (j < N_RBG[CC_id])) {
if (ue_sched_ctl->rballoc_sub_UE[CC_id][j] == if (ue_sched_ctl->rballoc_sub_UE[CC_id][j] == 1) {
1) { UE_list->UE_template[CC_id][UE_id].rballoc_subband[harq_pid][j] = ue_sched_ctl->rballoc_sub_UE[CC_id][j];
UE_list->
UE_template[CC_id]
[UE_id].rballoc_subband[harq_pid][j] =
ue_sched_ctl->rballoc_sub_UE[CC_id][j];
if ((j == N_RBG[CC_id] - 1) && if ((j == N_RBG[CC_id] - 1) &&
((N_RB_DL[CC_id] == 25) || ((N_RB_DL[CC_id] == 25) ||
(N_RB_DL[CC_id] == 50))) { (N_RB_DL[CC_id] == 50))) {
nb_rb_temp = nb_rb_temp = nb_rb_temp - min_rb_unit[CC_id] + 1;
nb_rb_temp - min_rb_unit[CC_id] +
1;
} else { } else {
nb_rb_temp = nb_rb_temp = nb_rb_temp - min_rb_unit[CC_id];
nb_rb_temp - min_rb_unit[CC_id];
} }
} }
@@ -1313,17 +1236,13 @@ schedule_ue_spec(module_id_t module_idP,slice_id_t slice_idP,
} }
// decrease mcs until TBS falls below required length // decrease mcs until TBS falls below required length
while ((TBS > while ((TBS > (sdu_length_total + header_len_dcch + header_len_dtch + ta_len)) && (mcs > 0)) {
(sdu_length_total + header_len_dcch +
header_len_dtch + ta_len)) && (mcs > 0)) {
mcs--; mcs--;
TBS = get_TBS_DL(mcs, nb_rb); TBS = get_TBS_DL(mcs, nb_rb);
} }
// if we have decreased too much or we don't have enough RBs, increase MCS // if we have decreased too much or we don't have enough RBs, increase MCS
while ((TBS < while ((TBS < (sdu_length_total + header_len_dcch + header_len_dtch + ta_len))
(sdu_length_total + header_len_dcch +
header_len_dtch + ta_len))
&& (((ue_sched_ctl->dl_pow_off[CC_id] > 0) && (((ue_sched_ctl->dl_pow_off[CC_id] > 0)
&& (mcs < 28)) && (mcs < 28))
|| ((ue_sched_ctl->dl_pow_off[CC_id] == 0) || ((ue_sched_ctl->dl_pow_off[CC_id] == 0)
@@ -1344,11 +1263,8 @@ schedule_ue_spec(module_id_t module_idP,slice_id_t slice_idP,
// TBS, sdu_length_total, offset, TBS-sdu_length_total-offset); // TBS, sdu_length_total, offset, TBS-sdu_length_total-offset);
#endif #endif
if ((TBS - header_len_dcch - header_len_dtch - if ((TBS - header_len_dcch - header_len_dtch - sdu_length_total - ta_len) <= 2) {
sdu_length_total - ta_len) <= 2) { padding = (TBS - header_len_dcch - header_len_dtch - sdu_length_total - ta_len);
padding =
(TBS - header_len_dcch - header_len_dtch -
sdu_length_total - ta_len);
post_padding = 0; post_padding = 0;
} else { } else {
padding = 0; padding = 0;
@@ -1393,16 +1309,13 @@ schedule_ue_spec(module_id_t module_idP,slice_id_t slice_idP,
#endif #endif
// cycle through SDUs and place in dlsch_buffer // cycle through SDUs and place in dlsch_buffer
memcpy(&UE_list-> memcpy(&UE_list->DLSCH_pdu[CC_id][0][UE_id].payload[0][offset],
DLSCH_pdu[CC_id][0][UE_id].payload[0][offset],
dlsch_buffer, sdu_length_total); dlsch_buffer, sdu_length_total);
// memcpy(RC.mac[0].DLSCH_pdu[0][0].payload[0][offset],dcch_buffer,sdu_lengths[0]); // memcpy(RC.mac[0].DLSCH_pdu[0][0].payload[0][offset],dcch_buffer,sdu_lengths[0]);
// fill remainder of DLSCH with random data // fill remainder of DLSCH with random data
for (j = 0; j < (TBS - sdu_length_total - offset); j++) { for (j = 0; j < (TBS - sdu_length_total - offset); j++) {
UE_list->DLSCH_pdu[CC_id][0][UE_id]. UE_list->DLSCH_pdu[CC_id][0][UE_id].payload[0][offset + sdu_length_total + j] = (char) (taus() & 0xff);
payload[0][offset + sdu_length_total + j] =
(char) (taus() & 0xff);
} }
@@ -1424,33 +1337,25 @@ schedule_ue_spec(module_id_t module_idP,slice_id_t slice_idP,
T_BUFFER(UE_list->DLSCH_pdu[CC_id][0][UE_id]. T_BUFFER(UE_list->DLSCH_pdu[CC_id][0][UE_id].
payload[0], TBS)); payload[0], TBS));
UE_list->UE_template[CC_id][UE_id].nb_rb[harq_pid] = UE_list->UE_template[CC_id][UE_id].nb_rb[harq_pid] = nb_rb;
nb_rb;
add_ue_dlsch_info(module_idP, add_ue_dlsch_info(module_idP,
CC_id, UE_id, subframeP, CC_id, UE_id, subframeP,
S_DL_SCHEDULED); S_DL_SCHEDULED);
// store stats // store stats
eNB->eNB_stats[CC_id].dlsch_bytes_tx += eNB->eNB_stats[CC_id].dlsch_bytes_tx += sdu_length_total;
sdu_length_total;
eNB->eNB_stats[CC_id].dlsch_pdus_tx += 1; eNB->eNB_stats[CC_id].dlsch_pdus_tx += 1;
UE_list->eNB_UE_stats[CC_id][UE_id].rbs_used = nb_rb; UE_list->eNB_UE_stats[CC_id][UE_id].rbs_used = nb_rb;
UE_list->eNB_UE_stats[CC_id][UE_id].total_rbs_used += UE_list->eNB_UE_stats[CC_id][UE_id].total_rbs_used += nb_rb;
nb_rb; UE_list->eNB_UE_stats[CC_id][UE_id].dlsch_mcs1 = eNB_UE_stats->dlsch_mcs1;
UE_list->eNB_UE_stats[CC_id][UE_id].dlsch_mcs1 =
eNB_UE_stats->dlsch_mcs1;
UE_list->eNB_UE_stats[CC_id][UE_id].dlsch_mcs2 = mcs; UE_list->eNB_UE_stats[CC_id][UE_id].dlsch_mcs2 = mcs;
UE_list->eNB_UE_stats[CC_id][UE_id].TBS = TBS; UE_list->eNB_UE_stats[CC_id][UE_id].TBS = TBS;
UE_list->eNB_UE_stats[CC_id][UE_id].overhead_bytes = UE_list->eNB_UE_stats[CC_id][UE_id].overhead_bytes = TBS - sdu_length_total;
TBS - sdu_length_total; UE_list->eNB_UE_stats[CC_id][UE_id].total_sdu_bytes += sdu_length_total;
UE_list->eNB_UE_stats[CC_id][UE_id].total_sdu_bytes += UE_list->eNB_UE_stats[CC_id][UE_id].total_pdu_bytes += TBS;
sdu_length_total; UE_list->eNB_UE_stats[CC_id][UE_id].total_num_pdus += 1;
UE_list->eNB_UE_stats[CC_id][UE_id].total_pdu_bytes +=
TBS;
UE_list->eNB_UE_stats[CC_id][UE_id].total_num_pdus +=
1;
if (cc[CC_id].tdd_Config != NULL) { // TDD if (cc[CC_id].tdd_Config != NULL) { // TDD
UE_list->UE_template[CC_id][UE_id].DAI++; UE_list->UE_template[CC_id][UE_id].DAI++;
@@ -1468,29 +1373,19 @@ schedule_ue_spec(module_id_t module_idP,slice_id_t slice_idP,
// this assumes accumulated tpc // this assumes accumulated tpc
// make sure that we are only sending a tpc update once a frame, otherwise the control loop will freak out // make sure that we are only sending a tpc update once a frame, otherwise the control loop will freak out
int32_t framex10psubframe = int32_t framex10psubframe = UE_list->UE_template[CC_id][UE_id].pucch_tpc_tx_frame * 10 + UE_list->UE_template[CC_id][UE_id].pucch_tpc_tx_subframe;
UE_list->UE_template[CC_id][UE_id].
pucch_tpc_tx_frame * 10 +
UE_list->UE_template[CC_id][UE_id].
pucch_tpc_tx_subframe;
if (((framex10psubframe + 10) <= (frameP * 10 + subframeP)) || //normal case if (((framex10psubframe + 10) <= (frameP * 10 + subframeP)) || //normal case
((framex10psubframe > (frameP * 10 + subframeP)) && (((10240 - framex10psubframe + frameP * 10 + subframeP) >= 10)))) //frame wrap-around ((framex10psubframe > (frameP * 10 + subframeP)) && (((10240 - framex10psubframe + frameP * 10 + subframeP) >= 10)))) //frame wrap-around
if (ue_sched_ctl->pucch1_cqi_update[CC_id] == 1) { if (ue_sched_ctl->pucch1_cqi_update[CC_id] == 1) {
ue_sched_ctl->pucch1_cqi_update[CC_id] = 0; ue_sched_ctl->pucch1_cqi_update[CC_id] = 0;
UE_list-> UE_list->UE_template[CC_id][UE_id].pucch_tpc_tx_frame = frameP;
UE_template[CC_id] UE_list->UE_template[CC_id][UE_id].pucch_tpc_tx_subframe = subframeP;
[UE_id].pucch_tpc_tx_frame = frameP;
UE_list->
UE_template[CC_id]
[UE_id].pucch_tpc_tx_subframe = subframeP;
if (normalized_rx_power > if (normalized_rx_power > (target_rx_power + 4)) {
(target_rx_power + 4)) {
tpc = 0; //-1 tpc = 0; //-1
tpc_accumulated--; tpc_accumulated--;
} else if (normalized_rx_power < } else if (normalized_rx_power < (target_rx_power - 4)) {
(target_rx_power - 4)) {
tpc = 2; //+1 tpc = 2; //+1
tpc_accumulated++; tpc_accumulated++;
} else { } else {
@@ -1511,19 +1406,13 @@ schedule_ue_spec(module_id_t module_idP,slice_id_t slice_idP,
tpc = 1; //0 tpc = 1; //0
} }
dl_config_pdu = dl_config_pdu = &dl_req->dl_config_pdu_list[dl_req->number_pdu];
&dl_req->dl_config_pdu_list[dl_req->number_pdu];
memset((void *) dl_config_pdu, 0, memset((void *) dl_config_pdu, 0,
sizeof(nfapi_dl_config_request_pdu_t)); sizeof(nfapi_dl_config_request_pdu_t));
dl_config_pdu->pdu_type = dl_config_pdu->pdu_type = NFAPI_DL_CONFIG_DCI_DL_PDU_TYPE;
NFAPI_DL_CONFIG_DCI_DL_PDU_TYPE; dl_config_pdu->pdu_size = (uint8_t) (2 + sizeof(nfapi_dl_config_dci_dl_pdu));
dl_config_pdu->pdu_size = dl_config_pdu->dci_dl_pdu.dci_dl_pdu_rel8.dci_format = NFAPI_DL_DCI_FORMAT_1;
(uint8_t) (2 + sizeof(nfapi_dl_config_dci_dl_pdu)); dl_config_pdu->dci_dl_pdu.dci_dl_pdu_rel8.aggregation_level = get_aggregation(get_bw_index(module_idP, CC_id),
dl_config_pdu->dci_dl_pdu.dci_dl_pdu_rel8.dci_format =
NFAPI_DL_DCI_FORMAT_1;
dl_config_pdu->dci_dl_pdu.
dci_dl_pdu_rel8.aggregation_level =
get_aggregation(get_bw_index(module_idP, CC_id),
ue_sched_ctl->dl_cqi[CC_id], ue_sched_ctl->dl_cqi[CC_id],
format1); format1);
dl_config_pdu->dci_dl_pdu.dci_dl_pdu_rel8.tl.tag = NFAPI_DL_CONFIG_REQUEST_DCI_DL_PDU_REL8_TAG; dl_config_pdu->dci_dl_pdu.dci_dl_pdu_rel8.tl.tag = NFAPI_DL_CONFIG_REQUEST_DCI_DL_PDU_REL8_TAG;
@@ -1531,26 +1420,16 @@ schedule_ue_spec(module_id_t module_idP,slice_id_t slice_idP,
dl_config_pdu->dci_dl_pdu.dci_dl_pdu_rel8.rnti_type = 1; // CRNTI : see Table 4-10 from SCF082 - nFAPI specifications dl_config_pdu->dci_dl_pdu.dci_dl_pdu_rel8.rnti_type = 1; // CRNTI : see Table 4-10 from SCF082 - nFAPI specifications
dl_config_pdu->dci_dl_pdu.dci_dl_pdu_rel8.transmission_power = 6000; // equal to RS power dl_config_pdu->dci_dl_pdu.dci_dl_pdu_rel8.transmission_power = 6000; // equal to RS power
dl_config_pdu->dci_dl_pdu.dci_dl_pdu_rel8. dl_config_pdu->dci_dl_pdu.dci_dl_pdu_rel8.harq_process = harq_pid;
harq_process = harq_pid;
dl_config_pdu->dci_dl_pdu.dci_dl_pdu_rel8.tpc = tpc; // dont adjust power when retransmitting dl_config_pdu->dci_dl_pdu.dci_dl_pdu_rel8.tpc = tpc; // dont adjust power when retransmitting
dl_config_pdu->dci_dl_pdu. dl_config_pdu->dci_dl_pdu.dci_dl_pdu_rel8.new_data_indicator_1 = 1 - UE_list->UE_template[CC_id][UE_id].oldNDI[harq_pid];
dci_dl_pdu_rel8.new_data_indicator_1 =
1 -
UE_list->UE_template[CC_id][UE_id].
oldNDI[harq_pid];
dl_config_pdu->dci_dl_pdu.dci_dl_pdu_rel8.mcs_1 = mcs; dl_config_pdu->dci_dl_pdu.dci_dl_pdu_rel8.mcs_1 = mcs;
dl_config_pdu->dci_dl_pdu. dl_config_pdu->dci_dl_pdu.dci_dl_pdu_rel8.redundancy_version_1 = 0;
dci_dl_pdu_rel8.redundancy_version_1 = 0;
//deactivate second codeword //deactivate second codeword
dl_config_pdu->dci_dl_pdu.dci_dl_pdu_rel8.mcs_2 = 0; dl_config_pdu->dci_dl_pdu.dci_dl_pdu_rel8.mcs_2 = 0;
dl_config_pdu->dci_dl_pdu. dl_config_pdu->dci_dl_pdu.dci_dl_pdu_rel8.redundancy_version_2 = 1;
dci_dl_pdu_rel8.redundancy_version_2 = 1;
if (cc[CC_id].tdd_Config != NULL) { //TDD if (cc[CC_id].tdd_Config != NULL) { //TDD
dl_config_pdu->dci_dl_pdu. dl_config_pdu->dci_dl_pdu.dci_dl_pdu_rel8.downlink_assignment_index = (UE_list->UE_template[CC_id][UE_id].DAI - 1) & 3;
dci_dl_pdu_rel8.downlink_assignment_index =
(UE_list->UE_template[CC_id][UE_id].DAI -
1) & 3;
LOG_D(MAC, LOG_D(MAC,
"[eNB %d] Initial transmission CC_id %d : harq_pid %d, dai %d, mcs %d\n", "[eNB %d] Initial transmission CC_id %d : harq_pid %d, dai %d, mcs %d\n",
module_idP, CC_id, harq_pid, module_idP, CC_id, harq_pid,
@@ -1564,8 +1443,7 @@ schedule_ue_spec(module_id_t module_idP,slice_id_t slice_idP,
} }
LOG_D(MAC, "Checking feasibility pdu %d (new sdu)\n", LOG_D(MAC, "Checking feasibility pdu %d (new sdu)\n",
dl_req->number_pdu); dl_req->number_pdu);
if (!CCE_allocation_infeasible if (!CCE_allocation_infeasible(module_idP, CC_id, 1, subframeP,
(module_idP, CC_id, 1, subframeP,
dl_config_pdu->dci_dl_pdu. dl_config_pdu->dci_dl_pdu.
dci_dl_pdu_rel8.aggregation_level, rnti)) { dci_dl_pdu_rel8.aggregation_level, rnti)) {
@@ -1586,23 +1464,13 @@ schedule_ue_spec(module_id_t module_idP,slice_id_t slice_idP,
UE_list-> UE_list->
UE_template[CC_id][UE_id].oldNDI[harq_pid]); UE_template[CC_id][UE_id].oldNDI[harq_pid]);
UE_list->UE_template[CC_id][UE_id]. UE_list->UE_template[CC_id][UE_id].oldNDI[harq_pid] = 1 - UE_list->UE_template[CC_id][UE_id].oldNDI[harq_pid];
oldNDI[harq_pid] = UE_list->UE_template[CC_id][UE_id].oldmcs1[harq_pid] = mcs;
1 - UE_list->UE_template[CC_id][UE_id].oldmcs2[harq_pid] = 0;
UE_list->UE_template[CC_id][UE_id]. AssertFatal(UE_list->UE_template[CC_id][UE_id].physicalConfigDedicated !=
oldNDI[harq_pid];
UE_list->UE_template[CC_id][UE_id].
oldmcs1[harq_pid] = mcs;
UE_list->UE_template[CC_id][UE_id].
oldmcs2[harq_pid] = 0;
AssertFatal(UE_list->UE_template[CC_id]
[UE_id].physicalConfigDedicated !=
NULL, NULL,
"physicalConfigDedicated is NULL\n"); "physicalConfigDedicated is NULL\n");
AssertFatal(UE_list->UE_template[CC_id] AssertFatal(UE_list->UE_template[CC_id][UE_id].physicalConfigDedicated->pdsch_ConfigDedicated != NULL,
[UE_id].
physicalConfigDedicated->pdsch_ConfigDedicated
!= NULL,
"physicalConfigDedicated->pdsch_ConfigDedicated is NULL\n"); "physicalConfigDedicated->pdsch_ConfigDedicated is NULL\n");
fill_nfapi_dlsch_config(eNB, dl_req, TBS, eNB->pdu_index[CC_id], rnti, 0, // type 0 allocation from 7.1.6 in 36.213 fill_nfapi_dlsch_config(eNB, dl_req, TBS, eNB->pdu_index[CC_id], rnti, 0, // type 0 allocation from 7.1.6 in 36.213
@@ -1623,8 +1491,7 @@ schedule_ue_spec(module_id_t module_idP,slice_id_t slice_idP,
0, //number of PRBs treated as one subband, not used here 0, //number of PRBs treated as one subband, not used here
0 // number of beamforming vectors, not used here 0 // number of beamforming vectors, not used here
); );
eNB->TX_req[CC_id].sfn_sf = eNB->TX_req[CC_id].sfn_sf = fill_nfapi_tx_req(&eNB->
fill_nfapi_tx_req(&eNB->
TX_req TX_req
[CC_id].tx_request_body, [CC_id].tx_request_body,
(frameP * 10) + subframeP, (frameP * 10) + subframeP,
@@ -1667,8 +1534,7 @@ schedule_ue_spec(module_id_t module_idP,slice_id_t slice_idP,
fill_DLSCH_dci(module_idP, frameP, subframeP, mbsfn_flag); fill_DLSCH_dci(module_idP, frameP, subframeP, mbsfn_flag);
stop_meas(&eNB->schedule_dlsch); stop_meas(&eNB->schedule_dlsch);
VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME(VCD_SIGNAL_DUMPER_FUNCTIONS_SCHEDULE_DLSCH, VCD_FUNCTION_OUT);
(VCD_SIGNAL_DUMPER_FUNCTIONS_SCHEDULE_DLSCH, VCD_FUNCTION_OUT);
} }
@@ -1717,63 +1583,37 @@ fill_DLSCH_dci(module_id_t module_idP,
LOG_T(MAC, "CC_id %d, UE_id: %d => status %d\n", CC_id, UE_id, LOG_T(MAC, "CC_id %d, UE_id: %d => status %d\n", CC_id, UE_id,
eNB_dlsch_info[module_idP][CC_id][UE_id].status); eNB_dlsch_info[module_idP][CC_id][UE_id].status);
if (eNB_dlsch_info[module_idP][CC_id][UE_id].status == if (eNB_dlsch_info[module_idP][CC_id][UE_id].status == S_DL_SCHEDULED) {
S_DL_SCHEDULED) {
// clear scheduling flag // clear scheduling flag
eNB_dlsch_info[module_idP][CC_id][UE_id].status = eNB_dlsch_info[module_idP][CC_id][UE_id].status = S_DL_WAITING;
S_DL_WAITING;
rnti = UE_RNTI(module_idP, UE_id); rnti = UE_RNTI(module_idP, UE_id);
if (cc->tdd_Config) if (cc->tdd_Config) harq_pid = ((frameP * 10) + subframeP) % 10;
harq_pid = ((frameP * 10) + subframeP) % 10; else harq_pid = ((frameP * 10) + subframeP) & 7;
else
harq_pid = ((frameP * 10) + subframeP) & 7;
nb_rb = UE_list->UE_template[CC_id][UE_id].nb_rb[harq_pid]; nb_rb = UE_list->UE_template[CC_id][UE_id].nb_rb[harq_pid];
/// Synchronizing rballoc with rballoc_sub /// Synchronizing rballoc with rballoc_sub
for (i = 0; i < N_RBG; i++) { for (i = 0; i < N_RBG; i++) {
rballoc_sub[i] = rballoc_sub[i] = UE_list->UE_template[CC_id][UE_id].rballoc_subband[harq_pid][i];
UE_list->
UE_template[CC_id][UE_id].rballoc_subband[harq_pid]
[i];
} }
nfapi_dl_config_request_t *DL_req = nfapi_dl_config_request_t *DL_req = &RC.mac[module_idP]->DL_req[0];
&RC.mac[module_idP]->DL_req[0];
nfapi_dl_config_request_pdu_t *dl_config_pdu; nfapi_dl_config_request_pdu_t *dl_config_pdu;
for (i = 0; for (i = 0;
i < DL_req[CC_id].dl_config_request_body.number_pdu; i < DL_req[CC_id].dl_config_request_body.number_pdu;
i++) { i++) {
dl_config_pdu = dl_config_pdu = &DL_req[CC_id].dl_config_request_body.dl_config_pdu_list[i];
&DL_req[CC_id]. if ((dl_config_pdu->pdu_type == NFAPI_DL_CONFIG_DCI_DL_PDU_TYPE)
dl_config_request_body.dl_config_pdu_list[i]; && (dl_config_pdu->dci_dl_pdu.dci_dl_pdu_rel8.rnti == rnti)
if ((dl_config_pdu->pdu_type == && (dl_config_pdu->dci_dl_pdu.dci_dl_pdu_rel8.dci_format != 1)) {
NFAPI_DL_CONFIG_DCI_DL_PDU_TYPE) dl_config_pdu->dci_dl_pdu.dci_dl_pdu_rel8.resource_block_coding = allocate_prbs_sub(nb_rb, N_RB_DL, N_RBG,rballoc_sub);
&& (dl_config_pdu->dci_dl_pdu.dci_dl_pdu_rel8. dl_config_pdu->dci_dl_pdu.dci_dl_pdu_rel8.resource_allocation_type = 0;
rnti == rnti)
&& (dl_config_pdu->dci_dl_pdu.
dci_dl_pdu_rel8.dci_format != 1)) {
dl_config_pdu->dci_dl_pdu.
dci_dl_pdu_rel8.resource_block_coding =
allocate_prbs_sub(nb_rb, N_RB_DL, N_RBG,
rballoc_sub);
dl_config_pdu->dci_dl_pdu.
dci_dl_pdu_rel8.resource_allocation_type = 0;
} else } else
if ((dl_config_pdu->pdu_type == if ((dl_config_pdu->pdu_type == NFAPI_DL_CONFIG_DLSCH_PDU_TYPE)
NFAPI_DL_CONFIG_DLSCH_PDU_TYPE) && (dl_config_pdu->dlsch_pdu.dlsch_pdu_rel8.rnti == rnti)
&& (dl_config_pdu->dlsch_pdu.dlsch_pdu_rel8. && (dl_config_pdu->dlsch_pdu.dlsch_pdu_rel8.resource_allocation_type == 0)) {
rnti == rnti) dl_config_pdu->dlsch_pdu.dlsch_pdu_rel8.resource_block_coding =allocate_prbs_sub(nb_rb, N_RB_DL, N_RBG,rballoc_sub);
&& (dl_config_pdu->dlsch_pdu.
dlsch_pdu_rel8.resource_allocation_type ==
0)) {
dl_config_pdu->dlsch_pdu.
dlsch_pdu_rel8.resource_block_coding =
allocate_prbs_sub(nb_rb, N_RB_DL, N_RBG,
rballoc_sub);
} }
} }
} }
@@ -1782,8 +1622,7 @@ fill_DLSCH_dci(module_id_t module_idP,
} }
stop_meas(&eNB->fill_DLSCH_dci); stop_meas(&eNB->fill_DLSCH_dci);
VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME(VCD_SIGNAL_DUMPER_FUNCTIONS_FILL_DLSCH_DCI, VCD_FUNCTION_OUT);
(VCD_SIGNAL_DUMPER_FUNCTIONS_FILL_DLSCH_DCI, VCD_FUNCTION_OUT);
} }
//------------------------------------------------------------------------------ //------------------------------------------------------------------------------
@@ -1800,8 +1639,7 @@ unsigned char *get_dlsch_sdu(module_id_t module_idP,
LOG_D(MAC, "[eNB %d] CC_id %d Frame %d Get DLSCH sdu for BCCH \n", LOG_D(MAC, "[eNB %d] CC_id %d Frame %d Get DLSCH sdu for BCCH \n",
module_idP, CC_id, frameP); module_idP, CC_id, frameP);
return ((unsigned char *) &eNB->common_channels[CC_id]. return ((unsigned char *) &eNB->common_channels[CC_id].BCCH_pdu.payload[0]);
BCCH_pdu.payload[0]);
} }
if (rntiP==P_RNTI) { if (rntiP==P_RNTI) {
@@ -1816,8 +1654,7 @@ unsigned char *get_dlsch_sdu(module_id_t module_idP,
LOG_D(MAC, LOG_D(MAC,
"[eNB %d] Frame %d: CC_id %d Get DLSCH sdu for rnti %x => UE_id %d\n", "[eNB %d] Frame %d: CC_id %d Get DLSCH sdu for rnti %x => UE_id %d\n",
module_idP, frameP, CC_id, rntiP, UE_id); module_idP, frameP, CC_id, rntiP, UE_id);
return ((unsigned char *) &eNB-> return ((unsigned char *) &eNB->UE_list.DLSCH_pdu[CC_id][TBindex][UE_id].payload[0]);
UE_list.DLSCH_pdu[CC_id][TBindex][UE_id].payload[0]);
} else { } else {
LOG_E(MAC, LOG_E(MAC,
"[eNB %d] Frame %d: CC_id %d UE with RNTI %x does not exist\n", "[eNB %d] Frame %d: CC_id %d UE with RNTI %x does not exist\n",
@@ -1845,14 +1682,12 @@ update_ul_dci(module_id_t module_idP,
if (cc->tdd_Config != NULL) { // TDD if (cc->tdd_Config != NULL) { // TDD
for (i = 0; for (i = 0;
i < i <HI_DCI0_req->hi_dci0_request_body.number_of_dci + HI_DCI0_req->hi_dci0_request_body.number_of_dci;
HI_DCI0_req->hi_dci0_request_body.number_of_dci + i++) {
HI_DCI0_req->hi_dci0_request_body.number_of_dci; i++) {
if ((hi_dci0_pdu[i].pdu_type == NFAPI_HI_DCI0_DCI_PDU_TYPE) && if ((hi_dci0_pdu[i].pdu_type == NFAPI_HI_DCI0_DCI_PDU_TYPE) &&
(hi_dci0_pdu[i].dci_pdu.dci_pdu_rel8.rnti == rntiP)) (hi_dci0_pdu[i].dci_pdu.dci_pdu_rel8.rnti == rntiP))
hi_dci0_pdu[i].dci_pdu.dci_pdu_rel8.dl_assignment_index = hi_dci0_pdu[i].dci_pdu.dci_pdu_rel8.dl_assignment_index = (daiP - 1) & 3;
(daiP - 1) & 3;
} }
} }
File diff suppressed because it is too large Load Diff
+168 -323
View File
@@ -136,10 +136,10 @@ rx_sdu(const module_id_t enb_mod_idP,
eNB_MAC_INST *mac = RC.mac[enb_mod_idP]; eNB_MAC_INST *mac = RC.mac[enb_mod_idP];
int harq_pid = int harq_pid =
subframe2harqpid(&mac->common_channels[CC_idP], frameP, subframeP); subframe2harqpid(&mac->common_channels[CC_idP], frameP, subframeP);
int lcgid_updated[4] = {0, 0, 0, 0};
UE_list_t *UE_list = &mac->UE_list; UE_list_t *UE_list = &mac->UE_list;
int crnti_rx = 0; int crnti_rx = 0;
int old_buffer_info;
RA_t *ra = RA_t *ra =
(RA_t *) & RC.mac[enb_mod_idP]->common_channels[CC_idP].ra[0]; (RA_t *) & RC.mac[enb_mod_idP]->common_channels[CC_idP].ra[0];
int first_rb = 0; int first_rb = 0;
@@ -172,20 +172,16 @@ rx_sdu(const module_id_t enb_mod_idP,
if (sduP != NULL) { if (sduP != NULL) {
UE_list->UE_sched_ctrl[UE_id].ul_inactivity_timer = 0; UE_list->UE_sched_ctrl[UE_id].ul_inactivity_timer = 0;
UE_list->UE_sched_ctrl[UE_id].ul_failure_timer = 0; UE_list->UE_sched_ctrl[UE_id].ul_failure_timer = 0;
UE_list->UE_sched_ctrl[UE_id].ul_scheduled &= UE_list->UE_sched_ctrl[UE_id].ul_scheduled &= (~(1 << harq_pid));
(~(1 << harq_pid));
/* Update with smoothing: 3/4 of old value and 1/4 of new. /* Update with smoothing: 3/4 of old value and 1/4 of new.
* This is the logic that was done in the function * This is the logic that was done in the function
* lte_est_timing_advance_pusch, maybe it's not necessary? * lte_est_timing_advance_pusch, maybe it's not necessary?
* maybe it's even not correct at all? * maybe it's even not correct at all?
*/ */
UE_list->UE_sched_ctrl[UE_id].ta_update = UE_list->UE_sched_ctrl[UE_id].ta_update = (UE_list->UE_sched_ctrl[UE_id].ta_update * 3 + timing_advance) / 4;
(UE_list->UE_sched_ctrl[UE_id].ta_update * 3 +
timing_advance) / 4;
UE_list->UE_sched_ctrl[UE_id].pusch_snr[CC_idP] = ul_cqi; UE_list->UE_sched_ctrl[UE_id].pusch_snr[CC_idP] = ul_cqi;
UE_list->UE_sched_ctrl[UE_id].ul_consecutive_errors = 0; UE_list->UE_sched_ctrl[UE_id].ul_consecutive_errors = 0;
first_rb = first_rb = UE_list->UE_template[CC_idP][UE_id].first_rb_ul[harq_pid];
UE_list->UE_template[CC_idP][UE_id].first_rb_ul[harq_pid];
if (UE_list->UE_sched_ctrl[UE_id].ul_out_of_sync > 0) { if (UE_list->UE_sched_ctrl[UE_id].ul_out_of_sync > 0) {
UE_list->UE_sched_ctrl[UE_id].ul_out_of_sync = 0; UE_list->UE_sched_ctrl[UE_id].ul_out_of_sync = 0;
@@ -193,6 +189,11 @@ rx_sdu(const module_id_t enb_mod_idP,
subframeP, UE_RNTI(enb_mod_idP, subframeP, UE_RNTI(enb_mod_idP,
UE_id)); UE_id));
} }
/* update scheduled bytes */
UE_list->UE_template[CC_idP][UE_id].scheduled_ul_bytes -= UE_list->UE_template[CC_idP][UE_id].TBS_UL[harq_pid];
if (UE_list->UE_template[CC_idP][UE_id].scheduled_ul_bytes < 0)
UE_list->UE_template[CC_idP][UE_id].scheduled_ul_bytes = 0;
} else { // we've got an error } else { // we've got an error
LOG_D(MAC, LOG_D(MAC,
"[eNB %d][PUSCH %d] CC_id %d ULSCH in error in round %d, ul_cqi %d\n", "[eNB %d][PUSCH %d] CC_id %d ULSCH in error in round %d, ul_cqi %d\n",
@@ -201,15 +202,16 @@ rx_sdu(const module_id_t enb_mod_idP,
ul_cqi); ul_cqi);
// AssertFatal(1==0,"ulsch in error\n"); // AssertFatal(1==0,"ulsch in error\n");
if (UE_list->UE_sched_ctrl[UE_id].round_UL[CC_idP][harq_pid] == if (UE_list->UE_sched_ctrl[UE_id].round_UL[CC_idP][harq_pid] == 3) {
3) { UE_list->UE_sched_ctrl[UE_id].ul_scheduled &= (~(1 << harq_pid));
UE_list->UE_sched_ctrl[UE_id].ul_scheduled &= UE_list->UE_sched_ctrl[UE_id].round_UL[CC_idP][harq_pid] = 0;
(~(1 << harq_pid)); if (UE_list->UE_sched_ctrl[UE_id].ul_consecutive_errors++ == 10)
UE_list->UE_sched_ctrl[UE_id].round_UL[CC_idP][harq_pid] =
0;
if (UE_list->UE_sched_ctrl[UE_id].
ul_consecutive_errors++ == 10)
UE_list->UE_sched_ctrl[UE_id].ul_failure_timer = 1; UE_list->UE_sched_ctrl[UE_id].ul_failure_timer = 1;
/* update scheduled bytes */
UE_list->UE_template[CC_idP][UE_id].scheduled_ul_bytes -= UE_list->UE_template[CC_idP][UE_id].TBS_UL[harq_pid];
if (UE_list->UE_template[CC_idP][UE_id].scheduled_ul_bytes < 0)
UE_list->UE_template[CC_idP][UE_id].scheduled_ul_bytes = 0;
} else } else
UE_list->UE_sched_ctrl[UE_id].round_UL[CC_idP][harq_pid]++; UE_list->UE_sched_ctrl[UE_id].round_UL[CC_idP][harq_pid]++;
return; return;
@@ -239,22 +241,17 @@ rx_sdu(const module_id_t enb_mod_idP,
(int) mac->common_channels[CC_idP]. (int) mac->common_channels[CC_idP].
radioResourceConfigCommon->rach_ConfigCommon. radioResourceConfigCommon->rach_ConfigCommon.
maxHARQ_Msg3Tx); maxHARQ_Msg3Tx);
if (ra[RA_id].msg3_round == if (ra[RA_id].msg3_round == mac->common_channels[CC_idP].radioResourceConfigCommon->rach_ConfigCommon.maxHARQ_Msg3Tx - 1) {
mac->common_channels[CC_idP].radioResourceConfigCommon->
rach_ConfigCommon.maxHARQ_Msg3Tx - 1) {
cancel_ra_proc(enb_mod_idP, CC_idP, frameP, current_rnti); cancel_ra_proc(enb_mod_idP, CC_idP, frameP, current_rnti);
} }
else { else {
first_rb = first_rb = UE_list->UE_template[CC_idP][UE_id].first_rb_ul[harq_pid];
UE_list->UE_template[CC_idP][UE_id].
first_rb_ul[harq_pid];
ra[RA_id].msg3_round++; ra[RA_id].msg3_round++;
// prepare handling of retransmission // prepare handling of retransmission
ra[RA_id].Msg3_frame = (ra[RA_id].Msg3_frame + ((ra[RA_id].Msg3_subframe > 1) ? 1 : 0)) % 1024; ra[RA_id].Msg3_frame = (ra[RA_id].Msg3_frame + ((ra[RA_id].Msg3_subframe > 1) ? 1 : 0)) % 1024;
ra[RA_id].Msg3_subframe = (ra[RA_id].Msg3_subframe + 8) % 10; ra[RA_id].Msg3_subframe = (ra[RA_id].Msg3_subframe + 8) % 10;
add_msg3(enb_mod_idP, CC_idP, &ra[RA_id], frameP, add_msg3(enb_mod_idP, CC_idP, &ra[RA_id], frameP, subframeP);
subframeP);
} }
return; return;
} }
@@ -264,9 +261,7 @@ rx_sdu(const module_id_t enb_mod_idP,
current_rnti); current_rnti);
return; return;
} }
payload_ptr = payload_ptr = parse_ulsch_header(sduP, &num_ce, &num_sdu, rx_ces, rx_lcids, rx_lengths, sdu_lenP);
parse_ulsch_header(sduP, &num_ce, &num_sdu, rx_ces, rx_lcids,
rx_lengths, sdu_lenP);
T(T_ENB_MAC_UE_UL_PDU, T_INT(enb_mod_idP), T_INT(CC_idP), T(T_ENB_MAC_UE_UL_PDU, T_INT(enb_mod_idP), T_INT(CC_idP),
T_INT(current_rnti), T_INT(frameP), T_INT(subframeP), T_INT(current_rnti), T_INT(frameP), T_INT(subframeP),
@@ -361,46 +356,34 @@ rx_sdu(const module_id_t enb_mod_idP,
enb_mod_idP, CC_idP, rx_ces[i], lcgid, enb_mod_idP, CC_idP, rx_ces[i], lcgid,
payload_ptr[0] & 0x3f); payload_ptr[0] & 0x3f);
if (UE_id != -1) { if (UE_id != -1) {
int bsr = payload_ptr[0] & 0x3f;
UE_list->UE_template[CC_idP][UE_id].bsr_info[lcgid] = lcgid_updated[lcgid] = 1;
(payload_ptr[0] & 0x3f);
// update buffer info // update buffer info
UE_list->UE_template[CC_idP][UE_id].ul_buffer_info[lcgid] = BSR_TABLE[bsr];
UE_list->UE_template[CC_idP][UE_id]. UE_list->UE_template[CC_idP][UE_id].estimated_ul_buffer =
ul_buffer_info[lcgid] = UE_list->UE_template[CC_idP][UE_id].ul_buffer_info[0] +
BSR_TABLE[UE_list->UE_template[CC_idP][UE_id]. UE_list->UE_template[CC_idP][UE_id].ul_buffer_info[1] +
bsr_info[lcgid]]; UE_list->UE_template[CC_idP][UE_id].ul_buffer_info[2] +
UE_list->UE_template[CC_idP][UE_id].ul_buffer_info[3];
//UE_list->UE_template[CC_idP][UE_id].estimated_ul_buffer += UE_list->UE_template[CC_idP][UE_id].estimated_ul_buffer / 4;
UE_list->UE_template[CC_idP][UE_id].ul_total_buffer = RC.eNB[enb_mod_idP][CC_idP]->pusch_stats_bsr[UE_id][(frameP * 10) + subframeP] = (payload_ptr[0] & 0x3f);
UE_list->UE_template[CC_idP][UE_id].
ul_buffer_info[lcgid];
RC.eNB[enb_mod_idP][CC_idP]->
pusch_stats_bsr[UE_id][(frameP * 10) + subframeP]
= (payload_ptr[0] & 0x3f);
if (UE_id == UE_list->head) if (UE_id == UE_list->head)
VCD_SIGNAL_DUMPER_DUMP_VARIABLE_BY_NAME VCD_SIGNAL_DUMPER_DUMP_VARIABLE_BY_NAME(VCD_SIGNAL_DUMPER_VARIABLES_UE0_BSR,
(VCD_SIGNAL_DUMPER_VARIABLES_UE0_BSR,
RC.eNB[enb_mod_idP][CC_idP]->pusch_stats_bsr RC.eNB[enb_mod_idP][CC_idP]->pusch_stats_bsr
[UE_id][(frameP * 10) + subframeP]); [UE_id][(frameP * 10) + subframeP]);
if (UE_list->UE_template[CC_idP][UE_id]. if (UE_list->UE_template[CC_idP][UE_id].ul_buffer_creation_time[lcgid] == 0) {
ul_buffer_creation_time[lcgid] UE_list->UE_template[CC_idP][UE_id].ul_buffer_creation_time[lcgid] = frameP;
== 0) {
UE_list->UE_template[CC_idP]
[UE_id].ul_buffer_creation_time[lcgid] =
frameP;
} }
if (mac_eNB_get_rrc_status if (mac_eNB_get_rrc_status(enb_mod_idP,UE_RNTI(enb_mod_idP, UE_id)) < RRC_CONNECTED)
(enb_mod_idP,
UE_RNTI(enb_mod_idP, UE_id)) < RRC_CONNECTED)
LOG_D(MAC, LOG_D(MAC,
"[eNB %d] CC_id %d MAC CE_LCID %d : ul_total_buffer = %d (lcg increment %d)\n", "[eNB %d] CC_id %d MAC CE_LCID %d : estimated_ul_buffer = %d (lcg increment %d)\n",
enb_mod_idP, CC_idP, rx_ces[i], enb_mod_idP, CC_idP, rx_ces[i],
UE_list->UE_template[CC_idP][UE_id]. UE_list->UE_template[CC_idP][UE_id].estimated_ul_buffer,
ul_total_buffer, UE_list->UE_template[CC_idP][UE_id].ul_buffer_info[lcgid]);
UE_list->UE_template[CC_idP][UE_id].
ul_buffer_info[lcgid]);
} else { } else {
} }
@@ -410,152 +393,69 @@ rx_sdu(const module_id_t enb_mod_idP,
case LONG_BSR: case LONG_BSR:
if (UE_id != -1) { if (UE_id != -1) {
UE_list->UE_template[CC_idP][UE_id].bsr_info[LCGID0] = int bsr0 = (payload_ptr[0] & 0xFC) >> 2;
((payload_ptr[0] & 0xFC) >> 2); int bsr1 = ((payload_ptr[0] & 0x03) << 4) | ((payload_ptr[1] & 0xF0) >> 4);
UE_list->UE_template[CC_idP][UE_id].bsr_info[LCGID1] = int bsr2 = ((payload_ptr[1] & 0x0F) << 2) | ((payload_ptr[2] & 0xC0) >> 6);
((payload_ptr[0] & 0x03) << 4) | int bsr3 = payload_ptr[2] & 0x3F;
((payload_ptr[1] & 0xF0) >> 4);
UE_list->UE_template[CC_idP][UE_id].bsr_info[LCGID2] = lcgid_updated[0] = 1;
((payload_ptr[1] & 0x0F) << 2) | lcgid_updated[1] = 1;
((payload_ptr[2] & 0xC0) >> 6); lcgid_updated[2] = 1;
UE_list->UE_template[CC_idP][UE_id].bsr_info[LCGID3] = lcgid_updated[3] = 1;
(payload_ptr[2] & 0x3F);
// update buffer info // update buffer info
old_buffer_info = UE_list->UE_template[CC_idP][UE_id].ul_buffer_info[LCGID0] = BSR_TABLE[bsr0];
UE_list->UE_template[CC_idP][UE_id]. UE_list->UE_template[CC_idP][UE_id].ul_buffer_info[LCGID1] = BSR_TABLE[bsr1];
ul_buffer_info[LCGID0]; UE_list->UE_template[CC_idP][UE_id].ul_buffer_info[LCGID2] = BSR_TABLE[bsr2];
UE_list->UE_template[CC_idP][UE_id]. UE_list->UE_template[CC_idP][UE_id].ul_buffer_info[LCGID3] = BSR_TABLE[bsr3];
ul_buffer_info[LCGID0] =
BSR_TABLE[UE_list->UE_template[CC_idP][UE_id].
bsr_info[LCGID0]];
UE_list->UE_template[CC_idP][UE_id].ul_total_buffer += UE_list->UE_template[CC_idP][UE_id].estimated_ul_buffer =
UE_list->UE_template[CC_idP][UE_id]. UE_list->UE_template[CC_idP][UE_id].ul_buffer_info[0] +
ul_buffer_info[LCGID0]; UE_list->UE_template[CC_idP][UE_id].ul_buffer_info[1] +
if (UE_list->UE_template[CC_idP][UE_id].ul_total_buffer >= UE_list->UE_template[CC_idP][UE_id].ul_buffer_info[2] +
old_buffer_info) UE_list->UE_template[CC_idP][UE_id].ul_buffer_info[3];
UE_list->UE_template[CC_idP][UE_id].ul_total_buffer -= //UE_list->UE_template[CC_idP][UE_id].estimated_ul_buffer += UE_list->UE_template[CC_idP][UE_id].estimated_ul_buffer / 4;
old_buffer_info;
else
UE_list->UE_template[CC_idP][UE_id].ul_total_buffer =
0;
old_buffer_info =
UE_list->UE_template[CC_idP][UE_id].
ul_buffer_info[LCGID1];
UE_list->UE_template[CC_idP][UE_id].
ul_buffer_info[LCGID1] =
BSR_TABLE[UE_list->UE_template[CC_idP][UE_id].
bsr_info[LCGID1]];
UE_list->UE_template[CC_idP][UE_id].ul_total_buffer +=
UE_list->UE_template[CC_idP][UE_id].
ul_buffer_info[LCGID1];
if (UE_list->UE_template[CC_idP][UE_id].ul_total_buffer >=
old_buffer_info)
UE_list->UE_template[CC_idP][UE_id].ul_total_buffer -=
old_buffer_info;
else
UE_list->UE_template[CC_idP][UE_id].ul_total_buffer =
0;
old_buffer_info =
UE_list->UE_template[CC_idP][UE_id].
ul_buffer_info[LCGID2];
UE_list->UE_template[CC_idP][UE_id].
ul_buffer_info[LCGID2] =
BSR_TABLE[UE_list->UE_template[CC_idP][UE_id].
bsr_info[LCGID2]];
UE_list->UE_template[CC_idP][UE_id].ul_total_buffer +=
UE_list->UE_template[CC_idP][UE_id].
ul_buffer_info[LCGID2];
if (UE_list->UE_template[CC_idP][UE_id].ul_total_buffer >=
old_buffer_info)
UE_list->UE_template[CC_idP][UE_id].ul_total_buffer -=
old_buffer_info;
else
UE_list->UE_template[CC_idP][UE_id].ul_total_buffer =
0;
old_buffer_info =
UE_list->UE_template[CC_idP][UE_id].
ul_buffer_info[LCGID3];
UE_list->UE_template[CC_idP][UE_id].
ul_buffer_info[LCGID3] =
BSR_TABLE[UE_list->UE_template[CC_idP][UE_id].
bsr_info[LCGID3]];
UE_list->UE_template[CC_idP][UE_id].ul_total_buffer +=
UE_list->UE_template[CC_idP][UE_id].
ul_buffer_info[LCGID3];
if (UE_list->UE_template[CC_idP][UE_id].ul_total_buffer >=
old_buffer_info)
UE_list->UE_template[CC_idP][UE_id].ul_total_buffer -=
old_buffer_info;
else
UE_list->UE_template[CC_idP][UE_id].ul_total_buffer =
0;
LOG_D(MAC, LOG_D(MAC,
"[eNB %d] CC_id %d MAC CE_LCID %d: Received long BSR LCGID0 = %u LCGID1 = " "[eNB %d] CC_id %d MAC CE_LCID %d: Received long BSR. Size is LCGID0 = %u LCGID1 = "
"%u LCGID2 = %u LCGID3 = %u\n", enb_mod_idP, CC_idP, "%u LCGID2 = %u LCGID3 = %u\n", enb_mod_idP, CC_idP,
rx_ces[i], rx_ces[i],
UE_list->UE_template[CC_idP][UE_id].bsr_info[LCGID0], UE_list->UE_template[CC_idP][UE_id].ul_buffer_info[LCGID0],
UE_list->UE_template[CC_idP][UE_id].bsr_info[LCGID1], UE_list->UE_template[CC_idP][UE_id].ul_buffer_info[LCGID1],
UE_list->UE_template[CC_idP][UE_id].bsr_info[LCGID2], UE_list->UE_template[CC_idP][UE_id].ul_buffer_info[LCGID2],
UE_list->UE_template[CC_idP][UE_id]. UE_list->UE_template[CC_idP][UE_id].ul_buffer_info[LCGID3]);
bsr_info[LCGID3]);
if (crnti_rx == 1) if (crnti_rx == 1)
LOG_D(MAC, LOG_D(MAC,
"[eNB %d] CC_id %d MAC CE_LCID %d: Received long BSR LCGID0 = %u LCGID1 = " "[eNB %d] CC_id %d MAC CE_LCID %d: Received long BSR. Size is LCGID0 = %u LCGID1 = "
"%u LCGID2 = %u LCGID3 = %u\n", enb_mod_idP, "%u LCGID2 = %u LCGID3 = %u\n", enb_mod_idP,
CC_idP, rx_ces[i], CC_idP, rx_ces[i],
UE_list->UE_template[CC_idP][UE_id]. UE_list->UE_template[CC_idP][UE_id].ul_buffer_info[LCGID0],
bsr_info[LCGID0], UE_list->UE_template[CC_idP][UE_id].ul_buffer_info[LCGID1],
UE_list->UE_template[CC_idP][UE_id]. UE_list->UE_template[CC_idP][UE_id].ul_buffer_info[LCGID2],
bsr_info[LCGID1], UE_list->UE_template[CC_idP][UE_id].ul_buffer_info[LCGID3]);
UE_list->UE_template[CC_idP][UE_id].
bsr_info[LCGID2],
UE_list->UE_template[CC_idP][UE_id].
bsr_info[LCGID3]);
if (UE_list->UE_template[CC_idP][UE_id].bsr_info[LCGID0] == if (UE_list->UE_template[CC_idP][UE_id].ul_buffer_info[LCGID0] == 0) {
0) { UE_list->UE_template[CC_idP][UE_id].ul_buffer_creation_time[LCGID0] = 0;
UE_list->UE_template[CC_idP][UE_id]. } else if (UE_list->UE_template[CC_idP][UE_id].ul_buffer_creation_time[LCGID0] == 0) {
ul_buffer_creation_time[LCGID0] = 0; UE_list->UE_template[CC_idP][UE_id].ul_buffer_creation_time[LCGID0] = frameP;
} else if (UE_list->UE_template[CC_idP]
[UE_id].ul_buffer_creation_time[LCGID0] == 0) {
UE_list->UE_template[CC_idP][UE_id].
ul_buffer_creation_time[LCGID0] = frameP;
} }
if (UE_list->UE_template[CC_idP][UE_id].bsr_info[LCGID1] == if (UE_list->UE_template[CC_idP][UE_id].ul_buffer_info[LCGID1] == 0) {
0) { UE_list->UE_template[CC_idP][UE_id].ul_buffer_creation_time[LCGID1] = 0;
UE_list->UE_template[CC_idP][UE_id]. } else if (UE_list->UE_template[CC_idP][UE_id].ul_buffer_creation_time[LCGID1] == 0) {
ul_buffer_creation_time[LCGID1] = 0; UE_list->UE_template[CC_idP][UE_id].ul_buffer_creation_time[LCGID1] = frameP;
} else if (UE_list->UE_template[CC_idP]
[UE_id].ul_buffer_creation_time[LCGID1] == 0) {
UE_list->UE_template[CC_idP][UE_id].
ul_buffer_creation_time[LCGID1] = frameP;
} }
if (UE_list->UE_template[CC_idP][UE_id].bsr_info[LCGID2] == if (UE_list->UE_template[CC_idP][UE_id].ul_buffer_info[LCGID2] == 0) {
0) { UE_list->UE_template[CC_idP][UE_id].ul_buffer_creation_time[LCGID2] = 0;
UE_list->UE_template[CC_idP][UE_id]. } else if (UE_list->UE_template[CC_idP][UE_id].ul_buffer_creation_time[LCGID2] == 0) {
ul_buffer_creation_time[LCGID2] = 0; UE_list->UE_template[CC_idP][UE_id].ul_buffer_creation_time[LCGID2] = frameP;
} else if (UE_list->UE_template[CC_idP]
[UE_id].ul_buffer_creation_time[LCGID2] == 0) {
UE_list->UE_template[CC_idP][UE_id].
ul_buffer_creation_time[LCGID2] = frameP;
} }
if (UE_list->UE_template[CC_idP][UE_id].bsr_info[LCGID3] == if (UE_list->UE_template[CC_idP][UE_id].ul_buffer_info[LCGID3] == 0) {
0) { UE_list->UE_template[CC_idP][UE_id].ul_buffer_creation_time[LCGID3] = 0;
UE_list->UE_template[CC_idP][UE_id]. } else if (UE_list->UE_template[CC_idP][UE_id].ul_buffer_creation_time[LCGID3] == 0) {
ul_buffer_creation_time[LCGID3] = 0; UE_list->UE_template[CC_idP][UE_id].ul_buffer_creation_time[LCGID3] = frameP;
} else if (UE_list->UE_template[CC_idP]
[UE_id].ul_buffer_creation_time[LCGID3] == 0) {
UE_list->UE_template[CC_idP][UE_id].
ul_buffer_creation_time[LCGID3] = frameP;
} }
} }
@@ -598,10 +498,8 @@ rx_sdu(const module_id_t enb_mod_idP,
enb_mod_idP, CC_idP, frameP, payload_ptr[0], enb_mod_idP, CC_idP, frameP, payload_ptr[0],
payload_ptr[1], payload_ptr[2], payload_ptr[3], payload_ptr[1], payload_ptr[2], payload_ptr[3],
payload_ptr[4], payload_ptr[5], current_rnti); payload_ptr[4], payload_ptr[5], current_rnti);
VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME(VCD_SIGNAL_DUMPER_FUNCTIONS_TERMINATE_RA_PROC, 1);
(VCD_SIGNAL_DUMPER_FUNCTIONS_TERMINATE_RA_PROC, 1); VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME(VCD_SIGNAL_DUMPER_FUNCTIONS_TERMINATE_RA_PROC, 0);
VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME
(VCD_SIGNAL_DUMPER_FUNCTIONS_TERMINATE_RA_PROC, 0);
for (ii = 0; ii < NB_RA_PROC_MAX; ii++) { for (ii = 0; ii < NB_RA_PROC_MAX; ii++) {
RA_t *ra = &mac->common_channels[CC_idP].ra[ii]; RA_t *ra = &mac->common_channels[CC_idP].ra[ii];
@@ -621,8 +519,7 @@ rx_sdu(const module_id_t enb_mod_idP,
enb_mod_idP, CC_idP, frameP, rx_lengths[i], enb_mod_idP, CC_idP, frameP, rx_lengths[i],
payload_ptr - sduP); payload_ptr - sduP);
if ((UE_id = if ((UE_id = add_new_ue(enb_mod_idP, CC_idP,
add_new_ue(enb_mod_idP, CC_idP,
mac->common_channels[CC_idP]. mac->common_channels[CC_idP].
ra[ii].rnti, harq_pid ra[ii].rnti, harq_pid
#ifdef Rel14 #ifdef Rel14
@@ -689,19 +586,20 @@ rx_sdu(const module_id_t enb_mod_idP,
#endif #endif
if (UE_id != -1) { if (UE_id != -1) {
if (lcgid_updated[UE_list->UE_template[CC_idP][UE_id].lcgidmap[rx_lcids[i]]] == 0) {
// adjust buffer occupancy of the correponding logical channel group // adjust buffer occupancy of the correponding logical channel group
if (UE_list->UE_template[CC_idP][UE_id]. if (UE_list->UE_template[CC_idP][UE_id].ul_buffer_info[UE_list->UE_template[CC_idP][UE_id].lcgidmap[rx_lcids[i]]] >= rx_lengths[i])
ul_buffer_info[UE_list->UE_template[CC_idP] UE_list->UE_template[CC_idP][UE_id].ul_buffer_info[UE_list->UE_template[CC_idP][UE_id].lcgidmap[rx_lcids[i]]] -= rx_lengths[i];
[UE_id].lcgidmap[rx_lcids[i]]] >=
rx_lengths[i])
UE_list->UE_template[CC_idP][UE_id].
ul_buffer_info[UE_list->UE_template[CC_idP]
[UE_id].lcgidmap[rx_lcids[i]]] -=
rx_lengths[i];
else else
UE_list->UE_template[CC_idP][UE_id]. UE_list->UE_template[CC_idP][UE_id].ul_buffer_info[UE_list->UE_template[CC_idP][UE_id].lcgidmap[rx_lcids[i]]] = 0;
ul_buffer_info[UE_list->UE_template[CC_idP]
[UE_id].lcgidmap[rx_lcids[i]]] = 0; UE_list->UE_template[CC_idP][UE_id].estimated_ul_buffer =
UE_list->UE_template[CC_idP][UE_id].ul_buffer_info[0] +
UE_list->UE_template[CC_idP][UE_id].ul_buffer_info[1] +
UE_list->UE_template[CC_idP][UE_id].ul_buffer_info[2] +
UE_list->UE_template[CC_idP][UE_id].ul_buffer_info[3];
//UE_list->UE_template[CC_idP][UE_id].estimated_ul_buffer += UE_list->UE_template[CC_idP][UE_id].estimated_ul_buffer / 4;
}
LOG_D(MAC, LOG_D(MAC,
"[eNB %d] CC_id %d Frame %d : ULSCH -> UL-DCCH, received %d bytes form UE %d on LCID %d \n", "[eNB %d] CC_id %d Frame %d : ULSCH -> UL-DCCH, received %d bytes form UE %d on LCID %d \n",
@@ -709,11 +607,8 @@ rx_sdu(const module_id_t enb_mod_idP,
rx_lcids[i]); rx_lcids[i]);
mac_rlc_data_ind(enb_mod_idP, current_rnti, enb_mod_idP, frameP, ENB_FLAG_YES, MBMS_FLAG_NO, rx_lcids[i], (char *) payload_ptr, rx_lengths[i], 1, NULL); //(unsigned int*)crc_status); mac_rlc_data_ind(enb_mod_idP, current_rnti, enb_mod_idP, frameP, ENB_FLAG_YES, MBMS_FLAG_NO, rx_lcids[i], (char *) payload_ptr, rx_lengths[i], 1, NULL); //(unsigned int*)crc_status);
UE_list->eNB_UE_stats[CC_idP][UE_id]. UE_list->eNB_UE_stats[CC_idP][UE_id].num_pdu_rx[rx_lcids[i]] += 1;
num_pdu_rx[rx_lcids[i]] += 1; UE_list->eNB_UE_stats[CC_idP][UE_id].num_bytes_rx[rx_lcids[i]] += rx_lengths[i];
UE_list->eNB_UE_stats[CC_idP][UE_id].
num_bytes_rx[rx_lcids[i]]
+= rx_lengths[i];
} }
@@ -752,31 +647,29 @@ rx_sdu(const module_id_t enb_mod_idP,
ul_buffer_info[UE_list->UE_template[CC_idP] ul_buffer_info[UE_list->UE_template[CC_idP]
[UE_id].lcgidmap[rx_lcids[i]]]); [UE_id].lcgidmap[rx_lcids[i]]]);
if (UE_list->UE_template[CC_idP][UE_id]. if (lcgid_updated[UE_list->UE_template[CC_idP][UE_id].lcgidmap[rx_lcids[i]]] == 0) {
ul_buffer_info[UE_list->UE_template[CC_idP] if (UE_list->UE_template[CC_idP][UE_id].ul_buffer_info[UE_list->UE_template[CC_idP][UE_id].lcgidmap[rx_lcids[i]]] >= rx_lengths[i])
[UE_id].lcgidmap[rx_lcids[i]]] UE_list->UE_template[CC_idP][UE_id].ul_buffer_info[UE_list->UE_template[CC_idP][UE_id].lcgidmap[rx_lcids[i]]] -= rx_lengths[i];
>= rx_lengths[i])
UE_list->UE_template[CC_idP][UE_id].
ul_buffer_info[UE_list->UE_template[CC_idP]
[UE_id].lcgidmap[rx_lcids[i]]]
-= rx_lengths[i];
else else
UE_list->UE_template[CC_idP][UE_id].ul_buffer_info UE_list->UE_template[CC_idP][UE_id].ul_buffer_info[UE_list->UE_template[CC_idP][UE_id].lcgidmap[rx_lcids[i]]] = 0;
[UE_list->UE_template[CC_idP][UE_id].lcgidmap
[rx_lcids[i]]] = 0; UE_list->UE_template[CC_idP][UE_id].estimated_ul_buffer =
if ((rx_lengths[i] < SCH_PAYLOAD_SIZE_MAX) UE_list->UE_template[CC_idP][UE_id].ul_buffer_info[0] +
&& (rx_lengths[i] > 0)) { // MAX SIZE OF transport block UE_list->UE_template[CC_idP][UE_id].ul_buffer_info[1] +
UE_list->UE_template[CC_idP][UE_id].ul_buffer_info[2] +
UE_list->UE_template[CC_idP][UE_id].ul_buffer_info[3];
//UE_list->UE_template[CC_idP][UE_id].estimated_ul_buffer += UE_list->UE_template[CC_idP][UE_id].estimated_ul_buffer / 4;
}
if ((rx_lengths[i] < SCH_PAYLOAD_SIZE_MAX) && (rx_lengths[i] > 0)) { // MAX SIZE OF transport block
mac_rlc_data_ind(enb_mod_idP, current_rnti, enb_mod_idP, frameP, ENB_FLAG_YES, MBMS_FLAG_NO, rx_lcids[i], (char *) payload_ptr, rx_lengths[i], 1, NULL); //(unsigned int*)crc_status); mac_rlc_data_ind(enb_mod_idP, current_rnti, enb_mod_idP, frameP, ENB_FLAG_YES, MBMS_FLAG_NO, rx_lcids[i], (char *) payload_ptr, rx_lengths[i], 1, NULL); //(unsigned int*)crc_status);
UE_list->eNB_UE_stats[CC_idP][UE_id]. UE_list->eNB_UE_stats[CC_idP][UE_id].num_pdu_rx[rx_lcids[i]] += 1;
num_pdu_rx[rx_lcids[i]] += 1; UE_list->eNB_UE_stats[CC_idP][UE_id].num_bytes_rx[rx_lcids[i]] += rx_lengths[i];
UE_list->eNB_UE_stats[CC_idP][UE_id].
num_bytes_rx[rx_lcids[i]] += rx_lengths[i];
//clear uplane_inactivity_timer //clear uplane_inactivity_timer
UE_list->UE_sched_ctrl[UE_id].uplane_inactivity_timer = 0; UE_list->UE_sched_ctrl[UE_id].uplane_inactivity_timer = 0;
} else { /* rx_length[i] */ } else { /* rx_length[i] */
UE_list->eNB_UE_stats[CC_idP][UE_id]. UE_list->eNB_UE_stats[CC_idP][UE_id].num_errors_rx += 1;
num_errors_rx += 1;
LOG_E(MAC, LOG_E(MAC,
"[eNB %d] CC_id %d Frame %d : Max size of transport block reached LCID %d from UE %d ", "[eNB %d] CC_id %d Frame %d : Max size of transport block reached LCID %d from UE %d ",
enb_mod_idP, CC_idP, frameP, rx_lcids[i], enb_mod_idP, CC_idP, frameP, rx_lcids[i],
@@ -830,14 +723,12 @@ rx_sdu(const module_id_t enb_mod_idP,
} else { } else {
if (UE_id != -1) { if (UE_id != -1) {
UE_list->eNB_UE_stats[CC_idP][UE_id].pdu_bytes_rx = sdu_lenP; UE_list->eNB_UE_stats[CC_idP][UE_id].pdu_bytes_rx = sdu_lenP;
UE_list->eNB_UE_stats[CC_idP][UE_id].total_pdu_bytes_rx += UE_list->eNB_UE_stats[CC_idP][UE_id].total_pdu_bytes_rx += sdu_lenP;
sdu_lenP;
UE_list->eNB_UE_stats[CC_idP][UE_id].total_num_pdus_rx += 1; UE_list->eNB_UE_stats[CC_idP][UE_id].total_num_pdus_rx += 1;
} }
} }
VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME(VCD_SIGNAL_DUMPER_FUNCTIONS_RX_SDU, 0);
(VCD_SIGNAL_DUMPER_FUNCTIONS_RX_SDU, 0);
stop_meas(&mac->rx_ulsch_sdu); stop_meas(&mac->rx_ulsch_sdu);
} }
@@ -860,8 +751,7 @@ void
add_ue_ulsch_info(module_id_t module_idP, int CC_id, int UE_id, add_ue_ulsch_info(module_id_t module_idP, int CC_id, int UE_id,
sub_frame_t subframeP, UE_ULSCH_STATUS status) sub_frame_t subframeP, UE_ULSCH_STATUS status)
{ {
eNB_ulsch_info[module_idP][CC_id][UE_id].rnti = eNB_ulsch_info[module_idP][CC_id][UE_id].rnti = UE_RNTI(module_idP, UE_id);
UE_RNTI(module_idP, UE_id);
eNB_ulsch_info[module_idP][CC_id][UE_id].subframe = subframeP; eNB_ulsch_info[module_idP][CC_id][UE_id].subframe = subframeP;
eNB_ulsch_info[module_idP][CC_id][UE_id].status = status; eNB_ulsch_info[module_idP][CC_id][UE_id].status = status;
@@ -892,8 +782,7 @@ unsigned char *parse_ulsch_header(unsigned char *mac_header,
if (lcid < EXTENDED_POWER_HEADROOM) { if (lcid < EXTENDED_POWER_HEADROOM) {
if (not_done == 0) { // last MAC SDU, length is implicit if (not_done == 0) { // last MAC SDU, length is implicit
mac_header_ptr++; mac_header_ptr++;
length = length = tb_length - (mac_header_ptr - mac_header) - ce_len;
tb_length - (mac_header_ptr - mac_header) - ce_len;
for (num_sdu_cnt = 0; num_sdu_cnt < num_sdus; for (num_sdu_cnt = 0; num_sdu_cnt < num_sdus;
num_sdu_cnt++) { num_sdu_cnt++) {
@@ -961,7 +850,7 @@ set_msg3_subframe(module_id_t mod_id,
int subframe, int rnti, int Msg3_frame, int subframe, int rnti, int Msg3_frame,
int Msg3_subframe) int Msg3_subframe)
{ {
eNB_MAC_INST *mac = RC.mac[mod_id]; eNB_MAC_INST *mac = RC.mac[Mod_id];
int i; int i;
for (i = 0; i < NB_RA_PROC_MAX; i++) { for (i = 0; i < NB_RA_PROC_MAX; i++) {
if (mac->common_channels[CC_id].ra[i].state != IDLE && if (mac->common_channels[CC_id].ra[i].state != IDLE &&
@@ -1124,11 +1013,10 @@ schedule_ulsch(module_id_t module_idP, frame_t frameP,
if ((n_active_slices_uplink > 0) && (n_active_slices_uplink <= MAX_NUM_SLICES)) { if ((n_active_slices_uplink > 0) && (n_active_slices_uplink <= MAX_NUM_SLICES)) {
LOG_N(MAC,"[eNB %d]frame %d subframe %d: number of active UL slices has changed: %d-->%d\n", LOG_N(MAC,"[eNB %d]frame %d subframe %d: number of active UL slices has changed: %d-->%d\n",
module_idP, frameP, subframeP, n_active_slices_current_uplink, n_active_slices_uplink); module_idP, frameP, subframeP, n_active_slices_current_uplink, n_active_slices_uplink);
n_active_slices_current_uplink = n_active_slices_uplink; n_active_slices_current_uplink = n_active_slices_uplink;
} else { } else {
LOG_W(MAC,"invalid number of UL slices %d, revert to the previous value %d\n",n_active_slices_uplink, n_active_slices_current_uplink); LOG_W(MAC,"invalid number of UL slices %d, revert to the previous value %d\n",
n_active_slices_uplink, n_active_slices_current_uplink);
n_active_slices_uplink = n_active_slices_current_uplink; n_active_slices_uplink = n_active_slices_current_uplink;
} }
} }
@@ -1136,10 +1024,10 @@ schedule_ulsch(module_id_t module_idP, frame_t frameP,
// check if the slice rb share has changed, and log the console // check if the slice rb share has changed, and log the console
if (slice_percentage_current_uplink[i] != slice_percentage_uplink[i]){ if (slice_percentage_current_uplink[i] != slice_percentage_uplink[i]){
LOG_N(MAC,"[eNB %d][SLICE %d][UL] frame %d subframe %d: total percentage %f-->%f, slice RB percentage has changed: %f-->%f\n", LOG_N(MAC,"[eNB %d][SLICE %d][UL] frame %d subframe %d: total percentage %f-->%f, slice RB percentage has changed: %f-->%f\n",
module_idP, i, frameP, subframeP, total_slice_percentage_current_uplink, total_slice_percentage_uplink, slice_percentage_current_uplink[i], slice_percentage_uplink[i]); module_idP, i, frameP, subframeP, total_slice_percentage_current_uplink,
total_slice_percentage_uplink, slice_percentage_current_uplink[i], slice_percentage_uplink[i]);
total_slice_percentage_current_uplink = total_slice_percentage_uplink; total_slice_percentage_current_uplink = total_slice_percentage_uplink;
slice_percentage_current_uplink[i] = slice_percentage_uplink[i]; slice_percentage_current_uplink[i] = slice_percentage_uplink[i];
} }
// check if the slice max MCS, and log the console // check if the slice max MCS, and log the console
@@ -1149,9 +1037,9 @@ schedule_ulsch(module_id_t module_idP, frame_t frameP,
module_idP, i, frameP, subframeP, slice_maxmcs_current_uplink[i], slice_maxmcs_uplink[i]); module_idP, i, frameP, subframeP, slice_maxmcs_current_uplink[i], slice_maxmcs_uplink[i]);
slice_maxmcs_current_uplink[i] = slice_maxmcs_uplink[i]; slice_maxmcs_current_uplink[i] = slice_maxmcs_uplink[i];
} else { } else {
LOG_W(MAC,"[eNB %d][SLICE %d][UL] invalid slice max mcs %d, revert the previous value %d\n",module_idP, i, slice_maxmcs_uplink[i],slice_maxmcs_current_uplink[i]); LOG_W(MAC,"[eNB %d][SLICE %d][UL] invalid slice max mcs %d, revert the previous value %d\n",
module_idP, i, slice_maxmcs_uplink[i],slice_maxmcs_current_uplink[i]);
slice_maxmcs_uplink[i] = slice_maxmcs_current_uplink[i]; slice_maxmcs_uplink[i] = slice_maxmcs_current_uplink[i];
} }
} }
@@ -1159,16 +1047,12 @@ schedule_ulsch(module_id_t module_idP, frame_t frameP,
if (update_ul_scheduler_current[i] != update_ul_scheduler[i]){ if (update_ul_scheduler_current[i] != update_ul_scheduler[i]){
LOG_N(MAC,"[eNB %d][SLICE %d][UL] frame %d subframe %d: UL scheduler for this slice is updated: %s \n", LOG_N(MAC,"[eNB %d][SLICE %d][UL] frame %d subframe %d: UL scheduler for this slice is updated: %s \n",
module_idP, i, frameP, subframeP, ul_scheduler_type[i]); module_idP, i, frameP, subframeP, ul_scheduler_type[i]);
update_ul_scheduler_current[i] = update_ul_scheduler[i]; update_ul_scheduler_current[i] = update_ul_scheduler[i];
} }
} } else {
else {
if (n_active_slices_uplink == n_active_slices_current_uplink) { if (n_active_slices_uplink == n_active_slices_current_uplink) {
LOG_W(MAC,"[eNB %d][SLICE %d][UL] invalid total RB share (%f->%f), reduce proportionally the RB share by 0.1\n", LOG_W(MAC,"[eNB %d][SLICE %d][UL] invalid total RB share (%f->%f), reduce proportionally the RB share by 0.1\n",
module_idP, i, total_slice_percentage_current_uplink, module_idP, i, total_slice_percentage_current_uplink, total_slice_percentage_uplink);
total_slice_percentage_uplink);
if (slice_percentage_uplink[i] > avg_slice_percentage_uplink) { if (slice_percentage_uplink[i] > avg_slice_percentage_uplink) {
slice_percentage_uplink[i] -= 0.1; slice_percentage_uplink[i] -= 0.1;
total_slice_percentage_uplink -= 0.1; total_slice_percentage_uplink -= 0.1;
@@ -1189,7 +1073,6 @@ schedule_ulsch(module_id_t module_idP, frame_t frameP,
slice_sched_ul[i](module_idP, i, frameP, subframeP, sched_subframe, first_rb); slice_sched_ul[i](module_idP, i, frameP, subframeP, sched_subframe, first_rb);
} }
stop_meas(&mac->schedule_ulsch); stop_meas(&mac->schedule_ulsch);
} }
@@ -1331,8 +1214,7 @@ schedule_ulsch_rnti(module_id_t module_idP,
UE_template = &UE_list->UE_template[CC_id][UE_id]; UE_template = &UE_list->UE_template[CC_id][UE_id];
UE_sched_ctrl = &UE_list->UE_sched_ctrl[UE_id]; UE_sched_ctrl = &UE_list->UE_sched_ctrl[UE_id];
harq_pid = harq_pid = subframe2harqpid(&cc[CC_id], sched_frame, sched_subframeP);
subframe2harqpid(&cc[CC_id], sched_frame, sched_subframeP);
round = UE_sched_ctrl->round_UL[CC_id][harq_pid]; round = UE_sched_ctrl->round_UL[CC_id][harq_pid];
AssertFatal(round < 8, "round %d > 7 for UE %d/%x\n", round, AssertFatal(round < 8, "round %d > 7 for UE %d/%x\n", round,
UE_id, rnti); UE_id, rnti);
@@ -1341,13 +1223,8 @@ schedule_ulsch_rnti(module_id_t module_idP,
module_idP, frameP, subframeP, sched_frame, sched_subframeP, harq_pid, UE_id, rnti, module_idP, frameP, subframeP, sched_frame, sched_subframeP, harq_pid, UE_id, rnti,
CC_id, aggregation, N_RB_UL); CC_id, aggregation, N_RB_UL);
RC.eNB[module_idP][CC_id]->pusch_stats_BO[UE_id][(frameP * RC.eNB[module_idP][CC_id]->pusch_stats_BO[UE_id][(frameP * 10) + subframeP] = UE_template->estimated_ul_buffer;
10) + VCD_SIGNAL_DUMPER_DUMP_VARIABLE_BY_NAME(VCD_SIGNAL_DUMPER_VARIABLES_UE0_BO,RC.eNB[module_idP][CC_id]->pusch_stats_BO[UE_id][(frameP *
subframeP] =
UE_template->ul_total_buffer;
VCD_SIGNAL_DUMPER_DUMP_VARIABLE_BY_NAME
(VCD_SIGNAL_DUMPER_VARIABLES_UE0_BO,
RC.eNB[module_idP][CC_id]->pusch_stats_BO[UE_id][(frameP *
10) + 10) +
subframeP]); subframeP]);
if (UE_is_to_be_scheduled(module_idP, CC_id, UE_id) > 0 || round > 0) // || ((frameP%10)==0)) if (UE_is_to_be_scheduled(module_idP, CC_id, UE_id) > 0 || round > 0) // || ((frameP%10)==0))
@@ -1384,9 +1261,7 @@ schedule_ulsch_rnti(module_id_t module_idP,
// this assumes accumulated tpc // this assumes accumulated tpc
// make sure that we are only sending a tpc update once a frame, otherwise the control loop will freak out // make sure that we are only sending a tpc update once a frame, otherwise the control loop will freak out
int32_t framex10psubframe = int32_t framex10psubframe = UE_template->pusch_tpc_tx_frame * 10 + UE_template->pusch_tpc_tx_subframe;
UE_template->pusch_tpc_tx_frame * 10 +
UE_template->pusch_tpc_tx_subframe;
if (((framex10psubframe + 10) <= (frameP * 10 + subframeP)) || //normal case if (((framex10psubframe + 10) <= (frameP * 10 + subframeP)) || //normal case
((framex10psubframe > (frameP * 10 + subframeP)) && (((10240 - framex10psubframe + frameP * 10 + subframeP) >= 10)))) //frame wrap-around ((framex10psubframe > (frameP * 10 + subframeP)) && (((10240 - framex10psubframe + frameP * 10 + subframeP) >= 10)))) //frame wrap-around
{ {
@@ -1419,10 +1294,8 @@ schedule_ulsch_rnti(module_id_t module_idP,
UE_template->oldNDI_UL[harq_pid] = ndi; UE_template->oldNDI_UL[harq_pid] = ndi;
UE_list->eNB_UE_stats[CC_id][UE_id]. UE_list->eNB_UE_stats[CC_id][UE_id].
normalized_rx_power = normalized_rx_power; normalized_rx_power = normalized_rx_power;
UE_list->eNB_UE_stats[CC_id][UE_id].target_rx_power = UE_list->eNB_UE_stats[CC_id][UE_id].target_rx_power = target_rx_power;
target_rx_power; UE_list->eNB_UE_stats[CC_id][UE_id].ulsch_mcs1 = UE_template->pre_assigned_mcs_ul;
UE_list->eNB_UE_stats[CC_id][UE_id].ulsch_mcs1 =
UE_template->pre_assigned_mcs_ul;
UE_template->mcs_UL[harq_pid] = UE_template->pre_assigned_mcs_ul; //cmin (UE_template->pre_assigned_mcs_ul, openair_daq_vars.target_ue_ul_mcs); // adjust, based on user-defined MCS UE_template->mcs_UL[harq_pid] = UE_template->pre_assigned_mcs_ul; //cmin (UE_template->pre_assigned_mcs_ul, openair_daq_vars.target_ue_ul_mcs); // adjust, based on user-defined MCS
if (UE_template->pre_allocated_rb_table_index_ul >= 0) { if (UE_template->pre_allocated_rb_table_index_ul >= 0) {
rb_table_index = rb_table_index =
@@ -1432,8 +1305,7 @@ schedule_ulsch_rnti(module_id_t module_idP,
rb_table_index = 5; // for PHR rb_table_index = 5; // for PHR
} }
UE_list->eNB_UE_stats[CC_id][UE_id].ulsch_mcs2 = UE_list->eNB_UE_stats[CC_id][UE_id].ulsch_mcs2 = UE_template->mcs_UL[harq_pid];
UE_template->mcs_UL[harq_pid];
// buffer_occupancy = UE_template->ul_total_buffer; // buffer_occupancy = UE_template->ul_total_buffer;
@@ -1444,13 +1316,10 @@ schedule_ulsch_rnti(module_id_t module_idP,
rb_table_index--; rb_table_index--;
} }
UE_template->TBS_UL[harq_pid] = UE_template->TBS_UL[harq_pid] = get_TBS_UL(UE_template->mcs_UL[harq_pid],
get_TBS_UL(UE_template->mcs_UL[harq_pid],
rb_table[rb_table_index]); rb_table[rb_table_index]);
UE_list->eNB_UE_stats[CC_id][UE_id]. UE_list->eNB_UE_stats[CC_id][UE_id].total_rbs_used_rx += rb_table[rb_table_index];
total_rbs_used_rx += rb_table[rb_table_index]; UE_list->eNB_UE_stats[CC_id][UE_id].ulsch_TBS = UE_template->TBS_UL[harq_pid];
UE_list->eNB_UE_stats[CC_id][UE_id].ulsch_TBS =
UE_template->TBS_UL[harq_pid];
// buffer_occupancy -= TBS; // buffer_occupancy -= TBS;
T(T_ENB_MAC_UE_UL_SCHEDULE, T_INT(module_idP), T(T_ENB_MAC_UE_UL_SCHEDULE, T_INT(module_idP),
@@ -1461,8 +1330,7 @@ schedule_ulsch_rnti(module_id_t module_idP,
T_INT(rb_table[rb_table_index]), T_INT(rb_table[rb_table_index]),
T_INT(UE_template->TBS_UL[harq_pid]), T_INT(ndi)); T_INT(UE_template->TBS_UL[harq_pid]), T_INT(ndi));
if (mac_eNB_get_rrc_status(module_idP, rnti) < if (mac_eNB_get_rrc_status(module_idP, rnti) < RRC_CONNECTED)
RRC_CONNECTED)
LOG_D(MAC, LOG_D(MAC,
"[eNB %d][PUSCH %d/%x] CC_id %d Frame %d subframeP %d Scheduled UE %d (mcs %d, first rb %d, nb_rb %d, rb_table_index %d, TBS %d, harq_pid %d)\n", "[eNB %d][PUSCH %d/%x] CC_id %d Frame %d subframeP %d Scheduled UE %d (mcs %d, first rb %d, nb_rb %d, rb_table_index %d, TBS %d, harq_pid %d)\n",
module_idP, harq_pid, rnti, CC_id, frameP, module_idP, harq_pid, rnti, CC_id, frameP,
@@ -1474,67 +1342,48 @@ schedule_ulsch_rnti(module_id_t module_idP,
// bad indices : 20 (40 PRB), 21 (45 PRB), 22 (48 PRB) // bad indices : 20 (40 PRB), 21 (45 PRB), 22 (48 PRB)
//store for possible retransmission //store for possible retransmission
UE_template->nb_rb_ul[harq_pid] = UE_template->nb_rb_ul[harq_pid] = rb_table[rb_table_index];
rb_table[rb_table_index];
UE_template->first_rb_ul[harq_pid] = first_rb[CC_id]; UE_template->first_rb_ul[harq_pid] = first_rb[CC_id];
UE_sched_ctrl->ul_scheduled |= (1 << harq_pid); UE_sched_ctrl->ul_scheduled |= (1 << harq_pid);
if (UE_id == UE_list->head) if (UE_id == UE_list->head)
VCD_SIGNAL_DUMPER_DUMP_VARIABLE_BY_NAME VCD_SIGNAL_DUMPER_DUMP_VARIABLE_BY_NAME(VCD_SIGNAL_DUMPER_VARIABLES_UE0_SCHEDULED,
(VCD_SIGNAL_DUMPER_VARIABLES_UE0_SCHEDULED,
UE_sched_ctrl->ul_scheduled); UE_sched_ctrl->ul_scheduled);
// adjust total UL buffer status by TBS, wait for UL sdus to do final update // adjust scheduled UL bytes by TBS, wait for UL sdus to do final update
LOG_D(MAC, LOG_D(MAC,
"[eNB %d] CC_id %d UE %d/%x : adjusting ul_total_buffer, old %d, TBS %d\n", "[eNB %d] CC_id %d UE %d/%x : adjusting scheduled_ul_bytes, old %d, TBS %d\n",
module_idP, CC_id, UE_id, rnti, module_idP, CC_id, UE_id, rnti,
UE_template->ul_total_buffer, UE_template->scheduled_ul_bytes,
UE_template->TBS_UL[harq_pid]); UE_template->TBS_UL[harq_pid]);
if (UE_template->ul_total_buffer >
UE_template->TBS_UL[harq_pid]) UE_template->scheduled_ul_bytes += UE_template->TBS_UL[harq_pid];
UE_template->ul_total_buffer -=
UE_template->TBS_UL[harq_pid]; LOG_D(MAC, "scheduled_ul_bytes, new %d\n", UE_template->scheduled_ul_bytes);
else
UE_template->ul_total_buffer = 0;
LOG_D(MAC, "ul_total_buffer, new %d\n",
UE_template->ul_total_buffer);
// Cyclic shift for DM RS // Cyclic shift for DM RS
cshift = 0; // values from 0 to 7 can be used for mapping the cyclic shift (36.211 , Table 5.5.2.1.1-1) cshift = 0; // values from 0 to 7 can be used for mapping the cyclic shift (36.211 , Table 5.5.2.1.1-1)
// save it for a potential retransmission // save it for a potential retransmission
UE_template->cshift[harq_pid] = cshift; UE_template->cshift[harq_pid] = cshift;
hi_dci0_pdu = &hi_dci0_req_body->hi_dci0_pdu_list[hi_dci0_req_body->number_of_dci + hi_dci0_req_body->number_of_hi]; hi_dci0_pdu = &hi_dci0_req_body->hi_dci0_pdu_list[hi_dci0_req_body->number_of_dci + hi_dci0_req_body->number_of_hi];
memset((void *) hi_dci0_pdu, 0, memset((void *) hi_dci0_pdu, 0,sizeof(nfapi_hi_dci0_request_pdu_t));
sizeof(nfapi_hi_dci0_request_pdu_t));
hi_dci0_pdu->pdu_type = NFAPI_HI_DCI0_DCI_PDU_TYPE; hi_dci0_pdu->pdu_type = NFAPI_HI_DCI0_DCI_PDU_TYPE;
hi_dci0_pdu->pdu_size = hi_dci0_pdu->pdu_size = 2 + sizeof(nfapi_hi_dci0_dci_pdu);
2 + sizeof(nfapi_hi_dci0_dci_pdu);
hi_dci0_pdu->dci_pdu.dci_pdu_rel8.tl.tag = NFAPI_HI_DCI0_REQUEST_DCI_PDU_REL8_TAG; hi_dci0_pdu->dci_pdu.dci_pdu_rel8.tl.tag = NFAPI_HI_DCI0_REQUEST_DCI_PDU_REL8_TAG;
hi_dci0_pdu->dci_pdu.dci_pdu_rel8.dci_format = hi_dci0_pdu->dci_pdu.dci_pdu_rel8.dci_format = NFAPI_UL_DCI_FORMAT_0;
NFAPI_UL_DCI_FORMAT_0; hi_dci0_pdu->dci_pdu.dci_pdu_rel8.aggregation_level = aggregation;
hi_dci0_pdu->dci_pdu.dci_pdu_rel8.aggregation_level =
aggregation;
hi_dci0_pdu->dci_pdu.dci_pdu_rel8.rnti = rnti; hi_dci0_pdu->dci_pdu.dci_pdu_rel8.rnti = rnti;
hi_dci0_pdu->dci_pdu.dci_pdu_rel8.transmission_power = hi_dci0_pdu->dci_pdu.dci_pdu_rel8.transmission_power = 6000;
6000; hi_dci0_pdu->dci_pdu.dci_pdu_rel8.resource_block_start = first_rb[CC_id];
hi_dci0_pdu->dci_pdu.dci_pdu_rel8. hi_dci0_pdu->dci_pdu.dci_pdu_rel8.number_of_resource_block = rb_table[rb_table_index];
resource_block_start = first_rb[CC_id]; hi_dci0_pdu->dci_pdu.dci_pdu_rel8.mcs_1 = UE_template->mcs_UL[harq_pid];
hi_dci0_pdu->dci_pdu.dci_pdu_rel8. hi_dci0_pdu->dci_pdu.dci_pdu_rel8.cyclic_shift_2_for_drms = cshift;
number_of_resource_block = hi_dci0_pdu->dci_pdu.dci_pdu_rel8.frequency_hopping_enabled_flag = 0;
rb_table[rb_table_index]; hi_dci0_pdu->dci_pdu.dci_pdu_rel8.new_data_indication_1 = ndi;
hi_dci0_pdu->dci_pdu.dci_pdu_rel8.mcs_1 =
UE_template->mcs_UL[harq_pid];
hi_dci0_pdu->dci_pdu.dci_pdu_rel8.
cyclic_shift_2_for_drms = cshift;
hi_dci0_pdu->dci_pdu.dci_pdu_rel8.
frequency_hopping_enabled_flag = 0;
hi_dci0_pdu->dci_pdu.dci_pdu_rel8.
new_data_indication_1 = ndi;
hi_dci0_pdu->dci_pdu.dci_pdu_rel8.tpc = tpc; hi_dci0_pdu->dci_pdu.dci_pdu_rel8.tpc = tpc;
hi_dci0_pdu->dci_pdu.dci_pdu_rel8.cqi_csi_request = hi_dci0_pdu->dci_pdu.dci_pdu_rel8.cqi_csi_request = cqi_req;
cqi_req; hi_dci0_pdu->dci_pdu.dci_pdu_rel8.dl_assignment_index = UE_template->DAI_ul[sched_subframeP];
hi_dci0_pdu->dci_pdu.dci_pdu_rel8.dl_assignment_index =
UE_template->DAI_ul[sched_subframeP];
hi_dci0_req_body->number_of_dci++; hi_dci0_req_body->number_of_dci++;
hi_dci0_req_body->sfnsf = sfnsf_add_subframe(frameP, subframeP, 4); hi_dci0_req_body->sfnsf = sfnsf_add_subframe(frameP, subframeP, 4);
@@ -1609,14 +1458,10 @@ schedule_ulsch_rnti(module_id_t module_idP,
memset((void *) hi_dci0_pdu, 0, memset((void *) hi_dci0_pdu, 0,
sizeof(nfapi_hi_dci0_request_pdu_t)); sizeof(nfapi_hi_dci0_request_pdu_t));
hi_dci0_pdu->pdu_type = NFAPI_HI_DCI0_HI_PDU_TYPE; hi_dci0_pdu->pdu_type = NFAPI_HI_DCI0_HI_PDU_TYPE;
hi_dci0_pdu->pdu_size = hi_dci0_pdu->pdu_size = 2 + sizeof(nfapi_hi_dci0_hi_pdu);
2 + sizeof(nfapi_hi_dci0_hi_pdu);
hi_dci0_pdu->hi_pdu.hi_pdu_rel8.tl.tag = NFAPI_HI_DCI0_REQUEST_HI_PDU_REL8_TAG; hi_dci0_pdu->hi_pdu.hi_pdu_rel8.tl.tag = NFAPI_HI_DCI0_REQUEST_HI_PDU_REL8_TAG;
hi_dci0_pdu->hi_pdu.hi_pdu_rel8.resource_block_start = hi_dci0_pdu->hi_pdu.hi_pdu_rel8.resource_block_start = UE_template->first_rb_ul[harq_pid];
UE_template->first_rb_ul[harq_pid]; hi_dci0_pdu->hi_pdu.hi_pdu_rel8.cyclic_shift_2_for_drms = UE_template->cshift[harq_pid];
hi_dci0_pdu->hi_pdu.hi_pdu_rel8.
cyclic_shift_2_for_drms =
UE_template->cshift[harq_pid];
hi_dci0_pdu->hi_pdu.hi_pdu_rel8.hi_value = 0; hi_dci0_pdu->hi_pdu.hi_pdu_rel8.hi_value = 0;
hi_dci0_req_body->number_of_hi++; hi_dci0_req_body->number_of_hi++;
hi_dci0_req_body->sfnsf = sfnsf_add_subframe(sched_frame, sched_subframeP, 0); hi_dci0_req_body->sfnsf = sfnsf_add_subframe(sched_frame, sched_subframeP, 0);
+13 -8
View File
@@ -1640,9 +1640,11 @@ assign_max_mcs_min_rb(module_id_t module_idP, int slice_id, int frameP,
to_prb(RC.mac[module_idP]->common_channels[CC_id]. to_prb(RC.mac[module_idP]->common_channels[CC_id].
ul_Bandwidth); ul_Bandwidth);
// if this UE has UL traffic // if this UE has UL traffic
if (UE_template->ul_total_buffer > 0) { int bytes_to_schedule = UE_template->estimated_ul_buffer - UE_template->scheduled_ul_bytes;
if (bytes_to_schedule < 0) bytes_to_schedule = 0;
int bits_to_schedule = bytes_to_schedule * 8;
if (bits_to_schedule > 0) {
tbs = get_TBS_UL(mcs, 3) << 3; // 1 or 2 PRB with cqi enabled does not work well! tbs = get_TBS_UL(mcs, 3) << 3; // 1 or 2 PRB with cqi enabled does not work well!
rb_table_index = 2; rb_table_index = 2;
@@ -1652,7 +1654,7 @@ assign_max_mcs_min_rb(module_id_t module_idP, int slice_id, int frameP,
Ncp, 0); Ncp, 0);
while ((((UE_template->phr_info - tx_power) < 0) while ((((UE_template->phr_info - tx_power) < 0)
|| (tbs > UE_template->ul_total_buffer)) || (tbs > bits_to_schedule))
&& (mcs > 3)) { && (mcs > 3)) {
// LOG_I(MAC,"UE_template->phr_info %d tx_power %d mcs %d\n", UE_template->phr_info,tx_power, mcs); // LOG_I(MAC,"UE_template->phr_info %d tx_power %d mcs %d\n", UE_template->phr_info,tx_power, mcs);
mcs--; mcs--;
@@ -1660,7 +1662,7 @@ assign_max_mcs_min_rb(module_id_t module_idP, int slice_id, int frameP,
tx_power = estimate_ue_tx_power(tbs, rb_table[rb_table_index], 0, Ncp, 0); // fixme: set use_srs tx_power = estimate_ue_tx_power(tbs, rb_table[rb_table_index], 0, Ncp, 0); // fixme: set use_srs
} }
while ((tbs < UE_template->ul_total_buffer) && while ((tbs < bits_to_schedule) &&
(rb_table[rb_table_index] < (rb_table[rb_table_index] <
(N_RB_UL - first_rb[CC_id])) (N_RB_UL - first_rb[CC_id]))
&& ((UE_template->phr_info - tx_power) > 0) && ((UE_template->phr_info - tx_power) > 0)
@@ -1750,11 +1752,14 @@ static int ue_ul_compare(const void *_a, const void *_b, void *_params)
UE_list->UE_template[pCCid2][UE_id2].ul_buffer_info[LCGID0]) UE_list->UE_template[pCCid2][UE_id2].ul_buffer_info[LCGID0])
return 1; return 1;
if (UE_list->UE_template[pCCid1][UE_id1].ul_total_buffer > int bytes_to_schedule1 = UE_list->UE_template[pCCid1][UE_id1].estimated_ul_buffer - UE_list->UE_template[pCCid1][UE_id1].scheduled_ul_bytes;
UE_list->UE_template[pCCid2][UE_id2].ul_total_buffer) if (bytes_to_schedule1 < 0) bytes_to_schedule1 = 0;
int bytes_to_schedule2 = UE_list->UE_template[pCCid2][UE_id2].estimated_ul_buffer - UE_list->UE_template[pCCid2][UE_id2].scheduled_ul_bytes;
if (bytes_to_schedule2 < 0) bytes_to_schedule2 = 0;
if (bytes_to_schedule1 > bytes_to_schedule2)
return -1; return -1;
if (UE_list->UE_template[pCCid1][UE_id1].ul_total_buffer < if (bytes_to_schedule1 < bytes_to_schedule2)
UE_list->UE_template[pCCid2][UE_id2].ul_total_buffer)
return 1; return 1;
if (UE_list->UE_template[pCCid1][UE_id1].pre_assigned_mcs_ul > if (UE_list->UE_template[pCCid1][UE_id1].pre_assigned_mcs_ul >
+5 -5
View File
@@ -217,11 +217,11 @@ int dump_eNB_l2_stats(char *buffer, int length)
UE_list->eNB_UE_stats[CC_id][UE_id].num_errors_rx); UE_list->eNB_UE_stats[CC_id][UE_id].num_errors_rx);
len+= sprintf(&buffer[len],"[MAC] Received PHR PH = %d (db)\n", UE_list->UE_template[CC_id][UE_id].phr_info); len+= sprintf(&buffer[len],"[MAC] Received PHR PH = %d (db)\n", UE_list->UE_template[CC_id][UE_id].phr_info);
len+= sprintf(&buffer[len],"[MAC] Received BSR LCGID[0][1][2][3] = %u %u %u %u\n", len+= sprintf(&buffer[len],"[MAC] Estimated size LCGID[0][1][2][3] = %u %u %u %u\n",
UE_list->UE_template[CC_id][UE_id].bsr_info[LCGID0], UE_list->UE_template[CC_id][UE_id].ul_buffer_info[LCGID0],
UE_list->UE_template[CC_id][UE_id].bsr_info[LCGID1], UE_list->UE_template[CC_id][UE_id].ul_buffer_info[LCGID1],
UE_list->UE_template[CC_id][UE_id].bsr_info[LCGID2], UE_list->UE_template[CC_id][UE_id].ul_buffer_info[LCGID2],
UE_list->UE_template[CC_id][UE_id].bsr_info[LCGID3] UE_list->UE_template[CC_id][UE_id].ul_buffer_info[LCGID3]
); );
} }
+1 -1
View File
@@ -876,7 +876,7 @@ uint8_t do_SIB23(uint8_t Mod_id,
(*sib3)->intraFreqCellReselectionInfo.presenceAntennaPort1 = 0; (*sib3)->intraFreqCellReselectionInfo.presenceAntennaPort1 = 0;
(*sib3)->intraFreqCellReselectionInfo.neighCellConfig.buf = CALLOC(8,1); (*sib3)->intraFreqCellReselectionInfo.neighCellConfig.buf = CALLOC(8,1);
(*sib3)->intraFreqCellReselectionInfo.neighCellConfig.size = 1; (*sib3)->intraFreqCellReselectionInfo.neighCellConfig.size = 1;
(*sib3)->intraFreqCellReselectionInfo.neighCellConfig.buf[0] = 1; (*sib3)->intraFreqCellReselectionInfo.neighCellConfig.buf[0] = 1 << 6;
(*sib3)->intraFreqCellReselectionInfo.neighCellConfig.bits_unused = 6; (*sib3)->intraFreqCellReselectionInfo.neighCellConfig.bits_unused = 6;
(*sib3)->intraFreqCellReselectionInfo.t_ReselectionEUTRA = 1; (*sib3)->intraFreqCellReselectionInfo.t_ReselectionEUTRA = 1;
(*sib3)->intraFreqCellReselectionInfo.t_ReselectionEUTRA_SF = (struct SpeedStateScaleFactors *)NULL; (*sib3)->intraFreqCellReselectionInfo.t_ReselectionEUTRA_SF = (struct SpeedStateScaleFactors *)NULL;
+14
View File
@@ -413,7 +413,9 @@ init_MCCH(
0,//rnti 0,//rnti
(BCCH_BCH_Message_t *)NULL, (BCCH_BCH_Message_t *)NULL,
(RadioResourceConfigCommonSIB_t *) NULL, (RadioResourceConfigCommonSIB_t *) NULL,
#ifdef Rel14
(RadioResourceConfigCommonSIB_t *) NULL, (RadioResourceConfigCommonSIB_t *) NULL,
#endif
(struct PhysicalConfigDedicated *)NULL, (struct PhysicalConfigDedicated *)NULL,
#if defined(Rel10) || defined(Rel14) #if defined(Rel10) || defined(Rel14)
(SCellToAddMod_r10_t *)NULL, (SCellToAddMod_r10_t *)NULL,
@@ -1173,7 +1175,9 @@ rrc_eNB_generate_RRCConnectionReestablishment(
ctxt_pP->rnti, ctxt_pP->rnti,
(BCCH_BCH_Message_t *) NULL, (BCCH_BCH_Message_t *) NULL,
(RadioResourceConfigCommonSIB_t *) NULL, (RadioResourceConfigCommonSIB_t *) NULL,
#ifdef Rel14
(RadioResourceConfigCommonSIB_t *) NULL, (RadioResourceConfigCommonSIB_t *) NULL,
#endif
(struct PhysicalConfigDedicated* ) ue_context_pP->ue_context.physicalConfigDedicated, (struct PhysicalConfigDedicated* ) ue_context_pP->ue_context.physicalConfigDedicated,
#if defined(Rel10) || defined(Rel14) #if defined(Rel10) || defined(Rel14)
(SCellToAddMod_r10_t *)NULL, (SCellToAddMod_r10_t *)NULL,
@@ -4599,7 +4603,9 @@ rrc_eNB_generate_RRCConnectionReconfiguration_handover(
ue_context_pP->ue_context.rnti, ue_context_pP->ue_context.rnti,
(BCCH_BCH_Message_t *) NULL, (BCCH_BCH_Message_t *) NULL,
(RadioResourceConfigCommonSIB_t*) NULL, (RadioResourceConfigCommonSIB_t*) NULL,
#ifdef Rel14
(RadioResourceConfigCommonSIB_t*) NULL, (RadioResourceConfigCommonSIB_t*) NULL,
#endif
ue_context_pP->ue_context.physicalConfigDedicated, ue_context_pP->ue_context.physicalConfigDedicated,
#if defined(Rel10) || defined(Rel14) #if defined(Rel10) || defined(Rel14)
(SCellToAddMod_r10_t *)NULL, (SCellToAddMod_r10_t *)NULL,
@@ -5178,7 +5184,9 @@ rrc_eNB_generate_RRCConnectionReconfiguration_handover(
ue_context_pP->ue_context.rnti, ue_context_pP->ue_context.rnti,
(BCCH_BCH_Message_t *) NULL, (BCCH_BCH_Message_t *) NULL,
(RadioResourceConfigCommonSIB_t *) NULL, (RadioResourceConfigCommonSIB_t *) NULL,
#ifdef Rel14
(RadioResourceConfigCommonSIB_t *) NULL, (RadioResourceConfigCommonSIB_t *) NULL,
#endif
ue_context_pP->ue_context.physicalConfigDedicated, ue_context_pP->ue_context.physicalConfigDedicated,
#if defined(Rel10) || defined(Rel14) #if defined(Rel10) || defined(Rel14)
(SCellToAddMod_r10_t *)NULL, (SCellToAddMod_r10_t *)NULL,
@@ -5448,7 +5456,9 @@ rrc_eNB_process_RRCConnectionReconfigurationComplete(
ue_context_pP->ue_context.rnti, ue_context_pP->ue_context.rnti,
(BCCH_BCH_Message_t *) NULL, (BCCH_BCH_Message_t *) NULL,
(RadioResourceConfigCommonSIB_t *) NULL, (RadioResourceConfigCommonSIB_t *) NULL,
#ifdef Rel14
(RadioResourceConfigCommonSIB_t *) NULL, (RadioResourceConfigCommonSIB_t *) NULL,
#endif
ue_context_pP->ue_context.physicalConfigDedicated, ue_context_pP->ue_context.physicalConfigDedicated,
#if defined(Rel10) || defined(Rel14) #if defined(Rel10) || defined(Rel14)
(SCellToAddMod_r10_t *)NULL, (SCellToAddMod_r10_t *)NULL,
@@ -5501,7 +5511,9 @@ rrc_eNB_process_RRCConnectionReconfigurationComplete(
ue_context_pP->ue_context.rnti, ue_context_pP->ue_context.rnti,
(BCCH_BCH_Message_t *) NULL, (BCCH_BCH_Message_t *) NULL,
(RadioResourceConfigCommonSIB_t *) NULL, (RadioResourceConfigCommonSIB_t *) NULL,
#ifdef Rel14
(RadioResourceConfigCommonSIB_t *) NULL, (RadioResourceConfigCommonSIB_t *) NULL,
#endif
ue_context_pP->ue_context.physicalConfigDedicated, ue_context_pP->ue_context.physicalConfigDedicated,
#if defined(Rel10) || defined(Rel14) #if defined(Rel10) || defined(Rel14)
(SCellToAddMod_r10_t *)NULL, (SCellToAddMod_r10_t *)NULL,
@@ -5617,7 +5629,9 @@ rrc_eNB_generate_RRCConnectionSetup(
ue_context_pP->ue_context.rnti, ue_context_pP->ue_context.rnti,
(BCCH_BCH_Message_t *) NULL, (BCCH_BCH_Message_t *) NULL,
(RadioResourceConfigCommonSIB_t *) NULL, (RadioResourceConfigCommonSIB_t *) NULL,
#ifdef Rel14
(RadioResourceConfigCommonSIB_t *) NULL, (RadioResourceConfigCommonSIB_t *) NULL,
#endif
ue_context_pP->ue_context.physicalConfigDedicated, ue_context_pP->ue_context.physicalConfigDedicated,
#if defined(Rel10) || defined(Rel14) #if defined(Rel10) || defined(Rel14)
(SCellToAddMod_r10_t *)NULL, (SCellToAddMod_r10_t *)NULL,
+1 -1
View File
@@ -470,7 +470,7 @@ int s1ap_eNB_encode_initial_ue_message(
return s1ap_generate_initiating_message(buffer, return s1ap_generate_initiating_message(buffer,
length, length,
S1ap_ProcedureCode_id_initialUEMessage, S1ap_ProcedureCode_id_initialUEMessage,
S1ap_Criticality_reject, S1ap_Criticality_ignore,
&asn_DEF_S1ap_InitialUEMessage, &asn_DEF_S1ap_InitialUEMessage,
initialUEMessage_p); initialUEMessage_p);
} }
@@ -1,4 +1,4 @@
Active_eNBs = ( "eNB_Eurecom_LTEBox"); Active_eNBs = ( "eNB-Eurecom-LTEBox");
# Asn1_verbosity, choice in: none, info, annoying # Asn1_verbosity, choice in: none, info, annoying
Asn1_verbosity = "none"; Asn1_verbosity = "none";
@@ -10,7 +10,7 @@ eNBs =
cell_type = "CELL_MACRO_ENB"; cell_type = "CELL_MACRO_ENB";
eNB_name = "eNB_Eurecom_LTEBox"; eNB_name = "eNB-Eurecom-LTEBox";
// Tracking area code, 0x0000 and 0xfffe are reserved values // Tracking area code, 0x0000 and 0xfffe are reserved values
tracking_area_code = "1"; tracking_area_code = "1";
@@ -1,4 +1,4 @@
Active_eNBs = ( "eNB_Eurecom_LTEBox"); Active_eNBs = ( "eNB-Eurecom-LTEBox");
# Asn1_verbosity, choice in: none, info, annoying # Asn1_verbosity, choice in: none, info, annoying
Asn1_verbosity = "none"; Asn1_verbosity = "none";
@@ -10,7 +10,7 @@ eNBs =
cell_type = "CELL_MACRO_ENB"; cell_type = "CELL_MACRO_ENB";
eNB_name = "eNB_Eurecom_LTEBox"; eNB_name = "eNB-Eurecom-LTEBox";
// Tracking area code, 0x0000 and 0xfffe are reserved values // Tracking area code, 0x0000 and 0xfffe are reserved values
tracking_area_code = "1"; tracking_area_code = "1";
@@ -1,4 +1,4 @@
Active_eNBs = ( "eNB_Eurecom_LTEBox"); Active_eNBs = ( "eNB-Eurecom-LTEBox");
# Asn1_verbosity, choice in: none, info, annoying # Asn1_verbosity, choice in: none, info, annoying
Asn1_verbosity = "none"; Asn1_verbosity = "none";
@@ -13,7 +13,7 @@ eNBs =
cell_type = "CELL_MACRO_ENB"; cell_type = "CELL_MACRO_ENB";
eNB_name = "eNB_Eurecom_LTEBox"; eNB_name = "eNB-Eurecom-LTEBox";
// Tracking area code, 0x0000 and 0xfffe are reserved values // Tracking area code, 0x0000 and 0xfffe are reserved values
tracking_area_code = "1"; tracking_area_code = "1";
@@ -1,4 +1,4 @@
Active_eNBs = ( "eNB_Eurecom_LTEBox"); Active_eNBs = ( "eNB-Eurecom-LTEBox");
# Asn1_verbosity, choice in: none, info, annoying # Asn1_verbosity, choice in: none, info, annoying
Asn1_verbosity = "none"; Asn1_verbosity = "none";
@@ -13,7 +13,7 @@ eNBs =
cell_type = "CELL_MACRO_ENB"; cell_type = "CELL_MACRO_ENB";
eNB_name = "eNB_Eurecom_LTEBox"; eNB_name = "eNB-Eurecom-LTEBox";
// Tracking area code, 0x0000 and 0xfffe are reserved values // Tracking area code, 0x0000 and 0xfffe are reserved values
tracking_area_code = "1"; tracking_area_code = "1";
+2
View File
@@ -1069,7 +1069,9 @@ void init_eNB_afterRU(void) {
RC.ru[ru_id]->wakeup_rxtx = wakeup_rxtx; RC.ru[ru_id]->wakeup_rxtx = wakeup_rxtx;
RC.ru[ru_id]->wakeup_prach_eNB = wakeup_prach_eNB; RC.ru[ru_id]->wakeup_prach_eNB = wakeup_prach_eNB;
#ifdef Rel14
RC.ru[ru_id]->wakeup_prach_eNB_br = wakeup_prach_eNB_br; RC.ru[ru_id]->wakeup_prach_eNB_br = wakeup_prach_eNB_br;
#endif
RC.ru[ru_id]->eNB_top = eNB_top; RC.ru[ru_id]->eNB_top = eNB_top;
} }
} }