Commit da77ebb8 authored by Nick Ho's avatar Nick Ho

Fix Hypersfn issue when inputing the scheduler

parent c3d2aa1b
...@@ -338,7 +338,7 @@ void common_signal_procedures_NB_IoT(PHY_VARS_eNB *eNB,eNB_rxtx_proc_t *proc) ...@@ -338,7 +338,7 @@ void common_signal_procedures_NB_IoT(PHY_VARS_eNB *eNB,eNB_rxtx_proc_t *proc)
RB_IoT_ID, RB_IoT_ID,
With_NSSS); With_NSSS);
if(frame==1023 && subframe==9) if(proc->frame_rx==1023 && proc->subframe_rx==9)
{ {
//printf("%d",hyper_frame); //printf("%d",hyper_frame);
if(proc->HFN==1023) if(proc->HFN==1023)
...@@ -346,6 +346,7 @@ void common_signal_procedures_NB_IoT(PHY_VARS_eNB *eNB,eNB_rxtx_proc_t *proc) ...@@ -346,6 +346,7 @@ void common_signal_procedures_NB_IoT(PHY_VARS_eNB *eNB,eNB_rxtx_proc_t *proc)
proc->HFN=0; proc->HFN=0;
}else{ }else{
proc->HFN++; proc->HFN++;
//printf("Update HFN:%d when frame:%d subframe:%d\n",proc->HFN,proc->frame_rx,proc->subframe_rx);
} }
} }
......
...@@ -141,7 +141,7 @@ int output_handler(eNB_MAC_INST_NB_IoT *mac_inst, module_id_t module_id, int CC_ ...@@ -141,7 +141,7 @@ int output_handler(eNB_MAC_INST_NB_IoT *mac_inst, module_id_t module_id, int CC_
//LOG_D(MAC,"A NB-IoT SIB1 pdu : %d \n",SIB1_pdu); //LOG_D(MAC,"A NB-IoT SIB1 pdu : %d \n",SIB1_pdu);
SCHED_info->TX_req->tx_request_body.tx_pdu_list[dl_config_pdu->ndlsch_pdu.ndlsch_pdu_rel13.pdu_index].segments[0].segment_data = SIB1_pdu; SCHED_info->TX_req->tx_request_body.tx_pdu_list[dl_config_pdu->ndlsch_pdu.ndlsch_pdu_rel13.pdu_index].segments[0].segment_data = SIB1_pdu;
LOG_I(MAC,"NB-IoT fill SIB1\n"); LOG_D(MAC,"NB-IoT fill SIB1\n");
//LOG_I(MAC,"NB-IoT fill SIB1\n"); //LOG_I(MAC,"NB-IoT fill SIB1\n");
//start symbol, Resource assignment, Repetition number, Number of subframe Resource assignment lost for now //start symbol, Resource assignment, Repetition number, Number of subframe Resource assignment lost for now
//dl_scheduled(mac_inst->current_subframe, _NPDSCH, SI_RNTI, "SIB1"); //dl_scheduled(mac_inst->current_subframe, _NPDSCH, SI_RNTI, "SIB1");
...@@ -229,7 +229,7 @@ int output_handler(eNB_MAC_INST_NB_IoT *mac_inst, module_id_t module_id, int CC_ ...@@ -229,7 +229,7 @@ int output_handler(eNB_MAC_INST_NB_IoT *mac_inst, module_id_t module_id, int CC_
case NPDSCH: case NPDSCH:
LOG_D(MAC,"NB-IoT fill DL Data\n"); LOG_D(MAC,"NB-IoT fill DL Data\n");
if(schedule_result_list_DL->rnti==SI_RNTI) if(schedule_result_list_DL->rnti==SI_RNTI)
LOG_I(MAC,"NB-IoT fill SIB23\n"); LOG_D(MAC,"NB-IoT fill SIB23\n");
//LOG_I(MAC,"NB-IoT fill DL Data\n"); //LOG_I(MAC,"NB-IoT fill DL Data\n");
//SCHED_info->DL_req = (nfapi_dl_config_request_t*) malloc (sizeof(nfapi_dl_config_request_t)); //SCHED_info->DL_req = (nfapi_dl_config_request_t*) malloc (sizeof(nfapi_dl_config_request_t));
//SCHED_info->DL_req->dl_config_request_body.number_pdu = 0; //SCHED_info->DL_req->dl_config_request_body.number_pdu = 0;
......
...@@ -1060,7 +1060,7 @@ void extend_available_resource_DL(eNB_MAC_INST_NB_IoT *mac_inst, int max_subfram ...@@ -1060,7 +1060,7 @@ void extend_available_resource_DL(eNB_MAC_INST_NB_IoT *mac_inst, int max_subfram
available_resource_DL_last = new_node; available_resource_DL_last = new_node;
} }
LOG_I(MAC,"sf_dl:%d max:%d siw:%d\n",mac_inst->schedule_subframe_DL,max_subframe,mac_inst->rrc_config.si_window_length); LOG_D(MAC,"sf_dl:%d max:%d siw:%d\n",mac_inst->schedule_subframe_DL,max_subframe,mac_inst->rrc_config.si_window_length);
// do schedule sibs after extend. // do schedule sibs after extend.
for(i=mac_inst->schedule_subframe_DL;i<max_subframe;i+=mac_inst->rrc_config.si_window_length){ for(i=mac_inst->schedule_subframe_DL;i<max_subframe;i+=mac_inst->rrc_config.si_window_length){
......
...@@ -69,9 +69,14 @@ void UL_indication_NB_IoT(UL_IND_NB_IoT_t *UL_INFO) ...@@ -69,9 +69,14 @@ void UL_indication_NB_IoT(UL_IND_NB_IoT_t *UL_INFO)
} }
*/ */
//LOG_I(MAC,"IF L2 frame: %d ,subframe: %d \n",UL_INFO->frame,UL_INFO->subframe);
//abs_subframe = UL_INFO->frame*10240+UL_INFO->frame*10+UL_INFO->subframe +4; if(UL_INFO->hypersfn==1 && UL_INFO->frame==0)
abs_subframe = UL_INFO->frame*10+UL_INFO->subframe +4; {
LOG_I(MAC,"IF L2 hypersfn:%d frame: %d ,subframe: %d \n",UL_INFO->hypersfn,UL_INFO->frame,UL_INFO->subframe);
}
abs_subframe = UL_INFO->hypersfn*10240+UL_INFO->frame*10+UL_INFO->subframe +4;
//abs_subframe = UL_INFO->frame*10+UL_INFO->subframe +4;
//LOG_I(MAC,"Enter scheduler in subframe %d\n",abs_subframe); //LOG_I(MAC,"Enter scheduler in subframe %d\n",abs_subframe);
//scheduler here //scheduler here
......
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