Merge remote-tracking branch 'origin/NR_UE_fix_PUCCH_multiplexing' into integration_2024_w21b
This commit is contained in:
@@ -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,
|
||||
// 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)
|
||||
return true;
|
||||
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
|
||||
int j = 0;
|
||||
int o = 0;
|
||||
while (j <= num_res - 1) {
|
||||
if (j < num_res - 1) {
|
||||
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++;
|
||||
j++;
|
||||
}
|
||||
if ((j < num_res - 1) && check_overlapping_resources(pucch, j, o)) {
|
||||
o++;
|
||||
j++;
|
||||
} else {
|
||||
if (o > 0) {
|
||||
merge_resources(&pucch[j - o], o + 1, pucch_Config);
|
||||
|
||||
Reference in New Issue
Block a user