Commit 40656e0e authored by Florian Kaltenberger's avatar Florian Kaltenberger
Browse files

some changes in logging for XFORMS and UL scheduling (activation in all...

some changes in logging for XFORMS and UL scheduling (activation in all subframes and retransmissions only via PHICH)
parent 1ecd5beb
......@@ -566,7 +566,7 @@ int dump_eNB_stats(PHY_VARS_eNB *phy_vars_eNB, char* buffer, int length)
// }
for (eNB=0; eNB<number_of_cards_l; eNB++) {
len += sprintf(&buffer[len],"[eNB PROC] eNB %d/%d Frame %d: RX Gain %d dB, I0 %d dBm (%d,%d) dB \n",
len += sprintf(&buffer[len],"eNB %d/%d Frame %d: RX Gain %d dB, I0 %d dBm (%d,%d) dB \n",
eNB,number_of_cards_l,
phy_vars_eNB->proc[0].frame_tx,
phy_vars_eNB->rx_total_gain_eNB_dB,
......@@ -574,7 +574,7 @@ int dump_eNB_stats(PHY_VARS_eNB *phy_vars_eNB, char* buffer, int length)
phy_vars_eNB->PHY_measurements_eNB[eNB].n0_power_dB[0],
phy_vars_eNB->PHY_measurements_eNB[eNB].n0_power_dB[1]);
len += sprintf(&buffer[len],"[eNB PROC] PRB I0 (%X.%X.%X.%X): ",
len += sprintf(&buffer[len],"PRB I0 (%X.%X.%X.%X): ",
phy_vars_eNB->rb_mask_ul[0],
phy_vars_eNB->rb_mask_ul[1],phy_vars_eNB->rb_mask_ul[2],phy_vars_eNB->rb_mask_ul[3]);
......@@ -587,7 +587,7 @@ int dump_eNB_stats(PHY_VARS_eNB *phy_vars_eNB, char* buffer, int length)
}
len += sprintf(&buffer[len],"\n");
len += sprintf(&buffer[len],"\n[eNB PROC] PERFORMANCE PARAMETERS\n");
len += sprintf(&buffer[len],"\nPERFORMANCE PARAMETERS\n");
/*
len += sprintf(&buffer[len],"[eNB PROC] Total DLSCH Bitrate for the System %dkbps\n",((phy_vars_eNB->eNB_UE_stats[0].dlsch_bitrate + phy_vars_eNB->eNB_UE_stats[1].dlsch_bitrate)/1000));
len += sprintf(&buffer[len],"[eNB PROC] Total Bits successfully transitted %dKbits in %dframe(s)\n",((phy_vars_eNB->eNB_UE_stats[0].total_transmitted_bits + phy_vars_eNB->eNB_UE_stats[1].total_transmitted_bits)/1000),phy_vars_eNB->frame+1);
......@@ -595,119 +595,95 @@ int dump_eNB_stats(PHY_VARS_eNB *phy_vars_eNB, char* buffer, int length)
*/
for (UE_id=0; UE_id<NUMBER_OF_UE_MAX; UE_id++) {
#ifdef OPENAIR2
if ((phy_vars_eNB->dlsch_eNB[(uint8_t)UE_id][0]->rnti>0)&&
(phy_vars_eNB->eNB_UE_stats[UE_id].mode == PUSCH)) {
if (phy_vars_eNB->dlsch_eNB[(uint8_t)UE_id][0]->rnti>0) {
phy_vars_eNB->total_dlsch_bitrate = phy_vars_eNB->eNB_UE_stats[UE_id].dlsch_bitrate + phy_vars_eNB->total_dlsch_bitrate;
phy_vars_eNB->total_transmitted_bits = phy_vars_eNB->eNB_UE_stats[UE_id].total_TBS + phy_vars_eNB->total_transmitted_bits;
//phy_vars_eNB->total_system_throughput = phy_vars_eNB->eNB_UE_stats[UE_id].total_transmitted_bits + phy_vars_eNB->total_system_throughput;
if (phy_vars_eNB->eNB_UE_stats[UE_id].mode == PUSCH)
for (i=0; i<8; i++)
success = success + (phy_vars_eNB->eNB_UE_stats[UE_id].dlsch_trials[i][0] - phy_vars_eNB->eNB_UE_stats[UE_id].dlsch_l2_errors[i]);
}
#else
phy_vars_eNB->total_dlsch_bitrate = phy_vars_eNB->eNB_UE_stats[UE_id].dlsch_bitrate + phy_vars_eNB->total_dlsch_bitrate;
phy_vars_eNB->total_transmitted_bits = phy_vars_eNB->eNB_UE_stats[UE_id].total_TBS + phy_vars_eNB->total_transmitted_bits;
//phy_vars_eNB->total_system_throughput = phy_vars_eNB->eNB_UE_stats[UE_id].total_transmitted_bits + phy_vars_eNB->total_system_throughput;
for (i=0; i<8; i++)
success = success + (phy_vars_eNB->eNB_UE_stats[UE_id].dlsch_trials[i][0] - phy_vars_eNB->eNB_UE_stats[UE_id].dlsch_l2_errors[i]);
#endif
}
len += sprintf(&buffer[len],"[eNB PROC] Total DLSCH bits successfully transmitted %d kbits in %d frame(s)\n",(phy_vars_eNB->total_transmitted_bits/1000),phy_vars_eNB->proc[0].frame_tx+1);
len += sprintf(&buffer[len],"[eNB PROC] Total DLSCH average system throughput %d kbps\n",(phy_vars_eNB->total_dlsch_bitrate/1000));
len += sprintf(&buffer[len],"[eNB PROC] Total DLSCH successful transmissions %d in %d frame(s)\n",success,phy_vars_eNB->proc[0].frame_tx+1);
//len += sprintf(&buffer[len],"[eNB PROC] FULL MU-MIMO Transmissions/Total Transmissions = %d/%d\n",phy_vars_eNB->FULL_MUMIMO_transmissions,phy_vars_eNB->check_for_total_transmissions);
//len += sprintf(&buffer[len],"[eNB PROC] MU-MIMO Transmissions/Total Transmissions = %d/%d\n",phy_vars_eNB->check_for_MUMIMO_transmissions,phy_vars_eNB->check_for_total_transmissions);
//len += sprintf(&buffer[len],"[eNB PROC] SU-MIMO Transmissions/Total Transmissions = %d/%d\n",phy_vars_eNB->check_for_SUMIMO_transmissions,phy_vars_eNB->check_for_total_transmissions);
}
len += sprintf(&buffer[len],"\n");
for (UE_id=0; UE_id<NUMBER_OF_UE_MAX; UE_id++) {
#ifdef OPENAIR2
if (phy_vars_eNB->dlsch_eNB[(uint8_t)UE_id][0]->rnti>0) {
#endif
len += sprintf(&buffer[len],"[eNB PROC] UE %d (%x) Power: (%d,%d) dB, Po_PUSCH: (%d,%d) dBm, Po_PUCCH (%d/%d) dBm, Po_PUCCH1 (%d,%d) dBm, PUCCH1 Thres %d dBm \n",
UE_id,
phy_vars_eNB->eNB_UE_stats[UE_id].crnti,
dB_fixed(phy_vars_eNB->lte_eNB_pusch_vars[UE_id]->ulsch_power[0]),
dB_fixed(phy_vars_eNB->lte_eNB_pusch_vars[UE_id]->ulsch_power[1]),
phy_vars_eNB->eNB_UE_stats[UE_id].UL_rssi[0],
phy_vars_eNB->eNB_UE_stats[UE_id].UL_rssi[1],
dB_fixed(phy_vars_eNB->eNB_UE_stats[UE_id].Po_PUCCH/phy_vars_eNB->lte_frame_parms.N_RB_UL)-phy_vars_eNB->rx_total_gain_eNB_dB,
phy_vars_eNB->lte_frame_parms.ul_power_control_config_common.p0_NominalPUCCH,
dB_fixed(phy_vars_eNB->eNB_UE_stats[UE_id].Po_PUCCH1_below/phy_vars_eNB->lte_frame_parms.N_RB_UL)-phy_vars_eNB->rx_total_gain_eNB_dB,
dB_fixed(phy_vars_eNB->eNB_UE_stats[UE_id].Po_PUCCH1_above/phy_vars_eNB->lte_frame_parms.N_RB_UL)-phy_vars_eNB->rx_total_gain_eNB_dB,
PUCCH1_THRES+phy_vars_eNB->PHY_measurements_eNB[0].n0_power_tot_dBm-dB_fixed(phy_vars_eNB->lte_frame_parms.N_RB_UL),
phy_vars_eNB->eNB_UE_stats[UE_id].sector);
for(i=0; i<8; i++)
len+= sprintf(&buffer[len]," harq %d: DL mcs %d, UL mcs %d, UL rb %d, delta_TF %d\n",
i,
phy_vars_eNB->dlsch_eNB[(uint8_t)UE_id][0]->harq_processes[i]->mcs,
phy_vars_eNB->ulsch_eNB[(uint8_t)UE_id]->harq_processes[i]->mcs,
phy_vars_eNB->ulsch_eNB[(uint8_t)UE_id]->harq_processes[i]->nb_rb,
phy_vars_eNB->ulsch_eNB[(uint8_t)UE_id]->harq_processes[i]->delta_TF);
len += sprintf(&buffer[len],"[eNB PROC] Wideband CQI: (%d,%d) dB\n",
phy_vars_eNB->PHY_measurements_eNB[eNB].wideband_cqi_dB[UE_id][0],
phy_vars_eNB->PHY_measurements_eNB[eNB].wideband_cqi_dB[UE_id][1]);
len += sprintf(&buffer[len],"[eNB PROC] Subband CQI: ");
for (i=0; i<25; i++)
len += sprintf(&buffer[len],"%2d ",
phy_vars_eNB->PHY_measurements_eNB[eNB].subband_cqi_tot_dB[UE_id][i]);
len += sprintf(&buffer[len],"\n");
len += sprintf(&buffer[len],"[eNB PROC] DL TM %d, DL_cqi %d, DL_pmi_single %jx\n",
phy_vars_eNB->transmission_mode[UE_id],
phy_vars_eNB->eNB_UE_stats[UE_id].DL_cqi[0],
pmi2hex_2Ar1(phy_vars_eNB->eNB_UE_stats[UE_id].DL_pmi_single));
len += sprintf(&buffer[len],"[eNB PROC] DL Subband CQI: ");
for (i=0; i<13; i++)
len += sprintf(&buffer[len],"%2d ",
phy_vars_eNB->eNB_UE_stats[UE_id].DL_subband_cqi[0][i]);
len += sprintf(&buffer[len],"\n");
len += sprintf(&buffer[len],"[eNB PROC] Timing advance %d samples (%d 16Ts), update %d\n",
phy_vars_eNB->eNB_UE_stats[UE_id].UE_timing_offset,
phy_vars_eNB->eNB_UE_stats[UE_id].UE_timing_offset>>2,
phy_vars_eNB->eNB_UE_stats[UE_id].timing_advance_update);
len += sprintf(&buffer[len],"[eNB PROC] Mode = %s(%d)\n",
mode_string[phy_vars_eNB->eNB_UE_stats[UE_id].mode],
phy_vars_eNB->eNB_UE_stats[UE_id].mode);
#ifdef OPENAIR2
UE_id_mac = find_UE_id(phy_vars_eNB->Mod_id,phy_vars_eNB->dlsch_eNB[(uint8_t)UE_id][0]->rnti);
if (UE_id_mac != -1) {
RRC_status = mac_eNB_get_rrc_status(phy_vars_eNB->Mod_id,phy_vars_eNB->dlsch_eNB[(uint8_t)UE_id][0]->rnti);
len += sprintf(&buffer[len],"[eNB PROC] UE_id_mac = %d, RRC status = %d\n",UE_id_mac,RRC_status);
} else
len += sprintf(&buffer[len],"[eNB PROC] UE_id_mac = -1\n");
#endif
#ifdef OPENAIR2
if (phy_vars_eNB->eNB_UE_stats[UE_id].mode == PUSCH) {
#endif
len += sprintf(&buffer[len],"[eNB PROC] SR received/total: %d/%d (diff %d)\n",
for (i=0; i<8; i++)
success = success + (phy_vars_eNB->eNB_UE_stats[UE_id].dlsch_trials[i][0] - phy_vars_eNB->eNB_UE_stats[UE_id].dlsch_l2_errors[i]);
len += sprintf(&buffer[len],"Total DLSCH %d kbits / %d frames ",(phy_vars_eNB->total_transmitted_bits/1000),phy_vars_eNB->proc[0].frame_tx+1);
len += sprintf(&buffer[len],"Total DLSCH throughput %d kbps ",(phy_vars_eNB->total_dlsch_bitrate/1000));
len += sprintf(&buffer[len],"Total DLSCH trans %d / %d frames\n",success,phy_vars_eNB->proc[0].frame_tx+1);
//len += sprintf(&buffer[len],"[eNB PROC] FULL MU-MIMO Transmissions/Total Transmissions = %d/%d\n",phy_vars_eNB->FULL_MUMIMO_transmissions,phy_vars_eNB->check_for_total_transmissions);
//len += sprintf(&buffer[len],"[eNB PROC] MU-MIMO Transmissions/Total Transmissions = %d/%d\n",phy_vars_eNB->check_for_MUMIMO_transmissions,phy_vars_eNB->check_for_total_transmissions);
//len += sprintf(&buffer[len],"[eNB PROC] SU-MIMO Transmissions/Total Transmissions = %d/%d\n",phy_vars_eNB->check_for_SUMIMO_transmissions,phy_vars_eNB->check_for_total_transmissions);
len += sprintf(&buffer[len],"UE %d (%x) Power: (%d,%d) dB, Po_PUSCH: (%d,%d) dBm, Po_PUCCH (%d/%d) dBm, Po_PUCCH1 (%d,%d) dBm, PUCCH1 Thres %d dBm \n",
UE_id,
phy_vars_eNB->eNB_UE_stats[UE_id].crnti,
dB_fixed(phy_vars_eNB->lte_eNB_pusch_vars[UE_id]->ulsch_power[0]),
dB_fixed(phy_vars_eNB->lte_eNB_pusch_vars[UE_id]->ulsch_power[1]),
phy_vars_eNB->eNB_UE_stats[UE_id].UL_rssi[0],
phy_vars_eNB->eNB_UE_stats[UE_id].UL_rssi[1],
dB_fixed(phy_vars_eNB->eNB_UE_stats[UE_id].Po_PUCCH/phy_vars_eNB->lte_frame_parms.N_RB_UL)-phy_vars_eNB->rx_total_gain_eNB_dB,
phy_vars_eNB->lte_frame_parms.ul_power_control_config_common.p0_NominalPUCCH,
dB_fixed(phy_vars_eNB->eNB_UE_stats[UE_id].Po_PUCCH1_below/phy_vars_eNB->lte_frame_parms.N_RB_UL)-phy_vars_eNB->rx_total_gain_eNB_dB,
dB_fixed(phy_vars_eNB->eNB_UE_stats[UE_id].Po_PUCCH1_above/phy_vars_eNB->lte_frame_parms.N_RB_UL)-phy_vars_eNB->rx_total_gain_eNB_dB,
PUCCH1_THRES+phy_vars_eNB->PHY_measurements_eNB[0].n0_power_tot_dBm-dB_fixed(phy_vars_eNB->lte_frame_parms.N_RB_UL),
phy_vars_eNB->eNB_UE_stats[UE_id].sector);
len+= sprintf(&buffer[len],"DL mcs %d, UL mcs %d, UL rb %d, delta_TF %d, ",
i,
phy_vars_eNB->dlsch_eNB[(uint8_t)UE_id][0]->harq_processes[0]->mcs,
phy_vars_eNB->ulsch_eNB[(uint8_t)UE_id]->harq_processes[0]->mcs,
phy_vars_eNB->ulsch_eNB[(uint8_t)UE_id]->harq_processes[0]->nb_rb,
phy_vars_eNB->ulsch_eNB[(uint8_t)UE_id]->harq_processes[0]->delta_TF);
len += sprintf(&buffer[len],"Wideband CQI: (%d,%d) dB\n",
phy_vars_eNB->PHY_measurements_eNB[eNB].wideband_cqi_dB[UE_id][0],
phy_vars_eNB->PHY_measurements_eNB[eNB].wideband_cqi_dB[UE_id][1]);
/* len += sprintf(&buffer[len],"[eNB PROC] Subband CQI: ");
for (i=0; i<phy_vars_eNB->lte_frame_parms.N_RB_DL; i++)
len += sprintf(&buffer[len],"%2d ",
phy_vars_eNB->PHY_measurements_eNB[eNB].subband_cqi_tot_dB[UE_id][i]);
len += sprintf(&buffer[len],"\n");
*/
len += sprintf(&buffer[len],"DL TM %d, DL_cqi %d, DL_pmi_single %jx ",
phy_vars_eNB->transmission_mode[UE_id],
phy_vars_eNB->eNB_UE_stats[UE_id].DL_cqi[0],
pmi2hex_2Ar1(phy_vars_eNB->eNB_UE_stats[UE_id].DL_pmi_single));
len += sprintf(&buffer[len],"Timing advance %d samples (%d 16Ts), update %d ",
phy_vars_eNB->eNB_UE_stats[UE_id].UE_timing_offset,
phy_vars_eNB->eNB_UE_stats[UE_id].UE_timing_offset>>2,
phy_vars_eNB->eNB_UE_stats[UE_id].timing_advance_update);
len += sprintf(&buffer[len],"Mode = %s(%d) ",
mode_string[phy_vars_eNB->eNB_UE_stats[UE_id].mode],
phy_vars_eNB->eNB_UE_stats[UE_id].mode);
UE_id_mac = find_UE_id(phy_vars_eNB->Mod_id,phy_vars_eNB->dlsch_eNB[(uint8_t)UE_id][0]->rnti);
if (UE_id_mac != -1) {
RRC_status = mac_eNB_get_rrc_status(phy_vars_eNB->Mod_id,phy_vars_eNB->dlsch_eNB[(uint8_t)UE_id][0]->rnti);
len += sprintf(&buffer[len],"UE_id_mac = %d, RRC status = %d\n",UE_id_mac,RRC_status);
} else
len += sprintf(&buffer[len],"UE_id_mac = -1\n");
len += sprintf(&buffer[len],"SR received/total: %d/%d (diff %d)\n",
phy_vars_eNB->eNB_UE_stats[UE_id].sr_received,
phy_vars_eNB->eNB_UE_stats[UE_id].sr_total,
phy_vars_eNB->eNB_UE_stats[UE_id].sr_total-phy_vars_eNB->eNB_UE_stats[UE_id].sr_received);
len += sprintf(&buffer[len],"DL Subband CQI: ");
for (i=0; i<25; i++)
len += sprintf(&buffer[len],"%2d ",
phy_vars_eNB->eNB_UE_stats[UE_id].DL_subband_cqi[0][i]);
len += sprintf(&buffer[len],"\n");
ulsch_errors = 0;
......@@ -716,10 +692,10 @@ int dump_eNB_stats(PHY_VARS_eNB *phy_vars_eNB, char* buffer, int length)
ulsch_round_errors[j]=0;
}
len += sprintf(&buffer[len],"[eNB PROC] ULSCH errors/attempts per harq (per round): \n");
len += sprintf(&buffer[len],"ULSCH errors/attempts per harq (per round): \n");
for (i=0; i<8; i++) {
len += sprintf(&buffer[len]," harq %d: %d/%d (fer %d) (%d/%d, %d/%d, %d/%d, %d/%d)\n",
len += sprintf(&buffer[len]," harq %d: %d/%d (fer %d) (%d/%d, %d/%d, %d/%d, %d/%d) ",
i,
phy_vars_eNB->eNB_UE_stats[UE_id].ulsch_errors[i],
phy_vars_eNB->eNB_UE_stats[UE_id].ulsch_decoding_attempts[i][0],
......@@ -732,6 +708,9 @@ int dump_eNB_stats(PHY_VARS_eNB *phy_vars_eNB, char* buffer, int length)
phy_vars_eNB->eNB_UE_stats[UE_id].ulsch_decoding_attempts[i][2],
phy_vars_eNB->eNB_UE_stats[UE_id].ulsch_round_errors[i][3],
phy_vars_eNB->eNB_UE_stats[UE_id].ulsch_decoding_attempts[i][3]);
if ((i&1) == 1)
len += sprintf(&buffer[len],"\n");
ulsch_errors+=phy_vars_eNB->eNB_UE_stats[UE_id].ulsch_errors[i];
for (j=0; j<4; j++) {
......@@ -740,7 +719,7 @@ int dump_eNB_stats(PHY_VARS_eNB *phy_vars_eNB, char* buffer, int length)
}
}
len += sprintf(&buffer[len],"[eNB PROC] ULSCH errors/attempts total %d/%d (%d/%d, %d/%d, %d/%d, %d/%d): \n",
len += sprintf(&buffer[len],"ULSCH errors/attempts total %d/%d (%d/%d, %d/%d, %d/%d, %d/%d)\n",
ulsch_errors,ulsch_round_attempts[0],
ulsch_round_errors[0],ulsch_round_attempts[0],
......@@ -755,10 +734,10 @@ int dump_eNB_stats(PHY_VARS_eNB *phy_vars_eNB, char* buffer, int length)
dlsch_round_errors[j]=0;
}
len += sprintf(&buffer[len],"[eNB PROC] DLSCH errors/attempts per harq (per round): \n");
len += sprintf(&buffer[len],"DLSCH errors/attempts per harq (per round): \n");
for (i=0; i<8; i++) {
len += sprintf(&buffer[len]," harq %d: %d/%d (%d/%d/%d, %d/%d/%d, %d/%d/%d, %d/%d/%d)\n",
len += sprintf(&buffer[len]," harq %d: %d/%d (%d/%d/%d, %d/%d/%d, %d/%d/%d, %d/%d/%d) ",
i,
phy_vars_eNB->eNB_UE_stats[UE_id].dlsch_l2_errors[i],
phy_vars_eNB->eNB_UE_stats[UE_id].dlsch_trials[i][0],
......@@ -774,6 +753,10 @@ int dump_eNB_stats(PHY_VARS_eNB *phy_vars_eNB, char* buffer, int length)
phy_vars_eNB->eNB_UE_stats[UE_id].dlsch_ACK[i][3],
phy_vars_eNB->eNB_UE_stats[UE_id].dlsch_NAK[i][3],
phy_vars_eNB->eNB_UE_stats[UE_id].dlsch_trials[i][3]);
if ((i&1) == 1)
len += sprintf(&buffer[len],"\n");
dlsch_errors+=phy_vars_eNB->eNB_UE_stats[UE_id].dlsch_l2_errors[i];
for (j=0; j<4; j++) {
......@@ -782,7 +765,7 @@ int dump_eNB_stats(PHY_VARS_eNB *phy_vars_eNB, char* buffer, int length)
}
}
len += sprintf(&buffer[len],"[eNB PROC] DLSCH errors/attempts total %d/%d (%d/%d, %d/%d, %d/%d, %d/%d): \n",
len += sprintf(&buffer[len],"DLSCH errors/attempts total %d/%d (%d/%d, %d/%d, %d/%d, %d/%d): \n",
dlsch_errors,dlsch_round_attempts[0],
dlsch_round_errors[0],dlsch_round_attempts[0],
dlsch_round_errors[1],dlsch_round_attempts[1],
......@@ -790,11 +773,11 @@ int dump_eNB_stats(PHY_VARS_eNB *phy_vars_eNB, char* buffer, int length)
dlsch_round_errors[3],dlsch_round_attempts[3]);
len += sprintf(&buffer[len],"[eNB PROC] DLSCH total bits from MAC: %dkbit\n",(phy_vars_eNB->eNB_UE_stats[UE_id].total_TBS_MAC)/1000);
len += sprintf(&buffer[len],"[eNB PROC] DLSCH total bits ack'ed: %dkbit\n",(phy_vars_eNB->eNB_UE_stats[UE_id].total_TBS)/1000);
len += sprintf(&buffer[len],"[eNB PROC] DLSCH Average throughput (100 frames): %dkbps\n",(phy_vars_eNB->eNB_UE_stats[UE_id].dlsch_bitrate/1000));
len += sprintf(&buffer[len],"[eNB PROC] Transmission Mode %d\n",phy_vars_eNB->transmission_mode[UE_id]);
len += sprintf(&buffer[len],"DLSCH total bits from MAC: %dkbit ",(phy_vars_eNB->eNB_UE_stats[UE_id].total_TBS_MAC)/1000);
len += sprintf(&buffer[len],"DLSCH total bits ack'ed: %dkbit ",(phy_vars_eNB->eNB_UE_stats[UE_id].total_TBS)/1000);
len += sprintf(&buffer[len],"DLSCH Average throughput (100 frames): %dkbps\n",(phy_vars_eNB->eNB_UE_stats[UE_id].dlsch_bitrate/1000));
// len += sprintf(&buffer[len],"[eNB PROC] Transmission Mode %d\n",phy_vars_eNB->transmission_mode[UE_id]);
/*
if(phy_vars_eNB->transmission_mode[UE_id] == 5) {
if(phy_vars_eNB->mu_mimo_mode[UE_id].dl_pow_off == 0)
len += sprintf(&buffer[len],"[eNB PROC] ****UE %d is in MU-MIMO mode****\n",UE_id);
......@@ -803,7 +786,8 @@ int dump_eNB_stats(PHY_VARS_eNB *phy_vars_eNB, char* buffer, int length)
else
len += sprintf(&buffer[len],"[eNB PROC] ****UE %d is not scheduled****\n",UE_id);
}
*/
/*
len += sprintf(&buffer[len],"[eNB PROC] RB Allocation on Sub-bands: ");
// for (j=0;j< mac_xface->lte_frame_parms->N_RBGS;j++)
......@@ -813,16 +797,14 @@ int dump_eNB_stats(PHY_VARS_eNB *phy_vars_eNB, char* buffer, int length)
len += sprintf(&buffer[len],"\n");
len += sprintf(&buffer[len],"[eNB PROC] Total Number of Allocated PRBs = %d\n",phy_vars_eNB->mu_mimo_mode[UE_id].pre_nb_available_rbs);
#ifdef OPENAIR2
*/
}
}
#endif
len += sprintf(&buffer[len],"\n");
}
len += sprintf(&buffer[len],"EOF\n");
return len;
}
......@@ -81,7 +81,7 @@ int generate_eNB_ulsch_params_from_rar(unsigned char *rar_pdu,
uint16_t *RIV2nb_rb_LUT, *RIV2first_rb_LUT;
uint16_t RIV_max;
LOG_I(PHY,"[eNB][RAPROC] generate_eNB_ulsch_params_from_rar: subframe %d (harq_pid %d)\n",subframe,harq_pid);
LOG_D(PHY,"[eNB][RAPROC] generate_eNB_ulsch_params_from_rar: subframe %d (harq_pid %d)\n",subframe,harq_pid);
switch (frame_parms->N_RB_DL) {
case 6:
......
......@@ -178,7 +178,7 @@ int32_t add_ue(int16_t rnti, PHY_VARS_eNB *phy_vars_eNB)
} else {
if (phy_vars_eNB->eNB_UE_stats[i].crnti==0) {
MSC_LOG_EVENT(MSC_PHY_ENB, "0 Add ue %"PRIx16" ", rnti);
LOG_I(PHY,"UE_id %d associated with rnti %x\n",i, (uint16_t)rnti);
LOG_D(PHY,"UE_id %d associated with rnti %x\n",i, (uint16_t)rnti);
phy_vars_eNB->dlsch_eNB[i][0]->rnti = rnti;
phy_vars_eNB->ulsch_eNB[i]->rnti = rnti;
phy_vars_eNB->eNB_UE_stats[i].crnti = rnti;
......@@ -186,7 +186,7 @@ int32_t add_ue(int16_t rnti, PHY_VARS_eNB *phy_vars_eNB)
phy_vars_eNB->eNB_UE_stats[i].Po_PUCCH1_below = 0;
phy_vars_eNB->eNB_UE_stats[i].Po_PUCCH1_above = (int32_t)pow(10.0,.1*(phy_vars_eNB->lte_frame_parms.ul_power_control_config_common.p0_NominalPUCCH+phy_vars_eNB->rx_total_gain_eNB_dB));
phy_vars_eNB->eNB_UE_stats[i].Po_PUCCH = (int32_t)pow(10.0,.1*(phy_vars_eNB->lte_frame_parms.ul_power_control_config_common.p0_NominalPUCCH+phy_vars_eNB->rx_total_gain_eNB_dB));
LOG_I(PHY,"Initializing Po_PUCCH: p0_NominalPUCCH %d, gain %d => %d\n",
LOG_D(PHY,"Initializing Po_PUCCH: p0_NominalPUCCH %d, gain %d => %d\n",
phy_vars_eNB->lte_frame_parms.ul_power_control_config_common.p0_NominalPUCCH,
phy_vars_eNB->rx_total_gain_eNB_dB,
phy_vars_eNB->eNB_UE_stats[i].Po_PUCCH);
......@@ -1742,17 +1742,8 @@ void phy_procedures_eNB_TX(unsigned char sched_subframe,PHY_VARS_eNB *phy_vars_e
phy_vars_eNB->dlsch_eNB[i][0]->subframe_tx[subframe] = 0;
}
// init_nCCE_table();
num_pdcch_symbols = DCI_pdu->num_pdcch_symbols;
/*get_num_pdcch_symbols(DCI_pdu->Num_common_dci + DCI_pdu->Num_ue_spec_dci,
DCI_pdu->dci_alloc,
&phy_vars_eNB->lte_frame_parms,
subframe);*/
/*
DCI_pdu->nCCE = get_nCCE(num_pdcch_symbols,
&phy_vars_eNB->lte_frame_parms,
get_mi(&phy_vars_eNB->lte_frame_parms,subframe));*/
LOG_D(PHY,"num_pdcch_symbols %"PRIu8", nCCE %u (dci commond %"PRIu8", dci uespec %"PRIu8"\n",num_pdcch_symbols,DCI_pdu->nCCE,
DCI_pdu->Num_common_dci,DCI_pdu->Num_ue_spec_dci);
......@@ -1946,7 +1937,7 @@ void phy_procedures_eNB_TX(unsigned char sched_subframe,PHY_VARS_eNB *phy_vars_e
return; // not reached
}
#ifdef DEBUG_PHY_PROC
//#ifdef DEBUG_PHY_PROC
//if (phy_vars_eNB->proc[sched_subframe].frame_tx%100 == 0)
LOG_D(PHY,
"[eNB %"PRIu8"][PUSCH %"PRIu8"] Frame %d subframe %d UL Frame %"PRIu32", UL Subframe %"PRIu8", Generated ULSCH (format0) DCI (rnti %"PRIx16", dci %"PRIx8") (DCI pos %"PRIu32"/%d), aggregation %d\n",
......@@ -1963,7 +1954,7 @@ void phy_procedures_eNB_TX(unsigned char sched_subframe,PHY_VARS_eNB *phy_vars_e
i,
DCI_pdu->Num_common_dci + DCI_pdu->Num_ue_spec_dci,
1<<DCI_pdu->dci_alloc[i].L);
#endif
//#endif
//dump_dci(&phy_vars_eNB->lte_frame_parms,&DCI_pdu->dci_alloc[i]);
//LOG_D(PHY,"[eNB] cba generate_eNB_ulsch_params_from_dci for ue %d for dci rnti %x\n", UE_id, DCI_pdu->dci_alloc[i].rnti);
......@@ -2212,7 +2203,7 @@ void phy_procedures_eNB_TX(unsigned char sched_subframe,PHY_VARS_eNB *phy_vars_e
phy_vars_eNB->proc[sched_subframe].frame_tx,
&phy_vars_eNB->ulsch_eNB[(uint32_t)UE_id]->Msg3_frame,
&phy_vars_eNB->ulsch_eNB[(uint32_t)UE_id]->Msg3_subframe);
LOG_I(PHY,"[eNB][RAPROC] Frame %d subframe %d, Activated Msg3 demodulation for UE %"PRId8" in frame %"PRIu32", subframe %"PRIu8"\n",
LOG_D(PHY,"[eNB][RAPROC] Frame %d subframe %d, Activated Msg3 demodulation for UE %"PRId8" in frame %"PRIu32", subframe %"PRIu8"\n",
phy_vars_eNB->proc[sched_subframe].frame_tx,
subframe,
UE_id,
......@@ -3051,7 +3042,7 @@ void prach_procedures(PHY_VARS_eNB *phy_vars_eNB,uint8_t sched_subframe,uint8_t
phy_vars_eNB->eNB_UE_stats[(uint32_t)UE_id].UE_timing_offset = preamble_delay_list[preamble_max]&0x1FFF; //limit to 13 (=11+2) bits
//phy_vars_eNb->eNB_UE_stats[(uint32_t)UE_id].mode = PRACH;
phy_vars_eNB->eNB_UE_stats[(uint32_t)UE_id].sector = 0;
LOG_I(PHY,"[eNB %d/%d][RAPROC] Frame %d, subframe %d Initiating RA procedure (UE_id %d) with preamble %d, energy %d.%d dB, delay %d\n",
LOG_D(PHY,"[eNB %d/%d][RAPROC] Frame %d, subframe %d Initiating RA procedure (UE_id %d) with preamble %d, energy %d.%d dB, delay %d\n",
phy_vars_eNB->Mod_id,
phy_vars_eNB->CC_id,
frame,
......@@ -3492,14 +3483,14 @@ void phy_procedures_eNB_RX(const unsigned char sched_subframe,PHY_VARS_eNB *phy_
LOG_D(PHY,"[eNB][PUSCH %d] Increasing to round %d\n",harq_pid,phy_vars_eNB->ulsch_eNB[i]->harq_processes[harq_pid]->round);
if (phy_vars_eNB->ulsch_eNB[i]->Msg3_flag == 1) {
LOG_I(PHY,"[eNB %d/%d][RAPROC] frame %d, subframe %d, UE %d: Error receiving ULSCH (Msg3), round %d/%d\n",
LOG_D(PHY,"[eNB %d/%d][RAPROC] frame %d, subframe %d, UE %d: Error receiving ULSCH (Msg3), round %d/%d\n",
phy_vars_eNB->Mod_id,
phy_vars_eNB->CC_id,
frame,subframe, i,
phy_vars_eNB->ulsch_eNB[i]->harq_processes[harq_pid]->round-1,
phy_vars_eNB->lte_frame_parms.maxHARQ_Msg3Tx-1);
LOG_I(PHY,"[eNB %d][PUSCH %d] frame %d subframe %d RNTI %x RX power (%d,%d) RSSI (%d,%d) N0 (%d,%d) dB ACK (%d,%d), decoding iter %d\n",
LOG_D(PHY,"[eNB %d][PUSCH %d] frame %d subframe %d RNTI %x RX power (%d,%d) RSSI (%d,%d) N0 (%d,%d) dB ACK (%d,%d), decoding iter %d\n",
phy_vars_eNB->Mod_id,harq_pid,
frame,subframe,
phy_vars_eNB->ulsch_eNB[i]->rnti,
......@@ -3515,7 +3506,7 @@ void phy_procedures_eNB_RX(const unsigned char sched_subframe,PHY_VARS_eNB *phy_
if (phy_vars_eNB->ulsch_eNB[i]->harq_processes[harq_pid]->round ==
phy_vars_eNB->lte_frame_parms.maxHARQ_Msg3Tx) {
LOG_I(PHY,"[eNB %d][RAPROC] maxHARQ_Msg3Tx reached, abandoning RA procedure for UE %d\n",
LOG_D(PHY,"[eNB %d][RAPROC] maxHARQ_Msg3Tx reached, abandoning RA procedure for UE %d\n",
phy_vars_eNB->Mod_id, i);
phy_vars_eNB->eNB_UE_stats[i].mode = PRACH;
#ifdef OPENAIR2
......@@ -3547,7 +3538,7 @@ void phy_procedures_eNB_RX(const unsigned char sched_subframe,PHY_VARS_eNB *phy_
*/
// dump_ulsch(phy_vars_eNB,sched_subframe,i);
//#ifndef EXMIMO_IOT
LOG_W(PHY,"[eNB] Frame %d, Subframe %d: Msg3 in error, i = %d \n", frame,subframe,i);
LOG_D(PHY,"[eNB] Frame %d, Subframe %d: Msg3 in error, i = %d \n", frame,subframe,i);
//#else
//mac_exit_wrapper("Msg3 error");
//#endif
......@@ -3601,10 +3592,10 @@ void phy_procedures_eNB_RX(const unsigned char sched_subframe,PHY_VARS_eNB *phy_
} // ulsch in error
else {
if (phy_vars_eNB->ulsch_eNB[i]->Msg3_flag == 1) {
LOG_I(PHY,"[eNB %d][PUSCH %d] Frame %d subframe %d ULSCH received, setting round to 0, PHICH ACK\n",
LOG_D(PHY,"[eNB %d][PUSCH %d] Frame %d subframe %d ULSCH received, setting round to 0, PHICH ACK\n",
phy_vars_eNB->Mod_id,harq_pid,
frame,subframe);
LOG_I(PHY,"[eNB %d][PUSCH %d] frame %d subframe %d RNTI %x RX power (%d,%d) RSSI (%d,%d) N0 (%d,%d) dB ACK (%d,%d), decoding iter %d\n",
LOG_D(PHY,"[eNB %d][PUSCH %d] frame %d subframe %d RNTI %x RX power (%d,%d) RSSI (%d,%d) N0 (%d,%d) dB ACK (%d,%d), decoding iter %d\n",
phy_vars_eNB->Mod_id,harq_pid,
frame,subframe,
phy_vars_eNB->ulsch_eNB[i]->rnti,
......
......@@ -737,7 +737,9 @@ typedef struct {
uint16_t pre_nb_available_rbs[MAX_NUM_CCs];
unsigned char rballoc_sub_UE[MAX_NUM_CCs][N_RBG_MAX];
uint16_t ta_timer;
int16_t ta_update;
int16_t ta_update;
int32_t context_active_timer;
int32_t ul_inactivity_timer;
} UE_sched_ctrl;
/*! \brief eNB template for the Random access information */
typedef struct {
......
......@@ -123,6 +123,9 @@ void eNB_dlsch_ulsch_scheduler(module_id_t module_idP,uint8_t cooperation_flag,
mac_xface->get_eNB_UE_stats(module_idP, CC_id, rnti));
next_i= UE_list->next[i];
// increment this, it is cleared when we receive an sdu
eNB_mac_inst[module_idP].UE_list.UE_sched_ctrl[i].ul_inactivity_timer++;
if (mac_xface->get_eNB_UE_stats(module_idP, CC_id, rnti)==NULL) {
mac_remove_ue(module_idP, i, frameP, subframeP);
}
......@@ -356,7 +359,6 @@ void eNB_dlsch_ulsch_scheduler(module_id_t module_idP,uint8_t cooperation_flag,
} else {
if (mac_xface->lte_frame_parms->frame_type == FDD) { //FDD
// schedule_RA(module_idP,frameP, subframeP, 0);
schedule_ulsch(module_idP, frameP, cooperation_flag, 4, 8);
schedule_ue_spec(module_idP, frameP, subframeP, mbsfn_status);
fill_DLSCH_dci(module_idP, frameP, subframeP, mbsfn_status);
......@@ -427,7 +429,7 @@ void eNB_dlsch_ulsch_scheduler(module_id_t module_idP,uint8_t cooperation_flag,
break;
}
} else { //FDD
// schedule_ulsch(module_idP,frameP,cooperation_flag,6,0);
schedule_ulsch(module_idP,frameP,cooperation_flag,6,0);
schedule_ue_spec(module_idP,frameP,subframeP,mbsfn_status);
fill_DLSCH_dci(module_idP,frameP,subframeP,mbsfn_status);
}
......@@ -456,7 +458,7 @@ void eNB_dlsch_ulsch_scheduler(module_id_t module_idP,uint8_t cooperation_flag,
break;
}
} else { //FDD
//schedule_ulsch(module_idP,frameP,cooperation_flag,7,1);
schedule_ulsch(module_idP,frameP,cooperation_flag,7,1);
schedule_ue_spec(module_idP,frameP,subframeP,mbsfn_status);
fill_DLSCH_dci(module_idP,frameP,subframeP,mbsfn_status);
}
......@@ -485,7 +487,7 @@ void eNB_dlsch_ulsch_scheduler(module_id_t module_idP,uint8_t cooperation_flag,
break;
}
} else { //FDD
//schedule_ulsch(module_idP,frameP,cooperation_flag,8,2);
schedule_ulsch(module_idP,frameP,cooperation_flag,8,2);
schedule_ue_spec(module_idP,frameP,subframeP,mbsfn_status);
fill_DLSCH_dci(module_idP,frameP,subframeP,mbsfn_status);
}
......@@ -529,7 +531,7 @@ void eNB_dlsch_ulsch_scheduler(module_id_t module_idP,uint8_t cooperation_flag,
break;
}
} else { //FDD
// schedule_ulsch(module_idP,frameP,cooperation_flag,9,3);
schedule_ulsch(module_idP,frameP,cooperation_flag,9,3);
schedule_ue_spec(module_idP,frameP,subframeP,mbsfn_status);
fill_DLSCH_dci(module_idP,frameP,subframeP,mbsfn_status);
}
......
......@@ -737,7 +737,7 @@ void initiate_ra_proc(module_id_t module_idP, int CC_id,frame_t frameP, uint16_t
uint8_t i;
RA_TEMPLATE *RA_template = (RA_TEMPLATE *)&eNB_mac_inst[module_idP].common_channels[CC_id].RA_template[0];
LOG_I(MAC,"[eNB %d][RAPROC] CC_id %d Frame %d Initiating RA procedure for preamble index %d\n",module_idP,CC_id,frameP,preamble_index);
LOG_D(MAC,"[eNB %d][RAPROC] CC_id %d Frame %d Initiating RA procedure for preamble index %d\n",module_idP,CC_id,frameP,preamble_index);
for (i=0; i<NB_RA_PROC_MAX; i++) {
if (RA_template[i].RA_active==FALSE) {
......@@ -765,7 +765,7 @@ void cancel_ra_proc(module_id_t module_idP, int CC_id, frame_t frameP, rnti_t rn
RA_TEMPLATE *RA_template = (RA_TEMPLATE *)&eNB_mac_inst[module_idP].common_channels[CC_id].RA_template[0];
MSC_LOG_EVENT(MSC_PHY_ENB, "RA Cancelling procedure ue %"PRIx16" ", rnti);
LOG_I(MAC,"[eNB %d][RAPROC] CC_id %d Frame %d Cancelling RA procedure for UE rnti %x\n",module_idP,CC_id,frameP,rnti);
LOG_D(MAC,"[eNB %d][RAPROC] CC_id %d Frame %d Cancelling RA procedure for UE rnti %x\n",module_idP,CC_id,frameP,rnti);
for (i=0; i<NB_RA_PROC_MAX; i++) {
if (rnti == RA_template[i].rnti) {
......
......@@ -707,16 +707,17 @@ void add_ue_spec_dci(DCI_PDU *DCI_pdu,void *pdu,rnti_t rnti,unsigned char dci_si
uint8_t UE_is_to_be_scheduled(module_id_t module_idP,int CC_id,uint8_t UE_id)
{
UE_TEMPLATE *UE_template = &eNB_mac_inst[module_idP].UE_list.UE_template[CC_id][UE_id];
// LOG_D(MAC,"[eNB %d][PUSCH] Frame %d subframeP %d Scheduling UE %d\n",module_idP,rnti,frameP,subframeP,
// UE_id);
UE_TEMPLATE *UE_template = &eNB_mac_inst[module_idP].UE_list.UE_template[CC_id][UE_id];
UE_sched_ctrl *UE_sched_ctl = &eNB_mac_inst[module_idP].UE_list.UE_sched_ctrl[UE_id];
LOG_D(MAC,"[eNB %d][PUSCH] Checking UL requirements UE %d/%x\n",module_idP,UE_id,UE_RNTI(module_idP,UE_id));
if ((UE_template->bsr_info[LCGID0]>0) ||
(UE_template->bsr_info[LCGID1]>0) ||
(UE_template->bsr_info[LCGID2]>0) ||
(UE_template->bsr_info[LCGID3]>0) ||
(UE_template->ul_SR>0)) { // uplink scheduling request
(UE_template->ul_SR>0) ||
(UE_sched_ctl->ul_inactivity_timer>100)) { // uplink scheduling request
return(1);
} else {
return(0);
......
This diff is collapsed.
......@@ -1104,7 +1104,7 @@ void store_ulsch_buffer(module_id_t module_idP, int frameP, sub_frame_t subframe
}
if ( UE_template->ul_total_buffer >0)
LOG_D(MAC,"[eNB %d] Frame %d subframe %d UE %d CC id %d: LCGID0 %d, LCGID1 %d, LCGID2 %d LCGID3 %d, BO %d\n",
LOG_I(MAC,"[eNB %d] Frame %d subframe %d UE %d CC id %d: LCGID0 %d, LCGID1 %d, LCGID2 %d LCGID3 %d, BO %d\n",
module_idP, frameP,subframeP, UE_id, UE_PCCID(module_idP,UE_id),
UE_template->ul_buffer_info[LCGID0],
UE_template->ul_buffer_info[LCGID1],
......
......@@ -117,7 +117,7 @@ unsigned short fill_rar(
rar[2] |= ((mcs&0x8)>>3); // mcs 10