Commit 965fe1f7 authored by Matthieu Kanj's avatar Matthieu Kanj

UL_indication bug fix

parent 7d361758
...@@ -558,9 +558,9 @@ typedef struct { ...@@ -558,9 +558,9 @@ typedef struct {
/// Pointer to the payload /// Pointer to the payload
uint8_t *b; uint8_t *b;
/// Pointers to transport block segments /// Pointers to transport block segments
uint8_t *c[MAX_NUM_ULSCH_SEGMENTS_NB_IoT]; uint8_t *c[MAX_NUM_ULSCH_SEGMENTS_NB_IoT];
/// RTC values for each segment (for definition see 36-212 V8.6 2009-03, p.15) /// RTC values for each segment (for definition see 36-212 V8.6 2009-03, p.15)
uint32_t RTC[MAX_NUM_ULSCH_SEGMENTS_NB_IoT]; uint32_t RTC[MAX_NUM_ULSCH_SEGMENTS_NB_IoT];
/// Current Number of Symbols /// Current Number of Symbols
uint8_t Nsymb_pusch; uint8_t Nsymb_pusch;
/// Index of current HARQ round for this ULSCH /// Index of current HARQ round for this ULSCH
......
...@@ -53,7 +53,7 @@ uint32_t rx_nprach_NB_IoT(PHY_VARS_eNB *eNB,int frame, uint8_t subframe, uint16_ ...@@ -53,7 +53,7 @@ uint32_t rx_nprach_NB_IoT(PHY_VARS_eNB *eNB,int frame, uint8_t subframe, uint16_
void npusch_procedures(PHY_VARS_eNB *eNB,eNB_rxtx_proc_t *proc); void npusch_procedures(PHY_VARS_eNB *eNB,eNB_rxtx_proc_t *proc);
////////////////// NB-IoT testing //////////////////// ////////////////// NB-IoT testing ////////////////////
void fill_rx_indication_NB_IoT(PHY_VARS_eNB *eNB,eNB_rxtx_proc_t *proc,uint8_t data_or_control); void fill_rx_indication_NB_IoT(PHY_VARS_eNB *eNB,eNB_rxtx_proc_t *proc,uint8_t data_or_control, uint8_t msg3_flag);
#endif #endif
......
...@@ -3192,7 +3192,7 @@ void phy_procedures_eNB_common_RX(PHY_VARS_eNB *eNB,eNB_rxtx_proc_t *proc){ ...@@ -3192,7 +3192,7 @@ void phy_procedures_eNB_common_RX(PHY_VARS_eNB *eNB,eNB_rxtx_proc_t *proc){
///VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME( VCD_SIGNAL_DUMPER_FUNCTIONS_PHY_PROCEDURES_ENB_RX_COMMON+offset, 0 ); ///VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME( VCD_SIGNAL_DUMPER_FUNCTIONS_PHY_PROCEDURES_ENB_RX_COMMON+offset, 0 );
} }
void fill_rx_indication_NB_IoT(PHY_VARS_eNB *eNB,eNB_rxtx_proc_t *proc,uint8_t data_or_control) void fill_rx_indication_NB_IoT(PHY_VARS_eNB *eNB,eNB_rxtx_proc_t *proc,uint8_t data_or_control, uint8_t msg3_flag)
{ {
nfapi_rx_indication_pdu_t *pdu; nfapi_rx_indication_pdu_t *pdu;
...@@ -3207,8 +3207,21 @@ void fill_rx_indication_NB_IoT(PHY_VARS_eNB *eNB,eNB_rxtx_proc_t *proc,uint8_t d ...@@ -3207,8 +3207,21 @@ void fill_rx_indication_NB_IoT(PHY_VARS_eNB *eNB,eNB_rxtx_proc_t *proc,uint8_t d
// pdu->rx_ue_information.tl.tag = NFAPI_RX_UE_INFORMATION_TAG; // pdu->rx_ue_information.tl.tag = NFAPI_RX_UE_INFORMATION_TAG;
//pdu->rx_indication_rel8.tl.tag = NFAPI_RX_INDICATION_REL8_TAG; //pdu->rx_indication_rel8.tl.tag = NFAPI_RX_INDICATION_REL8_TAG;
pdu->rx_ue_information.rnti = eNB->ulsch_NB_IoT[0]->rnti; pdu->rx_ue_information.rnti = eNB->ulsch_NB_IoT[0]->rnti;
pdu->rx_indication_rel8.length = eNB->ulsch_NB_IoT[0]->harq_process->TBS>>3;
pdu->data = eNB->ulsch_NB_IoT[0]->harq_process->b;
if(msg3_flag == 1)
{
pdu->rx_indication_rel8.length = 6; //eNB->ulsch_NB_IoT[0]->harq_process->TBS>>3;
int m =0;
for(m=0; m<6;m++)
{
pdu->data[m] = eNB->ulsch_NB_IoT[0]->harq_process->b[2+m];
}
} else {
pdu->data = eNB->ulsch_NB_IoT[0]->harq_process->b;
}
//pdu->data = eNB->ulsch_NB_IoT[UE_id]->harq_processes[harq_pid]->b; //pdu->data = eNB->ulsch_NB_IoT[UE_id]->harq_processes[harq_pid]->b;
//eNB->UL_INFO.rx_ind.rx_indication_body.number_of_pdus++; //eNB->UL_INFO.rx_ind.rx_indication_body.number_of_pdus++;
//eNB->UL_INFO.rx_ind.sfn_sf = frame<<4 | subframe; //eNB->UL_INFO.rx_ind.sfn_sf = frame<<4 | subframe;
......
...@@ -1561,9 +1561,9 @@ void fill_crc_indication_NB_IoT(PHY_VARS_eNB *eNB,int UE_id,int frame,int subfra ...@@ -1561,9 +1561,9 @@ void fill_crc_indication_NB_IoT(PHY_VARS_eNB *eNB,int UE_id,int frame,int subfra
//pdu->instance_length = 0; // don't know what to do with this //pdu->instance_length = 0; // don't know what to do with this
// pdu->rx_ue_information.handle = handle; // pdu->rx_ue_information.handle = handle;
pdu->rx_ue_information.tl.tag = NFAPI_RX_UE_INFORMATION_TAG; ///////////////////////pdu->rx_ue_information.tl.tag = NFAPI_RX_UE_INFORMATION_TAG;
pdu->rx_ue_information.rnti = eNB->ulsch[UE_id]->rnti; pdu->rx_ue_information.rnti = eNB->ulsch_NB_IoT[0]->rnti; /// OK
pdu->crc_indication_rel8.tl.tag = NFAPI_CRC_INDICATION_REL8_TAG; //////////////////////////pdu->crc_indication_rel8.tl.tag = NFAPI_CRC_INDICATION_REL8_TAG;
pdu->crc_indication_rel8.crc_flag = crc_flag; pdu->crc_indication_rel8.crc_flag = crc_flag;
eNB->UL_INFO.crc_ind.number_of_crcs++; eNB->UL_INFO.crc_ind.number_of_crcs++;
...@@ -1595,42 +1595,13 @@ void npusch_procedures(PHY_VARS_eNB *eNB,eNB_rxtx_proc_t *proc) ...@@ -1595,42 +1595,13 @@ void npusch_procedures(PHY_VARS_eNB *eNB,eNB_rxtx_proc_t *proc)
//ulsch_harq = ulsch_NB_IoT->harq_process; //ulsch_harq = ulsch_NB_IoT->harq_process;
// if eNB is ready to receive UL data // if eNB is ready to receive UL data
// define a flag to trigger on or off the decoding process // define a flag to trigger on or off the decoding process
//if ((ulsch) && (ulsch->rnti>0) && (ulsch_harq->status == ACTIVE) && (ulsch_harq->frame == frame) && (ulsch_harq->subframe == subframe) && (ulsch_harq->handled == 0)) rx_ulsch_Gen_NB_IoT(eNB,
//uint16_t N_slots = get_UL_slots_per_RU_NB_IoT(nulsch_harq->subcarrier_spacing, nulsch_harq->subcarrier_indication, nulsch->npusch_format)*get_UL_N_ru_NB_IoT(nulsch_harq->mcs,nulsch_harq->resource_assignment,nulsch->Msg3_flag); proc,
0, // this is the effective sector id
// if ((nulsch->Msg3_active == 1) && (nulsch->Msg3_flag == 1)) // && (ulsch_harq->frame == framerx) && (ulsch_harq->subframe == subframerx)) 0,
// { RB_IoT_ID, // 22 , to be included in // to be replaced by NB_IoT_start ??
rx_subframe, // first received subframe
/* if(nulsch->flag_scramble == 1) rx_frame); // first received frame
{
nulsch->Msg3_frame = framerx;
nulsch->Msg3_subframe = subframerx;
nulsch->flag_scramble = 0;
}*/
rx_ulsch_Gen_NB_IoT(eNB,
proc,
0, // this is the effective sector id
0,
RB_IoT_ID, // 22 , to be included in // to be replaced by NB_IoT_start ??
rx_subframe, // first received subframe
rx_frame); // first received frame
///proc->counter_msg3, // this represents the number of Subframe after encoding the msg3 // proc->counter_msg3
// } else if((nulsch->Msg3_active == 1) && (nulsch->Msg3_flag == 0)){ //// case of NPUSCH other than Msg3
/*
rx_ulsch_Gen_NB_IoT(eNB,
proc,
0, // this is the effective sector id
0,
22, // 22 , to be included in // to be replaced by NB_IoT_start ??
nulsch->Msg3_subframe, // first received subframe
nulsch->Msg3_frame, // first received frame
N_slots/2, ///proc->counter_msg3, // this represents the number of Subframe after encoding the msg3 // proc->counter_msg3
subframerx); */
// }
} // for UE loop } // for UE loop
} }
\ No newline at end of file
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