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
dcf4fd1d
Commit
dcf4fd1d
authored
May 06, 2022
by
Roberto Louro Magueta
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Compute the noise power per RB
parent
05fffa49
Changes
5
Show whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
49 additions
and
0 deletions
+49
-0
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
+45
-0
openair1/PHY/NR_ESTIMATION/nr_ul_estimation.h
openair1/PHY/NR_ESTIMATION/nr_ul_estimation.h
+1
-0
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
+1
-0
No files found.
openair1/PHY/INIT/nr_init.c
View file @
dcf4fd1d
...
@@ -618,6 +618,7 @@ int phy_init_nr_gNB(PHY_VARS_gNB *gNB,
...
@@ -618,6 +618,7 @@ int phy_init_nr_gNB(PHY_VARS_gNB *gNB,
gNB
->
nr_srs_info
[
id
]
=
(
nr_srs_info_t
*
)
malloc16_clear
(
sizeof
(
nr_srs_info_t
));
gNB
->
nr_srs_info
[
id
]
=
(
nr_srs_info_t
*
)
malloc16_clear
(
sizeof
(
nr_srs_info_t
));
gNB
->
nr_srs_info
[
id
]
->
sc_list
=
(
uint16_t
*
)
malloc16_clear
(
6
*
fp
->
N_RB_UL
*
sizeof
(
uint16_t
));
gNB
->
nr_srs_info
[
id
]
->
sc_list
=
(
uint16_t
*
)
malloc16_clear
(
6
*
fp
->
N_RB_UL
*
sizeof
(
uint16_t
));
gNB
->
nr_srs_info
[
id
]
->
srs_generated_signal
=
(
int32_t
*
)
malloc16_clear
(
fp
->
ofdm_symbol_size
*
MAX_NUM_NR_SRS_SYMBOLS
*
sizeof
(
int32_t
));
gNB
->
nr_srs_info
[
id
]
->
srs_generated_signal
=
(
int32_t
*
)
malloc16_clear
(
fp
->
ofdm_symbol_size
*
MAX_NUM_NR_SRS_SYMBOLS
*
sizeof
(
int32_t
));
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
]
->
noise_power
=
(
uint32_t
*
)
malloc16_clear
(
sizeof
(
uint32_t
));
gNB
->
nr_srs_info
[
id
]
->
srs_received_signal
=
(
int32_t
**
)
malloc16
(
Prx
*
sizeof
(
int32_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_ls_estimated_channel
=
(
int32_t
**
)
malloc16
(
Prx
*
sizeof
(
int32_t
*
));
...
...
openair1/PHY/NR_ESTIMATION/nr_ul_channel_estimation.c
View file @
dcf4fd1d
...
@@ -1099,6 +1099,7 @@ int nr_srs_channel_estimation(PHY_VARS_gNB *gNB,
...
@@ -1099,6 +1099,7 @@ int nr_srs_channel_estimation(PHY_VARS_gNB *gNB,
int32_t
**
srs_estimated_channel_freq
,
int32_t
**
srs_estimated_channel_freq
,
int32_t
**
srs_estimated_channel_time
,
int32_t
**
srs_estimated_channel_time
,
int32_t
**
srs_estimated_channel_time_shifted
,
int32_t
**
srs_estimated_channel_time_shifted
,
uint32_t
*
noise_power_per_rb
,
uint32_t
*
noise_power
)
{
uint32_t
*
noise_power
)
{
if
(
nr_srs_info
->
sc_list_length
==
0
)
{
if
(
nr_srs_info
->
sc_list_length
==
0
)
{
...
@@ -1216,6 +1217,50 @@ int nr_srs_channel_estimation(PHY_VARS_gNB *gNB,
...
@@ -1216,6 +1217,50 @@ int nr_srs_channel_estimation(PHY_VARS_gNB *gNB,
(
gNB
->
frame_parms
.
ofdm_symbol_size
>>
1
)
*
sizeof
(
int32_t
));
(
gNB
->
frame_parms
.
ofdm_symbol_size
>>
1
)
*
sizeof
(
int32_t
));
}
}
// Compute noise power
uint64_t
subcarrier_offset
=
frame_parms
->
first_carrier_offset
+
srs_pdu
->
bwp_start
*
12
;
uint8_t
srs_symbols_per_rb
=
srs_pdu
->
comb_size
==
0
?
6
:
3
;
uint8_t
n_noise_estimates
=
frame_parms
->
nb_antennas_rx
*
srs_symbols_per_rb
;
uint8_t
count_estimates
=
0
;
uint64_t
sum_re
=
0
;
uint64_t
sum_re2
=
0
;
uint64_t
sum_im
=
0
;
uint64_t
sum_im2
=
0
;
for
(
int
sc_idx
=
0
;
sc_idx
<
nr_srs_info
->
sc_list_length
;
sc_idx
++
)
{
int
subcarrier0
=
nr_srs_info
->
sc_list
[
sc_idx
]
-
subcarrier_offset
;
if
(
subcarrier0
<
0
)
{
subcarrier0
=
subcarrier0
+
frame_parms
->
ofdm_symbol_size
;
}
int
rb
=
subcarrier0
/
NR_NB_SC_PER_RB
;
for
(
int
ant
=
0
;
ant
<
frame_parms
->
nb_antennas_rx
;
ant
++
)
{
sum_re
=
sum_re
+
noise_real
[
ant
*
nr_srs_info
->
sc_list_length
+
sc_idx
];
sum_re2
=
sum_re2
+
noise_real
[
ant
*
nr_srs_info
->
sc_list_length
+
sc_idx
]
*
noise_real
[
ant
*
nr_srs_info
->
sc_list_length
+
sc_idx
];
sum_im
=
sum_im
+
noise_imag
[
ant
*
nr_srs_info
->
sc_list_length
+
sc_idx
];
sum_im2
=
sum_im2
+
noise_imag
[
ant
*
nr_srs_info
->
sc_list_length
+
sc_idx
]
*
noise_imag
[
ant
*
nr_srs_info
->
sc_list_length
+
sc_idx
];
count_estimates
++
;
if
(
count_estimates
==
n_noise_estimates
)
{
noise_power_per_rb
[
rb
]
=
sum_re2
/
n_noise_estimates
-
(
sum_re
/
n_noise_estimates
)
*
(
sum_re
/
n_noise_estimates
)
+
sum_im2
/
n_noise_estimates
-
(
sum_im
/
n_noise_estimates
)
*
(
sum_im
/
n_noise_estimates
);
count_estimates
=
0
;
sum_re
=
0
;
sum_re2
=
0
;
sum_im
=
0
;
sum_im2
=
0
;
#ifdef SRS_DEBUG
LOG_I
(
NR_PHY
,
"noise_power_per_rb[%i] = %i
\n
"
,
rb
,
noise_power_per_rb
[
rb
]);
#endif
}
}
}
*
noise_power
=
calc_power
(
noise_real
,
frame_parms
->
nb_antennas_rx
*
nr_srs_info
->
sc_list_length
)
*
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
);
+
calc_power
(
noise_imag
,
frame_parms
->
nb_antennas_rx
*
nr_srs_info
->
sc_list_length
);
...
...
openair1/PHY/NR_ESTIMATION/nr_ul_estimation.h
View file @
dcf4fd1d
...
@@ -73,5 +73,6 @@ int nr_srs_channel_estimation(PHY_VARS_gNB *gNB,
...
@@ -73,5 +73,6 @@ int nr_srs_channel_estimation(PHY_VARS_gNB *gNB,
int32_t
**
srs_estimated_channel_freq
,
int32_t
**
srs_estimated_channel_freq
,
int32_t
**
srs_estimated_channel_time
,
int32_t
**
srs_estimated_channel_time
,
int32_t
**
srs_estimated_channel_time_shifted
,
int32_t
**
srs_estimated_channel_time_shifted
,
uint32_t
*
noise_power_per_rb
,
uint32_t
*
noise_power
);
uint32_t
*
noise_power
);
#endif
#endif
openair1/PHY/defs_nr_common.h
View file @
dcf4fd1d
...
@@ -244,6 +244,7 @@ typedef struct {
...
@@ -244,6 +244,7 @@ typedef struct {
int32_t
**
srs_estimated_channel_freq
;
int32_t
**
srs_estimated_channel_freq
;
int32_t
**
srs_estimated_channel_time
;
int32_t
**
srs_estimated_channel_time
;
int32_t
**
srs_estimated_channel_time_shifted
;
int32_t
**
srs_estimated_channel_time_shifted
;
uint32_t
*
noise_power_per_rb
;
uint32_t
*
noise_power
;
uint32_t
*
noise_power
;
}
nr_srs_info_t
;
}
nr_srs_info_t
;
...
...
openair1/SCHED_NR/phy_procedures_nr_gNB.c
View file @
dcf4fd1d
...
@@ -834,6 +834,7 @@ int phy_procedures_gNB_uespec_RX(PHY_VARS_gNB *gNB, int frame_rx, int slot_rx) {
...
@@ -834,6 +834,7 @@ int phy_procedures_gNB_uespec_RX(PHY_VARS_gNB *gNB, int frame_rx, int slot_rx) {
gNB
->
nr_srs_info
[
i
]
->
srs_estimated_channel_freq
,
gNB
->
nr_srs_info
[
i
]
->
srs_estimated_channel_freq
,
gNB
->
nr_srs_info
[
i
]
->
srs_estimated_channel_time
,
gNB
->
nr_srs_info
[
i
]
->
srs_estimated_channel_time
,
gNB
->
nr_srs_info
[
i
]
->
srs_estimated_channel_time_shifted
,
gNB
->
nr_srs_info
[
i
]
->
srs_estimated_channel_time_shifted
,
gNB
->
nr_srs_info
[
i
]
->
noise_power_per_rb
,
gNB
->
nr_srs_info
[
i
]
->
noise_power
);
gNB
->
nr_srs_info
[
i
]
->
noise_power
);
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
(
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
),
...
...
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