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
f3cdc112
Commit
f3cdc112
authored
Aug 18, 2022
by
Robert Schmidt
Browse files
Options
Browse Files
Download
Plain Diff
Merge remote-tracking branch 'origin/NR_UE_multi_SSB_meas' into integration_2022_wk33
parents
db31ddc3
5d39d812
Changes
9
Expand all
Show whitespace changes
Inline
Side-by-side
Showing
9 changed files
with
136 additions
and
212 deletions
+136
-212
openair1/PHY/INIT/nr_init_ue.c
openair1/PHY/INIT/nr_init_ue.c
+3
-0
openair1/PHY/NR_TRANSPORT/pucch_rx.c
openair1/PHY/NR_TRANSPORT/pucch_rx.c
+1
-3
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
+34
-45
openair1/PHY/NR_UE_TRANSPORT/nr_initial_sync.c
openair1/PHY/NR_UE_TRANSPORT/nr_initial_sync.c
+0
-7
openair1/PHY/NR_UE_TRANSPORT/nr_pbch.c
openair1/PHY/NR_UE_TRANSPORT/nr_pbch.c
+2
-1
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
+80
-140
openair2/LAYER2/NR_MAC_UE/nr_ue_procedures.c
openair2/LAYER2/NR_MAC_UE/nr_ue_procedures.c
+11
-7
No files found.
openair1/PHY/INIT/nr_init_ue.c
View file @
f3cdc112
...
...
@@ -156,6 +156,9 @@ int init_nr_ue_signal(PHY_VARS_NR_UE *ue, int nb_connected_gNB)
AssertFatal
(
nb_connected_gNB
<=
NUMBER_OF_CONNECTED_gNB_MAX
,
"n_connected_gNB is too large"
);
// init phy_vars_ue
for
(
i
=
0
;
i
<
fp
->
Lmax
;
i
++
)
ue
->
measurements
.
ssb_rsrp_dBm
[
i
]
=
INT_MIN
;
for
(
i
=
0
;
i
<
4
;
i
++
)
{
ue
->
rx_gain_max
[
i
]
=
135
;
ue
->
rx_gain_med
[
i
]
=
128
;
...
...
openair1/PHY/NR_TRANSPORT/pucch_rx.c
View file @
f3cdc112
...
...
@@ -1557,10 +1557,8 @@ void nr_decode_pucch2(PHY_VARS_gNB *gNB,
}
// cw loop
corr_dB
=
dB_fixed64
((
uint64_t
)
corr
);
#ifdef DEBUG_NR_PUCCH_RX
printf
(
"cw_ML %d, metric %d dB
\n
"
,
cw_ML
,
corr_dB
);
LOG_I
(
PHY
,
"slot %d PUCCH2 cw_ML %d, metric %d dB
\n
"
,
slot
,
cw_ML
,
corr_dB
);
#endif
LOG_D
(
PHY
,
"slot %d PUCCH2 cw_ML %d, metric %d dB
\n
"
,
slot
,
cw_ML
,
corr_dB
);
decodedPayload
[
0
]
=
(
uint64_t
)
cw_ML
;
}
else
{
// polar coded case
...
...
openair1/PHY/NR_UE_ESTIMATION/nr_estimation.h
View file @
f3cdc112
...
...
@@ -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
,
void
nr_ue_
ssb_
rsrp_measurements
(
PHY_VARS_NR_UE
*
ue
,
uint8_t
gNB_index
,
UE_nr_rxtx_proc_t
*
proc
,
uint8_t
slot
,
uint8_t
abstraction_flag
);
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 @
f3cdc112
...
...
@@ -33,6 +33,7 @@
#include "executables/softmodem-common.h"
#include "executables/nr-softmodem-common.h"
#include "PHY/defs_nr_UE.h"
#include "PHY/INIT/phy_init.h"
#include "PHY/phy_extern_nr_ue.h"
#include "common/utils/LOG/log.h"
#include "PHY/sse_intrin.h"
...
...
@@ -203,69 +204,57 @@ 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
,
void
nr_ue_
ssb_
rsrp_measurements
(
PHY_VARS_NR_UE
*
ue
,
int
ssb_index
,
UE_nr_rxtx_proc_t
*
proc
,
uint8_t
slot
,
uint8_t
abstraction_flag
)
{
int
aarx
;
int
nb_re
;
int
k_start
=
55
;
uint8_t
slot
)
{
int
k_start
=
56
;
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
;
int
symbol_offset
=
nr_get_ssb_start_symbol
(
&
ue
->
frame_parms
,
ssb_index
)
;
if
(
ssb_offset
>=
ue
->
frame_parms
.
ofdm_symbol_size
){
if
(
ue
->
frame_parms
.
half_frame_bit
)
symbol_offset
+=
(
ue
->
frame_parms
.
slots_per_frame
>>
1
)
*
ue
->
frame_parms
.
symbols_per_slot
;
ssb_offset
-=
ue
->
frame_parms
.
ofdm_symbol_size
;
}
uint8_t
l_sss
=
(
symbol_offset
+
2
)
%
ue
->
frame_parms
.
symbols_per_slot
;
ue
->
measurements
.
rsrp
[
gNB_id
]
=
0
;
if
(
ssb_offset
>=
ue
->
frame_parms
.
ofdm_symbol_size
)
ssb_offset
-=
ue
->
frame_parms
.
ofdm_symbol_size
;
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
);
int
nb_re
=
0
;
nb_re
=
0
;
for
(
aarx
=
0
;
aarx
<
ue
->
frame_parms
.
nb_antennas_rx
;
aarx
++
)
{
for
(
int
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
];
for
(
int
k
=
k_start
;
k
<
k_end
;
k
++
){
#ifdef DEBUG_MEAS_UE
#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
]));
#endif
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
;
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
);
}
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
);
LOG_D
(
PHY
,
"In %s: [UE %d] slot %d SS-RSRP: %d dBm/RE (%d)
\n
"
,
LOG_D
(
PHY
,
"In %s: [UE %d] ssb %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
...
...
@@ -281,7 +270,7 @@ void nr_ue_rrc_measurements(PHY_VARS_NR_UE *ue,
uint8_t
k_left
=
48
;
uint8_t
k_right
=
183
;
uint8_t
k_length
=
8
;
uint8_t
l_sss
=
ue
->
symbol_offset
+
2
;
uint8_t
l_sss
=
(
ue
->
symbol_offset
+
2
)
%
ue
->
frame_parms
.
symbols_per_slot
;
unsigned
int
ssb_offset
=
ue
->
frame_parms
.
first_carrier_offset
+
ue
->
frame_parms
.
ssb_start_subcarrier
;
double
rx_gain
=
openair0_cfg
[
0
].
rx_gain
[
0
];
double
rx_gain_offset
=
openair0_cfg
[
0
].
rx_gain_offset
[
0
];
...
...
openair1/PHY/NR_UE_TRANSPORT/nr_initial_sync.c
View file @
f3cdc112
...
...
@@ -445,13 +445,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/NR_UE_TRANSPORT/nr_pbch.c
View file @
f3cdc112
...
...
@@ -393,6 +393,7 @@ int nr_rx_pbch( PHY_VARS_NR_UE *ue,
MIMO_mode_t
mimo_mode
,
NR_UE_PDCCH_CONFIG
*
phy_pdcch_config
,
fapiPbch_t
*
result
)
{
NR_UE_COMMON
*
nr_ue_common_vars
=
&
ue
->
common_vars
;
int
max_h
=
0
;
int
symbol
;
...
...
@@ -416,7 +417,7 @@ int nr_rx_pbch( PHY_VARS_NR_UE *ue,
int
symbol_offset
=
1
;
if
(
ue
->
is_synchronized
>
0
)
symbol_offset
=
(
ue
->
symbol_offset
)
%
(
frame_parms
->
symbols_per_slot
);
symbol_offset
=
nr_get_ssb_start_symbol
(
frame_parms
,
i_ssb
)
%
(
frame_parms
->
symbols_per_slot
);
else
symbol_offset
=
0
;
...
...
openair1/PHY/defs_nr_UE.h
View file @
f3cdc112
...
...
@@ -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
];
int
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 @
f3cdc112
This diff is collapsed.
Click to expand it.
openair2/LAYER2/NR_MAC_UE/nr_ue_procedures.c
View file @
f3cdc112
...
...
@@ -2617,27 +2617,31 @@ uint8_t get_ssb_rsrp_payload(NR_UE_MAC_INST_t *mac,
}
else
nb_meas
=
2
;
struct
NR_CSI_SSB_ResourceSet__csi_SSB_ResourceList
SSB_resource
;
for
(
int
csi_ssb_idx
=
0
;
csi_ssb_idx
<
csi_MeasConfig
->
csi_SSB_ResourceSetToAddModList
->
list
.
count
;
csi_ssb_idx
++
)
{
if
(
csi_MeasConfig
->
csi_SSB_ResourceSetToAddModList
->
list
.
array
[
csi_ssb_idx
]
->
csi_SSB_ResourceSetId
==
*
(
csi_resourceconfig
->
csi_RS_ResourceSetList
.
choice
.
nzp_CSI_RS_SSB
->
csi_SSB_ResourceSetList
->
list
.
array
[
0
])){
SSB_resource
=
csi_MeasConfig
->
csi_SSB_ResourceSetToAddModList
->
list
.
array
[
csi_ssb_idx
]
->
csi_SSB_ResourceList
;
///only one SSB resource set from spec 38.331 IE CSI-ResourceConfig
nb_ssb
=
csi_MeasConfig
->
csi_SSB_ResourceSetToAddModList
->
list
.
array
[
csi_ssb_idx
]
->
csi_SSB_ResourceList
.
list
.
count
;
nb_ssb
=
SSB_resource
.
list
.
count
;
break
;
}
}
AssertFatal
(
nb_ssb
>
0
,
"No SSB found in the resource set
\n
"
);
AssertFatal
(
nb_meas
==
1
,
"PHY currently reports only the strongest SSB to MAC. Can't report more than 1 RSRP
\n
"
);
int
ssbri_bits
=
ceil
(
log2
(
nb_ssb
));
//TODO measurement of multiple SSBs at PHY and indication to MAC
if
(
nb_ssb
>
1
)
LOG_E
(
MAC
,
"In current implementation only the SSB of synchronization is measured at PHY. This works only for a single SSB scenario
\n
"
);
int
ssb_rsrp
[
2
][
nb_meas
];
// the array contains index and RSRP of each SSB to be reported (nb_meas highest RSRPs)
//TODO replace the following 2 lines with a function to order the nb_meas highest SSB RSRPs
ssb_rsrp
[
0
][
0
]
=
mac
->
mib_ssb
;
for
(
int
i
=
0
;
i
<
nb_ssb
;
i
++
)
{
if
(
*
SSB_resource
.
list
.
array
[
i
]
==
mac
->
mib_ssb
)
{
ssb_rsrp
[
0
][
0
]
=
i
;
break
;
}
}
AssertFatal
(
*
SSB_resource
.
list
.
array
[
ssb_rsrp
[
0
][
0
]]
==
mac
->
mib_ssb
,
"Couldn't find corresponding SSB in csi_SSB_ResourceList
\n
"
);
ssb_rsrp
[
1
][
0
]
=
mac
->
ssb_rsrp_dBm
;
uint8_t
ssbi
;
...
...
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