Commit c22f10aa authored by OAI-admin's avatar OAI-admin

Add PHR/BSR to RRCConnectionSetup + add some debug for DLSCH scheduling

parent 9b9ef32a
...@@ -1368,7 +1368,7 @@ uint32_t rx_pucch(PHY_VARS_eNB *eNB, ...@@ -1368,7 +1368,7 @@ uint32_t rx_pucch(PHY_VARS_eNB *eNB,
LOG_D(PHY,"PUCCH 1a/b: subframe %d : stat %d,%d (pos %d)\n",subframe,stat_re,stat_im, LOG_D(PHY,"PUCCH 1a/b: subframe %d : stat %d,%d (pos %d)\n",subframe,stat_re,stat_im,
(subframe<<10) + (eNB->pucch1ab_stats_cnt[UE_id][subframe])); (subframe<<10) + (eNB->pucch1ab_stats_cnt[UE_id][subframe]));
LOG_D(PHY,"PUCCH 1a/b: subframe %d : sigma2_dB %d, stat_max %d, pucch1_thres %d\n",subframe,sigma2_dB,dB_fixed(stat_max),pucch1_thres); LOG_I(PHY,"In pucch.c PUCCH 1a/b: ACK subframe %d : sigma2_dB %d, stat_max %d, pucch1_thres %d\n",subframe,sigma2_dB,dB_fixed(stat_max),pucch1_thres);
eNB->pucch1ab_stats[UE_id][(subframe<<11) + 2*(eNB->pucch1ab_stats_cnt[UE_id][subframe])] = (stat_re); eNB->pucch1ab_stats[UE_id][(subframe<<11) + 2*(eNB->pucch1ab_stats_cnt[UE_id][subframe])] = (stat_re);
eNB->pucch1ab_stats[UE_id][(subframe<<11) + 1+2*(eNB->pucch1ab_stats_cnt[UE_id][subframe])] = (stat_im); eNB->pucch1ab_stats[UE_id][(subframe<<11) + 1+2*(eNB->pucch1ab_stats_cnt[UE_id][subframe])] = (stat_im);
...@@ -1385,8 +1385,9 @@ uint32_t rx_pucch(PHY_VARS_eNB *eNB, ...@@ -1385,8 +1385,9 @@ uint32_t rx_pucch(PHY_VARS_eNB *eNB,
#if defined(USRP_REC_PLAY) #if defined(USRP_REC_PLAY)
LOG_D(PHY,"PUCCH 1a/b: NAK subframe %d : sigma2_dB %d, stat_max %d, pucch1_thres %d\n",subframe,sigma2_dB,dB_fixed(stat_max),pucch1_thres); LOG_D(PHY,"PUCCH 1a/b: NAK subframe %d : sigma2_dB %d, stat_max %d, pucch1_thres %d\n",subframe,sigma2_dB,dB_fixed(stat_max),pucch1_thres);
#else #else
LOG_I(PHY,"PUCCH 1a/b: subframe %d : sigma2_dB %d, stat_max %d, pucch1_thres %d\n",subframe,sigma2_dB,dB_fixed(stat_max),pucch1_thres); LOG_I(PHY,"In pucch.c PUCCH 1a/b: NAK subframe %d : sigma2_dB %d, stat_max %d, pucch1_thres %d\n",subframe,sigma2_dB,dB_fixed(stat_max),pucch1_thres);
#endif #endif
*payload = 4; // DTX *payload = 4; // DTX
((int16_t*)&eNB->pucch1ab_stats[UE_id][(subframe<<10) + (eNB->pucch1ab_stats_cnt[UE_id][subframe])])[0] = (int16_t)(stat_re); ((int16_t*)&eNB->pucch1ab_stats[UE_id][(subframe<<10) + (eNB->pucch1ab_stats_cnt[UE_id][subframe])])[0] = (int16_t)(stat_re);
((int16_t*)&eNB->pucch1ab_stats[UE_id][(subframe<<10) + (eNB->pucch1ab_stats_cnt[UE_id][subframe])])[1] = (int16_t)(stat_im); ((int16_t*)&eNB->pucch1ab_stats[UE_id][(subframe<<10) + (eNB->pucch1ab_stats_cnt[UE_id][subframe])])[1] = (int16_t)(stat_im);
......
...@@ -680,7 +680,7 @@ eNB_dlsch_ulsch_scheduler(module_id_t module_idP, frame_t frameP, ...@@ -680,7 +680,7 @@ eNB_dlsch_ulsch_scheduler(module_id_t module_idP, frame_t frameP,
schedule_CSI(module_idP, frameP, subframeP); schedule_CSI(module_idP, frameP, subframeP);
#if (LTE_RRC_VERSION >= MAKE_VERSION(14, 0, 0)) #if (LTE_RRC_VERSION >= MAKE_VERSION(14, 0, 0))
// This schedules DLSCH in subframeP // This schedules DLSCH in subframeP
schedule_ue_spec_br(module_idP,frameP,subframeP); schedule_ue_spec_br(module_idP, frameP, subframeP);
#endif #endif
// This schedules DLSCH in subframeP // This schedules DLSCH in subframeP
if (schedule_ue_spec_p != NULL) { if (schedule_ue_spec_p != NULL) {
......
...@@ -2007,6 +2007,8 @@ schedule_ue_spec_br(module_id_t module_idP, ...@@ -2007,6 +2007,8 @@ schedule_ue_spec_br(module_id_t module_idP,
/* Simple scheduler for 1 repetition, 1 HARQ */ /* Simple scheduler for 1 repetition, 1 HARQ */
if (subframeP == 5) { // MPDCCH if (subframeP == 5) { // MPDCCH
LOG_I(MAC, "MPDCCH round_DL = %d in frame %d subframe %d\n", round_DL, frameP, subframeP);
if (round_DL == 8) { if (round_DL == 8) {
rlc_status.bytes_in_buffer = 0; rlc_status.bytes_in_buffer = 0;
...@@ -2035,7 +2037,7 @@ schedule_ue_spec_br(module_id_t module_idP, ...@@ -2035,7 +2037,7 @@ schedule_ue_spec_br(module_id_t module_idP,
header_len_dcch = 2; // 2 bytes DCCH SDU subheader header_len_dcch = 2; // 2 bytes DCCH SDU subheader
if (TBS - ta_len-header_len_dcch > 0 ) { if (TBS - ta_len-header_len_dcch > 0 ) {
LOG_I(MAC,"Calling mac_rlc_status_ind for DCCH\n"); LOG_D(MAC, "Calling mac_rlc_status_ind for DCCH\n");
rlc_status = mac_rlc_status_ind(module_idP, rlc_status = mac_rlc_status_ind(module_idP,
rnti, rnti,
...@@ -2080,7 +2082,7 @@ schedule_ue_spec_br(module_id_t module_idP, ...@@ -2080,7 +2082,7 @@ schedule_ue_spec_br(module_id_t module_idP,
T_INT(DCCH), T_INT(DCCH),
T_INT(sdu_lengths[0])); T_INT(sdu_lengths[0]));
LOG_I(MAC,"[eNB %d][DCCH] CC_id %d Got %d bytes from RLC\n", LOG_D(MAC,"[eNB %d][DCCH] CC_id %d Got %d bytes from RLC\n",
module_idP, module_idP,
CC_id, CC_id,
sdu_lengths[0]); sdu_lengths[0]);
...@@ -2223,7 +2225,7 @@ schedule_ue_spec_br(module_id_t module_idP, ...@@ -2223,7 +2225,7 @@ schedule_ue_spec_br(module_id_t module_idP,
T_INT(lcid), T_INT(lcid),
T_INT(sdu_lengths[num_sdus])); T_INT(sdu_lengths[num_sdus]));
LOG_I(MAC,"[eNB %d][USER-PLANE DEFAULT DRB] Got %d bytes for DTCH %d \n", LOG_D(MAC,"[eNB %d][USER-PLANE DEFAULT DRB] Got %d bytes for DTCH %d \n",
module_idP, module_idP,
sdu_lengths[num_sdus], sdu_lengths[num_sdus],
lcid); lcid);
...@@ -2475,11 +2477,12 @@ schedule_ue_spec_br(module_id_t module_idP, ...@@ -2475,11 +2477,12 @@ schedule_ue_spec_br(module_id_t module_idP,
UE_template->mcs[harq_pid] = dl_config_pdu->mpdcch_pdu.mpdcch_pdu_rel13.mcs; UE_template->mcs[harq_pid] = dl_config_pdu->mpdcch_pdu.mpdcch_pdu_rel13.mcs;
} }
} else if ((subframeP == 7) && (round_DL < 8)) { // DLSCH } else if ((subframeP == 7) && (round_DL < 8)) { // DLSCH
LOG_I(MAC, "DLSCH round_DL = %d in frame %d subframe %d\n", round_DL, frameP, subframeP);
int absSF = (frameP * 10) + subframeP; int absSF = (frameP * 10) + subframeP;
/* Have to check that MPDCCH was generated */ /* Have to check that MPDCCH was generated */
LOG_I (MAC, "[eNB %d][RAPROC] CC_id %d Frame %d, subframeP %d: Generating DLSCH (ce_level %d RNTI %x)\n", LOG_I(MAC, "[eNB %d][RAPROC] CC_id %d Frame %d, subframeP %d: Generating DLSCH (ce_level %d RNTI %x)\n",
module_idP, module_idP,
CC_id, CC_id,
frameP, frameP,
......
...@@ -2505,8 +2505,8 @@ UE_is_to_be_scheduled(module_id_t module_idP, ...@@ -2505,8 +2505,8 @@ UE_is_to_be_scheduled(module_id_t module_idP,
if (UE_template->scheduled_ul_bytes < UE_template->estimated_ul_buffer || if (UE_template->scheduled_ul_bytes < UE_template->estimated_ul_buffer ||
UE_template->ul_SR > 0 || // uplink scheduling request UE_template->ul_SR > 0 || // uplink scheduling request
(UE_sched_ctl->ul_inactivity_timer > 20 && UE_sched_ctl->ul_scheduled == 0) || // every 2 frames when RRC_CONNECTED (UE_sched_ctl->ul_inactivity_timer > 200 && UE_sched_ctl->ul_scheduled == 0) || // every 2 frames when RRC_CONNECTED
(UE_sched_ctl->ul_inactivity_timer > 10 && (UE_sched_ctl->ul_inactivity_timer > 100 &&
UE_sched_ctl->ul_scheduled == 0 && UE_sched_ctl->ul_scheduled == 0 &&
mac_eNB_get_rrc_status(module_idP, mac_eNB_get_rrc_status(module_idP,
ue_rnti) < RRC_CONNECTED)) { // every Frame when not RRC_CONNECTED ue_rnti) < RRC_CONNECTED)) { // every Frame when not RRC_CONNECTED
...@@ -4074,6 +4074,8 @@ extract_harq(module_id_t mod_idP, ...@@ -4074,6 +4074,8 @@ extract_harq(module_id_t mod_idP,
} }
} }
LOG_I(PHY, "In extract_harq(): pdu[0] = %d for harq_pid = %d\n", pdu[0], harq_pid);
if (pdu[0] == 1) { // ACK if (pdu[0] == 1) { // ACK
sched_ctl->round[CC_idP][harq_pid] = 8; // release HARQ process sched_ctl->round[CC_idP][harq_pid] = 8; // release HARQ process
sched_ctl->tbcnt[CC_idP][harq_pid] = 0; sched_ctl->tbcnt[CC_idP][harq_pid] = 0;
......
...@@ -2017,6 +2017,7 @@ void schedule_ulsch_rnti_emtc(module_id_t module_idP, ...@@ -2017,6 +2017,7 @@ void schedule_ulsch_rnti_emtc(module_id_t module_idP,
RC.eNB[module_idP][CC_id]->pusch_stats_BO[UE_id][(frameP*10)+subframeP] = UE_template->estimated_ul_buffer; 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); VCD_SIGNAL_DUMPER_DUMP_VARIABLE_BY_NAME(VCD_SIGNAL_DUMPER_VARIABLES_UE0_BO, UE_template->estimated_ul_buffer);
//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 == 5)) { if ((UE_template->ul_SR > 0 || round_UL > 0 || status < RRC_CONNECTED) && (subframeP == 5)) {
/* /*
* if there is information on bsr of DCCH, DTCH, * if there is information on bsr of DCCH, DTCH,
......
...@@ -3083,6 +3083,27 @@ uint8_t do_RRCConnectionSetup_BR( ...@@ -3083,6 +3083,27 @@ uint8_t do_RRCConnectionSetup_BR(
physicalConfigDedicated2->ext7->csi_RS_ConfigNZPToReleaseListExt_r13 = NULL; physicalConfigDedicated2->ext7->csi_RS_ConfigNZPToReleaseListExt_r13 = NULL;
rrcConnectionSetup->criticalExtensions.choice.c1.choice.rrcConnectionSetup_r8.radioResourceConfigDedicated.mac_MainConfig = CALLOC(1,sizeof(struct LTE_RadioResourceConfigDedicated__mac_MainConfig));
rrcConnectionSetup->criticalExtensions.choice.c1.choice.rrcConnectionSetup_r8.radioResourceConfigDedicated.mac_MainConfig->present = LTE_RadioResourceConfigDedicated__mac_MainConfig_PR_explicitValue;
LTE_MAC_MainConfig_t *mac_MainConfig = &rrcConnectionSetup->criticalExtensions.choice.c1.choice.rrcConnectionSetup_r8.radioResourceConfigDedicated.mac_MainConfig->choice.explicitValue;
mac_MainConfig->ul_SCH_Config = CALLOC(1, sizeof(*mac_MainConfig->ul_SCH_Config));
//long *maxHARQ_Tx = CALLOC(1, sizeof(long));
//*maxHARQ_Tx = LTE_MAC_MainConfig__ul_SCH_Config__maxHARQ_Tx_n5;
long *periodicBSR_Timer = CALLOC(1, sizeof(long));
*periodicBSR_Timer = LTE_PeriodicBSR_Timer_r12_sf64;
//mac_MainConfig->ul_SCH_Config->maxHARQ_Tx = maxHARQ_Tx;
mac_MainConfig->ul_SCH_Config->periodicBSR_Timer = periodicBSR_Timer;
mac_MainConfig->ul_SCH_Config->retxBSR_Timer = LTE_RetxBSR_Timer_r12_sf320;
mac_MainConfig->ul_SCH_Config->ttiBundling = 0; // FALSE
mac_MainConfig->timeAlignmentTimerDedicated = LTE_TimeAlignmentTimer_infinity;
mac_MainConfig->drx_Config = NULL;
mac_MainConfig->phr_Config = CALLOC(1, sizeof(*mac_MainConfig->phr_Config));
mac_MainConfig->phr_Config->present = LTE_MAC_MainConfig__phr_Config_PR_setup;
mac_MainConfig->phr_Config->choice.setup.periodicPHR_Timer = LTE_MAC_MainConfig__phr_Config__setup__periodicPHR_Timer_sf20; // sf20 = 20 subframes
mac_MainConfig->phr_Config->choice.setup.prohibitPHR_Timer = LTE_MAC_MainConfig__phr_Config__setup__prohibitPHR_Timer_sf20; // sf20 = 20 subframes
mac_MainConfig->phr_Config->choice.setup.dl_PathlossChange = LTE_MAC_MainConfig__phr_Config__setup__dl_PathlossChange_dB3; // Value dB1 =1 dB, dB3 = 3 dB
rrcConnectionSetup->rrc_TransactionIdentifier = Transaction_id; rrcConnectionSetup->rrc_TransactionIdentifier = Transaction_id;
rrcConnectionSetup->criticalExtensions.present = LTE_RRCConnectionSetup__criticalExtensions_PR_c1; rrcConnectionSetup->criticalExtensions.present = LTE_RRCConnectionSetup__criticalExtensions_PR_c1;
rrcConnectionSetup->criticalExtensions.choice.c1.present =LTE_RRCConnectionSetup__criticalExtensions__c1_PR_rrcConnectionSetup_r8 ; rrcConnectionSetup->criticalExtensions.choice.c1.present =LTE_RRCConnectionSetup__criticalExtensions__c1_PR_rrcConnectionSetup_r8 ;
...@@ -3091,7 +3112,7 @@ uint8_t do_RRCConnectionSetup_BR( ...@@ -3091,7 +3112,7 @@ uint8_t do_RRCConnectionSetup_BR(
rrcConnectionSetup->criticalExtensions.choice.c1.choice.rrcConnectionSetup_r8.radioResourceConfigDedicated.drb_ToReleaseList = NULL; rrcConnectionSetup->criticalExtensions.choice.c1.choice.rrcConnectionSetup_r8.radioResourceConfigDedicated.drb_ToReleaseList = NULL;
rrcConnectionSetup->criticalExtensions.choice.c1.choice.rrcConnectionSetup_r8.radioResourceConfigDedicated.sps_Config = NULL; rrcConnectionSetup->criticalExtensions.choice.c1.choice.rrcConnectionSetup_r8.radioResourceConfigDedicated.sps_Config = NULL;
rrcConnectionSetup->criticalExtensions.choice.c1.choice.rrcConnectionSetup_r8.radioResourceConfigDedicated.physicalConfigDedicated = physicalConfigDedicated2; rrcConnectionSetup->criticalExtensions.choice.c1.choice.rrcConnectionSetup_r8.radioResourceConfigDedicated.physicalConfigDedicated = physicalConfigDedicated2;
rrcConnectionSetup->criticalExtensions.choice.c1.choice.rrcConnectionSetup_r8.radioResourceConfigDedicated.mac_MainConfig = NULL; // rrcConnectionSetup->criticalExtensions.choice.c1.choice.rrcConnectionSetup_r8.radioResourceConfigDedicated.mac_MainConfig = NULL;
#ifdef XER_PRINT #ifdef XER_PRINT
xer_fprint(stdout, &asn_DEF_DL_CCCH_Message, (void*)&dl_ccch_msg); xer_fprint(stdout, &asn_DEF_DL_CCCH_Message, (void*)&dl_ccch_msg);
......
...@@ -3261,7 +3261,7 @@ rrc_eNB_generate_defaultRRCConnectionReconfiguration(const protocol_ctxt_t *cons ...@@ -3261,7 +3261,7 @@ rrc_eNB_generate_defaultRRCConnectionReconfiguration(const protocol_ctxt_t *cons
#endif #endif
LOG_I(RRC, LOG_I(RRC,
"[eNB %d] Frame %d, Logical Channel DL-DCCH, Generate LTE_RRCConnectionReconfiguration (bytes %d, UE id %x)\n", "[eNB %d] Frame %d, Hello there! Logical Channel DL-DCCH, Generate LTE_RRCConnectionReconfiguration (bytes %d, UE id %x)\n",
ctxt_pP->module_id, ctxt_pP->frame, size, ue_context_pP->ue_context.rnti); ctxt_pP->module_id, ctxt_pP->frame, size, ue_context_pP->ue_context.rnti);
LOG_D(RRC, LOG_D(RRC,
"[FRAME %05d][RRC_eNB][MOD %u][][--- PDCP_DATA_REQ/%d Bytes (rrcConnectionReconfiguration to UE %x MUI %d) --->][PDCP][MOD %u][RB %u]\n", "[FRAME %05d][RRC_eNB][MOD %u][][--- PDCP_DATA_REQ/%d Bytes (rrcConnectionReconfiguration to UE %x MUI %d) --->][PDCP][MOD %u][RB %u]\n",
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment