Commit 335e894c authored by Raphael Defosseux's avatar Raphael Defosseux

Merge remote-tracking branch 'origin/T-ue-fixes-2019-w14' into develop_integration_2019_w15

parents 3ce28618 4905a5e8
This diff is collapsed.
...@@ -2171,8 +2171,6 @@ int generate_ue_dlsch_params_from_dci(int frame, ...@@ -2171,8 +2171,6 @@ int generate_ue_dlsch_params_from_dci(int frame,
uint8_t beamforming_mode, uint8_t beamforming_mode,
uint16_t tc_rnti) uint16_t tc_rnti)
{ {
uint8_t harq_pid=0;
uint8_t frame_type=frame_parms->frame_type; uint8_t frame_type=frame_parms->frame_type;
uint8_t tpmi=0; uint8_t tpmi=0;
LTE_UE_DLSCH_t *dlsch0=NULL,*dlsch1=NULL; LTE_UE_DLSCH_t *dlsch0=NULL,*dlsch1=NULL;
...@@ -2488,15 +2486,15 @@ int generate_ue_dlsch_params_from_dci(int frame, ...@@ -2488,15 +2486,15 @@ int generate_ue_dlsch_params_from_dci(int frame,
case format1E_2A_M10PRB: case format1E_2A_M10PRB:
if (!dlsch[0]) return -1; 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) { if (dci_info_extarcted.harq_pid>=8) {
LOG_E(PHY,"Format 1E_2A_M10PRB: harq_pid=%d >= 8\n", harq_pid); LOG_E(PHY,"Format 1E_2A_M10PRB: harq_pid=%d >= 8\n", dci_info_extarcted.harq_pid);
return(-1); return(-1);
} }
dlsch[0]->current_harq_pid = harq_pid; dlsch[0]->current_harq_pid = dci_info_extarcted.harq_pid;
dlsch[0]->harq_ack[subframe].harq_id = 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; tbswap = ((DCI1E_5MHz_2A_M10PRB_TDD_t *)dci_pdu)->tb_swap;
...@@ -2511,7 +2509,7 @@ int generate_ue_dlsch_params_from_dci(int frame, ...@@ -2511,7 +2509,7 @@ int generate_ue_dlsch_params_from_dci(int frame,
*/ */
dlsch0 = dlsch[0]; 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 // Needs to be checked
dlsch0_harq->codeword=0; dlsch0_harq->codeword=0;
conv_rballoc(((DCI1E_5MHz_2A_M10PRB_TDD_t *)dci_pdu)->rah, conv_rballoc(((DCI1E_5MHz_2A_M10PRB_TDD_t *)dci_pdu)->rah,
...@@ -2627,7 +2625,7 @@ int generate_ue_dlsch_params_from_dci(int frame, ...@@ -2627,7 +2625,7 @@ int generate_ue_dlsch_params_from_dci(int frame,
// is NAK or an ACK was not received // is NAK or an ACK was not received
dlsch0->harq_ack[subframe].ack = 1; 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->harq_ack[subframe].send_harq_status = 1;
dlsch0->active = 0; dlsch0->active = 0;
return(0); return(0);
...@@ -2683,7 +2681,7 @@ int generate_ue_dlsch_params_from_dci(int frame, ...@@ -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(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(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->mcs),
T_INT(dlsch0_harq->TBS)); T_INT(dlsch0_harq->TBS));
} }
......
...@@ -1517,15 +1517,19 @@ void ue_ulsch_uespec_procedures(PHY_VARS_UE *ue,UE_rxtx_proc_t *proc,uint8_t eNB ...@@ -1517,15 +1517,19 @@ 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; ue->ulsch[eNB_id]->harq_processes[harq_pid]->O_ACK = ack_status_cw0 + ack_status_cw1;
} }
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 {
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 ( LOG_DEBUGFLAG(DEBUG_UE_PHYPROC)) {
if(ue->ulsch[eNB_id]->o_ACK[0]) { if(ue->ulsch[eNB_id]->o_ACK[0]) {
LOG_I(PHY,"PUSCH ACK\n"); LOG_I(PHY,"PUSCH ACK\n");
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 { } else {
LOG_I(PHY,"PUSCH NACK\n"); 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));
} }
LOG_I(PHY,"[UE %d][PDSCH %x] AbsSubFrame %d.%d Generating ACK (%d,%d) for %d bits on PUSCH\n", LOG_I(PHY,"[UE %d][PDSCH %x] AbsSubFrame %d.%d Generating ACK (%d,%d) for %d bits on PUSCH\n",
...@@ -2035,14 +2039,12 @@ void ue_pucch_procedures(PHY_VARS_UE *ue,UE_rxtx_proc_t *proc,uint8_t eNB_id,uin ...@@ -2035,14 +2039,12 @@ 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(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));
T_INT(ue->dlsch[ue->current_thread_id[proc->subframe_rx]][eNB_id][0]->current_harq_pid)); } else {
} 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(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));
T_INT(ue->dlsch[ue->current_thread_id[proc->subframe_rx]][eNB_id][0]->current_harq_pid));
}
} }
generate_pucch1x(ue->common_vars.txdataF, generate_pucch1x(ue->common_vars.txdataF,
...@@ -2739,18 +2741,21 @@ int ue_pdcch_procedures(uint8_t eNB_id,PHY_VARS_UE *ue,UE_rxtx_proc_t *proc,uint ...@@ -2739,18 +2741,21 @@ int ue_pdcch_procedures(uint8_t eNB_id,PHY_VARS_UE *ue,UE_rxtx_proc_t *proc,uint
CBA_RNTI, CBA_RNTI,
eNB_id, eNB_id,
0)==0)) { 0)==0)) {
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),
T_INT(dci_alloc_rx[i].rnti),
T_INT(harq_pid),
T_INT(ue->ulsch[eNB_id]->harq_processes[harq_pid]->mcs),
T_INT(ue->ulsch[eNB_id]->harq_processes[harq_pid]->round),
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)) { if (LOG_DEBUGFLAG(DEBUG_UE_PHYPROC)) {
LOG_USEDINLOG_VAR(int8_t,harq_pid) = subframe2harq_pid(&ue->frame_parms, 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_frame(&ue->frame_parms,proc->frame_rx,proc->subframe_rx),
pdcch_alloc2ul_subframe(&ue->frame_parms,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),
T_INT(dci_alloc_rx[i].rnti),
T_INT(harq_pid),
T_INT(ue->ulsch[eNB_id]->harq_processes[harq_pid]->mcs),
T_INT(ue->ulsch[eNB_id]->harq_processes[harq_pid]->round),
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));
LOG_D(PHY,"[UE %d] Generate UE ULSCH C_RNTI format 0 (subframe %d)\n",ue->Mod_id,subframe_rx); LOG_D(PHY,"[UE %d] Generate UE ULSCH C_RNTI format 0 (subframe %d)\n",ue->Mod_id,subframe_rx);
} }
} }
......
...@@ -1764,6 +1764,7 @@ void *UE_thread(void *arg) { ...@@ -1764,6 +1764,7 @@ void *UE_thread(void *arg) {
UE->frame_parms.ofdm_symbol_size-UE->frame_parms.nb_prefix_samples0; UE->frame_parms.ofdm_symbol_size-UE->frame_parms.nb_prefix_samples0;
proc->instance_cnt_rxtx++; 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); 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_cond_signal(&proc->cond_rxtx) ==0,"");
AssertFatal(pthread_mutex_unlock(&proc->mutex_rxtx) ==0,""); AssertFatal(pthread_mutex_unlock(&proc->mutex_rxtx) ==0,"");
initRefTimes(t1); 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