Commit 9c7a5b22 authored by Nick Ho's avatar Nick Ho

Optimize nprach searching time

parent 6c3be68d
......@@ -115,7 +115,7 @@ void eNB_dlsch_ulsch_scheduler_NB_IoT(eNB_MAC_INST_NB_IoT *mac_inst, uint32_t ab
maintain_available_resource(mac_inst);
if((abs_subframe % rachperiod[4]) == rachstart[0]){ //TODO, configuration should be pass by configuration module
if((abs_subframe % nprach_list->nprach_Periodicity) == rachstart[0]){ //TODO, configuration should be pass by configuration module
add_UL_Resource();
}
......@@ -203,7 +203,7 @@ void USS_scheduling_module(eNB_MAC_INST_NB_IoT *mac_inst, uint32_t abs_subframe,
}
maintain_available_resource(mac_inst);
// reserve resource for NPRACH
if((abs_subframe % rachperiod[4]) == rachstart[0])
if((abs_subframe % nprach_list->nprach_Periodicity) == rachstart[0])
{
//DEBUG("[%04d][USS_scheduling_module] In add_UL_Resource\n", mac_inst->current_subframe);
add_UL_Resource();
......
......@@ -198,7 +198,7 @@ void rx_sdu_NB_IoT(module_id_t module_id, int CC_id, frame_t frame, sub_frame_t
// note: if lcid < 25 this is sdu, otherwise this is CE
payload_ptr = parse_ulsch_header_NB_IoT(sdu, &num_ce, &num_sdu,rx_ces, rx_lcids, rx_lengths, length);
//LOG_D(MAC,"num_CE= %d, num_sdu= %d, rx_ces[0] = %d, rx_lcids = %d, rx_lengths[0] = %d, length = %d\n",num_ce,num_sdu,rx_ces[0],rx_lcids[0],rx_lengths[0],length);
LOG_I(MAC,"num_CE= %d, num_sdu= %d, rx_ces[0] = %d, rx_lcids = %d, rx_lengths[0] = %d, length = %d\n",num_ce,num_sdu,rx_ces[0],rx_lcids[0],rx_lengths[0],length);
for (i = 0; i < num_ce; i++)
{
......
......@@ -99,23 +99,23 @@ void print_scheduling_result_UL(void)
void setting_nprach(){
nprach_list[0].nprach_Periodicity = rachperiod[4];
nprach_list[0].nprach_Periodicity = rachperiod[3];
nprach_list[0].nprach_StartTime = rachstart[0];
nprach_list[0].nprach_SubcarrierOffset = rachscofst[0];
nprach_list[0].nprach_NumSubcarriers = rachnumsc[0];
nprach_list[0].numRepetitionsPerPreambleAttempt = rachrepeat[1];
nprach_list[0].numRepetitionsPerPreambleAttempt = rachrepeat[0];
nprach_list[1].nprach_Periodicity = rachperiod[4];
nprach_list[1].nprach_Periodicity = rachperiod[3];
nprach_list[1].nprach_StartTime = rachstart[0];
nprach_list[1].nprach_SubcarrierOffset = rachscofst[1];
nprach_list[1].nprach_NumSubcarriers = rachnumsc[0];
nprach_list[1].numRepetitionsPerPreambleAttempt = rachrepeat[3];
nprach_list[1].numRepetitionsPerPreambleAttempt = rachrepeat[0];
nprach_list[2].nprach_Periodicity = rachperiod[4];
nprach_list[2].nprach_Periodicity = rachperiod[3];
nprach_list[2].nprach_StartTime = rachstart[0];
nprach_list[2].nprach_SubcarrierOffset = rachscofst[2];
nprach_list[2].nprach_NumSubcarriers = rachnumsc[1];
nprach_list[2].numRepetitionsPerPreambleAttempt = rachrepeat[5];
nprach_list[2].numRepetitionsPerPreambleAttempt = rachrepeat[0];
// fixed nprach configuration
}
......
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