Commit b398b1bd authored by francescomani's avatar francescomani

fix MSG3 allocation assertion condition

parent 03946cd4
...@@ -1013,7 +1013,6 @@ static void nr_get_Msg3alloc(module_id_t module_id, ...@@ -1013,7 +1013,6 @@ static void nr_get_Msg3alloc(module_id_t module_id,
frame_t current_frame, frame_t current_frame,
NR_RA_t *ra) NR_RA_t *ra)
{ {
// msg3 is scheduled in mixed slot in the following TDD period
DevAssert(ra->Msg3_tda_id >= 0 && ra->Msg3_tda_id < 16); DevAssert(ra->Msg3_tda_id >= 0 && ra->Msg3_tda_id < 16);
uint16_t msg3_nb_rb = 8; // sdu has 6 or 8 bytes uint16_t msg3_nb_rb = 8; // sdu has 6 or 8 bytes
...@@ -1056,7 +1055,7 @@ static void nr_get_Msg3alloc(module_id_t module_id, ...@@ -1056,7 +1055,7 @@ static void nr_get_Msg3alloc(module_id_t module_id,
rbSize = 0; rbSize = 0;
while (rbStart < bwpSize && (vrb_map_UL[rbStart + bwpStart] & SL_to_bitmap(ra->msg3_startsymb, ra->msg3_nbSymb))) while (rbStart < bwpSize && (vrb_map_UL[rbStart + bwpStart] & SL_to_bitmap(ra->msg3_startsymb, ra->msg3_nbSymb)))
rbStart++; rbStart++;
AssertFatal(rbStart < bwpSize - msg3_nb_rb, "no space to allocate Msg 3 for RA!\n"); AssertFatal(rbStart + msg3_nb_rb - 1 < bwpSize, "no space to allocate Msg 3 for RA!\n");
while (rbStart + rbSize < bwpSize while (rbStart + rbSize < bwpSize
&& !(vrb_map_UL[rbStart + bwpStart + rbSize] & SL_to_bitmap(ra->msg3_startsymb, ra->msg3_nbSymb)) && rbSize < msg3_nb_rb) && !(vrb_map_UL[rbStart + bwpStart + rbSize] & SL_to_bitmap(ra->msg3_startsymb, ra->msg3_nbSymb)) && rbSize < msg3_nb_rb)
rbSize++; rbSize++;
......
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