Commit c01adc5e authored by Bartosz Podrygajlo's avatar Bartosz Podrygajlo

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.
parent ab75a7cc
......@@ -724,13 +724,13 @@ int nr_rx_pdsch(PHY_VARS_NR_UE *ue,
metadata mt = {.frame = proc->frame_rx, .slot = proc->nr_slot_rx };
int total_valid_res = 0;
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)) {
size_t offset = 0;
for (int i = startSymbIdx; i < startSymbIdx + nbSymb; i++) {
size_t data_size = sizeof(c16_t) * dl_valid_re[i - i];
UEscopeCopyUnsafe(ue, pdschRxdataF_comp, &rxdataF_comp[0][0][rx_size_symbol * i], data_size, offset, i - startSymbIdx);
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);
offset += data_size;
}
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) {
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.is_data_ready = true;
......
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