Merge remote-tracking branch 'origin/develop-nr' into 472-add-pusch-dmrs-modes
This commit is contained in:
@@ -81,9 +81,9 @@
|
||||
#define MAX_eNB 2
|
||||
#define MAX_gNB 2
|
||||
#else
|
||||
#define MAX_MOBILES_PER_ENB 16
|
||||
#define MAX_MOBILES_PER_ENB_NB_IoT 16
|
||||
#define MAX_MOBILES_PER_GNB 16
|
||||
#define MAX_MOBILES_PER_ENB 4
|
||||
#define MAX_MOBILES_PER_ENB_NB_IoT 4
|
||||
#define MAX_MOBILES_PER_GNB 4
|
||||
#define MAX_eNB 2
|
||||
#define MAX_gNB 2
|
||||
#endif
|
||||
|
||||
@@ -302,5 +302,12 @@ typedef struct protocol_ctxt_s {
|
||||
#define CHECK_CTXT_ARGS(CTXT_Pp)
|
||||
|
||||
#define exit_fun(msg) exit_function(__FILE__,__FUNCTION__,__LINE__,msg)
|
||||
#ifdef __cplusplus
|
||||
extern "C"
|
||||
{
|
||||
#endif
|
||||
void exit_function(const char *file, const char *function, const int line, const char *s);
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
#endif
|
||||
|
||||
+100
-99
@@ -183,7 +183,7 @@ void RCconfig_L1(void) {
|
||||
if (RC.eNB[j] == NULL) {
|
||||
RC.eNB[j] = (PHY_VARS_eNB **)malloc((1+MAX_NUM_CCs)*sizeof(PHY_VARS_eNB **));
|
||||
LOG_I(PHY,"RC.eNB[%d] = %p\n",j,RC.eNB[j]);
|
||||
memset(RC.eNB[j],0,(1+MAX_NUM_CCs)*sizeof(PHY_VARS_eNB ** *));
|
||||
memset(RC.eNB[j],0,(1+MAX_NUM_CCs)*sizeof(PHY_VARS_eNB***));
|
||||
}
|
||||
|
||||
for (i=0; i<RC.nb_L1_CC[j]; i++) {
|
||||
@@ -277,6 +277,7 @@ int RCconfig_RRC(uint32_t i, eNB_RRC_INST *rrc, int macrlc_has_f1) {
|
||||
int nb_cc = 0;
|
||||
int32_t offsetMaxLimit = 0;
|
||||
int32_t cycleNb = 0;
|
||||
|
||||
MessageDef *msg_p = itti_alloc_new_message(TASK_RRC_ENB, RRC_CONFIGURATION_REQ);
|
||||
ccparams_lte_t ccparams_lte;
|
||||
ccparams_sidelink_t SLconfig;
|
||||
@@ -310,7 +311,7 @@ int RCconfig_RRC(uint32_t i, eNB_RRC_INST *rrc, int macrlc_has_f1) {
|
||||
config_get( ENBSParams,sizeof(ENBSParams)/sizeof(paramdef_t),NULL);
|
||||
num_enbs = ENBSParams[ENB_ACTIVE_ENBS_IDX].numelt;
|
||||
AssertFatal (i<num_enbs,
|
||||
"Failed to parse config file no %ith element in %s \n",i, ENB_CONFIG_STRING_ACTIVE_ENBS);
|
||||
"Failed to parse config file no %uth element in %s \n",i, ENB_CONFIG_STRING_ACTIVE_ENBS);
|
||||
|
||||
if (num_enbs>0) {
|
||||
// Output a list of all eNBs.
|
||||
@@ -334,7 +335,7 @@ int RCconfig_RRC(uint32_t i, eNB_RRC_INST *rrc, int macrlc_has_f1) {
|
||||
if (strcmp(*(ENBParamList.paramarray[i][ENB_TRANSPORT_S_PREFERENCE_IDX].strptr), "f1") == 0) {
|
||||
paramdef_t SCTPParams[] = SCTPPARAMS_DESC;
|
||||
char aprefix[MAX_OPTNAME_SIZE*2 + 8];
|
||||
sprintf(aprefix,"%s.[%i].%s",ENB_CONFIG_STRING_ENB_LIST,i,ENB_CONFIG_STRING_SCTP_CONFIG);
|
||||
sprintf(aprefix,"%s.[%u].%s",ENB_CONFIG_STRING_ENB_LIST,i,ENB_CONFIG_STRING_SCTP_CONFIG);
|
||||
config_get( SCTPParams,sizeof(SCTPParams)/sizeof(paramdef_t),aprefix);
|
||||
rrc->node_id = *(ENBParamList.paramarray[0][ENB_ENB_ID_IDX].uptr);
|
||||
LOG_I(ENB_APP,"F1AP: gNB_CU_id[%d] %d\n",k,rrc->node_id);
|
||||
@@ -443,16 +444,16 @@ int RCconfig_RRC(uint32_t i, eNB_RRC_INST *rrc, int macrlc_has_f1) {
|
||||
// Cell params, MIB/SIB1 in DU
|
||||
RRC_CONFIGURATION_REQ (msg_p).tdd_config[j] = ccparams_lte.tdd_config;
|
||||
AssertFatal (ccparams_lte.tdd_config <= LTE_TDD_Config__subframeAssignment_sa6,
|
||||
"Failed to parse eNB configuration file %s, enb %d illegal tdd_config %d (should be 0-%d)!",
|
||||
"Failed to parse eNB configuration file %s, enb %u illegal tdd_config %d (should be 0-%d)!",
|
||||
RC.config_file_name, i, ccparams_lte.tdd_config, LTE_TDD_Config__subframeAssignment_sa6);
|
||||
RRC_CONFIGURATION_REQ (msg_p).tdd_config_s[j] = ccparams_lte.tdd_config_s;
|
||||
AssertFatal (ccparams_lte.tdd_config_s <= LTE_TDD_Config__specialSubframePatterns_ssp8,
|
||||
"Failed to parse eNB configuration file %s, enb %d illegal tdd_config_s %d (should be 0-%d)!",
|
||||
"Failed to parse eNB configuration file %s, enb %u illegal tdd_config_s %d (should be 0-%d)!",
|
||||
RC.config_file_name, i, ccparams_lte.tdd_config_s, LTE_TDD_Config__specialSubframePatterns_ssp8);
|
||||
|
||||
if (!ccparams_lte.prefix_type)
|
||||
AssertFatal (0,
|
||||
"Failed to parse eNB configuration file %s, enb %d define %s: NORMAL,EXTENDED!\n",
|
||||
"Failed to parse eNB configuration file %s, enb %u define %s: NORMAL,EXTENDED!\n",
|
||||
RC.config_file_name, i, ENB_CONFIG_STRING_PREFIX_TYPE);
|
||||
else if (strcmp(ccparams_lte.prefix_type, "NORMAL") == 0) {
|
||||
RRC_CONFIGURATION_REQ (msg_p).prefix_type[j] = NORMAL;
|
||||
@@ -460,13 +461,13 @@ int RCconfig_RRC(uint32_t i, eNB_RRC_INST *rrc, int macrlc_has_f1) {
|
||||
RRC_CONFIGURATION_REQ (msg_p).prefix_type[j] = EXTENDED;
|
||||
} else {
|
||||
AssertFatal (0,
|
||||
"Failed to parse eNB configuration file %s, enb %d unknown value \"%s\" for prefix_type choice: NORMAL or EXTENDED !\n",
|
||||
"Failed to parse eNB configuration file %s, enb %u unknown value \"%s\" for prefix_type choice: NORMAL or EXTENDED !\n",
|
||||
RC.config_file_name, i, ccparams_lte.prefix_type);
|
||||
}
|
||||
|
||||
if (!ccparams_lte.pbch_repetition)
|
||||
AssertFatal (0,
|
||||
"Failed to parse eNB configuration file %s, enb %d define %s: TRUE,FALSE!\n",
|
||||
"Failed to parse eNB configuration file %s, enb %u define %s: TRUE,FALSE!\n",
|
||||
RC.config_file_name, i, ENB_CONFIG_STRING_PBCH_REPETITION);
|
||||
else if (strcmp(ccparams_lte.pbch_repetition, "TRUE") == 0) {
|
||||
RRC_CONFIGURATION_REQ (msg_p).pbch_repetition[j] = 1;
|
||||
@@ -474,7 +475,7 @@ int RCconfig_RRC(uint32_t i, eNB_RRC_INST *rrc, int macrlc_has_f1) {
|
||||
RRC_CONFIGURATION_REQ (msg_p).pbch_repetition[j] = 0;
|
||||
} else {
|
||||
AssertFatal (0,
|
||||
"Failed to parse eNB configuration file %s, enb %d unknown value \"%s\" for pbch_repetition choice: TRUE or FALSE !\n",
|
||||
"Failed to parse eNB configuration file %s, enb %u unknown value \"%s\" for pbch_repetition choice: TRUE or FALSE !\n",
|
||||
RC.config_file_name, i, ccparams_lte.pbch_repetition);
|
||||
}
|
||||
|
||||
@@ -485,7 +486,7 @@ int RCconfig_RRC(uint32_t i, eNB_RRC_INST *rrc, int macrlc_has_f1) {
|
||||
|
||||
if (ccparams_lte.Nid_cell>503) {
|
||||
AssertFatal (0,
|
||||
"Failed to parse eNB configuration file %s, enb %d unknown value \"%d\" for Nid_cell choice: 0...503 !\n",
|
||||
"Failed to parse eNB configuration file %s, enb %u unknown value \"%d\" for Nid_cell choice: 0...503 !\n",
|
||||
RC.config_file_name, i, ccparams_lte.Nid_cell);
|
||||
}
|
||||
|
||||
@@ -498,7 +499,7 @@ int RCconfig_RRC(uint32_t i, eNB_RRC_INST *rrc, int macrlc_has_f1) {
|
||||
(ccparams_lte.N_RB_DL!=75) &&
|
||||
(ccparams_lte.N_RB_DL!=100)) {
|
||||
AssertFatal (0,
|
||||
"Failed to parse eNB configuration file %s, enb %d unknown value \"%d\" for N_RB_DL choice: 6,15,25,50,75,100 !\n",
|
||||
"Failed to parse eNB configuration file %s, enb %u unknown value \"%d\" for N_RB_DL choice: 6,15,25,50,75,100 !\n",
|
||||
RC.config_file_name, i, ccparams_lte.N_RB_DL);
|
||||
}
|
||||
|
||||
@@ -508,7 +509,7 @@ int RCconfig_RRC(uint32_t i, eNB_RRC_INST *rrc, int macrlc_has_f1) {
|
||||
RRC_CONFIGURATION_REQ (msg_p).frame_type[j] = TDD;
|
||||
} else {
|
||||
AssertFatal (0,
|
||||
"Failed to parse eNB configuration file %s, enb %d unknown value \"%s\" for frame_type choice: FDD or TDD !\n",
|
||||
"Failed to parse eNB configuration file %s, enb %u unknown value \"%s\" for frame_type choice: FDD or TDD !\n",
|
||||
RC.config_file_name, i, ccparams_lte.frame_type);
|
||||
}
|
||||
|
||||
@@ -522,7 +523,7 @@ int RCconfig_RRC(uint32_t i, eNB_RRC_INST *rrc, int macrlc_has_f1) {
|
||||
|
||||
if ((ccparams_lte.nb_antenna_ports <1) || (ccparams_lte.nb_antenna_ports > 2))
|
||||
AssertFatal (0,
|
||||
"Failed to parse eNB configuration file %s, enb %d unknown value \"%d\" for nb_antenna_ports choice: 1..2 !\n",
|
||||
"Failed to parse eNB configuration file %s, enb %u unknown value \"%d\" for nb_antenna_ports choice: 1..2 !\n",
|
||||
RC.config_file_name, i, ccparams_lte.nb_antenna_ports);
|
||||
|
||||
RRC_CONFIGURATION_REQ (msg_p).nb_antenna_ports[j] = ccparams_lte.nb_antenna_ports;
|
||||
@@ -533,19 +534,19 @@ int RCconfig_RRC(uint32_t i, eNB_RRC_INST *rrc, int macrlc_has_f1) {
|
||||
|
||||
if ((ccparams_lte.prach_root <0) || (ccparams_lte.prach_root > 1023))
|
||||
AssertFatal (0,
|
||||
"Failed to parse eNB configuration file %s, enb %d unknown value \"%d\" for prach_root choice: 0..1023 !\n",
|
||||
"Failed to parse eNB configuration file %s, enb %u unknown value \"%d\" for prach_root choice: 0..1023 !\n",
|
||||
RC.config_file_name, i, ccparams_lte.prach_root);
|
||||
|
||||
RRC_CONFIGURATION_REQ (msg_p).radioresourceconfig[j].prach_config_index = ccparams_lte.prach_config_index;
|
||||
|
||||
if ((ccparams_lte.prach_config_index <0) || (ccparams_lte.prach_config_index > 63))
|
||||
AssertFatal (0,
|
||||
"Failed to parse eNB configuration file %s, enb %d unknown value \"%d\" for prach_config_index choice: 0..1023 !\n",
|
||||
"Failed to parse eNB configuration file %s, enb %u unknown value \"%d\" for prach_config_index choice: 0..1023 !\n",
|
||||
RC.config_file_name, i, ccparams_lte.prach_config_index);
|
||||
|
||||
if (!ccparams_lte.prach_high_speed)
|
||||
AssertFatal (0,
|
||||
"Failed to parse eNB configuration file %s, enb %d define %s: ENABLE,DISABLE!\n",
|
||||
"Failed to parse eNB configuration file %s, enb %u define %s: ENABLE,DISABLE!\n",
|
||||
RC.config_file_name, i, ENB_CONFIG_STRING_PRACH_HIGH_SPEED);
|
||||
else if (strcmp(ccparams_lte.prach_high_speed, "ENABLE") == 0) {
|
||||
RRC_CONFIGURATION_REQ (msg_p).radioresourceconfig[j].prach_high_speed = TRUE;
|
||||
@@ -553,7 +554,7 @@ int RCconfig_RRC(uint32_t i, eNB_RRC_INST *rrc, int macrlc_has_f1) {
|
||||
RRC_CONFIGURATION_REQ (msg_p).radioresourceconfig[j].prach_high_speed = FALSE;
|
||||
} else
|
||||
AssertFatal (0,
|
||||
"Failed to parse eNB configuration file %s, enb %d unknown value \"%s\" for prach_config choice: ENABLE,DISABLE !\n",
|
||||
"Failed to parse eNB configuration file %s, enb %u unknown value \"%s\" for prach_config choice: ENABLE,DISABLE !\n",
|
||||
RC.config_file_name, i, ccparams_lte.prach_high_speed);
|
||||
|
||||
RRC_CONFIGURATION_REQ (msg_p).radioresourceconfig[j].prach_zero_correlation = ccparams_lte.prach_zero_correlation;
|
||||
@@ -561,7 +562,7 @@ int RCconfig_RRC(uint32_t i, eNB_RRC_INST *rrc, int macrlc_has_f1) {
|
||||
if ((ccparams_lte.prach_zero_correlation <0) ||
|
||||
(ccparams_lte.prach_zero_correlation > 15))
|
||||
AssertFatal (0,
|
||||
"Failed to parse eNB configuration file %s, enb %d unknown value \"%d\" for prach_zero_correlation choice: 0..15!\n",
|
||||
"Failed to parse eNB configuration file %s, enb %u unknown value \"%d\" for prach_zero_correlation choice: 0..15!\n",
|
||||
RC.config_file_name, i, ccparams_lte.prach_zero_correlation);
|
||||
|
||||
RRC_CONFIGURATION_REQ (msg_p).radioresourceconfig[j].prach_freq_offset = ccparams_lte.prach_freq_offset;
|
||||
@@ -569,7 +570,7 @@ int RCconfig_RRC(uint32_t i, eNB_RRC_INST *rrc, int macrlc_has_f1) {
|
||||
if ((ccparams_lte.prach_freq_offset <0) ||
|
||||
(ccparams_lte.prach_freq_offset > 94))
|
||||
AssertFatal (0,
|
||||
"Failed to parse eNB configuration file %s, enb %d unknown value \"%d\" for prach_freq_offset choice: 0..94!\n",
|
||||
"Failed to parse eNB configuration file %s, enb %u unknown value \"%d\" for prach_freq_offset choice: 0..94!\n",
|
||||
RC.config_file_name, i, ccparams_lte.prach_freq_offset);
|
||||
|
||||
RRC_CONFIGURATION_REQ (msg_p).radioresourceconfig[j].pucch_delta_shift = ccparams_lte.pucch_delta_shift-1;
|
||||
@@ -577,7 +578,7 @@ int RCconfig_RRC(uint32_t i, eNB_RRC_INST *rrc, int macrlc_has_f1) {
|
||||
if ((ccparams_lte.pucch_delta_shift <1) ||
|
||||
(ccparams_lte.pucch_delta_shift > 3))
|
||||
AssertFatal (0,
|
||||
"Failed to parse eNB configuration file %s, enb %d unknown value \"%d\" for pucch_delta_shift choice: 1..3!\n",
|
||||
"Failed to parse eNB configuration file %s, enb %u unknown value \"%d\" for pucch_delta_shift choice: 1..3!\n",
|
||||
RC.config_file_name, i, ccparams_lte.pucch_delta_shift);
|
||||
|
||||
RRC_CONFIGURATION_REQ (msg_p).radioresourceconfig[j].pucch_nRB_CQI = ccparams_lte.pucch_nRB_CQI;
|
||||
@@ -585,7 +586,7 @@ int RCconfig_RRC(uint32_t i, eNB_RRC_INST *rrc, int macrlc_has_f1) {
|
||||
if ((ccparams_lte.pucch_nRB_CQI <0) ||
|
||||
(ccparams_lte.pucch_nRB_CQI > 98))
|
||||
AssertFatal (0,
|
||||
"Failed to parse eNB configuration file %s, enb %d unknown value \"%d\" for pucch_nRB_CQI choice: 0..98!\n",
|
||||
"Failed to parse eNB configuration file %s, enb %u unknown value \"%d\" for pucch_nRB_CQI choice: 0..98!\n",
|
||||
RC.config_file_name, i, ccparams_lte.pucch_nRB_CQI);
|
||||
|
||||
RRC_CONFIGURATION_REQ (msg_p).radioresourceconfig[j].pucch_nCS_AN = ccparams_lte.pucch_nCS_AN;
|
||||
@@ -593,7 +594,7 @@ int RCconfig_RRC(uint32_t i, eNB_RRC_INST *rrc, int macrlc_has_f1) {
|
||||
if ((ccparams_lte.pucch_nCS_AN <0) ||
|
||||
(ccparams_lte.pucch_nCS_AN > 7))
|
||||
AssertFatal (0,
|
||||
"Failed to parse eNB configuration file %s, enb %d unknown value \"%d\" for pucch_nCS_AN choice: 0..7!\n",
|
||||
"Failed to parse eNB configuration file %s, enb %u unknown value \"%d\" for pucch_nCS_AN choice: 0..7!\n",
|
||||
RC.config_file_name, i, ccparams_lte.pucch_nCS_AN);
|
||||
|
||||
RRC_CONFIGURATION_REQ (msg_p).radioresourceconfig[j].pucch_n1_AN = ccparams_lte.pucch_n1_AN;
|
||||
@@ -601,7 +602,7 @@ int RCconfig_RRC(uint32_t i, eNB_RRC_INST *rrc, int macrlc_has_f1) {
|
||||
if ((ccparams_lte.pucch_n1_AN <0) ||
|
||||
(ccparams_lte.pucch_n1_AN > 2047))
|
||||
AssertFatal (0,
|
||||
"Failed to parse eNB configuration file %s, enb %d unknown value \"%d\" for pucch_n1_AN choice: 0..2047!\n",
|
||||
"Failed to parse eNB configuration file %s, enb %u unknown value \"%d\" for pucch_n1_AN choice: 0..2047!\n",
|
||||
RC.config_file_name, i, ccparams_lte.pucch_n1_AN);
|
||||
|
||||
RRC_CONFIGURATION_REQ (msg_p).radioresourceconfig[j].pdsch_referenceSignalPower = ccparams_lte.pdsch_referenceSignalPower;
|
||||
@@ -609,7 +610,7 @@ int RCconfig_RRC(uint32_t i, eNB_RRC_INST *rrc, int macrlc_has_f1) {
|
||||
if ((ccparams_lte.pdsch_referenceSignalPower <-60) ||
|
||||
(ccparams_lte.pdsch_referenceSignalPower > 50))
|
||||
AssertFatal (0,
|
||||
"Failed to parse eNB configuration file %s, enb %d unknown value \"%d\" for pdsch_referenceSignalPower choice:-60..50!\n",
|
||||
"Failed to parse eNB configuration file %s, enb %u unknown value \"%d\" for pdsch_referenceSignalPower choice:-60..50!\n",
|
||||
RC.config_file_name, i, ccparams_lte.pdsch_referenceSignalPower);
|
||||
|
||||
RRC_CONFIGURATION_REQ (msg_p).radioresourceconfig[j].pdsch_p_b = ccparams_lte.pdsch_p_b;
|
||||
@@ -617,7 +618,7 @@ int RCconfig_RRC(uint32_t i, eNB_RRC_INST *rrc, int macrlc_has_f1) {
|
||||
if ((ccparams_lte.pdsch_p_b <0) ||
|
||||
(ccparams_lte.pdsch_p_b > 3))
|
||||
AssertFatal (0,
|
||||
"Failed to parse eNB configuration file %s, enb %d unknown value \"%d\" for pdsch_p_b choice: 0..3!\n",
|
||||
"Failed to parse eNB configuration file %s, enb %u unknown value \"%d\" for pdsch_p_b choice: 0..3!\n",
|
||||
RC.config_file_name, i, ccparams_lte.pdsch_p_b);
|
||||
|
||||
RRC_CONFIGURATION_REQ (msg_p).radioresourceconfig[j].pusch_n_SB = ccparams_lte.pusch_n_SB;
|
||||
@@ -625,12 +626,12 @@ int RCconfig_RRC(uint32_t i, eNB_RRC_INST *rrc, int macrlc_has_f1) {
|
||||
if ((ccparams_lte.pusch_n_SB <1) ||
|
||||
(ccparams_lte.pusch_n_SB > 4))
|
||||
AssertFatal (0,
|
||||
"Failed to parse eNB configuration file %s, enb %d unknown value \"%d\" for pusch_n_SB choice: 1..4!\n",
|
||||
"Failed to parse eNB configuration file %s, enb %u unknown value \"%d\" for pusch_n_SB choice: 1..4!\n",
|
||||
RC.config_file_name, i, ccparams_lte.pusch_n_SB);
|
||||
|
||||
if (!ccparams_lte.pusch_hoppingMode)
|
||||
AssertFatal (0,
|
||||
"Failed to parse eNB configuration file %s, enb %d define %s: interSubframe,intraAndInterSubframe!\n",
|
||||
"Failed to parse eNB configuration file %s, enb %u define %s: interSubframe,intraAndInterSubframe!\n",
|
||||
RC.config_file_name, i, ENB_CONFIG_STRING_PUSCH_HOPPINGMODE);
|
||||
else if (strcmp(ccparams_lte.pusch_hoppingMode,"interSubFrame")==0) {
|
||||
RRC_CONFIGURATION_REQ (msg_p).radioresourceconfig[j].pusch_hoppingMode = LTE_PUSCH_ConfigCommon__pusch_ConfigBasic__hoppingMode_interSubFrame;
|
||||
@@ -638,7 +639,7 @@ int RCconfig_RRC(uint32_t i, eNB_RRC_INST *rrc, int macrlc_has_f1) {
|
||||
RRC_CONFIGURATION_REQ (msg_p).radioresourceconfig[j].pusch_hoppingMode = LTE_PUSCH_ConfigCommon__pusch_ConfigBasic__hoppingMode_intraAndInterSubFrame;
|
||||
} else
|
||||
AssertFatal (0,
|
||||
"Failed to parse eNB configuration file %s, enb %d unknown value \"%s\" for pusch_hoppingMode choice: interSubframe,intraAndInterSubframe!\n",
|
||||
"Failed to parse eNB configuration file %s, enb %u unknown value \"%s\" for pusch_hoppingMode choice: interSubframe,intraAndInterSubframe!\n",
|
||||
RC.config_file_name, i, ccparams_lte.pusch_hoppingMode);
|
||||
|
||||
RRC_CONFIGURATION_REQ (msg_p).radioresourceconfig[j].pusch_hoppingOffset = ccparams_lte.pusch_hoppingOffset;
|
||||
@@ -646,12 +647,12 @@ int RCconfig_RRC(uint32_t i, eNB_RRC_INST *rrc, int macrlc_has_f1) {
|
||||
if ((ccparams_lte.pusch_hoppingOffset<0) ||
|
||||
(ccparams_lte.pusch_hoppingOffset>98))
|
||||
AssertFatal (0,
|
||||
"Failed to parse eNB configuration file %s, enb %d unknown value \"%s\" for pusch_hoppingOffset choice: 0..98!\n",
|
||||
"Failed to parse eNB configuration file %s, enb %u unknown value \"%s\" for pusch_hoppingOffset choice: 0..98!\n",
|
||||
RC.config_file_name, i, ccparams_lte.pusch_hoppingMode);
|
||||
|
||||
if (!ccparams_lte.pusch_enable64QAM)
|
||||
AssertFatal (0,
|
||||
"Failed to parse eNB configuration file %s, enb %d define %s: ENABLE,DISABLE!\n",
|
||||
"Failed to parse eNB configuration file %s, enb %u define %s: ENABLE,DISABLE!\n",
|
||||
RC.config_file_name, i, ENB_CONFIG_STRING_PUSCH_ENABLE64QAM);
|
||||
else if (strcmp(ccparams_lte.pusch_enable64QAM, "ENABLE") == 0) {
|
||||
RRC_CONFIGURATION_REQ (msg_p).radioresourceconfig[j].pusch_enable64QAM = TRUE;
|
||||
@@ -659,12 +660,12 @@ int RCconfig_RRC(uint32_t i, eNB_RRC_INST *rrc, int macrlc_has_f1) {
|
||||
RRC_CONFIGURATION_REQ (msg_p).radioresourceconfig[j].pusch_enable64QAM = FALSE;
|
||||
} else
|
||||
AssertFatal (0,
|
||||
"Failed to parse eNB configuration file %s, enb %d unknown value \"%s\" for pusch_enable64QAM choice: ENABLE,DISABLE!\n",
|
||||
"Failed to parse eNB configuration file %s, enb %u unknown value \"%s\" for pusch_enable64QAM choice: ENABLE,DISABLE!\n",
|
||||
RC.config_file_name, i, ccparams_lte.pusch_enable64QAM);
|
||||
|
||||
if (!ccparams_lte.pusch_groupHoppingEnabled)
|
||||
AssertFatal (0,
|
||||
"Failed to parse eNB configuration file %s, enb %d define %s: ENABLE,DISABLE!\n",
|
||||
"Failed to parse eNB configuration file %s, enb %u define %s: ENABLE,DISABLE!\n",
|
||||
RC.config_file_name, i, ENB_CONFIG_STRING_PUSCH_GROUP_HOPPING_EN);
|
||||
else if (strcmp(ccparams_lte.pusch_groupHoppingEnabled, "ENABLE") == 0) {
|
||||
RRC_CONFIGURATION_REQ (msg_p).radioresourceconfig[j].pusch_groupHoppingEnabled = TRUE;
|
||||
@@ -672,7 +673,7 @@ int RCconfig_RRC(uint32_t i, eNB_RRC_INST *rrc, int macrlc_has_f1) {
|
||||
RRC_CONFIGURATION_REQ (msg_p).radioresourceconfig[j].pusch_groupHoppingEnabled= FALSE;
|
||||
} else
|
||||
AssertFatal (0,
|
||||
"Failed to parse eNB configuration file %s, enb %d unknown value \"%s\" for pusch_groupHoppingEnabled choice: ENABLE,DISABLE!\n",
|
||||
"Failed to parse eNB configuration file %s, enb %u unknown value \"%s\" for pusch_groupHoppingEnabled choice: ENABLE,DISABLE!\n",
|
||||
RC.config_file_name, i, ccparams_lte.pusch_groupHoppingEnabled);
|
||||
|
||||
RRC_CONFIGURATION_REQ (msg_p).radioresourceconfig[j].pusch_groupAssignment = ccparams_lte.pusch_groupAssignment;
|
||||
@@ -680,12 +681,12 @@ int RCconfig_RRC(uint32_t i, eNB_RRC_INST *rrc, int macrlc_has_f1) {
|
||||
if ((ccparams_lte.pusch_groupAssignment<0)||
|
||||
(ccparams_lte.pusch_groupAssignment>29))
|
||||
AssertFatal (0,
|
||||
"Failed to parse eNB configuration file %s, enb %d unknown value \"%d\" for pusch_groupAssignment choice: 0..29!\n",
|
||||
"Failed to parse eNB configuration file %s, enb %u unknown value \"%d\" for pusch_groupAssignment choice: 0..29!\n",
|
||||
RC.config_file_name, i, ccparams_lte.pusch_groupAssignment);
|
||||
|
||||
if (!ccparams_lte.pusch_sequenceHoppingEnabled)
|
||||
AssertFatal (0,
|
||||
"Failed to parse eNB configuration file %s, enb %d define %s: ENABLE,DISABLE!\n",
|
||||
"Failed to parse eNB configuration file %s, enb %u define %s: ENABLE,DISABLE!\n",
|
||||
RC.config_file_name, i, ENB_CONFIG_STRING_PUSCH_SEQUENCE_HOPPING_EN);
|
||||
else if (strcmp(ccparams_lte.pusch_sequenceHoppingEnabled, "ENABLE") == 0) {
|
||||
RRC_CONFIGURATION_REQ (msg_p).radioresourceconfig[j].pusch_sequenceHoppingEnabled = TRUE;
|
||||
@@ -693,7 +694,7 @@ int RCconfig_RRC(uint32_t i, eNB_RRC_INST *rrc, int macrlc_has_f1) {
|
||||
RRC_CONFIGURATION_REQ (msg_p).radioresourceconfig[j].pusch_sequenceHoppingEnabled = FALSE;
|
||||
} else
|
||||
AssertFatal (0,
|
||||
"Failed to parse eNB configuration file %s, enb %d unknown value \"%s\" for pusch_sequenceHoppingEnabled choice: ENABLE,DISABLE!\n",
|
||||
"Failed to parse eNB configuration file %s, enb %u unknown value \"%s\" for pusch_sequenceHoppingEnabled choice: ENABLE,DISABLE!\n",
|
||||
RC.config_file_name, i, ccparams_lte.pusch_sequenceHoppingEnabled);
|
||||
|
||||
RRC_CONFIGURATION_REQ (msg_p).radioresourceconfig[j].pusch_nDMRS1= ccparams_lte.pusch_nDMRS1; //cyclic_shift in RRC!
|
||||
@@ -701,7 +702,7 @@ int RCconfig_RRC(uint32_t i, eNB_RRC_INST *rrc, int macrlc_has_f1) {
|
||||
if ((ccparams_lte.pusch_nDMRS1 <0) ||
|
||||
(ccparams_lte.pusch_nDMRS1>7))
|
||||
AssertFatal (0,
|
||||
"Failed to parse eNB configuration file %s, enb %d unknown value \"%d\" for pusch_nDMRS1 choice: 0..7!\n",
|
||||
"Failed to parse eNB configuration file %s, enb %u unknown value \"%d\" for pusch_nDMRS1 choice: 0..7!\n",
|
||||
RC.config_file_name, i, ccparams_lte.pusch_nDMRS1);
|
||||
|
||||
if (strcmp(ccparams_lte.phich_duration,"NORMAL")==0) {
|
||||
@@ -710,7 +711,7 @@ int RCconfig_RRC(uint32_t i, eNB_RRC_INST *rrc, int macrlc_has_f1) {
|
||||
RRC_CONFIGURATION_REQ (msg_p).radioresourceconfig[j].phich_duration= LTE_PHICH_Config__phich_Duration_extended;
|
||||
} else
|
||||
AssertFatal (0,
|
||||
"Failed to parse eNB configuration file %s, enb %d unknown value \"%s\" for phich_duration choice: NORMAL,EXTENDED!\n",
|
||||
"Failed to parse eNB configuration file %s, enb %u unknown value \"%s\" for phich_duration choice: NORMAL,EXTENDED!\n",
|
||||
RC.config_file_name, i, ccparams_lte.phich_duration);
|
||||
|
||||
if (strcmp(ccparams_lte.phich_resource,"ONESIXTH")==0) {
|
||||
@@ -723,7 +724,7 @@ int RCconfig_RRC(uint32_t i, eNB_RRC_INST *rrc, int macrlc_has_f1) {
|
||||
RRC_CONFIGURATION_REQ (msg_p).radioresourceconfig[j].phich_resource= LTE_PHICH_Config__phich_Resource_two;
|
||||
} else
|
||||
AssertFatal (0,
|
||||
"Failed to parse eNB configuration file %s, enb %d unknown value \"%s\" for phich_resource choice: ONESIXTH,HALF,ONE,TWO!\n",
|
||||
"Failed to parse eNB configuration file %s, enb %u unknown value \"%s\" for phich_resource choice: ONESIXTH,HALF,ONE,TWO!\n",
|
||||
RC.config_file_name, i, ccparams_lte.phich_resource);
|
||||
|
||||
printf("phich.resource %ld (%s), phich.duration %ld (%s)\n",
|
||||
@@ -736,7 +737,7 @@ int RCconfig_RRC(uint32_t i, eNB_RRC_INST *rrc, int macrlc_has_f1) {
|
||||
RRC_CONFIGURATION_REQ (msg_p).radioresourceconfig[j].srs_enable= FALSE;
|
||||
} else
|
||||
AssertFatal (0,
|
||||
"Failed to parse eNB configuration file %s, enb %d unknown value \"%s\" for srs_BandwidthConfig choice: ENABLE,DISABLE !\n",
|
||||
"Failed to parse eNB configuration file %s, enb %u unknown value \"%s\" for srs_BandwidthConfig choice: ENABLE,DISABLE !\n",
|
||||
RC.config_file_name, i, ccparams_lte.srs_enable);
|
||||
|
||||
if (RRC_CONFIGURATION_REQ (msg_p).radioresourceconfig[j].srs_enable== TRUE) {
|
||||
@@ -744,7 +745,7 @@ int RCconfig_RRC(uint32_t i, eNB_RRC_INST *rrc, int macrlc_has_f1) {
|
||||
|
||||
if ((ccparams_lte.srs_BandwidthConfig < 0) ||
|
||||
(ccparams_lte.srs_BandwidthConfig >7))
|
||||
AssertFatal (0, "Failed to parse eNB configuration file %s, enb %d unknown value %d for srs_BandwidthConfig choice: 0...7\n",
|
||||
AssertFatal (0, "Failed to parse eNB configuration file %s, enb %u unknown value %d for srs_BandwidthConfig choice: 0...7\n",
|
||||
RC.config_file_name, i, ccparams_lte.srs_BandwidthConfig);
|
||||
|
||||
RRC_CONFIGURATION_REQ (msg_p).radioresourceconfig[j].srs_SubframeConfig= ccparams_lte.srs_SubframeConfig;
|
||||
@@ -752,7 +753,7 @@ int RCconfig_RRC(uint32_t i, eNB_RRC_INST *rrc, int macrlc_has_f1) {
|
||||
if ((ccparams_lte.srs_SubframeConfig<0) ||
|
||||
(ccparams_lte.srs_SubframeConfig>15))
|
||||
AssertFatal (0,
|
||||
"Failed to parse eNB configuration file %s, enb %d unknown value \"%d\" for srs_SubframeConfig choice: 0..15 !\n",
|
||||
"Failed to parse eNB configuration file %s, enb %u unknown value \"%d\" for srs_SubframeConfig choice: 0..15 !\n",
|
||||
RC.config_file_name, i, ccparams_lte.srs_SubframeConfig);
|
||||
|
||||
if (strcmp(ccparams_lte.srs_ackNackST, "ENABLE") == 0) {
|
||||
@@ -761,7 +762,7 @@ int RCconfig_RRC(uint32_t i, eNB_RRC_INST *rrc, int macrlc_has_f1) {
|
||||
RRC_CONFIGURATION_REQ (msg_p).radioresourceconfig[j].srs_ackNackST= FALSE;
|
||||
} else
|
||||
AssertFatal (0,
|
||||
"Failed to parse eNB configuration file %s, enb %d unknown value \"%s\" for srs_BandwidthConfig choice: ENABLE,DISABLE !\n",
|
||||
"Failed to parse eNB configuration file %s, enb %u unknown value \"%s\" for srs_BandwidthConfig choice: ENABLE,DISABLE !\n",
|
||||
RC.config_file_name, i, ccparams_lte.srs_ackNackST);
|
||||
|
||||
if (strcmp(ccparams_lte.srs_MaxUpPts, "ENABLE") == 0) {
|
||||
@@ -770,7 +771,7 @@ int RCconfig_RRC(uint32_t i, eNB_RRC_INST *rrc, int macrlc_has_f1) {
|
||||
RRC_CONFIGURATION_REQ (msg_p).radioresourceconfig[j].srs_MaxUpPts= FALSE;
|
||||
} else
|
||||
AssertFatal (0,
|
||||
"Failed to parse eNB configuration file %s, enb %d unknown value \"%s\" for srs_MaxUpPts choice: ENABLE,DISABLE !\n",
|
||||
"Failed to parse eNB configuration file %s, enb %u unknown value \"%s\" for srs_MaxUpPts choice: ENABLE,DISABLE !\n",
|
||||
RC.config_file_name, i, ccparams_lte.srs_MaxUpPts);
|
||||
}
|
||||
|
||||
@@ -779,7 +780,7 @@ int RCconfig_RRC(uint32_t i, eNB_RRC_INST *rrc, int macrlc_has_f1) {
|
||||
if ((ccparams_lte.pusch_p0_Nominal<-126) ||
|
||||
(ccparams_lte.pusch_p0_Nominal>24))
|
||||
AssertFatal (0,
|
||||
"Failed to parse eNB configuration file %s, enb %d unknown value \"%d\" for pusch_p0_Nominal choice: -126..24 !\n",
|
||||
"Failed to parse eNB configuration file %s, enb %u unknown value \"%d\" for pusch_p0_Nominal choice: -126..24 !\n",
|
||||
RC.config_file_name, i, ccparams_lte.pusch_p0_Nominal);
|
||||
|
||||
if (strcmp(ccparams_lte.pusch_alpha,"AL0")==0) {
|
||||
@@ -800,7 +801,7 @@ int RCconfig_RRC(uint32_t i, eNB_RRC_INST *rrc, int macrlc_has_f1) {
|
||||
RRC_CONFIGURATION_REQ (msg_p).radioresourceconfig[j].pusch_alpha= LTE_Alpha_r12_al1;
|
||||
} else
|
||||
AssertFatal (0,
|
||||
"Failed to parse eNB configuration file %s, enb %d unknown value \"%s\" for pucch_Alpha choice: AL0,AL04,AL05,AL06,AL07,AL08,AL09,AL1!\n",
|
||||
"Failed to parse eNB configuration file %s, enb %u unknown value \"%s\" for pucch_Alpha choice: AL0,AL04,AL05,AL06,AL07,AL08,AL09,AL1!\n",
|
||||
RC.config_file_name, i, ccparams_lte.pusch_alpha);
|
||||
|
||||
RRC_CONFIGURATION_REQ (msg_p).radioresourceconfig[j].pucch_p0_Nominal= ccparams_lte.pucch_p0_Nominal;
|
||||
@@ -808,7 +809,7 @@ int RCconfig_RRC(uint32_t i, eNB_RRC_INST *rrc, int macrlc_has_f1) {
|
||||
if ((ccparams_lte.pucch_p0_Nominal<-127) ||
|
||||
(ccparams_lte.pucch_p0_Nominal>-96))
|
||||
AssertFatal (0,
|
||||
"Failed to parse eNB configuration file %s, enb %d unknown value \"%d\" for pucch_p0_Nominal choice: -127..-96 !\n",
|
||||
"Failed to parse eNB configuration file %s, enb %u unknown value \"%d\" for pucch_p0_Nominal choice: -127..-96 !\n",
|
||||
RC.config_file_name, i, ccparams_lte.pucch_p0_Nominal);
|
||||
|
||||
RRC_CONFIGURATION_REQ (msg_p).radioresourceconfig[j].msg3_delta_Preamble= ccparams_lte.msg3_delta_Preamble;
|
||||
@@ -816,7 +817,7 @@ int RCconfig_RRC(uint32_t i, eNB_RRC_INST *rrc, int macrlc_has_f1) {
|
||||
if ((ccparams_lte.msg3_delta_Preamble<-1) ||
|
||||
(ccparams_lte.msg3_delta_Preamble>6))
|
||||
AssertFatal (0,
|
||||
"Failed to parse eNB configuration file %s, enb %d unknown value \"%d\" for msg3_delta_Preamble choice: -1..6 !\n",
|
||||
"Failed to parse eNB configuration file %s, enb %u unknown value \"%d\" for msg3_delta_Preamble choice: -1..6 !\n",
|
||||
RC.config_file_name, i, ccparams_lte.msg3_delta_Preamble);
|
||||
|
||||
if (strcmp(ccparams_lte.pucch_deltaF_Format1,"deltaF_2")==0) {
|
||||
@@ -827,7 +828,7 @@ int RCconfig_RRC(uint32_t i, eNB_RRC_INST *rrc, int macrlc_has_f1) {
|
||||
RRC_CONFIGURATION_REQ (msg_p).radioresourceconfig[j].pucch_deltaF_Format1= LTE_DeltaFList_PUCCH__deltaF_PUCCH_Format1_deltaF2;
|
||||
} else
|
||||
AssertFatal (0,
|
||||
"Failed to parse eNB configuration file %s, enb %d unknown value \"%s\" for pucch_deltaF_Format1 choice: deltaF_2,dltaF0,deltaF2!\n",
|
||||
"Failed to parse eNB configuration file %s, enb %u unknown value \"%s\" for pucch_deltaF_Format1 choice: deltaF_2,dltaF0,deltaF2!\n",
|
||||
RC.config_file_name, i, ccparams_lte.pucch_deltaF_Format1);
|
||||
|
||||
if (strcmp(ccparams_lte.pucch_deltaF_Format1b,"deltaF1")==0) {
|
||||
@@ -838,7 +839,7 @@ int RCconfig_RRC(uint32_t i, eNB_RRC_INST *rrc, int macrlc_has_f1) {
|
||||
RRC_CONFIGURATION_REQ (msg_p).radioresourceconfig[j].pucch_deltaF_Format1b= LTE_DeltaFList_PUCCH__deltaF_PUCCH_Format1b_deltaF5;
|
||||
} else
|
||||
AssertFatal (0,
|
||||
"Failed to parse eNB configuration file %s, enb %d unknown value \"%s\" for pucch_deltaF_Format1b choice: deltaF1,dltaF3,deltaF5!\n",
|
||||
"Failed to parse eNB configuration file %s, enb %u unknown value \"%s\" for pucch_deltaF_Format1b choice: deltaF1,dltaF3,deltaF5!\n",
|
||||
RC.config_file_name, i, ccparams_lte.pucch_deltaF_Format1b);
|
||||
|
||||
if (strcmp(ccparams_lte.pucch_deltaF_Format2,"deltaF_2")==0) {
|
||||
@@ -851,7 +852,7 @@ int RCconfig_RRC(uint32_t i, eNB_RRC_INST *rrc, int macrlc_has_f1) {
|
||||
RRC_CONFIGURATION_REQ (msg_p).radioresourceconfig[j].pucch_deltaF_Format2= LTE_DeltaFList_PUCCH__deltaF_PUCCH_Format2_deltaF2;
|
||||
} else
|
||||
AssertFatal (0,
|
||||
"Failed to parse eNB configuration file %s, enb %d unknown value \"%s\" for pucch_deltaF_Format2 choice: deltaF_2,dltaF0,deltaF1,deltaF2!\n",
|
||||
"Failed to parse eNB configuration file %s, enb %u unknown value \"%s\" for pucch_deltaF_Format2 choice: deltaF_2,dltaF0,deltaF1,deltaF2!\n",
|
||||
RC.config_file_name, i, ccparams_lte.pucch_deltaF_Format2);
|
||||
|
||||
if (strcmp(ccparams_lte.pucch_deltaF_Format2a,"deltaF_2")==0) {
|
||||
@@ -862,7 +863,7 @@ int RCconfig_RRC(uint32_t i, eNB_RRC_INST *rrc, int macrlc_has_f1) {
|
||||
RRC_CONFIGURATION_REQ (msg_p).radioresourceconfig[j].pucch_deltaF_Format2a= LTE_DeltaFList_PUCCH__deltaF_PUCCH_Format2a_deltaF2;
|
||||
} else
|
||||
AssertFatal (0,
|
||||
"Failed to parse eNB configuration file %s, enb %d unknown value \"%s\" for pucch_deltaF_Format2a choice: deltaF_2,dltaF0,deltaF2!\n",
|
||||
"Failed to parse eNB configuration file %s, enb %u unknown value \"%s\" for pucch_deltaF_Format2a choice: deltaF_2,dltaF0,deltaF2!\n",
|
||||
RC.config_file_name, i, ccparams_lte.pucch_deltaF_Format2a);
|
||||
|
||||
if (strcmp(ccparams_lte.pucch_deltaF_Format2b,"deltaF_2")==0) {
|
||||
@@ -873,7 +874,7 @@ int RCconfig_RRC(uint32_t i, eNB_RRC_INST *rrc, int macrlc_has_f1) {
|
||||
RRC_CONFIGURATION_REQ (msg_p).radioresourceconfig[j].pucch_deltaF_Format2b= LTE_DeltaFList_PUCCH__deltaF_PUCCH_Format2b_deltaF2;
|
||||
} else
|
||||
AssertFatal (0,
|
||||
"Failed to parse eNB configuration file %s, enb %d unknown value \"%s\" for pucch_deltaF_Format2b choice: deltaF_2,dltaF0,deltaF2!\n",
|
||||
"Failed to parse eNB configuration file %s, enb %u unknown value \"%s\" for pucch_deltaF_Format2b choice: deltaF_2,dltaF0,deltaF2!\n",
|
||||
RC.config_file_name, i, ccparams_lte.pucch_deltaF_Format2b);
|
||||
|
||||
RRC_CONFIGURATION_REQ (msg_p).radioresourceconfig[j].rach_numberOfRA_Preambles= (ccparams_lte.rach_numberOfRA_Preambles/4)-1;
|
||||
@@ -882,7 +883,7 @@ int RCconfig_RRC(uint32_t i, eNB_RRC_INST *rrc, int macrlc_has_f1) {
|
||||
(ccparams_lte.rach_numberOfRA_Preambles>64) ||
|
||||
((ccparams_lte.rach_numberOfRA_Preambles&3)!=0))
|
||||
AssertFatal (0,
|
||||
"Failed to parse eNB configuration file %s, enb %d unknown value \"%d\" for rach_numberOfRA_Preambles choice: 4,8,12,...,64!\n",
|
||||
"Failed to parse eNB configuration file %s, enb %u unknown value \"%d\" for rach_numberOfRA_Preambles choice: 4,8,12,...,64!\n",
|
||||
RC.config_file_name, i, ccparams_lte.rach_numberOfRA_Preambles);
|
||||
|
||||
if (strcmp(ccparams_lte.rach_preamblesGroupAConfig, "ENABLE") == 0) {
|
||||
@@ -893,7 +894,7 @@ int RCconfig_RRC(uint32_t i, eNB_RRC_INST *rrc, int macrlc_has_f1) {
|
||||
(ccparams_lte.rach_numberOfRA_Preambles>60) ||
|
||||
((ccparams_lte.rach_numberOfRA_Preambles&3)!=0))
|
||||
AssertFatal (0,
|
||||
"Failed to parse eNB configuration file %s, enb %d unknown value \"%d\" for rach_sizeOfRA_PreamblesGroupA choice: 4,8,12,...,60!\n",
|
||||
"Failed to parse eNB configuration file %s, enb %u unknown value \"%d\" for rach_sizeOfRA_PreamblesGroupA choice: 4,8,12,...,60!\n",
|
||||
RC.config_file_name, i, ccparams_lte.rach_sizeOfRA_PreamblesGroupA);
|
||||
|
||||
switch (ccparams_lte.rach_messageSizeGroupA) {
|
||||
@@ -915,7 +916,7 @@ int RCconfig_RRC(uint32_t i, eNB_RRC_INST *rrc, int macrlc_has_f1) {
|
||||
|
||||
default:
|
||||
AssertFatal (0,
|
||||
"Failed to parse eNB configuration file %s, enb %d unknown value \"%d\" for rach_messageSizeGroupA choice: 56,144,208,256!\n",
|
||||
"Failed to parse eNB configuration file %s, enb %u unknown value \"%d\" for rach_messageSizeGroupA choice: 56,144,208,256!\n",
|
||||
RC.config_file_name, i, ccparams_lte.rach_messageSizeGroupA);
|
||||
break;
|
||||
}
|
||||
@@ -938,13 +939,13 @@ int RCconfig_RRC(uint32_t i, eNB_RRC_INST *rrc, int macrlc_has_f1) {
|
||||
RRC_CONFIGURATION_REQ (msg_p).radioresourceconfig[j].rach_messagePowerOffsetGroupB= LTE_RACH_ConfigCommon__preambleInfo__preamblesGroupAConfig__messagePowerOffsetGroupB_dB18;
|
||||
} else
|
||||
AssertFatal (0,
|
||||
"Failed to parse eNB configuration file %s, enb %d unknown value \"%s\" for rach_messagePowerOffsetGroupB choice: minusinfinity,dB0,dB5,dB8,dB10,dB12,dB15,dB18!\n",
|
||||
"Failed to parse eNB configuration file %s, enb %u unknown value \"%s\" for rach_messagePowerOffsetGroupB choice: minusinfinity,dB0,dB5,dB8,dB10,dB12,dB15,dB18!\n",
|
||||
RC.config_file_name, i, ccparams_lte.rach_messagePowerOffsetGroupB);
|
||||
} else if (strcmp(ccparams_lte.rach_preamblesGroupAConfig, "DISABLE") == 0) {
|
||||
RRC_CONFIGURATION_REQ (msg_p).radioresourceconfig[j].rach_preamblesGroupAConfig= FALSE;
|
||||
} else
|
||||
AssertFatal (0,
|
||||
"Failed to parse eNB configuration file %s, enb %d unknown value \"%s\" for rach_preamblesGroupAConfig choice: ENABLE,DISABLE !\n",
|
||||
"Failed to parse eNB configuration file %s, enb %u unknown value \"%s\" for rach_preamblesGroupAConfig choice: ENABLE,DISABLE !\n",
|
||||
RC.config_file_name, i, ccparams_lte.rach_preamblesGroupAConfig);
|
||||
|
||||
RRC_CONFIGURATION_REQ (msg_p).radioresourceconfig[j].rach_preambleInitialReceivedTargetPower= (ccparams_lte.rach_preambleInitialReceivedTargetPower+120)/2;
|
||||
@@ -953,7 +954,7 @@ int RCconfig_RRC(uint32_t i, eNB_RRC_INST *rrc, int macrlc_has_f1) {
|
||||
(ccparams_lte.rach_preambleInitialReceivedTargetPower>-90) ||
|
||||
((ccparams_lte.rach_preambleInitialReceivedTargetPower&1)!=0))
|
||||
AssertFatal (0,
|
||||
"Failed to parse eNB configuration file %s, enb %d unknown value \"%d\" for rach_preambleInitialReceivedTargetPower choice: -120,-118,...,-90 !\n",
|
||||
"Failed to parse eNB configuration file %s, enb %u unknown value \"%d\" for rach_preambleInitialReceivedTargetPower choice: -120,-118,...,-90 !\n",
|
||||
RC.config_file_name, i, ccparams_lte.rach_preambleInitialReceivedTargetPower);
|
||||
|
||||
RRC_CONFIGURATION_REQ (msg_p).radioresourceconfig[j].rach_powerRampingStep= ccparams_lte.rach_powerRampingStep/2;
|
||||
@@ -962,7 +963,7 @@ int RCconfig_RRC(uint32_t i, eNB_RRC_INST *rrc, int macrlc_has_f1) {
|
||||
(ccparams_lte.rach_powerRampingStep>6) ||
|
||||
((ccparams_lte.rach_powerRampingStep&1)!=0))
|
||||
AssertFatal (0,
|
||||
"Failed to parse eNB configuration file %s, enb %d unknown value \"%d\" for rach_powerRampingStep choice: 0,2,4,6 !\n",
|
||||
"Failed to parse eNB configuration file %s, enb %u unknown value \"%d\" for rach_powerRampingStep choice: 0,2,4,6 !\n",
|
||||
RC.config_file_name, i, ccparams_lte.rach_powerRampingStep);
|
||||
|
||||
switch (ccparams_lte.rach_preambleTransMax) {
|
||||
@@ -1012,7 +1013,7 @@ int RCconfig_RRC(uint32_t i, eNB_RRC_INST *rrc, int macrlc_has_f1) {
|
||||
|
||||
default:
|
||||
AssertFatal (0,
|
||||
"Failed to parse eNB configuration file %s, enb %d unknown value \"%d\" for rach_preambleTransMax choice: 3,4,5,6,7,8,10,20,50,100,200!\n",
|
||||
"Failed to parse eNB configuration file %s, enb %u unknown value \"%d\" for rach_preambleTransMax choice: 3,4,5,6,7,8,10,20,50,100,200!\n",
|
||||
RC.config_file_name, i, ccparams_lte.rach_preambleTransMax);
|
||||
break;
|
||||
}
|
||||
@@ -1023,7 +1024,7 @@ int RCconfig_RRC(uint32_t i, eNB_RRC_INST *rrc, int macrlc_has_f1) {
|
||||
(ccparams_lte.rach_raResponseWindowSize==9)||
|
||||
(ccparams_lte.rach_raResponseWindowSize>10))
|
||||
AssertFatal (0,
|
||||
"Failed to parse eNB configuration file %s, enb %d unknown value \"%d\" for rach_raResponseWindowSize choice: 2,3,4,5,6,7,8,10!\n",
|
||||
"Failed to parse eNB configuration file %s, enb %u unknown value \"%d\" for rach_raResponseWindowSize choice: 2,3,4,5,6,7,8,10!\n",
|
||||
RC.config_file_name, i, ccparams_lte.rach_preambleTransMax);
|
||||
|
||||
RRC_CONFIGURATION_REQ (msg_p).radioresourceconfig[j].rach_macContentionResolutionTimer= (ccparams_lte.rach_macContentionResolutionTimer/8)-1;
|
||||
@@ -1032,7 +1033,7 @@ int RCconfig_RRC(uint32_t i, eNB_RRC_INST *rrc, int macrlc_has_f1) {
|
||||
(ccparams_lte.rach_macContentionResolutionTimer>64) ||
|
||||
((ccparams_lte.rach_macContentionResolutionTimer&7)!=0))
|
||||
AssertFatal (0,
|
||||
"Failed to parse eNB configuration file %s, enb %d unknown value \"%d\" for rach_macContentionResolutionTimer choice: 8,16,...,56,64!\n",
|
||||
"Failed to parse eNB configuration file %s, enb %u unknown value \"%d\" for rach_macContentionResolutionTimer choice: 8,16,...,56,64!\n",
|
||||
RC.config_file_name, i, ccparams_lte.rach_preambleTransMax);
|
||||
|
||||
RRC_CONFIGURATION_REQ (msg_p).radioresourceconfig[j].rach_maxHARQ_Msg3Tx= ccparams_lte.rach_maxHARQ_Msg3Tx;
|
||||
@@ -1040,7 +1041,7 @@ int RCconfig_RRC(uint32_t i, eNB_RRC_INST *rrc, int macrlc_has_f1) {
|
||||
if ((ccparams_lte.rach_maxHARQ_Msg3Tx<0) ||
|
||||
(ccparams_lte.rach_maxHARQ_Msg3Tx>8))
|
||||
AssertFatal (0,
|
||||
"Failed to parse eNB configuration file %s, enb %d unknown value \"%d\" for rach_maxHARQ_Msg3Tx choice: 1..8!\n",
|
||||
"Failed to parse eNB configuration file %s, enb %u unknown value \"%d\" for rach_maxHARQ_Msg3Tx choice: 1..8!\n",
|
||||
RC.config_file_name, i, ccparams_lte.rach_preambleTransMax);
|
||||
|
||||
switch (ccparams_lte.pcch_defaultPagingCycle) {
|
||||
@@ -1062,7 +1063,7 @@ int RCconfig_RRC(uint32_t i, eNB_RRC_INST *rrc, int macrlc_has_f1) {
|
||||
|
||||
default:
|
||||
AssertFatal (0,
|
||||
"Failed to parse eNB configuration file %s, enb %d unknown value \"%d\" for pcch_defaultPagingCycle choice: 32,64,128,256!\n",
|
||||
"Failed to parse eNB configuration file %s, enb %u unknown value \"%d\" for pcch_defaultPagingCycle choice: 32,64,128,256!\n",
|
||||
RC.config_file_name, i, ccparams_lte.pcch_defaultPagingCycle);
|
||||
break;
|
||||
}
|
||||
@@ -1084,7 +1085,7 @@ int RCconfig_RRC(uint32_t i, eNB_RRC_INST *rrc, int macrlc_has_f1) {
|
||||
} else if (strcmp(ccparams_lte.pcch_nB, "oneThirtySecondT") == 0) {
|
||||
RRC_CONFIGURATION_REQ (msg_p).radioresourceconfig[j].pcch_nB= LTE_PCCH_Config__nB_oneThirtySecondT;
|
||||
} else {
|
||||
AssertFatal (0, "Failed to parse eNB configuration file %s, enb %d unknown value \"%s\" for pcch_nB choice: fourT,twoT,oneT,halfT,quarterT,oneighthT,oneSixteenthT,oneThirtySecondT !\n",
|
||||
AssertFatal (0, "Failed to parse eNB configuration file %s, enb %u unknown value \"%s\" for pcch_nB choice: fourT,twoT,oneT,halfT,quarterT,oneighthT,oneSixteenthT,oneThirtySecondT !\n",
|
||||
RC.config_file_name,
|
||||
i,
|
||||
ccparams_lte.pcch_nB);
|
||||
@@ -1098,7 +1099,7 @@ int RCconfig_RRC(uint32_t i, eNB_RRC_INST *rrc, int macrlc_has_f1) {
|
||||
RRC_CONFIGURATION_REQ (msg_p).radioresourceconfig[j].drx_Config_present = LTE_DRX_Config_PR_setup;
|
||||
} else {
|
||||
AssertFatal (0,
|
||||
"Failed to parse eNB configuration file %s, enb %d unknown value \"%s\" for drx_Config_present choice: prNothing, prRelease, prSetup!\n",
|
||||
"Failed to parse eNB configuration file %s, enb %u unknown value \"%s\" for drx_Config_present choice: prNothing, prRelease, prSetup!\n",
|
||||
RC.config_file_name, i, ccparams_lte.drx_Config_present);
|
||||
}
|
||||
|
||||
@@ -1136,7 +1137,7 @@ int RCconfig_RRC(uint32_t i, eNB_RRC_INST *rrc, int macrlc_has_f1) {
|
||||
RRC_CONFIGURATION_REQ (msg_p).radioresourceconfig[j].drx_onDurationTimer = (long) LTE_DRX_Config__setup__onDurationTimer_psf200;
|
||||
} else {
|
||||
AssertFatal (0,
|
||||
"Failed to parse eNB configuration file %s, enb %d unknown value \"%s\" for drx_onDurationTimer choice !\n",
|
||||
"Failed to parse eNB configuration file %s, enb %u unknown value \"%s\" for drx_onDurationTimer choice !\n",
|
||||
RC.config_file_name, i, ccparams_lte.drx_onDurationTimer);
|
||||
break;
|
||||
}
|
||||
@@ -1207,7 +1208,7 @@ int RCconfig_RRC(uint32_t i, eNB_RRC_INST *rrc, int macrlc_has_f1) {
|
||||
RRC_CONFIGURATION_REQ (msg_p).radioresourceconfig[j].drx_InactivityTimer = (long) LTE_DRX_Config__setup__drx_InactivityTimer_spare1;
|
||||
} else {
|
||||
AssertFatal (0,
|
||||
"Failed to parse eNB configuration file %s, enb %d unknown value \"%s\" for drx_InactivityTimer choice !\n",
|
||||
"Failed to parse eNB configuration file %s, enb %u unknown value \"%s\" for drx_InactivityTimer choice !\n",
|
||||
RC.config_file_name, i, ccparams_lte.drx_InactivityTimer);
|
||||
break;
|
||||
}
|
||||
@@ -1216,7 +1217,7 @@ int RCconfig_RRC(uint32_t i, eNB_RRC_INST *rrc, int macrlc_has_f1) {
|
||||
|
||||
if (!ccparams_lte.mbms_dedicated_serving_cell)
|
||||
AssertFatal (0,
|
||||
"Failed to parse eNB configuration file %s, enb %d define %s: TRUE,FALSE!\n",
|
||||
"Failed to parse eNB configuration file %s, enb %u define %s: TRUE,FALSE!\n",
|
||||
RC.config_file_name, i, ENB_CONFIG_STRING_MBMS_DEDICATED_SERVING_CELL);
|
||||
else if (strcmp(ccparams_lte.mbms_dedicated_serving_cell, "ENABLE") == 0) {
|
||||
RRC_CONFIGURATION_REQ (msg_p).radioresourceconfig[j].mbms_dedicated_serving_cell = TRUE;
|
||||
@@ -1224,7 +1225,7 @@ int RCconfig_RRC(uint32_t i, eNB_RRC_INST *rrc, int macrlc_has_f1) {
|
||||
RRC_CONFIGURATION_REQ (msg_p).radioresourceconfig[j].mbms_dedicated_serving_cell = FALSE;
|
||||
} else {
|
||||
AssertFatal (0,
|
||||
"Failed to parse eNB configuration file %s, enb %d unknown value \"%s\" for mbms_dedicated_serving_cell choice: TRUE or FALSE !\n",
|
||||
"Failed to parse eNB configuration file %s, enb %u unknown value \"%s\" for mbms_dedicated_serving_cell choice: TRUE or FALSE !\n",
|
||||
RC.config_file_name, i, ccparams_lte.mbms_dedicated_serving_cell);
|
||||
}
|
||||
|
||||
@@ -1233,7 +1234,7 @@ int RCconfig_RRC(uint32_t i, eNB_RRC_INST *rrc, int macrlc_has_f1) {
|
||||
if ((ccparams_lte.ue_multiple_max < 1) ||
|
||||
(ccparams_lte.ue_multiple_max > 4))
|
||||
AssertFatal (0,
|
||||
"Failed to parse eNB configuration file %s, enb %d unknown value \"%d\" for ue_multiple_max choice: 1..4!\n",
|
||||
"Failed to parse eNB configuration file %s, enb %u unknown value \"%d\" for ue_multiple_max choice: 1..4!\n",
|
||||
RC.config_file_name, i, ccparams_lte.ue_multiple_max);
|
||||
|
||||
break;
|
||||
@@ -1242,7 +1243,7 @@ int RCconfig_RRC(uint32_t i, eNB_RRC_INST *rrc, int macrlc_has_f1) {
|
||||
if ((ccparams_lte.ue_multiple_max < 1) ||
|
||||
(ccparams_lte.ue_multiple_max > 8))
|
||||
AssertFatal (0,
|
||||
"Failed to parse eNB configuration file %s, enb %d unknown value \"%d\" for ue_multiple_max choice: 1..8!\n",
|
||||
"Failed to parse eNB configuration file %s, enb %u unknown value \"%d\" for ue_multiple_max choice: 1..8!\n",
|
||||
RC.config_file_name, i, ccparams_lte.ue_multiple_max);
|
||||
|
||||
break;
|
||||
@@ -1251,14 +1252,14 @@ int RCconfig_RRC(uint32_t i, eNB_RRC_INST *rrc, int macrlc_has_f1) {
|
||||
if ((ccparams_lte.ue_multiple_max < 1) ||
|
||||
(ccparams_lte.ue_multiple_max > 16))
|
||||
AssertFatal (0,
|
||||
"Failed to parse eNB configuration file %s, enb %d unknown value \"%d\" for ue_multiple_max choice: 1..16!\n",
|
||||
"Failed to parse eNB configuration file %s, enb %u unknown value \"%d\" for ue_multiple_max choice: 1..16!\n",
|
||||
RC.config_file_name, i, ccparams_lte.ue_multiple_max);
|
||||
|
||||
break;
|
||||
|
||||
default:
|
||||
AssertFatal (0,
|
||||
"Failed to parse eNB configuration file %s, enb %d unknown value \"%d\" for N_RB_DL choice: 25,50,100 !\n",
|
||||
"Failed to parse eNB configuration file %s, enb %u unknown value \"%d\" for N_RB_DL choice: 25,50,100 !\n",
|
||||
RC.config_file_name, i, ccparams_lte.N_RB_DL);
|
||||
break;
|
||||
}
|
||||
@@ -1281,7 +1282,7 @@ int RCconfig_RRC(uint32_t i, eNB_RRC_INST *rrc, int macrlc_has_f1) {
|
||||
RRC_CONFIGURATION_REQ (msg_p).radioresourceconfig[j].drx_RetransmissionTimer = (long) LTE_DRX_Config__setup__drx_RetransmissionTimer_psf33;
|
||||
} else {
|
||||
AssertFatal (0,
|
||||
"Failed to parse eNB configuration file %s, enb %d unknown value \"%s\" for drx_RetransmissionTimer choice !\n",
|
||||
"Failed to parse eNB configuration file %s, enb %u unknown value \"%s\" for drx_RetransmissionTimer choice !\n",
|
||||
RC.config_file_name, i, ccparams_lte.drx_RetransmissionTimer);
|
||||
break;
|
||||
}
|
||||
@@ -1339,7 +1340,7 @@ int RCconfig_RRC(uint32_t i, eNB_RRC_INST *rrc, int macrlc_has_f1) {
|
||||
offsetMaxLimit = 2560;
|
||||
} else {
|
||||
AssertFatal (0,
|
||||
"Failed to parse eNB configuration file \"%s\", enb %d unknown string value \"%s\" for drx_longDrx_CycleStartOffset_present choice !\n",
|
||||
"Failed to parse eNB configuration file \"%s\", enb %u unknown string value \"%s\" for drx_longDrx_CycleStartOffset_present choice !\n",
|
||||
RC.config_file_name, i, ccparams_lte.drx_longDrx_CycleStartOffset_present);
|
||||
}
|
||||
|
||||
@@ -1347,7 +1348,7 @@ int RCconfig_RRC(uint32_t i, eNB_RRC_INST *rrc, int macrlc_has_f1) {
|
||||
RRC_CONFIGURATION_REQ (msg_p).radioresourceconfig[j].drx_longDrx_CycleStartOffset = ccparams_lte.drx_longDrx_CycleStartOffset;
|
||||
} else {
|
||||
AssertFatal (0,
|
||||
"Failed to parse eNB configuration file %s, enb %d incoherent value \"%d\" for drx_longDrx_CycleStartOffset !\n",
|
||||
"Failed to parse eNB configuration file %s, enb %u incoherent value \"%d\" for drx_longDrx_CycleStartOffset !\n",
|
||||
RC.config_file_name, i, ccparams_lte.drx_longDrx_CycleStartOffset);
|
||||
}
|
||||
}
|
||||
@@ -1355,7 +1356,7 @@ int RCconfig_RRC(uint32_t i, eNB_RRC_INST *rrc, int macrlc_has_f1) {
|
||||
if (strcmp(ccparams_lte.drx_shortDrx_Cycle, "") == 0 || ccparams_lte.drx_shortDrx_ShortCycleTimer == 0) {
|
||||
if (strcmp(ccparams_lte.drx_shortDrx_Cycle, "") != 0 || ccparams_lte.drx_shortDrx_ShortCycleTimer != 0) {
|
||||
AssertFatal (0,
|
||||
"Failed to parse eNB configuration file %s, enb %d incoherent values \"%s\" - \"%d\" for drx_shortDrx_Cycle or drx_shortDrx_ShortCycleTimer choice !\n",
|
||||
"Failed to parse eNB configuration file %s, enb %u incoherent values \"%s\" - \"%d\" for drx_shortDrx_Cycle or drx_shortDrx_ShortCycleTimer choice !\n",
|
||||
RC.config_file_name, i, ccparams_lte.drx_shortDrx_Cycle, ccparams_lte.drx_shortDrx_ShortCycleTimer);
|
||||
} else {
|
||||
RRC_CONFIGURATION_REQ (msg_p).radioresourceconfig[j].drx_shortDrx_Cycle = -1;
|
||||
@@ -1412,13 +1413,13 @@ int RCconfig_RRC(uint32_t i, eNB_RRC_INST *rrc, int macrlc_has_f1) {
|
||||
RRC_CONFIGURATION_REQ (msg_p).radioresourceconfig[j].drx_shortDrx_Cycle = LTE_DRX_Config__setup__shortDRX__shortDRX_Cycle_sf640;
|
||||
} else {
|
||||
AssertFatal (0,
|
||||
"Failed to parse eNB configuration file %s, enb %d incoherent value \"%s\" for drx_shortDrx_Cycle !\n",
|
||||
"Failed to parse eNB configuration file %s, enb %u incoherent value \"%s\" for drx_shortDrx_Cycle !\n",
|
||||
RC.config_file_name, i, ccparams_lte.drx_shortDrx_Cycle);
|
||||
}
|
||||
|
||||
if (cycleNb > 0 && (offsetMaxLimit % cycleNb != 0 || cycleNb == offsetMaxLimit)) {
|
||||
AssertFatal (0,
|
||||
"Failed to parse eNB configuration file %s, enb %d incompatible (not multiple) values \"%d\" - \"%d\" for drx_shortDrx_Cycle and drx_longDrx_CycleStartOffset choice !\n",
|
||||
"Failed to parse eNB configuration file %s, enb %u incompatible (not multiple) values \"%d\" - \"%d\" for drx_shortDrx_Cycle and drx_longDrx_CycleStartOffset choice !\n",
|
||||
RC.config_file_name, i, cycleNb, offsetMaxLimit);
|
||||
}
|
||||
|
||||
@@ -1426,7 +1427,7 @@ int RCconfig_RRC(uint32_t i, eNB_RRC_INST *rrc, int macrlc_has_f1) {
|
||||
RRC_CONFIGURATION_REQ (msg_p).radioresourceconfig[j].drx_shortDrx_ShortCycleTimer = ccparams_lte.drx_shortDrx_ShortCycleTimer;
|
||||
} else {
|
||||
AssertFatal (0,
|
||||
"Failed to parse eNB configuration file %s, enb %d unknown value \"%d\" for drx_shortDrx_ShortCycleTimer choice !\n",
|
||||
"Failed to parse eNB configuration file %s, enb %u unknown value \"%d\" for drx_shortDrx_ShortCycleTimer choice !\n",
|
||||
RC.config_file_name, i, ccparams_lte.drx_shortDrx_ShortCycleTimer );
|
||||
}
|
||||
}
|
||||
@@ -1450,7 +1451,7 @@ int RCconfig_RRC(uint32_t i, eNB_RRC_INST *rrc, int macrlc_has_f1) {
|
||||
|
||||
default:
|
||||
AssertFatal (0,
|
||||
"Failed to parse eNB configuration file %s, enb %d unknown value \"%d\" for bcch_modificationPeriodCoeff choice: 2,4,8,16",
|
||||
"Failed to parse eNB configuration file %s, enb %u unknown value \"%d\" for bcch_modificationPeriodCoeff choice: 2,4,8,16",
|
||||
RC.config_file_name, i, ccparams_lte.bcch_modificationPeriodCoeff);
|
||||
break;
|
||||
}
|
||||
@@ -1493,7 +1494,7 @@ int RCconfig_RRC(uint32_t i, eNB_RRC_INST *rrc, int macrlc_has_f1) {
|
||||
|
||||
default:
|
||||
AssertFatal (0,
|
||||
"Failed to parse eNB configuration file %s, enb %d unknown value \"%d\" for ue_TransmissionMode choice: 1,2,3,4,5,6,7",
|
||||
"Failed to parse eNB configuration file %s, enb %u unknown value \"%d\" for ue_TransmissionMode choice: 1,2,3,4,5,6,7",
|
||||
RC.config_file_name, i, ccparams_lte.ue_TransmissionMode);
|
||||
break;
|
||||
}
|
||||
@@ -1505,7 +1506,7 @@ int RCconfig_RRC(uint32_t i, eNB_RRC_INST *rrc, int macrlc_has_f1) {
|
||||
if ((ccparams_lte.ue_multiple_max < 1) ||
|
||||
(ccparams_lte.ue_multiple_max > 4))
|
||||
AssertFatal (0,
|
||||
"Failed to parse eNB configuration file %s, enb %d unknown value \"%d\" for ue_multiple_max choice: 1..4!\n",
|
||||
"Failed to parse eNB configuration file %s, enb %u unknown value \"%d\" for ue_multiple_max choice: 1..4!\n",
|
||||
RC.config_file_name, i, ccparams_lte.ue_multiple_max);
|
||||
|
||||
break;
|
||||
@@ -1514,7 +1515,7 @@ int RCconfig_RRC(uint32_t i, eNB_RRC_INST *rrc, int macrlc_has_f1) {
|
||||
if ((ccparams_lte.ue_multiple_max < 1) ||
|
||||
(ccparams_lte.ue_multiple_max > 8))
|
||||
AssertFatal (0,
|
||||
"Failed to parse eNB configuration file %s, enb %d unknown value \"%d\" for ue_multiple_max choice: 1..8!\n",
|
||||
"Failed to parse eNB configuration file %s, enb %u unknown value \"%d\" for ue_multiple_max choice: 1..8!\n",
|
||||
RC.config_file_name, i, ccparams_lte.ue_multiple_max);
|
||||
|
||||
break;
|
||||
@@ -1523,14 +1524,14 @@ int RCconfig_RRC(uint32_t i, eNB_RRC_INST *rrc, int macrlc_has_f1) {
|
||||
if ((ccparams_lte.ue_multiple_max < 1) ||
|
||||
(ccparams_lte.ue_multiple_max > 16))
|
||||
AssertFatal (0,
|
||||
"Failed to parse eNB configuration file %s, enb %d unknown value \"%d\" for ue_multiple_max choice: 1..16!\n",
|
||||
"Failed to parse eNB configuration file %s, enb %u unknown value \"%d\" for ue_multiple_max choice: 1..16!\n",
|
||||
RC.config_file_name, i, ccparams_lte.ue_multiple_max);
|
||||
|
||||
break;
|
||||
|
||||
default:
|
||||
AssertFatal (0,
|
||||
"Failed to parse eNB configuration file %s, enb %d unknown value \"%d\" for N_RB_DL choice: 25,50,100 !\n",
|
||||
"Failed to parse eNB configuration file %s, enb %u unknown value \"%d\" for N_RB_DL choice: 25,50,100 !\n",
|
||||
RC.config_file_name, i, ccparams_lte.N_RB_DL);
|
||||
break;
|
||||
}
|
||||
@@ -1599,7 +1600,7 @@ int RCconfig_RRC(uint32_t i, eNB_RRC_INST *rrc, int macrlc_has_f1) {
|
||||
|
||||
default:
|
||||
AssertFatal (0,
|
||||
"Bad config value when parsing eNB configuration file %s, enb %d srb1_max_retx_threshold %u!\n",
|
||||
"Bad config value when parsing eNB configuration file %s, enb %u srb1_max_retx_threshold %d!\n",
|
||||
RC.config_file_name, i, srb1_params.srb1_max_retx_threshold);
|
||||
}
|
||||
|
||||
@@ -1637,7 +1638,7 @@ int RCconfig_RRC(uint32_t i, eNB_RRC_INST *rrc, int macrlc_has_f1) {
|
||||
rrc->srb1_poll_pdu = LTE_PollPDU_pInfinity;
|
||||
else
|
||||
AssertFatal (0,
|
||||
"Bad config value when parsing eNB configuration file %s, enb %d srb1_poll_pdu %u!\n",
|
||||
"Bad config value when parsing eNB configuration file %s, enb %u srb1_poll_pdu %d!\n",
|
||||
RC.config_file_name, i, srb1_params.srb1_poll_pdu);
|
||||
}
|
||||
|
||||
@@ -1705,7 +1706,7 @@ int RCconfig_RRC(uint32_t i, eNB_RRC_INST *rrc, int macrlc_has_f1) {
|
||||
rrc->srb1_poll_byte = LTE_PollByte_kBinfinity;
|
||||
else
|
||||
AssertFatal (0,
|
||||
"Bad config value when parsing eNB configuration file %s, enb %d srb1_poll_byte %u!\n",
|
||||
"Bad config value when parsing eNB configuration file %s, enb %u srb1_poll_byte %d!\n",
|
||||
RC.config_file_name, i, srb1_params.srb1_poll_byte);
|
||||
}
|
||||
|
||||
@@ -1715,7 +1716,7 @@ int RCconfig_RRC(uint32_t i, eNB_RRC_INST *rrc, int macrlc_has_f1) {
|
||||
rrc->srb1_timer_poll_retransmit = (srb1_params.srb1_timer_poll_retransmit - 300)/50 + 50;
|
||||
} else {
|
||||
AssertFatal (0,
|
||||
"Bad config value when parsing eNB configuration file %s, enb %d srb1_timer_poll_retransmit %u!\n",
|
||||
"Bad config value when parsing eNB configuration file %s, enb %u srb1_timer_poll_retransmit %d!\n",
|
||||
RC.config_file_name, i, srb1_params.srb1_timer_poll_retransmit);
|
||||
}
|
||||
|
||||
@@ -1725,7 +1726,7 @@ int RCconfig_RRC(uint32_t i, eNB_RRC_INST *rrc, int macrlc_has_f1) {
|
||||
rrc->srb1_timer_status_prohibit = (srb1_params.srb1_timer_status_prohibit - 300)/50 + 51;
|
||||
} else {
|
||||
AssertFatal (0,
|
||||
"Bad config value when parsing eNB configuration file %s, enb %d srb1_timer_status_prohibit %u!\n",
|
||||
"Bad config value when parsing eNB configuration file %s, enb %u srb1_timer_status_prohibit %d!\n",
|
||||
RC.config_file_name, i, srb1_params.srb1_timer_status_prohibit);
|
||||
}
|
||||
|
||||
@@ -1856,7 +1857,7 @@ int RCconfig_RRC(uint32_t i, eNB_RRC_INST *rrc, int macrlc_has_f1) {
|
||||
|
||||
default:
|
||||
AssertFatal (0,
|
||||
"Bad config value when parsing eNB configuration file %s, enb %d srb1_timer_reordering %u!\n",
|
||||
"Bad config value when parsing eNB configuration file %s, enb %u srb1_timer_reordering %d!\n",
|
||||
RC.config_file_name, i, srb1_params.srb1_timer_reordering);
|
||||
}
|
||||
}
|
||||
@@ -1879,13 +1880,13 @@ int RCconfig_DU_F1(MessageDef *msg_p, uint32_t i) {
|
||||
config_get( ENBSParams,sizeof(ENBSParams)/sizeof(paramdef_t),NULL);
|
||||
int num_enbs = ENBSParams[ENB_ACTIVE_ENBS_IDX].numelt;
|
||||
AssertFatal (i<num_enbs,
|
||||
"Failed to parse config file no %ith element in %s \n",i, ENB_CONFIG_STRING_ACTIVE_ENBS);
|
||||
"Failed to parse config file no %uth element in %s \n",i, ENB_CONFIG_STRING_ACTIVE_ENBS);
|
||||
|
||||
if (num_enbs>0) {
|
||||
// Output a list of all eNBs.
|
||||
config_getlist( &ENBParamList,ENBParams,sizeof(ENBParams)/sizeof(paramdef_t),NULL);
|
||||
AssertFatal(ENBParamList.paramarray[i][ENB_ENB_ID_IDX].uptr != NULL,
|
||||
"eNB id %d is not defined in configuration file\n",i);
|
||||
"eNB id %u is not defined in configuration file\n",i);
|
||||
F1AP_SETUP_REQ (msg_p).num_cells_available = 0;
|
||||
|
||||
for (k=0; k <num_enbs ; k++) {
|
||||
@@ -2125,7 +2126,7 @@ int RCconfig_S1(
|
||||
S1AP_REGISTER_ENB_REQ (msg_p).cell_type = CELL_HOME_ENB;
|
||||
} else {
|
||||
AssertFatal(0,
|
||||
"Failed to parse eNB configuration file %s, enb %d unknown value \"%s\" for cell_type choice: CELL_MACRO_ENB or CELL_HOME_ENB !\n",
|
||||
"Failed to parse eNB configuration file %s, enb %u unknown value \"%s\" for cell_type choice: CELL_MACRO_ENB or CELL_HOME_ENB !\n",
|
||||
RC.config_file_name,
|
||||
i,
|
||||
*(ENBParamList.paramarray[k][ENB_CELL_TYPE_IDX].strptr));
|
||||
@@ -2354,7 +2355,7 @@ int RCconfig_X2(MessageDef *msg_p, uint32_t i) {
|
||||
X2AP_REGISTER_ENB_REQ (msg_p).cell_type = CELL_HOME_ENB;
|
||||
} else {
|
||||
AssertFatal (0,
|
||||
"Failed to parse eNB configuration file %s, enb %d unknown value \"%s\" for cell_type choice: CELL_MACRO_ENB or CELL_HOME_ENB !\n",
|
||||
"Failed to parse eNB configuration file %s, enb %u unknown value \"%s\" for cell_type choice: CELL_MACRO_ENB or CELL_HOME_ENB !\n",
|
||||
RC.config_file_name, i, *(ENBParamList.paramarray[k][ENB_CELL_TYPE_IDX].strptr));
|
||||
}
|
||||
|
||||
@@ -2832,7 +2833,7 @@ void read_config_and_init(void) {
|
||||
|
||||
for (uint32_t enb_id = 0; enb_id < RC.nb_inst; enb_id++) {
|
||||
RC.rrc[enb_id] = malloc(sizeof(eNB_RRC_INST));
|
||||
AssertFatal(RC.rrc[enb_id], "RRC context for eNB %d not allocated\n", enb_id);
|
||||
AssertFatal(RC.rrc[enb_id], "RRC context for eNB %u not allocated\n", enb_id);
|
||||
memset((void *)RC.rrc[enb_id], 0, sizeof(eNB_RRC_INST));
|
||||
RCconfig_RRC(enb_id, RC.rrc[enb_id],macrlc_has_f1[enb_id]);
|
||||
}
|
||||
|
||||
+110
-110
@@ -539,122 +539,122 @@ typedef struct ccparams_lte_s {
|
||||
} ccparams_lte_t;
|
||||
|
||||
#define CCPARAMS_CHECK { \
|
||||
{ .s5 = { NULL } } , \
|
||||
{ .s5 = { NULL } } , \
|
||||
{ .s5 = { NULL } } , \
|
||||
{ .s5 = { NULL } } , \
|
||||
{ .s5 = { NULL } } , \
|
||||
{ .s5 = { NULL } } , \
|
||||
{ .s5 = { NULL } } , \
|
||||
{ .s5 = { NULL } } , \
|
||||
{ .s5 = { NULL } } , \
|
||||
{ .s5 = { NULL } } , \
|
||||
{ .s5 = { NULL } } , \
|
||||
{ .s5 = { NULL } } , \
|
||||
{ .s5 = { NULL } } , \
|
||||
{ .s5 = { NULL } } , \
|
||||
{ .s5 = { NULL } } , \
|
||||
{ .s5 = { NULL } } , \
|
||||
{ .s5 = { NULL } } , \
|
||||
{ .s5 = { NULL } } , \
|
||||
{ .s5 = { NULL } } , \
|
||||
{ .s5 = { NULL } } , \
|
||||
{ .s5 = { NULL } } , \
|
||||
{ .s5 = { NULL } } , \
|
||||
{ .s5 = { NULL } } , \
|
||||
{ .s5 = { NULL } } , \
|
||||
{ .s5 = { NULL } } , \
|
||||
{ .s5 = { NULL } } , \
|
||||
{ .s5 = { NULL } } , \
|
||||
{ .s5 = { NULL } } , \
|
||||
{ .s5 = { NULL } } , \
|
||||
{ .s5 = { NULL } } , \
|
||||
{ .s5 = { NULL } } , \
|
||||
{ .s5 = { NULL } } , \
|
||||
{ .s5 = { NULL } } , \
|
||||
{ .s5 = { NULL } } , \
|
||||
{ .s5 = { NULL } } , \
|
||||
{ .s5 = { NULL } } , \
|
||||
{ .s5 = { NULL } } , \
|
||||
{ .s5 = { NULL } } , \
|
||||
{ .s5 = { NULL } } , \
|
||||
{ .s5 = { NULL } } , \
|
||||
{ .s5 = { NULL } } , \
|
||||
{ .s5 = { NULL } } , \
|
||||
{ .s5 = { NULL } } , \
|
||||
{ .s5 = { NULL } } , \
|
||||
{ .s5 = { NULL } } , \
|
||||
{ .s5 = { NULL } } , \
|
||||
{ .s5 = { NULL } } , \
|
||||
{ .s5 = { NULL } } , \
|
||||
{ .s5 = { NULL } } , \
|
||||
{ .s5 = { NULL } } , \
|
||||
{ .s5 = { NULL } } , \
|
||||
{ .s5 = { NULL } } , \
|
||||
{ .s5 = { NULL } } , \
|
||||
{ .s5 = { NULL } } , \
|
||||
{ .s5 = { NULL } } , \
|
||||
{ .s5 = { NULL } } , \
|
||||
{ .s5 = { NULL } } , \
|
||||
{ .s5 = { NULL } } , \
|
||||
{ .s5 = { NULL } } , \
|
||||
{ .s5 = { NULL } } , \
|
||||
{ .s5 = { NULL } } , \
|
||||
{ .s5 = { NULL } } , \
|
||||
{ .s5 = { NULL } } , \
|
||||
{ .s5 = { NULL } } , \
|
||||
{ .s5 = { NULL } } , \
|
||||
{ .s5 = { NULL } } , \
|
||||
{ .s5 = { NULL } } , \
|
||||
{ .s5 = { NULL } } , \
|
||||
{ .s5 = { NULL } } , \
|
||||
{ { NULL } } , \
|
||||
{ { NULL } } , \
|
||||
{ { NULL } } , \
|
||||
{ { NULL } } , \
|
||||
{ { NULL } } , \
|
||||
{ { NULL } } , \
|
||||
{ { NULL } } , \
|
||||
{ { NULL } } , \
|
||||
{ { NULL } } , \
|
||||
{ { NULL } } , \
|
||||
{ { NULL } } , \
|
||||
{ { NULL } } , \
|
||||
{ { NULL } } , \
|
||||
{ { NULL } } , \
|
||||
{ { NULL } } , \
|
||||
{ { NULL } } , \
|
||||
{ { NULL } } , \
|
||||
{ { NULL } } , \
|
||||
{ { NULL } } , \
|
||||
{ { NULL } } , \
|
||||
{ { NULL } } , \
|
||||
{ { NULL } } , \
|
||||
{ { NULL } } , \
|
||||
{ { NULL } } , \
|
||||
{ { NULL } } , \
|
||||
{ { NULL } } , \
|
||||
{ { NULL } } , \
|
||||
{ { NULL } } , \
|
||||
{ { NULL } } , \
|
||||
{ { NULL } } , \
|
||||
{ { NULL } } , \
|
||||
{ { NULL } } , \
|
||||
{ { NULL } } , \
|
||||
{ { NULL } } , \
|
||||
{ { NULL } } , \
|
||||
{ { NULL } } , \
|
||||
{ { NULL } } , \
|
||||
{ { NULL } } , \
|
||||
{ { NULL } } , \
|
||||
{ { NULL } } , \
|
||||
{ { NULL } } , \
|
||||
{ { NULL } } , \
|
||||
{ { NULL } } , \
|
||||
{ { NULL } } , \
|
||||
{ { NULL } } , \
|
||||
{ { NULL } } , \
|
||||
{ { NULL } } , \
|
||||
{ { NULL } } , \
|
||||
{ { NULL } } , \
|
||||
{ { NULL } } , \
|
||||
{ { NULL } } , \
|
||||
{ { NULL } } , \
|
||||
{ { NULL } } , \
|
||||
{ { NULL } } , \
|
||||
{ { NULL } } , \
|
||||
{ { NULL } } , \
|
||||
{ { NULL } } , \
|
||||
{ { NULL } } , \
|
||||
{ { NULL } } , \
|
||||
{ { NULL } } , \
|
||||
{ { NULL } } , \
|
||||
{ { NULL } } , \
|
||||
{ { NULL } } , \
|
||||
{ { NULL } } , \
|
||||
{ { NULL } } , \
|
||||
{ { NULL } } , \
|
||||
{ { NULL } } , \
|
||||
{ { NULL } } , \
|
||||
{ { NULL } } , \
|
||||
{ .s1a= { config_check_modify_integer, UETIMER_T300_OKVALUES, UETIMER_T300_MODVALUES,8}} ,\
|
||||
{ .s1a= { config_check_modify_integer, UETIMER_T301_OKVALUES, UETIMER_T301_MODVALUES,8}} ,\
|
||||
{ .s1a= { config_check_modify_integer, UETIMER_T310_OKVALUES, UETIMER_T310_MODVALUES,7}} ,\
|
||||
{ .s1a= { config_check_modify_integer, UETIMER_T311_OKVALUES, UETIMER_T311_MODVALUES,7}} ,\
|
||||
{ .s1a= { config_check_modify_integer, UETIMER_N310_OKVALUES, UETIMER_N310_MODVALUES,8}} ,\
|
||||
{ .s1a= { config_check_modify_integer, UETIMER_N311_OKVALUES, UETIMER_N311_MODVALUES,8}} ,\
|
||||
{ .s5 = { NULL } } , \
|
||||
{ .s5 = { NULL } } , \
|
||||
{ .s5 = { NULL } } , \
|
||||
{ .s5 = { NULL } } , \
|
||||
{ .s5 = { NULL } } , \
|
||||
{ .s5 = { NULL } } , \
|
||||
{ .s5 = { NULL } } , \
|
||||
{ .s5 = { NULL } } , \
|
||||
{ .s5 = { NULL } } , \
|
||||
{ .s5 = { NULL } } , \
|
||||
{ .s5 = { NULL } } , \
|
||||
{ .s5 = { NULL } } , \
|
||||
{ .s5 = { NULL } } , \
|
||||
{ .s5 = { NULL } } , \
|
||||
{ .s5 = { NULL } } , \
|
||||
{ .s5 = { NULL } } , \
|
||||
{ .s5 = { NULL } } , \
|
||||
{ .s5 = { NULL } } , \
|
||||
{ .s5 = { NULL } } , \
|
||||
{ .s5 = { NULL } } , \
|
||||
{ .s5 = { NULL } } , \
|
||||
{ .s5 = { NULL } } , \
|
||||
{ .s5 = { NULL } } , \
|
||||
{ .s5 = { NULL } } , \
|
||||
{ .s5 = { NULL } } , \
|
||||
{ .s5 = { NULL } } , \
|
||||
{ .s5 = { NULL } } , \
|
||||
{ .s5 = { NULL } } , \
|
||||
{ .s5 = { NULL } } , \
|
||||
{ .s5 = { NULL } } , \
|
||||
{ .s5 = { NULL } } , \
|
||||
{ .s5 = { NULL } } , \
|
||||
{ .s5 = { NULL } } , \
|
||||
{ .s5 = { NULL } } , \
|
||||
{ .s5 = { NULL } } , \
|
||||
{ .s5 = { NULL } } , \
|
||||
{ .s5 = { NULL } } , \
|
||||
{ .s5 = { NULL } } , \
|
||||
{ .s5 = { NULL } } , \
|
||||
{ .s5 = { NULL } } , \
|
||||
{ .s5 = { NULL } } \
|
||||
{ { NULL } } , \
|
||||
{ { NULL } } , \
|
||||
{ { NULL } } , \
|
||||
{ { NULL } } , \
|
||||
{ { NULL } } , \
|
||||
{ { NULL } } , \
|
||||
{ { NULL } } , \
|
||||
{ { NULL } } , \
|
||||
{ { NULL } } , \
|
||||
{ { NULL } } , \
|
||||
{ { NULL } } , \
|
||||
{ { NULL } } , \
|
||||
{ { NULL } } , \
|
||||
{ { NULL } } , \
|
||||
{ { NULL } } , \
|
||||
{ { NULL } } , \
|
||||
{ { NULL } } , \
|
||||
{ { NULL } } , \
|
||||
{ { NULL } } , \
|
||||
{ { NULL } } , \
|
||||
{ { NULL } } , \
|
||||
{ { NULL } } , \
|
||||
{ { NULL } } , \
|
||||
{ { NULL } } , \
|
||||
{ { NULL } } , \
|
||||
{ { NULL } } , \
|
||||
{ { NULL } } , \
|
||||
{ { NULL } } , \
|
||||
{ { NULL } } , \
|
||||
{ { NULL } } , \
|
||||
{ { NULL } } , \
|
||||
{ { NULL } } , \
|
||||
{ { NULL } } , \
|
||||
{ { NULL } } , \
|
||||
{ { NULL } } , \
|
||||
{ { NULL } } , \
|
||||
{ { NULL } } , \
|
||||
{ { NULL } } , \
|
||||
{ { NULL } } , \
|
||||
{ { NULL } } , \
|
||||
{ { NULL } } \
|
||||
}
|
||||
|
||||
/*-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------*/
|
||||
|
||||
@@ -258,93 +258,93 @@ typedef struct ccparams_eMTC_s {
|
||||
}
|
||||
|
||||
#define EMTCPARAMS_CHECK { \
|
||||
{ .s5= {NULL }} , \
|
||||
{ .s5= {NULL }} , \
|
||||
{ .s5= {NULL }} , \
|
||||
{ .s5= {NULL }} , \
|
||||
{ .s5= {NULL }} , \
|
||||
{ .s5= {NULL }} , \
|
||||
{ .s5= {NULL }} , \
|
||||
{ .s5= {NULL }} , \
|
||||
{ .s5= {NULL }} , \
|
||||
{ .s5= {NULL }} , \
|
||||
{ .s5= {NULL }} , \
|
||||
{ .s5= {NULL }} , \
|
||||
{ .s5= {NULL }} , \
|
||||
{ .s5= {NULL }} , \
|
||||
{ .s5= {NULL }} , \
|
||||
{ .s5= {NULL }} , \
|
||||
{ .s5= {NULL }} , \
|
||||
{ .s5= {NULL }} , \
|
||||
{ .s5= {NULL }} , \
|
||||
{ .s5= {NULL }} , \
|
||||
{ .s5= {NULL }} , \
|
||||
{ .s5= {NULL }} , \
|
||||
{ .s5= {NULL }} , \
|
||||
{ .s5= {NULL }} , \
|
||||
{ .s5= {NULL }} , \
|
||||
{ .s5= {NULL }} , \
|
||||
{ .s5= {NULL }} , \
|
||||
{ .s5= {NULL }} , \
|
||||
{ .s5= {NULL }} , \
|
||||
{ .s5= {NULL }} , \
|
||||
{ .s5= {NULL }} , \
|
||||
{ .s5= {NULL }} , \
|
||||
{ .s5= {NULL }} , \
|
||||
{ .s5= {NULL }} , \
|
||||
{ .s5= {NULL }} , \
|
||||
{ .s5= {NULL }} , \
|
||||
{ .s5= {NULL }} , \
|
||||
{ .s5= {NULL }} , \
|
||||
{ .s5= {NULL }} , \
|
||||
{ .s5= {NULL }} , \
|
||||
{ .s5= {NULL }} , \
|
||||
{ .s5= {NULL }} , \
|
||||
{ .s5= {NULL }} , \
|
||||
{ .s5= {NULL }} , \
|
||||
{ .s5= {NULL }} , \
|
||||
{ .s5= {NULL }} , \
|
||||
{ .s5= {NULL }} , \
|
||||
{ .s5= {NULL }} , \
|
||||
{ .s5= {NULL }} , \
|
||||
{ .s5= {NULL }} , \
|
||||
{ .s5= {NULL }} , \
|
||||
{ {NULL}} , \
|
||||
{ {NULL}} , \
|
||||
{ {NULL}} , \
|
||||
{ {NULL}} , \
|
||||
{ {NULL}} , \
|
||||
{ {NULL}} , \
|
||||
{ {NULL}} , \
|
||||
{ {NULL}} , \
|
||||
{ {NULL}} , \
|
||||
{ {NULL}} , \
|
||||
{ {NULL}} , \
|
||||
{ {NULL}} , \
|
||||
{ {NULL}} , \
|
||||
{ {NULL}} , \
|
||||
{ {NULL}} , \
|
||||
{ {NULL}} , \
|
||||
{ {NULL}} , \
|
||||
{ {NULL}} , \
|
||||
{ {NULL}} , \
|
||||
{ {NULL}} , \
|
||||
{ {NULL}} , \
|
||||
{ {NULL}} , \
|
||||
{ {NULL}} , \
|
||||
{ {NULL}} , \
|
||||
{ {NULL}} , \
|
||||
{ {NULL}} , \
|
||||
{ {NULL}} , \
|
||||
{ {NULL}} , \
|
||||
{ {NULL}} , \
|
||||
{ {NULL}} , \
|
||||
{ {NULL}} , \
|
||||
{ {NULL}} , \
|
||||
{ {NULL}} , \
|
||||
{ {NULL}} , \
|
||||
{ {NULL}} , \
|
||||
{ {NULL}} , \
|
||||
{ {NULL}} , \
|
||||
{ {NULL}} , \
|
||||
{ {NULL}} , \
|
||||
{ {NULL}} , \
|
||||
{ {NULL}} , \
|
||||
{ {NULL}} , \
|
||||
{ {NULL}} , \
|
||||
{ {NULL}} , \
|
||||
{ {NULL}} , \
|
||||
{ {NULL}} , \
|
||||
{ {NULL}} , \
|
||||
{ {NULL}} , \
|
||||
{ {NULL}} , \
|
||||
{ {NULL}} , \
|
||||
{ {NULL}} , \
|
||||
{ .s1a= { config_check_modify_integer, UETIMER_T300_OKVALUES, UETIMER_T300_MODVALUES,8}} , \
|
||||
{ .s1a= { config_check_modify_integer, UETIMER_T301_OKVALUES, UETIMER_T301_MODVALUES,8}} , \
|
||||
{ .s1a= { config_check_modify_integer, UETIMER_T310_OKVALUES, UETIMER_T310_MODVALUES,7}} , \
|
||||
{ .s1a= { config_check_modify_integer, UETIMER_T311_OKVALUES, UETIMER_T311_MODVALUES,7}} , \
|
||||
{ .s1a= { config_check_modify_integer, UETIMER_N310_OKVALUES, UETIMER_N310_MODVALUES,8}} , \
|
||||
{ .s1a= { config_check_modify_integer, UETIMER_N311_OKVALUES, UETIMER_N311_MODVALUES,8}} , \
|
||||
{ .s5= {NULL }} , \
|
||||
{ .s5= {NULL }} , \
|
||||
{ .s5= {NULL }} , \
|
||||
{ .s5= {NULL }} , \
|
||||
{ .s5= {NULL }} , \
|
||||
{ .s5= {NULL }} , \
|
||||
{ .s5= {NULL }} , \
|
||||
{ .s5= {NULL }} , \
|
||||
{ .s5= {NULL }} , \
|
||||
{ .s5= {NULL }} , \
|
||||
{ .s5= {NULL }} , \
|
||||
{ .s5= {NULL }} , \
|
||||
{ .s5= {NULL }} , \
|
||||
{ .s5= {NULL }} , \
|
||||
{ .s5= {NULL }} , \
|
||||
{ .s5= {NULL }} , \
|
||||
{ .s5= {NULL }} , \
|
||||
{ .s5= {NULL }} , \
|
||||
{ .s5= {NULL }} , \
|
||||
{ .s5= {NULL }} , \
|
||||
{ .s5= {NULL }} , \
|
||||
{ .s5= {NULL }} , \
|
||||
{ .s5= {NULL }} , \
|
||||
{ .s5= {NULL }} , \
|
||||
{ .s5= {NULL }} , \
|
||||
{ .s5= {NULL }} , \
|
||||
{ .s5= {NULL }} , \
|
||||
{ .s5= {NULL }} , \
|
||||
{ .s5= {NULL }} , \
|
||||
{ .s5= {NULL }} , \
|
||||
{ {NULL}} , \
|
||||
{ {NULL}} , \
|
||||
{ {NULL}} , \
|
||||
{ {NULL}} , \
|
||||
{ {NULL}} , \
|
||||
{ {NULL}} , \
|
||||
{ {NULL}} , \
|
||||
{ {NULL}} , \
|
||||
{ {NULL}} , \
|
||||
{ {NULL}} , \
|
||||
{ {NULL}} , \
|
||||
{ {NULL}} , \
|
||||
{ {NULL}} , \
|
||||
{ {NULL}} , \
|
||||
{ {NULL}} , \
|
||||
{ {NULL}} , \
|
||||
{ {NULL}} , \
|
||||
{ {NULL}} , \
|
||||
{ {NULL}} , \
|
||||
{ {NULL}} , \
|
||||
{ {NULL}} , \
|
||||
{ {NULL}} , \
|
||||
{ {NULL}} , \
|
||||
{ {NULL}} , \
|
||||
{ {NULL}} , \
|
||||
{ {NULL}} , \
|
||||
{ {NULL}} , \
|
||||
{ {NULL}} , \
|
||||
{ {NULL}} , \
|
||||
{ {NULL}} , \
|
||||
}
|
||||
|
||||
#define SYSTEM_INFO_VALUE_TAG_SI_DESC(eMTCconfig) { \
|
||||
|
||||
@@ -142,13 +142,14 @@ add_msg3(module_id_t module_idP, int CC_id, RA_t *ra, frame_t frameP,
|
||||
ul_config_pdu->ulsch_pdu.ulsch_pdu_rel8.size = get_TBS_UL (ra->msg3_mcs, ra->msg3_nb_rb);
|
||||
// Re13 fields
|
||||
ul_config_pdu->ulsch_pdu.ulsch_pdu_rel13.ue_type = ra->rach_resource_type > 2 ? 2 : 1;
|
||||
|
||||
if (ra->rach_resource_type > 0) {
|
||||
pusch_maxNumRepetitionCEmodeA_r13= *(rrc->configuration.pusch_maxNumRepetitionCEmodeA_r13[CC_id]);
|
||||
ul_config_pdu->ulsch_pdu.ulsch_pdu_rel13.total_number_of_repetitions= pusch_repetition_Table8_2_36213[pusch_maxNumRepetitionCEmodeA_r13][ra->pusch_repetition_levels];
|
||||
}
|
||||
else{
|
||||
ul_config_pdu->ulsch_pdu.ulsch_pdu_rel13.total_number_of_repetitions=1;
|
||||
pusch_maxNumRepetitionCEmodeA_r13= *(rrc->configuration.pusch_maxNumRepetitionCEmodeA_r13[CC_id]);
|
||||
ul_config_pdu->ulsch_pdu.ulsch_pdu_rel13.total_number_of_repetitions= pusch_repetition_Table8_2_36213[pusch_maxNumRepetitionCEmodeA_r13][ra->pusch_repetition_levels];
|
||||
} else {
|
||||
ul_config_pdu->ulsch_pdu.ulsch_pdu_rel13.total_number_of_repetitions=1;
|
||||
}
|
||||
|
||||
ul_config_pdu->ulsch_pdu.ulsch_pdu_rel13.repetition_number = 1;
|
||||
ul_config_pdu->ulsch_pdu.ulsch_pdu_rel13.initial_transmission_sf_io = (ra->Msg3_frame * 10) + ra->Msg3_subframe;
|
||||
ul_req_body->number_of_pdus++;
|
||||
@@ -269,10 +270,9 @@ void generate_Msg2(module_id_t module_idP,
|
||||
uint16_t absSF_Msg2 = (10 * ra->Msg2_frame) + ra->Msg2_subframe;
|
||||
|
||||
if (ra->rach_resource_type > 0) {
|
||||
PUSCH_Rep_Level= *(rrc->configuration.pusch_repetitionLevelCEmodeA_r13[CC_idP]);
|
||||
}
|
||||
else {
|
||||
PUSCH_Rep_Level= 0;
|
||||
PUSCH_Rep_Level= *(rrc->configuration.pusch_repetitionLevelCEmodeA_r13[CC_idP]);
|
||||
} else {
|
||||
PUSCH_Rep_Level= 0;
|
||||
}
|
||||
|
||||
if (absSF > absSF_Msg2) {
|
||||
@@ -415,7 +415,7 @@ void generate_Msg2(module_id_t module_idP,
|
||||
}
|
||||
|
||||
ra->pusch_repetition_levels = PUSCH_Rep_Level;
|
||||
|
||||
|
||||
if((ra->Msg2_frame == frameP) && (ra->Msg2_subframe == subframeP)) {
|
||||
/* Program PDSCH */
|
||||
LOG_D(MAC, "[eNB %d][RAPROC] Frame %d, Subframe %d : In generate_Msg2, Programming PDSCH\n",
|
||||
@@ -902,11 +902,10 @@ generate_Msg4(module_id_t module_idP,
|
||||
ul_req_body->number_of_pdus++;
|
||||
T (T_ENB_MAC_UE_DL_PDU_WITH_DATA, T_INT (module_idP), T_INT (CC_idP), T_INT (ra->rnti), T_INT (frameP), T_INT (subframeP),
|
||||
T_INT (0 /*harq_pid always 0? */ ), T_BUFFER (&mac->UE_list.DLSCH_pdu[CC_idP][0][UE_id].payload[0], ra->msg4_TBsize));
|
||||
|
||||
if (opt_enabled == 1) {
|
||||
trace_pdu (1, (uint8_t *) mac->UE_list.DLSCH_pdu[CC_idP][0][(unsigned char) UE_id].payload[0], ra->msg4_rrc_sdu_length, UE_id, 3, UE_RNTI (module_idP, UE_id), mac->frame, mac->subframe, 0, 0);
|
||||
LOG_D (OPT, "[eNB %d][DLSCH] CC_id %d Frame %d trace pdu for rnti %x with size %d\n", module_idP, CC_idP, frameP, UE_RNTI (module_idP, UE_id), ra->msg4_rrc_sdu_length);
|
||||
}
|
||||
trace_pdu (DIRECTION_DOWNLINK, (uint8_t *) mac->UE_list.DLSCH_pdu[CC_idP][0][(unsigned char) UE_id].payload[0],
|
||||
ra->msg4_rrc_sdu_length,
|
||||
UE_id, 3, UE_RNTI (module_idP, UE_id),
|
||||
mac->frame, mac->subframe, 0, 0);
|
||||
} // Msg4 frame/subframe
|
||||
} // rach_resource_type > 0
|
||||
else {
|
||||
@@ -1079,20 +1078,12 @@ generate_Msg4(module_id_t module_idP,
|
||||
T_INT(subframeP), T_INT(0 /*harq_pid always 0? */ ),
|
||||
T_BUFFER(&mac->UE_list.DLSCH_pdu[CC_idP][0][UE_id].
|
||||
payload[0], ra->msg4_TBsize));
|
||||
|
||||
if (opt_enabled == 1) {
|
||||
trace_pdu(DIRECTION_DOWNLINK,
|
||||
(uint8_t *) mac->
|
||||
UE_list.DLSCH_pdu[CC_idP][0][(unsigned char)UE_id].payload[0],
|
||||
rrc_sdu_length, UE_id, WS_C_RNTI,
|
||||
UE_RNTI(module_idP, UE_id), mac->frame,
|
||||
mac->subframe, 0, 0);
|
||||
LOG_D(OPT,
|
||||
"[eNB %d][DLSCH] CC_id %d Frame %d trace pdu for rnti %x with size %d\n",
|
||||
module_idP, CC_idP, frameP, UE_RNTI(module_idP,
|
||||
UE_id),
|
||||
rrc_sdu_length);
|
||||
}
|
||||
trace_pdu(DIRECTION_DOWNLINK,
|
||||
(uint8_t *) mac->
|
||||
UE_list.DLSCH_pdu[CC_idP][0][(unsigned char)UE_id].payload[0],
|
||||
rrc_sdu_length, UE_id, WS_C_RNTI,
|
||||
UE_RNTI(module_idP, UE_id), mac->frame,
|
||||
mac->subframe, 0, 0);
|
||||
|
||||
if(RC.mac[module_idP]->scheduler_mode == SCHED_MODE_FAIR_RR) {
|
||||
set_dl_ue_select_msg4(CC_idP, 4, UE_id, ra->rnti);
|
||||
|
||||
@@ -26,7 +26,6 @@
|
||||
* \email: navid.nikaein@eurecom.fr
|
||||
* \version 1.0
|
||||
* @ingroup _mac
|
||||
|
||||
*/
|
||||
|
||||
#include "assertions.h"
|
||||
@@ -279,16 +278,10 @@ schedule_SIB1_MBMS(module_id_t module_idP,
|
||||
eNB->TX_req[CC_id].tx_request_body.tl.tag = NFAPI_TX_REQUEST_BODY_TAG;
|
||||
eNB->TX_req[CC_id].tx_request_body.number_of_pdus++;
|
||||
eNB->TX_req[CC_id].header.message_id = NFAPI_TX_REQUEST;
|
||||
|
||||
if (opt_enabled == 1) {
|
||||
trace_pdu(DIRECTION_DOWNLINK,
|
||||
&cc->BCCH_BR_pdu[0].payload[0],
|
||||
bcch_sdu_length,
|
||||
0xffff, WS_SI_RNTI, 0xffff, eNB->frame, eNB->subframe, 0, 0);
|
||||
LOG_D(OPT,
|
||||
"[eNB %d][BCH] Frame %d trace pdu for CC_id %d rnti %x with size %d\n",
|
||||
module_idP, frameP, CC_id, 0xffff, bcch_sdu_length);
|
||||
}
|
||||
trace_pdu(DIRECTION_DOWNLINK,
|
||||
&cc->BCCH_BR_pdu[0].payload[0],
|
||||
bcch_sdu_length,
|
||||
0xffff, WS_SI_RNTI, 0xffff, eNB->frame, eNB->subframe, 0, 0);
|
||||
|
||||
if (cc->tdd_Config != NULL) { //TDD
|
||||
LOG_D(MAC,
|
||||
@@ -509,16 +502,10 @@ schedule_SIB1_BR(module_id_t module_idP,
|
||||
eNB->TX_req[CC_id].tx_request_body.tl.tag = NFAPI_TX_REQUEST_BODY_TAG;
|
||||
eNB->TX_req[CC_id].tx_request_body.number_of_pdus++;
|
||||
eNB->TX_req[CC_id].header.message_id = NFAPI_TX_REQUEST;
|
||||
|
||||
if (opt_enabled == 1) {
|
||||
trace_pdu(DIRECTION_DOWNLINK,
|
||||
&cc->BCCH_BR_pdu[0].payload[0],
|
||||
bcch_sdu_length,
|
||||
0xffff, WS_SI_RNTI, 0xffff, eNB->frame, eNB->subframe, 0, 0);
|
||||
LOG_D(OPT,
|
||||
"[eNB %d][BCH] Frame %d trace pdu for CC_id %d rnti %x with size %d\n",
|
||||
module_idP, frameP, CC_id, 0xffff, bcch_sdu_length);
|
||||
}
|
||||
trace_pdu(DIRECTION_DOWNLINK,
|
||||
&cc->BCCH_BR_pdu[0].payload[0],
|
||||
bcch_sdu_length,
|
||||
0xffff, WS_SI_RNTI, 0xffff, eNB->frame, eNB->subframe, 0, 0);
|
||||
|
||||
if (cc->tdd_Config != NULL) { //TDD
|
||||
LOG_D(MAC,
|
||||
@@ -696,18 +683,13 @@ schedule_SI_BR(module_id_t module_idP, frame_t frameP,
|
||||
TX_req->segments[0].segment_length = bcch_sdu_length;
|
||||
TX_req->segments[0].segment_data = cc->BCCH_BR_pdu[i+1].payload;
|
||||
eNB->TX_req[CC_id].tx_request_body.number_of_pdus++;
|
||||
|
||||
if (opt_enabled == 1) {
|
||||
trace_pdu(DIRECTION_DOWNLINK,
|
||||
&cc->BCCH_BR_pdu[i + 1].payload[0],
|
||||
bcch_sdu_length,
|
||||
0xffff,
|
||||
WS_SI_RNTI,
|
||||
0xffff, eNB->frame, eNB->subframe, 0,
|
||||
0);
|
||||
LOG_D(OPT, "[eNB %d][BCH] Frame %d trace pdu for CC_id %d rnti %x with size %d\n",
|
||||
module_idP, frameP, CC_id, 0xffff, bcch_sdu_length);
|
||||
}
|
||||
trace_pdu(DIRECTION_DOWNLINK,
|
||||
&cc->BCCH_BR_pdu[i + 1].payload[0],
|
||||
bcch_sdu_length,
|
||||
0xffff,
|
||||
WS_SI_RNTI,
|
||||
0xffff, eNB->frame, eNB->subframe, 0,
|
||||
0);
|
||||
|
||||
if (cc->tdd_Config != NULL) { //TDD
|
||||
LOG_D(MAC, "[eNB] Frame %d : Scheduling BCCH-BR %d->DLSCH (TDD) for CC_id %d SI-BR %d bytes\n",
|
||||
@@ -901,18 +883,11 @@ schedule_SI_MBMS(module_id_t module_idP, frame_t frameP,
|
||||
|
||||
T(T_ENB_MAC_UE_DL_PDU_WITH_DATA, T_INT(module_idP), T_INT(CC_id), T_INT(0xffff),
|
||||
T_INT(frameP), T_INT(subframeP), T_INT(0), T_BUFFER(cc->BCCH_MBMS_pdu.payload, bcch_sdu_length));
|
||||
|
||||
if (opt_enabled == 1) {
|
||||
trace_pdu(DIRECTION_DOWNLINK,
|
||||
&cc->BCCH_MBMS_pdu.payload[0],
|
||||
bcch_sdu_length,
|
||||
0xffff,
|
||||
WS_SI_RNTI, 0xffff, eNB->frame, eNB->subframe, 0, 0);
|
||||
LOG_D(OPT,
|
||||
"[eNB %d][BCH-MBMS] Frame %d trace pdu for CC_id %d rnti %x with size %d\n",
|
||||
module_idP, frameP, CC_id, 0xffff,
|
||||
bcch_sdu_length);
|
||||
}
|
||||
trace_pdu(DIRECTION_DOWNLINK,
|
||||
&cc->BCCH_MBMS_pdu.payload[0],
|
||||
bcch_sdu_length,
|
||||
0xffff,
|
||||
WS_SI_RNTI, 0xffff, eNB->frame, eNB->subframe, 0, 0);
|
||||
|
||||
if (0/*cc->tdd_Config != NULL*/) { //TDD not for FeMBMS
|
||||
LOG_D(MAC,
|
||||
@@ -1177,18 +1152,11 @@ schedule_SI(module_id_t module_idP, frame_t frameP, sub_frame_t subframeP)
|
||||
|
||||
T(T_ENB_MAC_UE_DL_PDU_WITH_DATA, T_INT(module_idP), T_INT(CC_id), T_INT(0xffff),
|
||||
T_INT(frameP), T_INT(subframeP), T_INT(0), T_BUFFER(cc->BCCH_pdu.payload, bcch_sdu_length));
|
||||
|
||||
if (opt_enabled == 1) {
|
||||
trace_pdu(DIRECTION_DOWNLINK,
|
||||
&cc->BCCH_pdu.payload[0],
|
||||
bcch_sdu_length,
|
||||
0xffff,
|
||||
WS_SI_RNTI, 0xffff, eNB->frame, eNB->subframe, 0, 0);
|
||||
LOG_D(OPT,
|
||||
"[eNB %d][BCH] Frame %d trace pdu for CC_id %d rnti %x with size %d\n",
|
||||
module_idP, frameP, CC_id, 0xffff,
|
||||
bcch_sdu_length);
|
||||
}
|
||||
trace_pdu(DIRECTION_DOWNLINK,
|
||||
&cc->BCCH_pdu.payload[0],
|
||||
bcch_sdu_length,
|
||||
0xffff,
|
||||
WS_SI_RNTI, 0xffff, eNB->frame, eNB->subframe, 0, 0);
|
||||
|
||||
if (cc->tdd_Config != NULL) { //TDD
|
||||
LOG_D(MAC,
|
||||
|
||||
@@ -1398,27 +1398,17 @@ schedule_ue_spec(module_id_t module_idP,
|
||||
dlsch_pdu->payload[0][offset + sdu_length_total + j] = 0;
|
||||
}
|
||||
|
||||
if (opt_enabled == 1) {
|
||||
trace_pdu(DIRECTION_DOWNLINK,
|
||||
(uint8_t *) dlsch_pdu->payload[0],
|
||||
TBS,
|
||||
module_idP,
|
||||
WS_C_RNTI,
|
||||
UE_RNTI(module_idP,
|
||||
UE_id),
|
||||
eNB->frame,
|
||||
eNB->subframe,
|
||||
0,
|
||||
0);
|
||||
LOG_D(OPT, "[eNB %d][DLSCH] CC_id %d Frame %d rnti %x with size %d\n",
|
||||
module_idP,
|
||||
CC_id,
|
||||
frameP,
|
||||
UE_RNTI(module_idP,
|
||||
UE_id),
|
||||
TBS);
|
||||
}
|
||||
|
||||
trace_pdu(DIRECTION_DOWNLINK,
|
||||
(uint8_t *) dlsch_pdu->payload[0],
|
||||
TBS,
|
||||
module_idP,
|
||||
WS_C_RNTI,
|
||||
UE_RNTI(module_idP,
|
||||
UE_id),
|
||||
eNB->frame,
|
||||
eNB->subframe,
|
||||
0,
|
||||
0);
|
||||
T(T_ENB_MAC_UE_DL_PDU_WITH_DATA,
|
||||
T_INT(module_idP),
|
||||
T_INT(CC_id),
|
||||
@@ -1482,7 +1472,7 @@ schedule_ue_spec(module_id_t module_idP,
|
||||
tpc = 1; //0
|
||||
}
|
||||
|
||||
LOG_D(MAC, "[eNB %d] DLSCH scheduler: frame %d, subframe %d, harq_pid %d, tpc %d, snr/target snr %d/%d\n",
|
||||
LOG_D(MAC, "[eNB %d] DLSCH scheduler: frame %d, subframe %d, harq_pid %d, tpc %d, snr/target snr %d/%d (normal case)\n",
|
||||
module_idP,
|
||||
frameP,
|
||||
subframeP,
|
||||
@@ -2319,25 +2309,16 @@ schedule_ue_spec_br(module_id_t module_idP,
|
||||
UE_list->DLSCH_pdu[CC_id][0][UE_id].payload[0][offset + sdu_length_total + j] = (char)(taus()&0xff);
|
||||
}
|
||||
|
||||
if (opt_enabled == 1) {
|
||||
trace_pdu(1,
|
||||
(uint8_t *)UE_list->DLSCH_pdu[CC_id][0][UE_id].payload[0],
|
||||
TBS,
|
||||
module_idP,
|
||||
3,
|
||||
UE_RNTI(module_idP,UE_id),
|
||||
mac->frame,
|
||||
mac->subframe,
|
||||
0,
|
||||
0);
|
||||
LOG_D(OPT,"[eNB %d][DLSCH] CC_id %d Frame %d rnti %x with size %d\n",
|
||||
module_idP,
|
||||
CC_id,
|
||||
frameP,
|
||||
UE_RNTI(module_idP, UE_id),
|
||||
TBS);
|
||||
}
|
||||
|
||||
trace_pdu(DIRECTION_DOWNLINK,
|
||||
(uint8_t *)UE_list->DLSCH_pdu[CC_id][0][UE_id].payload[0],
|
||||
TBS,
|
||||
module_idP,
|
||||
3,
|
||||
UE_RNTI(module_idP,UE_id),
|
||||
mac->frame,
|
||||
mac->subframe,
|
||||
0,
|
||||
0);
|
||||
T(T_ENB_MAC_UE_DL_PDU_WITH_DATA,
|
||||
T_INT(module_idP),
|
||||
T_INT(CC_id),
|
||||
@@ -2530,25 +2511,16 @@ schedule_ue_spec_br(module_id_t module_idP,
|
||||
T_INT (subframeP),
|
||||
T_INT (0 /* harq_pid always 0? */ ),
|
||||
T_BUFFER (&mac->UE_list.DLSCH_pdu[CC_id][0][UE_id].payload[0], TX_req->pdu_length));
|
||||
|
||||
if (opt_enabled == 1) {
|
||||
trace_pdu(1,
|
||||
(uint8_t *) mac->UE_list.DLSCH_pdu[CC_id][0][(unsigned char) UE_id].payload[0],
|
||||
TX_req->pdu_length,
|
||||
UE_id,
|
||||
3,
|
||||
rnti,
|
||||
frameP,
|
||||
subframeP,
|
||||
0,
|
||||
0);
|
||||
LOG_D(OPT, "[eNB %d][DLSCH] CC_id %d Frame %d trace pdu for rnti %x with size %d\n",
|
||||
module_idP,
|
||||
CC_id,
|
||||
frameP,
|
||||
rnti,
|
||||
TX_req->pdu_length);
|
||||
}
|
||||
trace_pdu(1,
|
||||
(uint8_t *) mac->UE_list.DLSCH_pdu[CC_id][0][(unsigned char) UE_id].payload[0],
|
||||
TX_req->pdu_length,
|
||||
UE_id,
|
||||
3,
|
||||
rnti,
|
||||
frameP,
|
||||
subframeP,
|
||||
0,
|
||||
0);
|
||||
} // end else if ((subframeP == 7) && (round_DL < 8))
|
||||
} // end loop on UE_id
|
||||
}
|
||||
@@ -3145,25 +3117,16 @@ schedule_PCH(module_id_t module_idP,
|
||||
continue;
|
||||
}
|
||||
|
||||
if (opt_enabled == 1) {
|
||||
trace_pdu(DIRECTION_DOWNLINK,
|
||||
&eNB->common_channels[CC_id].PCCH_pdu.payload[0],
|
||||
pcch_sdu_length,
|
||||
0xffff,
|
||||
PCCH,
|
||||
P_RNTI,
|
||||
eNB->frame,
|
||||
eNB->subframe,
|
||||
0,
|
||||
0);
|
||||
LOG_D(OPT,"[eNB %d][PCH] Frame %d trace pdu for CC_id %d rnti %x with size %d\n",
|
||||
module_idP,
|
||||
frameP,
|
||||
CC_id,
|
||||
0xffff,
|
||||
pcch_sdu_length);
|
||||
}
|
||||
|
||||
trace_pdu(DIRECTION_DOWNLINK,
|
||||
&eNB->common_channels[CC_id].PCCH_pdu.payload[0],
|
||||
pcch_sdu_length,
|
||||
0xffff,
|
||||
PCCH,
|
||||
P_RNTI,
|
||||
eNB->frame,
|
||||
eNB->subframe,
|
||||
0,
|
||||
0);
|
||||
eNB->eNB_stats[CC_id].total_num_pcch_pdu++;
|
||||
eNB->eNB_stats[CC_id].pcch_buffer = pcch_sdu_length;
|
||||
eNB->eNB_stats[CC_id].total_pcch_buffer += pcch_sdu_length;
|
||||
|
||||
@@ -1681,14 +1681,9 @@ schedule_ue_spec_fairRR(module_id_t module_idP,
|
||||
UE_list->DLSCH_pdu[CC_id][0][UE_id].payload[0][offset+sdu_length_total+j] = (char)(taus()&0xff);
|
||||
}
|
||||
|
||||
if (opt_enabled == 1) {
|
||||
trace_pdu(DIRECTION_DOWNLINK, (uint8_t *)UE_list->DLSCH_pdu[CC_id][0][UE_id].payload[0],
|
||||
TBS, module_idP, WS_RA_RNTI, UE_RNTI(module_idP, UE_id),
|
||||
eNB->frame, eNB->subframe,0,0);
|
||||
LOG_D(OPT,"[eNB %d][DLSCH] CC_id %d Frame %d rnti %x with size %d\n",
|
||||
module_idP, CC_id, frameP, UE_RNTI(module_idP, UE_id), TBS);
|
||||
}
|
||||
|
||||
trace_pdu(DIRECTION_DOWNLINK, (uint8_t *)UE_list->DLSCH_pdu[CC_id][0][UE_id].payload[0],
|
||||
TBS, module_idP, WS_RA_RNTI, UE_RNTI(module_idP, UE_id),
|
||||
eNB->frame, eNB->subframe,0,0);
|
||||
T(T_ENB_MAC_UE_DL_PDU_WITH_DATA, T_INT(module_idP), T_INT(CC_id), T_INT(rnti), T_INT(frameP), T_INT(subframeP),
|
||||
T_INT(harq_pid), T_BUFFER(UE_list->DLSCH_pdu[CC_id][0][UE_id].payload[0], TBS));
|
||||
UE_list->UE_template[CC_id][UE_id].nb_rb[harq_pid] = nb_rb;
|
||||
@@ -1974,6 +1969,7 @@ void ulsch_scheduler_pre_ue_select_fairRR(
|
||||
int format_flag;
|
||||
nfapi_hi_dci0_request_body_t *HI_DCI0_req;
|
||||
nfapi_hi_dci0_request_pdu_t *hi_dci0_pdu;
|
||||
int rrc_status;
|
||||
|
||||
for ( CC_id = 0; CC_id < MAX_NUM_CCs; CC_id++ ) {
|
||||
//save ulsch dci number
|
||||
@@ -2069,9 +2065,11 @@ void ulsch_scheduler_pre_ue_select_fairRR(
|
||||
}
|
||||
|
||||
UE_sched_ctl = &UE_list->UE_sched_ctrl[UE_id];
|
||||
rrc_status = mac_eNB_get_rrc_status(module_idP, rnti);
|
||||
|
||||
if ( ((UE_sched_ctl->ul_inactivity_timer>20)&&(UE_sched_ctl->ul_scheduled==0)) ||
|
||||
((UE_sched_ctl->ul_inactivity_timer>10)&&(UE_sched_ctl->ul_scheduled==0)&&(mac_eNB_get_rrc_status(module_idP,UE_RNTI(module_idP,UE_id)) < RRC_CONNECTED))) {
|
||||
((UE_sched_ctl->ul_inactivity_timer>10)&&(UE_sched_ctl->ul_scheduled==0)&&(rrc_status < RRC_CONNECTED)) ||
|
||||
((UE_sched_ctl->cqi_req_timer>300)&&((rrc_status >= RRC_CONNECTED))) ) {
|
||||
first_ue_id[CC_id][ue_first_num[CC_id]]= UE_id;
|
||||
first_ue_total[CC_id] [ue_first_num[CC_id]] = 0;
|
||||
ue_first_num[CC_id]++;
|
||||
@@ -2176,10 +2174,12 @@ void ulsch_scheduler_pre_ue_select_fairRR(
|
||||
int bytes_to_schedule = UE_list->UE_template[CC_id][UE_id].estimated_ul_buffer - UE_list->UE_template[CC_id][UE_id].scheduled_ul_bytes;
|
||||
|
||||
if (bytes_to_schedule < 0) bytes_to_schedule = 0;
|
||||
rrc_status = mac_eNB_get_rrc_status(module_idP, rnti);
|
||||
|
||||
if ( (bytes_to_schedule > 0) || (UE_list->UE_template[CC_id][UE_id].ul_SR > 0) ||
|
||||
((UE_sched_ctl->ul_inactivity_timer>20)&&(UE_sched_ctl->ul_scheduled==0)) ||
|
||||
((UE_sched_ctl->ul_inactivity_timer>10)&&(UE_sched_ctl->ul_scheduled==0)&&(mac_eNB_get_rrc_status(module_idP,UE_RNTI(module_idP,UE_id)) < RRC_CONNECTED)) ) {
|
||||
((UE_sched_ctl->ul_inactivity_timer>10)&&(UE_sched_ctl->ul_scheduled==0)&&(rrc_status < RRC_CONNECTED)) ||
|
||||
((UE_sched_ctl->cqi_req_timer>300)&&((rrc_status >= RRC_CONNECTED))) ) {
|
||||
hi_dci0_pdu = &HI_DCI0_req->hi_dci0_pdu_list[HI_DCI0_req->number_of_dci+HI_DCI0_req->number_of_hi];
|
||||
format_flag = 2;
|
||||
aggregation=get_aggregation(get_bw_index(module_idP,CC_id),UE_list->UE_sched_ctrl[UE_id].dl_cqi[CC_id],format0);
|
||||
@@ -2761,19 +2761,25 @@ void schedule_ulsch_rnti_fairRR(module_id_t module_idP,
|
||||
|
||||
if (status < RRC_CONNECTED)
|
||||
cqi_req = 0;
|
||||
else if (UE_sched_ctrl->cqi_req_timer>30) {
|
||||
else if (UE_sched_ctrl->cqi_received == 1){
|
||||
LOG_D(MAC,"Clearing CQI request timer\n");
|
||||
UE_sched_ctrl->cqi_req_flag = 0;
|
||||
UE_sched_ctrl->cqi_received = 0;
|
||||
UE_sched_ctrl->cqi_req_timer = 0;
|
||||
cqi_req = 0;
|
||||
}else if (UE_sched_ctrl->cqi_req_timer>30) {
|
||||
cqi_req = 1;
|
||||
|
||||
// To be safe , do not ask CQI in special SFs:36.213/7.2.3 CQI definition
|
||||
if (cc->tdd_Config) {
|
||||
switch (cc->tdd_Config->subframeAssignment) {
|
||||
case 1:
|
||||
if( sched_subframeP == 1 || sched_subframeP == 6 ) cqi_req=0;
|
||||
if( subframeP == 1 || subframeP == 6 ) cqi_req=0;
|
||||
|
||||
break;
|
||||
|
||||
case 3:
|
||||
if( sched_subframeP == 1 ) cqi_req=0;
|
||||
if( subframeP == 1 ) cqi_req=0;
|
||||
|
||||
break;
|
||||
|
||||
@@ -2784,7 +2790,6 @@ void schedule_ulsch_rnti_fairRR(module_id_t module_idP,
|
||||
}
|
||||
|
||||
if(cqi_req == 1) {
|
||||
UE_sched_ctrl->cqi_req_timer=0;
|
||||
UE_sched_ctrl->cqi_req_flag |= 1 << sched_subframeP;
|
||||
}
|
||||
} else
|
||||
@@ -2818,7 +2823,7 @@ void schedule_ulsch_rnti_fairRR(module_id_t module_idP,
|
||||
}
|
||||
|
||||
if (tpc!=1) {
|
||||
LOG_D(MAC,"[eNB %d] ULSCH scheduler: frame %d, subframe %d, harq_pid %d, tpc %d, accumulated %d, snr/target snr %d/%d\n",
|
||||
LOG_D(MAC,"[eNB %d] ULSCH schedulerRR: frame %d, subframe %d, harq_pid %d, tpc %d, accumulated %d, snr/target snr %d/%d\n",
|
||||
module_idP,frameP,subframeP,harq_pid,tpc,
|
||||
tpc_accumulated,snr,target_snr);
|
||||
}
|
||||
@@ -2863,6 +2868,7 @@ void schedule_ulsch_rnti_fairRR(module_id_t module_idP,
|
||||
//store for possible retransmission
|
||||
UE_template->nb_rb_ul[harq_pid] = rb_table[rb_table_index];
|
||||
UE_template->first_rb_ul[harq_pid] = first_rb[CC_id];
|
||||
UE_template->cqi_req[harq_pid] = cqi_req;
|
||||
UE_sched_ctrl->ul_scheduled |= (1<<harq_pid);
|
||||
|
||||
if (UE_id == UE_list->head)
|
||||
@@ -3030,6 +3036,7 @@ void schedule_ulsch_rnti_fairRR(module_id_t module_idP,
|
||||
//store for possible retransmission
|
||||
UE_template->nb_rb_ul[harq_pid] = ulsch_ue_select[CC_id].list[ulsch_ue_num].nb_rb;
|
||||
UE_template->first_rb_ul[harq_pid] = ulsch_ue_select[CC_id].list[ulsch_ue_num].start_rb;
|
||||
cqi_req = UE_template->cqi_req[harq_pid];
|
||||
UE_sched_ctrl->ul_scheduled |= (1<<harq_pid);
|
||||
// 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)
|
||||
|
||||
@@ -60,9 +60,7 @@
|
||||
extern RAN_CONTEXT_t RC;
|
||||
|
||||
|
||||
int8_t
|
||||
get_mbsfn_sf_alloction(module_id_t module_idP, uint8_t CC_id,
|
||||
uint8_t mbsfn_sync_area) {
|
||||
int8_t get_mbsfn_sf_alloction(module_id_t module_idP, uint8_t CC_id, uint8_t mbsfn_sync_area) {
|
||||
// currently there is one-to-one mapping between sf allocation pattern and sync area
|
||||
if (mbsfn_sync_area >= MAX_MBSFN_AREA) {
|
||||
LOG_W(MAC,
|
||||
@@ -81,9 +79,8 @@ get_mbsfn_sf_alloction(module_id_t module_idP, uint8_t CC_id,
|
||||
}
|
||||
}
|
||||
|
||||
int
|
||||
schedule_MBMS(module_id_t module_idP, uint8_t CC_id, frame_t frameP,
|
||||
sub_frame_t subframeP) {
|
||||
|
||||
int schedule_MBMS(module_id_t module_idP, uint8_t CC_id, frame_t frameP, sub_frame_t subframeP) {
|
||||
int mcch_flag = 0, mtch_flag = 0, msi_flag = 0;
|
||||
int mbsfn_period = 0; // 1<<(RC.mac[module_idP]->mbsfn_SubframeConfig[0]->radioframeAllocationPeriod);
|
||||
int mcch_period = 0; //32<<(RC.mac[module_idP]->mbsfn_AreaInfo[0]->mcch_Config_r9.mcch_RepetitionPeriod_r9);
|
||||
@@ -734,15 +731,8 @@ schedule_MBMS(module_id_t module_idP, uint8_t CC_id, frame_t frameP,
|
||||
}
|
||||
|
||||
/* Tracing of PDU is done on UE side */
|
||||
if (opt_enabled == 1) {
|
||||
trace_pdu(DIRECTION_DOWNLINK, (uint8_t *) cc->MCH_pdu.payload, TBS, module_idP, WS_M_RNTI, 0xffff, // M_RNTI = 6 in wirehsark
|
||||
RC.mac[module_idP]->frame,
|
||||
RC.mac[module_idP]->subframe, 0, 0);
|
||||
LOG_D(OPT,
|
||||
"[eNB %d][MCH] CC_id %d Frame %d : MAC PDU with size %d\n",
|
||||
module_idP, CC_id, frameP, TBS);
|
||||
}
|
||||
|
||||
trace_pdu(DIRECTION_DOWNLINK, (uint8_t *) cc->MCH_pdu.payload, TBS, module_idP, WS_M_RNTI, 0xffff, // M_RNTI = 6 in wireshark
|
||||
RC.mac[module_idP]->frame, RC.mac[module_idP]->subframe, 0, 0);
|
||||
/*
|
||||
for (j=0;j<sdu_length_total;j++)
|
||||
printf("%2x.",RC.mac[module_idP]->MCH_pdu.payload[j+offset]);
|
||||
@@ -771,8 +761,8 @@ schedule_MBMS(module_id_t module_idP, uint8_t CC_id, frame_t frameP,
|
||||
*/
|
||||
}
|
||||
|
||||
MCH_PDU *get_mch_sdu(module_id_t module_idP, int CC_id, frame_t frameP,
|
||||
sub_frame_t subframeP) {
|
||||
|
||||
MCH_PDU *get_mch_sdu(module_id_t module_idP, int CC_id, frame_t frameP, sub_frame_t subframeP) {
|
||||
// RC.mac[module_idP]->MCH_pdu.mcs=0;
|
||||
//LOG_D(MAC," MCH_pdu.mcs is %d\n", RC.mac[module_idP]->MCH_pdu.mcs);
|
||||
//#warning "MCH pdu should take the CC_id index"
|
||||
|
||||
@@ -2495,6 +2495,7 @@ UE_is_to_be_scheduled(module_id_t module_idP,
|
||||
{
|
||||
UE_TEMPLATE *UE_template = &RC.mac[module_idP]->UE_list.UE_template[CC_id][UE_id];
|
||||
UE_sched_ctrl_t *UE_sched_ctl = &RC.mac[module_idP]->UE_list.UE_sched_ctrl[UE_id];
|
||||
int rrc_status;
|
||||
|
||||
// do not schedule UE if UL is not working
|
||||
if (UE_sched_ctl->ul_failure_timer > 0 || UE_sched_ctl->ul_out_of_sync > 0)
|
||||
@@ -2506,13 +2507,14 @@ UE_is_to_be_scheduled(module_id_t module_idP,
|
||||
UE_id,
|
||||
ue_rnti);
|
||||
|
||||
rrc_status = mac_eNB_get_rrc_status(module_idP, ue_rnti);
|
||||
|
||||
if (UE_template->scheduled_ul_bytes < UE_template->estimated_ul_buffer ||
|
||||
UE_template->ul_SR > 0 || // uplink scheduling request
|
||||
(UE_sched_ctl->ul_inactivity_timer > 19 && UE_sched_ctl->ul_scheduled == 0) || // every 2 frames when RRC_CONNECTED
|
||||
(UE_sched_ctl->ul_inactivity_timer > 10 &&
|
||||
UE_sched_ctl->ul_scheduled == 0 &&
|
||||
mac_eNB_get_rrc_status(module_idP,
|
||||
ue_rnti) < RRC_CONNECTED)) { // every Frame when not RRC_CONNECTED
|
||||
UE_sched_ctl->ul_scheduled == 0 && rrc_status < RRC_CONNECTED) || // every Frame when not RRC_CONNECTED
|
||||
(UE_sched_ctl->cqi_req_timer > 300 && rrc_status >= RRC_CONNECTED)) { // cqi req timer expired long ago (do not put too low value)
|
||||
LOG_D(MAC, "[eNB %d][PUSCH] UE %d/%x should be scheduled (BSR0 estimated size %d, SR %d)\n",
|
||||
module_idP,
|
||||
UE_id,
|
||||
|
||||
@@ -85,11 +85,10 @@ uint8_t rb_table[34] = {
|
||||
};
|
||||
|
||||
// This table hold the possible number of MTC repetition for CE ModeA
|
||||
const uint8_t pusch_repetition_Table8_2_36213[3][4]=
|
||||
{
|
||||
{1 , 2 , 4 , 8 },
|
||||
{1 , 4 , 8 , 16},
|
||||
{1 , 4 , 16, 32}
|
||||
const uint8_t pusch_repetition_Table8_2_36213[3][4]= {
|
||||
{1, 2, 4, 8 },
|
||||
{1, 4, 8, 16},
|
||||
{1, 4, 16, 32}
|
||||
};
|
||||
|
||||
extern mui_t rrc_eNB_mui;
|
||||
@@ -142,15 +141,7 @@ rx_sdu(const module_id_t enb_mod_idP,
|
||||
memset(rx_lengths, 0, NB_RB_MAX * sizeof(unsigned short));
|
||||
start_meas(&mac->rx_ulsch_sdu);
|
||||
VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME(VCD_SIGNAL_DUMPER_FUNCTIONS_RX_SDU, 1);
|
||||
|
||||
if (opt_enabled == 1) {
|
||||
trace_pdu(DIRECTION_UPLINK, sduP, sdu_lenP, 0, WS_C_RNTI, current_rnti, frameP, subframeP, 0, 0);
|
||||
LOG_D(OPT, "[eNB %d][ULSCH] Frame %d rnti %x with size %d\n",
|
||||
enb_mod_idP,
|
||||
frameP,
|
||||
current_rnti,
|
||||
sdu_lenP);
|
||||
}
|
||||
trace_pdu(DIRECTION_UPLINK, sduP, sdu_lenP, 0, WS_C_RNTI, current_rnti, frameP, subframeP, 0, 0);
|
||||
|
||||
if (UE_id != -1) {
|
||||
UE_scheduling_control = &(UE_list->UE_sched_ctrl[UE_id]);
|
||||
@@ -301,22 +292,20 @@ rx_sdu(const module_id_t enb_mod_idP,
|
||||
if (ra->msg3_round >= mac->common_channels[CC_idP].radioResourceConfigCommon->rach_ConfigCommon.maxHARQ_Msg3Tx - 1) {
|
||||
cancel_ra_proc(enb_mod_idP, CC_idP, frameP, current_rnti);
|
||||
} else {
|
||||
if (ra->rach_resource_type > 0) {
|
||||
cancel_ra_proc(enb_mod_idP, CC_idP, frameP, current_rnti); // TODO: Currently we don't support retransmission of Msg3 ( If in error Cancel RA procedure and reattach)
|
||||
}
|
||||
else
|
||||
{
|
||||
// first_rb = UE_template_ptr->first_rb_ul[harq_pid]; // UE_id = -1 !!!!
|
||||
ra->msg3_round++;
|
||||
/* Prepare handling of retransmission */
|
||||
get_Msg3allocret(&mac->common_channels[CC_idP],
|
||||
ra->Msg3_subframe,
|
||||
ra->Msg3_frame,
|
||||
&ra->Msg3_frame,
|
||||
&ra->Msg3_subframe);
|
||||
// prepare handling of retransmission
|
||||
add_msg3(enb_mod_idP, CC_idP, ra, frameP, subframeP);
|
||||
}
|
||||
if (ra->rach_resource_type > 0) {
|
||||
cancel_ra_proc(enb_mod_idP, CC_idP, frameP, current_rnti); // TODO: Currently we don't support retransmission of Msg3 ( If in error Cancel RA procedure and reattach)
|
||||
} else {
|
||||
// first_rb = UE_template_ptr->first_rb_ul[harq_pid]; // UE_id = -1 !!!!
|
||||
ra->msg3_round++;
|
||||
/* Prepare handling of retransmission */
|
||||
get_Msg3allocret(&mac->common_channels[CC_idP],
|
||||
ra->Msg3_subframe,
|
||||
ra->Msg3_frame,
|
||||
&ra->Msg3_frame,
|
||||
&ra->Msg3_subframe);
|
||||
// prepare handling of retransmission
|
||||
add_msg3(enb_mod_idP, CC_idP, ra, frameP, subframeP);
|
||||
}
|
||||
}
|
||||
|
||||
/* TODO: program NACK for PHICH? */
|
||||
@@ -466,13 +455,15 @@ rx_sdu(const module_id_t enb_mod_idP,
|
||||
RA_t *ra = &(mac->common_channels[CC_idP].ra[RA_id]);
|
||||
int8_t ret = mac_rrc_data_ind(enb_mod_idP,
|
||||
CC_idP,
|
||||
frameP, subframeP,
|
||||
frameP,
|
||||
subframeP,
|
||||
UE_id,
|
||||
old_rnti,
|
||||
DCCH,
|
||||
(uint8_t *) payload_ptr,
|
||||
rx_lengths[i],
|
||||
0,ra->rach_resource_type > 0
|
||||
0,
|
||||
ra->rach_resource_type > 0
|
||||
);
|
||||
|
||||
/* Received a new rnti */
|
||||
@@ -1944,8 +1935,8 @@ void schedule_ulsch_rnti_emtc(module_id_t module_idP,
|
||||
UE_list_t *UE_list = &(eNB->UE_list);
|
||||
UE_TEMPLATE *UE_template = NULL;
|
||||
UE_sched_ctrl_t *UE_sched_ctrl = NULL;
|
||||
uint8_t Total_Num_Rep_ULSCH,pusch_maxNumRepetitionCEmodeA_r13;
|
||||
uint8_t UL_Scheduling_DCI_SF,UL_Scheduling_DCI_Frame_Even_Odd_Flag; //TODO: To be removed after scheduler relaxation Task
|
||||
uint8_t Total_Num_Rep_ULSCH,pusch_maxNumRepetitionCEmodeA_r13;
|
||||
uint8_t UL_Scheduling_DCI_SF,UL_Scheduling_DCI_Frame_Even_Odd_Flag; //TODO: To be removed after scheduler relaxation Task
|
||||
|
||||
if (sched_subframeP < subframeP) {
|
||||
sched_frame++;
|
||||
@@ -2013,366 +2004,361 @@ void schedule_ulsch_rnti_emtc(module_id_t module_idP,
|
||||
N_RB_UL);
|
||||
RC.eNB[module_idP][CC_id]->pusch_stats_BO[UE_id][(frameP*10)+subframeP] = UE_template->estimated_ul_buffer;
|
||||
VCD_SIGNAL_DUMPER_DUMP_VARIABLE_BY_NAME(VCD_SIGNAL_DUMPER_VARIABLES_UE0_BO, UE_template->estimated_ul_buffer);
|
||||
|
||||
pusch_maxNumRepetitionCEmodeA_r13= *(rrc->configuration.pusch_maxNumRepetitionCEmodeA_r13[CC_id]);
|
||||
Total_Num_Rep_ULSCH = pusch_repetition_Table8_2_36213[pusch_maxNumRepetitionCEmodeA_r13][UE_template->pusch_repetition_levels];
|
||||
UL_Scheduling_DCI_SF = (40-4 - Total_Num_Rep_ULSCH)%10; //TODO: [eMTC Scheduler] To be removed after scheduler relaxation task
|
||||
UL_Scheduling_DCI_Frame_Even_Odd_Flag= ! (((40-4 - Total_Num_Rep_ULSCH)/10 )%2); //TODO: [eMTC Scheduler] To be removed after scheduler relaxation task
|
||||
UL_Scheduling_DCI_SF = (40-4 - Total_Num_Rep_ULSCH)%10; //TODO: [eMTC Scheduler] To be removed after scheduler relaxation task
|
||||
UL_Scheduling_DCI_Frame_Even_Odd_Flag= ! (((40-4 - Total_Num_Rep_ULSCH)/10 )%2); //TODO: [eMTC Scheduler] To be removed after scheduler relaxation task
|
||||
|
||||
/* If frameP odd don't schedule */
|
||||
if ((frameP&1) == UL_Scheduling_DCI_Frame_Even_Odd_Flag) //TODO: [eMTC Scheduler] To be removed after scheduler relaxation task
|
||||
{
|
||||
if ((frameP&1) == UL_Scheduling_DCI_Frame_Even_Odd_Flag) { //TODO: [eMTC Scheduler] To be removed after scheduler relaxation task
|
||||
//if ((UE_is_to_be_scheduled(module_idP, CC_id, UE_id) > 0) && (subframeP == 5)) {
|
||||
if ((UE_template->ul_SR > 0 || round_UL > 0 || status < RRC_CONNECTED) && (subframeP == UL_Scheduling_DCI_SF)) {
|
||||
/*
|
||||
* if there is information on bsr of DCCH, DTCH,
|
||||
* or if there is UL_SR,
|
||||
* or if there is a packet to retransmit,
|
||||
* or we want to schedule a periodic feedback every frame
|
||||
*/
|
||||
LOG_D(MAC,"[eNB %d][PUSCH %d] Frame %d subframe %d Scheduling UE %d/%x in round_UL %d(SR %d,UL_inactivity timer %d,UL_failure timer %d,cqi_req_timer %d)\n",
|
||||
module_idP,
|
||||
harq_pid,
|
||||
frameP,
|
||||
subframeP,
|
||||
UE_id,
|
||||
rnti,
|
||||
round_UL,
|
||||
UE_template->ul_SR,
|
||||
UE_sched_ctrl->ul_inactivity_timer,
|
||||
UE_sched_ctrl->ul_failure_timer,
|
||||
UE_sched_ctrl->cqi_req_timer);
|
||||
/* Reset the scheduling request */
|
||||
emtc_active[CC_id] = 1;
|
||||
UE_template->ul_SR = 0;
|
||||
status = mac_eNB_get_rrc_status(module_idP,rnti);
|
||||
cqi_req = 0;
|
||||
/* Power control: compute the expected ULSCH RX snr (for the stats) */
|
||||
/* This is the normalized snr and this should be constant (regardless of mcs) */
|
||||
snr = (5 * UE_sched_ctrl->pusch_snr[CC_id] - 640) / 10;
|
||||
target_snr = eNB->puSch10xSnr / 10; /* TODO: target_rx_power was 178, what to put? */
|
||||
/* This assumes accumulated tpc */
|
||||
/* Make sure that we are only sending a tpc update once a frame, otherwise the control loop will freak out */
|
||||
int32_t framex10psubframe = UE_template->pusch_tpc_tx_frame * 10 + UE_template->pusch_tpc_tx_subframe;
|
||||
|
||||
if (((framex10psubframe + 10) <= (frameP * 10 + subframeP)) || // normal case
|
||||
((framex10psubframe > (frameP * 10 + subframeP)) && (((10240 - framex10psubframe + frameP * 10 + subframeP) >= 10)))) { // frame wrap-around
|
||||
UE_template->pusch_tpc_tx_frame = frameP;
|
||||
UE_template->pusch_tpc_tx_subframe = subframeP;
|
||||
|
||||
//if ((UE_is_to_be_scheduled(module_idP, CC_id, UE_id) > 0) && (subframeP == 5)) {
|
||||
if ((UE_template->ul_SR > 0 || round_UL > 0 || status < RRC_CONNECTED) && (subframeP == UL_Scheduling_DCI_SF)) {
|
||||
/*
|
||||
* if there is information on bsr of DCCH, DTCH,
|
||||
* or if there is UL_SR,
|
||||
* or if there is a packet to retransmit,
|
||||
* or we want to schedule a periodic feedback every frame
|
||||
*/
|
||||
LOG_D(MAC,"[eNB %d][PUSCH %d] Frame %d subframe %d Scheduling UE %d/%x in round_UL %d(SR %d,UL_inactivity timer %d,UL_failure timer %d,cqi_req_timer %d)\n",
|
||||
module_idP,
|
||||
harq_pid,
|
||||
frameP,
|
||||
subframeP,
|
||||
UE_id,
|
||||
rnti,
|
||||
round_UL,
|
||||
UE_template->ul_SR,
|
||||
UE_sched_ctrl->ul_inactivity_timer,
|
||||
UE_sched_ctrl->ul_failure_timer,
|
||||
UE_sched_ctrl->cqi_req_timer);
|
||||
/* Reset the scheduling request */
|
||||
emtc_active[CC_id] = 1;
|
||||
UE_template->ul_SR = 0;
|
||||
status = mac_eNB_get_rrc_status(module_idP,rnti);
|
||||
cqi_req = 0;
|
||||
/* Power control: compute the expected ULSCH RX snr (for the stats) */
|
||||
/* This is the normalized snr and this should be constant (regardless of mcs) */
|
||||
snr = (5 * UE_sched_ctrl->pusch_snr[CC_id] - 640) / 10;
|
||||
target_snr = eNB->puSch10xSnr / 10; /* TODO: target_rx_power was 178, what to put? */
|
||||
/* This assumes accumulated tpc */
|
||||
/* Make sure that we are only sending a tpc update once a frame, otherwise the control loop will freak out */
|
||||
int32_t framex10psubframe = UE_template->pusch_tpc_tx_frame * 10 + UE_template->pusch_tpc_tx_subframe;
|
||||
|
||||
if (((framex10psubframe + 10) <= (frameP * 10 + subframeP)) || // normal case
|
||||
((framex10psubframe > (frameP * 10 + subframeP)) && (((10240 - framex10psubframe + frameP * 10 + subframeP) >= 10)))) { // frame wrap-around
|
||||
UE_template->pusch_tpc_tx_frame = frameP;
|
||||
UE_template->pusch_tpc_tx_subframe = subframeP;
|
||||
|
||||
if (snr > target_snr + 4) {
|
||||
tpc = 0; //-1
|
||||
UE_sched_ctrl->tpc_accumulated[CC_id]--;
|
||||
} else if (snr < target_snr - 4) {
|
||||
tpc = 2; //+1
|
||||
UE_sched_ctrl->tpc_accumulated[CC_id]++;
|
||||
if (snr > target_snr + 4) {
|
||||
tpc = 0; //-1
|
||||
UE_sched_ctrl->tpc_accumulated[CC_id]--;
|
||||
} else if (snr < target_snr - 4) {
|
||||
tpc = 2; //+1
|
||||
UE_sched_ctrl->tpc_accumulated[CC_id]++;
|
||||
} else {
|
||||
tpc = 1; //0
|
||||
}
|
||||
} else {
|
||||
tpc = 1; //0
|
||||
}
|
||||
} else {
|
||||
tpc = 1; //0
|
||||
}
|
||||
|
||||
if (tpc != 1) {
|
||||
LOG_D(MAC,"[eNB %d] ULSCH scheduler: frame %d, subframe %d, harq_pid %d, tpc %d, accumulated %d, snr/target snr %d/%d\n",
|
||||
module_idP,
|
||||
frameP,
|
||||
subframeP,
|
||||
harq_pid,
|
||||
tpc,
|
||||
UE_sched_ctrl->tpc_accumulated[CC_id],
|
||||
snr,
|
||||
target_snr);
|
||||
}
|
||||
|
||||
/* New transmission */
|
||||
if (round_UL == 0) {
|
||||
ndi = 1 - UE_template->oldNDI_UL[harq_pid];
|
||||
UE_template->oldNDI_UL[harq_pid] = ndi;
|
||||
UE_template->mcs_UL[harq_pid] = 4;
|
||||
UE_template->TBS_UL[harq_pid] = get_TBS_UL(UE_template->mcs_UL[harq_pid], 6);
|
||||
UE_list->eNB_UE_stats[CC_id][UE_id].snr = snr;
|
||||
UE_list->eNB_UE_stats[CC_id][UE_id].target_snr = target_snr;
|
||||
UE_list->eNB_UE_stats[CC_id][UE_id].ulsch_mcs1 = 4;
|
||||
UE_list->eNB_UE_stats[CC_id][UE_id].ulsch_mcs2 = UE_template->mcs_UL[harq_pid];
|
||||
UE_list->eNB_UE_stats[CC_id][UE_id].total_rbs_used_rx += 6;
|
||||
UE_list->eNB_UE_stats[CC_id][UE_id].ulsch_TBS = UE_template->TBS_UL[harq_pid];
|
||||
T(T_ENB_MAC_UE_UL_SCHEDULE,
|
||||
T_INT(module_idP),
|
||||
T_INT(CC_id),
|
||||
T_INT(rnti),
|
||||
T_INT(frameP),
|
||||
T_INT(subframeP),
|
||||
T_INT(harq_pid),
|
||||
T_INT(UE_template->mcs_UL[harq_pid]),
|
||||
T_INT(0),
|
||||
T_INT(6),
|
||||
T_INT(UE_template->TBS_UL[harq_pid]),
|
||||
T_INT(ndi));
|
||||
/* Store for possible retransmission */
|
||||
UE_template->nb_rb_ul[harq_pid] = 6;
|
||||
UE_sched_ctrl->ul_scheduled |= (1 << harq_pid);
|
||||
|
||||
if (UE_id == UE_list->head) {
|
||||
VCD_SIGNAL_DUMPER_DUMP_VARIABLE_BY_NAME(VCD_SIGNAL_DUMPER_VARIABLES_UE0_SCHEDULED, UE_sched_ctrl->ul_scheduled);
|
||||
if (tpc != 1) {
|
||||
LOG_D(MAC,"[eNB %d] ULSCH scheduler: frame %d, subframe %d, harq_pid %d, tpc %d, accumulated %d, snr/target snr %d/%d\n",
|
||||
module_idP,
|
||||
frameP,
|
||||
subframeP,
|
||||
harq_pid,
|
||||
tpc,
|
||||
UE_sched_ctrl->tpc_accumulated[CC_id],
|
||||
snr,
|
||||
target_snr);
|
||||
}
|
||||
|
||||
/* Adjust total UL buffer status by TBS, wait for UL sdus to do final update */
|
||||
UE_template->scheduled_ul_bytes += UE_template->TBS_UL[harq_pid];
|
||||
LOG_D(MAC, "scheduled_ul_bytes, new %d\n", UE_template->scheduled_ul_bytes);
|
||||
/* Cyclic shift for DMRS */
|
||||
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 */
|
||||
UE_template->cshift[harq_pid] = cshift;
|
||||
AssertFatal (UE_template->physicalConfigDedicated != NULL, "UE_template->physicalConfigDedicated is null\n");
|
||||
AssertFatal (UE_template->physicalConfigDedicated->ext4 != NULL, "UE_template->physicalConfigDedicated->ext4 is null\n");
|
||||
AssertFatal (UE_template->physicalConfigDedicated->ext4->epdcch_Config_r11 != NULL, "UE_template->physicalConfigDedicated->ext4->epdcch_Config_r11 is null\n");
|
||||
AssertFatal (UE_template->physicalConfigDedicated->ext4->epdcch_Config_r11->config_r11.present == LTE_EPDCCH_Config_r11__config_r11_PR_setup,
|
||||
"UE_template->physicalConfigDedicated->ext4->epdcch_Config_r11->config_r11.present != setup\n");
|
||||
AssertFatal (UE_template->physicalConfigDedicated->ext4->epdcch_Config_r11->config_r11.choice.setup.setConfigToAddModList_r11 != NULL,
|
||||
"UE_template->physicalConfigDedicated->ext4->epdcch_Config_r11->config_r11.choice.setup.setConfigToAddModList_r11 = NULL\n");
|
||||
LTE_EPDCCH_SetConfig_r11_t *epdcch_setconfig_r11 = UE_template->physicalConfigDedicated->ext4->epdcch_Config_r11->config_r11.choice.setup.setConfigToAddModList_r11->list.array[0];
|
||||
AssertFatal(epdcch_setconfig_r11 != NULL, "epdcch_setconfig_r11 is null\n");
|
||||
AssertFatal(epdcch_setconfig_r11->ext2 != NULL, "epdcch_setconfig_r11->ext2 is null\n");
|
||||
AssertFatal(epdcch_setconfig_r11->ext2->mpdcch_config_r13 != NULL, "epdcch_setconfig_r11->ext2->mpdcch_config_r13 is null");
|
||||
AssertFatal(epdcch_setconfig_r11->ext2->mpdcch_config_r13->present == LTE_EPDCCH_SetConfig_r11__ext2__mpdcch_config_r13_PR_setup,
|
||||
"epdcch_setconfig_r11->ext2->mpdcch_config_r13->present is not setup\n");
|
||||
AssertFatal(epdcch_setconfig_r11->ext2->numberPRB_Pairs_v1310 != NULL, "epdcch_setconfig_r11->ext2->numberPRB_Pairs_v1310 is null");
|
||||
AssertFatal(epdcch_setconfig_r11->ext2->numberPRB_Pairs_v1310->present == LTE_EPDCCH_SetConfig_r11__ext2__numberPRB_Pairs_v1310_PR_setup,
|
||||
"epdcch_setconfig_r11->ext2->numberPRB_Pairs_v1310->present is not setup\n");
|
||||
LOG_D(MAC,"[PUSCH %d] Frame %d, Subframe %d: Adding UL 6-0A MPDCCH for BL/CE UE %d/%x, ulsch_frame %d, ulsch_subframe %d, UESS MPDCCH Narrowband %d\n",
|
||||
harq_pid,
|
||||
frameP,
|
||||
subframeP,
|
||||
UE_id,
|
||||
rnti,
|
||||
sched_frame,
|
||||
sched_subframeP,
|
||||
(int)epdcch_setconfig_r11->ext2->mpdcch_config_r13->choice.setup.mpdcch_Narrowband_r13 - 1);
|
||||
UE_template->first_rb_ul[harq_pid] = narrowband_to_first_rb (cc, epdcch_setconfig_r11->ext2->mpdcch_config_r13->choice.setup.mpdcch_Narrowband_r13 - 1);
|
||||
hi_dci0_pdu = &(hi_dci0_req->hi_dci0_pdu_list[hi_dci0_req->number_of_dci + hi_dci0_req->number_of_hi]);
|
||||
memset((void *) hi_dci0_pdu, 0, sizeof(nfapi_hi_dci0_request_pdu_t));
|
||||
hi_dci0_pdu->pdu_type = NFAPI_HI_DCI0_MPDCCH_DCI_PDU_TYPE;
|
||||
hi_dci0_pdu->pdu_size = (uint8_t) (2 + sizeof (nfapi_dl_config_mpdcch_pdu));
|
||||
hi_dci0_pdu->mpdcch_dci_pdu.mpdcch_dci_pdu_rel13.dci_format = (UE_template->rach_resource_type > 1) ? 5 : 4;
|
||||
hi_dci0_pdu->mpdcch_dci_pdu.mpdcch_dci_pdu_rel13.ce_mode = (UE_template->rach_resource_type > 1) ? 2 : 1;
|
||||
hi_dci0_pdu->mpdcch_dci_pdu.mpdcch_dci_pdu_rel13.mpdcch_narrowband = epdcch_setconfig_r11->ext2->mpdcch_config_r13->choice.setup.mpdcch_Narrowband_r13 - 1;
|
||||
hi_dci0_pdu->mpdcch_dci_pdu.mpdcch_dci_pdu_rel13.number_of_prb_pairs = 6; // checked above that it has to be this
|
||||
hi_dci0_pdu->mpdcch_dci_pdu.mpdcch_dci_pdu_rel13.resource_block_assignment = 0; // Note: this can be dynamic
|
||||
hi_dci0_pdu->mpdcch_dci_pdu.mpdcch_dci_pdu_rel13.mpdcch_transmission_type = epdcch_setconfig_r11->transmissionType_r11; // distibuted
|
||||
AssertFatal(UE_template->physicalConfigDedicated->ext4->epdcch_Config_r11->config_r11.choice.setup.startSymbol_r11 != NULL,
|
||||
"UE_template->physicalConfigDedicated->ext4->epdcch_Config_r11->config_r11.choice.setup.startSymbol_r11 is null\n");
|
||||
hi_dci0_pdu->mpdcch_dci_pdu.mpdcch_dci_pdu_rel13.start_symbol = *UE_template->physicalConfigDedicated->ext4->epdcch_Config_r11->config_r11.choice.setup.startSymbol_r11;
|
||||
hi_dci0_pdu->mpdcch_dci_pdu.mpdcch_dci_pdu_rel13.ecce_index = 0; // Note: this should be dynamic
|
||||
hi_dci0_pdu->mpdcch_dci_pdu.mpdcch_dci_pdu_rel13.aggreagation_level = 24; // OK for CEModeA r1-3 (9.1.5-1b) or CEModeB r1-4
|
||||
hi_dci0_pdu->mpdcch_dci_pdu.mpdcch_dci_pdu_rel13.rnti_type = 4; // other
|
||||
hi_dci0_pdu->mpdcch_dci_pdu.mpdcch_dci_pdu_rel13.rnti = rnti;
|
||||
hi_dci0_pdu->mpdcch_dci_pdu.mpdcch_dci_pdu_rel13.ce_mode = (UE_template->rach_resource_type < 3) ? 1 : 2; // already set above...
|
||||
hi_dci0_pdu->mpdcch_dci_pdu.mpdcch_dci_pdu_rel13.drms_scrambling_init = epdcch_setconfig_r11->dmrs_ScramblingSequenceInt_r11;
|
||||
hi_dci0_pdu->mpdcch_dci_pdu.mpdcch_dci_pdu_rel13.initial_transmission_sf_io = (frameP * 10) + subframeP;
|
||||
hi_dci0_pdu->mpdcch_dci_pdu.mpdcch_dci_pdu_rel13.transmission_power = 6000; // 0dB
|
||||
hi_dci0_pdu->mpdcch_dci_pdu.mpdcch_dci_pdu_rel13.resource_block_start = UE_template->first_rb_ul[harq_pid];
|
||||
hi_dci0_pdu->mpdcch_dci_pdu.mpdcch_dci_pdu_rel13.number_of_resource_blocks = 6;
|
||||
hi_dci0_pdu->mpdcch_dci_pdu.mpdcch_dci_pdu_rel13.mcs = 4; // adjust according to size of RAR, 208 bits with N1A_PRB = 3
|
||||
hi_dci0_pdu->mpdcch_dci_pdu.mpdcch_dci_pdu_rel13.pusch_repetition_levels = UE_template->pusch_repetition_levels;
|
||||
AssertFatal(epdcch_setconfig_r11->ext2->mpdcch_config_r13->choice.setup.mpdcch_pdsch_HoppingConfig_r13 == LTE_EPDCCH_SetConfig_r11__ext2__mpdcch_config_r13__setup__mpdcch_pdsch_HoppingConfig_r13_off,
|
||||
"epdcch_setconfig_r11->ext2->mpdcch_config_r13->mpdcch_pdsch_HoppingConfig_r13 is not off\n");
|
||||
hi_dci0_pdu->mpdcch_dci_pdu.mpdcch_dci_pdu_rel13.frequency_hopping_flag = 1 - epdcch_setconfig_r11->ext2->mpdcch_config_r13->choice.setup.mpdcch_pdsch_HoppingConfig_r13;
|
||||
hi_dci0_pdu->mpdcch_dci_pdu.mpdcch_dci_pdu_rel13.redudency_version = 0;
|
||||
hi_dci0_pdu->mpdcch_dci_pdu.mpdcch_dci_pdu_rel13.new_data_indication = UE_template->oldNDI_UL[harq_pid];
|
||||
hi_dci0_pdu->mpdcch_dci_pdu.mpdcch_dci_pdu_rel13.harq_process = 0;
|
||||
hi_dci0_pdu->mpdcch_dci_pdu.mpdcch_dci_pdu_rel13.tpc = tpc;
|
||||
hi_dci0_pdu->mpdcch_dci_pdu.mpdcch_dci_pdu_rel13.csi_request = cqi_req;
|
||||
hi_dci0_pdu->mpdcch_dci_pdu.mpdcch_dci_pdu_rel13.ul_inex = 0;
|
||||
hi_dci0_pdu->mpdcch_dci_pdu.mpdcch_dci_pdu_rel13.dai_presence_flag = 0;
|
||||
hi_dci0_pdu->mpdcch_dci_pdu.mpdcch_dci_pdu_rel13.dl_assignment_index = 0;
|
||||
hi_dci0_pdu->mpdcch_dci_pdu.mpdcch_dci_pdu_rel13.srs_request = 0;
|
||||
hi_dci0_pdu->mpdcch_dci_pdu.mpdcch_dci_pdu_rel13.dci_subframe_repetition_number = 0;
|
||||
hi_dci0_pdu->mpdcch_dci_pdu.mpdcch_dci_pdu_rel13.tcp_bitmap = 0;
|
||||
hi_dci0_pdu->mpdcch_dci_pdu.mpdcch_dci_pdu_rel13.total_dci_length_include_padding = 29; // hard-coded for 10 MHz
|
||||
hi_dci0_pdu->mpdcch_dci_pdu.mpdcch_dci_pdu_rel13.number_of_tx_antenna_ports = 1;
|
||||
hi_dci0_req->number_of_dci++;
|
||||
LOG_D(MAC,"[PUSCH %d] Frame %d, Subframe %d: Adding UL CONFIG. Request for BL/CE UE %d/%x, ulsch_frame %d, ulsch_subframe %d, UESS mpdcch narrowband %d\n",
|
||||
harq_pid,
|
||||
frameP,
|
||||
subframeP,
|
||||
UE_id,
|
||||
rnti,
|
||||
sched_frame,
|
||||
sched_subframeP,
|
||||
(int)epdcch_setconfig_r11->ext2->mpdcch_config_r13->choice.setup.mpdcch_Narrowband_r13 - 1);
|
||||
fill_nfapi_ulsch_config_request_rel8(&ul_req_tmp->ul_config_pdu_list[ul_req_tmp->number_of_pdus],
|
||||
cqi_req,
|
||||
cc,
|
||||
UE_template->physicalConfigDedicated,
|
||||
get_tmode(module_idP,CC_id,UE_id),
|
||||
eNB->ul_handle,
|
||||
rnti,
|
||||
UE_template->first_rb_ul[harq_pid], // resource_block_start
|
||||
UE_template->nb_rb_ul[harq_pid], // number_of_resource_blocks
|
||||
UE_template->mcs_UL[harq_pid],
|
||||
cshift, // cyclic_shift_2_for_drms
|
||||
0, // frequency_hopping_enabled_flag
|
||||
0, // frequency_hopping_bits
|
||||
UE_template->oldNDI_UL[harq_pid], // new_data_indication
|
||||
rvidx_tab[round_UL&3], // redundancy_version
|
||||
harq_pid, // harq_process_number
|
||||
0, // ul_tx_mode
|
||||
0, // current_tx_nb
|
||||
0, // n_srs
|
||||
UE_template->TBS_UL[harq_pid]
|
||||
);
|
||||
fill_nfapi_ulsch_config_request_emtc(&ul_req_tmp->ul_config_pdu_list[ul_req_tmp->number_of_pdus],
|
||||
UE_template->rach_resource_type > 2 ? 2 : 1,
|
||||
Total_Num_Rep_ULSCH, // total_number_of_repetitions
|
||||
1, // repetition_number
|
||||
(frameP * 10) + subframeP);
|
||||
ul_req_tmp->number_of_pdus++;
|
||||
eNB->ul_handle++;
|
||||
add_ue_ulsch_info(module_idP,
|
||||
CC_id,
|
||||
UE_id,
|
||||
subframeP,
|
||||
S_UL_SCHEDULED);
|
||||
LOG_D(MAC,"[eNB %d] CC_id %d Frame %d, subframeP %d: Generated ULSCH DCI for next UE_id %d, format 0\n",
|
||||
module_idP,
|
||||
CC_id,
|
||||
frameP,
|
||||
subframeP,
|
||||
UE_id);
|
||||
} else { // round_UL > 0 => retransmission
|
||||
/* In LTE-M the UL HARQ process is asynchronous */
|
||||
T(T_ENB_MAC_UE_UL_SCHEDULE_RETRANSMISSION,
|
||||
T_INT(module_idP),
|
||||
T_INT(CC_id),
|
||||
T_INT(rnti),
|
||||
T_INT(frameP),
|
||||
T_INT(subframeP),
|
||||
T_INT(harq_pid),
|
||||
T_INT(UE_template->mcs_UL[harq_pid]),
|
||||
T_INT(0),
|
||||
T_INT(6),
|
||||
T_INT(round_UL));
|
||||
AssertFatal (UE_template->physicalConfigDedicated != NULL, "UE_template->physicalConfigDedicated is null\n");
|
||||
AssertFatal (UE_template->physicalConfigDedicated->ext4 != NULL, "UE_template->physicalConfigDedicated->ext4 is null\n");
|
||||
AssertFatal (UE_template->physicalConfigDedicated->ext4->epdcch_Config_r11 != NULL, "UE_template->physicalConfigDedicated->ext4->epdcch_Config_r11 is null\n");
|
||||
AssertFatal (UE_template->physicalConfigDedicated->ext4->epdcch_Config_r11->config_r11.present == LTE_EPDCCH_Config_r11__config_r11_PR_setup,
|
||||
"UE_template->physicalConfigDedicated->ext4->epdcch_Config_r11->config_r11.present != setup\n");
|
||||
AssertFatal (UE_template->physicalConfigDedicated->ext4->epdcch_Config_r11->config_r11.choice.setup.setConfigToAddModList_r11 != NULL,
|
||||
"UE_template->physicalConfigDedicated->ext4->epdcch_Config_r11->config_r11.choice.setup.setConfigToAddModList_r11 = NULL\n");
|
||||
LTE_EPDCCH_SetConfig_r11_t *epdcch_setconfig_r11 = UE_template->physicalConfigDedicated->ext4->epdcch_Config_r11->config_r11.choice.setup.setConfigToAddModList_r11->list.array[0];
|
||||
AssertFatal(epdcch_setconfig_r11 != NULL, "epdcch_setconfig_r11 is null\n");
|
||||
AssertFatal(epdcch_setconfig_r11->ext2 != NULL, "epdcch_setconfig_r11->ext2 is null\n");
|
||||
AssertFatal(epdcch_setconfig_r11->ext2->mpdcch_config_r13 != NULL, "epdcch_setconfig_r11->ext2->mpdcch_config_r13 is null");
|
||||
AssertFatal(epdcch_setconfig_r11->ext2->mpdcch_config_r13 != NULL, "epdcch_setconfig_r11->ext2->mpdcch_config_r13 is null");
|
||||
AssertFatal(epdcch_setconfig_r11->ext2->mpdcch_config_r13->present == LTE_EPDCCH_SetConfig_r11__ext2__mpdcch_config_r13_PR_setup,
|
||||
"epdcch_setconfig_r11->ext2->mpdcch_config_r13->present is not setup\n");
|
||||
AssertFatal(epdcch_setconfig_r11->ext2->numberPRB_Pairs_v1310 != NULL, "epdcch_setconfig_r11->ext2->numberPRB_Pairs_v1310 is null");
|
||||
AssertFatal(epdcch_setconfig_r11->ext2->numberPRB_Pairs_v1310->present == LTE_EPDCCH_SetConfig_r11__ext2__numberPRB_Pairs_v1310_PR_setup,
|
||||
"epdcch_setconfig_r11->ext2->numberPRB_Pairs_v1310->present is not setup\n");
|
||||
LOG_D(MAC,"[PUSCH %d] Frame %d, Subframe %d: Adding UL 6-0A MPDCCH for BL/CE UE %d/%x, ulsch_frame %d, ulsch_subframe %d,UESS MPDCCH Narrowband %d\n",
|
||||
harq_pid,
|
||||
frameP,
|
||||
subframeP,
|
||||
UE_id,
|
||||
rnti,
|
||||
sched_frame,
|
||||
sched_subframeP,
|
||||
(int)epdcch_setconfig_r11->ext2->mpdcch_config_r13->choice.setup.mpdcch_Narrowband_r13 - 1);
|
||||
UE_template->first_rb_ul[harq_pid] = narrowband_to_first_rb(cc, epdcch_setconfig_r11->ext2->mpdcch_config_r13->choice.setup.mpdcch_Narrowband_r13-1);
|
||||
hi_dci0_pdu = &(hi_dci0_req->hi_dci0_pdu_list[hi_dci0_req->number_of_dci+hi_dci0_req->number_of_hi]);
|
||||
memset((void *) hi_dci0_pdu, 0, sizeof(nfapi_hi_dci0_request_pdu_t));
|
||||
hi_dci0_pdu->pdu_type = NFAPI_HI_DCI0_MPDCCH_DCI_PDU_TYPE;
|
||||
hi_dci0_pdu->pdu_size = (uint8_t) (2 + sizeof (nfapi_dl_config_mpdcch_pdu));
|
||||
hi_dci0_pdu->mpdcch_dci_pdu.mpdcch_dci_pdu_rel13.dci_format = (UE_template->rach_resource_type > 1) ? 5 : 4;
|
||||
hi_dci0_pdu->mpdcch_dci_pdu.mpdcch_dci_pdu_rel13.ce_mode = (UE_template->rach_resource_type > 1) ? 2 : 1;
|
||||
hi_dci0_pdu->mpdcch_dci_pdu.mpdcch_dci_pdu_rel13.mpdcch_narrowband = epdcch_setconfig_r11->ext2->mpdcch_config_r13->choice.setup.mpdcch_Narrowband_r13 - 1;
|
||||
hi_dci0_pdu->mpdcch_dci_pdu.mpdcch_dci_pdu_rel13.number_of_prb_pairs = 6; // checked above that it has to be this
|
||||
hi_dci0_pdu->mpdcch_dci_pdu.mpdcch_dci_pdu_rel13.resource_block_assignment = 0; // Note: this can be dynamic
|
||||
hi_dci0_pdu->mpdcch_dci_pdu.mpdcch_dci_pdu_rel13.mpdcch_transmission_type = epdcch_setconfig_r11->transmissionType_r11; // distibuted
|
||||
AssertFatal(UE_template->physicalConfigDedicated->ext4->epdcch_Config_r11->config_r11.choice.setup.startSymbol_r11 != NULL,
|
||||
"UE_template->physicalConfigDedicated->ext4->epdcch_Config_r11->config_r11.choice.setup.startSymbol_r11 is null\n");
|
||||
hi_dci0_pdu->mpdcch_dci_pdu.mpdcch_dci_pdu_rel13.start_symbol = *UE_template->physicalConfigDedicated->ext4->epdcch_Config_r11->config_r11.choice.setup.startSymbol_r11;
|
||||
hi_dci0_pdu->mpdcch_dci_pdu.mpdcch_dci_pdu_rel13.ecce_index = 0; // Note: this should be dynamic
|
||||
hi_dci0_pdu->mpdcch_dci_pdu.mpdcch_dci_pdu_rel13.aggreagation_level = 24; // OK for CEModeA r1-3 (9.1.5-1b) or CEModeB r1-4
|
||||
hi_dci0_pdu->mpdcch_dci_pdu.mpdcch_dci_pdu_rel13.rnti_type = 4; // other
|
||||
hi_dci0_pdu->mpdcch_dci_pdu.mpdcch_dci_pdu_rel13.rnti = rnti;
|
||||
hi_dci0_pdu->mpdcch_dci_pdu.mpdcch_dci_pdu_rel13.ce_mode = (UE_template->rach_resource_type < 3) ? 1 : 2;
|
||||
hi_dci0_pdu->mpdcch_dci_pdu.mpdcch_dci_pdu_rel13.drms_scrambling_init = epdcch_setconfig_r11->dmrs_ScramblingSequenceInt_r11;
|
||||
hi_dci0_pdu->mpdcch_dci_pdu.mpdcch_dci_pdu_rel13.initial_transmission_sf_io = (frameP * 10) + subframeP;
|
||||
hi_dci0_pdu->mpdcch_dci_pdu.mpdcch_dci_pdu_rel13.transmission_power = 6000; // 0dB
|
||||
hi_dci0_pdu->mpdcch_dci_pdu.mpdcch_dci_pdu_rel13.resource_block_start = UE_template->first_rb_ul[harq_pid];
|
||||
hi_dci0_pdu->mpdcch_dci_pdu.mpdcch_dci_pdu_rel13.number_of_resource_blocks = 6;
|
||||
hi_dci0_pdu->mpdcch_dci_pdu.mpdcch_dci_pdu_rel13.mcs = 4; // adjust according to size of RAR, 208 bits with N1A_PRB=3
|
||||
hi_dci0_pdu->mpdcch_dci_pdu.mpdcch_dci_pdu_rel13.pusch_repetition_levels = 0;
|
||||
AssertFatal(epdcch_setconfig_r11->ext2->mpdcch_config_r13->choice.setup.mpdcch_pdsch_HoppingConfig_r13 == LTE_EPDCCH_SetConfig_r11__ext2__mpdcch_config_r13__setup__mpdcch_pdsch_HoppingConfig_r13_off,
|
||||
"epdcch_setconfig_r11->ext2->mpdcch_config_r13->mpdcch_pdsch_HoppingConfig_r13 is not off\n");
|
||||
hi_dci0_pdu->mpdcch_dci_pdu.mpdcch_dci_pdu_rel13.frequency_hopping_flag = 1 - epdcch_setconfig_r11->ext2->mpdcch_config_r13->choice.setup.mpdcch_pdsch_HoppingConfig_r13;
|
||||
hi_dci0_pdu->mpdcch_dci_pdu.mpdcch_dci_pdu_rel13.redudency_version = rvidx_tab[round_UL&3];
|
||||
hi_dci0_pdu->mpdcch_dci_pdu.mpdcch_dci_pdu_rel13.new_data_indication = UE_template->oldNDI_UL[harq_pid];
|
||||
hi_dci0_pdu->mpdcch_dci_pdu.mpdcch_dci_pdu_rel13.harq_process = harq_pid;
|
||||
hi_dci0_pdu->mpdcch_dci_pdu.mpdcch_dci_pdu_rel13.tpc = tpc;
|
||||
hi_dci0_pdu->mpdcch_dci_pdu.mpdcch_dci_pdu_rel13.csi_request = cqi_req;
|
||||
hi_dci0_pdu->mpdcch_dci_pdu.mpdcch_dci_pdu_rel13.ul_inex = 0;
|
||||
hi_dci0_pdu->mpdcch_dci_pdu.mpdcch_dci_pdu_rel13.dai_presence_flag = 0;
|
||||
hi_dci0_pdu->mpdcch_dci_pdu.mpdcch_dci_pdu_rel13.dl_assignment_index = 0;
|
||||
hi_dci0_pdu->mpdcch_dci_pdu.mpdcch_dci_pdu_rel13.srs_request = 0;
|
||||
hi_dci0_pdu->mpdcch_dci_pdu.mpdcch_dci_pdu_rel13.dci_subframe_repetition_number = 0;
|
||||
hi_dci0_pdu->mpdcch_dci_pdu.mpdcch_dci_pdu_rel13.tcp_bitmap = 0;
|
||||
hi_dci0_pdu->mpdcch_dci_pdu.mpdcch_dci_pdu_rel13.total_dci_length_include_padding = 29; // hard-coded for 10 MHz
|
||||
hi_dci0_pdu->mpdcch_dci_pdu.mpdcch_dci_pdu_rel13.number_of_tx_antenna_ports = 1;
|
||||
hi_dci0_req->number_of_dci++;
|
||||
fill_nfapi_ulsch_config_request_rel8(&ul_req_tmp->ul_config_pdu_list[ul_req_tmp->number_of_pdus],
|
||||
cqi_req,
|
||||
cc,
|
||||
UE_template->physicalConfigDedicated,
|
||||
get_tmode(module_idP,CC_id,UE_id),
|
||||
eNB->ul_handle,
|
||||
rnti,
|
||||
UE_template->first_rb_ul[harq_pid], // resource_block_start
|
||||
UE_template->nb_rb_ul[harq_pid], // number_of_resource_blocks
|
||||
UE_template->mcs_UL[harq_pid],
|
||||
cshift, // cyclic_shift_2_for_drms
|
||||
0, // frequency_hopping_enabled_flag
|
||||
0, // frequency_hopping_bits
|
||||
UE_template->oldNDI_UL[harq_pid], // new_data_indication
|
||||
rvidx_tab[round_UL&3], // redundancy_version
|
||||
harq_pid, // harq_process_number
|
||||
0, // ul_tx_mode
|
||||
0, // current_tx_nb
|
||||
0, // n_srs
|
||||
UE_template->TBS_UL[harq_pid]
|
||||
);
|
||||
fill_nfapi_ulsch_config_request_emtc(&ul_req_tmp->ul_config_pdu_list[ul_req_tmp->number_of_pdus],
|
||||
UE_template->rach_resource_type>2 ? 2 : 1,
|
||||
1, //total_number_of_repetitions
|
||||
1, //repetition_number
|
||||
(frameP * 10) + subframeP);
|
||||
ul_req_tmp->number_of_pdus++;
|
||||
eNB->ul_handle++;
|
||||
}
|
||||
} // UE_is_to_be_scheduled
|
||||
} // ULCCs
|
||||
} // loop over UE_id
|
||||
/* New transmission */
|
||||
if (round_UL == 0) {
|
||||
ndi = 1 - UE_template->oldNDI_UL[harq_pid];
|
||||
UE_template->oldNDI_UL[harq_pid] = ndi;
|
||||
UE_template->mcs_UL[harq_pid] = 4;
|
||||
UE_template->TBS_UL[harq_pid] = get_TBS_UL(UE_template->mcs_UL[harq_pid], 6);
|
||||
UE_list->eNB_UE_stats[CC_id][UE_id].snr = snr;
|
||||
UE_list->eNB_UE_stats[CC_id][UE_id].target_snr = target_snr;
|
||||
UE_list->eNB_UE_stats[CC_id][UE_id].ulsch_mcs1 = 4;
|
||||
UE_list->eNB_UE_stats[CC_id][UE_id].ulsch_mcs2 = UE_template->mcs_UL[harq_pid];
|
||||
UE_list->eNB_UE_stats[CC_id][UE_id].total_rbs_used_rx += 6;
|
||||
UE_list->eNB_UE_stats[CC_id][UE_id].ulsch_TBS = UE_template->TBS_UL[harq_pid];
|
||||
T(T_ENB_MAC_UE_UL_SCHEDULE,
|
||||
T_INT(module_idP),
|
||||
T_INT(CC_id),
|
||||
T_INT(rnti),
|
||||
T_INT(frameP),
|
||||
T_INT(subframeP),
|
||||
T_INT(harq_pid),
|
||||
T_INT(UE_template->mcs_UL[harq_pid]),
|
||||
T_INT(0),
|
||||
T_INT(6),
|
||||
T_INT(UE_template->TBS_UL[harq_pid]),
|
||||
T_INT(ndi));
|
||||
/* Store for possible retransmission */
|
||||
UE_template->nb_rb_ul[harq_pid] = 6;
|
||||
UE_sched_ctrl->ul_scheduled |= (1 << harq_pid);
|
||||
|
||||
if (UE_id == UE_list->head) {
|
||||
VCD_SIGNAL_DUMPER_DUMP_VARIABLE_BY_NAME(VCD_SIGNAL_DUMPER_VARIABLES_UE0_SCHEDULED, UE_sched_ctrl->ul_scheduled);
|
||||
}
|
||||
|
||||
/* Adjust total UL buffer status by TBS, wait for UL sdus to do final update */
|
||||
UE_template->scheduled_ul_bytes += UE_template->TBS_UL[harq_pid];
|
||||
LOG_D(MAC, "scheduled_ul_bytes, new %d\n", UE_template->scheduled_ul_bytes);
|
||||
/* Cyclic shift for DMRS */
|
||||
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 */
|
||||
UE_template->cshift[harq_pid] = cshift;
|
||||
AssertFatal (UE_template->physicalConfigDedicated != NULL, "UE_template->physicalConfigDedicated is null\n");
|
||||
AssertFatal (UE_template->physicalConfigDedicated->ext4 != NULL, "UE_template->physicalConfigDedicated->ext4 is null\n");
|
||||
AssertFatal (UE_template->physicalConfigDedicated->ext4->epdcch_Config_r11 != NULL, "UE_template->physicalConfigDedicated->ext4->epdcch_Config_r11 is null\n");
|
||||
AssertFatal (UE_template->physicalConfigDedicated->ext4->epdcch_Config_r11->config_r11.present == LTE_EPDCCH_Config_r11__config_r11_PR_setup,
|
||||
"UE_template->physicalConfigDedicated->ext4->epdcch_Config_r11->config_r11.present != setup\n");
|
||||
AssertFatal (UE_template->physicalConfigDedicated->ext4->epdcch_Config_r11->config_r11.choice.setup.setConfigToAddModList_r11 != NULL,
|
||||
"UE_template->physicalConfigDedicated->ext4->epdcch_Config_r11->config_r11.choice.setup.setConfigToAddModList_r11 = NULL\n");
|
||||
LTE_EPDCCH_SetConfig_r11_t *epdcch_setconfig_r11 = UE_template->physicalConfigDedicated->ext4->epdcch_Config_r11->config_r11.choice.setup.setConfigToAddModList_r11->list.array[0];
|
||||
AssertFatal(epdcch_setconfig_r11 != NULL, "epdcch_setconfig_r11 is null\n");
|
||||
AssertFatal(epdcch_setconfig_r11->ext2 != NULL, "epdcch_setconfig_r11->ext2 is null\n");
|
||||
AssertFatal(epdcch_setconfig_r11->ext2->mpdcch_config_r13 != NULL, "epdcch_setconfig_r11->ext2->mpdcch_config_r13 is null");
|
||||
AssertFatal(epdcch_setconfig_r11->ext2->mpdcch_config_r13->present == LTE_EPDCCH_SetConfig_r11__ext2__mpdcch_config_r13_PR_setup,
|
||||
"epdcch_setconfig_r11->ext2->mpdcch_config_r13->present is not setup\n");
|
||||
AssertFatal(epdcch_setconfig_r11->ext2->numberPRB_Pairs_v1310 != NULL, "epdcch_setconfig_r11->ext2->numberPRB_Pairs_v1310 is null");
|
||||
AssertFatal(epdcch_setconfig_r11->ext2->numberPRB_Pairs_v1310->present == LTE_EPDCCH_SetConfig_r11__ext2__numberPRB_Pairs_v1310_PR_setup,
|
||||
"epdcch_setconfig_r11->ext2->numberPRB_Pairs_v1310->present is not setup\n");
|
||||
LOG_D(MAC,"[PUSCH %d] Frame %d, Subframe %d: Adding UL 6-0A MPDCCH for BL/CE UE %d/%x, ulsch_frame %d, ulsch_subframe %d, UESS MPDCCH Narrowband %d\n",
|
||||
harq_pid,
|
||||
frameP,
|
||||
subframeP,
|
||||
UE_id,
|
||||
rnti,
|
||||
sched_frame,
|
||||
sched_subframeP,
|
||||
(int)epdcch_setconfig_r11->ext2->mpdcch_config_r13->choice.setup.mpdcch_Narrowband_r13 - 1);
|
||||
UE_template->first_rb_ul[harq_pid] = narrowband_to_first_rb (cc, epdcch_setconfig_r11->ext2->mpdcch_config_r13->choice.setup.mpdcch_Narrowband_r13 - 1);
|
||||
hi_dci0_pdu = &(hi_dci0_req->hi_dci0_pdu_list[hi_dci0_req->number_of_dci + hi_dci0_req->number_of_hi]);
|
||||
memset((void *) hi_dci0_pdu, 0, sizeof(nfapi_hi_dci0_request_pdu_t));
|
||||
hi_dci0_pdu->pdu_type = NFAPI_HI_DCI0_MPDCCH_DCI_PDU_TYPE;
|
||||
hi_dci0_pdu->pdu_size = (uint8_t) (2 + sizeof (nfapi_dl_config_mpdcch_pdu));
|
||||
hi_dci0_pdu->mpdcch_dci_pdu.mpdcch_dci_pdu_rel13.dci_format = (UE_template->rach_resource_type > 1) ? 5 : 4;
|
||||
hi_dci0_pdu->mpdcch_dci_pdu.mpdcch_dci_pdu_rel13.ce_mode = (UE_template->rach_resource_type > 1) ? 2 : 1;
|
||||
hi_dci0_pdu->mpdcch_dci_pdu.mpdcch_dci_pdu_rel13.mpdcch_narrowband = epdcch_setconfig_r11->ext2->mpdcch_config_r13->choice.setup.mpdcch_Narrowband_r13 - 1;
|
||||
hi_dci0_pdu->mpdcch_dci_pdu.mpdcch_dci_pdu_rel13.number_of_prb_pairs = 6; // checked above that it has to be this
|
||||
hi_dci0_pdu->mpdcch_dci_pdu.mpdcch_dci_pdu_rel13.resource_block_assignment = 0; // Note: this can be dynamic
|
||||
hi_dci0_pdu->mpdcch_dci_pdu.mpdcch_dci_pdu_rel13.mpdcch_transmission_type = epdcch_setconfig_r11->transmissionType_r11; // distibuted
|
||||
AssertFatal(UE_template->physicalConfigDedicated->ext4->epdcch_Config_r11->config_r11.choice.setup.startSymbol_r11 != NULL,
|
||||
"UE_template->physicalConfigDedicated->ext4->epdcch_Config_r11->config_r11.choice.setup.startSymbol_r11 is null\n");
|
||||
hi_dci0_pdu->mpdcch_dci_pdu.mpdcch_dci_pdu_rel13.start_symbol = *UE_template->physicalConfigDedicated->ext4->epdcch_Config_r11->config_r11.choice.setup.startSymbol_r11;
|
||||
hi_dci0_pdu->mpdcch_dci_pdu.mpdcch_dci_pdu_rel13.ecce_index = 0; // Note: this should be dynamic
|
||||
hi_dci0_pdu->mpdcch_dci_pdu.mpdcch_dci_pdu_rel13.aggreagation_level = 24; // OK for CEModeA r1-3 (9.1.5-1b) or CEModeB r1-4
|
||||
hi_dci0_pdu->mpdcch_dci_pdu.mpdcch_dci_pdu_rel13.rnti_type = 4; // other
|
||||
hi_dci0_pdu->mpdcch_dci_pdu.mpdcch_dci_pdu_rel13.rnti = rnti;
|
||||
hi_dci0_pdu->mpdcch_dci_pdu.mpdcch_dci_pdu_rel13.ce_mode = (UE_template->rach_resource_type < 3) ? 1 : 2; // already set above...
|
||||
hi_dci0_pdu->mpdcch_dci_pdu.mpdcch_dci_pdu_rel13.drms_scrambling_init = epdcch_setconfig_r11->dmrs_ScramblingSequenceInt_r11;
|
||||
hi_dci0_pdu->mpdcch_dci_pdu.mpdcch_dci_pdu_rel13.initial_transmission_sf_io = (frameP * 10) + subframeP;
|
||||
hi_dci0_pdu->mpdcch_dci_pdu.mpdcch_dci_pdu_rel13.transmission_power = 6000; // 0dB
|
||||
hi_dci0_pdu->mpdcch_dci_pdu.mpdcch_dci_pdu_rel13.resource_block_start = UE_template->first_rb_ul[harq_pid];
|
||||
hi_dci0_pdu->mpdcch_dci_pdu.mpdcch_dci_pdu_rel13.number_of_resource_blocks = 6;
|
||||
hi_dci0_pdu->mpdcch_dci_pdu.mpdcch_dci_pdu_rel13.mcs = 4; // adjust according to size of RAR, 208 bits with N1A_PRB = 3
|
||||
hi_dci0_pdu->mpdcch_dci_pdu.mpdcch_dci_pdu_rel13.pusch_repetition_levels = UE_template->pusch_repetition_levels;
|
||||
AssertFatal(epdcch_setconfig_r11->ext2->mpdcch_config_r13->choice.setup.mpdcch_pdsch_HoppingConfig_r13 == LTE_EPDCCH_SetConfig_r11__ext2__mpdcch_config_r13__setup__mpdcch_pdsch_HoppingConfig_r13_off,
|
||||
"epdcch_setconfig_r11->ext2->mpdcch_config_r13->mpdcch_pdsch_HoppingConfig_r13 is not off\n");
|
||||
hi_dci0_pdu->mpdcch_dci_pdu.mpdcch_dci_pdu_rel13.frequency_hopping_flag = 1 - epdcch_setconfig_r11->ext2->mpdcch_config_r13->choice.setup.mpdcch_pdsch_HoppingConfig_r13;
|
||||
hi_dci0_pdu->mpdcch_dci_pdu.mpdcch_dci_pdu_rel13.redudency_version = 0;
|
||||
hi_dci0_pdu->mpdcch_dci_pdu.mpdcch_dci_pdu_rel13.new_data_indication = UE_template->oldNDI_UL[harq_pid];
|
||||
hi_dci0_pdu->mpdcch_dci_pdu.mpdcch_dci_pdu_rel13.harq_process = 0;
|
||||
hi_dci0_pdu->mpdcch_dci_pdu.mpdcch_dci_pdu_rel13.tpc = tpc;
|
||||
hi_dci0_pdu->mpdcch_dci_pdu.mpdcch_dci_pdu_rel13.csi_request = cqi_req;
|
||||
hi_dci0_pdu->mpdcch_dci_pdu.mpdcch_dci_pdu_rel13.ul_inex = 0;
|
||||
hi_dci0_pdu->mpdcch_dci_pdu.mpdcch_dci_pdu_rel13.dai_presence_flag = 0;
|
||||
hi_dci0_pdu->mpdcch_dci_pdu.mpdcch_dci_pdu_rel13.dl_assignment_index = 0;
|
||||
hi_dci0_pdu->mpdcch_dci_pdu.mpdcch_dci_pdu_rel13.srs_request = 0;
|
||||
hi_dci0_pdu->mpdcch_dci_pdu.mpdcch_dci_pdu_rel13.dci_subframe_repetition_number = 0;
|
||||
hi_dci0_pdu->mpdcch_dci_pdu.mpdcch_dci_pdu_rel13.tcp_bitmap = 0;
|
||||
hi_dci0_pdu->mpdcch_dci_pdu.mpdcch_dci_pdu_rel13.total_dci_length_include_padding = 29; // hard-coded for 10 MHz
|
||||
hi_dci0_pdu->mpdcch_dci_pdu.mpdcch_dci_pdu_rel13.number_of_tx_antenna_ports = 1;
|
||||
hi_dci0_req->number_of_dci++;
|
||||
LOG_D(MAC,"[PUSCH %d] Frame %d, Subframe %d: Adding UL CONFIG. Request for BL/CE UE %d/%x, ulsch_frame %d, ulsch_subframe %d, UESS mpdcch narrowband %d\n",
|
||||
harq_pid,
|
||||
frameP,
|
||||
subframeP,
|
||||
UE_id,
|
||||
rnti,
|
||||
sched_frame,
|
||||
sched_subframeP,
|
||||
(int)epdcch_setconfig_r11->ext2->mpdcch_config_r13->choice.setup.mpdcch_Narrowband_r13 - 1);
|
||||
fill_nfapi_ulsch_config_request_rel8(&ul_req_tmp->ul_config_pdu_list[ul_req_tmp->number_of_pdus],
|
||||
cqi_req,
|
||||
cc,
|
||||
UE_template->physicalConfigDedicated,
|
||||
get_tmode(module_idP,CC_id,UE_id),
|
||||
eNB->ul_handle,
|
||||
rnti,
|
||||
UE_template->first_rb_ul[harq_pid], // resource_block_start
|
||||
UE_template->nb_rb_ul[harq_pid], // number_of_resource_blocks
|
||||
UE_template->mcs_UL[harq_pid],
|
||||
cshift, // cyclic_shift_2_for_drms
|
||||
0, // frequency_hopping_enabled_flag
|
||||
0, // frequency_hopping_bits
|
||||
UE_template->oldNDI_UL[harq_pid], // new_data_indication
|
||||
rvidx_tab[round_UL&3], // redundancy_version
|
||||
harq_pid, // harq_process_number
|
||||
0, // ul_tx_mode
|
||||
0, // current_tx_nb
|
||||
0, // n_srs
|
||||
UE_template->TBS_UL[harq_pid]
|
||||
);
|
||||
fill_nfapi_ulsch_config_request_emtc(&ul_req_tmp->ul_config_pdu_list[ul_req_tmp->number_of_pdus],
|
||||
UE_template->rach_resource_type > 2 ? 2 : 1,
|
||||
Total_Num_Rep_ULSCH, // total_number_of_repetitions
|
||||
1, // repetition_number
|
||||
(frameP * 10) + subframeP);
|
||||
ul_req_tmp->number_of_pdus++;
|
||||
eNB->ul_handle++;
|
||||
add_ue_ulsch_info(module_idP,
|
||||
CC_id,
|
||||
UE_id,
|
||||
subframeP,
|
||||
S_UL_SCHEDULED);
|
||||
LOG_D(MAC,"[eNB %d] CC_id %d Frame %d, subframeP %d: Generated ULSCH DCI for next UE_id %d, format 0\n",
|
||||
module_idP,
|
||||
CC_id,
|
||||
frameP,
|
||||
subframeP,
|
||||
UE_id);
|
||||
} else { // round_UL > 0 => retransmission
|
||||
/* In LTE-M the UL HARQ process is asynchronous */
|
||||
T(T_ENB_MAC_UE_UL_SCHEDULE_RETRANSMISSION,
|
||||
T_INT(module_idP),
|
||||
T_INT(CC_id),
|
||||
T_INT(rnti),
|
||||
T_INT(frameP),
|
||||
T_INT(subframeP),
|
||||
T_INT(harq_pid),
|
||||
T_INT(UE_template->mcs_UL[harq_pid]),
|
||||
T_INT(0),
|
||||
T_INT(6),
|
||||
T_INT(round_UL));
|
||||
AssertFatal (UE_template->physicalConfigDedicated != NULL, "UE_template->physicalConfigDedicated is null\n");
|
||||
AssertFatal (UE_template->physicalConfigDedicated->ext4 != NULL, "UE_template->physicalConfigDedicated->ext4 is null\n");
|
||||
AssertFatal (UE_template->physicalConfigDedicated->ext4->epdcch_Config_r11 != NULL, "UE_template->physicalConfigDedicated->ext4->epdcch_Config_r11 is null\n");
|
||||
AssertFatal (UE_template->physicalConfigDedicated->ext4->epdcch_Config_r11->config_r11.present == LTE_EPDCCH_Config_r11__config_r11_PR_setup,
|
||||
"UE_template->physicalConfigDedicated->ext4->epdcch_Config_r11->config_r11.present != setup\n");
|
||||
AssertFatal (UE_template->physicalConfigDedicated->ext4->epdcch_Config_r11->config_r11.choice.setup.setConfigToAddModList_r11 != NULL,
|
||||
"UE_template->physicalConfigDedicated->ext4->epdcch_Config_r11->config_r11.choice.setup.setConfigToAddModList_r11 = NULL\n");
|
||||
LTE_EPDCCH_SetConfig_r11_t *epdcch_setconfig_r11 = UE_template->physicalConfigDedicated->ext4->epdcch_Config_r11->config_r11.choice.setup.setConfigToAddModList_r11->list.array[0];
|
||||
AssertFatal(epdcch_setconfig_r11 != NULL, "epdcch_setconfig_r11 is null\n");
|
||||
AssertFatal(epdcch_setconfig_r11->ext2 != NULL, "epdcch_setconfig_r11->ext2 is null\n");
|
||||
AssertFatal(epdcch_setconfig_r11->ext2->mpdcch_config_r13 != NULL, "epdcch_setconfig_r11->ext2->mpdcch_config_r13 is null");
|
||||
AssertFatal(epdcch_setconfig_r11->ext2->mpdcch_config_r13 != NULL, "epdcch_setconfig_r11->ext2->mpdcch_config_r13 is null");
|
||||
AssertFatal(epdcch_setconfig_r11->ext2->mpdcch_config_r13->present == LTE_EPDCCH_SetConfig_r11__ext2__mpdcch_config_r13_PR_setup,
|
||||
"epdcch_setconfig_r11->ext2->mpdcch_config_r13->present is not setup\n");
|
||||
AssertFatal(epdcch_setconfig_r11->ext2->numberPRB_Pairs_v1310 != NULL, "epdcch_setconfig_r11->ext2->numberPRB_Pairs_v1310 is null");
|
||||
AssertFatal(epdcch_setconfig_r11->ext2->numberPRB_Pairs_v1310->present == LTE_EPDCCH_SetConfig_r11__ext2__numberPRB_Pairs_v1310_PR_setup,
|
||||
"epdcch_setconfig_r11->ext2->numberPRB_Pairs_v1310->present is not setup\n");
|
||||
LOG_D(MAC,"[PUSCH %d] Frame %d, Subframe %d: Adding UL 6-0A MPDCCH for BL/CE UE %d/%x, ulsch_frame %d, ulsch_subframe %d,UESS MPDCCH Narrowband %d\n",
|
||||
harq_pid,
|
||||
frameP,
|
||||
subframeP,
|
||||
UE_id,
|
||||
rnti,
|
||||
sched_frame,
|
||||
sched_subframeP,
|
||||
(int)epdcch_setconfig_r11->ext2->mpdcch_config_r13->choice.setup.mpdcch_Narrowband_r13 - 1);
|
||||
UE_template->first_rb_ul[harq_pid] = narrowband_to_first_rb(cc, epdcch_setconfig_r11->ext2->mpdcch_config_r13->choice.setup.mpdcch_Narrowband_r13-1);
|
||||
hi_dci0_pdu = &(hi_dci0_req->hi_dci0_pdu_list[hi_dci0_req->number_of_dci+hi_dci0_req->number_of_hi]);
|
||||
memset((void *) hi_dci0_pdu, 0, sizeof(nfapi_hi_dci0_request_pdu_t));
|
||||
hi_dci0_pdu->pdu_type = NFAPI_HI_DCI0_MPDCCH_DCI_PDU_TYPE;
|
||||
hi_dci0_pdu->pdu_size = (uint8_t) (2 + sizeof (nfapi_dl_config_mpdcch_pdu));
|
||||
hi_dci0_pdu->mpdcch_dci_pdu.mpdcch_dci_pdu_rel13.dci_format = (UE_template->rach_resource_type > 1) ? 5 : 4;
|
||||
hi_dci0_pdu->mpdcch_dci_pdu.mpdcch_dci_pdu_rel13.ce_mode = (UE_template->rach_resource_type > 1) ? 2 : 1;
|
||||
hi_dci0_pdu->mpdcch_dci_pdu.mpdcch_dci_pdu_rel13.mpdcch_narrowband = epdcch_setconfig_r11->ext2->mpdcch_config_r13->choice.setup.mpdcch_Narrowband_r13 - 1;
|
||||
hi_dci0_pdu->mpdcch_dci_pdu.mpdcch_dci_pdu_rel13.number_of_prb_pairs = 6; // checked above that it has to be this
|
||||
hi_dci0_pdu->mpdcch_dci_pdu.mpdcch_dci_pdu_rel13.resource_block_assignment = 0; // Note: this can be dynamic
|
||||
hi_dci0_pdu->mpdcch_dci_pdu.mpdcch_dci_pdu_rel13.mpdcch_transmission_type = epdcch_setconfig_r11->transmissionType_r11; // distibuted
|
||||
AssertFatal(UE_template->physicalConfigDedicated->ext4->epdcch_Config_r11->config_r11.choice.setup.startSymbol_r11 != NULL,
|
||||
"UE_template->physicalConfigDedicated->ext4->epdcch_Config_r11->config_r11.choice.setup.startSymbol_r11 is null\n");
|
||||
hi_dci0_pdu->mpdcch_dci_pdu.mpdcch_dci_pdu_rel13.start_symbol = *UE_template->physicalConfigDedicated->ext4->epdcch_Config_r11->config_r11.choice.setup.startSymbol_r11;
|
||||
hi_dci0_pdu->mpdcch_dci_pdu.mpdcch_dci_pdu_rel13.ecce_index = 0; // Note: this should be dynamic
|
||||
hi_dci0_pdu->mpdcch_dci_pdu.mpdcch_dci_pdu_rel13.aggreagation_level = 24; // OK for CEModeA r1-3 (9.1.5-1b) or CEModeB r1-4
|
||||
hi_dci0_pdu->mpdcch_dci_pdu.mpdcch_dci_pdu_rel13.rnti_type = 4; // other
|
||||
hi_dci0_pdu->mpdcch_dci_pdu.mpdcch_dci_pdu_rel13.rnti = rnti;
|
||||
hi_dci0_pdu->mpdcch_dci_pdu.mpdcch_dci_pdu_rel13.ce_mode = (UE_template->rach_resource_type < 3) ? 1 : 2;
|
||||
hi_dci0_pdu->mpdcch_dci_pdu.mpdcch_dci_pdu_rel13.drms_scrambling_init = epdcch_setconfig_r11->dmrs_ScramblingSequenceInt_r11;
|
||||
hi_dci0_pdu->mpdcch_dci_pdu.mpdcch_dci_pdu_rel13.initial_transmission_sf_io = (frameP * 10) + subframeP;
|
||||
hi_dci0_pdu->mpdcch_dci_pdu.mpdcch_dci_pdu_rel13.transmission_power = 6000; // 0dB
|
||||
hi_dci0_pdu->mpdcch_dci_pdu.mpdcch_dci_pdu_rel13.resource_block_start = UE_template->first_rb_ul[harq_pid];
|
||||
hi_dci0_pdu->mpdcch_dci_pdu.mpdcch_dci_pdu_rel13.number_of_resource_blocks = 6;
|
||||
hi_dci0_pdu->mpdcch_dci_pdu.mpdcch_dci_pdu_rel13.mcs = 4; // adjust according to size of RAR, 208 bits with N1A_PRB=3
|
||||
hi_dci0_pdu->mpdcch_dci_pdu.mpdcch_dci_pdu_rel13.pusch_repetition_levels = 0;
|
||||
AssertFatal(epdcch_setconfig_r11->ext2->mpdcch_config_r13->choice.setup.mpdcch_pdsch_HoppingConfig_r13 == LTE_EPDCCH_SetConfig_r11__ext2__mpdcch_config_r13__setup__mpdcch_pdsch_HoppingConfig_r13_off,
|
||||
"epdcch_setconfig_r11->ext2->mpdcch_config_r13->mpdcch_pdsch_HoppingConfig_r13 is not off\n");
|
||||
hi_dci0_pdu->mpdcch_dci_pdu.mpdcch_dci_pdu_rel13.frequency_hopping_flag = 1 - epdcch_setconfig_r11->ext2->mpdcch_config_r13->choice.setup.mpdcch_pdsch_HoppingConfig_r13;
|
||||
hi_dci0_pdu->mpdcch_dci_pdu.mpdcch_dci_pdu_rel13.redudency_version = rvidx_tab[round_UL&3];
|
||||
hi_dci0_pdu->mpdcch_dci_pdu.mpdcch_dci_pdu_rel13.new_data_indication = UE_template->oldNDI_UL[harq_pid];
|
||||
hi_dci0_pdu->mpdcch_dci_pdu.mpdcch_dci_pdu_rel13.harq_process = harq_pid;
|
||||
hi_dci0_pdu->mpdcch_dci_pdu.mpdcch_dci_pdu_rel13.tpc = tpc;
|
||||
hi_dci0_pdu->mpdcch_dci_pdu.mpdcch_dci_pdu_rel13.csi_request = cqi_req;
|
||||
hi_dci0_pdu->mpdcch_dci_pdu.mpdcch_dci_pdu_rel13.ul_inex = 0;
|
||||
hi_dci0_pdu->mpdcch_dci_pdu.mpdcch_dci_pdu_rel13.dai_presence_flag = 0;
|
||||
hi_dci0_pdu->mpdcch_dci_pdu.mpdcch_dci_pdu_rel13.dl_assignment_index = 0;
|
||||
hi_dci0_pdu->mpdcch_dci_pdu.mpdcch_dci_pdu_rel13.srs_request = 0;
|
||||
hi_dci0_pdu->mpdcch_dci_pdu.mpdcch_dci_pdu_rel13.dci_subframe_repetition_number = 0;
|
||||
hi_dci0_pdu->mpdcch_dci_pdu.mpdcch_dci_pdu_rel13.tcp_bitmap = 0;
|
||||
hi_dci0_pdu->mpdcch_dci_pdu.mpdcch_dci_pdu_rel13.total_dci_length_include_padding = 29; // hard-coded for 10 MHz
|
||||
hi_dci0_pdu->mpdcch_dci_pdu.mpdcch_dci_pdu_rel13.number_of_tx_antenna_ports = 1;
|
||||
hi_dci0_req->number_of_dci++;
|
||||
fill_nfapi_ulsch_config_request_rel8(&ul_req_tmp->ul_config_pdu_list[ul_req_tmp->number_of_pdus],
|
||||
cqi_req,
|
||||
cc,
|
||||
UE_template->physicalConfigDedicated,
|
||||
get_tmode(module_idP,CC_id,UE_id),
|
||||
eNB->ul_handle,
|
||||
rnti,
|
||||
UE_template->first_rb_ul[harq_pid], // resource_block_start
|
||||
UE_template->nb_rb_ul[harq_pid], // number_of_resource_blocks
|
||||
UE_template->mcs_UL[harq_pid],
|
||||
cshift, // cyclic_shift_2_for_drms
|
||||
0, // frequency_hopping_enabled_flag
|
||||
0, // frequency_hopping_bits
|
||||
UE_template->oldNDI_UL[harq_pid], // new_data_indication
|
||||
rvidx_tab[round_UL&3], // redundancy_version
|
||||
harq_pid, // harq_process_number
|
||||
0, // ul_tx_mode
|
||||
0, // current_tx_nb
|
||||
0, // n_srs
|
||||
UE_template->TBS_UL[harq_pid]
|
||||
);
|
||||
fill_nfapi_ulsch_config_request_emtc(&ul_req_tmp->ul_config_pdu_list[ul_req_tmp->number_of_pdus],
|
||||
UE_template->rach_resource_type>2 ? 2 : 1,
|
||||
1, //total_number_of_repetitions
|
||||
1, //repetition_number
|
||||
(frameP * 10) + subframeP);
|
||||
ul_req_tmp->number_of_pdus++;
|
||||
eNB->ul_handle++;
|
||||
}
|
||||
} // UE_is_to_be_scheduled
|
||||
} // ULCCs
|
||||
} // loop over UE_id
|
||||
} // Schedule new ULSCH
|
||||
|
||||
// This section is to repeat ULSCH PDU for a number of MTC repetitions
|
||||
for(int i=0;i<ul_req_tmp->number_of_pdus;i++)
|
||||
{
|
||||
ul_config_pdu = &ul_req_tmp->ul_config_pdu_list[i];
|
||||
if (ul_config_pdu->pdu_type!=NFAPI_UL_CONFIG_ULSCH_PDU_TYPE) // Repeat ULSCH PDUs only
|
||||
continue ;
|
||||
for(int i=0; i<ul_req_tmp->number_of_pdus; i++) {
|
||||
ul_config_pdu = &ul_req_tmp->ul_config_pdu_list[i];
|
||||
|
||||
if(ul_config_pdu->ulsch_pdu.ulsch_pdu_rel13.repetition_number < ul_config_pdu->ulsch_pdu.ulsch_pdu_rel13.total_number_of_repetitions)
|
||||
{
|
||||
ul_req_body_Rep = &eNB->UL_req_tmp[CC_id][(sched_subframeP+1)%10].ul_config_request_body;
|
||||
ul_config_pdu_Rep = &ul_req_body_Rep->ul_config_pdu_list[ul_req_body_Rep->number_of_pdus];
|
||||
memcpy ((void *) ul_config_pdu_Rep, ul_config_pdu, sizeof (nfapi_ul_config_request_pdu_t));
|
||||
ul_config_pdu_Rep->ulsch_pdu.ulsch_pdu_rel8.handle = eNB->ul_handle++;
|
||||
ul_config_pdu_Rep->ulsch_pdu.ulsch_pdu_rel13.repetition_number = ul_config_pdu->ulsch_pdu.ulsch_pdu_rel13.repetition_number +1;
|
||||
ul_req_body_Rep->number_of_pdus++;
|
||||
} //repetition_number < total_number_of_repetitions
|
||||
if (ul_config_pdu->pdu_type!=NFAPI_UL_CONFIG_ULSCH_PDU_TYPE) // Repeat ULSCH PDUs only
|
||||
continue ;
|
||||
|
||||
if(ul_config_pdu->ulsch_pdu.ulsch_pdu_rel13.repetition_number < ul_config_pdu->ulsch_pdu.ulsch_pdu_rel13.total_number_of_repetitions) {
|
||||
ul_req_body_Rep = &eNB->UL_req_tmp[CC_id][(sched_subframeP+1)%10].ul_config_request_body;
|
||||
ul_config_pdu_Rep = &ul_req_body_Rep->ul_config_pdu_list[ul_req_body_Rep->number_of_pdus];
|
||||
memcpy ((void *) ul_config_pdu_Rep, ul_config_pdu, sizeof (nfapi_ul_config_request_pdu_t));
|
||||
ul_config_pdu_Rep->ulsch_pdu.ulsch_pdu_rel8.handle = eNB->ul_handle++;
|
||||
ul_config_pdu_Rep->ulsch_pdu.ulsch_pdu_rel13.repetition_number = ul_config_pdu->ulsch_pdu.ulsch_pdu_rel13.repetition_number +1;
|
||||
ul_req_body_Rep->number_of_pdus++;
|
||||
} //repetition_number < total_number_of_repetitions
|
||||
} // For loop on PDUs
|
||||
}
|
||||
|
||||
@@ -2014,6 +2014,14 @@ static int ue_ul_compare(const void *_a, const void *_b, void *_params) {
|
||||
UE_list->UE_template[pCCid2][UE_id2].pre_assigned_mcs_ul)
|
||||
return 1;
|
||||
|
||||
if (UE_list->UE_sched_ctrl[UE_id1].cqi_req_timer >
|
||||
UE_list->UE_sched_ctrl[UE_id2].cqi_req_timer)
|
||||
return -1;
|
||||
|
||||
if (UE_list->UE_sched_ctrl[UE_id1].cqi_req_timer <
|
||||
UE_list->UE_sched_ctrl[UE_id2].cqi_req_timer)
|
||||
return 1;
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
@@ -255,17 +255,11 @@ Msg1_transmitted(module_id_t module_idP, uint8_t CC_id,
|
||||
"Transmission on secondary CCs is not supported yet\n");
|
||||
// start contention resolution timer
|
||||
UE_mac_inst[module_idP].RA_attempt_number++;
|
||||
|
||||
if (opt_enabled) {
|
||||
trace_pdu(DIRECTION_UPLINK, NULL, 0, module_idP, WS_NO_RNTI,
|
||||
UE_mac_inst[module_idP].RA_prach_resources.
|
||||
ra_PreambleIndex, UE_mac_inst[module_idP].txFrame,
|
||||
UE_mac_inst[module_idP].txSubframe, 0,
|
||||
UE_mac_inst[module_idP].RA_attempt_number);
|
||||
LOG_D(OPT,
|
||||
"[UE %d][RAPROC] TX MSG1 Frame %d trace pdu for rnti %x with size %d\n",
|
||||
module_idP, frameP, 1, UE_mac_inst[module_idP].RA_Msg3_size);
|
||||
}
|
||||
trace_pdu(DIRECTION_UPLINK, NULL, 0, module_idP, WS_NO_RNTI,
|
||||
UE_mac_inst[module_idP].RA_prach_resources.
|
||||
ra_PreambleIndex, UE_mac_inst[module_idP].txFrame,
|
||||
UE_mac_inst[module_idP].txSubframe, 0,
|
||||
UE_mac_inst[module_idP].RA_attempt_number);
|
||||
}
|
||||
|
||||
|
||||
@@ -280,19 +274,11 @@ Msg3_transmitted(module_id_t module_idP, uint8_t CC_id,
|
||||
module_idP, frameP);
|
||||
UE_mac_inst[module_idP].RA_contention_resolution_cnt = 0;
|
||||
UE_mac_inst[module_idP].RA_contention_resolution_timer_active = 1;
|
||||
|
||||
if (opt_enabled) { // msg3
|
||||
trace_pdu(DIRECTION_UPLINK, &UE_mac_inst[module_idP].CCCH_pdu.payload[0],
|
||||
UE_mac_inst[module_idP].RA_Msg3_size, module_idP, WS_C_RNTI,
|
||||
UE_mac_inst[module_idP].crnti,
|
||||
UE_mac_inst[module_idP].txFrame,
|
||||
UE_mac_inst[module_idP].txSubframe, 0, 0);
|
||||
LOG_D(OPT,
|
||||
"[UE %d][RAPROC] MSG3 Frame %d trace pdu Preamble %d with size %d\n",
|
||||
module_idP, frameP, UE_mac_inst[module_idP].crnti
|
||||
/*UE_mac_inst[module_idP].RA_prach_resources.ra_PreambleIndex */
|
||||
, UE_mac_inst[module_idP].RA_Msg3_size);
|
||||
}
|
||||
trace_pdu(DIRECTION_UPLINK, &UE_mac_inst[module_idP].CCCH_pdu.payload[0],
|
||||
UE_mac_inst[module_idP].RA_Msg3_size, module_idP, WS_C_RNTI,
|
||||
UE_mac_inst[module_idP].crnti,
|
||||
UE_mac_inst[module_idP].txFrame,
|
||||
UE_mac_inst[module_idP].txSubframe, 0, 0);
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -53,7 +53,8 @@ fill_rar(const module_id_t module_idP,
|
||||
RA_t *ra,
|
||||
const frame_t frameP,
|
||||
uint8_t *const dlsch_buffer,
|
||||
const uint16_t N_RB_UL, const uint8_t input_buffer_length)
|
||||
const uint16_t N_RB_UL,
|
||||
const uint8_t input_buffer_length)
|
||||
//------------------------------------------------------------------------------
|
||||
{
|
||||
RA_HEADER_RAPID *rarh = (RA_HEADER_RAPID *) dlsch_buffer;
|
||||
@@ -93,16 +94,9 @@ fill_rar(const module_id_t module_idP,
|
||||
rar[3] =
|
||||
(((ra->msg3_mcs & 0x7) << 5)) | ((ra->msg3_TPC & 7) << 2) |
|
||||
((ra->msg3_ULdelay & 1) << 1) | (ra->msg3_cqireq & 1);
|
||||
|
||||
if (opt_enabled) {
|
||||
trace_pdu(DIRECTION_DOWNLINK, dlsch_buffer, input_buffer_length, module_idP, WS_RA_RNTI, 1,
|
||||
RC.mac[module_idP]->frame, RC.mac[module_idP]->subframe,
|
||||
0, 0);
|
||||
LOG_D(OPT,
|
||||
"[eNB %d][RAPROC] CC_id %d RAR Frame %d trace pdu for rnti %x and rapid %d size %d\n",
|
||||
module_idP, CC_id, frameP, ra->rnti, rarh->RAPID,
|
||||
input_buffer_length);
|
||||
}
|
||||
trace_pdu(DIRECTION_DOWNLINK, dlsch_buffer, input_buffer_length, module_idP, WS_RA_RNTI, 1,
|
||||
RC.mac[module_idP]->frame, RC.mac[module_idP]->subframe,
|
||||
0, 0);
|
||||
|
||||
return (ra->rnti);
|
||||
}
|
||||
@@ -194,24 +188,16 @@ unsigned short fill_rar_br(eNB_MAC_INST *eNB,
|
||||
ra->preamble_index,
|
||||
ra->timing_offset);
|
||||
|
||||
if (opt_enabled) {
|
||||
trace_pdu(DIRECTION_DOWNLINK,
|
||||
dlsch_buffer,
|
||||
input_buffer_length,
|
||||
eNB->Mod_id,
|
||||
WS_RA_RNTI,
|
||||
1,
|
||||
eNB->frame,
|
||||
eNB->subframe,
|
||||
0,
|
||||
0);
|
||||
LOG_D(OPT, "[RAPROC] RAR Frame %d trace pdu for rnti %x and rapid %d size %d\n",
|
||||
frameP,
|
||||
ra->rnti,
|
||||
rarh->RAPID,
|
||||
input_buffer_length);
|
||||
}
|
||||
trace_pdu(DIRECTION_DOWNLINK,
|
||||
dlsch_buffer,
|
||||
input_buffer_length,
|
||||
eNB->Mod_id,
|
||||
WS_RA_RNTI,
|
||||
1,
|
||||
eNB->frame,
|
||||
eNB->subframe,
|
||||
0,
|
||||
0);
|
||||
|
||||
return (ra->rnti);
|
||||
}
|
||||
|
||||
|
||||
@@ -41,103 +41,96 @@
|
||||
#define DEBUG_RAR
|
||||
|
||||
//------------------------------------------------------------------------------
|
||||
uint16_t ue_process_rar(const module_id_t module_idP, const int CC_id, const frame_t frameP, const rnti_t ra_rnti, uint8_t * const dlsch_buffer, rnti_t * const t_crnti, const uint8_t preamble_index, uint8_t * selected_rar_buffer // output argument for storing the selected RAR header and RAR payload
|
||||
)
|
||||
uint16_t ue_process_rar(const module_id_t module_idP, const int CC_id, const frame_t frameP, const rnti_t ra_rnti, uint8_t *const dlsch_buffer, rnti_t *const t_crnti, const uint8_t preamble_index,
|
||||
uint8_t *selected_rar_buffer // output argument for storing the selected RAR header and RAR payload
|
||||
)
|
||||
//------------------------------------------------------------------------------
|
||||
{
|
||||
uint16_t ret = 0; // return value
|
||||
uint16_t ret = 0; // return value
|
||||
RA_HEADER_RAPID *rarh = (RA_HEADER_RAPID *) dlsch_buffer;
|
||||
// RAR_PDU *rar = (RAR_PDU *)(dlsch_buffer+1);
|
||||
uint8_t *rar = (uint8_t *) (dlsch_buffer + 1);
|
||||
// get the last RAR payload for working with CMW500
|
||||
uint8_t n_rarpy = 0; // number of RAR payloads
|
||||
uint8_t n_rarh = 0; // number of MAC RAR subheaders
|
||||
uint8_t best_rx_rapid = -1; // the closest RAPID receive from all RARs
|
||||
|
||||
RA_HEADER_RAPID *rarh = (RA_HEADER_RAPID *) dlsch_buffer;
|
||||
// RAR_PDU *rar = (RAR_PDU *)(dlsch_buffer+1);
|
||||
uint8_t *rar = (uint8_t *) (dlsch_buffer + 1);
|
||||
while (1) {
|
||||
n_rarh++;
|
||||
|
||||
// get the last RAR payload for working with CMW500
|
||||
uint8_t n_rarpy = 0; // number of RAR payloads
|
||||
uint8_t n_rarh = 0; // number of MAC RAR subheaders
|
||||
uint8_t best_rx_rapid = -1; // the closest RAPID receive from all RARs
|
||||
while (1) {
|
||||
n_rarh++;
|
||||
if (rarh->T == 1) {
|
||||
n_rarpy++;
|
||||
LOG_D(MAC, "RAPID %d\n", rarh->RAPID);
|
||||
}
|
||||
|
||||
if (rarh->RAPID == preamble_index) {
|
||||
LOG_D(PHY, "Found RAR with the intended RAPID %d\n",
|
||||
rarh->RAPID);
|
||||
rar = (uint8_t *) (dlsch_buffer + n_rarh + (n_rarpy - 1) * 6);
|
||||
break;
|
||||
}
|
||||
|
||||
if (abs((int) rarh->RAPID - (int) preamble_index) <
|
||||
abs((int) best_rx_rapid - (int) preamble_index)) {
|
||||
best_rx_rapid = rarh->RAPID;
|
||||
rar = (uint8_t *) (dlsch_buffer + n_rarh + (n_rarpy - 1) * 6);
|
||||
}
|
||||
|
||||
if (rarh->E == 0) {
|
||||
LOG_I(PHY,
|
||||
"No RAR found with the intended RAPID. The closest RAPID in all RARs is %d\n",
|
||||
best_rx_rapid);
|
||||
break;
|
||||
} else {
|
||||
rarh++;
|
||||
}
|
||||
};
|
||||
LOG_D(MAC, "number of RAR subheader %d; number of RAR pyloads %d\n",
|
||||
n_rarh, n_rarpy);
|
||||
|
||||
if (CC_id > 0) {
|
||||
LOG_W(MAC, "Should not have received RAR on secondary CCs! \n");
|
||||
return (0xffff);
|
||||
if (rarh->T == 1) {
|
||||
n_rarpy++;
|
||||
LOG_D(MAC, "RAPID %d\n", rarh->RAPID);
|
||||
}
|
||||
|
||||
LOG_I(MAC,
|
||||
"[UE %d][RAPROC] Frame %d Received RAR (%02x|%02x.%02x.%02x.%02x.%02x.%02x) for preamble %d/%d\n",
|
||||
module_idP, frameP, *(uint8_t *) rarh, rar[0], rar[1], rar[2],
|
||||
rar[3], rar[4], rar[5], rarh->RAPID, preamble_index);
|
||||
#ifdef DEBUG_RAR
|
||||
LOG_D(MAC, "[UE %d][RAPROC] rarh->E %d\n", module_idP, rarh->E);
|
||||
LOG_D(MAC, "[UE %d][RAPROC] rarh->T %d\n", module_idP, rarh->T);
|
||||
LOG_D(MAC, "[UE %d][RAPROC] rarh->RAPID %d\n", module_idP,
|
||||
rarh->RAPID);
|
||||
|
||||
// LOG_I(MAC,"[UE %d][RAPROC] rar->R %d\n",module_idP,rar->R);
|
||||
LOG_D(MAC, "[UE %d][RAPROC] rar->Timing_Advance_Command %d\n",
|
||||
module_idP, (((uint16_t) (rar[0] & 0x7f)) << 4) + (rar[1] >> 4));
|
||||
// LOG_I(MAC,"[UE %d][RAPROC] rar->hopping_flag %d\n",module_idP,rar->hopping_flag);
|
||||
// LOG_I(MAC,"[UE %d][RAPROC] rar->rb_alloc %d\n",module_idP,rar->rb_alloc);
|
||||
// LOG_I(MAC,"[UE %d][RAPROC] rar->mcs %d\n",module_idP,rar->mcs);
|
||||
// LOG_I(MAC,"[UE %d][RAPROC] rar->TPC %d\n",module_idP,rar->TPC);
|
||||
// LOG_I(MAC,"[UE %d][RAPROC] rar->UL_delay %d\n",module_idP,rar->UL_delay);
|
||||
// LOG_I(MAC,"[UE %d][RAPROC] rar->cqi_req %d\n",module_idP,rar->cqi_req);
|
||||
LOG_D(MAC, "[UE %d][RAPROC] rar->t_crnti %x\n", module_idP,
|
||||
(uint16_t) rar[5] + (rar[4] << 8));
|
||||
#endif
|
||||
|
||||
if (opt_enabled) {
|
||||
LOG_D(OPT,
|
||||
"[UE %d][RAPROC] CC_id %d RAR Frame %d trace pdu for ra-RNTI %x\n",
|
||||
module_idP, CC_id, frameP, ra_rnti);
|
||||
trace_pdu(DIRECTION_DOWNLINK, (uint8_t *) dlsch_buffer, n_rarh + n_rarpy * 6,
|
||||
module_idP, WS_RA_RNTI, ra_rnti, UE_mac_inst[module_idP].rxFrame,
|
||||
UE_mac_inst[module_idP].rxSubframe, 0, 0);
|
||||
if (rarh->RAPID == preamble_index) {
|
||||
LOG_D(PHY, "Found RAR with the intended RAPID %d\n",
|
||||
rarh->RAPID);
|
||||
rar = (uint8_t *) (dlsch_buffer + n_rarh + (n_rarpy - 1) * 6);
|
||||
break;
|
||||
}
|
||||
|
||||
if (preamble_index == rarh->RAPID) {
|
||||
*t_crnti = (uint16_t) rar[5] + (rar[4] << 8); //rar->t_crnti;
|
||||
UE_mac_inst[module_idP].crnti = *t_crnti; //rar->t_crnti;
|
||||
//return(rar->Timing_Advance_Command);
|
||||
ret = ((((uint16_t) (rar[0] & 0x7f)) << 4) + (rar[1] >> 4));
|
||||
if (abs((int) rarh->RAPID - (int) preamble_index) <
|
||||
abs((int) best_rx_rapid - (int) preamble_index)) {
|
||||
best_rx_rapid = rarh->RAPID;
|
||||
rar = (uint8_t *) (dlsch_buffer + n_rarh + (n_rarpy - 1) * 6);
|
||||
}
|
||||
|
||||
if (rarh->E == 0) {
|
||||
LOG_I(PHY,
|
||||
"No RAR found with the intended RAPID. The closest RAPID in all RARs is %d\n",
|
||||
best_rx_rapid);
|
||||
break;
|
||||
} else {
|
||||
UE_mac_inst[module_idP].crnti = 0;
|
||||
ret = (0xffff);
|
||||
rarh++;
|
||||
}
|
||||
};
|
||||
|
||||
// move the selected RAR to the front of the RA_PDSCH buffer
|
||||
memcpy(selected_rar_buffer + 0, (uint8_t *) rarh, 1);
|
||||
memcpy(selected_rar_buffer + 1, (uint8_t *) rar, 6);
|
||||
LOG_D(MAC, "number of RAR subheader %d; number of RAR pyloads %d\n",
|
||||
n_rarh, n_rarpy);
|
||||
|
||||
return ret;
|
||||
if (CC_id > 0) {
|
||||
LOG_W(MAC, "Should not have received RAR on secondary CCs! \n");
|
||||
return (0xffff);
|
||||
}
|
||||
|
||||
LOG_I(MAC,
|
||||
"[UE %d][RAPROC] Frame %d Received RAR (%02x|%02x.%02x.%02x.%02x.%02x.%02x) for preamble %d/%d\n",
|
||||
module_idP, frameP, *(uint8_t *) rarh, rar[0], rar[1], rar[2],
|
||||
rar[3], rar[4], rar[5], rarh->RAPID, preamble_index);
|
||||
#ifdef DEBUG_RAR
|
||||
LOG_D(MAC, "[UE %d][RAPROC] rarh->E %d\n", module_idP, rarh->E);
|
||||
LOG_D(MAC, "[UE %d][RAPROC] rarh->T %d\n", module_idP, rarh->T);
|
||||
LOG_D(MAC, "[UE %d][RAPROC] rarh->RAPID %d\n", module_idP,
|
||||
rarh->RAPID);
|
||||
// LOG_I(MAC,"[UE %d][RAPROC] rar->R %d\n",module_idP,rar->R);
|
||||
LOG_D(MAC, "[UE %d][RAPROC] rar->Timing_Advance_Command %d\n",
|
||||
module_idP, (((uint16_t) (rar[0] & 0x7f)) << 4) + (rar[1] >> 4));
|
||||
// LOG_I(MAC,"[UE %d][RAPROC] rar->hopping_flag %d\n",module_idP,rar->hopping_flag);
|
||||
// LOG_I(MAC,"[UE %d][RAPROC] rar->rb_alloc %d\n",module_idP,rar->rb_alloc);
|
||||
// LOG_I(MAC,"[UE %d][RAPROC] rar->mcs %d\n",module_idP,rar->mcs);
|
||||
// LOG_I(MAC,"[UE %d][RAPROC] rar->TPC %d\n",module_idP,rar->TPC);
|
||||
// LOG_I(MAC,"[UE %d][RAPROC] rar->UL_delay %d\n",module_idP,rar->UL_delay);
|
||||
// LOG_I(MAC,"[UE %d][RAPROC] rar->cqi_req %d\n",module_idP,rar->cqi_req);
|
||||
LOG_D(MAC, "[UE %d][RAPROC] rar->t_crnti %x\n", module_idP,
|
||||
(uint16_t) rar[5] + (rar[4] << 8));
|
||||
#endif
|
||||
trace_pdu(DIRECTION_DOWNLINK, (uint8_t *) dlsch_buffer, n_rarh + n_rarpy * 6,
|
||||
module_idP, WS_RA_RNTI, ra_rnti, UE_mac_inst[module_idP].rxFrame,
|
||||
UE_mac_inst[module_idP].rxSubframe, 0, 0);
|
||||
|
||||
if (preamble_index == rarh->RAPID) {
|
||||
*t_crnti = (uint16_t) rar[5] + (rar[4] << 8); //rar->t_crnti;
|
||||
UE_mac_inst[module_idP].crnti = *t_crnti; //rar->t_crnti;
|
||||
//return(rar->Timing_Advance_Command);
|
||||
ret = ((((uint16_t) (rar[0] & 0x7f)) << 4) + (rar[1] >> 4));
|
||||
} else {
|
||||
UE_mac_inst[module_idP].crnti = 0;
|
||||
ret = (0xffff);
|
||||
}
|
||||
|
||||
// move the selected RAR to the front of the RA_PDSCH buffer
|
||||
memcpy(selected_rar_buffer + 0, (uint8_t *) rarh, 1);
|
||||
memcpy(selected_rar_buffer + 1, (uint8_t *) rar, 6);
|
||||
return ret;
|
||||
}
|
||||
|
||||
@@ -392,17 +392,9 @@ ue_send_sdu(module_id_t module_idP,
|
||||
#endif
|
||||
VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME
|
||||
(VCD_SIGNAL_DUMPER_FUNCTIONS_UE_SEND_SDU, VCD_FUNCTION_IN);
|
||||
|
||||
//LOG_D(MAC,"sdu: %x.%x.%x\n",sdu[0],sdu[1],sdu[2]);
|
||||
|
||||
if (opt_enabled) {
|
||||
trace_pdu(DIRECTION_DOWNLINK, sdu, sdu_len, module_idP, WS_C_RNTI,
|
||||
UE_mac_inst[module_idP].crnti, frameP, subframeP, 0, 0);
|
||||
LOG_D(OPT,
|
||||
"[UE %d][DLSCH] Frame %d trace pdu for rnti %x with size %d\n",
|
||||
module_idP, frameP, UE_mac_inst[module_idP].crnti, sdu_len);
|
||||
}
|
||||
|
||||
trace_pdu(DIRECTION_DOWNLINK, sdu, sdu_len, module_idP, WS_C_RNTI,
|
||||
UE_mac_inst[module_idP].crnti, frameP, subframeP, 0, 0);
|
||||
payload_ptr =
|
||||
parse_header(sdu, &num_ce, &num_sdu, rx_ces, rx_lcids, rx_lengths,
|
||||
sdu_len);
|
||||
@@ -605,19 +597,16 @@ void ue_decode_si_mbms(module_id_t module_idP, int CC_id, frame_t frameP,
|
||||
stop_meas(&UE_mac_inst[module_idP].rx_si);
|
||||
#endif
|
||||
|
||||
if (opt_enabled == 1) {
|
||||
trace_pdu(DIRECTION_UPLINK,
|
||||
(uint8_t *) pdu,
|
||||
len,
|
||||
module_idP,
|
||||
WS_SI_RNTI,
|
||||
0xffff,
|
||||
UE_mac_inst[module_idP].rxFrame,
|
||||
UE_mac_inst[module_idP].rxSubframe, 0, 0);
|
||||
LOG_D(OPT,
|
||||
"[UE %d][BCH] Frame %d trace pdu for CC_id %d rnti %x with size %d\n",
|
||||
module_idP, frameP, CC_id, 0xffff, len);
|
||||
}
|
||||
trace_pdu(DIRECTION_UPLINK,
|
||||
(uint8_t *) pdu,
|
||||
len,
|
||||
module_idP,
|
||||
WS_SI_RNTI,
|
||||
0xffff,
|
||||
UE_mac_inst[module_idP].rxFrame,
|
||||
UE_mac_inst[module_idP].rxSubframe,
|
||||
0,
|
||||
0);
|
||||
}
|
||||
|
||||
|
||||
@@ -640,20 +629,14 @@ ue_decode_si(module_id_t module_idP, int CC_id, frame_t frameP,
|
||||
#if UE_TIMING_TRACE
|
||||
stop_meas(&UE_mac_inst[module_idP].rx_si);
|
||||
#endif
|
||||
|
||||
if (opt_enabled == 1) {
|
||||
trace_pdu(DIRECTION_UPLINK,
|
||||
(uint8_t *) pdu,
|
||||
len,
|
||||
module_idP,
|
||||
WS_SI_RNTI,
|
||||
0xffff,
|
||||
UE_mac_inst[module_idP].rxFrame,
|
||||
UE_mac_inst[module_idP].rxSubframe, 0, 0);
|
||||
LOG_D(OPT,
|
||||
"[UE %d][BCH] Frame %d trace pdu for CC_id %d rnti %x with size %d\n",
|
||||
module_idP, frameP, CC_id, 0xffff, len);
|
||||
}
|
||||
trace_pdu(DIRECTION_UPLINK,
|
||||
(uint8_t *) pdu,
|
||||
len,
|
||||
module_idP,
|
||||
WS_SI_RNTI,
|
||||
0xffff,
|
||||
UE_mac_inst[module_idP].rxFrame,
|
||||
UE_mac_inst[module_idP].rxSubframe, 0, 0);
|
||||
}
|
||||
|
||||
void
|
||||
@@ -676,20 +659,14 @@ ue_decode_p(module_id_t module_idP, int CC_id, frame_t frameP,
|
||||
#if UE_TIMING_TRACE
|
||||
stop_meas(&UE_mac_inst[module_idP].rx_p);
|
||||
#endif
|
||||
|
||||
if (opt_enabled == 1) {
|
||||
trace_pdu(DIRECTION_UPLINK,
|
||||
(uint8_t *) pdu,
|
||||
len,
|
||||
module_idP,
|
||||
WS_SI_RNTI,
|
||||
P_RNTI,
|
||||
UE_mac_inst[module_idP].rxFrame,
|
||||
UE_mac_inst[module_idP].rxSubframe, 0, 0);
|
||||
LOG_D(OPT,
|
||||
"[UE %d][BCH] Frame %d trace pdu for CC_id %d rnti %x with size %d\n",
|
||||
module_idP, frameP, CC_id, P_RNTI, len);
|
||||
}
|
||||
trace_pdu(DIRECTION_UPLINK,
|
||||
(uint8_t *) pdu,
|
||||
len,
|
||||
module_idP,
|
||||
WS_SI_RNTI,
|
||||
P_RNTI,
|
||||
UE_mac_inst[module_idP].rxFrame,
|
||||
UE_mac_inst[module_idP].rxSubframe, 0, 0);
|
||||
}
|
||||
|
||||
unsigned char *parse_mch_header(unsigned char *mac_header,
|
||||
@@ -2422,17 +2399,10 @@ ue_get_sdu(module_id_t module_idP, int CC_id, frame_t frameP,
|
||||
#if UE_TIMING_TRACE
|
||||
stop_meas(&UE_mac_inst[module_idP].tx_ulsch_sdu);
|
||||
#endif
|
||||
|
||||
if (opt_enabled) {
|
||||
trace_pdu(DIRECTION_UPLINK, ulsch_buffer, buflen, module_idP, WS_C_RNTI,
|
||||
UE_mac_inst[module_idP].crnti,
|
||||
UE_mac_inst[module_idP].txFrame,
|
||||
UE_mac_inst[module_idP].txSubframe, 0, 0);
|
||||
LOG_D(OPT,
|
||||
"[UE %d][ULSCH] Frame %d subframe %d trace pdu for rnti %x with size %d\n",
|
||||
module_idP, frameP, subframe, UE_mac_inst[module_idP].crnti,
|
||||
buflen);
|
||||
}
|
||||
trace_pdu(DIRECTION_UPLINK, ulsch_buffer, buflen, module_idP, WS_C_RNTI,
|
||||
UE_mac_inst[module_idP].crnti,
|
||||
UE_mac_inst[module_idP].txFrame,
|
||||
UE_mac_inst[module_idP].txSubframe, 0, 0);
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -33,30 +33,23 @@
|
||||
#ifndef __LAYER2_NR_MAC_DEFS_H__
|
||||
#define __LAYER2_NR_MAC_DEFS_H__
|
||||
|
||||
|
||||
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
|
||||
#include "platform_types.h"
|
||||
|
||||
#include "NR_DRX-Config.h"
|
||||
#include "NR_SchedulingRequestConfig.h"
|
||||
#include "NR_BSR-Config.h"
|
||||
#include "NR_TAG-Config.h"
|
||||
#include "NR_PHR-Config.h"
|
||||
#include "NR_RNTI-Value.h"
|
||||
|
||||
#include "NR_MIB.h"
|
||||
#include "NR_MAC-CellGroupConfig.h"
|
||||
#include "NR_PhysicalCellGroupConfig.h"
|
||||
#include "NR_SpCellConfig.h"
|
||||
|
||||
#include "NR_ServingCellConfig.h"
|
||||
#include "fapi_nr_ue_interface.h"
|
||||
#include "NR_IF_Module.h"
|
||||
|
||||
#include "PHY/defs_nr_common.h"
|
||||
|
||||
#define NB_NR_UE_MAC_INST 1
|
||||
@@ -72,13 +65,13 @@ typedef enum {
|
||||
typedef struct {
|
||||
|
||||
//// MAC config
|
||||
NR_DRX_Config_t *drx_Config;
|
||||
NR_SchedulingRequestConfig_t *schedulingRequestConfig;
|
||||
NR_BSR_Config_t *bsr_Config;
|
||||
NR_TAG_Config_t *tag_Config;
|
||||
NR_PHR_Config_t *phr_Config;
|
||||
NR_RNTI_Value_t *cs_RNTI;
|
||||
NR_MIB_t *mib;
|
||||
NR_DRX_Config_t *drx_Config;
|
||||
NR_SchedulingRequestConfig_t *schedulingRequestConfig;
|
||||
NR_BSR_Config_t *bsr_Config;
|
||||
NR_TAG_Config_t *tag_Config;
|
||||
NR_PHR_Config_t *phr_Config;
|
||||
NR_RNTI_Value_t *cs_RNTI;
|
||||
NR_MIB_t *mib;
|
||||
|
||||
/// Type0-PDCCH seach space
|
||||
fapi_nr_dl_config_dci_dl_pdu_rel15_t type0_pdcch_dci_config;
|
||||
|
||||
@@ -82,6 +82,8 @@ uint8_t table_9_2_2_1[16][8]={
|
||||
{1,0, 14,4, 0,3,6,9},
|
||||
{1,0, 14,26,0,3,0,0}
|
||||
};
|
||||
|
||||
|
||||
int8_t nr_ue_process_dlsch(module_id_t module_id,
|
||||
int cc_id,
|
||||
uint8_t gNB_index,
|
||||
@@ -217,17 +219,17 @@ int8_t nr_ue_process_dlsch(module_id_t module_id,
|
||||
return 0;
|
||||
}
|
||||
|
||||
int8_t nr_ue_decode_mib(
|
||||
UE_nr_rxtx_proc_t *proc,
|
||||
module_id_t module_id,
|
||||
int cc_id,
|
||||
uint8_t gNB_index,
|
||||
uint8_t extra_bits, // 8bits 38.212 c7.1.1
|
||||
uint32_t ssb_length,
|
||||
uint32_t ssb_index,
|
||||
void *pduP,
|
||||
uint16_t cell_id ){
|
||||
|
||||
int8_t nr_ue_decode_mib(UE_nr_rxtx_proc_t *proc,
|
||||
module_id_t module_id,
|
||||
int cc_id,
|
||||
uint8_t gNB_index,
|
||||
uint8_t extra_bits, // 8bits 38.212 c7.1.1
|
||||
uint32_t ssb_length,
|
||||
uint32_t ssb_index,
|
||||
void *pduP,
|
||||
uint16_t cell_id)
|
||||
{
|
||||
LOG_I(MAC,"[L2][MAC] decode mib\n");
|
||||
|
||||
NR_UE_MAC_INST_t *mac = get_mac_inst(module_id);
|
||||
@@ -435,18 +437,16 @@ int8_t nr_ue_decode_mib(
|
||||
mac->type0_pdcch_dci_config.coreset.precoder_granularity = PRECODER_GRANULARITY_SAME_AS_REG_BUNDLE;
|
||||
mac->type0_pdcch_dci_config.coreset.pdcch_dmrs_scrambling_id = cell_id;
|
||||
|
||||
|
||||
|
||||
// type0-pdcch search space
|
||||
float big_o;
|
||||
float big_m;
|
||||
uint32_t temp;
|
||||
SFN_C_TYPE sfn_c=SFN_C_IMPOSSIBLE; // only valid for mux=1
|
||||
uint32_t n_c=UINT_MAX;
|
||||
uint32_t number_of_search_space_per_slot=UINT_MAX;
|
||||
uint32_t first_symbol_index=UINT_MAX;
|
||||
uint32_t search_space_duration; // element of search space
|
||||
uint32_t coreset_duration; // element of coreset
|
||||
SFN_C_TYPE sfn_c = SFN_C_IMPOSSIBLE; // only valid for mux=1
|
||||
uint32_t n_c = UINT_MAX;
|
||||
uint32_t number_of_search_space_per_slot = UINT_MAX;
|
||||
uint32_t first_symbol_index = UINT_MAX;
|
||||
uint32_t search_space_duration; // element of search space
|
||||
uint32_t coreset_duration; // element of coreset
|
||||
|
||||
// 38.213 table 10.1-1
|
||||
|
||||
@@ -496,7 +496,7 @@ int8_t nr_ue_decode_mib(
|
||||
// 38.213 Table 13-13
|
||||
AssertFatal(index_4lsb == 0, "38.213 Table 13-13 4 LSB out of range\n");
|
||||
// PDCCH monitoring occasions (SFN and slot number) same as SSB frame-slot
|
||||
// sfn_c = SFN_C_EQ_SFN_SSB;
|
||||
//sfn_c = SFN_C_EQ_SFN_SSB;
|
||||
n_c = get_ssb_slot(ssb_index);
|
||||
switch(ssb_index & 0x3){ // ssb_index(i) mod 4
|
||||
case 0:
|
||||
@@ -518,7 +518,7 @@ int8_t nr_ue_decode_mib(
|
||||
// 38.213 Table 13-14
|
||||
AssertFatal(index_4lsb == 0, "38.213 Table 13-14 4 LSB out of range\n");
|
||||
// PDCCH monitoring occasions (SFN and slot number) same as SSB frame-slot
|
||||
// sfn_c = SFN_C_EQ_SFN_SSB;
|
||||
//sfn_c = SFN_C_EQ_SFN_SSB;
|
||||
n_c = get_ssb_slot(ssb_index);
|
||||
switch(ssb_index & 0x7){ // ssb_index(i) mod 8
|
||||
case 0:
|
||||
@@ -560,7 +560,7 @@ int8_t nr_ue_decode_mib(
|
||||
// 38.213 Table 13-15
|
||||
AssertFatal(index_4lsb == 0, "38.213 Table 13-15 4 LSB out of range\n");
|
||||
// PDCCH monitoring occasions (SFN and slot number) same as SSB frame-slot
|
||||
// sfn_c = SFN_C_EQ_SFN_SSB;
|
||||
//sfn_c = SFN_C_EQ_SFN_SSB;
|
||||
n_c = get_ssb_slot(ssb_index);
|
||||
switch(ssb_index & 0x3){ // ssb_index(i) mod 4
|
||||
case 0:
|
||||
@@ -601,8 +601,8 @@ int8_t nr_ue_decode_mib(
|
||||
mac->type0_pdcch_ss_n_c = n_c;
|
||||
|
||||
// fill in the elements in config request inside P5 message
|
||||
mac->phy_config.Mod_id = module_id;
|
||||
mac->phy_config.CC_id = cc_id;
|
||||
mac->phy_config.Mod_id = module_id;
|
||||
mac->phy_config.CC_id = cc_id;
|
||||
|
||||
mac->phy_config.config_req.pbch_config.system_frame_number = frame; // after calculation
|
||||
mac->phy_config.config_req.pbch_config.subcarrier_spacing_common = mac->mib->subCarrierSpacingCommon;
|
||||
@@ -624,7 +624,6 @@ int8_t nr_ue_decode_mib(
|
||||
}
|
||||
|
||||
|
||||
|
||||
// TODO: change to UE parameter, scs: 15KHz, slot duration: 1ms
|
||||
uint32_t get_ssb_frame(uint32_t test){
|
||||
return test;
|
||||
|
||||
@@ -221,7 +221,7 @@ rlc_op_status_t rlc_data_req (const protocol_ctxt_t *const ctxt_pP,
|
||||
nr_rlc_ue_t *ue;
|
||||
nr_rlc_entity_t *rb;
|
||||
|
||||
LOG_D(RLC, "%s rnti %d srb_flag %d rb_id %d mui %d confirm %d sdu_size %d MBMS_flag %d\n",
|
||||
LOG_D(RLC, "%s rnti %d srb_flag %d rb_id %ld mui %d confirm %d sdu_size %d MBMS_flag %d\n",
|
||||
__FUNCTION__, rnti, srb_flagP, rb_idP, muiP, confirmP, sdu_sizeP,
|
||||
MBMS_flagP);
|
||||
|
||||
@@ -824,24 +824,24 @@ rlc_op_status_t rrc_rlc_config_req (
|
||||
}
|
||||
if ((srb_flagP && !(rb_idP >= 1 && rb_idP <= 2)) ||
|
||||
(!srb_flagP && !(rb_idP >= 1 && rb_idP <= 5))) {
|
||||
LOG_E(RLC, "%s:%d:%s: bad rb_id (%d) (is_srb %d)\n", __FILE__, __LINE__, __FUNCTION__, rb_idP, srb_flagP);
|
||||
LOG_E(RLC, "%s:%d:%s: bad rb_id (%ld) (is_srb %d)\n", __FILE__, __LINE__, __FUNCTION__, rb_idP, srb_flagP);
|
||||
exit(1);
|
||||
}
|
||||
nr_rlc_manager_lock(nr_rlc_ue_manager);
|
||||
LOG_D(RLC, "%s:%d:%s: remove rb %d (is_srb %d) for UE %d\n", __FILE__, __LINE__, __FUNCTION__, rb_idP, srb_flagP, ctxt_pP->rnti);
|
||||
LOG_D(RLC, "%s:%d:%s: remove rb %ld (is_srb %d) for UE %d\n", __FILE__, __LINE__, __FUNCTION__, rb_idP, srb_flagP, ctxt_pP->rnti);
|
||||
ue = nr_rlc_manager_get_ue(nr_rlc_ue_manager, ctxt_pP->rnti);
|
||||
if (srb_flagP) {
|
||||
if (ue->srb[rb_idP-1] != NULL) {
|
||||
ue->srb[rb_idP-1]->delete(ue->srb[rb_idP-1]);
|
||||
ue->srb[rb_idP-1] = NULL;
|
||||
} else
|
||||
LOG_W(RLC, "removing non allocated SRB %d, do nothing\n", rb_idP);
|
||||
LOG_W(RLC, "removing non allocated SRB %ld, do nothing\n", rb_idP);
|
||||
} else {
|
||||
if (ue->drb[rb_idP-1] != NULL) {
|
||||
ue->drb[rb_idP-1]->delete(ue->drb[rb_idP-1]);
|
||||
ue->drb[rb_idP-1] = NULL;
|
||||
} else
|
||||
LOG_W(RLC, "removing non allocated DRB %d, do nothing\n", rb_idP);
|
||||
LOG_W(RLC, "removing non allocated DRB %ld, do nothing\n", rb_idP);
|
||||
}
|
||||
/* remove UE if it has no more RB configured */
|
||||
for (i = 0; i < 2; i++)
|
||||
|
||||
@@ -193,7 +193,7 @@ ue_ip_common_class_wireless2ip(
|
||||
break;
|
||||
|
||||
default:
|
||||
printk("[UE_IP_DRV][%s] begin RB %d Inst %d Length %d bytes\n",__FUNCTION__,rb_idP,instP,data_lenP);
|
||||
printk("[UE_IP_DRV][%s] begin RB %ld Inst %d Length %d bytes\n",__FUNCTION__,rb_idP,instP,data_lenP);
|
||||
printk("[UE_IP_DRV][%s] Inst %d: receive unknown message (version=%d)\n",__FUNCTION__,instP,ipv_p->version);
|
||||
}
|
||||
|
||||
@@ -318,7 +318,7 @@ ue_ip_common_ip2wireless(
|
||||
|
||||
if (bytes_wrote != UE_IP_PDCPH_SIZE) {
|
||||
printk("[UE_IP_DRV][%s] problem while writing PDCP's header (bytes wrote = %d)\n",__FUNCTION__,bytes_wrote);
|
||||
printk("rb_id %d, Wrote %d, Header Size %d \n", pdcph.rb_id, bytes_wrote, UE_IP_PDCPH_SIZE);
|
||||
printk("rb_id %ld, Wrote %d, Header Size %d \n", pdcph.rb_id, bytes_wrote, UE_IP_PDCPH_SIZE);
|
||||
priv_p->stats.tx_dropped ++;
|
||||
return;
|
||||
}
|
||||
@@ -326,7 +326,7 @@ ue_ip_common_ip2wireless(
|
||||
bytes_wrote += ue_ip_netlink_send((char *)skb_pP->data,skb_pP->len);
|
||||
|
||||
if (bytes_wrote != skb_pP->len+UE_IP_PDCPH_SIZE) {
|
||||
printk("[UE_IP_DRV][%s] Inst %d, RB_ID %d: problem while writing PDCP's data, bytes_wrote = %d, Data_len %d, PDCPH_SIZE %d\n",
|
||||
printk("[UE_IP_DRV][%s] Inst %d, RB_ID %ld: problem while writing PDCP's data, bytes_wrote = %d, Data_len %d, PDCPH_SIZE %d\n",
|
||||
__FUNCTION__,
|
||||
instP,
|
||||
pdcph.rb_id,
|
||||
|
||||
@@ -34,7 +34,8 @@ void handle_rach(UL_IND_t *UL_info) {
|
||||
NFAPI_SFNSF2SF(UL_RCC_INFO.rach_ind[j].sfn_sf),
|
||||
UL_RCC_INFO.rach_ind[j].rach_indication_body.preamble_list[0].preamble_rel8.preamble,
|
||||
UL_RCC_INFO.rach_ind[j].rach_indication_body.preamble_list[0].preamble_rel8.timing_advance,
|
||||
UL_RCC_INFO.rach_ind[j].rach_indication_body.preamble_list[0].preamble_rel8.rnti,0
|
||||
UL_RCC_INFO.rach_ind[j].rach_indication_body.preamble_list[0].preamble_rel8.rnti,
|
||||
0
|
||||
);
|
||||
free(UL_RCC_INFO.rach_ind[j].rach_indication_body.preamble_list);
|
||||
UL_RCC_INFO.rach_ind[j].rach_indication_body.number_of_preambles = 0;
|
||||
@@ -52,7 +53,8 @@ void handle_rach(UL_IND_t *UL_info) {
|
||||
NFAPI_SFNSF2SF(UL_info->rach_ind.sfn_sf),
|
||||
UL_info->rach_ind.rach_indication_body.preamble_list[0].preamble_rel8.preamble,
|
||||
UL_info->rach_ind.rach_indication_body.preamble_list[0].preamble_rel8.timing_advance,
|
||||
UL_info->rach_ind.rach_indication_body.preamble_list[0].preamble_rel8.rnti,0
|
||||
UL_info->rach_ind.rach_indication_body.preamble_list[0].preamble_rel8.rnti,
|
||||
0
|
||||
);
|
||||
}
|
||||
}
|
||||
@@ -382,10 +384,10 @@ static void dump_ul(UL_IND_t *u) {
|
||||
|
||||
A("XXXX crc_ind %d\n", u->crc_ind.crc_indication_body.number_of_crcs);
|
||||
A("XXXX sr_ind %d\n", u->sr_ind.sr_indication_body.number_of_srs);
|
||||
A("XXXX cqi_ind %d\n", u->cqi_ind.number_of_cqis);
|
||||
A("XXXX cqi_ind %d\n", u->cqi_ind.cqi_indication_body.number_of_cqis);
|
||||
|
||||
for (i = 0; i < u->cqi_ind.number_of_cqis; i++) {
|
||||
nfapi_cqi_indication_pdu_t *v = &u->cqi_ind.cqi_pdu_list[i];
|
||||
for (i = 0; i < u->cqi_ind.cqi_indication_body.number_of_cqis; i++) {
|
||||
nfapi_cqi_indication_pdu_t *v = &u->cqi_ind.cqi_indication_body.cqi_pdu_list[i];
|
||||
A("XXXX cqi ind %d\n", i);
|
||||
A("XXXX cqi ul_cqi %d channel %d\n", v->ul_cqi_information.ul_cqi,
|
||||
v->ul_cqi_information.channel);
|
||||
|
||||
@@ -187,9 +187,8 @@ uint8_t do_MIB_FeMBMS(rrc_eNB_carrier_data_t *carrier, uint32_t N_RB_DL, uint32_
|
||||
LTE_BCCH_BCH_Message_MBMS_t *mib_fembms=&carrier->mib_fembms;
|
||||
uint8_t sfn = (uint8_t)((frame>>2)&0xff);
|
||||
uint16_t *spare = calloc(1,sizeof(uint16_t));
|
||||
uint16_t *additionalNonMBSFNSubframes = calloc(1,sizeof(uint16_t));
|
||||
|
||||
if( spare == NULL || additionalNonMBSFNSubframes == NULL ) abort();
|
||||
if( spare == NULL ) abort();
|
||||
|
||||
switch (N_RB_DL) {
|
||||
case 6:
|
||||
@@ -217,7 +216,7 @@ uint8_t do_MIB_FeMBMS(rrc_eNB_carrier_data_t *carrier, uint32_t N_RB_DL, uint32_
|
||||
break;
|
||||
|
||||
default:
|
||||
AssertFatal(1==0,"Unknown dl_Bandwidth %d\n",N_RB_DL);
|
||||
AssertFatal(1==0,"Unknown dl_Bandwidth %u\n",N_RB_DL);
|
||||
}
|
||||
|
||||
LOG_I(RRC,"[MIB] systemBandwidth %x, additional non MBMS subframes %x, sfn %x\n",
|
||||
@@ -287,7 +286,7 @@ uint8_t do_MIB(rrc_eNB_carrier_data_t *carrier, uint32_t N_RB_DL, uint32_t phich
|
||||
break;
|
||||
|
||||
default:
|
||||
AssertFatal(1==0,"Unknown dl_Bandwidth %d\n",N_RB_DL);
|
||||
AssertFatal(1==0,"Unknown dl_Bandwidth %u\n",N_RB_DL);
|
||||
}
|
||||
|
||||
AssertFatal(phich_Resource <= LTE_PHICH_Config__phich_Resource_two,"Illegal phich_Resource\n");
|
||||
@@ -1021,7 +1020,7 @@ uint8_t do_SIB1(rrc_eNB_carrier_data_t *carrier,
|
||||
sib1_1310->bandwidthReducedAccessRelatedInfo_r13->fdd_DownlinkOrTddSubframeBitmapBR_r13
|
||||
= calloc(1, sizeof(struct LTE_SystemInformationBlockType1_v1310_IEs__bandwidthReducedAccessRelatedInfo_r13__fdd_DownlinkOrTddSubframeBitmapBR_r13));
|
||||
memset(sib1_1310->bandwidthReducedAccessRelatedInfo_r13->fdd_DownlinkOrTddSubframeBitmapBR_r13, 0,
|
||||
sizeof(sizeof(struct LTE_SystemInformationBlockType1_v1310_IEs__bandwidthReducedAccessRelatedInfo_r13__fdd_DownlinkOrTddSubframeBitmapBR_r13)));
|
||||
sizeof(struct LTE_SystemInformationBlockType1_v1310_IEs__bandwidthReducedAccessRelatedInfo_r13__fdd_DownlinkOrTddSubframeBitmapBR_r13));
|
||||
|
||||
if (*configuration->fdd_DownlinkOrTddSubframeBitmapBR_r13[CC_id]) {
|
||||
sib1_1310->bandwidthReducedAccessRelatedInfo_r13->fdd_DownlinkOrTddSubframeBitmapBR_r13->present
|
||||
@@ -1183,7 +1182,7 @@ uint8_t do_SIB1(rrc_eNB_carrier_data_t *carrier,
|
||||
sib1_1310->bandwidthReducedAccessRelatedInfo_r13->fdd_DownlinkOrTddSubframeBitmapBR_r13
|
||||
= calloc(1, sizeof(struct LTE_SystemInformationBlockType1_v1310_IEs__bandwidthReducedAccessRelatedInfo_r13__fdd_DownlinkOrTddSubframeBitmapBR_r13));
|
||||
memset(sib1_1310->bandwidthReducedAccessRelatedInfo_r13->fdd_DownlinkOrTddSubframeBitmapBR_r13, 0,
|
||||
sizeof(sizeof(struct LTE_SystemInformationBlockType1_v1310_IEs__bandwidthReducedAccessRelatedInfo_r13__fdd_DownlinkOrTddSubframeBitmapBR_r13)));
|
||||
sizeof(struct LTE_SystemInformationBlockType1_v1310_IEs__bandwidthReducedAccessRelatedInfo_r13__fdd_DownlinkOrTddSubframeBitmapBR_r13));
|
||||
sib1_1310->bandwidthReducedAccessRelatedInfo_r13->fdd_DownlinkOrTddSubframeBitmapBR_r13->present
|
||||
= LTE_SystemInformationBlockType1_v1310_IEs__bandwidthReducedAccessRelatedInfo_r13__fdd_DownlinkOrTddSubframeBitmapBR_r13_PR_subframePattern10_r13;
|
||||
sib1_1310->bandwidthReducedAccessRelatedInfo_r13->fdd_DownlinkOrTddSubframeBitmapBR_r13->choice.subframePattern10_r13.buf = calloc(2, sizeof(uint8_t));
|
||||
|
||||
@@ -1,13 +1,20 @@
|
||||
|
||||
How to configure wireshark for dissecting LTE protocols:
|
||||
- start the wireshark as a sudoers
|
||||
- goto analyze->enabled prototols
|
||||
- goto analyze->enabled prototols
|
||||
=> enable mac_lte_udp and rlc_lte_udp
|
||||
- goto edit/preferences and expand Protocols
|
||||
- select UDP and check "try heuristic sub-dissectors first"
|
||||
- select MAC-LTE, and check all the options (checkboxes), and set the "which layer info to show in info column" to "MAC info"
|
||||
- select RLC-LTE, and check all the options except the "May see RLC headers only", and set the "call PDCP dissector for DRB PDUs" to "12-bit SN". Optionally you may select the sequence analysis for RLC AM/UM.
|
||||
- goto edit/preferences and expand Protocols
|
||||
- select UDP and check "try heuristic sub-dissectors first"
|
||||
- select MAC-LTE, and check all the options (checkboxes), and set the "which layer info to show in info column" to "MAC info"
|
||||
- select RLC-LTE, and check all the options except the "May see RLC headers only", and
|
||||
set the "call PDCP dissector for DRB PDUs" to "12-bit SN". Optionally you may select the sequence analysis for RLC AM/UM.
|
||||
|
||||
How to use
|
||||
- start eNB or UE with option -W (or -P if you want to make a pcap file)
|
||||
- capture on local interface "lo"
|
||||
- filter out the ICMP/DNS/TCP messages (e.g. "!icmp && !dns && !tcp")
|
||||
How to use
|
||||
- start eNB or UE with option --opt.type wireshark
|
||||
--opt options are:
|
||||
--opt.type none/wireshark/pcap
|
||||
--opt.ip 127.0.0.1 to specify the output IP address (default: 127.0.0.1)
|
||||
output port is always: 9999 (to change it, change constant: PACKET_MAC_LTE_DEFAULT_UDP_PORT in OAI code)
|
||||
--opt.path file_name to specify the file name (pcap)
|
||||
- capture on local interface "lo"
|
||||
- filter out the ICMP/DNS/TCP messages (e.g. "!icmp && !dns && !tcp")
|
||||
|
||||
+6
-11
@@ -110,22 +110,17 @@ typedef enum radio_type_e {
|
||||
* function def
|
||||
*/
|
||||
|
||||
void trace_pdu(int direction,
|
||||
uint8_t *pdu_buffer,
|
||||
unsigned int pdu_buffer_size,
|
||||
int ueid,
|
||||
int rntiType,
|
||||
int rnti,
|
||||
uint16_t sysFrame,
|
||||
uint8_t subframe,
|
||||
int oob_event,
|
||||
int oob_event_value);
|
||||
extern int opt_enabled;
|
||||
#define trace_pdu(x...) if (opt_enabled) trace_pdu_implementation(x)
|
||||
|
||||
void trace_pdu_implementation(int direction, uint8_t *pdu_buffer, unsigned int pdu_buffer_size,
|
||||
int ueid, int rntiType, int rnti, uint16_t sysFrame, uint8_t subframe,
|
||||
int oob_event, int oob_event_value);
|
||||
|
||||
int init_opt(void);
|
||||
|
||||
void terminate_opt(void);
|
||||
|
||||
extern int opt_enabled;
|
||||
//double *timing_analyzer(int index, int direction );
|
||||
|
||||
#endif /* OPT_H_ */
|
||||
|
||||
@@ -386,17 +386,22 @@ static int MAC_LTE_PCAP_WritePDU(MAC_Context_Info_t *context,
|
||||
extern RAN_CONTEXT_t RC;
|
||||
#include <openair1/PHY/phy_extern_ue.h>
|
||||
/* Remote serveraddress (where Wireshark is running) */
|
||||
void trace_pdu(int direction, uint8_t *pdu_buffer, unsigned int pdu_buffer_size,
|
||||
int ueid, int rntiType, int rnti, uint16_t sysFrameNumber, uint8_t subFrameNumber, int oob_event,
|
||||
int oob_event_value) {
|
||||
void trace_pdu_implementation(int direction, uint8_t *pdu_buffer, unsigned int pdu_buffer_size,
|
||||
int ueid, int rntiType, int rnti, uint16_t sysFrameNumber, uint8_t subFrameNumber, int oob_event,
|
||||
int oob_event_value) {
|
||||
MAC_Context_Info_t pdu_context;
|
||||
int radioType=FDD_RADIO;
|
||||
LOG_D(OPT,"sending packet to wireshark: direction=%s, size: %d, ueid: %d, rnti: %x, frame/sf: %d.%d\n",
|
||||
direction?"DL":"UL", pdu_buffer_size, ueid, rnti, sysFrameNumber,subFrameNumber);
|
||||
|
||||
if (RC.eNB[0][0]!=NULL)
|
||||
if (RC.eNB && RC.eNB[0][0]!=NULL)
|
||||
radioType=RC.eNB[0][0]->frame_parms.frame_type== FDD ? FDD_RADIO:TDD_RADIO;
|
||||
|
||||
if (PHY_vars_UE_g[0][0] != NULL)
|
||||
else if (PHY_vars_UE_g && PHY_vars_UE_g[0][0] != NULL)
|
||||
radioType=PHY_vars_UE_g[0][0]->frame_parms.frame_type== FDD ? FDD_RADIO:TDD_RADIO;
|
||||
else {
|
||||
LOG_E(OPT,"not a eNB neither a UE!!! \n");
|
||||
return;
|
||||
}
|
||||
|
||||
switch (opt_type) {
|
||||
case OPT_WIRESHARK :
|
||||
|
||||
@@ -195,7 +195,7 @@ void server_socket_tcp_ip4()
|
||||
|
||||
|
||||
/* create new thread for the new connection */
|
||||
threadCreate(&id, (void *)recv_ip4_tcp, (void*)csock), "OTG", -1, OAI_PRIORITY_RT_LOW);
|
||||
threadCreate(&id, (void *)recv_ip4_tcp, (void*)csock, "OTG", -1, OAI_PRIORITY_RT_LOW);
|
||||
LOG_I(OTG,"SOCKET:: TCP-IP4 :: Client n=%d finish transmission\n", cmpt_cl);
|
||||
cmpt_cl+=1;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user