Commit 9c4cee34 authored by GabrirelCouturier's avatar GabrirelCouturier

[OAI-UE] several fixes in OAI-UE

           1- implement max harq retrans
           2- bug in harqId > 1 for dci format 1A
           3- wrong G computation
           4- bug in harq UL for scheduling flag
           5- initial sync, limit freq offset to 150Hz
parent 34b75f39
...@@ -36,7 +36,10 @@ ...@@ -36,7 +36,10 @@
#include "PHY/vars.h" #include "PHY/vars.h"
#endif #endif
#include "assertions.h" #include "assertions.h"
#include "LAYER2/MAC/extern.h"
#include "LAYER2/MAC/defs.h"
//#define DEBUG_DCI //#define DEBUG_DCI
uint32_t localRIV2alloc_LUT6[32]; uint32_t localRIV2alloc_LUT6[32];
...@@ -3922,10 +3925,10 @@ int generate_ue_dlsch_params_from_dci(int frame, ...@@ -3922,10 +3925,10 @@ int generate_ue_dlsch_params_from_dci(int frame,
dlsch0_harq = dlsch[0]->harq_processes[harq_pid]; dlsch0_harq = dlsch[0]->harq_processes[harq_pid];
} else { } else {
if (harq_pid>1) { //if (harq_pid>1) {
LOG_E(PHY,"Format 1A: harq_pid > 1\n"); // LOG_E(PHY,"Format 1A: harq_pid > 1\n");
return(-1); // return(-1);
} //}
dlsch0_harq = dlsch[0]->harq_processes[harq_pid]; dlsch0_harq = dlsch[0]->harq_processes[harq_pid];
NPRB = RIV2nb_rb_LUT25[rballoc]; NPRB = RIV2nb_rb_LUT25[rballoc];
...@@ -5552,7 +5555,8 @@ int generate_ue_dlsch_params_from_dci(int frame, ...@@ -5552,7 +5555,8 @@ int generate_ue_dlsch_params_from_dci(int frame,
#ifdef DEBUG_DCI #ifdef DEBUG_DCI
if (dlsch[0]) { if (dlsch[0] && (dlsch[0]->rnti != 0xffff)) {
printf("dci_format:%d \n",dci_format);
printf("PDSCH dlsch0 UE: rnti %x\n",dlsch[0]->rnti); printf("PDSCH dlsch0 UE: rnti %x\n",dlsch[0]->rnti);
printf("PDSCH dlsch0 UE: NBRB %d\n",dlsch0_harq->nb_rb); printf("PDSCH dlsch0 UE: NBRB %d\n",dlsch0_harq->nb_rb);
printf("PDSCH dlsch0 UE: rballoc %x\n",dlsch0_harq->rb_alloc_even[0]); printf("PDSCH dlsch0 UE: rballoc %x\n",dlsch0_harq->rb_alloc_even[0]);
...@@ -6396,7 +6400,11 @@ int generate_ue_ulsch_params_from_dci(void *dci_pdu, ...@@ -6396,7 +6400,11 @@ int generate_ue_ulsch_params_from_dci(void *dci_pdu,
if ((rnti >= cba_rnti) && (rnti < p_rnti)) if ((rnti >= cba_rnti) && (rnti < p_rnti))
ulsch->harq_processes[harq_pid]->subframe_cba_scheduling_flag = 1; //+=1 this indicates the number of dci / cba group: not supported in the data struct ulsch->harq_processes[harq_pid]->subframe_cba_scheduling_flag = 1; //+=1 this indicates the number of dci / cba group: not supported in the data struct
else else
ulsch->harq_processes[harq_pid]->subframe_scheduling_flag = 1; {
ulsch->harq_processes[harq_pid]->subframe_scheduling_flag = 1;
//LOG_I(PHY,"[HARQ-UL harqId: %d] DCI0 ==> subframe_scheduling_flag = %d round: %d\n", harq_pid, ulsch->harq_processes[harq_pid]->subframe_scheduling_flag, ulsch->harq_processes[harq_pid]->round);
}
ulsch->harq_processes[harq_pid]->TPC = TPC; ulsch->harq_processes[harq_pid]->TPC = TPC;
...@@ -6426,7 +6434,41 @@ int generate_ue_ulsch_params_from_dci(void *dci_pdu, ...@@ -6426,7 +6434,41 @@ int generate_ue_ulsch_params_from_dci(void *dci_pdu,
ulsch->harq_processes[harq_pid]->round = 0; ulsch->harq_processes[harq_pid]->round = 0;
} else { } else {
// ulsch->harq_processes[harq_pid]->Ndi = 0; // ulsch->harq_processes[harq_pid]->Ndi = 0;
// ulsch->harq_processes[harq_pid]->round++; // This is done in phich RX //ulsch->harq_processes[harq_pid]->round++; // This is done in phich RX
//#ifdef DEBUG_PHICH
//LOG_I(PHY,"[UE %d][PUSCH %d] Frame %d subframe %d Adaptative Retrans, NDI not toggled => Nack. maxHARQ_Tx %d \n",
// ue->Mod_id,harq_pid,
// proc->frame_rx,
// subframe,
// UE_mac_inst[eNB_id].scheduling_info.maxHARQ_Tx);
//#endif
ulsch->harq_processes[harq_pid] = ulsch->harq_processes[8];
ulsch->harq_processes[harq_pid]->round++;
//LOG_I(PHY," Adaptative retransmission - copy temporary harq Process to current harq process. [harqId %d round %d] \n",harq_pid, ulsch->harq_processes[8]->round);
if (ulsch->harq_processes[harq_pid]->round >= UE_mac_inst[eNB_id].scheduling_info.maxHARQ_Tx)
{
ulsch->harq_processes[harq_pid]->subframe_scheduling_flag = 0;
ulsch->harq_processes[harq_pid]->round = 0;
ulsch->harq_processes[harq_pid]->status = IDLE;
//LOG_I(PHY," PUSCH MAX Retransmission acheived ==> flush harq buff (%d) \n",harq_pid);
//LOG_I(PHY," [HARQ-UL harqId: %d] Adaptative retransmission NACK MAX RETRANS(%d) ==> subframe_scheduling_flag = %d round: %d\n", harq_pid, UE_mac_inst[eNB_id].scheduling_info.maxHARQ_Tx, ulsch->harq_processes[harq_pid]->subframe_scheduling_flag, ulsch->harq_processes[harq_pid]->round);
}
else
{
// ulsch->harq_processes[harq_pid]->subframe_scheduling_flag = 1;
uint8_t rv_table[4] = {0, 2, 3, 1};
ulsch->harq_processes[harq_pid]->rvidx = rv_table[ulsch->harq_processes[harq_pid]->round&3];
ulsch->O_RI = 0;
ulsch->O = 0;
ulsch->uci_format = HLC_subband_cqi_nopmi;
//LOG_I(PHY," [HARQ-UL harqId: %d] Adaptative retransmission NACK ==> subframe_scheduling_flag = %d round: %d\n", harq_pid, ulsch->harq_processes[harq_pid]->subframe_scheduling_flag,ulsch->harq_processes[harq_pid]->round);
}
} }
} }
...@@ -6476,7 +6518,16 @@ int generate_ue_ulsch_params_from_dci(void *dci_pdu, ...@@ -6476,7 +6518,16 @@ int generate_ue_ulsch_params_from_dci(void *dci_pdu,
if (cqi_req == 1) { if (cqi_req == 1) {
ulsch->O_RI = 1; //we only support 2 antenna ports, so this is always 1 according to 3GPP 36.213 Table
if( (AntennaInfoDedicated__transmissionMode_tm3 == transmission_mode) || (AntennaInfoDedicated__transmissionMode_tm4 == transmission_mode) )
{
ulsch->O_RI = 1;
}
else
{
ulsch->O_RI = 0;
}
//ulsch->O_RI = 0; //we only support 2 antenna ports, so this is always 1 according to 3GPP 36.213 Table
switch(transmission_mode) { switch(transmission_mode) {
// The aperiodic CQI reporting mode is fixed for every transmission mode instead of being configured by higher layer signaling // The aperiodic CQI reporting mode is fixed for every transmission mode instead of being configured by higher layer signaling
...@@ -7039,12 +7090,15 @@ int generate_ue_ulsch_params_from_dci(void *dci_pdu, ...@@ -7039,12 +7090,15 @@ int generate_ue_ulsch_params_from_dci(void *dci_pdu,
#ifdef DEBUG_DCI #ifdef DEBUG_DCI
printf("Format 0 DCI : ulsch (ue): NBRB %d\n",ulsch->harq_processes[harq_pid]->nb_rb); printf("Format 0 DCI : ulsch (ue): NBRB %d\n",ulsch->harq_processes[harq_pid]->nb_rb);
printf("Format 0 DCI :ulsch (ue): first_rb %d\n",ulsch->harq_processes[harq_pid]->first_rb); printf("Format 0 DCI :ulsch (ue): first_rb %d\n",ulsch->harq_processes[harq_pid]->first_rb);
printf("Format 0 DCI :ulsch (ue): rballoc %d\n",rballoc);
printf("Format 0 DCI :ulsch (ue): harq_pid %d\n",harq_pid); printf("Format 0 DCI :ulsch (ue): harq_pid %d\n",harq_pid);
printf("Format 0 DCI :ulsch (ue): first_tx %d\n",ulsch->harq_processes[harq_pid]->first_tx);
printf("Format 0 DCI :ulsch (ue): DCINdi %d\n",ulsch->harq_processes[harq_pid]->DCINdi);
printf("Format 0 DCI :ulsch (ue): round %d\n",ulsch->harq_processes[harq_pid]->round); printf("Format 0 DCI :ulsch (ue): round %d\n",ulsch->harq_processes[harq_pid]->round);
printf("Format 0 DCI :ulsch (ue): TBS %d\n",ulsch->harq_processes[harq_pid]->TBS); printf("Format 0 DCI :ulsch (ue): TBS %d\n",ulsch->harq_processes[harq_pid]->TBS);
printf("Format 0 DCI :ulsch (ue): mcs %d\n",ulsch->harq_processes[harq_pid]->mcs); printf("Format 0 DCI :ulsch (ue): mcs %d\n",ulsch->harq_processes[harq_pid]->mcs);
printf("Format 0 DCI :ulsch (ue): O %d\n",ulsch->O); printf("Format 0 DCI :ulsch (ue): O %d\n",ulsch->O);
printf("Format 0 DCI :ulsch (ue): cqiReq %d\n",cqi_req);
if (frame_parms->frame_type == TDD) if (frame_parms->frame_type == TDD)
printf("Format 0 DCI :ulsch (ue): O_ACK/DAI %d/%d\n",ulsch->harq_processes[harq_pid]->O_ACK,dai); printf("Format 0 DCI :ulsch (ue): O_ACK/DAI %d/%d\n",ulsch->harq_processes[harq_pid]->O_ACK,dai);
else else
......
...@@ -227,6 +227,11 @@ typedef struct { ...@@ -227,6 +227,11 @@ typedef struct {
uint8_t control_only; uint8_t control_only;
/// Flag to indicate that this is a calibration ULSCH (i.e. no MAC SDU and filled with TDD calibration information) /// Flag to indicate that this is a calibration ULSCH (i.e. no MAC SDU and filled with TDD calibration information)
// int calibration_flag; // int calibration_flag;
/// Number of soft channel bits
uint32_t G;
// decode phich
uint8_t decode_phich;
} LTE_UL_UE_HARQ_t; } LTE_UL_UE_HARQ_t;
typedef struct { typedef struct {
...@@ -278,7 +283,7 @@ typedef struct { ...@@ -278,7 +283,7 @@ typedef struct {
/// SRS active flag /// SRS active flag
uint8_t srs_active; uint8_t srs_active;
/// Pointers to 8 HARQ processes for the ULSCH /// Pointers to 8 HARQ processes for the ULSCH
LTE_UL_UE_HARQ_t *harq_processes[8]; LTE_UL_UE_HARQ_t *harq_processes[9];
/// Pointer to CQI data /// Pointer to CQI data
uint8_t o[MAX_CQI_BYTES]; uint8_t o[MAX_CQI_BYTES];
/// Length of CQI data (bits) /// Length of CQI data (bits)
......
...@@ -619,7 +619,11 @@ uint32_t dlsch_decoding(PHY_VARS_UE *phy_vars_ue, ...@@ -619,7 +619,11 @@ uint32_t dlsch_decoding(PHY_VARS_UE *phy_vars_ue,
harq_process->errors[harq_process->round]++; harq_process->errors[harq_process->round]++;
harq_process->round++; harq_process->round++;
// LOG_D(PHY,"[UE %d] DLSCH: Setting NACK for subframe %d (pid %d, round %d)\n",phy_vars_ue->Mod_id,subframe,harq_pid,harq_process->round);
if(is_crnti)
{
LOG_D(PHY,"[UE %d] DLSCH: Setting NACK for subframe %d (pid %d, round %d, TBS %d)\n",phy_vars_ue->Mod_id,subframe,harq_pid,harq_process->round,harq_process->TBS);
}
// printf("Rate: [UE %d] DLSCH: Setting NACK for subframe %d (pid %d, round %d)\n",phy_vars_ue->Mod_id,subframe,harq_pid,harq_process->round); // printf("Rate: [UE %d] DLSCH: Setting NACK for subframe %d (pid %d, round %d)\n",phy_vars_ue->Mod_id,subframe,harq_pid,harq_process->round);
if (harq_process->round >= dlsch->Mdlharq) { if (harq_process->round >= dlsch->Mdlharq) {
harq_process->status = SCH_IDLE; harq_process->status = SCH_IDLE;
...@@ -632,7 +636,10 @@ uint32_t dlsch_decoding(PHY_VARS_UE *phy_vars_ue, ...@@ -632,7 +636,10 @@ uint32_t dlsch_decoding(PHY_VARS_UE *phy_vars_ue,
dlsch->harq_ack[subframe].ack = 1; dlsch->harq_ack[subframe].ack = 1;
dlsch->harq_ack[subframe].harq_id = harq_pid; dlsch->harq_ack[subframe].harq_id = harq_pid;
dlsch->harq_ack[subframe].send_harq_status = 1; dlsch->harq_ack[subframe].send_harq_status = 1;
LOG_D(PHY,"[UE %d] DLSCH: Setting ACK for subframe %d (pid %d, round %d)\n",phy_vars_ue->Mod_id,subframe,harq_pid,harq_process->round); if(is_crnti)
{
LOG_D(PHY,"[UE %d] DLSCH: Setting ACK for subframe %d (pid %d, round %d, TBS %d)\n",phy_vars_ue->Mod_id,subframe,harq_pid,harq_process->round,harq_process->TBS);
}
} }
......
...@@ -463,7 +463,7 @@ int initial_sync(PHY_VARS_UE *ue, runmode_t mode) ...@@ -463,7 +463,7 @@ int initial_sync(PHY_VARS_UE *ue, runmode_t mode)
} }
/* Consider this is a false detection if the offset is > 1000 Hz */ /* Consider this is a false detection if the offset is > 1000 Hz */
if( (abs(ue->common_vars.freq_offset) > 1000) && (ret == 0) ) if( (abs(ue->common_vars.freq_offset) > 150) && (ret == 0) )
{ {
ret=-1; ret=-1;
LOG_E(HW,"Ignore MIB with high freq offset [%d Hz] estimation \n",ue->common_vars.freq_offset); LOG_E(HW,"Ignore MIB with high freq offset [%d Hz] estimation \n",ue->common_vars.freq_offset);
......
...@@ -34,6 +34,10 @@ ...@@ -34,6 +34,10 @@
#include "PHY/extern.h" #include "PHY/extern.h"
#include "SCHED/defs.h" #include "SCHED/defs.h"
#include "defs.h" #include "defs.h"
#include "LAYER2/MAC/extern.h"
#include "LAYER2/MAC/defs.h"
#ifndef USER_MODE #ifndef USER_MODE
#include "ARCH/CBMIMO1/DEVICE_DRIVER/extern.h" #include "ARCH/CBMIMO1/DEVICE_DRIVER/extern.h"
#endif #endif
...@@ -1375,15 +1379,30 @@ void rx_phich(PHY_VARS_UE *ue, ...@@ -1375,15 +1379,30 @@ void rx_phich(PHY_VARS_UE *ue,
subframe, subframe,
HI16, HI16,
nseq_PHICH, nseq_PHICH,
ngroup_PHICH); ngroup_PHICH,
UE_mac_inst[eNB_id].scheduling_info.maxHARQ_Tx);
//#endif //#endif
ulsch->harq_processes[harq_pid]->subframe_scheduling_flag = 1;
// ulsch->harq_processes[harq_pid]->Ndi = 0; // ulsch->harq_processes[harq_pid]->Ndi = 0;
ulsch->harq_processes[harq_pid]->round++; ulsch->harq_processes[harq_pid]->round++;
ulsch->harq_processes[harq_pid]->rvidx = rv_table[ulsch->harq_processes[harq_pid]->round&3];
ulsch->O_RI = 0; if (ulsch->harq_processes[harq_pid]->round >= UE_mac_inst[eNB_id].scheduling_info.maxHARQ_Tx)
ulsch->O = 0; {
ulsch->uci_format = HLC_subband_cqi_nopmi; ulsch->harq_processes[harq_pid]->subframe_scheduling_flag = 0;
ulsch->harq_processes[harq_pid]->round = 0;
ulsch->harq_processes[harq_pid]->status = IDLE;
//LOG_I(PHY,"PUSCH MAX Retransmission acheived ==> flush harq buff (%d) \n",harq_pid);
//LOG_I(PHY,"[HARQ-UL harqId: %d] PHICH NACK MAX RETRANS(%d) ==> subframe_scheduling_flag = %d round: %d\n", harq_pid, UE_mac_inst[eNB_id].scheduling_info.maxHARQ_Tx, ulsch->harq_processes[harq_pid]->subframe_scheduling_flag, ulsch->harq_processes[harq_pid]->round);
}
else
{
// ulsch->harq_processes[harq_pid]->subframe_scheduling_flag = 1;
ulsch->harq_processes[harq_pid]->rvidx = rv_table[ulsch->harq_processes[harq_pid]->round&3];
ulsch->O_RI = 0;
ulsch->O = 0;
ulsch->uci_format = HLC_subband_cqi_nopmi;
//LOG_I(PHY,"[HARQ-UL harqId: %d] PHICH NACK ==> subframe_scheduling_flag = %d round: %d\n", harq_pid, ulsch->harq_processes[harq_pid]->subframe_scheduling_flag,ulsch->harq_processes[harq_pid]->round);
}
} }
...@@ -1405,11 +1424,22 @@ void rx_phich(PHY_VARS_UE *ue, ...@@ -1405,11 +1424,22 @@ void rx_phich(PHY_VARS_UE *ue,
//#endif //#endif
} }
// LOG_I(PHY,"[HARQ-UL harqId: %d] subframe_scheduling_flag = %d \n",harq_pid, ulsch->harq_processes[harq_pid]->subframe_scheduling_flag);
// Incase of adaptive retransmission, PHICH is always decoded as ACK (at least with OAI-eNB)
// Workaround:
// rely only on DCI0 decoding and check if NDI has toggled
// save current harq_processes content in temporary struct
// harqId-8 corresponds to the temporary struct. In total we have 8 harq process(0 ..7) + 1 temporary harq process()
ulsch->harq_processes[8] = ulsch->harq_processes[harq_pid];
ulsch->harq_processes[harq_pid]->subframe_scheduling_flag =0; ulsch->harq_processes[harq_pid]->subframe_scheduling_flag =0;
ulsch->harq_processes[harq_pid]->status = IDLE; ulsch->harq_processes[harq_pid]->status = IDLE;
ulsch->harq_processes[harq_pid]->round = 0; ulsch->harq_processes[harq_pid]->round = 0;
// inform MAC? // inform MAC?
ue->ulsch_Msg3_active[eNB_id] = 0; ue->ulsch_Msg3_active[eNB_id] = 0;
//LOG_I(PHY,"[HARQ-UL harqId: %d] PHICH ACK ==> subframe_scheduling_flag = %d round: %d\n", harq_pid, ulsch->harq_processes[harq_pid]->subframe_scheduling_flag, ulsch->harq_processes[harq_pid]->round);
} }
} }
......
...@@ -498,6 +498,21 @@ uint32_t ulsch_encoding(uint8_t *a, ...@@ -498,6 +498,21 @@ uint32_t ulsch_encoding(uint8_t *a,
G = G - Q_RI - Q_CQI; G = G - Q_RI - Q_CQI;
ulsch->harq_processes[harq_pid]->G = G;
/*
LOG_I(PHY,"ULSCH Encoding G %d, Q_RI %d (O_RI%d, Msc_initial %d, Nsymb_initial%d, beta_offset_ri_times8 %d), Q_CQI %d \n",G,Q_RI,ulsch->O_RI,ulsch->harq_processes[harq_pid]->Msc_initial,ulsch->harq_processes[harq_pid]->Nsymb_initial,ulsch->beta_offset_ri_times8,Q_CQI);
LOG_I(PHY,"ulsch_decoding (Nid_cell %d, rnti %x): harq_pid %d round %d, RV %d, mcs %d, O_RI %d, O_ACK %d, G %d\n",
frame_parms->Nid_cell,ulsch->rnti,
harq_pid,
ulsch->harq_processes[harq_pid]->round,
ulsch->harq_processes[harq_pid]->rvidx,
ulsch->harq_processes[harq_pid]->mcs,
ulsch->O_RI,
ulsch->harq_processes[harq_pid]->O_ACK,
G);
*/
if ((int)G < 0) { if ((int)G < 0) {
LOG_E(PHY,"FATAL: ulsch_coding.c G < 0 (%d) : Q_RI %d, Q_CQI %d, O %d, betaCQI_times8 %d)\n",G,Q_RI,Q_CQI,ulsch->O,ulsch->beta_offset_cqi_times8); LOG_E(PHY,"FATAL: ulsch_coding.c G < 0 (%d) : Q_RI %d, Q_CQI %d, O %d, betaCQI_times8 %d)\n",G,Q_RI,Q_CQI,ulsch->O,ulsch->beta_offset_cqi_times8);
......
...@@ -424,15 +424,17 @@ void ulsch_modulation(int32_t **txdataF, ...@@ -424,15 +424,17 @@ void ulsch_modulation(int32_t **txdataF,
Q_m = get_Qm_ul(ulsch->harq_processes[harq_pid]->mcs); Q_m = get_Qm_ul(ulsch->harq_processes[harq_pid]->mcs);
G = (int)ulsch->harq_processes[harq_pid]->nb_rb * (12 * Q_m) * (ulsch->Nsymb_pusch); //G = (int)ulsch->harq_processes[harq_pid]->nb_rb * (12 * Q_m) * (ulsch->Nsymb_pusch);
G = ulsch->harq_processes[harq_pid]->G;
// Mapping // Mapping
nsymb = (frame_parms->Ncp==0) ? 14:12; nsymb = (frame_parms->Ncp==0) ? 14:12;
Msc_PUSCH = ulsch->harq_processes[harq_pid]->nb_rb*12; Msc_PUSCH = ulsch->harq_processes[harq_pid]->nb_rb*12;
#ifdef DEBUG_ULSCH_MODULATION #ifdef DEBUG_ULSCH_MODULATION
printf("ulsch_modulation.c: Doing modulation (rnti %x,x2 %x) for G=%d bits, harq_pid %d , nb_rb %d, Q_m %d, Nsymb_pusch %d (nsymb %d), subframe %d\n", LOG_D(PHY,"ulsch_modulation.c: Doing modulation (rnti %x,x2 %x) for G=%d bits, harq_pid %d , nb_rb %d, Q_m %d, Nsymb_pusch %d (nsymb %d), subframe %d\n",
ulsch->rnti,x2,G,harq_pid,ulsch->harq_processes[harq_pid]->nb_rb,Q_m, ulsch->Nsymb_pusch,nsymb,subframe); ulsch->rnti,x2,G,harq_pid,ulsch->harq_processes[harq_pid]->nb_rb,Q_m, ulsch->Nsymb_pusch,nsymb,subframe);
#endif #endif
// scrambling (Note the placeholding bits are handled in ulsch_coding.c directly!) // scrambling (Note the placeholding bits are handled in ulsch_coding.c directly!)
......
...@@ -1213,7 +1213,7 @@ void ue_ulsch_uespec_procedures(PHY_VARS_UE *ue,UE_rxtx_proc_t *proc,uint8_t eNB ...@@ -1213,7 +1213,7 @@ void ue_ulsch_uespec_procedures(PHY_VARS_UE *ue,UE_rxtx_proc_t *proc,uint8_t eNB
ue->generate_ul_signal[eNB_id] = 1; ue->generate_ul_signal[eNB_id] = 1;
// deactivate service request // deactivate service request
ue->ulsch[eNB_id]->harq_processes[harq_pid]->subframe_scheduling_flag = 0; // ue->ulsch[eNB_id]->harq_processes[harq_pid]->subframe_scheduling_flag = 0;
ack_status = get_ack(&ue->frame_parms, ack_status = get_ack(&ue->frame_parms,
ue->dlsch[eNB_id][0]->harq_ack, ue->dlsch[eNB_id][0]->harq_ack,
...@@ -3089,22 +3089,27 @@ void ue_dlsch_procedures(PHY_VARS_UE *ue, ...@@ -3089,22 +3089,27 @@ void ue_dlsch_procedures(PHY_VARS_UE *ue,
if (ret == (1+dlsch0->max_turbo_iterations)) { if (ret == (1+dlsch0->max_turbo_iterations)) {
*dlsch_errors=*dlsch_errors+1; *dlsch_errors=*dlsch_errors+1;
if(dlsch0->rnti != 0xffff)
{
LOG_D(PHY,"[UE %d][PDSCH %x/%d] Frame %d subframe %d DLSCH in error (rv %d,mcs %d,TBS %d)\n", LOG_D(PHY,"[UE %d][PDSCH %x/%d] Frame %d subframe %d DLSCH in error (rv %d,mcs %d,TBS %d)\n",
ue->Mod_id,dlsch0->rnti, ue->Mod_id,dlsch0->rnti,
harq_pid,frame_rx,subframe_rx, harq_pid,frame_rx,subframe_rx,
dlsch0->harq_processes[harq_pid]->rvidx, dlsch0->harq_processes[harq_pid]->rvidx,
dlsch0->harq_processes[harq_pid]->mcs, dlsch0->harq_processes[harq_pid]->mcs,
dlsch0->harq_processes[harq_pid]->TBS); dlsch0->harq_processes[harq_pid]->TBS);
}
} else { } else {
if(dlsch0->rnti != 0xffff)
{
LOG_D(PHY,"[UE %d][PDSCH %x/%d] Frame %d subframe %d: Received DLSCH (rv %d,mcs %d,TBS %d)\n", LOG_D(PHY,"[UE %d][PDSCH %x/%d] Frame %d subframe %d: Received DLSCH (rv %d,mcs %d,TBS %d)\n",
ue->Mod_id,dlsch0->rnti, ue->Mod_id,dlsch0->rnti,
harq_pid,frame_rx,subframe_rx, harq_pid,frame_rx,subframe_rx,
dlsch0->harq_processes[harq_pid]->rvidx, dlsch0->harq_processes[harq_pid]->rvidx,
dlsch0->harq_processes[harq_pid]->mcs, dlsch0->harq_processes[harq_pid]->mcs,
dlsch0->harq_processes[harq_pid]->TBS); dlsch0->harq_processes[harq_pid]->TBS);
}
#ifdef DEBUG_DLSCH #ifdef DEBUG_DLSCH
int j; int j;
...@@ -3293,6 +3298,7 @@ int phy_procedures_UE_RX(PHY_VARS_UE *ue,UE_rxtx_proc_t *proc,uint8_t eNB_id,uin ...@@ -3293,6 +3298,7 @@ int phy_procedures_UE_RX(PHY_VARS_UE *ue,UE_rxtx_proc_t *proc,uint8_t eNB_id,uin
// do procedures for C-RNTI // do procedures for C-RNTI
if (ue->dlsch[eNB_id][0]->active == 1) { if (ue->dlsch[eNB_id][0]->active == 1) {
VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME(VCD_SIGNAL_DUMPER_FUNCTIONS_PDSCH_PROC, VCD_FUNCTION_IN);
ue_pdsch_procedures(ue, ue_pdsch_procedures(ue,
proc, proc,
eNB_id, eNB_id,
...@@ -3302,9 +3308,11 @@ int phy_procedures_UE_RX(PHY_VARS_UE *ue,UE_rxtx_proc_t *proc,uint8_t eNB_id,uin ...@@ -3302,9 +3308,11 @@ int phy_procedures_UE_RX(PHY_VARS_UE *ue,UE_rxtx_proc_t *proc,uint8_t eNB_id,uin
ue->pdcch_vars[eNB_id]->num_pdcch_symbols, ue->pdcch_vars[eNB_id]->num_pdcch_symbols,
ue->frame_parms.symbols_per_tti>>1, ue->frame_parms.symbols_per_tti>>1,
abstraction_flag); abstraction_flag);
VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME(VCD_SIGNAL_DUMPER_FUNCTIONS_PDSCH_PROC, VCD_FUNCTION_OUT);
} }
// do procedures for SI-RNTI // do procedures for SI-RNTI
if ((ue->dlsch_SI[eNB_id]) && (ue->dlsch_SI[eNB_id]->active == 1)) { if ((ue->dlsch_SI[eNB_id]) && (ue->dlsch_SI[eNB_id]->active == 1)) {
VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME(VCD_SIGNAL_DUMPER_FUNCTIONS_PDSCH_PROC_SI, VCD_FUNCTION_IN);
ue_pdsch_procedures(ue, ue_pdsch_procedures(ue,
proc, proc,
eNB_id, eNB_id,
...@@ -3314,10 +3322,12 @@ int phy_procedures_UE_RX(PHY_VARS_UE *ue,UE_rxtx_proc_t *proc,uint8_t eNB_id,uin ...@@ -3314,10 +3322,12 @@ int phy_procedures_UE_RX(PHY_VARS_UE *ue,UE_rxtx_proc_t *proc,uint8_t eNB_id,uin
ue->pdcch_vars[eNB_id]->num_pdcch_symbols, ue->pdcch_vars[eNB_id]->num_pdcch_symbols,
ue->frame_parms.symbols_per_tti>>1, ue->frame_parms.symbols_per_tti>>1,
abstraction_flag); abstraction_flag);
VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME(VCD_SIGNAL_DUMPER_FUNCTIONS_PDSCH_PROC_SI, VCD_FUNCTION_OUT);
} }
// do procedures for SI-RNTI // do procedures for SI-RNTI
if ((ue->dlsch_p[eNB_id]) && (ue->dlsch_p[eNB_id]->active == 1)) { if ((ue->dlsch_p[eNB_id]) && (ue->dlsch_p[eNB_id]->active == 1)) {
VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME(VCD_SIGNAL_DUMPER_FUNCTIONS_PDSCH_PROC_P, VCD_FUNCTION_IN);
ue_pdsch_procedures(ue, ue_pdsch_procedures(ue,
proc, proc,
eNB_id, eNB_id,
...@@ -3327,10 +3337,12 @@ int phy_procedures_UE_RX(PHY_VARS_UE *ue,UE_rxtx_proc_t *proc,uint8_t eNB_id,uin ...@@ -3327,10 +3337,12 @@ int phy_procedures_UE_RX(PHY_VARS_UE *ue,UE_rxtx_proc_t *proc,uint8_t eNB_id,uin
ue->pdcch_vars[eNB_id]->num_pdcch_symbols, ue->pdcch_vars[eNB_id]->num_pdcch_symbols,
ue->frame_parms.symbols_per_tti>>1, ue->frame_parms.symbols_per_tti>>1,
abstraction_flag); abstraction_flag);
VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME(VCD_SIGNAL_DUMPER_FUNCTIONS_PDSCH_PROC_P, VCD_FUNCTION_OUT);
} }
// do procedures for RA-RNTI // do procedures for RA-RNTI
if ((ue->dlsch_ra[eNB_id]) && (ue->dlsch_ra[eNB_id]->active == 1)) { if ((ue->dlsch_ra[eNB_id]) && (ue->dlsch_ra[eNB_id]->active == 1)) {
VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME(VCD_SIGNAL_DUMPER_FUNCTIONS_PDSCH_PROC_RA, VCD_FUNCTION_IN);
ue_pdsch_procedures(ue, ue_pdsch_procedures(ue,
proc, proc,
eNB_id, eNB_id,
...@@ -3340,6 +3352,7 @@ int phy_procedures_UE_RX(PHY_VARS_UE *ue,UE_rxtx_proc_t *proc,uint8_t eNB_id,uin ...@@ -3340,6 +3352,7 @@ int phy_procedures_UE_RX(PHY_VARS_UE *ue,UE_rxtx_proc_t *proc,uint8_t eNB_id,uin
ue->pdcch_vars[eNB_id]->num_pdcch_symbols, ue->pdcch_vars[eNB_id]->num_pdcch_symbols,
ue->frame_parms.symbols_per_tti>>1, ue->frame_parms.symbols_per_tti>>1,
abstraction_flag); abstraction_flag);
VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME(VCD_SIGNAL_DUMPER_FUNCTIONS_PDSCH_PROC_RA, VCD_FUNCTION_OUT);
} }
if (subframe_select(&ue->frame_parms,subframe_rx) != SF_S) { // do front-end processing for second slot, and first symbol of next subframe if (subframe_select(&ue->frame_parms,subframe_rx) != SF_S) { // do front-end processing for second slot, and first symbol of next subframe
...@@ -3375,6 +3388,7 @@ int phy_procedures_UE_RX(PHY_VARS_UE *ue,UE_rxtx_proc_t *proc,uint8_t eNB_id,uin ...@@ -3375,6 +3388,7 @@ int phy_procedures_UE_RX(PHY_VARS_UE *ue,UE_rxtx_proc_t *proc,uint8_t eNB_id,uin
// do procedures for C-RNTI // do procedures for C-RNTI
if (ue->dlsch[eNB_id][0]->active == 1) { if (ue->dlsch[eNB_id][0]->active == 1) {
VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME(VCD_SIGNAL_DUMPER_FUNCTIONS_PDSCH_PROC, VCD_FUNCTION_IN);
ue_pdsch_procedures(ue, ue_pdsch_procedures(ue,
proc, proc,
eNB_id, eNB_id,
...@@ -3393,7 +3407,7 @@ int phy_procedures_UE_RX(PHY_VARS_UE *ue,UE_rxtx_proc_t *proc,uint8_t eNB_id,uin ...@@ -3393,7 +3407,7 @@ int phy_procedures_UE_RX(PHY_VARS_UE *ue,UE_rxtx_proc_t *proc,uint8_t eNB_id,uin
&ue->dlsch_errors[eNB_id], &ue->dlsch_errors[eNB_id],
mode, mode,
abstraction_flag); abstraction_flag);
VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME(VCD_SIGNAL_DUMPER_FUNCTIONS_PDSCH_PROC, VCD_FUNCTION_OUT);
} }
else { else {
......
...@@ -240,6 +240,10 @@ const char* eurecomFunctionsNames[] = { ...@@ -240,6 +240,10 @@ const char* eurecomFunctionsNames[] = {
"rx_pdcch", "rx_pdcch",
"dci_decoding", "dci_decoding",
"rx_phich", "rx_phich",
"pdsch_procedures",
"pdsch_procedures_si",
"pdsch_procedures_p",
"pdsch_procedures_ra",
"phy_ue_config_sib2", "phy_ue_config_sib2",
"macxface_phy_config_sib1_eNB", "macxface_phy_config_sib1_eNB",
"macxface_phy_config_sib2_eNB", "macxface_phy_config_sib2_eNB",
......
...@@ -214,6 +214,10 @@ typedef enum { ...@@ -214,6 +214,10 @@ typedef enum {
VCD_SIGNAL_DUMPER_FUNCTIONS_RX_PDCCH, VCD_SIGNAL_DUMPER_FUNCTIONS_RX_PDCCH,
VCD_SIGNAL_DUMPER_FUNCTIONS_DCI_DECODING, VCD_SIGNAL_DUMPER_FUNCTIONS_DCI_DECODING,
VCD_SIGNAL_DUMPER_FUNCTIONS_RX_PHICH, VCD_SIGNAL_DUMPER_FUNCTIONS_RX_PHICH,
VCD_SIGNAL_DUMPER_FUNCTIONS_PDSCH_PROC,
VCD_SIGNAL_DUMPER_FUNCTIONS_PDSCH_PROC_SI,
VCD_SIGNAL_DUMPER_FUNCTIONS_PDSCH_PROC_P,
VCD_SIGNAL_DUMPER_FUNCTIONS_PDSCH_PROC_RA,
VCD_SIGNAL_DUMPER_FUNCTIONS_PHY_UE_CONFIG_SIB2, VCD_SIGNAL_DUMPER_FUNCTIONS_PHY_UE_CONFIG_SIB2,
VCD_SIGNAL_DUMPER_FUNCTIONS_PHY_CONFIG_SIB1_ENB, VCD_SIGNAL_DUMPER_FUNCTIONS_PHY_CONFIG_SIB1_ENB,
VCD_SIGNAL_DUMPER_FUNCTIONS_PHY_CONFIG_SIB2_ENB, VCD_SIGNAL_DUMPER_FUNCTIONS_PHY_CONFIG_SIB2_ENB,
......
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