Fix pdschRxdataF_comp scope for UE.
Correctly calculate the amount of data to be copied. Copy at correct offset. Imporve error message in case data is insufficient.
This commit is contained in:
@@ -724,13 +724,13 @@ int nr_rx_pdsch(PHY_VARS_NR_UE *ue,
|
|||||||
metadata mt = {.frame = proc->frame_rx, .slot = proc->nr_slot_rx };
|
metadata mt = {.frame = proc->frame_rx, .slot = proc->nr_slot_rx };
|
||||||
int total_valid_res = 0;
|
int total_valid_res = 0;
|
||||||
for (int i = startSymbIdx; i < startSymbIdx + nbSymb; i++) {
|
for (int i = startSymbIdx; i < startSymbIdx + nbSymb; i++) {
|
||||||
total_valid_res = dl_valid_re[i - 1];
|
total_valid_res += dl_valid_re[i];
|
||||||
}
|
}
|
||||||
if (UETryLockScopeData(ue, pdschRxdataF_comp, sizeof(c16_t), 1, total_valid_res, &mt)) {
|
if (UETryLockScopeData(ue, pdschRxdataF_comp, sizeof(c16_t), 1, total_valid_res, &mt)) {
|
||||||
size_t offset = 0;
|
size_t offset = 0;
|
||||||
for (int i = startSymbIdx; i < startSymbIdx + nbSymb; i++) {
|
for (int i = startSymbIdx; i < startSymbIdx + nbSymb; i++) {
|
||||||
size_t data_size = sizeof(c16_t) * dl_valid_re[i - i];
|
size_t data_size = sizeof(c16_t) * dl_valid_re[i];
|
||||||
UEscopeCopyUnsafe(ue, pdschRxdataF_comp, &rxdataF_comp[0][0][rx_size_symbol * i], data_size, offset, i - startSymbIdx);
|
UEscopeCopyUnsafe(ue, pdschRxdataF_comp, &rxdataF_comp[0][0][rx_size_symbol * i], data_size, offset, i);
|
||||||
offset += data_size;
|
offset += data_size;
|
||||||
}
|
}
|
||||||
UEunlockScopeData(ue, pdschRxdataF_comp)
|
UEunlockScopeData(ue, pdschRxdataF_comp)
|
||||||
|
|||||||
@@ -132,7 +132,11 @@ void unlockScopeData(enum scopeDataType type)
|
|||||||
}
|
}
|
||||||
if (total_size != (uint64_t)scope_data.data.scope_graph_data->dataSize) {
|
if (total_size != (uint64_t)scope_data.data.scope_graph_data->dataSize) {
|
||||||
LOG_E(PHY,
|
LOG_E(PHY,
|
||||||
"Scope is missing data - not all data that was expected was copied - possibly missed copyDataUnsafeWithOffset call\n");
|
"Scope is missing data - not all data that was expected was copied - possibly missed copyDataUnsafeWithOffset call. "
|
||||||
|
"scope = %s, total_size = %lu, dataSize = %d\n",
|
||||||
|
scope_id_to_string(type),
|
||||||
|
total_size,
|
||||||
|
scope_data.data.scope_graph_data->dataSize);
|
||||||
}
|
}
|
||||||
scope_data.data.scope_id = type;
|
scope_data.data.scope_id = type;
|
||||||
scope_data.is_data_ready = true;
|
scope_data.is_data_ready = true;
|
||||||
|
|||||||
Reference in New Issue
Block a user