Commit ebbd4d85 authored by kn.raju's avatar kn.raju

Fixing association period

parent 34c238c3
...@@ -173,25 +173,21 @@ void find_SSB_and_RO_available(module_id_t module_idP) { ...@@ -173,25 +173,21 @@ void find_SSB_and_RO_available(module_id_t module_idP) {
num_active_ssb++; num_active_ssb++;
} }
} }
cc->total_prach_occasions_per_config_period = total_RA_occasions;
for(int i = 1; (1 << (i-1)) <= max_association_period;i++) { for(int i=1; (1 << (i-1)) < max_association_period; i++) {
cc->max_association_period = (1 <<(i-1));
total_RA_occasions = total_RA_occasions * cc->max_association_period;
if(total_RA_occasions >= (int) (num_active_ssb/num_ssb_per_RO)) { if(total_RA_occasions >= (int) (num_active_ssb/num_ssb_per_RO)) {
repetition = (uint16_t)((total_RA_occasions * num_ssb_per_RO )/num_active_ssb); repetition = (uint16_t)((total_RA_occasions * num_ssb_per_RO )/num_active_ssb);
break; break;
} }
else { }
total_RA_occasions = total_RA_occasions * i;
cc->max_association_period = i;
}
}
if(cc->max_association_period == 0)
cc->max_association_period = 1;
unused_RA_occasion = total_RA_occasions - (int)((num_active_ssb * repetition)/num_ssb_per_RO); unused_RA_occasion = total_RA_occasions - (int)((num_active_ssb * repetition)/num_ssb_per_RO);
cc->total_prach_occasions = total_RA_occasions - unused_RA_occasion; cc->total_prach_occasions = total_RA_occasions - unused_RA_occasion;
cc->num_active_ssb = num_active_ssb; cc->num_active_ssb = num_active_ssb;
LOG_I(MAC, "Total available RO %d, num of active SSB %d: unused RO = %d max_association_period %u N_RA_sfn %u \n", cc->total_prach_occasions, cc->num_active_ssb, unused_RA_occasion, max_association_period, N_RA_sfn); LOG_I(MAC, "Total available RO %d, num of active SSB %d: unused RO = %d association_period %u N_RA_sfn %u total_prach_occasions_per_config_period %u\n", cc->total_prach_occasions, cc->num_active_ssb, unused_RA_occasion, cc->max_association_period, N_RA_sfn, cc->total_prach_occasions_per_config_period);
} }
......
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