Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
O
OpenXG UE
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
OpenXG
OpenXG UE
Commits
e6ab8b66
Commit
e6ab8b66
authored
Feb 13, 2019
by
Florian Kaltenberger
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
added visualization of PDCCH channel estimate to phy_scope_UE.
parent
8a05e376
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
43 additions
and
36 deletions
+43
-36
openair1/PHY/TOOLS/nr_phy_scope.c
openair1/PHY/TOOLS/nr_phy_scope.c
+42
-35
targets/RT/USER/nr-ue.c
targets/RT/USER/nr-ue.c
+1
-1
No files found.
openair1/PHY/TOOLS/nr_phy_scope.c
View file @
e6ab8b66
...
...
@@ -498,10 +498,8 @@ void phy_scope_UE(FD_lte_phy_scope_ue *form,
float
**
rxsig_t_dB
;
float
*
time
;
float
*
corr
;
/*
int16_t
**
chest_t
;
int16_t
**
chest_f
;
*/
int16_t
*
pdsch_llr
;
int16_t
*
pdsch_comp
;
//int16_t *pdsch_mag;
...
...
@@ -519,10 +517,13 @@ void phy_scope_UE(FD_lte_phy_scope_ue *form,
int
coded_bits_per_codeword
=
num_re
*
Qm
;
int
symbol
,
first_symbol
,
nb_re
;
int
nb_rb_pdsch
=
50
;
float
ymax
=
1
;
float
**
chest_t_abs
;
float
Re
,
Im
;
float
*
chest_f_abs
;
float
*
freq
;
static
int
overlay
=
0
;
/*
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 mcs = 0;
unsigned char harq_pid = 0;
...
...
@@ -565,15 +566,15 @@ void phy_scope_UE(FD_lte_phy_scope_ue *form,
*/
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
++
)
{
chest_t_abs
[
arx
]
=
(
float
*
)
calloc
(
frame_parms
->
ofdm_symbol_size
,
sizeof
(
float
));
}
chest_f_abs = (float*) calloc(
nsymb_ce*nb_antennas_rx*nb_antennas_tx
,sizeof(float));
*/
chest_f_abs
=
(
float
*
)
calloc
(
frame_parms
->
ofdm_symbol_size
,
sizeof
(
float
));
freq
=
(
float
*
)
calloc
(
frame_parms
->
ofdm_symbol_size
,
sizeof
(
float
));
llr
=
(
float
*
)
calloc
(
coded_bits_per_codeword
,
sizeof
(
float
));
// init to zero
bit
=
malloc
(
coded_bits_per_codeword
*
sizeof
(
float
));
...
...
@@ -589,10 +590,9 @@ 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
=
(
int16_t
*
)
phy_vars_ue
->
pbch_vars
[
eNB_id
]
->
llr
;
pbch_comp
=
(
int16_t
*
)
phy_vars_ue
->
pbch_vars
[
eNB_id
]
->
rxdataF_comp
[
0
];
...
...
@@ -628,29 +628,37 @@ void phy_scope_UE(FD_lte_phy_scope_ue *form,
}
if
(
phy_vars_ue
->
is_synchronized
==
0
)
{
for
(
ind
=
0
;
ind
<
3
;
ind
++
)
{
if
(
pss_corr_ue
[
ind
])
{
for
(
i
=
0
;
i
<
samples_per_frame
;
i
++
)
{
corr
[
i
]
=
(
float
)
pss_corr_ue
[
ind
][
i
];
time
[
i
]
=
(
float
)
i
;
for
(
ind
=
0
;
ind
<
3
;
ind
++
)
{
if
(
pss_corr_ue
[
ind
])
{
for
(
i
=
0
;
i
<
samples_per_frame
;
i
++
)
{
corr
[
i
]
=
(
float
)
pss_corr_ue
[
ind
][
i
];
time
[
i
]
=
(
float
)
i
;
}
if
(
ind
==
0
)
fl_set_xyplot_data
(
form
->
chest_t
,
time
,
corr
,
samples_per_frame
,
""
,
""
,
""
);
else
fl_add_xyplot_overlay
(
form
->
chest_t
,
ind
,
time
,
corr
,
samples_per_frame
,
rx_antenna_colors
[
ind
]);
overlay
=
1
;
}
if
(
ind
==
0
)
fl_set_xyplot_data
(
form
->
chest_t
,
time
,
corr
,
samples_per_frame
,
""
,
""
,
""
);
else
fl_add_xyplot_overlay
(
form
->
chest_t
,
ind
,
time
,
corr
,
samples_per_frame
,
rx_antenna_colors
[
ind
]);
}
}
}
else
{
if
(
overlay
)
{
//there was a previous overlay
fl_clear_xyplot
(
form
->
chest_t
);
overlay
=
0
;
}
/*
// Channel Impulse Response (still repeated format)
// Channel Impulse Response
if
(
chest_t
!=
NULL
)
{
ymax
=
0
;
if
(
chest_t
[
0
]
!=
NULL
)
{
for
(
i
=
0
;
i
<
(
frame_parms
->
ofdm_symbol_size
>>
3
);
i
++
)
{
chest_t_abs[0][i] = (float) (chest_t[0][4*i]*chest_t[0][4*i]+chest_t[0][4*i+1]*chest_t[0][4*i+1]);
chest_t_abs
[
0
][
i
]
=
(
float
)
(
chest_t
[
0
][
2
*
i
]
*
chest_t
[
0
][
2
*
i
]
+
chest_t
[
0
][
2
*
i
+
1
]
*
chest_t
[
0
][
2
*
i
+
1
]);
time
[
i
]
=
(
float
)
i
;
if
(
chest_t_abs
[
0
][
i
]
>
ymax
)
ymax
=
chest_t_abs
[
0
][
i
];
...
...
@@ -658,7 +666,7 @@ void phy_scope_UE(FD_lte_phy_scope_ue *form,
fl_set_xyplot_data
(
form
->
chest_t
,
time
,
chest_t_abs
[
0
],(
frame_parms
->
ofdm_symbol_size
>>
3
),
""
,
""
,
""
);
}
/*
for (arx=1; arx<nb_antennas_rx; arx++) {
if (chest_t[arx] !=NULL) {
for (i=0; i<(frame_parms->ofdm_symbol_size>>3); i++) {
...
...
@@ -672,11 +680,12 @@ void phy_scope_UE(FD_lte_phy_scope_ue *form,
fl_set_xyplot_overlay_type(form->chest_t,arx,FL_DASHED_XYPLOT);
}
}
*/
// Avoid flickering effect
// fl_get_xyplot_ybounds(form->chest_t,&ymin,&ymax); // Does not always work...
fl_set_xyplot_ybounds
(
form
->
chest_t
,
0
,(
double
)
ymax
);
}
}
// Channel Frequency Response (includes 5 complex sample for filter)
if
(
chest_f
!=
NULL
)
{
...
...
@@ -685,7 +694,7 @@ void phy_scope_UE(FD_lte_phy_scope_ue *form,
for
(
atx
=
0
;
atx
<
nb_antennas_tx
;
atx
++
)
{
for
(
arx
=
0
;
arx
<
nb_antennas_rx
;
arx
++
)
{
if
(
chest_f
[(
atx
<<
1
)
+
arx
]
!=
NULL
)
{
for (k=0; k<
nsymb_c
e; k++) {
for
(
k
=
0
;
k
<
frame_parms
->
ofdm_symbol_siz
e
;
k
++
)
{
freq
[
ind
]
=
(
float
)
ind
;
Re
=
(
float
)(
chest_f
[(
atx
<<
1
)
+
arx
][(
2
*
k
)]);
Im
=
(
float
)(
chest_f
[(
atx
<<
1
)
+
arx
][(
2
*
k
)
+
1
]);
...
...
@@ -698,12 +707,13 @@ void phy_scope_UE(FD_lte_phy_scope_ue *form,
}
// tx antenna 0
fl_set_xyplot_xbounds(form->chest_f,0,nb_antennas_rx*nb_antennas_tx*nsymb_ce);
//
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);
fl_set_xyplot_data(form->chest_f,freq,chest_f_abs,
nsymb_c
e,"","","");
//
fl_set_xyplot_xgrid(form->chest_f,FL_GRID_MAJOR);
fl_set_xyplot_data
(
form
->
chest_f
,
freq
,
chest_f_abs
,
frame_parms
->
ofdm_symbol_siz
e
,
""
,
""
,
""
);
/*
for (arx=1; arx<nb_antennas_rx; arx++) {
fl_add_xyplot_overlay(form->chest_f,1,&freq[arx*nsymb_ce],&chest_f_abs[arx*nsymb_ce],nsymb_ce,rx_antenna_colors[arx]);
}
...
...
@@ -722,8 +732,8 @@ void phy_scope_UE(FD_lte_phy_scope_ue *form,
fl_add_xyplot_overlay(form->chest_f,atx,&freq[atx*nsymb_ce],&chest_f_abs[atx*nsymb_ce],nsymb_ce,rx_antenna_colors[arx]);
}
}
*/
}
*/
// PBCH LLRs
if
(
pbch_llr
!=
NULL
)
{
...
...
@@ -735,10 +745,7 @@ void phy_scope_UE(FD_lte_phy_scope_ue *form,
fl_set_xyplot_data
(
form
->
pbch_llr
,
bit_pbch
,
llr_pbch
,
864
,
""
,
""
,
""
);
}
if
(
phy_vars_ue
->
is_synchronized
==
1
)
first_symbol
=
5
;
else
first_symbol
=
1
;
first_symbol
=
1
;
// PBCH I/Q of MF Output
if
(
pbch_comp
!=
NULL
)
{
...
...
targets/RT/USER/nr-ue.c
View file @
e6ab8b66
...
...
@@ -602,7 +602,7 @@ static void *UE_thread_synch(void *arg) {
phy_scope_UE(form_ue[0],
PHY_vars_UE_g[0][0],
0,0,
7
);
0,0,
1
);
}
#endif
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment