Commit ff6d41b6 authored by Bilel's avatar Bilel
Browse files

[OAI-UE] Mimo feature

parent 5c375d3a
...@@ -51,10 +51,10 @@ int lte_dl_bf_channel_estimation(PHY_VARS_UE *phy_vars_ue, ...@@ -51,10 +51,10 @@ int lte_dl_bf_channel_estimation(PHY_VARS_UE *phy_vars_ue,
int uespec_pilot[300]; int uespec_pilot[300];
LTE_DL_FRAME_PARMS *frame_parms = &phy_vars_ue->frame_parms; LTE_DL_FRAME_PARMS *frame_parms = &phy_vars_ue->frame_parms;
LTE_UE_DLSCH_t **dlsch_ue = phy_vars_ue->dlsch[eNB_id]; LTE_UE_DLSCH_t **dlsch_ue = phy_vars_ue->dlsch[(Ns>>1)&0x1][eNB_id];
LTE_DL_UE_HARQ_t *dlsch0_harq; LTE_DL_UE_HARQ_t *dlsch0_harq;
harq_pid = dlsch_ue[0]->current_harq_pid; harq_pid = dlsch_ue[0]->current_harq_pid;
dlsch0_harq = dlsch_ue[0]->harq_processes[harq_pid]; dlsch0_harq = dlsch_ue[0]->harq_processes[harq_pid];
if (((frame_parms->Ncp == NORMAL) && (symbol>=7)) || if (((frame_parms->Ncp == NORMAL) && (symbol>=7)) ||
......
...@@ -2893,15 +2893,15 @@ void dci_decoding_procedure0(LTE_UE_PDCCH **pdcch_vars, ...@@ -2893,15 +2893,15 @@ void dci_decoding_procedure0(LTE_UE_PDCCH **pdcch_vars,
break; break;
case 2: case 2:
*CCEmap|=(0x03<<(CCEind&0x1f)); *CCEmap|=(1<<(CCEind&0x1f));
break; break;
case 4: case 4:
*CCEmap|=(0x0f<<(CCEind&0x1f)); *CCEmap|=(1<<(CCEind&0x1f));
break; break;
case 8: case 8:
*CCEmap|=(0xff<<(CCEind&0x1f)); *CCEmap|=(1<<(CCEind&0x1f));
break; break;
} }
...@@ -3518,7 +3518,9 @@ uint16_t dci_decoding_procedure(PHY_VARS_UE *ue, ...@@ -3518,7 +3518,9 @@ uint16_t dci_decoding_procedure(PHY_VARS_UE *ue,
} else if (tmode == 3) { } else if (tmode == 3) {
LOG_D(PHY," Now check UE_SPEC format 2A_2A search aggregation 1\n");
// Now check UE_SPEC format 2A_2A search spaces at aggregation 1 // Now check UE_SPEC format 2A_2A search spaces at aggregation 1
old_dci_cnt=dci_cnt;
dci_decoding_procedure0(pdcch_vars,0,mode, dci_decoding_procedure0(pdcch_vars,0,mode,
subframe, subframe,
dci_alloc, dci_alloc,
...@@ -3527,7 +3529,7 @@ uint16_t dci_decoding_procedure(PHY_VARS_UE *ue, ...@@ -3527,7 +3529,7 @@ uint16_t dci_decoding_procedure(PHY_VARS_UE *ue,
mi, mi,
SI_RNTI, SI_RNTI,
ra_rnti, ra_rnti,
P_RNTI, P_RNTI,
0, 0,
format1A, format1A,
format1A, format1A,
...@@ -3542,14 +3544,18 @@ uint16_t dci_decoding_procedure(PHY_VARS_UE *ue, ...@@ -3542,14 +3544,18 @@ uint16_t dci_decoding_procedure(PHY_VARS_UE *ue,
&CCEmap1, &CCEmap1,
&CCEmap2); &CCEmap2);
LOG_D(PHY," format 2A_2A search CCEmap0 %x, format0_found %d, format_c_found %d \n", CCEmap0, format0_found, format_c_found);
if ((CCEmap0==0xffff)|| if ((CCEmap0==0xffff)||
((format0_found==1)&&(format_c_found==1))) ((format0_found==1)&&(format_c_found==1)))
return(dci_cnt); return(dci_cnt);
LOG_D(PHY," format 2A_2A search dci_cnt %d, old_dci_cn t%d \n", dci_cnt, old_dci_cnt);
if (dci_cnt>old_dci_cnt) if (dci_cnt>old_dci_cnt)
return(dci_cnt); return(dci_cnt);
// Now check UE_SPEC format 2 search spaces at aggregation 2 // Now check UE_SPEC format 2 search spaces at aggregation 2
LOG_D(PHY," Now check UE_SPEC format 2A_2A search aggregation 2\n");
old_dci_cnt=dci_cnt;
dci_decoding_procedure0(pdcch_vars,0,mode, dci_decoding_procedure0(pdcch_vars,0,mode,
subframe, subframe,
dci_alloc, dci_alloc,
...@@ -3577,10 +3583,13 @@ uint16_t dci_decoding_procedure(PHY_VARS_UE *ue, ...@@ -3577,10 +3583,13 @@ uint16_t dci_decoding_procedure(PHY_VARS_UE *ue,
((format0_found==1)&&(format_c_found==1))) ((format0_found==1)&&(format_c_found==1)))
return(dci_cnt); return(dci_cnt);
LOG_D(PHY," format 2A_2A search dci_cnt %d, old_dci_cn t%d \n", dci_cnt, old_dci_cnt);
if (dci_cnt>old_dci_cnt) if (dci_cnt>old_dci_cnt)
return(dci_cnt); return(dci_cnt);
// Now check UE_SPEC format 2_2A search spaces at aggregation 4 // Now check UE_SPEC format 2_2A search spaces at aggregation 4
LOG_D(PHY," Now check UE_SPEC format 2_2A search spaces at aggregation 4 \n");
old_dci_cnt=dci_cnt;
dci_decoding_procedure0(pdcch_vars,0,mode, dci_decoding_procedure0(pdcch_vars,0,mode,
subframe, subframe,
dci_alloc, dci_alloc,
...@@ -3589,7 +3598,7 @@ uint16_t dci_decoding_procedure(PHY_VARS_UE *ue, ...@@ -3589,7 +3598,7 @@ uint16_t dci_decoding_procedure(PHY_VARS_UE *ue,
mi, mi,
SI_RNTI, SI_RNTI,
ra_rnti, ra_rnti,
P_RNTI, P_RNTI,
2, 2,
format1A, format1A,
format1A, format1A,
...@@ -3608,11 +3617,14 @@ uint16_t dci_decoding_procedure(PHY_VARS_UE *ue, ...@@ -3608,11 +3617,14 @@ uint16_t dci_decoding_procedure(PHY_VARS_UE *ue,
((format0_found==1)&&(format_c_found==1))) ((format0_found==1)&&(format_c_found==1)))
return(dci_cnt); return(dci_cnt);
LOG_D(PHY," format 2A_2A search dci_cnt %d, old_dci_cn t%d \n", dci_cnt, old_dci_cnt);
if (dci_cnt>old_dci_cnt) if (dci_cnt>old_dci_cnt)
return(dci_cnt); return(dci_cnt);
//#ifdef ALL_AGGREGATION //#ifdef ALL_AGGREGATION
// Now check UE_SPEC format 2_2A search spaces at aggregation 8 // Now check UE_SPEC format 2_2A search spaces at aggregation 8
LOG_D(PHY," Now check UE_SPEC format 2_2A search spaces at aggregation 8 \n");
old_dci_cnt=dci_cnt;
dci_decoding_procedure0(pdcch_vars,0,mode, dci_decoding_procedure0(pdcch_vars,0,mode,
subframe, subframe,
dci_alloc, dci_alloc,
...@@ -3636,9 +3648,17 @@ uint16_t dci_decoding_procedure(PHY_VARS_UE *ue, ...@@ -3636,9 +3648,17 @@ uint16_t dci_decoding_procedure(PHY_VARS_UE *ue,
&CCEmap1, &CCEmap1,
&CCEmap2); &CCEmap2);
//#endif //#endif
if ((CCEmap0==0xffff)||
((format0_found==1)&&(format_c_found==1)))
return(dci_cnt);
LOG_D(PHY," format 2A_2A search dci_cnt %d, old_dci_cn t%d \n", dci_cnt, old_dci_cnt);
if (dci_cnt>old_dci_cnt)
return(dci_cnt);
} else if (tmode == 4) { } else if (tmode == 4) {
// Now check UE_SPEC format 2_2A search spaces at aggregation 1 // Now check UE_SPEC format 2_2A search spaces at aggregation 1
old_dci_cnt=dci_cnt;
dci_decoding_procedure0(pdcch_vars,0,mode, dci_decoding_procedure0(pdcch_vars,0,mode,
subframe, subframe,
dci_alloc, dci_alloc,
...@@ -3670,6 +3690,7 @@ uint16_t dci_decoding_procedure(PHY_VARS_UE *ue, ...@@ -3670,6 +3690,7 @@ uint16_t dci_decoding_procedure(PHY_VARS_UE *ue,
return(dci_cnt); return(dci_cnt);
// Now check UE_SPEC format 2 search spaces at aggregation 2 // Now check UE_SPEC format 2 search spaces at aggregation 2
old_dci_cnt=dci_cnt;
dci_decoding_procedure0(pdcch_vars,0,mode, dci_decoding_procedure0(pdcch_vars,0,mode,
subframe, subframe,
dci_alloc, dci_alloc,
...@@ -3701,6 +3722,7 @@ uint16_t dci_decoding_procedure(PHY_VARS_UE *ue, ...@@ -3701,6 +3722,7 @@ uint16_t dci_decoding_procedure(PHY_VARS_UE *ue,
return(dci_cnt); return(dci_cnt);
// Now check UE_SPEC format 2_2A search spaces at aggregation 4 // Now check UE_SPEC format 2_2A search spaces at aggregation 4
old_dci_cnt=dci_cnt;
dci_decoding_procedure0(pdcch_vars,0,mode, dci_decoding_procedure0(pdcch_vars,0,mode,
subframe, subframe,
dci_alloc, dci_alloc,
...@@ -3733,6 +3755,7 @@ uint16_t dci_decoding_procedure(PHY_VARS_UE *ue, ...@@ -3733,6 +3755,7 @@ uint16_t dci_decoding_procedure(PHY_VARS_UE *ue,
//#ifdef ALL_AGGREGATION //#ifdef ALL_AGGREGATION
// Now check UE_SPEC format 2_2A search spaces at aggregation 8 // Now check UE_SPEC format 2_2A search spaces at aggregation 8
old_dci_cnt=dci_cnt;
dci_decoding_procedure0(pdcch_vars,0,mode, dci_decoding_procedure0(pdcch_vars,0,mode,
subframe, subframe,
dci_alloc, dci_alloc,
...@@ -3762,6 +3785,7 @@ uint16_t dci_decoding_procedure(PHY_VARS_UE *ue, ...@@ -3762,6 +3785,7 @@ uint16_t dci_decoding_procedure(PHY_VARS_UE *ue,
#ifdef DEBUG_DCI_DECODING #ifdef DEBUG_DCI_DECODING
LOG_I(PHY," MU-MIMO check UE_SPEC format 1E_2A_M10PRB\n"); LOG_I(PHY," MU-MIMO check UE_SPEC format 1E_2A_M10PRB\n");
#endif #endif
old_dci_cnt=dci_cnt;
dci_decoding_procedure0(pdcch_vars,0,mode, dci_decoding_procedure0(pdcch_vars,0,mode,
subframe, subframe,
dci_alloc, dci_alloc,
...@@ -3794,6 +3818,7 @@ uint16_t dci_decoding_procedure(PHY_VARS_UE *ue, ...@@ -3794,6 +3818,7 @@ uint16_t dci_decoding_procedure(PHY_VARS_UE *ue,
return(dci_cnt); return(dci_cnt);
// Now check UE_SPEC format 1E_2A_M10PRB search spaces aggregation 2 // Now check UE_SPEC format 1E_2A_M10PRB search spaces aggregation 2
old_dci_cnt=dci_cnt;
dci_decoding_procedure0(pdcch_vars,0,mode, dci_decoding_procedure0(pdcch_vars,0,mode,
subframe, subframe,
dci_alloc, dci_alloc,
...@@ -3825,6 +3850,7 @@ uint16_t dci_decoding_procedure(PHY_VARS_UE *ue, ...@@ -3825,6 +3850,7 @@ uint16_t dci_decoding_procedure(PHY_VARS_UE *ue,
return(dci_cnt); return(dci_cnt);
// Now check UE_SPEC format 1E_2A_M10PRB search spaces aggregation 4 // Now check UE_SPEC format 1E_2A_M10PRB search spaces aggregation 4
old_dci_cnt=dci_cnt;
dci_decoding_procedure0(pdcch_vars,0,mode, dci_decoding_procedure0(pdcch_vars,0,mode,
subframe, subframe,
dci_alloc, dci_alloc,
...@@ -3858,6 +3884,7 @@ uint16_t dci_decoding_procedure(PHY_VARS_UE *ue, ...@@ -3858,6 +3884,7 @@ uint16_t dci_decoding_procedure(PHY_VARS_UE *ue,
//#ifdef ALL_AGGREGATION //#ifdef ALL_AGGREGATION
// Now check UE_SPEC format 1E_2A_M10PRB search spaces at aggregation 8 // Now check UE_SPEC format 1E_2A_M10PRB search spaces at aggregation 8
old_dci_cnt=dci_cnt;
dci_decoding_procedure0(pdcch_vars,0,mode, dci_decoding_procedure0(pdcch_vars,0,mode,
subframe, subframe,
dci_alloc, dci_alloc,
......
...@@ -4769,10 +4769,12 @@ int check_dci_format1_1a_coherency(DCI_format_t dci_format, ...@@ -4769,10 +4769,12 @@ int check_dci_format1_1a_coherency(DCI_format_t dci_format,
uint8_t harq_pid = pdci_info_extarcted->harq_pid; uint8_t harq_pid = pdci_info_extarcted->harq_pid;
uint32_t rballoc = pdci_info_extarcted->rballoc; uint32_t rballoc = pdci_info_extarcted->rballoc;
uint8_t mcs1 = pdci_info_extarcted->mcs1; uint8_t mcs1 = pdci_info_extarcted->mcs1;
uint8_t rv1 = pdci_info_extarcted->rv1;
uint8_t ndi1 = pdci_info_extarcted->ndi1;
uint8_t TPC = pdci_info_extarcted->TPC; uint8_t TPC = pdci_info_extarcted->TPC;
uint8_t rah = pdci_info_extarcted->rah; uint8_t rah = pdci_info_extarcted->rah;
#ifdef DEBUG_DCI
uint8_t rv1 = pdci_info_extarcted->rv1;
uint8_t ndi1 = pdci_info_extarcted->ndi1;
#endif
uint8_t NPRB = 0; uint8_t NPRB = 0;
long long int RIV_max = 0; long long int RIV_max = 0;
...@@ -4983,13 +4985,18 @@ int check_dci_format2_2a_coherency(DCI_format_t dci_format, ...@@ -4983,13 +4985,18 @@ int check_dci_format2_2a_coherency(DCI_format_t dci_format,
uint8_t rv2 = pdci_info_extarcted->rv2; uint8_t rv2 = pdci_info_extarcted->rv2;
uint8_t harq_pid = pdci_info_extarcted->harq_pid; uint8_t harq_pid = pdci_info_extarcted->harq_pid;
uint32_t rballoc = pdci_info_extarcted->rballoc; uint32_t rballoc = pdci_info_extarcted->rballoc;
#ifdef DEBUG_DCI
uint8_t ndi1 = pdci_info_extarcted->ndi1; uint8_t ndi1 = pdci_info_extarcted->ndi1;
uint8_t ndi2 = pdci_info_extarcted->ndi2; uint8_t ndi2 = pdci_info_extarcted->ndi2;
#endif
uint8_t NPRB = 0; uint8_t NPRB = 0;
long long RIV_max = 0; long long RIV_max = 0;
#ifdef DEBUG_DCI
LOG_I(PHY, "extarcted dci - dci_format %d \n", dci_format); LOG_I(PHY, "extarcted dci - dci_format %d \n", dci_format);
LOG_I(PHY, "extarcted dci - rnti %d \n", rnti);
LOG_I(PHY, "extarcted dci - rah %d \n", rah); LOG_I(PHY, "extarcted dci - rah %d \n", rah);
LOG_I(PHY, "extarcted dci - mcs1 %d \n", mcs1); LOG_I(PHY, "extarcted dci - mcs1 %d \n", mcs1);
LOG_I(PHY, "extarcted dci - mcs2 %d \n", mcs2); LOG_I(PHY, "extarcted dci - mcs2 %d \n", mcs2);
...@@ -5001,6 +5008,7 @@ int check_dci_format2_2a_coherency(DCI_format_t dci_format, ...@@ -5001,6 +5008,7 @@ int check_dci_format2_2a_coherency(DCI_format_t dci_format,
LOG_I(PHY, "extarcted dci - harq pif %d \n", harq_pid); LOG_I(PHY, "extarcted dci - harq pif %d \n", harq_pid);
LOG_I(PHY, "extarcted dci - round0 %d \n", pdlsch0_harq->round); LOG_I(PHY, "extarcted dci - round0 %d \n", pdlsch0_harq->round);
LOG_I(PHY, "extarcted dci - round1 %d \n", pdlsch1_harq->round); LOG_I(PHY, "extarcted dci - round1 %d \n", pdlsch1_harq->round);
#endif
// I- check dci content minimum coherency // I- check dci content minimum coherency
if(harq_pid >8) if(harq_pid >8)
...@@ -5043,6 +5051,21 @@ int check_dci_format2_2a_coherency(DCI_format_t dci_format, ...@@ -5043,6 +5051,21 @@ int check_dci_format2_2a_coherency(DCI_format_t dci_format,
}*/ }*/
if((pdlsch0_harq->round == 0) && (rv1 > 0))
{
// DCI false detection
LOG_I(PHY,"bad rv1\n");
return(0);
}
if((pdlsch1_harq->round == 0) && (rv2 > 0))
{
// DCI false detection
LOG_I(PHY,"bad rv2\n");
return(0);
}
switch (N_RB_DL) { switch (N_RB_DL) {
case 6: case 6:
if (rah == 0) if (rah == 0)
...@@ -5606,6 +5629,7 @@ void compute_precoding_info_format2A(uint8_t tpmi, ...@@ -5606,6 +5629,7 @@ void compute_precoding_info_format2A(uint8_t tpmi,
void prepare_dl_decoding_format2_2A(DCI_format_t dci_format, void prepare_dl_decoding_format2_2A(DCI_format_t dci_format,
DCI_INFO_EXTRACTED_t *pdci_info_extarcted, DCI_INFO_EXTRACTED_t *pdci_info_extarcted,
LTE_DL_FRAME_PARMS *frame_parms, LTE_DL_FRAME_PARMS *frame_parms,
uint16_t rnti,
uint8_t subframe, uint8_t subframe,
LTE_DL_UE_HARQ_t *dlsch0_harq, LTE_DL_UE_HARQ_t *dlsch0_harq,
LTE_DL_UE_HARQ_t *dlsch1_harq, LTE_DL_UE_HARQ_t *dlsch1_harq,
...@@ -5663,15 +5687,17 @@ void prepare_dl_decoding_format2_2A(DCI_format_t dci_format, ...@@ -5663,15 +5687,17 @@ void prepare_dl_decoding_format2_2A(DCI_format_t dci_format,
dlsch1_harq->dl_power_off = 1; dlsch1_harq->dl_power_off = 1;
pdlsch0->current_harq_pid = harq_pid; pdlsch0->current_harq_pid = harq_pid;
pdlsch0->harq_ack[subframe].harq_id = harq_pid; pdlsch0->harq_ack[subframe].harq_id = harq_pid;
pdlsch1->current_harq_pid = harq_pid; pdlsch1->current_harq_pid = harq_pid;
pdlsch1->harq_ack[subframe].harq_id = harq_pid; pdlsch1->harq_ack[subframe].harq_id = harq_pid;
// assume two CW are active // assume two CW are active
dlsch0_harq->status = ACTIVE; dlsch0_harq->status = ACTIVE;
dlsch1_harq->status = ACTIVE; dlsch1_harq->status = ACTIVE;
pdlsch0->active = 1; pdlsch0->active = 1;
pdlsch1->active = 1; pdlsch1->active = 1;
pdlsch0->rnti = rnti;
pdlsch1->rnti = rnti;
if (TB0_active && TB1_active && tbswap==1) { if (TB0_active && TB1_active && tbswap==1) {
...@@ -5690,12 +5716,8 @@ void prepare_dl_decoding_format2_2A(DCI_format_t dci_format, ...@@ -5690,12 +5716,8 @@ void prepare_dl_decoding_format2_2A(DCI_format_t dci_format,
if (TB1_active==0) { if (TB1_active==0) {
dlsch1_harq->status = SCH_IDLE; dlsch1_harq->status = SCH_IDLE;
pdlsch1->active = 0; pdlsch1->active = 0;
#ifdef DEBUG_HARQ
printf("[DCI UE]: TB1 is deactivated, retransmit TB0 transmit in TM6\n");
#endif
} }
#ifdef DEBUG_HARQ #ifdef DEBUG_HARQ
printf("[DCI UE]: dlsch0_harq status %d , dlsch1_harq status %d\n", dlsch0_harq->status, dlsch1_harq->status); printf("[DCI UE]: dlsch0_harq status %d , dlsch1_harq status %d\n", dlsch0_harq->status, dlsch1_harq->status);
#endif #endif
...@@ -5727,6 +5749,9 @@ void prepare_dl_decoding_format2_2A(DCI_format_t dci_format, ...@@ -5727,6 +5749,9 @@ void prepare_dl_decoding_format2_2A(DCI_format_t dci_format,
dlsch1_harq->rb_alloc_odd[3] = dlsch0_harq->rb_alloc_odd[3]; dlsch1_harq->rb_alloc_odd[3] = dlsch0_harq->rb_alloc_odd[3];
dlsch1_harq->nb_rb = dlsch0_harq->nb_rb; dlsch1_harq->nb_rb = dlsch0_harq->nb_rb;
//dlsch0_harq->Nl = 1;
//dlsch1_harq->Nl = 1;
} }
} else if ((TB0_active == 0) && (TB1_active == 1)){ } else if ((TB0_active == 0) && (TB1_active == 1)){
...@@ -5774,24 +5799,28 @@ void prepare_dl_decoding_format2_2A(DCI_format_t dci_format, ...@@ -5774,24 +5799,28 @@ void prepare_dl_decoding_format2_2A(DCI_format_t dci_format,
if ((ndi1!=dlsch0_harq->DCINdi) || (dlsch0_harq->first_tx==1)) { if ((ndi1!=dlsch0_harq->DCINdi) || (dlsch0_harq->first_tx==1)) {
dlsch0_harq->round = 0; dlsch0_harq->round = 0;
//LOG_I(PHY,"[UE] DLSCH: New Data Indicator CW0 subframe %d (pid %d, round %d)\n",
// subframe,harq_pid,dlsch0_harq->round);
if ( dlsch0_harq->first_tx==1) { if ( dlsch0_harq->first_tx==1) {
LOG_D(PHY,"Format 2 DCI First TX0: Clearing flag\n"); LOG_D(PHY,"Format 2 DCI First TX0: Clearing flag\n");
dlsch0_harq->first_tx = 0; dlsch0_harq->first_tx = 0;
} }
}else{ }else{
if(dlsch0_harq->round == 0) { if(dlsch0_harq->round == 0) {
#if 0
// skip pdsch decoding and report ack // skip pdsch decoding and report ack
dlsch0_harq->status = SCH_IDLE; dlsch0_harq->status = SCH_IDLE;
pdlsch0->active = 0; pdlsch0->active = 0;
pdlsch0->harq_ack[subframe].ack = 1; pdlsch0->harq_ack[subframe].ack = 1;
pdlsch0->harq_ack[subframe].harq_id = harq_pid; pdlsch0->harq_ack[subframe].harq_id = harq_pid;
pdlsch0->harq_ack[subframe].send_harq_status = 1; pdlsch0->harq_ack[subframe].send_harq_status = 1;
#endif
} }
} }
dlsch0_harq->TBS = TBStable[get_I_TBS(dlsch0_harq->mcs)][dlsch0_harq->nb_rb-1]; dlsch0_harq->TBS = TBStable[get_I_TBS(dlsch0_harq->mcs)][dlsch0_harq->nb_rb-1];
if(dlsch0_harq->Nl == 2) //if(dlsch0_harq->Nl == 2)
dlsch0_harq->TBS = TBStable[get_I_TBS(dlsch0_harq->mcs)][(dlsch0_harq->nb_rb<<1)-1]; //dlsch0_harq->TBS = TBStable[get_I_TBS(dlsch0_harq->mcs)][(dlsch0_harq->nb_rb<<1)-1];
if (mcs1 <= 28) if (mcs1 <= 28)
dlsch0_harq->Qm = get_Qm(mcs1); dlsch0_harq->Qm = get_Qm(mcs1);
else if (mcs1<=31) else if (mcs1<=31)
...@@ -5801,11 +5830,14 @@ void prepare_dl_decoding_format2_2A(DCI_format_t dci_format, ...@@ -5801,11 +5830,14 @@ void prepare_dl_decoding_format2_2A(DCI_format_t dci_format,
if (TB1_active) { if (TB1_active) {
if ((ndi2!=dlsch1_harq->DCINdi) || (dlsch1_harq->first_tx==1)) { if ((ndi2!=dlsch1_harq->DCINdi) || (dlsch1_harq->first_tx==1)) {
dlsch1_harq->round = 0; dlsch1_harq->round = 0;
//LOG_I(PHY,"[UE] DLSCH: New Data Indicator CW1 subframe %d (pid %d, round %d)\n",
// subframe,harq_pid,dlsch0_harq->round);
if (dlsch1_harq->first_tx==1) { if (dlsch1_harq->first_tx==1) {
LOG_D(PHY,"Format 2 DCI First TX1: Clearing flag\n"); LOG_D(PHY,"Format 2 DCI First TX1: Clearing flag\n");
dlsch1_harq->first_tx = 0; dlsch1_harq->first_tx = 0;
} }
}else{ }else{
#if 0
if(dlsch1_harq->round == 0) { if(dlsch1_harq->round == 0) {
// skip pdsch decoding and report ack // skip pdsch decoding and report ack
dlsch1_harq->status = SCH_IDLE; dlsch1_harq->status = SCH_IDLE;
...@@ -5814,11 +5846,12 @@ void prepare_dl_decoding_format2_2A(DCI_format_t dci_format, ...@@ -5814,11 +5846,12 @@ void prepare_dl_decoding_format2_2A(DCI_format_t dci_format,
pdlsch1->harq_ack[subframe].harq_id = harq_pid; pdlsch1->harq_ack[subframe].harq_id = harq_pid;
pdlsch1->harq_ack[subframe].send_harq_status = 1; pdlsch1->harq_ack[subframe].send_harq_status = 1;
} }
#endif
} }
dlsch1_harq->TBS = TBStable[get_I_TBS(dlsch1_harq->mcs)][dlsch1_harq->nb_rb-1]; dlsch1_harq->TBS = TBStable[get_I_TBS(dlsch1_harq->mcs)][dlsch1_harq->nb_rb-1];
if(dlsch0_harq->Nl == 2) //if(dlsch0_harq->Nl == 2)
dlsch0_harq->TBS = TBStable[get_I_TBS(dlsch0_harq->mcs)][(dlsch0_harq->nb_rb<<1)-1]; //dlsch0_harq->TBS = TBStable[get_I_TBS(dlsch0_harq->mcs)][(dlsch0_harq->nb_rb<<1)-1];
if (mcs2 <= 28) if (mcs2 <= 28)
dlsch1_harq->Qm = get_Qm(mcs2); dlsch1_harq->Qm = get_Qm(mcs2);
...@@ -6047,7 +6080,7 @@ int generate_ue_dlsch_params_from_dci(int frame, ...@@ -6047,7 +6080,7 @@ int generate_ue_dlsch_params_from_dci(int frame,
case format2: case format2:
{ {
// extract dci infomation // extract dci infomation
LOG_I(PHY,"[DCI-format2] extract dci infomation \n"); //LOG_I(PHY,"[DCI-format2] AbsSubframe %d.%d extract dci infomation \n", frame, subframe);
extract_dci2_info(frame_parms->N_RB_DL, extract_dci2_info(frame_parms->N_RB_DL,
frame_type, frame_type,
frame_parms->nb_antenna_ports_eNB, frame_parms->nb_antenna_ports_eNB,
...@@ -6069,7 +6102,7 @@ int generate_ue_dlsch_params_from_dci(int frame, ...@@ -6069,7 +6102,7 @@ int generate_ue_dlsch_params_from_dci(int frame,
dlsch0_harq = dlsch0->harq_processes[harq_pid]; dlsch0_harq = dlsch0->harq_processes[harq_pid];
dlsch1_harq = dlsch1->harq_processes[harq_pid]; dlsch1_harq = dlsch1->harq_processes[harq_pid];
LOG_I(PHY,"[DCI-format2] check dci content \n"); //LOG_I(PHY,"[DCI-format2] check dci content \n");
status = check_dci_format2_2a_coherency(format2, status = check_dci_format2_2a_coherency(format2,
frame_parms->N_RB_DL, frame_parms->N_RB_DL,
&dci_info_extarcted, &dci_info_extarcted,
...@@ -6083,10 +6116,11 @@ int generate_ue_dlsch_params_from_dci(int frame, ...@@ -6083,10 +6116,11 @@ int generate_ue_dlsch_params_from_dci(int frame,
return(-1); return(-1);
// dci is correct ==> update internal structure and prepare dl decoding // dci is correct ==> update internal structure and prepare dl decoding
LOG_I(PHY,"[DCI-format2] update internal structure and prepare dl decoding \n"); //LOG_I(PHY,"[DCI-format2] update internal structure and prepare dl decoding \n");
prepare_dl_decoding_format2_2A(format2, prepare_dl_decoding_format2_2A(format2,
&dci_info_extarcted, &dci_info_extarcted,
frame_parms, frame_parms,
rnti,
subframe, subframe,
dlsch0_harq, dlsch0_harq,
dlsch1_harq, dlsch1_harq,
...@@ -6099,7 +6133,7 @@ int generate_ue_dlsch_params_from_dci(int frame, ...@@ -6099,7 +6133,7 @@ int generate_ue_dlsch_params_from_dci(int frame,
case format2A: case format2A:
{ {
// extract dci infomation // extract dci infomation
LOG_I(PHY,"[DCI-format2A] extract dci infomation \n"); //LOG_I(PHY,"[DCI-format2] AbsSubframe %d.%d extract dci infomation \n", frame%1024, subframe);
extract_dci2A_info(frame_parms->N_RB_DL, extract_dci2A_info(frame_parms->N_RB_DL,
frame_type, frame_type,
frame_parms->nb_antenna_ports_eNB, frame_parms->nb_antenna_ports_eNB,
...@@ -6107,10 +6141,10 @@ int generate_ue_dlsch_params_from_dci(int frame, ...@@ -6107,10 +6141,10 @@ int generate_ue_dlsch_params_from_dci(int frame,
&dci_info_extarcted); &dci_info_extarcted);
// check dci content // check dci content
LOG_I(PHY,"[DCI-format2A] check dci content \n"); //LOG_I(PHY,"[DCI-format2A] check dci content \n");
LOG_I(PHY,"[DCI-format2A] tb_swap %d harq_pid %d\n", dci_info_extarcted.tb_swap, dci_info_extarcted.harq_pid); //LOG_I(PHY,"[DCI-format2A] tb_swap %d harq_pid %d\n", dci_info_extarcted.tb_swap, dci_info_extarcted.harq_pid);
dlsch[0]->active = 0; //dlsch[0]->active = 0;
dlsch[1]->active = 0;