Commit 751ad8e9 authored by Florian Kaltenberger's avatar Florian Kaltenberger

adding some visuals

parent eb381216
Pipeline #11151 failed with stage
in 0 seconds
......@@ -419,7 +419,7 @@ FD_lte_phy_scope_ue *create_lte_phy_scope_ue( void )
fl_set_object_lcolor( fdui->pbch_llr, FL_WHITE ); // Label color
fl_set_xyplot_symbolsize( fdui->pbch_llr,2);
fl_set_xyplot_xgrid( fdui->pbch_llr,FL_GRID_MAJOR);
fl_set_xyplot_xbounds( fdui->pbch_llr,0,1920);
//fl_set_xyplot_xbounds( fdui->pbch_llr,0,1920);
// I/Q PBCH comp
fdui->pbch_comp = fl_add_xyplot( FL_POINTS_XYPLOT, 540, 260, 240, 100, "PBCH I/Q of MF Output" );
......@@ -501,21 +501,27 @@ void phy_scope_UE(FD_lte_phy_scope_ue *form,
/*
int16_t **chest_t;
int16_t **chest_f;
*/
int16_t *pdsch_llr;
int16_t *pdsch_comp;
int16_t *pdsch_mag;
//int16_t *pdsch_mag;
int8_t *pdcch_llr;
int16_t *pdcch_comp;
int8_t *pbch_llr;
int16_t *pbch_comp;
float Re,Im,ymax=1;
int num_pdcch_symbols=3;
float *llr, *bit, *chest_f_abs, llr_pbch[1920], bit_pbch[1920], *llr_pdcch, *bit_pdcch;
float llr_pbch[1920], bit_pbch[1920];
float *llr, *bit;
float *llr_pdcch, *bit_pdcch;
float *I, *Q;
float **chest_t_abs;
int num_pdcch_symbols=2;
int num_re = 4500;
int Qm = 2;
int coded_bits_per_codeword = num_re*Qm;
/*
float Re,Im,ymax=1;
float **chest_t_abs, *chest_f_abs;
float freq[nsymb_ce*nb_antennas_rx*nb_antennas_tx];
int frame = phy_vars_ue->proc.proc_rxtx[0].frame_rx;
int coded_bits_per_codeword = 0;
int mcs = 0;
unsigned char harq_pid = 0;
*/
......@@ -554,9 +560,10 @@ void phy_scope_UE(FD_lte_phy_scope_ue *form,
} else {
coded_bits_per_codeword = 0; //frame_parms->N_RB_DL*12*get_Qm(mcs)*(frame_parms->symbols_per_tti);
}
I = (float*) calloc(frame_parms->ofdm_symbol_size*frame_parms->symbols_per_tti*2,sizeof(float));
Q = (float*) calloc(frame_parms->ofdm_symbol_size*frame_parms->symbols_per_tti*2,sizeof(float));
*/
I = (float*) calloc(frame_parms->ofdm_symbol_size*frame_parms->symbols_per_slot*2,sizeof(float));
Q = (float*) calloc(frame_parms->ofdm_symbol_size*frame_parms->symbols_per_slot*2,sizeof(float));
/*
chest_t_abs = (float**) malloc(nb_antennas_rx*sizeof(float*));
for (arx=0; arx<nb_antennas_rx; arx++) {
......@@ -564,11 +571,13 @@ void phy_scope_UE(FD_lte_phy_scope_ue *form,
}
chest_f_abs = (float*) calloc(nsymb_ce*nb_antennas_rx*nb_antennas_tx,sizeof(float));
*/
llr = (float*) calloc(coded_bits_per_codeword,sizeof(float)); // init to zero
bit = malloc(coded_bits_per_codeword*sizeof(float));
llr_pdcch = (float*) calloc(12*frame_parms->N_RB_DL*num_pdcch_symbols*2,sizeof(float)); // init to zero
bit_pdcch = (float*) calloc(12*frame_parms->N_RB_DL*num_pdcch_symbols*2,sizeof(float));
*/
rxsig_t = (int16_t**) phy_vars_ue->common_vars.rxdata;
rxsig_t_dB = calloc(nb_antennas_rx,sizeof(float*));
......@@ -577,19 +586,20 @@ void phy_scope_UE(FD_lte_phy_scope_ue *form,
}
time = calloc(samples_per_frame,sizeof(float));
corr = calloc(samples_per_frame,sizeof(float));
/*
chest_t = (int16_t**) phy_vars_ue->common_vars.common_vars_rx_data_per_thread[phy_vars_ue->current_thread_id[subframe]].dl_ch_estimates_time[eNB_id];
chest_f = (int16_t**) phy_vars_ue->common_vars.common_vars_rx_data_per_thread[phy_vars_ue->current_thread_id[subframe]].dl_ch_estimates[eNB_id];
*/
pbch_llr = (int8_t*) phy_vars_ue->pbch_vars[eNB_id]->llr;
pbch_comp = (int16_t*) phy_vars_ue->pbch_vars[eNB_id]->rxdataF_comp[0];
pdcch_llr = (int8_t*) phy_vars_ue->pdcch_vars[phy_vars_ue->current_thread_id[subframe]][eNB_id]->llr;
pdcch_comp = (int16_t*) phy_vars_ue->pdcch_vars[phy_vars_ue->current_thread_id[subframe]][eNB_id]->rxdataF_comp[0];
pdsch_llr = (int16_t*) phy_vars_ue->pdsch_vars[phy_vars_ue->current_thread_id[subframe]][eNB_id]->llr[0]; // stream 0
pdsch_llr = (int16_t*) phy_vars_ue->pdsch_vars[phy_vars_ue->current_thread_id[subframe]][eNB_id]->llr[0]; // stream 0
// pdsch_llr = (int16_t*) phy_vars_ue->lte_ue_pdsch_vars_SI[eNB_id]->llr[0]; // stream 0
pdsch_comp = (int16_t*) phy_vars_ue->pdsch_vars[phy_vars_ue->current_thread_id[subframe]][eNB_id]->rxdataF_comp0[0];
pdsch_mag = (int16_t*) phy_vars_ue->pdsch_vars[phy_vars_ue->current_thread_id[subframe]][eNB_id]->dl_ch_mag0[0];
*/
//pdsch_mag = (int16_t*) phy_vars_ue->pdsch_vars[phy_vars_ue->current_thread_id[subframe]][eNB_id]->dl_ch_mag0[0];
// Received signal in time domain of receive antenna 0
if (rxsig_t != NULL) {
......@@ -710,25 +720,26 @@ void phy_scope_UE(FD_lte_phy_scope_ue *form,
}
}
}
*/
// PBCH LLRs
if (pbch_llr != NULL) {
for (i=0; i<1920; i++) {
for (i=0; i<864; i++) {
llr_pbch[i] = (float) pbch_llr[i];
bit_pbch[i] = (float) i;
}
fl_set_xyplot_data(form->pbch_llr,bit_pbch,llr_pbch,1920,"","","");
fl_set_xyplot_data(form->pbch_llr,bit_pbch,llr_pbch,864,"","","");
}
// PBCH I/Q of MF Output
if (pbch_comp!=NULL) {
for (i=0; i<72*2; i++) {
for (i=0; i<576; i++) {
I[i] = pbch_comp[2*i];
Q[i] = pbch_comp[2*i+1];
}
fl_set_xyplot_data(form->pbch_comp,I,Q,72*2,"","","");
fl_set_xyplot_data(form->pbch_comp,I,Q,576,"","","");
}
// PDCCH LLRs
......@@ -738,15 +749,7 @@ void phy_scope_UE(FD_lte_phy_scope_ue *form,
bit_pdcch[i] = (float) i;
}
fl_set_xyplot_xbounds(form->pdcch_llr,0,12*frame_parms->N_RB_DL*2*3);
if (frame_parms->N_RB_DL != 100)
{
fl_set_xyplot_data(form->pdcch_llr,bit_pdcch,llr_pdcch,12*frame_parms->N_RB_DL*2*num_pdcch_symbols,"","","");
}
else
{
LOG_D(PHY,"UE PDCCH LLR plot is bugged in 20 MHz BW, to be fixed !!!\n");
}
fl_set_xyplot_data(form->pdcch_llr,bit_pdcch,llr_pdcch,12*frame_parms->N_RB_DL*num_pdcch_symbols,"","","");
}
// PDCCH I/Q of MF Output
......@@ -755,14 +758,7 @@ void phy_scope_UE(FD_lte_phy_scope_ue *form,
I[i] = pdcch_comp[2*i];
Q[i] = pdcch_comp[2*i+1];
}
if (frame_parms->N_RB_DL != 100)
{
fl_set_xyplot_data(form->pdcch_comp,I,Q,12*frame_parms->N_RB_DL*num_pdcch_symbols,"","","");
}
else
{
LOG_D(PHY,"UE PDCCH COMP plot is bugged in 20 MHz BW, to be fixed !!!\n");
}
fl_set_xyplot_data(form->pdcch_comp,I,Q,12*frame_parms->N_RB_DL*num_pdcch_symbols,"","","");
}
// PDSCH LLRs
......@@ -772,32 +768,20 @@ void phy_scope_UE(FD_lte_phy_scope_ue *form,
bit[i] = (float) i;
}
fl_set_xyplot_xbounds(form->pdsch_llr,0,coded_bits_per_codeword);
if (frame_parms->N_RB_DL != 100)
{
fl_set_xyplot_data(form->pdsch_llr,bit,llr,coded_bits_per_codeword,"","","");
}
else
{
LOG_D(PHY,"UE PDSCH LLR plot is bugged in 20 MHz BW, to be fixed !!!\n");
}
//fl_set_xyplot_xbounds(form->pdsch_llr,0,coded_bits_per_codeword);
fl_set_xyplot_data(form->pdsch_llr,bit,llr,coded_bits_per_codeword,"","","");
}
// PDSCH I/Q of MF Output
if (pdsch_comp!=NULL) {
ind=0;
for (k=0; k<frame_parms->symbols_per_tti; k++) {
for (i=0; i<12*frame_parms->N_RB_DL/2; i++) {
int j = (2*frame_parms->N_RB_DL*12*k)+4*i;
I[ind] = (pdsch_mag[j ]!=0? 1.0/pdsch_mag[j ]: 0.0) * pdsch_comp[j ]*1.0;
Q[ind] = (pdsch_mag[j+1]!=0? 1.0/pdsch_mag[j+1]: 0.0) * pdsch_comp[j+1]*1.0;
ind++;
}
for (i=0; i<num_re; i++) {
I[ind] = pdsch_comp[i ];
Q[ind] = pdsch_comp[i+1];
}
fl_set_xyplot_data(form->pdsch_comp,I,Q,ind,"","","");
fl_set_xyplot_data(form->pdsch_comp,I,Q,num_re,"","","");
}
/*
// PDSCH Throughput
memmove( tput_time_ue[UE_id], &tput_time_ue[UE_id][1], (TPUT_WINDOW_LENGTH-1)*sizeof(float) );
......@@ -824,19 +808,18 @@ void phy_scope_UE(FD_lte_phy_scope_ue *form,
}
free(rxsig_t_dB);
/*
free(I);
free(Q);
free(chest_f_abs);
free(llr);
free(bit);
free(bit_pdcch);
free(llr_pdcch);
/*
free(chest_f_abs);
for (arx=0; arx<nb_antennas_rx; arx++) {
free(chest_t_abs[arx]);
}
free(chest_t_abs);
*/
}
......@@ -1116,6 +1116,8 @@ int main( int argc, char **argv ) {
pthread_cond_init(&sync_cond,NULL);
pthread_mutex_init(&sync_mutex, NULL);
init_UE(1);
#ifdef XFORMS
int UE_id;
int fl_argc=1;
......@@ -1156,7 +1158,6 @@ int main( int argc, char **argv ) {
rt_sleep_ns(10*100000000ULL);
init_UE(1);
number_of_cards = 1;
for(CC_id=0; CC_id<MAX_NUM_CCs; CC_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