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
Michael Black
OpenXG-RAN
Commits
baba58df
Commit
baba58df
authored
Jan 04, 2023
by
General ABS
Committed by
rmagueta
Jun 06, 2023
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Configuration of measurements at PHY layer using the measConfig
parent
0396c96c
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
21 additions
and
20 deletions
+21
-20
openair1/PHY/NR_UE_ESTIMATION/nr_ue_measurements.c
openair1/PHY/NR_UE_ESTIMATION/nr_ue_measurements.c
+20
-16
openair1/PHY/defs_nr_UE.h
openair1/PHY/defs_nr_UE.h
+0
-3
openair2/RRC/NR/MESSAGES/asn1_msg.h
openair2/RRC/NR/MESSAGES/asn1_msg.h
+1
-1
No files found.
openair1/PHY/NR_UE_ESTIMATION/nr_ue_measurements.c
View file @
baba58df
...
@@ -265,21 +265,20 @@ void nr_ue_ssb_rsrp_measurements(PHY_VARS_NR_UE *ue,
...
@@ -265,21 +265,20 @@ void nr_ue_ssb_rsrp_measurements(PHY_VARS_NR_UE *ue,
void
nr_ue_meas_neighboring_cell
(
PHY_VARS_NR_UE
*
ue
,
UE_nr_rxtx_proc_t
*
proc
)
void
nr_ue_meas_neighboring_cell
(
PHY_VARS_NR_UE
*
ue
,
UE_nr_rxtx_proc_t
*
proc
)
{
{
ue
->
measurements
.
neighboring_cell_info
[
0
].
Nid_cell
=
1
;
ue
->
measurements
.
neighboring_cell_info
[
0
].
active
=
true
;
NR_DL_FRAME_PARMS
*
frame_parms
=
&
ue
->
frame_parms
;
ue
->
measurements
.
neighboring_cell_info
[
0
].
perform_validation
=
true
;
int
**
rxdata
=
ue
->
common_vars
.
rxdata
;
const
uint32_t
rxdataF_sz
=
ue
->
frame_parms
.
samples_per_slot_wCP
;
for
(
int
cell_idx
=
0
;
cell_idx
<
NUMBER_OF_NEIGHBORING_CELLs_MAX
;
cell_idx
++
)
{
for
(
int
cell_idx
=
0
;
cell_idx
<
NUMBER_OF_NEIGHBORING_CELLs_MAX
;
cell_idx
++
)
{
neighboring_cell_info_t
*
neighboring_cell_info
=
&
ue
->
measurements
.
neighboring_cell_info
[
cell_idx
];
fapi_nr_neighboring_cell_t
*
nr_neighboring_cell
=
&
PHY_vars_UE_g
[
ue
->
Mod_id
][
ue
->
CC_id
]
->
nrUE_config
.
meas_config
.
nr_neighboring_cell
[
cell_idx
];
if
(
n
eighboring_cell_info
->
active
==
false
)
{
if
(
n
r_neighboring_cell
->
active
==
0
)
{
continue
;
continue
;
}
}
NR_DL_FRAME_PARMS
*
frame_parms
=
&
ue
->
frame_parms
;
int
**
rxdata
=
ue
->
common_vars
.
rxdata
;
const
uint32_t
rxdataF_sz
=
ue
->
frame_parms
.
samples_per_slot_wCP
;
__attribute__
((
aligned
(
32
)))
c16_t
rxdataF
[
ue
->
frame_parms
.
nb_antennas_rx
][
rxdataF_sz
];
__attribute__
((
aligned
(
32
)))
c16_t
rxdataF
[
ue
->
frame_parms
.
nb_antennas_rx
][
rxdataF_sz
];
neighboring_cell_info_t
*
neighboring_cell_info
=
&
ue
->
measurements
.
neighboring_cell_info
[
cell_idx
];
// performing the correlation on a frame length plus one symbol for the first of the two frame
// performing the correlation on a frame length plus one symbol for the first of the two frame
// to take into account the possibility of PSS between the two frames
// to take into account the possibility of PSS between the two frames
...
@@ -290,14 +289,14 @@ void nr_ue_meas_neighboring_cell(PHY_VARS_NR_UE *ue, UE_nr_rxtx_proc_t *proc)
...
@@ -290,14 +289,14 @@ void nr_ue_meas_neighboring_cell(PHY_VARS_NR_UE *ue, UE_nr_rxtx_proc_t *proc)
int
start
=
neighboring_cell_info
->
pss_search_start
;
int
start
=
neighboring_cell_info
->
pss_search_start
;
// Search pss in the received buffer each 8 samples
// Search pss in the received buffer each 8 samples
int
pss_index
=
GET_NID2
(
n
eighboring_cell_info
->
Nid_cell
);
int
pss_index
=
GET_NID2
(
n
r_neighboring_cell
->
Nid_cell
);
int
maxval
=
0
;
int
maxval
=
0
;
for
(
int
i
=
0
;
i
<
IQ_SIZE
*
(
frame_parms
->
ofdm_symbol_size
);
i
++
)
{
for
(
int
i
=
0
;
i
<
IQ_SIZE
*
(
frame_parms
->
ofdm_symbol_size
);
i
++
)
{
maxval
=
max
(
maxval
,
primary_synchro_time_nr
[
pss_index
][
i
]);
maxval
=
max
(
maxval
,
primary_synchro_time_nr
[
pss_index
][
i
]);
maxval
=
max
(
maxval
,
-
primary_synchro_time_nr
[
pss_index
][
i
]);
maxval
=
max
(
maxval
,
-
primary_synchro_time_nr
[
pss_index
][
i
]);
}
}
int
shift
=
log2_approx
(
maxval
);
int
shift
=
log2_approx
(
maxval
);
int
peak_position
=
0
;
int
peak_position
=
-
1
;
int64_t
peak_value
=
0
;
int64_t
peak_value
=
0
;
int64_t
avg
=
0
;
int64_t
avg
=
0
;
for
(
int
n
=
start
;
n
<
start
+
length
;
n
+=
8
)
{
for
(
int
n
=
start
;
n
<
start
+
length
;
n
+=
8
)
{
...
@@ -326,6 +325,10 @@ void nr_ue_meas_neighboring_cell(PHY_VARS_NR_UE *ue, UE_nr_rxtx_proc_t *proc)
...
@@ -326,6 +325,10 @@ void nr_ue_meas_neighboring_cell(PHY_VARS_NR_UE *ue, UE_nr_rxtx_proc_t *proc)
dB_fixed64
(
avg
));
dB_fixed64
(
avg
));
#endif
#endif
if
(
peak_position
==
-
1
)
{
continue
;
}
// Validation using the SSS correlation
// Validation using the SSS correlation
unsigned
int
k
=
0
;
unsigned
int
k
=
0
;
...
@@ -333,9 +336,9 @@ void nr_ue_meas_neighboring_cell(PHY_VARS_NR_UE *ue, UE_nr_rxtx_proc_t *proc)
...
@@ -333,9 +336,9 @@ void nr_ue_meas_neighboring_cell(PHY_VARS_NR_UE *ue, UE_nr_rxtx_proc_t *proc)
nr_slot_fep_init_sync
(
ue
,
proc
,
sss_symbol
,
ssb_offset
,
false
,
rxdataF
);
nr_slot_fep_init_sync
(
ue
,
proc
,
sss_symbol
,
ssb_offset
,
false
,
rxdataF
);
c16_t
*
sss_rx
=
&
rxdataF
[
0
][
frame_parms
->
ofdm_symbol_size
*
sss_symbol
];
c16_t
*
sss_rx
=
&
rxdataF
[
0
][
frame_parms
->
ofdm_symbol_size
*
sss_symbol
];
if
(
n
eighboring_cell_info
->
perform_validation
==
true
)
{
if
(
n
r_neighboring_cell
->
perform_validation
==
1
)
{
int
sss_index
=
GET_NID1
(
n
eighboring_cell_info
->
Nid_cell
);
int
sss_index
=
GET_NID1
(
n
r_neighboring_cell
->
Nid_cell
);
int16_t
*
sss_seq
=
(
int16_t
*
)
&
d_sss
[
pss_index
][
sss_index
];
int16_t
*
sss_seq
=
(
int16_t
*
)
&
d_sss
[
pss_index
][
sss_index
];
k
=
frame_parms
->
first_carrier_offset
+
frame_parms
->
ssb_start_subcarrier
+
56
;
k
=
frame_parms
->
first_carrier_offset
+
frame_parms
->
ssb_start_subcarrier
+
56
;
if
(
k
>=
frame_parms
->
ofdm_symbol_size
)
{
if
(
k
>=
frame_parms
->
ofdm_symbol_size
)
{
...
@@ -361,13 +364,14 @@ void nr_ue_meas_neighboring_cell(PHY_VARS_NR_UE *ue, UE_nr_rxtx_proc_t *proc)
...
@@ -361,13 +364,14 @@ void nr_ue_meas_neighboring_cell(PHY_VARS_NR_UE *ue, UE_nr_rxtx_proc_t *proc)
#endif
#endif
if
(
metric
<
15000
)
{
if
(
metric
<
15000
)
{
return
;
continue
;
}
else
{
nr_neighboring_cell
->
perform_validation
=
0
;
}
}
}
}
neighboring_cell_info
->
pss_search_start
=
peak_position
-
16
;
neighboring_cell_info
->
pss_search_start
=
peak_position
-
16
;
neighboring_cell_info
->
pss_search_length
=
32
;
neighboring_cell_info
->
pss_search_length
=
32
;
neighboring_cell_info
->
perform_validation
=
false
;
#ifdef DEBUG_MEAS_NEIGHBORING_CELL
#ifdef DEBUG_MEAS_NEIGHBORING_CELL
LOG_I
(
NR_PHY
,
"Received symbol with PBCH 0...0 SSS 0...0 PBCH:
\n
"
);
LOG_I
(
NR_PHY
,
"Received symbol with PBCH 0...0 SSS 0...0 PBCH:
\n
"
);
...
@@ -408,14 +412,14 @@ void nr_ue_meas_neighboring_cell(PHY_VARS_NR_UE *ue, UE_nr_rxtx_proc_t *proc)
...
@@ -408,14 +412,14 @@ void nr_ue_meas_neighboring_cell(PHY_VARS_NR_UE *ue, UE_nr_rxtx_proc_t *proc)
-
((
int
)
openair0_cfg
[
0
].
rx_gain
[
0
]
-
(
int
)
openair0_cfg
[
0
].
rx_gain_offset
[
0
])
-
((
int
)
openair0_cfg
[
0
].
rx_gain
[
0
]
-
(
int
)
openair0_cfg
[
0
].
rx_gain_offset
[
0
])
-
dB_fixed
(
ue
->
frame_parms
.
ofdm_symbol_size
);
-
dB_fixed
(
ue
->
frame_parms
.
ofdm_symbol_size
);
#ifdef DEBUG_MEAS_NEIGHBORING_CELL
#ifdef DEBUG_MEAS_NEIGHBORING_CELL
LOG_I
(
NR_PHY
,
"[Nid_cell %i] SSB RSRP = %u (%i dBm)
\n
"
,
n
eighboring_cell_info
->
Nid_cell
,
neighboring_cell_info
->
ssb_rsrp
,
neighboring_cell_info
->
ssb_rsrp_dBm
);
LOG_I
(
NR_PHY
,
"[Nid_cell %i] SSB RSRP = %u (%i dBm)
\n
"
,
n
r_neighboring_cell
->
Nid_cell
,
neighboring_cell_info
->
ssb_rsrp
,
neighboring_cell_info
->
ssb_rsrp_dBm
);
#endif
#endif
// Send SS measurements to MAC
// Send SS measurements to MAC
fapi_nr_l1_measurements_t
l1_measurements
;
fapi_nr_l1_measurements_t
l1_measurements
;
l1_measurements
.
gNB_index
=
proc
->
gNB_id
;
l1_measurements
.
gNB_index
=
proc
->
gNB_id
;
l1_measurements
.
meas_type
=
0
;
l1_measurements
.
meas_type
=
0
;
l1_measurements
.
Nid_cell
=
n
eighboring_cell_info
->
Nid_cell
;
l1_measurements
.
Nid_cell
=
n
r_neighboring_cell
->
Nid_cell
;
l1_measurements
.
is_neighboring_cell
=
1
;
l1_measurements
.
is_neighboring_cell
=
1
;
if
(
neighboring_cell_info
->
ssb_rsrp_dBm
<
-
140
)
{
if
(
neighboring_cell_info
->
ssb_rsrp_dBm
<
-
140
)
{
l1_measurements
.
rsrp_dBm
=
16
;
l1_measurements
.
rsrp_dBm
=
16
;
...
...
openair1/PHY/defs_nr_UE.h
View file @
baba58df
...
@@ -128,9 +128,6 @@ typedef enum {
...
@@ -128,9 +128,6 @@ typedef enum {
#define NUMBER_OF_NEIGHBORING_CELLs_MAX 1
#define NUMBER_OF_NEIGHBORING_CELLs_MAX 1
typedef
struct
{
typedef
struct
{
int
Nid_cell
;
bool
active
;
bool
perform_validation
;
int
pss_search_start
;
int
pss_search_start
;
int
pss_search_length
;
int
pss_search_length
;
uint32_t
ssb_rsrp
;
uint32_t
ssb_rsrp
;
...
...
openair2/RRC/NR/MESSAGES/asn1_msg.h
View file @
baba58df
...
@@ -190,7 +190,7 @@ int do_RRCReestablishment(const protocol_ctxt_t *const ctxt_pP,
...
@@ -190,7 +190,7 @@ int do_RRCReestablishment(const protocol_ctxt_t *const ctxt_pP,
int
do_RRCReestablishmentComplete
(
uint8_t
*
buffer
,
size_t
buffer_size
,
int64_t
rrc_TransactionIdentifier
);
int
do_RRCReestablishmentComplete
(
uint8_t
*
buffer
,
size_t
buffer_size
,
int64_t
rrc_TransactionIdentifier
);
NR_MeasConfig_t
*
get_defaultMeasConfig
(
const
gNB_RrcConfigurationReq
*
conf
);
NR_MeasConfig_t
*
get_defaultMeasConfig
(
const
module_id_t
module_id
);
uint8_t
do_NR_Paging
(
uint8_t
Mod_id
,
uint8_t
*
buffer
,
uint32_t
tmsi
);
uint8_t
do_NR_Paging
(
uint8_t
Mod_id
,
uint8_t
*
buffer
,
uint32_t
tmsi
);
#endif
/* __RRC_NR_MESSAGES_ASN1_MSG__H__ */
#endif
/* __RRC_NR_MESSAGES_ASN1_MSG__H__ */
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