add debug in eNB_scheduler_ulsch.c
This commit is contained in:
@@ -133,6 +133,16 @@ rx_sdu(const module_id_t enb_mod_idP,
|
|||||||
memset(rx_lcids, 0, NB_RB_MAX * sizeof(unsigned char));
|
memset(rx_lcids, 0, NB_RB_MAX * sizeof(unsigned char));
|
||||||
memset(rx_lengths, 0, NB_RB_MAX * sizeof(unsigned short));
|
memset(rx_lengths, 0, NB_RB_MAX * sizeof(unsigned short));
|
||||||
|
|
||||||
|
// LAD
|
||||||
|
if (UE_id == -1) {
|
||||||
|
LOG_W(MAC, "[MAC] UE_id = -1 ; RNTI = %x ; frame = %d ; subframe = %d ; sdu_length = %d ; sdu = %d\n",
|
||||||
|
rntiP,
|
||||||
|
frameP,
|
||||||
|
subframeP,
|
||||||
|
sdu_lenP,
|
||||||
|
*sduP);
|
||||||
|
}
|
||||||
|
|
||||||
start_meas(&mac->rx_ulsch_sdu);
|
start_meas(&mac->rx_ulsch_sdu);
|
||||||
|
|
||||||
VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME(VCD_SIGNAL_DUMPER_FUNCTIONS_RX_SDU, 1);
|
VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME(VCD_SIGNAL_DUMPER_FUNCTIONS_RX_SDU, 1);
|
||||||
@@ -182,6 +192,13 @@ rx_sdu(const module_id_t enb_mod_idP,
|
|||||||
}
|
}
|
||||||
|
|
||||||
/* update bytes to schedule */
|
/* update bytes to schedule */
|
||||||
|
|
||||||
|
// LAD
|
||||||
|
LOG_W(MAC, "[MAC] UE_id != -1 and sduP != NULL : first_rb = %d ; scheduled_ul_bytes = %d ; TBS_UL = %d\n",
|
||||||
|
first_rb,
|
||||||
|
UE_list->UE_template[CC_idP][UE_id].scheduled_ul_bytes,
|
||||||
|
UE_list->UE_template[CC_idP][UE_id].TBS_UL[harq_pid]);
|
||||||
|
|
||||||
UE_list->UE_template[CC_idP][UE_id].scheduled_ul_bytes -= UE_list->UE_template[CC_idP][UE_id].TBS_UL[harq_pid];
|
UE_list->UE_template[CC_idP][UE_id].scheduled_ul_bytes -= UE_list->UE_template[CC_idP][UE_id].TBS_UL[harq_pid];
|
||||||
|
|
||||||
if (UE_list->UE_template[CC_idP][UE_id].scheduled_ul_bytes < 0) {
|
if (UE_list->UE_template[CC_idP][UE_id].scheduled_ul_bytes < 0) {
|
||||||
@@ -189,14 +206,16 @@ rx_sdu(const module_id_t enb_mod_idP,
|
|||||||
}
|
}
|
||||||
|
|
||||||
} else { // sduP == NULL => error
|
} else { // sduP == NULL => error
|
||||||
LOG_I(MAC, "[eNB %d][PUSCH %d] CC_id %d %d.%d ULSCH in error in round %d, ul_cqi %d\n",
|
LOG_W(MAC, "[eNB %d][PUSCH %d] CC_id %d %d.%d ULSCH in error in round %d, ul_cqi %d, UE_id %d, RNTI %x\n",
|
||||||
enb_mod_idP,
|
enb_mod_idP,
|
||||||
harq_pid,
|
harq_pid,
|
||||||
CC_idP,
|
CC_idP,
|
||||||
frameP,
|
frameP,
|
||||||
subframeP,
|
subframeP,
|
||||||
UE_list->UE_sched_ctrl[UE_id].round_UL[CC_idP][harq_pid],
|
UE_list->UE_sched_ctrl[UE_id].round_UL[CC_idP][harq_pid],
|
||||||
ul_cqi);
|
ul_cqi,
|
||||||
|
UE_id,
|
||||||
|
current_rnti);
|
||||||
|
|
||||||
if (ul_cqi > 200) { // too high energy pattern
|
if (ul_cqi > 200) { // too high energy pattern
|
||||||
UE_list->UE_sched_ctrl[UE_id].pusch_snr[CC_idP] = ul_cqi;
|
UE_list->UE_sched_ctrl[UE_id].pusch_snr[CC_idP] = ul_cqi;
|
||||||
@@ -271,9 +290,14 @@ rx_sdu(const module_id_t enb_mod_idP,
|
|||||||
RA_id,
|
RA_id,
|
||||||
ul_cqi);
|
ul_cqi);
|
||||||
|
|
||||||
// first_rb = ra->msg3_first_rb; // Should it be ra[RA_id]???
|
|
||||||
first_rb = ra[RA_id].msg3_first_rb;
|
first_rb = ra[RA_id].msg3_first_rb;
|
||||||
|
|
||||||
|
// LAD
|
||||||
|
LOG_W(MAC, "[MAC] UE_id == -1 : first_rb = %d ; scheduled_ul_bytes = %d ; TBS_UL = %d\n",
|
||||||
|
first_rb,
|
||||||
|
UE_list->UE_template[CC_idP][UE_id].scheduled_ul_bytes,
|
||||||
|
UE_list->UE_template[CC_idP][UE_id].TBS_UL[harq_pid]);
|
||||||
|
|
||||||
if (sduP == NULL) { // we've got an error on Msg3
|
if (sduP == NULL) { // we've got an error on Msg3
|
||||||
LOG_I(MAC, "[eNB %d] CC_id %d, RA %d ULSCH in error in round %d/%d\n",
|
LOG_I(MAC, "[eNB %d] CC_id %d, RA %d ULSCH in error in round %d/%d\n",
|
||||||
enb_mod_idP,
|
enb_mod_idP,
|
||||||
@@ -287,6 +311,23 @@ rx_sdu(const module_id_t enb_mod_idP,
|
|||||||
} else {
|
} else {
|
||||||
first_rb = UE_list->UE_template[CC_idP][UE_id].first_rb_ul[harq_pid]; // UE_id = -1 !?
|
first_rb = UE_list->UE_template[CC_idP][UE_id].first_rb_ul[harq_pid]; // UE_id = -1 !?
|
||||||
ra[RA_id].msg3_round++;
|
ra[RA_id].msg3_round++;
|
||||||
|
|
||||||
|
// LAD
|
||||||
|
LOG_W(MAC, "[MAC] [UEINFO] UE_id = %d ; RNTI_ue_template = %x ; RNTI_sdu = %x\n",
|
||||||
|
UE_id,
|
||||||
|
UE_list->UE_template[CC_idP][UE_id].rnti,
|
||||||
|
current_rnti);
|
||||||
|
|
||||||
|
// LAD
|
||||||
|
LOG_W(MAC, "[MAC] UE_id == -1 and sduP == NULL : first_rb = %d ; scheduled_ul_bytes = %d ; TBS_UL = %d\n",
|
||||||
|
first_rb,
|
||||||
|
UE_list->UE_template[CC_idP][UE_id].scheduled_ul_bytes,
|
||||||
|
UE_list->UE_template[CC_idP][UE_id].TBS_UL[harq_pid]);
|
||||||
|
|
||||||
|
// LAD
|
||||||
|
LOG_W(MAC, "[MAC] [RAPROC] msg3_subframe = %d ; msg3_frame = %d\n",
|
||||||
|
ra[RA_id].Msg3_subframe,
|
||||||
|
ra[RA_id].Msg3_frame);
|
||||||
|
|
||||||
/* Prepare handling of retransmission */
|
/* Prepare handling of retransmission */
|
||||||
get_Msg3allocret(&mac->common_channels[CC_idP],
|
get_Msg3allocret(&mac->common_channels[CC_idP],
|
||||||
@@ -295,6 +336,11 @@ rx_sdu(const module_id_t enb_mod_idP,
|
|||||||
&ra[RA_id].Msg3_frame,
|
&ra[RA_id].Msg3_frame,
|
||||||
&ra[RA_id].Msg3_subframe);
|
&ra[RA_id].Msg3_subframe);
|
||||||
|
|
||||||
|
// LAD
|
||||||
|
LOG_W(MAC, "[MAC] [RAPROC] After update: msg3_subframe = %d ; msg3_frame = %d\n",
|
||||||
|
ra[RA_id].Msg3_subframe,
|
||||||
|
ra[RA_id].Msg3_frame);
|
||||||
|
|
||||||
add_msg3(enb_mod_idP, CC_idP, &ra[RA_id], frameP, subframeP);
|
add_msg3(enb_mod_idP, CC_idP, &ra[RA_id], frameP, subframeP);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -348,6 +394,12 @@ rx_sdu(const module_id_t enb_mod_idP,
|
|||||||
mac->eNB_stats[CC_idP].total_ulsch_pdus_rx += 1;
|
mac->eNB_stats[CC_idP].total_ulsch_pdus_rx += 1;
|
||||||
UE_list->UE_sched_ctrl[UE_id].round_UL[CC_idP][harq_pid] = 0; // can UE_id = -1 !?
|
UE_list->UE_sched_ctrl[UE_id].round_UL[CC_idP][harq_pid] = 0; // can UE_id = -1 !?
|
||||||
|
|
||||||
|
// LAD
|
||||||
|
LOG_W(MAC, "[MAC] [UEINFO] UE_id = %d ; RNTI_ue_template = %x ; RNTI_sdu = %x\n",
|
||||||
|
UE_id,
|
||||||
|
UE_list->UE_template[CC_idP][UE_id].rnti,
|
||||||
|
current_rnti);
|
||||||
|
|
||||||
/* Control element */
|
/* Control element */
|
||||||
for (int i = 0; i < num_ce; i++) {
|
for (int i = 0; i < num_ce; i++) {
|
||||||
T(T_ENB_MAC_UE_UL_CE,
|
T(T_ENB_MAC_UE_UL_CE,
|
||||||
@@ -451,7 +503,7 @@ rx_sdu(const module_id_t enb_mod_idP,
|
|||||||
UE_list->UE_template[CC_idP][UE_id].ul_SR = 1;
|
UE_list->UE_template[CC_idP][UE_id].ul_SR = 1;
|
||||||
UE_list->UE_sched_ctrl[UE_id].crnti_reconfigurationcomplete_flag = 1;
|
UE_list->UE_sched_ctrl[UE_id].crnti_reconfigurationcomplete_flag = 1;
|
||||||
|
|
||||||
break;
|
// break;
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
cancel_ra_proc(enb_mod_idP, CC_idP, frameP, current_rnti);
|
cancel_ra_proc(enb_mod_idP, CC_idP, frameP, current_rnti);
|
||||||
|
|||||||
Reference in New Issue
Block a user