Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
O
OpenXG-RAN
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
zzha zzha
OpenXG-RAN
Commits
4eac17e1
Commit
4eac17e1
authored
May 20, 2022
by
Roberto Louro Magueta
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix in RI computation
parent
7018b7c8
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
31 additions
and
2 deletions
+31
-2
openair1/PHY/NR_UE_TRANSPORT/csi_rx.c
openair1/PHY/NR_UE_TRANSPORT/csi_rx.c
+31
-2
No files found.
openair1/PHY/NR_UE_TRANSPORT/csi_rx.c
View file @
4eac17e1
...
...
@@ -340,7 +340,7 @@ int nr_csi_rs_ri_estimation(PHY_VARS_NR_UE *ue,
uint8_t
*
rank_indicator
)
{
NR_DL_FRAME_PARMS
*
frame_parms
=
&
ue
->
frame_parms
;
int16_t
cond_dB_threshold
=
0
;
int16_t
cond_dB_threshold
=
5
;
int
count
=
0
;
*
rank_indicator
=
0
;
...
...
@@ -357,6 +357,8 @@ int nr_csi_rs_ri_estimation(PHY_VARS_NR_UE *ue,
* | conjch01 conjch11 | | ch10 ch11 | | conjch01*ch00+conjch11*ch10 conjch01*ch01+conjch11*ch11 |
*/
uint8_t
sum_shift
=
1
;
// log2(2x2) = 2, which is a shift of 1 bit
for
(
uint16_t
port_tx_conjch
=
0
;
port_tx_conjch
<
nr_csi_rs_info
->
N_ports
;
port_tx_conjch
++
)
{
for
(
uint16_t
port_tx_ch
=
0
;
port_tx_ch
<
nr_csi_rs_info
->
N_ports
;
port_tx_ch
++
)
{
memset
(
nr_csi_rs_info
->
csi_rs_estimated_A_MF
[
port_tx_conjch
][
port_tx_ch
],
0
,
NR_MAX_OFDM_SYMBOL_SIZE
*
sizeof
(
int32_t
));
...
...
@@ -413,11 +415,33 @@ int nr_csi_rs_ri_estimation(PHY_VARS_NR_UE *ue,
&
nr_csi_rs_info
->
csi_rs_estimated_numer_fin
[
k
],
1
);
#ifdef NR_CSIRS_DEBUG
for
(
uint16_t
port_tx_conjch
=
0
;
port_tx_conjch
<
nr_csi_rs_info
->
N_ports
;
port_tx_conjch
++
)
{
for
(
uint16_t
port_tx_ch
=
0
;
port_tx_ch
<
nr_csi_rs_info
->
N_ports
;
port_tx_ch
++
)
{
int16_t
*
csi_rs_estimated_A_MF
=
(
int16_t
*
)
&
nr_csi_rs_info
->
csi_rs_estimated_A_MF
[
port_tx_conjch
][
port_tx_ch
][
k
];
LOG_I
(
NR_PHY
,
"(%i) csi_rs_estimated_A_MF[%i][%i] = (%i, %i)
\n
"
,
k
,
port_tx_conjch
,
port_tx_ch
,
csi_rs_estimated_A_MF
[
0
],
csi_rs_estimated_A_MF
[
1
]);
int16_t
*
csi_rs_estimated_A_MF_sq
=
(
int16_t
*
)
&
nr_csi_rs_info
->
csi_rs_estimated_A_MF_sq
[
port_tx_conjch
][
port_tx_ch
][
k
];
LOG_I
(
NR_PHY
,
"(%i) csi_rs_estimated_A_MF_sq[%i][%i] = (%i, %i)
\n
"
,
k
,
port_tx_conjch
,
port_tx_ch
,
csi_rs_estimated_A_MF_sq
[
0
],
csi_rs_estimated_A_MF_sq
[
1
]);
}
}
LOG_I
(
NR_PHY
,
"(%i) csi_rs_estimated_determ_fin = %i
\n
"
,
k
,
nr_csi_rs_info
->
csi_rs_estimated_determ_fin
[
k
]);
LOG_I
(
NR_PHY
,
"(%i) csi_rs_estimated_numer_fin = %i
\n
"
,
k
,
nr_csi_rs_info
->
csi_rs_estimated_numer_fin
[
k
]
>>
sum_shift
);
#endif
// compute the conditional number
for
(
int
sc_idx
=
0
;
sc_idx
<
NR_NB_SC_PER_RB
;
sc_idx
++
)
{
int8_t
csi_rs_estimated_denum_db
=
dB_fixed
(
nr_csi_rs_info
->
csi_rs_estimated_determ_fin
[
k
+
sc_idx
]);
int8_t
csi_rs_estimated_numer_db
=
dB_fixed
(
nr_csi_rs_info
->
csi_rs_estimated_numer_fin
[
k
+
sc_idx
]);
int8_t
csi_rs_estimated_numer_db
=
dB_fixed
(
nr_csi_rs_info
->
csi_rs_estimated_numer_fin
[
k
+
sc_idx
]
>>
sum_shift
);
int8_t
cond_db
=
csi_rs_estimated_numer_db
-
csi_rs_estimated_denum_db
;
#ifdef NR_CSIRS_DEBUG
LOG_I
(
NR_PHY
,
"csi_rs_estimated_denum_db = %i
\n
"
,
csi_rs_estimated_denum_db
);
LOG_I
(
NR_PHY
,
"csi_rs_estimated_numer_db = %i
\n
"
,
csi_rs_estimated_numer_db
);
LOG_I
(
NR_PHY
,
"cond_db = %i
\n
"
,
cond_db
);
#endif
if
(
cond_db
<
cond_dB_threshold
)
{
count
++
;
}
else
{
...
...
@@ -431,6 +455,11 @@ int nr_csi_rs_ri_estimation(PHY_VARS_NR_UE *ue,
*
rank_indicator
=
1
;
}
#ifdef NR_CSIRS_DEBUG
LOG_I
(
NR_PHY
,
"count = %i
\n
"
,
count
);
LOG_I
(
NR_PHY
,
"rank = %i
\n
"
,
(
*
rank_indicator
)
+
1
);
#endif
return
0
;
}
...
...
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