Commit 4905a5e8 authored by Cedric Roux's avatar Cedric Roux

bugfixes for the ue T tracer

Not much major changes. In openair1/PHY/LTE_UE_TRANSPORT/dci_tools_ue.c,
in the function generate_ue_dlsch_params_from_dci,
'harq_pid' was removed and dci_info_extarcted.harq_pid is now used for
all cases.

The ue T tracer only deals with PHY signals (no MAC, RLC, PDCP, RRC).
parent b39bf79b
This diff is collapsed.
......@@ -2171,8 +2171,6 @@ int generate_ue_dlsch_params_from_dci(int frame,
uint8_t beamforming_mode,
uint16_t tc_rnti)
{
uint8_t harq_pid=0;
uint8_t frame_type=frame_parms->frame_type;
uint8_t tpmi=0;
LTE_UE_DLSCH_t *dlsch0=NULL,*dlsch1=NULL;
......@@ -2488,15 +2486,15 @@ int generate_ue_dlsch_params_from_dci(int frame,
case format1E_2A_M10PRB:
if (!dlsch[0]) return -1;
harq_pid = ((DCI1E_5MHz_2A_M10PRB_TDD_t *)dci_pdu)->harq_pid;
dci_info_extarcted.harq_pid = ((DCI1E_5MHz_2A_M10PRB_TDD_t *)dci_pdu)->harq_pid;
if (harq_pid>=8) {
LOG_E(PHY,"Format 1E_2A_M10PRB: harq_pid=%d >= 8\n", harq_pid);
if (dci_info_extarcted.harq_pid>=8) {
LOG_E(PHY,"Format 1E_2A_M10PRB: harq_pid=%d >= 8\n", dci_info_extarcted.harq_pid);
return(-1);
}
dlsch[0]->current_harq_pid = harq_pid;
dlsch[0]->harq_ack[subframe].harq_id = harq_pid;
dlsch[0]->current_harq_pid = dci_info_extarcted.harq_pid;
dlsch[0]->harq_ack[subframe].harq_id = dci_info_extarcted.harq_pid;
/*
tbswap = ((DCI1E_5MHz_2A_M10PRB_TDD_t *)dci_pdu)->tb_swap;
......@@ -2511,7 +2509,7 @@ int generate_ue_dlsch_params_from_dci(int frame,
*/
dlsch0 = dlsch[0];
dlsch0_harq = dlsch[0]->harq_processes[harq_pid];
dlsch0_harq = dlsch[0]->harq_processes[dci_info_extarcted.harq_pid];
// Needs to be checked
dlsch0_harq->codeword=0;
conv_rballoc(((DCI1E_5MHz_2A_M10PRB_TDD_t *)dci_pdu)->rah,
......@@ -2627,7 +2625,7 @@ int generate_ue_dlsch_params_from_dci(int frame,
// is NAK or an ACK was not received
dlsch0->harq_ack[subframe].ack = 1;
dlsch0->harq_ack[subframe].harq_id = harq_pid;
dlsch0->harq_ack[subframe].harq_id = dci_info_extarcted.harq_pid;
dlsch0->harq_ack[subframe].send_harq_status = 1;
dlsch0->active = 0;
return(0);
......@@ -2683,7 +2681,7 @@ int generate_ue_dlsch_params_from_dci(int frame,
{
T(T_UE_PHY_DLSCH_UE_DCI, T_INT(0), T_INT(frame%1024), T_INT(subframe),
T_INT(dlsch[0]->rnti), T_INT(dci_format),
T_INT(harq_pid),
T_INT(dci_info_extarcted.harq_pid),
T_INT(dlsch0_harq->mcs),
T_INT(dlsch0_harq->TBS));
}
......
......@@ -1517,17 +1517,21 @@ void ue_ulsch_uespec_procedures(PHY_VARS_UE *ue,UE_rxtx_proc_t *proc,uint8_t eNB
ue->ulsch[eNB_id]->harq_processes[harq_pid]->O_ACK = ack_status_cw0 + ack_status_cw1;
}
if ( LOG_DEBUGFLAG(DEBUG_UE_PHYPROC)) {
if(ue->ulsch[eNB_id]->o_ACK[0]) {
LOG_I(PHY,"PUSCH ACK\n");
if (ue->ulsch[eNB_id]->o_ACK[0]) {
T(T_UE_PHY_DLSCH_UE_ACK, T_INT(eNB_id), T_INT(frame_tx%1024), T_INT(subframe_tx), T_INT(ue->dlsch[ue->current_thread_id[proc->subframe_rx]][eNB_id][0]->rnti),
T_INT(ue->dlsch[ue->current_thread_id[proc->subframe_rx]][eNB_id][0]->current_harq_pid));
} else {
LOG_I(PHY,"PUSCH NACK\n");
T(T_UE_PHY_DLSCH_UE_NACK, T_INT(eNB_id), T_INT(frame_tx%1024), T_INT(subframe_tx), T_INT(ue->dlsch[ue->current_thread_id[proc->subframe_rx]][eNB_id][0]->rnti),
T_INT(ue->dlsch[ue->current_thread_id[proc->subframe_rx]][eNB_id][0]->current_harq_pid));
}
if ( LOG_DEBUGFLAG(DEBUG_UE_PHYPROC)) {
if(ue->ulsch[eNB_id]->o_ACK[0]) {
LOG_I(PHY,"PUSCH ACK\n");
} else {
LOG_I(PHY,"PUSCH NACK\n");
}
LOG_I(PHY,"[UE %d][PDSCH %x] AbsSubFrame %d.%d Generating ACK (%d,%d) for %d bits on PUSCH\n",
Mod_id,
ue->ulsch[eNB_id]->rnti,
......@@ -2035,15 +2039,13 @@ void ue_pucch_procedures(PHY_VARS_UE *ue,UE_rxtx_proc_t *proc,uint8_t eNB_id,uin
}
}
if (LOG_DEBUGFLAG(DEBUG_UE_PHYPROC)) {
if(pucch_payload[0]) {
if (pucch_payload[0]) {
T(T_UE_PHY_DLSCH_UE_ACK, T_INT(eNB_id), T_INT(frame_tx%1024), T_INT(subframe_tx), T_INT(ue->dlsch[ue->current_thread_id[proc->subframe_rx]][eNB_id][0]->rnti),
T_INT(ue->dlsch[ue->current_thread_id[proc->subframe_rx]][eNB_id][0]->current_harq_pid));
} else {
T(T_UE_PHY_DLSCH_UE_NACK, T_INT(eNB_id), T_INT(frame_tx%1024), T_INT(subframe_tx), T_INT(ue->dlsch[ue->current_thread_id[proc->subframe_rx]][eNB_id][0]->rnti),
T_INT(ue->dlsch[ue->current_thread_id[proc->subframe_rx]][eNB_id][0]->current_harq_pid));
}
}
generate_pucch1x(ue->common_vars.txdataF,
&ue->frame_parms,
......@@ -2739,8 +2741,7 @@ int ue_pdcch_procedures(uint8_t eNB_id,PHY_VARS_UE *ue,UE_rxtx_proc_t *proc,uint
CBA_RNTI,
eNB_id,
0)==0)) {
if (LOG_DEBUGFLAG(DEBUG_UE_PHYPROC)) {
LOG_USEDINLOG_VAR(int8_t,harq_pid) = subframe2harq_pid(&ue->frame_parms,
int harq_pid = subframe2harq_pid(&ue->frame_parms,
pdcch_alloc2ul_frame(&ue->frame_parms,proc->frame_rx,proc->subframe_rx),
pdcch_alloc2ul_subframe(&ue->frame_parms,proc->subframe_rx));
T(T_UE_PHY_ULSCH_UE_DCI, T_INT(eNB_id), T_INT(proc->frame_rx%1024), T_INT(proc->subframe_rx),
......@@ -2751,6 +2752,10 @@ int ue_pdcch_procedures(uint8_t eNB_id,PHY_VARS_UE *ue,UE_rxtx_proc_t *proc,uint
T_INT(ue->ulsch[eNB_id]->harq_processes[harq_pid]->first_rb),
T_INT(ue->ulsch[eNB_id]->harq_processes[harq_pid]->nb_rb),
T_INT(ue->ulsch[eNB_id]->harq_processes[harq_pid]->TBS));
if (LOG_DEBUGFLAG(DEBUG_UE_PHYPROC)) {
LOG_USEDINLOG_VAR(int8_t,harq_pid) = subframe2harq_pid(&ue->frame_parms,
pdcch_alloc2ul_frame(&ue->frame_parms,proc->frame_rx,proc->subframe_rx),
pdcch_alloc2ul_subframe(&ue->frame_parms,proc->subframe_rx));
LOG_D(PHY,"[UE %d] Generate UE ULSCH C_RNTI format 0 (subframe %d)\n",ue->Mod_id,subframe_rx);
}
}
......
......@@ -1763,6 +1763,7 @@ void *UE_thread(void *arg) {
UE->frame_parms.ofdm_symbol_size-UE->frame_parms.nb_prefix_samples0;
proc->instance_cnt_rxtx++;
LOG_D( PHY, "[SCHED][UE %d] UE RX instance_cnt_rxtx %d subframe %d !!\n", UE->Mod_id, proc->instance_cnt_rxtx,proc->subframe_rx);
T(T_UE_MASTER_TICK, T_INT(0), T_INT(proc->frame_rx%1024), T_INT(proc->subframe_rx));
AssertFatal (pthread_cond_signal(&proc->cond_rxtx) ==0,"");
AssertFatal(pthread_mutex_unlock(&proc->mutex_rxtx) ==0,"");
initRefTimes(t1);
......
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