Commit fb3356a6 authored by Matthieu Kanj's avatar Matthieu Kanj

UL indication

parent ebab3325
......@@ -76,4 +76,91 @@ void UL_indication_NB_IoT(UL_IND_NB_IoT_t *UL_INFO)
//Schedule subframe should be next four subframe, means that UL_INFO->frame*10+UL_INFO->subframe + 4
eNB_dlsch_ulsch_scheduler_NB_IoT(mac_inst,abs_subframe);
}
\ No newline at end of file
}
///////////////////////////////////////////////////////////////////////////////
////////////////////////////// backup ////////////////////////////////////////
/////////////////////////////////////////////////////////////////////////////
// Sched_INFO as a input for the scheduler
/// void UL_indication_NB_IoT(UL_IND_NB_IoT_t *UL_INFO)
/// {
// int i=0;
/// uint32_t abs_subframe;
//UE_TEMPLATE_NB_IoT *UE_info;
/* Disable uplink RX function for now
//If there is a preamble, do the initiate RA procedure
if(UL_INFO->nrach_ind.number_of_initial_scs_detected>0)
{
for(i=0;i<UL_INFO->nrach_ind.number_of_initial_scs_detected;i++)
{
// initiate_ra here, some useful inforamtion :
//(UL_INFO->nrach_ind.nrach_pdu_list+i)->nrach_indication_rel13.initial_sc
//(UL_INFO->nrach_ind.nrach_pdu_list+i)->nrach_indication_rel13.timing_advance
init_RA_NB_IoT(mac_inst,
(UL_INFO->nrach_ind.nrach_pdu_list+i)->nrach_indication_rel13.initial_sc,
(UL_INFO->nrach_ind.nrach_pdu_list+i)->nrach_indication_rel13.nrach_ce_level,
UL_INFO->frame,
//timing_offset = Timing_advance * 16
(UL_INFO->nrach_ind.nrach_pdu_list+i)->nrach_indication_rel13.timing_advance*16
);
}
}
// crc indication if there is error for this round UL transmission
if(UL_INFO->crc_ind.number_of_crcs>0)
{
for(i=0;i<UL_INFO->crc_ind.number_of_crcs;i++)
{
if((UL_INFO->crc_ind.crc_pdu_list+i)->crc_indication_rel8.crc_flag == 0)
{
//unsuccessfully received this UE PDU
//UE_info = get_ue_from_rnti(mac_inst,((UL_INFO->crc_ind.crc_pdu_list)+i)->rx_ue_information.rnti);
//UE_info->HARQ_round++;
}
}
}
//If there is a Uplink SDU which needs to send to MAC
if(UL_INFO->RX_NPUSCH.number_of_pdus>0)
{
for(i=0;i<UL_INFO->RX_NPUSCH.number_of_pdus;i++)
{
//For MSG3, Normal Uplink Data, NAK
rx_sdu_NB_IoT(UL_INFO->module_id,
UL_INFO->CC_id,
UL_INFO->frame,
UL_INFO->subframe,
(UL_INFO->RX_NPUSCH.rx_pdu_list+i)->rx_ue_information.rnti,
(UL_INFO->RX_NPUSCH.rx_pdu_list+i)->data,
(UL_INFO->RX_NPUSCH.rx_pdu_list+i)->rx_indication_rel8.length
);
}
}
*/
/// abs_subframe = UL_INFO->frame*10+UL_INFO->subframe;
//LOG_I(MAC,"Enter scheduler in subframe %d\n",abs_subframe);
//scheduler here
//Schedule subframe should be next four subframe, means that UL_INFO->frame*10+UL_INFO->subframe + 4
/// eNB_dlsch_ulsch_scheduler_NB_IoT(mac_inst,abs_subframe);
/// }
///////////////////////////////////////////////////////////////////////////////////////////
//////////////////////////////////////////////////////////////////////////////////////////
\ No newline at end of file
......@@ -656,6 +656,16 @@ static inline int rxtx(PHY_VARS_eNB *eNB,eNB_rxtx_proc_t *proc, char *thread_nam
//fill_rx_indication(eNB,i,frame,subframe);
//////////////////////////////////// for IF Module/scheduler testing
pthread_mutex_lock(&eNB->UL_INFO_mutex);
eNB->UL_INFO.frame = proc->frame_rx;
eNB->UL_INFO.subframe = proc->subframe_rx;
eNB->UL_INFO.module_id = eNB->Mod_id;
eNB->UL_INFO.CC_id = eNB->CC_id;
eNB->if_inst->UL_indication(&eNB->UL_INFO);
pthread_mutex_unlock(&eNB->UL_INFO_mutex);
//LOG_I(PHY,"After UL_indication\n");
// *****************************************
......
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