Commit 80f90b55 authored by Bartosz Podrygajlo's avatar Bartosz Podrygajlo

Add time domain sample scope before sync

Added new data sync for UE which displays time domain samples read from RF device
before synchronization to PSS/SSS
parent 43a92369
......@@ -707,8 +707,10 @@ void readFrame(PHY_VARS_NR_UE *UE, openair0_timestamp *timestamp, bool toTrash)
+ 4 * ((x * fp->samples_per_subframe) + fp->get_samples_slot_timestamp(slot, fp, 0));
}
int tmp = UE->rfdevice.trx_read_func(&UE->rfdevice, timestamp, rxp, fp->get_samples_per_slot(slot, fp), fp->nb_antennas_rx);
AssertFatal(fp->get_samples_per_slot(slot, fp) == tmp, "");
int read_block_size = fp->get_samples_per_slot(slot, fp);
int tmp = UE->rfdevice.trx_read_func(&UE->rfdevice, timestamp, rxp, read_block_size, fp->nb_antennas_rx);
UEscopeCopy(UE, ueTimeDomainSamplesBeforeSync, rxp[0], sizeof(c16_t), 1, read_block_size, 0);
AssertFatal(read_block_size == tmp, "");
if (IS_SOFTMODEM_RFSIM)
dummyWrite(UE, *timestamp, fp->get_samples_per_slot(slot, fp));
......
......@@ -499,6 +499,16 @@ void ShowUeScope(PHY_VARS_NR_UE *ue, float t)
time_domain_iq->Draw(iq_data, t, new_data);
ImGui::TreePop();
}
if (ImGui::TreeNode("Time domain samples - before sync")) {
static auto iq_data = new IQData();
static auto time_domain_iq = new IQHist("Time domain samples - before sync");
bool new_data = false;
if (time_domain_iq->ShouldReadData()) {
new_data = iq_data->TryCollect(&scope_array[ueTimeDomainSamplesBeforeSync], t, time_domain_iq->GetEpsilon());
}
time_domain_iq->Draw(iq_data, t, new_data);
ImGui::TreePop();
}
if (ImGui::TreeNode("Broadcast channel")) {
ImGui::Text("RSRP %d", ue->measurements.ssb_rsrp_dBm[ue->frame_parms.ssb_index]);
if (ImGui::TreeNode("IQ")) {
......
......@@ -74,6 +74,7 @@ enum scopeDataType {
gNBPuschRxIq = MAX_SCOPE_TYPES,
gNBPuschLlr,
ueTimeDomainSamples,
ueTimeDomainSamplesBeforeSync,
EXTRA_SCOPE_TYPES
};
......
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