Commit cdb7b298 authored by Nick Ho's avatar Nick Ho

Add table for flexible scheduling for sib1

parent d580bcea
...@@ -187,7 +187,7 @@ void handle_nfapi_dlsch_pdu_NB_IoT(PHY_VARS_eNB *eNB, ...@@ -187,7 +187,7 @@ void handle_nfapi_dlsch_pdu_NB_IoT(PHY_VARS_eNB *eNB,
//Independently if we have the PDU or not (first transmission or repetition) the process is activated for triggering the ndlsch_procedure //Independently if we have the PDU or not (first transmission or repetition) the process is activated for triggering the ndlsch_procedure
//LOG_I(PHY,"ACTIVE_NB_IoT\n"); //LOG_I(PHY,"ACTIVE_NB_IoT\n");
ndlsch_harq23->status = ACTIVE_NB_IoT; ndlsch_harq23->status = ACTIVE_NB_IoT;
LOG_I(PHY,"A NB-handle_nfapi_dlsch_pdu_NB_IoT SIB23\n"); LOG_D(PHY,"A NB-handle_nfapi_dlsch_pdu_NB_IoT SIB23\n");
} }
//ue specific data or RAR (we already have received the DCI for this) //ue specific data or RAR (we already have received the DCI for this)
......
...@@ -364,6 +364,8 @@ void rrc_mac_config_req_NB_IoT( ...@@ -364,6 +364,8 @@ void rrc_mac_config_req_NB_IoT(
mac_config = &mac_inst->rrc_config; mac_config = &mac_inst->rrc_config;
long schedulingInfoSIB1 = carrier->mib_NB_IoT.message.schedulingInfoSIB1_r13;
if(ded_flag==0) if(ded_flag==0)
{ {
}else }else
...@@ -422,11 +424,29 @@ void rrc_mac_config_req_NB_IoT( ...@@ -422,11 +424,29 @@ void rrc_mac_config_req_NB_IoT(
if(sib1_NB_IoT != NULL) if(sib1_NB_IoT != NULL)
{ {
mac_config->sib1_NB_IoT_sched_config.repetitions = 8; if(schedulingInfoSIB1 <=11)
{
// the value come from table 16.4.1.3-3 from TS 36.213
switch(schedulingInfoSIB1%3)
{
case 0:
mac_config->sib1_NB_IoT_sched_config.repetitions = 4;
// the value come from table 16.4.1.3-4 from TS 36.213
mac_config->sib1_NB_IoT_sched_config.starting_rf = (carrier->physCellId % 4) * 16;
break;
case 1:
mac_config->sib1_NB_IoT_sched_config.repetitions = 8;
mac_config->sib1_NB_IoT_sched_config.starting_rf = (carrier->physCellId % 2) * 16;
break;
case 2:
mac_config->sib1_NB_IoT_sched_config.repetitions = 16;
mac_config->sib1_NB_IoT_sched_config.starting_rf = carrier->physCellId % 2;
break;
}
}else
LOG_E(MAC,"SchedulinginfoSIB1 value not available!\n");
//printf("[ASN Debug] SI P: %ld\n",sib1_NB_IoT->schedulingInfoList_r13.list.array[0]->si_Periodicity_r13); //printf("[ASN Debug] SI P: %ld\n",sib1_NB_IoT->schedulingInfoList_r13.list.array[0]->si_Periodicity_r13);
mac_config->sib1_NB_IoT_sched_config.starting_rf = 0;
mac_config->si_window_length = ms160; mac_config->si_window_length = ms160;
......
...@@ -236,7 +236,7 @@ int output_handler(eNB_MAC_INST_NB_IoT *mac_inst, module_id_t module_id, int CC_ ...@@ -236,7 +236,7 @@ int output_handler(eNB_MAC_INST_NB_IoT *mac_inst, module_id_t module_id, int CC_
dl_config_pdu = SCHED_info->DL_req->dl_config_request_body.dl_config_pdu_list; dl_config_pdu = SCHED_info->DL_req->dl_config_request_body.dl_config_pdu_list;
DCI_pdu = schedule_result_list_DL-> DCI_pdu; DCI_pdu = schedule_result_list_DL-> DCI_pdu;
if(schedule_result_list_DL->rnti==SI_RNTI) if(schedule_result_list_DL->rnti==SI_RNTI)
LOG_I(MAC,"frame:%d, subframe:%d NB-IoT fill SIB23 ResAssign: %d\n",frame,subframe,((DCIFormatN1_t *)DCI_pdu)->ResAssign); LOG_D(MAC,"frame:%d, subframe:%d NB-IoT fill SIB23 ResAssign: %d\n",frame,subframe,((DCIFormatN1_t *)DCI_pdu)->ResAssign);
SCHED_info->DL_req->dl_config_request_body.number_pdu = 1; SCHED_info->DL_req->dl_config_request_body.number_pdu = 1;
dl_config_pdu->pdu_type = NFAPI_DL_CONFIG_NDLSCH_PDU_TYPE; dl_config_pdu->pdu_type = NFAPI_DL_CONFIG_NDLSCH_PDU_TYPE;
dl_config_pdu->pdu_size = 2+sizeof(nfapi_dl_config_ndlsch_pdu_rel13_t); dl_config_pdu->pdu_size = 2+sizeof(nfapi_dl_config_ndlsch_pdu_rel13_t);
......
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