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
d6a155a8
Commit
d6a155a8
authored
Apr 07, 2022
by
rmagueta
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
SINR in dB
parent
7286552a
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
23 additions
and
10 deletions
+23
-10
openair1/PHY/INIT/nr_init_ue.c
openair1/PHY/INIT/nr_init_ue.c
+2
-1
openair1/PHY/NR_UE_TRANSPORT/csi_rx.c
openair1/PHY/NR_UE_TRANSPORT/csi_rx.c
+19
-8
openair1/PHY/defs_nr_common.h
openair1/PHY/defs_nr_common.h
+2
-1
No files found.
openair1/PHY/INIT/nr_init_ue.c
View file @
d6a155a8
...
...
@@ -349,7 +349,8 @@ int init_nr_ue_signal(PHY_VARS_NR_UE *ue, int nb_connected_gNB)
ue
->
nr_csi_rs_info
->
rank_indicator
=
(
uint8_t
*
)
malloc16_clear
(
sizeof
(
uint8_t
));
ue
->
nr_csi_rs_info
->
i1
=
(
uint8_t
*
)
malloc16_clear
(
3
*
sizeof
(
uint8_t
));
ue
->
nr_csi_rs_info
->
i2
=
(
uint8_t
*
)
malloc16_clear
(
sizeof
(
uint8_t
));
ue
->
nr_csi_rs_info
->
precoded_sinr
=
(
uint32_t
*
)
malloc16_clear
(
sizeof
(
uint32_t
));
ue
->
nr_csi_rs_info
->
precoded_sinr_dB
=
(
uint32_t
*
)
malloc16_clear
(
sizeof
(
uint32_t
));
ue
->
nr_csi_rs_info
->
cqi
=
(
uint8_t
*
)
malloc16_clear
(
sizeof
(
uint8_t
));
ue
->
nr_csi_rs_info
->
csi_rs_generated_signal
=
(
int32_t
**
)
malloc16
(
NR_MAX_NB_PORTS
*
sizeof
(
int32_t
*
)
);
for
(
i
=
0
;
i
<
NR_MAX_NB_PORTS
;
i
++
)
{
ue
->
nr_csi_rs_info
->
csi_rs_generated_signal
[
i
]
=
(
int32_t
*
)
malloc16_clear
(
fp
->
samples_per_frame_wCP
*
sizeof
(
int32_t
));
...
...
openair1/PHY/NR_UE_TRANSPORT/csi_rx.c
View file @
d6a155a8
...
...
@@ -471,7 +471,7 @@ int nr_csi_rs_pmi_estimation(PHY_VARS_NR_UE *ue,
uint8_t
rank_indicator
,
uint8_t
*
i1
,
uint8_t
*
i2
,
uint32_t
*
precoded_sinr
)
{
uint32_t
*
precoded_sinr
_dB
)
{
NR_DL_FRAME_PARMS
*
frame_parms
=
&
ue
->
frame_parms
;
memset
(
i1
,
0
,
3
*
sizeof
(
uint8_t
));
...
...
@@ -498,8 +498,6 @@ int nr_csi_rs_pmi_estimation(PHY_VARS_NR_UE *ue,
int32_t
sum2_im
[
4
]
=
{
0
};
int32_t
tested_precoded_sinr
[
4
]
=
{
0
};
uint16_t
shift
=
nr_csi_rs_info
->
log2_maxh
+
log2_approx
(
frame_parms
->
nb_antennas_rx
)
+
log2_approx
(
csirs_config_pdu
->
nr_of_rbs
)
-
1
;
for
(
int
rb
=
csirs_config_pdu
->
start_rb
;
rb
<
(
csirs_config_pdu
->
start_rb
+
csirs_config_pdu
->
nr_of_rbs
);
rb
++
)
{
if
(
csirs_config_pdu
->
freq_density
<=
1
&&
csirs_config_pdu
->
freq_density
!=
(
rb
%
2
))
{
...
...
@@ -552,10 +550,10 @@ int nr_csi_rs_pmi_estimation(PHY_VARS_NR_UE *ue,
i2
[
0
]
=
tested_i2
;
}
}
*
precoded_sinr
=
tested_precoded_sinr
[
i2
[
0
]]
;
*
precoded_sinr
_dB
=
dB_fixed
(
tested_precoded_sinr
[
i2
[
0
]])
;
}
else
{
i2
[
0
]
=
tested_precoded_sinr
[
0
]
+
tested_precoded_sinr
[
2
]
>
tested_precoded_sinr
[
1
]
+
tested_precoded_sinr
[
3
]
?
0
:
1
;
*
precoded_sinr
=
(
tested_precoded_sinr
[
i2
[
0
]]
+
tested_precoded_sinr
[
i2
[
0
]
+
2
]
)
>>
1
;
*
precoded_sinr
_dB
=
dB_fixed
((
tested_precoded_sinr
[
i2
[
0
]]
+
tested_precoded_sinr
[
i2
[
0
]
+
2
])
)
>>
1
;
}
}
else
{
...
...
@@ -566,6 +564,14 @@ int nr_csi_rs_pmi_estimation(PHY_VARS_NR_UE *ue,
return
0
;
}
int
nr_csi_rs_cqi_estimation
(
uint32_t
precoded_sinr
,
uint8_t
*
cqi
)
{
*
cqi
=
0
;
return
0
;
}
int
nr_ue_csi_im_procedures
(
PHY_VARS_NR_UE
*
ue
,
UE_nr_rxtx_proc_t
*
proc
,
uint8_t
gNB_id
)
{
return
0
;
}
...
...
@@ -632,12 +638,17 @@ int nr_ue_csi_rs_procedures(PHY_VARS_NR_UE *ue, UE_nr_rxtx_proc_t *proc, uint8_t
*
ue
->
nr_csi_rs_info
->
rank_indicator
,
ue
->
nr_csi_rs_info
->
i1
,
ue
->
nr_csi_rs_info
->
i2
,
ue
->
nr_csi_rs_info
->
precoded_sinr
);
ue
->
nr_csi_rs_info
->
precoded_sinr_dB
);
nr_csi_rs_cqi_estimation
(
*
ue
->
nr_csi_rs_info
->
precoded_sinr_dB
,
ue
->
nr_csi_rs_info
->
cqi
);
LOG_I
(
NR_PHY
,
"RI = %i, i1 = %i.%i.%i, i2 = %i
\n
"
,
LOG_I
(
NR_PHY
,
"RI = %i, i1 = %i.%i.%i, i2 = %i
. SINR = %i dB, CQI = %i
\n
"
,
*
ue
->
nr_csi_rs_info
->
rank_indicator
+
1
,
ue
->
nr_csi_rs_info
->
i1
[
0
],
ue
->
nr_csi_rs_info
->
i1
[
1
],
ue
->
nr_csi_rs_info
->
i1
[
2
],
ue
->
nr_csi_rs_info
->
i2
[
0
]);
ue
->
nr_csi_rs_info
->
i2
[
0
],
*
ue
->
nr_csi_rs_info
->
precoded_sinr_dB
,
*
ue
->
nr_csi_rs_info
->
cqi
);
return
0
;
}
openair1/PHY/defs_nr_common.h
View file @
d6a155a8
...
...
@@ -272,7 +272,8 @@ typedef struct {
uint8_t
*
rank_indicator
;
uint8_t
*
i1
;
uint8_t
*
i2
;
uint32_t
*
precoded_sinr
;
uint32_t
*
precoded_sinr_dB
;
uint8_t
*
cqi
;
}
nr_csi_rs_info_t
;
typedef
struct
NR_DL_FRAME_PARMS
NR_DL_FRAME_PARMS
;
...
...
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