Commit a2757c87 authored by Nick Ho's avatar Nick Ho

Debug on initialization procedure

parent 82fbfae5
This diff is collapsed.
...@@ -400,7 +400,7 @@ typedef struct NPRACH_Parameters_NB_IoT{ ...@@ -400,7 +400,7 @@ typedef struct NPRACH_Parameters_NB_IoT{
} nprach_parameters_NB_IoT_t; } nprach_parameters_NB_IoT_t;
typedef struct{ typedef struct{
A_SEQUENCE_OF(nprach_parameters_NB_IoT_t) list; nprach_parameters_NB_IoT_t list[3];
}NPRACH_List_NB_IoT_t; }NPRACH_List_NB_IoT_t;
typedef long RSRP_Range_t; typedef long RSRP_Range_t;
......
...@@ -354,10 +354,10 @@ void PHY_config_req_NB_IoT(PHY_Config_NB_IoT_t* config_INFO){ ...@@ -354,10 +354,10 @@ void PHY_config_req_NB_IoT(PHY_Config_NB_IoT_t* config_INFO){
{ {
//Dedicated Configuration //Dedicated Configuration
phy_config_dedicated_eNB_NB_IoT(config_INFO->mod_id, /*phy_config_dedicated_eNB_NB_IoT(config_INFO->mod_id,
config_INFO->CC_id, config_INFO->CC_id,
config_INFO->rnti, config_INFO->rnti,
&config_INFO->extra_phy_parms); &config_INFO->extra_phy_parms);*/
} }
......
...@@ -35,10 +35,10 @@ typedef enum si_Periodicity{ ...@@ -35,10 +35,10 @@ typedef enum si_Periodicity{
}si_Periodicity_NB_IoT; }si_Periodicity_NB_IoT;
typedef enum si_RepetitionPattern{ typedef enum si_RepetitionPattern{
si_RepetitionPattern_every2ndRF=20, si_RepetitionPattern_every2ndRF=0,
si_RepetitionPattern_every4thRF=40, si_RepetitionPattern_every4thRF,
si_RepetitionPattern_every8thRF=80, si_RepetitionPattern_every8thRF,
si_RepetitionPattern_every16thRF=160 si_RepetitionPattern_every16thRF
}si_RepetitionPattern_NB_IoT; }si_RepetitionPattern_NB_IoT;
typedef enum sib_MappingInfo{ typedef enum sib_MappingInfo{
...@@ -51,14 +51,14 @@ typedef enum sib_MappingInfo{ ...@@ -51,14 +51,14 @@ typedef enum sib_MappingInfo{
}sib_MappingInfo_NB_IoT; }sib_MappingInfo_NB_IoT;
typedef enum si_TB{ typedef enum si_TB{
si_TB_56=56, si_TB_56=2,
si_TB_120=120, si_TB_120=2,
si_TB_208=208, si_TB_208=8,
si_TB_256=256, si_TB_256=8,
si_TB_328=328, si_TB_328=8,
si_TB_440=440, si_TB_440=8,
si_TB_552=552, si_TB_552=8,
si_TB_680=680 si_TB_680=8
}si_TB_NB_IoT; }si_TB_NB_IoT;
///RACH_ConfigCommon configuration ///RACH_ConfigCommon configuration
......
...@@ -184,13 +184,11 @@ void extend_available_resource_DL(eNB_MAC_INST_NB_IoT *mac_inst, int max_subfram ...@@ -184,13 +184,11 @@ void extend_available_resource_DL(eNB_MAC_INST_NB_IoT *mac_inst, int max_subfram
uint32_t i, i_div_si_window; uint32_t i, i_div_si_window;
//uint32_t si_period_div_window; //uint32_t si_period_div_window;
printf("%d %d\n", max_subframe, mac_inst->schedule_subframe_DL);
if(max_subframe > mac_inst->schedule_subframe_DL){ if(max_subframe > mac_inst->schedule_subframe_DL){
// align to si-period // align to si-period
max_subframe = ((max_subframe%mac_inst->rrc_config.si_window_length)==0)? max_subframe : (((max_subframe/mac_inst->rrc_config.si_window_length)+1)*mac_inst->rrc_config.si_window_length); max_subframe = ((max_subframe%mac_inst->rrc_config.si_window_length)==0)? max_subframe : (((max_subframe/mac_inst->rrc_config.si_window_length)+1)*mac_inst->rrc_config.si_window_length);
printf("max %d last->end %p\n", max_subframe, available_resource_DL_last); //printf("max %d last->end %p\n", max_subframe, available_resource_DL_last);
if(mac_inst->schedule_subframe_DL == available_resource_DL_last->end_subframe){ if(mac_inst->schedule_subframe_DL == available_resource_DL_last->end_subframe){
available_resource_DL_last->end_subframe = max_subframe; available_resource_DL_last->end_subframe = max_subframe;
//available_resource_DL_last->DLSF_num += calculate_DLSF(mac_inst, mac_inst->schedule_subframe_DL+1, max_subframe); //available_resource_DL_last->DLSF_num += calculate_DLSF(mac_inst, mac_inst->schedule_subframe_DL+1, max_subframe);
...@@ -208,13 +206,17 @@ void extend_available_resource_DL(eNB_MAC_INST_NB_IoT *mac_inst, int max_subfram ...@@ -208,13 +206,17 @@ void extend_available_resource_DL(eNB_MAC_INST_NB_IoT *mac_inst, int max_subfram
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){
i_div_si_window = i / mac_inst->rrc_config.si_window_length; i_div_si_window = i / mac_inst->rrc_config.si_window_length;
if(-1 != mac_inst->sibs_table[i_div_si_window]){ if(-1 != mac_inst->sibs_table[i_div_si_window]){
printf("[sibs%d] %d\n", mac_inst->sibs_table[i_div_si_window], i); //printf("[sibs%d] %d\n", mac_inst->sibs_table[i_div_si_window], i);
printf("Schedule SIB in \n");
schedule_sibs_NB_IoT(mac_inst, mac_inst->sibs_table[i_div_si_window], i); schedule_sibs_NB_IoT(mac_inst, mac_inst->sibs_table[i_div_si_window], i);
printf("Schedule SIB out \n");
} }
} }
mac_inst->schedule_subframe_DL = max_subframe; mac_inst->schedule_subframe_DL = max_subframe;
} }
LOG_I(MAC,"[NB-IoT] Initialization of the DL Resource grid has been done\n");
return ; return ;
} }
...@@ -323,12 +325,16 @@ available_resource_DL_t *check_sibs_resource(eNB_MAC_INST_NB_IoT *mac_inst, uint ...@@ -323,12 +325,16 @@ available_resource_DL_t *check_sibs_resource(eNB_MAC_INST_NB_IoT *mac_inst, uint
} }
pt = pt->next; pt = pt->next;
} }
//print_available_resource_DL(); //print_available_resource_DL();
//DEBUG("sibs %d", check_start_subframe); //DEBUG("sibs %d", check_start_subframe);
if((available_resource_DL_t *)0 == pt){ if((available_resource_DL_t *)0 == pt){
return (available_resource_DL_t *)0; return (available_resource_DL_t *)0;
} }
num_dlsf = calculate_DLSF(mac_inst, check_start_subframe, pt->end_subframe); num_dlsf = calculate_DLSF(mac_inst, check_start_subframe, pt->end_subframe);
if((available_resource_DL_t *)0 == pt){ if((available_resource_DL_t *)0 == pt){
......
...@@ -318,7 +318,7 @@ uint8_t do_SIB1_NB_IoT(uint8_t Mod_id, int CC_id, ...@@ -318,7 +318,7 @@ uint8_t do_SIB1_NB_IoT(uint8_t Mod_id, int CC_id,
//FIXME //FIXME
(*sib1_NB_IoT)->freqBandIndicator_r13 = (*sib1_NB_IoT)->freqBandIndicator_r13 =
#if defined(ENABLE_ITTI) #if defined(ENABLE_ITTI)
configuration->eutra_band; configuration->eutra_band[CC_id];
#else #else
5; //if not configured we use band 5 (UL: 824 MHz - 849MHz / DL: 869 MHz - 894 MHz FDD mode) 5; //if not configured we use band 5 (UL: 824 MHz - 849MHz / DL: 869 MHz - 894 MHz FDD mode)
#endif #endif
...@@ -556,7 +556,7 @@ uint8_t do_SIB23_NB_IoT(uint8_t Mod_id, ...@@ -556,7 +556,7 @@ uint8_t do_SIB23_NB_IoT(uint8_t Mod_id,
nprach_parameters[1].nprach_Periodicity_r13 = configuration->nprach_Periodicity[CC_id]; nprach_parameters[1].nprach_Periodicity_r13 = configuration->nprach_Periodicity[CC_id];
nprach_parameters[1].nprach_StartTime_r13 = configuration->nprach_StartTime[CC_id]; nprach_parameters[1].nprach_StartTime_r13 = configuration->nprach_StartTime[CC_id];
nprach_parameters[1].nprach_SubcarrierOffset_r13 = configuration->nprach_SubcarrierOffset[CC_id]; nprach_parameters[1].nprach_SubcarrierOffset_r13 = configuration->nprach_SubcarrierOffset[CC_id];
nprach_parameters[1].nprach_NumSubcarriers_r13 = configuration->nprach_NumSubcarriers[1]; nprach_parameters[1].nprach_NumSubcarriers_r13 = configuration->nprach_NumSubcarriers[CC_id];
nprach_parameters[1].numRepetitionsPerPreambleAttempt_r13 = configuration->numRepetitionsPerPreambleAttempt_NB[CC_id]; nprach_parameters[1].numRepetitionsPerPreambleAttempt_r13 = configuration->numRepetitionsPerPreambleAttempt_NB[CC_id];
nprach_parameters[1].nprach_SubcarrierMSG3_RangeStart_r13 = configuration->nprach_SubcarrierMSG3_RangeStart[CC_id]; nprach_parameters[1].nprach_SubcarrierMSG3_RangeStart_r13 = configuration->nprach_SubcarrierMSG3_RangeStart[CC_id];
nprach_parameters[1].maxNumPreambleAttemptCE_r13 = configuration->maxNumPreambleAttemptCE_NB[CC_id]; nprach_parameters[1].maxNumPreambleAttemptCE_r13 = configuration->maxNumPreambleAttemptCE_NB[CC_id];
......
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