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
lizhongxiao
OpenXG-RAN
Commits
bdff42cf
Commit
bdff42cf
authored
May 09, 2022
by
Roberto Louro Magueta
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Compute and fill wide_band_snr field for SRS indication
parent
d9148178
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
14 additions
and
6 deletions
+14
-6
openair1/PHY/INIT/nr_init.c
openair1/PHY/INIT/nr_init.c
+1
-0
openair1/PHY/NR_ESTIMATION/nr_ul_channel_estimation.c
openair1/PHY/NR_ESTIMATION/nr_ul_channel_estimation.c
+5
-2
openair1/PHY/NR_ESTIMATION/nr_ul_estimation.h
openair1/PHY/NR_ESTIMATION/nr_ul_estimation.h
+2
-1
openair1/PHY/defs_nr_common.h
openair1/PHY/defs_nr_common.h
+1
-0
openair1/SCHED_NR/phy_procedures_nr_gNB.c
openair1/SCHED_NR/phy_procedures_nr_gNB.c
+5
-3
No files found.
openair1/PHY/INIT/nr_init.c
View file @
bdff42cf
...
...
@@ -622,6 +622,7 @@ int phy_init_nr_gNB(PHY_VARS_gNB *gNB,
gNB
->
nr_srs_info
[
id
]
->
noise_power_per_rb
=
(
uint32_t
*
)
malloc16_clear
(
fp
->
N_RB_UL
*
sizeof
(
uint32_t
));
gNB
->
nr_srs_info
[
id
]
->
noise_power
=
(
uint32_t
*
)
malloc16_clear
(
sizeof
(
uint32_t
));
gNB
->
nr_srs_info
[
id
]
->
snr_per_rb
=
(
int8_t
*
)
malloc16_clear
(
fp
->
N_RB_UL
*
sizeof
(
int8_t
));
gNB
->
nr_srs_info
[
id
]
->
snr
=
(
int8_t
*
)
malloc16_clear
(
sizeof
(
int8_t
));
gNB
->
nr_srs_info
[
id
]
->
srs_received_signal
=
(
int32_t
**
)
malloc16
(
Prx
*
sizeof
(
int32_t
*
));
gNB
->
nr_srs_info
[
id
]
->
srs_ls_estimated_channel
=
(
int32_t
**
)
malloc16
(
Prx
*
sizeof
(
int32_t
*
));
gNB
->
nr_srs_info
[
id
]
->
srs_estimated_channel_freq
=
(
int32_t
**
)
malloc16
(
Prx
*
sizeof
(
int32_t
*
));
...
...
openair1/PHY/NR_ESTIMATION/nr_ul_channel_estimation.c
View file @
bdff42cf
...
...
@@ -1102,7 +1102,8 @@ int nr_srs_channel_estimation(PHY_VARS_gNB *gNB,
uint32_t
*
signal_power
,
uint32_t
*
noise_power_per_rb
,
uint32_t
*
noise_power
,
int8_t
*
snr_per_rb
)
{
int8_t
*
snr_per_rb
,
int8_t
*
snr
)
{
if
(
nr_srs_info
->
sc_list_length
==
0
)
{
LOG_E
(
NR_PHY
,
"(%d.%d) nr_srs_info was not generated yet!
\n
"
,
frame
,
slot
);
...
...
@@ -1283,6 +1284,8 @@ int nr_srs_channel_estimation(PHY_VARS_gNB *gNB,
*
noise_power
=
calc_power
(
noise_real
,
frame_parms
->
nb_antennas_rx
*
nr_srs_info
->
sc_list_length
)
+
calc_power
(
noise_imag
,
frame_parms
->
nb_antennas_rx
*
nr_srs_info
->
sc_list_length
);
*
snr
=
dB_fixed
((
int32_t
)((
*
signal_power
<<
factor_bits
)
/
(
*
noise_power
)))
-
factor_dB
;
#ifdef SRS_DEBUG
uint64_t
subcarrier_offset
=
frame_parms
->
first_carrier_offset
+
srs_pdu
->
bwp_start
*
12
;
uint8_t
R
=
srs_pdu
->
comb_size
==
0
?
2
:
4
;
...
...
@@ -1312,7 +1315,7 @@ int nr_srs_channel_estimation(PHY_VARS_gNB *gNB,
}
}
LOG_I
(
NR_PHY
,
"noise_power = %u
\n
"
,
*
noise_powe
r
);
LOG_I
(
NR_PHY
,
"noise_power = %u
, SNR = %i dB
\n
"
,
*
noise_power
,
*
sn
r
);
#endif
return
0
;
...
...
openair1/PHY/NR_ESTIMATION/nr_ul_estimation.h
View file @
bdff42cf
...
...
@@ -76,5 +76,6 @@ int nr_srs_channel_estimation(PHY_VARS_gNB *gNB,
uint32_t
*
signal_power
,
uint32_t
*
noise_power_per_rb
,
uint32_t
*
noise_power
,
int8_t
*
snr_per_rb
);
int8_t
*
snr_per_rb
,
int8_t
*
snr
);
#endif
openair1/PHY/defs_nr_common.h
View file @
bdff42cf
...
...
@@ -248,6 +248,7 @@ typedef struct {
uint32_t
*
noise_power_per_rb
;
uint32_t
*
noise_power
;
int8_t
*
snr_per_rb
;
int8_t
*
snr
;
}
nr_srs_info_t
;
typedef
struct
NR_DL_FRAME_PARMS
NR_DL_FRAME_PARMS
;
...
...
openair1/SCHED_NR/phy_procedures_nr_gNB.c
View file @
bdff42cf
...
...
@@ -862,7 +862,8 @@ int phy_procedures_gNB_uespec_RX(PHY_VARS_gNB *gNB, int frame_rx, int slot_rx) {
gNB
->
nr_srs_info
[
i
]
->
signal_power
,
gNB
->
nr_srs_info
[
i
]
->
noise_power_per_rb
,
gNB
->
nr_srs_info
[
i
]
->
noise_power
,
gNB
->
nr_srs_info
[
i
]
->
snr_per_rb
);
gNB
->
nr_srs_info
[
i
]
->
snr_per_rb
,
gNB
->
nr_srs_info
[
i
]
->
snr
);
T
(
T_GNB_PHY_UL_FREQ_CHANNEL_ESTIMATE
,
T_INT
(
0
),
T_INT
(
srs_pdu
->
rnti
),
T_INT
(
frame_rx
),
T_INT
(
0
),
T_INT
(
0
),
T_BUFFER
(
gNB
->
nr_srs_info
[
i
]
->
srs_estimated_channel_freq
[
0
],
gNB
->
frame_parms
.
ofdm_symbol_size
*
sizeof
(
int32_t
)));
...
...
@@ -874,11 +875,11 @@ int phy_procedures_gNB_uespec_RX(PHY_VARS_gNB *gNB, int frame_rx, int slot_rx) {
gNB
->
UL_INFO
.
srs_ind
.
pdu_list
=
&
gNB
->
srs_pdu_list
[
0
];
gNB
->
UL_INFO
.
srs_ind
.
sfn
=
frame_rx
;
gNB
->
UL_INFO
.
srs_ind
.
slot
=
slot_rx
;
//gNB->srs_pdu_list[num_srs].
handle;
gNB
->
srs_pdu_list
[
num_srs
].
handle
=
srs_pdu
->
handle
;
gNB
->
srs_pdu_list
[
num_srs
].
rnti
=
srs_pdu
->
rnti
;
//gNB->srs_pdu_list[num_srs].timing_advance;
gNB
->
srs_pdu_list
[
num_srs
].
num_symbols
=
1
<<
srs_pdu
->
num_symbols
;
//gNB->srs_pdu_list[num_srs].wide_band_snr
;
gNB
->
srs_pdu_list
[
num_srs
].
wide_band_snr
=
(
*
gNB
->
nr_srs_info
[
i
]
->
snr
+
64
)
<<
1
;
gNB
->
srs_pdu_list
[
num_srs
].
num_reported_symbols
=
1
<<
srs_pdu
->
num_symbols
;
if
(
!
gNB
->
srs_pdu_list
[
num_srs
].
reported_symbol_list
)
{
gNB
->
srs_pdu_list
[
num_srs
].
reported_symbol_list
=
(
nfapi_nr_srs_indication_reported_symbol_t
*
)
calloc
(
1
,
gNB
->
srs_pdu_list
[
num_srs
].
num_reported_symbols
*
sizeof
(
nfapi_nr_srs_indication_reported_symbol_t
));
...
...
@@ -895,6 +896,7 @@ int phy_procedures_gNB_uespec_RX(PHY_VARS_gNB *gNB, int frame_rx, int slot_rx) {
LOG_I
(
NR_PHY
,
"gNB->UL_INFO.srs_ind.slot = %i
\n
"
,
gNB
->
UL_INFO
.
srs_ind
.
slot
);
LOG_I
(
NR_PHY
,
"gNB->srs_pdu_list[%i].rnti = 0x%04x
\n
"
,
num_srs
,
gNB
->
srs_pdu_list
[
num_srs
].
rnti
);
LOG_I
(
NR_PHY
,
"gNB->srs_pdu_list[%i].num_symbols = %i
\n
"
,
num_srs
,
gNB
->
srs_pdu_list
[
num_srs
].
num_symbols
);
LOG_I
(
NR_PHY
,
"gNB->srs_pdu_list[%i].wide_band_snr = %i
\n
"
,
num_srs
,
gNB
->
srs_pdu_list
[
num_srs
].
wide_band_snr
);
LOG_I
(
NR_PHY
,
"gNB->srs_pdu_list[%i].num_reported_symbols = %i
\n
"
,
num_srs
,
gNB
->
srs_pdu_list
[
num_srs
].
num_reported_symbols
);
LOG_I
(
NR_PHY
,
"gNB->srs_pdu_list[%i].reported_symbol_list[0].num_rbs = %i
\n
"
,
num_srs
,
gNB
->
srs_pdu_list
[
num_srs
].
reported_symbol_list
[
0
].
num_rbs
);
for
(
int
rb
=
0
;
rb
<
gNB
->
srs_pdu_list
[
num_srs
].
reported_symbol_list
[
0
].
num_rbs
;
rb
++
)
{
...
...
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