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
1
Merge Requests
1
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Metrics
Environments
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
OpenXG
OpenXG-RAN
Commits
9277afe3
Commit
9277afe3
authored
May 16, 2022
by
francescomani
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
measureing RSRP on all SSBs
parent
f3241cd4
Changes
5
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
107 additions
and
193 deletions
+107
-193
openair1/PHY/NR_UE_ESTIMATION/nr_estimation.h
openair1/PHY/NR_UE_ESTIMATION/nr_estimation.h
+4
-5
openair1/PHY/NR_UE_ESTIMATION/nr_ue_measurements.c
openair1/PHY/NR_UE_ESTIMATION/nr_ue_measurements.c
+26
-40
openair1/PHY/NR_UE_TRANSPORT/nr_initial_sync.c
openair1/PHY/NR_UE_TRANSPORT/nr_initial_sync.c
+0
-7
openair1/PHY/defs_nr_UE.h
openair1/PHY/defs_nr_UE.h
+1
-4
openair1/SCHED_NR_UE/phy_procedures_nr_ue.c
openair1/SCHED_NR_UE/phy_procedures_nr_ue.c
+76
-137
No files found.
openair1/PHY/NR_UE_ESTIMATION/nr_estimation.h
View file @
9277afe3
...
...
@@ -98,11 +98,10 @@ void nr_ue_measurements(PHY_VARS_NR_UE *ue,
UE_nr_rxtx_proc_t
*
proc
,
uint8_t
slot
);
void
nr_ue_rsrp_measurements
(
PHY_VARS_NR_UE
*
ue
,
uint8_t
gNB_index
,
UE_nr_rxtx_proc_t
*
proc
,
uint8_t
slot
,
uint8_t
abstraction_flag
);
void
nr_ue_ssb_rsrp_measurements
(
PHY_VARS_NR_UE
*
ue
,
uint8_t
gNB_index
,
UE_nr_rxtx_proc_t
*
proc
,
uint8_t
slot
);
void
nr_ue_rrc_measurements
(
PHY_VARS_NR_UE
*
ue
,
UE_nr_rxtx_proc_t
*
proc
,
...
...
openair1/PHY/NR_UE_ESTIMATION/nr_ue_measurements.c
View file @
9277afe3
...
...
@@ -203,18 +203,15 @@ void nr_ue_measurements(PHY_VARS_NR_UE *ue,
// Measurement units:
// - RSRP: W (dBW)
// - RX Gain dB
void
nr_ue_rsrp_measurements
(
PHY_VARS_NR_UE
*
ue
,
uint8_t
gNB_id
,
UE_nr_rxtx_proc_t
*
proc
,
uint8_t
slot
,
uint8_t
abstraction_flag
)
{
int
aarx
;
int
nb_re
;
void
nr_ue_ssb_rsrp_measurements
(
PHY_VARS_NR_UE
*
ue
,
int
ssb_index
,
UE_nr_rxtx_proc_t
*
proc
,
uint8_t
slot
)
{
int
k_start
=
55
;
int
k_end
=
183
;
unsigned
int
ssb_offset
=
ue
->
frame_parms
.
first_carrier_offset
+
ue
->
frame_parms
.
ssb_start_subcarrier
;
uint8_t
l_sss
=
ue
->
symbol_offset
+
2
;
uint8_t
l_sss
=
ue
->
symbol_offset
+
2
;
if
(
ssb_offset
>=
ue
->
frame_parms
.
ofdm_symbol_size
){
...
...
@@ -222,50 +219,39 @@ void nr_ue_rsrp_measurements(PHY_VARS_NR_UE *ue,
}
ue
->
measurements
.
rsrp
[
gNB_id
]
=
0
;
if
(
abstraction_flag
==
0
)
{
uint32_t
rsrp
=
0
;
LOG_D
(
PHY
,
"In %s: [UE %d] slot %d l_sss %d ssb_offset %d
\n
"
,
__FUNCTION__
,
ue
->
Mod_id
,
slot
,
l_sss
,
ssb_offset
);
LOG_D
(
PHY
,
"In %s: [UE %d] slot %d l_sss %d ssb_offset %d
\n
"
,
__FUNCTION__
,
ue
->
Mod_id
,
slot
,
l_sss
,
ssb_offset
);
int
nb_re
=
0
;
nb_re
=
0
;
for
(
int
aarx
=
0
;
aarx
<
ue
->
frame_parms
.
nb_antennas_rx
;
aarx
++
)
{
for
(
aarx
=
0
;
aarx
<
ue
->
frame_parms
.
nb_antennas_rx
;
aarx
++
)
{
int16_t
*
rxF_sss
=
(
int16_t
*
)
&
ue
->
common_vars
.
common_vars_rx_data_per_thread
[
proc
->
thread_id
].
rxdataF
[
aarx
][(
l_sss
*
ue
->
frame_parms
.
ofdm_symbol_size
)
+
ssb_offset
];
int16_t
*
rxF_sss
=
(
int16_t
*
)
&
ue
->
common_vars
.
common_vars_rx_data_per_thread
[
proc
->
thread_id
].
rxdataF
[
aarx
][(
l_sss
*
ue
->
frame_parms
.
ofdm_symbol_size
)
+
ssb_offset
];
for
(
int
k
=
k_start
;
k
<
k_end
;
k
++
){
for
(
int
k
=
k_start
;
k
<
k_end
;
k
++
){
#ifdef DEBUG_MEAS_UE
LOG_I
(
PHY
,
"In %s rxF_sss %d %d
\n
"
,
__FUNCTION__
,
rxF_sss
[
k
*
2
],
rxF_sss
[
k
*
2
+
1
]);
#endif
ue
->
measurements
.
rsrp
[
gNB_id
]
+=
(((
int32_t
)
rxF_sss
[
k
*
2
]
*
rxF_sss
[
k
*
2
])
+
((
int32_t
)
rxF_sss
[
k
*
2
+
1
]
*
rxF_sss
[
k
*
2
+
1
]));
#ifdef DEBUG_MEAS_UE
LOG_I
(
PHY
,
"In %s rxF_sss %d %d
\n
"
,
__FUNCTION__
,
rxF_sss
[
k
*
2
],
rxF_sss
[
k
*
2
+
1
]);
#endif
nb_re
++
;
rsrp
+=
(((
int32_t
)
rxF_sss
[
k
*
2
]
*
rxF_sss
[
k
*
2
])
+
((
int32_t
)
rxF_sss
[
k
*
2
+
1
]
*
rxF_sss
[
k
*
2
+
1
]));
nb_re
++
;
}
}
ue
->
measurements
.
rsrp
[
gNB_id
]
/=
nb_re
;
}
else
{
ue
->
measurements
.
rsrp
[
gNB_id
]
=
-
93
;
}
ue
->
measurements
.
rsrp_filtered
[
gNB_id
]
=
ue
->
measurements
.
rsrp
[
gNB_id
];
ue
->
measurements
.
rsrp_dBm
[
gNB_id
]
=
10
*
log10
(
ue
->
measurements
.
rsrp
[
gNB_id
])
+
30
-
10
*
log10
(
pow
(
2
,
30
))
-
((
int
)
openair0_cfg
[
0
].
rx_gain
[
0
]
-
(
int
)
openair0_cfg
[
0
].
rx_gain_offset
[
0
])
-
dB_fixed
(
ue
->
frame_parms
.
ofdm_symbol_size
);
rsrp
/=
nb_re
;
ue
->
measurements
.
ssb_rsrp_dBm
[
ssb_index
]
=
10
*
log10
(
rsrp
)
+
30
-
10
*
log10
(
pow
(
2
,
30
))
-
((
int
)
openair0_cfg
[
0
].
rx_gain
[
0
]
-
(
int
)
openair0_cfg
[
0
].
rx_gain_offset
[
0
])
-
dB_fixed
(
ue
->
frame_parms
.
ofdm_symbol_size
);
LOG_D
(
PHY
,
"In %s: [UE %d] s
lot
%d SS-RSRP: %d dBm/RE (%d)
\n
"
,
LOG_D
(
PHY
,
"In %s: [UE %d] s
sb
%d SS-RSRP: %d dBm/RE (%d)
\n
"
,
__FUNCTION__
,
ue
->
Mod_id
,
slot
,
ue
->
measurements
.
rsrp_dBm
[
gNB_id
],
ue
->
measurements
.
rsrp
[
gNB_id
]);
ssb_index
,
ue
->
measurements
.
ssb_rsrp_dBm
[
ssb_index
],
rsrp
);
}
// This function computes the received noise power
...
...
openair1/PHY/NR_UE_TRANSPORT/nr_initial_sync.c
View file @
9277afe3
...
...
@@ -443,13 +443,6 @@ int nr_initial_sync(UE_nr_rxtx_proc_t *proc,
}
LOG_I
(
PHY
,
"[UE %d] RRC Measurements => rssi %3.1f dBm (dig %3.1f dB, gain %d), N0 %d dBm, rsrp %3.1f dBm/RE, rsrq %3.1f dB
\n
"
,
ue
->
Mod_id
,
10
*
log10
(
ue
->
measurements
.
rssi
)
-
ue
->
rx_total_gain_dB
,
10
*
log10
(
ue
->
measurements
.
rssi
),
ue
->
rx_total_gain_dB
,
ue
->
measurements
.
n0_power_tot_dBm
,
10
*
log10
(
ue
->
measurements
.
rsrp
[
0
])
-
ue
->
rx_total_gain_dB
,
(
10
*
log10
(
ue
->
measurements
.
rsrq
[
0
])));
/* LOG_I(PHY, "[UE %d] Frame %d MIB Information => %s, %s, NidCell %d, N_RB_DL %d, PHICH DURATION %d, PHICH RESOURCE %s, TX_ANT %d\n",
ue->Mod_id,
...
...
openair1/PHY/defs_nr_UE.h
View file @
9277afe3
...
...
@@ -132,12 +132,9 @@ typedef struct {
// RRC measurements
uint32_t
rssi
;
int
n_adj_cells
;
unsigned
int
adj_cell_id
[
6
];
uint32_t
rsrq
[
7
];
uint32_t
rsrp
[
7
];
float
rsrp_filtered
[
7
];
// after layer 3 filtering
float
rsrq_filtered
[
7
];
short
rsrp_dBm
[
7
];
uint32_t
ssb_rsrp_dBm
[
64
];
// common measurements
//! estimated noise power (linear)
unsigned
int
n0_power
[
NB_ANTENNAS_RX
];
...
...
openair1/SCHED_NR_UE/phy_procedures_nr_ue.c
View file @
9277afe3
This diff is collapsed.
Click to expand it.
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