Commit 3a4dac00 authored by Jaroslava Fiedlerova's avatar Jaroslava Fiedlerova

Merge remote-tracking branch 'origin/NR_UE_fix_PUCCH_multiplexing' into integration_2024_w21b

parents 08200783 6fdb69a8
...@@ -1852,10 +1852,17 @@ void order_resources(PUCCH_sched_t *pucch, int num_res) ...@@ -1852,10 +1852,17 @@ void order_resources(PUCCH_sched_t *pucch, int num_res)
} }
} }
bool check_overlapping_resources(int curr_start, int curr_length, int next_start, int next_length) bool check_overlapping_resources(PUCCH_sched_t *pucch, int j, int o)
{ {
// assuming overlapping means if two resources overlaps in time, // assuming overlapping means if two resources overlaps in time,
// ie share a symbol in the slot regardless of PRB // ie share a symbol in the slot regardless of PRB
NR_PUCCH_Resource_t *pucch_resource = pucch[j - o].pucch_resource;
int curr_start, curr_length;
get_pucch_start_symbol_length(pucch_resource, &curr_start, &curr_length);
pucch_resource = pucch[j + 1].pucch_resource;
int next_start, next_length;
get_pucch_start_symbol_length(pucch_resource, &next_start, &next_length);
if (curr_start == next_start) if (curr_start == next_start)
return true; return true;
if (curr_start + curr_length - 1 < next_start) if (curr_start + curr_length - 1 < next_start)
...@@ -2201,18 +2208,9 @@ void multiplex_pucch_resource(NR_UE_MAC_INST_t *mac, PUCCH_sched_t *pucch, int n ...@@ -2201,18 +2208,9 @@ void multiplex_pucch_resource(NR_UE_MAC_INST_t *mac, PUCCH_sched_t *pucch, int n
int j = 0; int j = 0;
int o = 0; int o = 0;
while (j <= num_res - 1) { while (j <= num_res - 1) {
if (j < num_res - 1) { if ((j < num_res - 1) && check_overlapping_resources(pucch, j, o)) {
NR_PUCCH_Resource_t *pucch_resource = pucch[j - o].pucch_resource;
int curr_start, curr_length;
get_pucch_start_symbol_length(pucch_resource, &curr_start, &curr_length);
pucch_resource = pucch[j + 1].pucch_resource;
int next_start, next_length;
get_pucch_start_symbol_length(pucch_resource, &next_start, &next_length);
bool overlap = check_overlapping_resources(curr_start, curr_length, next_start, next_length);
if (overlap) {
o++; o++;
j++; j++;
}
} else { } else {
if (o > 0) { if (o > 0) {
merge_resources(&pucch[j - o], o + 1, pucch_Config); merge_resources(&pucch[j - o], o + 1, pucch_Config);
......
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