add ue mac stats and monitoring as per gnb ones
This commit is contained in:
@@ -467,10 +467,10 @@ void nr_init_ul_harq_processes(NR_UL_UE_HARQ_t harq_list[NR_MAX_ULSCH_HARQ_PROCE
|
||||
void init_nr_ue_transport(PHY_VARS_NR_UE *ue) {
|
||||
|
||||
nr_init_dl_harq_processes(ue->dl_harq_processes, NR_MAX_DLSCH_HARQ_PROCESSES, ue->frame_parms.N_RB_DL);
|
||||
nr_init_ul_harq_processes(ue->ul_harq_processes, NR_MAX_ULSCH_HARQ_PROCESSES, ue->frame_parms.N_RB_UL, ue->frame_parms.nb_antennas_tx);
|
||||
|
||||
for(int i=0; i<5; i++)
|
||||
ue->dl_stats[i] = 0;
|
||||
nr_init_ul_harq_processes(ue->ul_harq_processes,
|
||||
NR_MAX_ULSCH_HARQ_PROCESSES,
|
||||
ue->frame_parms.N_RB_UL,
|
||||
ue->frame_parms.nb_antennas_tx);
|
||||
}
|
||||
|
||||
void clean_UE_harq(PHY_VARS_NR_UE *UE)
|
||||
|
||||
@@ -285,7 +285,6 @@ uint32_t nr_dlsch_decoding(PHY_VARS_NR_UE *phy_vars_ue,
|
||||
}
|
||||
|
||||
// HARQ stats
|
||||
phy_vars_ue->dl_stats[harq_process->DLround]++;
|
||||
LOG_D(PHY, "Round %d RV idx %d\n", harq_process->DLround, dlsch->dlsch_config.rv);
|
||||
uint16_t nb_rb;// = 30;
|
||||
uint8_t dmrs_Type = dlsch->dlsch_config.dmrsConfigType;
|
||||
|
||||
@@ -200,13 +200,6 @@ int nr_rx_pbch(PHY_VARS_NR_UE *ue,
|
||||
#define modOrder(I_MCS,I_TBS) ((I_MCS-I_TBS)*2+2) // Find modulation order from I_TBS and I_MCS
|
||||
#endif
|
||||
|
||||
int dump_ue_stats(PHY_VARS_NR_UE *phy_vars_ue,
|
||||
const UE_nr_rxtx_proc_t *proc,
|
||||
char *buffer,
|
||||
int length,
|
||||
runmode_t mode,
|
||||
int input_level_dBm);
|
||||
|
||||
/*!
|
||||
\brief This function performs the initial cell search procedure - PSS detection, SSS detection and PBCH detection. At the
|
||||
end, the basic frame parameters are known (Frame configuration - TDD/FDD and cyclic prefix length,
|
||||
|
||||
@@ -520,8 +520,6 @@ typedef struct PHY_VARS_NR_UE_s {
|
||||
SLIST_HEAD(ral_thresholds_gen_poll_s, ral_threshold_phy_t) ral_thresholds_gen_polled[RAL_LINK_PARAM_GEN_MAX];
|
||||
SLIST_HEAD(ral_thresholds_lte_poll_s, ral_threshold_phy_t) ral_thresholds_lte_polled[RAL_LINK_PARAM_LTE_MAX];
|
||||
#endif
|
||||
int dl_errors;
|
||||
_Atomic(int) dl_stats[16];
|
||||
void* scopeData;
|
||||
// Pointers to hold PDSCH data only for phy simulators
|
||||
void *phy_sim_rxdataF;
|
||||
|
||||
@@ -1010,22 +1010,6 @@ int pbch_pdcch_processing(PHY_VARS_NR_UE *ue, const UE_nr_rxtx_proc_t *proc, nr_
|
||||
} // for rsc_id
|
||||
} // for gNB_id
|
||||
|
||||
if ((frame_rx%64 == 0) && (nr_slot_rx==0)) {
|
||||
LOG_I(NR_PHY,"============================================\n");
|
||||
// fixed text + 8 HARQs rounds à 10 ("999999999/") + NULL
|
||||
// if we use 999999999 HARQs, that should be sufficient for at least 138 hours
|
||||
const size_t harq_output_len = 31 + 10 * 8 + 1;
|
||||
char output[harq_output_len];
|
||||
char *p = output;
|
||||
const char *end = output + harq_output_len;
|
||||
p += snprintf(p, end - p, "[UE %d] Harq round stats for Downlink: %d", ue->Mod_id, ue->dl_stats[0]);
|
||||
for (int round = 1; round < 16 && (round < 3 || ue->dl_stats[round] != 0); ++round)
|
||||
p += snprintf(p, end - p,"/%d", ue->dl_stats[round]);
|
||||
LOG_I(NR_PHY,"%s\n", output);
|
||||
|
||||
LOG_I(NR_PHY,"============================================\n");
|
||||
}
|
||||
|
||||
LOG_D(PHY," ------ --> PDCCH ChannelComp/LLR Frame.slot %d.%d ------ \n", frame_rx%1024, nr_slot_rx);
|
||||
VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME(VCD_SIGNAL_DUMPER_FUNCTIONS_UE_SLOT_FEP_PDCCH, VCD_FUNCTION_IN);
|
||||
|
||||
|
||||
@@ -180,7 +180,7 @@ int test_pucch_basic_error(PHY_VARS_NR_UE *ue, int gNB_id, UE_nr_rxtx_proc_t *pr
|
||||
}
|
||||
|
||||
/* set a tx slot with no ack */
|
||||
NR_UE_HARQ_STATUS_t *harq_status = &ue->dlsch[proc->thread_id][gNB_id][0]->harq_processes[TST_DL_HARQ_PID_FIRST].harq_ack;
|
||||
NR_UE_DL_HARQ_STATUS_t *harq_status = &ue->dlsch[proc->thread_id][gNB_id][0]->harq_processes[TST_DL_HARQ_PID_FIRST].harq_ack;
|
||||
|
||||
harq_status->slot_for_feedback_ack = proc->nr_slot_tx;
|
||||
|
||||
@@ -267,7 +267,7 @@ int test_pucch_common_config_single_transport_block(PHY_VARS_NR_UE *ue, int gNB_
|
||||
common_pucch_configuration(ue, gNB_id, TST_PUCCH_COMMON_CONFIG_INDEX_OK);
|
||||
|
||||
/* set a tx slot with no ack */
|
||||
NR_UE_HARQ_STATUS_t *harq_status = &ue->dlsch[proc->thread_id][gNB_id][0]->harq_processes[TST_DL_HARQ_PID_FIRST].harq_ack;
|
||||
NR_UE_DL_HARQ_STATUS_t *harq_status = &ue->dlsch[proc->thread_id][gNB_id][0]->harq_processes[TST_DL_HARQ_PID_FIRST].harq_ack;
|
||||
|
||||
harq_status->ack = DL_ACK;
|
||||
|
||||
@@ -557,7 +557,7 @@ int test_pucch_dedicated_single_transport_block(PHY_VARS_NR_UE *ue, int gNB_id,
|
||||
int reset_harq = false;
|
||||
int dl_harq_pid[TST_NB_STEP_SINGLE_TRANSPORT_BLOCK] = {TST_DL_HARQ_PID_FIRST, TST_DL_HARQ_PID_SECOND, TST_DL_HARQ_PID_THIRD, TST_DL_HARQ_PID_FOURTH };
|
||||
int pucch_resource_indicator[TST_NB_STEP_SINGLE_TRANSPORT_BLOCK][2] = { { 0, 4 }, { 1, 0 } , { 1, 3 } , { 5, 7 } };
|
||||
NR_UE_HARQ_STATUS_t *harq_status;
|
||||
NR_UE_DL_HARQ_STATUS_t *harq_status;
|
||||
|
||||
ue->PDSCH_Config.maxNrofCodeWordsScheduledByDCI = nb_code_n1;
|
||||
|
||||
@@ -584,7 +584,7 @@ int test_pucch_dedicated_single_transport_block(PHY_VARS_NR_UE *ue, int gNB_id,
|
||||
/* set a tx slot with no ack */
|
||||
ue->dlsch[proc->thread_id][gNB_id][0]->current_harq_pid = dl_harq_pid[i];
|
||||
|
||||
NR_UE_HARQ_STATUS_t *harq_status = &ue->dlsch[proc->thread_id][gNB_id][0]->harq_processes[dl_harq_pid[i]].harq_ack;
|
||||
NR_UE_DL_HARQ_STATUS_t *harq_status = &ue->dlsch[proc->thread_id][gNB_id][0]->harq_processes[dl_harq_pid[i]].harq_ack;
|
||||
|
||||
harq_status->slot_for_feedback_ack = proc->nr_slot_tx;
|
||||
harq_status->send_harq_status = 1;
|
||||
@@ -618,7 +618,7 @@ int test_pucch_dedicated_single_transport_block(PHY_VARS_NR_UE *ue, int gNB_id,
|
||||
/* set a tx slot with no ack */
|
||||
ue->dlsch[proc->thread_id][gNB_id][0]->current_harq_pid = dl_harq_pid[i];
|
||||
|
||||
NR_UE_HARQ_STATUS_t *harq_status = &ue->dlsch[proc->thread_id][gNB_id][0]->harq_processes[dl_harq_pid[i]].harq_ack;
|
||||
NR_UE_DL_HARQ_STATUS_t *harq_status = &ue->dlsch[proc->thread_id][gNB_id][0]->harq_processes[dl_harq_pid[i]].harq_ack;
|
||||
|
||||
harq_status->slot_for_feedback_ack = proc->nr_slot_tx;
|
||||
harq_status->send_harq_status = 1;
|
||||
@@ -662,7 +662,7 @@ int test_pucch_dedicated_two_transport_blocks(PHY_VARS_NR_UE *ue, int gNB_id, UE
|
||||
int reset_harq = false;
|
||||
int dl_harq_pid[TST_NB_STEP_TWO_TRANSPORT_BLOCKS] = {TST_DL_HARQ_PID_FIRST, TST_DL_HARQ_PID_SECOND, TST_DL_HARQ_PID_THIRD, TST_DL_HARQ_PID_FOURTH };
|
||||
int pucch_resource_indicator[TST_NB_STEP_TWO_TRANSPORT_BLOCKS][2] = { { 0, 1 }, { 3, 7 } , { 2 , 4 } , { 4 , 6 } };
|
||||
NR_UE_HARQ_STATUS_t *harq_status;
|
||||
NR_UE_DL_HARQ_STATUS_t *harq_status;
|
||||
int TB_identifier = 1;
|
||||
int thread_number = TST_THREAD_ID;
|
||||
|
||||
@@ -682,7 +682,7 @@ int test_pucch_dedicated_two_transport_blocks(PHY_VARS_NR_UE *ue, int gNB_id, UE
|
||||
/* set a tx slot with no ack */
|
||||
ue->dlsch[proc->thread_id][gNB_id][code_word]->current_harq_pid = dl_harq_pid[i];
|
||||
|
||||
NR_UE_HARQ_STATUS_t *harq_status = &ue->dlsch[proc->thread_id][gNB_id][code_word]->harq_processes[dl_harq_pid[i]].harq_ack;
|
||||
NR_UE_DL_HARQ_STATUS_t *harq_status = &ue->dlsch[proc->thread_id][gNB_id][code_word]->harq_processes[dl_harq_pid[i]].harq_ack;
|
||||
|
||||
harq_status->slot_for_feedback_ack = proc->nr_slot_tx;
|
||||
harq_status->send_harq_status = 1;
|
||||
@@ -725,7 +725,7 @@ int test_pucch_dedicated_two_transport_blocks(PHY_VARS_NR_UE *ue, int gNB_id, UE
|
||||
/* set a tx slot with no ack */
|
||||
ue->dlsch[proc->thread_id][gNB_id][code_word]->current_harq_pid = dl_harq_pid[i];
|
||||
|
||||
NR_UE_HARQ_STATUS_t *harq_status = &ue->dlsch[proc->thread_id][gNB_id][code_word]->harq_processes[dl_harq_pid[i]].harq_ack;
|
||||
NR_UE_DL_HARQ_STATUS_t *harq_status = &ue->dlsch[proc->thread_id][gNB_id][code_word]->harq_processes[dl_harq_pid[i]].harq_ack;
|
||||
|
||||
harq_status->slot_for_feedback_ack = proc->nr_slot_tx;
|
||||
harq_status->send_harq_status = 1;
|
||||
@@ -759,7 +759,7 @@ int test_pucch_dedicated_two_transport_blocks(PHY_VARS_NR_UE *ue, int gNB_id, UE
|
||||
/* set a tx slot with no ack */
|
||||
ue->dlsch[proc->thread_id][gNB_id][code_word]->current_harq_pid = dl_harq_pid[i];
|
||||
|
||||
NR_UE_HARQ_STATUS_t *harq_status = &ue->dlsch[proc->thread_id][gNB_id][code_word]->harq_processes[dl_harq_pid[i]].harq_ack;
|
||||
NR_UE_DL_HARQ_STATUS_t *harq_status = &ue->dlsch[proc->thread_id][gNB_id][code_word]->harq_processes[dl_harq_pid[i]].harq_ack;
|
||||
|
||||
harq_status->slot_for_feedback_ack = proc->nr_slot_tx;
|
||||
harq_status->send_harq_status = 1;
|
||||
@@ -973,7 +973,7 @@ int test_sr_ack_dedicated(PHY_VARS_NR_UE *ue, int gNB_id, UE_nr_rxtx_proc_t *pro
|
||||
|
||||
/* set a first harq ack context */
|
||||
|
||||
NR_UE_HARQ_STATUS_t *harq_status;
|
||||
NR_UE_DL_HARQ_STATUS_t *harq_status;
|
||||
|
||||
ue->dlsch[proc->thread_id][gNB_id][0]->current_harq_pid = TST_DL_HARQ_PID_FIRST;
|
||||
|
||||
@@ -1085,7 +1085,7 @@ int test_csi_dedicated(PHY_VARS_NR_UE *ue, int gNB_id, UE_nr_rxtx_proc_t *proc)
|
||||
|
||||
/* set a first harq ack context */
|
||||
|
||||
NR_UE_HARQ_STATUS_t *harq_status;
|
||||
NR_UE_DL_HARQ_STATUS_t *harq_status;
|
||||
|
||||
ue->dlsch[proc->thread_id][gNB_id][0]->current_harq_pid = TST_DL_HARQ_PID_FIRST;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user