Commit f8cb47d4 authored by Thomas Schlichter's avatar Thomas Schlichter

fix uePcchLLR() in nr_phy_scope.c to plot the PDCCH LLRs

parent b0903e20
...@@ -525,32 +525,25 @@ static void uePcchLLR (OAIgraph_t *graph, PHY_VARS_NR_UE *phy_vars_ue, int eNB_ ...@@ -525,32 +525,25 @@ static void uePcchLLR (OAIgraph_t *graph, PHY_VARS_NR_UE *phy_vars_ue, int eNB_
if (!phy_vars_ue->pdcch_vars[0][eNB_id]->llr) if (!phy_vars_ue->pdcch_vars[0][eNB_id]->llr)
return; return;
NR_DL_FRAME_PARMS *frame_parms = &phy_vars_ue->frame_parms; int num_re = 4*273*12; // 12*frame_parms->N_RB_DL*num_pdcch_symbols
uint8_t nb_antennas_rx = frame_parms->nb_antennas_rx; int Qm = 2;
uint8_t nb_antennas_tx = frame_parms->nb_antennas_tx; int coded_bits_per_codeword = num_re*Qm;
scopeSample_t **chest_f = (scopeSample_t **) phy_vars_ue->pbch_vars[eNB_id]->dl_ch_estimates; localBuff(llr,coded_bits_per_codeword*RX_NB_TH_MAX);
int ind = 0; localBuff(bit,coded_bits_per_codeword*RX_NB_TH_MAX);
float chest_f_abs[frame_parms->ofdm_symbol_size]; int base=0;
float freq[frame_parms->ofdm_symbol_size];
for (int atx=0; atx<nb_antennas_tx; atx++) { for (int thr=0 ; thr < RX_NB_TH_MAX ; thr ++ ) {
for (int arx=0; arx<nb_antennas_rx; arx++) { int16_t *pdcch_llr = (int16_t *) phy_vars_ue->pdcch_vars[thr][eNB_id]->llr;
if (chest_f[(atx<<1)+arx] != NULL) {
for (int k=0; k<frame_parms->ofdm_symbol_size; k++) { for (int i=0; i<coded_bits_per_codeword; i++) {
freq[ind] = (float)ind; llr[base+i] = (float) pdcch_llr[i];
chest_f_abs[ind] = (short)10*log10(1.0+SquaredNorm(chest_f[(atx<<1)+arx][6144+k])); bit[base+i] = (float) base+i;
ind++;
}
}
} }
base+=coded_bits_per_codeword;
} }
// tx antenna 0 oai_xygraph(graph,bit,llr,base,0,10);
//fl_set_xyplot_xbounds(form->chest_f,0,nb_antennas_rx*nb_antennas_tx*nsymb_ce);
//fl_set_xyplot_xtics(form->chest_f,nb_antennas_rx*nb_antennas_tx*frame_parms->symbols_per_tti,2);
// fl_set_xyplot_xtics(form->chest_f,nb_antennas_rx*nb_antennas_tx*2,2);
//fl_set_xyplot_xgrid(form->chest_f,FL_GRID_MAJOR);
oai_xygraph(graph,freq,chest_f_abs,frame_parms->ofdm_symbol_size,0,10);
} }
static void uePcchIQ (OAIgraph_t *graph, PHY_VARS_NR_UE *phy_vars_ue, int eNB_id, int UE_id) { static void uePcchIQ (OAIgraph_t *graph, PHY_VARS_NR_UE *phy_vars_ue, int eNB_id, int UE_id) {
......
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