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
spbro
OpenXG-RAN
Commits
f7a34d42
Commit
f7a34d42
authored
Dec 16, 2022
by
Roberto Louro Magueta
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Rename some variables
parent
4c6a1c72
Changes
2
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
79 additions
and
79 deletions
+79
-79
openair1/SCHED_NR/phy_procedures_nr_gNB.c
openair1/SCHED_NR/phy_procedures_nr_gNB.c
+42
-42
openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_ulsch.c
openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_ulsch.c
+37
-37
No files found.
openair1/SCHED_NR/phy_procedures_nr_gNB.c
View file @
f7a34d42
This diff is collapsed.
Click to expand it.
openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_ulsch.c
View file @
f7a34d42
...
...
@@ -1181,31 +1181,31 @@ void handle_nr_srs_measurements(const module_id_t module_id,
switch
(
srs_ind
->
srs_usage
)
{
case
NR_SRS_ResourceSet__usage_beamManagement
:
{
nfapi_nr_srs_beamforming_report_t
nr_srs_b
eamforming
_report
;
nfapi_nr_srs_beamforming_report_t
nr_srs_b
f
_report
;
unpack_nr_srs_beamforming_report
(
srs_ind
->
report_tlv
->
value
,
srs_ind
->
report_tlv
->
length
,
&
nr_srs_b
eamforming
_report
,
&
nr_srs_b
f
_report
,
sizeof
(
nfapi_nr_srs_beamforming_report_t
));
if
(
nr_srs_b
eamforming
_report
.
wide_band_snr
==
0xFF
)
{
if
(
nr_srs_b
f
_report
.
wide_band_snr
==
0xFF
)
{
LOG_W
(
NR_MAC
,
"Invalid wide_band_snr for RNTI %04x
\n
"
,
srs_ind
->
rnti
);
return
;
}
int
wide_band_snr_dB
=
(
nr_srs_b
eamforming
_report
.
wide_band_snr
>>
1
)
-
64
;
int
wide_band_snr_dB
=
(
nr_srs_b
f
_report
.
wide_band_snr
>>
1
)
-
64
;
#ifdef SRS_IND_DEBUG
LOG_I
(
NR_MAC
,
"nr_srs_b
eamforming_report.prg_size = %i
\n
"
,
nr_srs_beamforming
_report
.
prg_size
);
LOG_I
(
NR_MAC
,
"nr_srs_b
eamforming_report.num_symbols = %i
\n
"
,
nr_srs_beamforming
_report
.
num_symbols
);
LOG_I
(
NR_MAC
,
"nr_srs_b
eamforming_report.wide_band_snr = %i (%i dB)
\n
"
,
nr_srs_beamforming
_report
.
wide_band_snr
,
wide_band_snr_dB
);
LOG_I
(
NR_MAC
,
"nr_srs_b
eamforming_report.num_reported_symbols = %i
\n
"
,
nr_srs_beamforming
_report
.
num_reported_symbols
);
LOG_I
(
NR_MAC
,
"nr_srs_b
eamforming_report.prgs[0].num_prgs = %i
\n
"
,
nr_srs_beamforming
_report
.
prgs
[
0
].
num_prgs
);
for
(
int
prg_idx
=
0
;
prg_idx
<
nr_srs_b
eamforming
_report
.
prgs
[
0
].
num_prgs
;
prg_idx
++
)
{
LOG_I
(
NR_MAC
,
"nr_srs_b
f_report.prg_size = %i
\n
"
,
nr_srs_bf
_report
.
prg_size
);
LOG_I
(
NR_MAC
,
"nr_srs_b
f_report.num_symbols = %i
\n
"
,
nr_srs_bf
_report
.
num_symbols
);
LOG_I
(
NR_MAC
,
"nr_srs_b
f_report.wide_band_snr = %i (%i dB)
\n
"
,
nr_srs_bf
_report
.
wide_band_snr
,
wide_band_snr_dB
);
LOG_I
(
NR_MAC
,
"nr_srs_b
f_report.num_reported_symbols = %i
\n
"
,
nr_srs_bf
_report
.
num_reported_symbols
);
LOG_I
(
NR_MAC
,
"nr_srs_b
f_report.prgs[0].num_prgs = %i
\n
"
,
nr_srs_bf
_report
.
prgs
[
0
].
num_prgs
);
for
(
int
prg_idx
=
0
;
prg_idx
<
nr_srs_b
f
_report
.
prgs
[
0
].
num_prgs
;
prg_idx
++
)
{
LOG_I
(
NR_MAC
,
"nr_srs_b
eamforming
_report.prgs[0].prg_list[%3i].rb_snr = %i (%i dB)
\n
"
,
"nr_srs_b
f
_report.prgs[0].prg_list[%3i].rb_snr = %i (%i dB)
\n
"
,
prg_idx
,
nr_srs_b
eamforming
_report
.
prgs
[
0
].
prg_list
[
prg_idx
].
rb_snr
,
(
nr_srs_b
eamforming
_report
.
prgs
[
0
].
prg_list
[
prg_idx
].
rb_snr
>>
1
)
-
64
);
nr_srs_b
f
_report
.
prgs
[
0
].
prg_list
[
prg_idx
].
rb_snr
,
(
nr_srs_b
f
_report
.
prgs
[
0
].
prg_list
[
prg_idx
].
rb_snr
>>
1
)
-
64
);
}
#endif
...
...
@@ -1214,10 +1214,10 @@ void handle_nr_srs_measurements(const module_id_t module_id,
const
int
ul_prbblack_SNR_threshold
=
nr_mac
->
ul_prbblack_SNR_threshold
;
uint16_t
*
ulprbbl
=
nr_mac
->
ulprbbl
;
uint16_t
num_rbs
=
nr_srs_b
eamforming_report
.
prg_size
*
nr_srs_beamforming
_report
.
prgs
[
0
].
num_prgs
;
uint16_t
num_rbs
=
nr_srs_b
f_report
.
prg_size
*
nr_srs_bf
_report
.
prgs
[
0
].
num_prgs
;
memset
(
ulprbbl
,
0
,
num_rbs
*
sizeof
(
uint16_t
));
for
(
int
rb
=
0
;
rb
<
num_rbs
;
rb
++
)
{
int
snr
=
(
nr_srs_b
eamforming_report
.
prgs
[
0
].
prg_list
[
rb
/
nr_srs_beamforming
_report
.
prg_size
].
rb_snr
>>
1
)
-
64
;
int
snr
=
(
nr_srs_b
f_report
.
prgs
[
0
].
prg_list
[
rb
/
nr_srs_bf
_report
.
prg_size
].
rb_snr
>>
1
)
-
64
;
if
(
snr
<
wide_band_snr_dB
-
ul_prbblack_SNR_threshold
)
{
ulprbbl
[
rb
]
=
0x3FFF
;
// all symbols taken
}
...
...
@@ -1228,31 +1228,31 @@ void handle_nr_srs_measurements(const module_id_t module_id,
}
case
NR_SRS_ResourceSet__usage_codebook
:
{
nfapi_nr_srs_normalized_channel_iq_matrix_t
nr_srs_
normalized_
channel_iq_matrix
;
nfapi_nr_srs_normalized_channel_iq_matrix_t
nr_srs_channel_iq_matrix
;
unpack_nr_srs_normalized_channel_iq_matrix
(
srs_ind
->
report_tlv
->
value
,
srs_ind
->
report_tlv
->
length
,
&
nr_srs_
normalized_
channel_iq_matrix
,
&
nr_srs_channel_iq_matrix
,
sizeof
(
nfapi_nr_srs_normalized_channel_iq_matrix_t
));
#ifdef SRS_IND_DEBUG
LOG_I
(
NR_MAC
,
"nr_srs_
normalized_channel_iq_matrix.normalized_iq_representation = %i
\n
"
,
nr_srs_normalized
_channel_iq_matrix
.
normalized_iq_representation
);
LOG_I
(
NR_MAC
,
"nr_srs_
normalized_channel_iq_matrix.num_gnb_antenna_elements = %i
\n
"
,
nr_srs_normalized
_channel_iq_matrix
.
num_gnb_antenna_elements
);
LOG_I
(
NR_MAC
,
"nr_srs_
normalized_channel_iq_matrix.num_ue_srs_ports = %i
\n
"
,
nr_srs_normalized
_channel_iq_matrix
.
num_ue_srs_ports
);
LOG_I
(
NR_MAC
,
"nr_srs_
normalized_channel_iq_matrix.prg_size = %i
\n
"
,
nr_srs_normalized
_channel_iq_matrix
.
prg_size
);
LOG_I
(
NR_MAC
,
"nr_srs_
normalized_channel_iq_matrix.num_prgs = %i
\n
"
,
nr_srs_normalized
_channel_iq_matrix
.
num_prgs
);
c16_t
*
channel_matrix16
=
(
c16_t
*
)
nr_srs_
normalized_
channel_iq_matrix
.
channel_matrix
;
c8_t
*
channel_matrix8
=
(
c8_t
*
)
nr_srs_
normalized_
channel_iq_matrix
.
channel_matrix
;
for
(
int
uI
=
0
;
uI
<
nr_srs_
normalized_
channel_iq_matrix
.
num_ue_srs_ports
;
uI
++
)
{
for
(
int
gI
=
0
;
gI
<
nr_srs_
normalized_
channel_iq_matrix
.
num_gnb_antenna_elements
;
gI
++
)
{
for
(
int
pI
=
0
;
pI
<
nr_srs_
normalized_
channel_iq_matrix
.
num_prgs
;
pI
++
)
{
uint16_t
index
=
uI
*
nr_srs_
normalized_channel_iq_matrix
.
num_gnb_antenna_elements
*
nr_srs_normalized_channel_iq_matrix
.
num_prgs
+
gI
*
nr_srs_normalized
_channel_iq_matrix
.
num_prgs
+
pI
;
LOG_I
(
NR_MAC
,
"nr_srs_
channel_iq_matrix.normalized_iq_representation = %i
\n
"
,
nr_srs
_channel_iq_matrix
.
normalized_iq_representation
);
LOG_I
(
NR_MAC
,
"nr_srs_
channel_iq_matrix.num_gnb_antenna_elements = %i
\n
"
,
nr_srs
_channel_iq_matrix
.
num_gnb_antenna_elements
);
LOG_I
(
NR_MAC
,
"nr_srs_
channel_iq_matrix.num_ue_srs_ports = %i
\n
"
,
nr_srs
_channel_iq_matrix
.
num_ue_srs_ports
);
LOG_I
(
NR_MAC
,
"nr_srs_
channel_iq_matrix.prg_size = %i
\n
"
,
nr_srs
_channel_iq_matrix
.
prg_size
);
LOG_I
(
NR_MAC
,
"nr_srs_
channel_iq_matrix.num_prgs = %i
\n
"
,
nr_srs
_channel_iq_matrix
.
num_prgs
);
c16_t
*
channel_matrix16
=
(
c16_t
*
)
nr_srs_channel_iq_matrix
.
channel_matrix
;
c8_t
*
channel_matrix8
=
(
c8_t
*
)
nr_srs_channel_iq_matrix
.
channel_matrix
;
for
(
int
uI
=
0
;
uI
<
nr_srs_channel_iq_matrix
.
num_ue_srs_ports
;
uI
++
)
{
for
(
int
gI
=
0
;
gI
<
nr_srs_channel_iq_matrix
.
num_gnb_antenna_elements
;
gI
++
)
{
for
(
int
pI
=
0
;
pI
<
nr_srs_channel_iq_matrix
.
num_prgs
;
pI
++
)
{
uint16_t
index
=
uI
*
nr_srs_
channel_iq_matrix
.
num_gnb_antenna_elements
*
nr_srs_channel_iq_matrix
.
num_prgs
+
gI
*
nr_srs
_channel_iq_matrix
.
num_prgs
+
pI
;
LOG_I
(
NR_MAC
,
"(uI %i, gI %i, pI %i) channel_matrix --> real %i, imag %i
\n
"
,
uI
,
gI
,
pI
,
nr_srs_
normalized_
channel_iq_matrix
.
normalized_iq_representation
==
0
?
channel_matrix8
[
index
].
r
:
channel_matrix16
[
index
].
r
,
nr_srs_
normalized_
channel_iq_matrix
.
normalized_iq_representation
==
0
?
channel_matrix8
[
index
].
i
:
channel_matrix16
[
index
].
i
);
nr_srs_channel_iq_matrix
.
normalized_iq_representation
==
0
?
channel_matrix8
[
index
].
r
:
channel_matrix16
[
index
].
r
,
nr_srs_channel_iq_matrix
.
normalized_iq_representation
==
0
?
channel_matrix8
[
index
].
i
:
channel_matrix16
[
index
].
i
);
}
}
}
...
...
@@ -1262,16 +1262,16 @@ void handle_nr_srs_measurements(const module_id_t module_id,
NR_UE_UL_BWP_t
*
current_BWP
=
&
UE
->
current_UL_BWP
;
sched_ctrl
->
srs_feedback
.
sri
=
NR_SRS_SRI_0
;
nr_srs_ri_computation
(
&
nr_srs_
normalized_
channel_iq_matrix
,
current_BWP
,
&
sched_ctrl
->
srs_feedback
.
ul_ri
);
nr_srs_ri_computation
(
&
nr_srs_channel_iq_matrix
,
current_BWP
,
&
sched_ctrl
->
srs_feedback
.
ul_ri
);
sched_ctrl
->
srs_feedback
.
tpmi
=
nr_srs_tpmi_estimation
(
current_BWP
->
pusch_Config
,
current_BWP
->
transform_precoding
,
nr_srs_
normalized_
channel_iq_matrix
.
channel_matrix
,
nr_srs_
normalized_
channel_iq_matrix
.
normalized_iq_representation
,
nr_srs_
normalized_
channel_iq_matrix
.
num_gnb_antenna_elements
,
nr_srs_
normalized_
channel_iq_matrix
.
num_ue_srs_ports
,
nr_srs_
normalized_
channel_iq_matrix
.
prg_size
,
nr_srs_
normalized_
channel_iq_matrix
.
num_prgs
,
nr_srs_channel_iq_matrix
.
channel_matrix
,
nr_srs_channel_iq_matrix
.
normalized_iq_representation
,
nr_srs_channel_iq_matrix
.
num_gnb_antenna_elements
,
nr_srs_channel_iq_matrix
.
num_ue_srs_ports
,
nr_srs_channel_iq_matrix
.
prg_size
,
nr_srs_channel_iq_matrix
.
num_prgs
,
sched_ctrl
->
srs_feedback
.
ul_ri
);
sprintf
(
stats
->
srs_stats
,
"UL-RI %d, TPMI %d"
,
sched_ctrl
->
srs_feedback
.
ul_ri
+
1
,
sched_ctrl
->
srs_feedback
.
tpmi
);
...
...
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