Commit 74b2aec2 authored by Francesco Mani's avatar Francesco Mani

fix for rach pdus

parent c2889d3b
...@@ -1122,7 +1122,7 @@ int get_nr_prach_occasion_info_from_index(uint8_t index, ...@@ -1122,7 +1122,7 @@ int get_nr_prach_occasion_info_from_index(uint8_t index,
uint8_t get_nr_prach_duration(uint8_t prach_format){ uint8_t get_nr_prach_duration(uint8_t prach_format){
switch(prach_format){ switch(prach_format){
case 0: // format 0 case 0: // format 0
return 0; return 0;
...@@ -1170,7 +1170,7 @@ switch(prach_format){ ...@@ -1170,7 +1170,7 @@ switch(prach_format){
AssertFatal(1==0,"Invalid Prach format\n"); AssertFatal(1==0,"Invalid Prach format\n");
break; break;
} }
} }
...@@ -1223,7 +1223,8 @@ int get_nr_prach_info_from_index(uint8_t index, ...@@ -1223,7 +1223,8 @@ int get_nr_prach_info_from_index(uint8_t index,
if (table_6_3_3_2_4_prachConfig_Index[index][1] != -1) if (table_6_3_3_2_4_prachConfig_Index[index][1] != -1)
format2 = (uint8_t) table_6_3_3_2_4_prachConfig_Index[index][1]; format2 = (uint8_t) table_6_3_3_2_4_prachConfig_Index[index][1];
*format = ((uint8_t) table_6_3_3_2_4_prachConfig_Index[index][0]) | (format2<<8); *format = ((uint8_t) table_6_3_3_2_4_prachConfig_Index[index][0]) | (format2<<8);
LOG_I(MAC,"Frame %d slot %d: Getting PRACH info from index %d absoluteFrequencyPointA %u mu %u frame_type %u start_symbol %u N_t_slot %u N_dur %u N_RA_slot %u RA_sfn_index %u\n", frame, LOG_D(MAC,"Frame %d slot %d: Getting PRACH info from index %d absoluteFrequencyPointA %u mu %u frame_type %u start_symbol %u N_t_slot %u N_dur %u N_RA_slot %u RA_sfn_index %u\n",
frame,
slot, slot,
index, index,
pointa, pointa,
...@@ -1272,9 +1273,11 @@ int get_nr_prach_info_from_index(uint8_t index, ...@@ -1272,9 +1273,11 @@ int get_nr_prach_info_from_index(uint8_t index,
if (table_6_3_3_2_3_prachConfig_Index[index][1] != -1) if (table_6_3_3_2_3_prachConfig_Index[index][1] != -1)
format2 = (uint8_t) table_6_3_3_2_3_prachConfig_Index[index][1]; format2 = (uint8_t) table_6_3_3_2_3_prachConfig_Index[index][1];
*format = ((uint8_t) table_6_3_3_2_3_prachConfig_Index[index][0]) | (format2<<8); *format = ((uint8_t) table_6_3_3_2_3_prachConfig_Index[index][0]) | (format2<<8);
LOG_I(MAC,"Frame %d slot %d: Getting PRACH info from index %d (col 6 %lu) absoluteFrequencyPointA %u mu %u frame_type %u start_symbol %u N_t_slot %u N_dur %u N_RA_slot %u RA_sfn_index %u \n", frame, LOG_D(MAC,"Frame %d slot %d: Getting PRACH info from index %d (col 6 %lu) absoluteFrequencyPointA %u mu %u frame_type %u start_symbol %u N_t_slot %u N_dur %u N_RA_slot %u RA_sfn_index %u \n",
frame,
slot, slot,
index, table_6_3_3_2_3_prachConfig_Index[index][6], index,
table_6_3_3_2_3_prachConfig_Index[index][6],
pointa, pointa,
mu, mu,
unpaired, unpaired,
...@@ -1310,7 +1313,8 @@ int get_nr_prach_info_from_index(uint8_t index, ...@@ -1310,7 +1313,8 @@ int get_nr_prach_info_from_index(uint8_t index,
if (table_6_3_3_2_2_prachConfig_Index[index][1] != -1) if (table_6_3_3_2_2_prachConfig_Index[index][1] != -1)
format2 = (uint8_t) table_6_3_3_2_2_prachConfig_Index[index][1]; format2 = (uint8_t) table_6_3_3_2_2_prachConfig_Index[index][1];
*format = ((uint8_t) table_6_3_3_2_2_prachConfig_Index[index][0]) | (format2<<8); *format = ((uint8_t) table_6_3_3_2_2_prachConfig_Index[index][0]) | (format2<<8);
LOG_D(MAC,"Frame %d slot %d: Getting PRACH info from index %d absoluteFrequencyPointA %u mu %u frame_type %u start_symbol %u N_t_slot %u N_dur %u \n", frame, LOG_D(MAC,"Frame %d slot %d: Getting PRACH info from index %d absoluteFrequencyPointA %u mu %u frame_type %u start_symbol %u N_t_slot %u N_dur %u \n",
frame,
slot, slot,
index, index,
pointa, pointa,
......
...@@ -56,9 +56,12 @@ extern uint16_t sf_ahead; ...@@ -56,9 +56,12 @@ extern uint16_t sf_ahead;
extern uint16_t sl_ahead; extern uint16_t sl_ahead;
void handle_nr_rach(NR_UL_IND_t *UL_info) { void handle_nr_rach(NR_UL_IND_t *UL_info) {
if (UL_info->rach_ind.number_of_pdus>0) { if (UL_info->rach_ind.number_of_pdus>0) {
LOG_I(MAC,"UL_info[Frame %d, Slot %d] Calling initiate_ra_proc RACH:SFN/SLOT:%d/%d\n",UL_info->frame,UL_info->slot, UL_info->rach_ind.sfn,UL_info->rach_ind.slot); LOG_I(MAC,"UL_info[Frame %d, Slot %d] Calling initiate_ra_proc RACH:SFN/SLOT:%d/%d\n",UL_info->frame,UL_info->slot, UL_info->rach_ind.sfn,UL_info->rach_ind.slot);
for(int i = 0; i < UL_info->rach_ind.number_of_pdus; i++) { int npdus = UL_info->rach_ind.number_of_pdus;
for(int i = 0; i < npdus; i++) {
UL_info->rach_ind.number_of_pdus--;
if (UL_info->rach_ind.pdu_list[i].num_preamble>0) if (UL_info->rach_ind.pdu_list[i].num_preamble>0)
AssertFatal(UL_info->rach_ind.pdu_list[i].num_preamble==1, AssertFatal(UL_info->rach_ind.pdu_list[i].num_preamble==1,
"More than 1 preamble not supported\n"); "More than 1 preamble not supported\n");
......
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