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
3 years ago
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
Branches unavailable
2025.w14
2025.w13
2025.w12
2025.w11
2025.w10
2025.w09
2025.w08
2025.w07
2025.w06
2025.w05
2025.w04
2025.w03
2025.w02
2024.w51
2024.w50
2024.w49
2024.w48
2024.w47
2024.w46
2024.w45
2024.w44
2024.w43
2024.w42
2024.w41
2024.w40
2024.w39
2024.w38
2024.w36
2024.w35
2024.w34
2024.w33
2024.w32
2024.w31
2024.w30
2024.w29
2024.w28
2024.w27
2024.w26
2024.w25
2024.w24
2024.w23
2024.w22
2024.w21
2024.w18
2024.w17
2024.w16
2024.w15
2024.w14
2024.w13
2024.w12
2024.w11
2024.w10
2024.w09
2024.w08
2024.w06
2024.w05
2024.w04
2024.w03
2024.w02
2024.w01
2023.w51
2023.w50
2023.w49
2023.w48
2023.w47
2023.w45
2023.w43
2023.w42
2023.w41
2023.w40
2023.w39
2023.w38
2023.w37
2023.w36
2023.w34
2023.w33
2023.w32
2023.w31
2023.w30
2023.w29
2023.w28
2023.w27
2023.w26
2023.w25
2023.w24
2023.w23
2023.w22
2023.w21
2023.w20
2023.w19
2023.w18
2023.w18b
2023.w16
2023.w15
2023.w14
2023.w13
2023.w12
2023.w11
2023.w11b
2023.w10
2023.w10b
2023.w09
2023.w08
2023.w08b
2023.w07
2023.w06
2023.w05
2023.w03
2023.w02
2022.42
2022.41
2022.w51
2022.w50
2022.w49
2022.w48
2022.w47
2022.w46
2022.w45
2022.w43
2022.w42
2022.w42b
2022.w41
2022.w40
2022.w39
2022.w38
2022.w37
2022.w37b
2022.w36
2022.w35
2022.w33
v2.2.0
v2.1.0
v2.0.0
flexran-eol
ARC_1.3
No related merge requests found
Changes
9
Hide 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)
...
@@ -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"
);
AssertFatal
(
nb_connected_gNB
<=
NUMBER_OF_CONNECTED_gNB_MAX
,
"n_connected_gNB is too large"
);
// init phy_vars_ue
// 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
++
)
{
for
(
i
=
0
;
i
<
4
;
i
++
)
{
ue
->
rx_gain_max
[
i
]
=
135
;
ue
->
rx_gain_max
[
i
]
=
135
;
ue
->
rx_gain_med
[
i
]
=
128
;
ue
->
rx_gain_med
[
i
]
=
128
;
...
...
This diff is collapsed.
Click to expand it.
openair1/PHY/NR_TRANSPORT/pucch_rx.c
View file @
f3cdc112
...
@@ -1557,10 +1557,8 @@ void nr_decode_pucch2(PHY_VARS_gNB *gNB,
...
@@ -1557,10 +1557,8 @@ void nr_decode_pucch2(PHY_VARS_gNB *gNB,
}
// cw loop
}
// cw loop
corr_dB
=
dB_fixed64
((
uint64_t
)
corr
);
corr_dB
=
dB_fixed64
((
uint64_t
)
corr
);
#ifdef DEBUG_NR_PUCCH_RX
#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
#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
;
decodedPayload
[
0
]
=
(
uint64_t
)
cw_ML
;
}
}
else
{
// polar coded case
else
{
// polar coded case
...
...
This diff is collapsed.
Click to expand it.
openair1/PHY/NR_UE_ESTIMATION/nr_estimation.h
View file @
f3cdc112
...
@@ -98,11 +98,10 @@ void nr_ue_measurements(PHY_VARS_NR_UE *ue,
...
@@ -98,11 +98,10 @@ void nr_ue_measurements(PHY_VARS_NR_UE *ue,
UE_nr_rxtx_proc_t
*
proc
,
UE_nr_rxtx_proc_t
*
proc
,
uint8_t
slot
);
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
,
uint8_t
gNB_index
,
UE_nr_rxtx_proc_t
*
proc
,
UE_nr_rxtx_proc_t
*
proc
,
uint8_t
slot
,
uint8_t
slot
);
uint8_t
abstraction_flag
);
void
nr_ue_rrc_measurements
(
PHY_VARS_NR_UE
*
ue
,
void
nr_ue_rrc_measurements
(
PHY_VARS_NR_UE
*
ue
,
UE_nr_rxtx_proc_t
*
proc
,
UE_nr_rxtx_proc_t
*
proc
,
...
...
This diff is collapsed.
Click to expand it.
openair1/PHY/NR_UE_ESTIMATION/nr_ue_measurements.c
View file @
f3cdc112
...
@@ -33,6 +33,7 @@
...
@@ -33,6 +33,7 @@
#include "executables/softmodem-common.h"
#include "executables/softmodem-common.h"
#include "executables/nr-softmodem-common.h"
#include "executables/nr-softmodem-common.h"
#include "PHY/defs_nr_UE.h"
#include "PHY/defs_nr_UE.h"
#include "PHY/INIT/phy_init.h"
#include "PHY/phy_extern_nr_ue.h"
#include "PHY/phy_extern_nr_ue.h"
#include "common/utils/LOG/log.h"
#include "common/utils/LOG/log.h"
#include "PHY/sse_intrin.h"
#include "PHY/sse_intrin.h"
...
@@ -203,69 +204,57 @@ void nr_ue_measurements(PHY_VARS_NR_UE *ue,
...
@@ -203,69 +204,57 @@ void nr_ue_measurements(PHY_VARS_NR_UE *ue,
// Measurement units:
// Measurement units:
// - RSRP: W (dBW)
// - RSRP: W (dBW)
// - RX Gain dB
// - RX Gain dB
void
nr_ue_rsrp_measurements
(
PHY_VARS_NR_UE
*
ue
,
void
nr_ue_ssb_rsrp_measurements
(
PHY_VARS_NR_UE
*
ue
,
uint8_t
gNB_id
,
int
ssb_index
,
UE_nr_rxtx_proc_t
*
proc
,
UE_nr_rxtx_proc_t
*
proc
,
uint8_t
slot
,
uint8_t
slot
)
{
uint8_t
abstraction_flag
)
{
int
k_start
=
56
;
int
aarx
;
int
nb_re
;
int
k_start
=
55
;
int
k_end
=
183
;
int
k_end
=
183
;
unsigned
int
ssb_offset
=
ue
->
frame_parms
.
first_carrier_offset
+
ue
->
frame_parms
.
ssb_start_subcarrier
;
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
)
{
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
);
nb_re
=
0
;
uint32_t
rsrp
=
0
;
for
(
aarx
=
0
;
aarx
<
ue
->
frame_parms
.
nb_antennas_rx
;
aarx
++
)
{
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
;
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
aarx
=
0
;
aarx
<
ue
->
frame_parms
.
nb_antennas_rx
;
aarx
++
)
{
for
(
int
k
=
k_start
;
k
<
k_end
;
k
++
){
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
];
#ifdef DEBUG_MEAS_UE
for
(
int
k
=
k_start
;
k
<
k_end
;
k
++
){
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
];
rsrp
/=
nb_re
;
ue
->
measurements
.
ssb_rsrp_dBm
[
ssb_index
]
=
10
*
log10
(
rsrp
)
+
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
);
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__
,
__FUNCTION__
,
ue
->
Mod_id
,
ue
->
Mod_id
,
slot
,
ssb_index
,
ue
->
measurements
.
rsrp_dBm
[
gNB_id
],
ue
->
measurements
.
ssb_rsrp_dBm
[
ssb_index
],
ue
->
measurements
.
rsrp
[
gNB_id
]);
rsrp
);
}
}
// This function computes the received noise power
// This function computes the received noise power
...
@@ -281,7 +270,7 @@ void nr_ue_rrc_measurements(PHY_VARS_NR_UE *ue,
...
@@ -281,7 +270,7 @@ void nr_ue_rrc_measurements(PHY_VARS_NR_UE *ue,
uint8_t
k_left
=
48
;
uint8_t
k_left
=
48
;
uint8_t
k_right
=
183
;
uint8_t
k_right
=
183
;
uint8_t
k_length
=
8
;
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
;
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
=
openair0_cfg
[
0
].
rx_gain
[
0
];
double
rx_gain_offset
=
openair0_cfg
[
0
].
rx_gain_offset
[
0
];
double
rx_gain_offset
=
openair0_cfg
[
0
].
rx_gain_offset
[
0
];
...
...
This diff is collapsed.
Click to expand it.
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,
...
@@ -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",
/* 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,
ue->Mod_id,
...
...
This diff is collapsed.
Click to expand it.
openair1/PHY/NR_UE_TRANSPORT/nr_pbch.c
View file @
f3cdc112
...
@@ -393,6 +393,7 @@ int nr_rx_pbch( PHY_VARS_NR_UE *ue,
...
@@ -393,6 +393,7 @@ int nr_rx_pbch( PHY_VARS_NR_UE *ue,
MIMO_mode_t
mimo_mode
,
MIMO_mode_t
mimo_mode
,
NR_UE_PDCCH_CONFIG
*
phy_pdcch_config
,
NR_UE_PDCCH_CONFIG
*
phy_pdcch_config
,
fapiPbch_t
*
result
)
{
fapiPbch_t
*
result
)
{
NR_UE_COMMON
*
nr_ue_common_vars
=
&
ue
->
common_vars
;
NR_UE_COMMON
*
nr_ue_common_vars
=
&
ue
->
common_vars
;
int
max_h
=
0
;
int
max_h
=
0
;
int
symbol
;
int
symbol
;
...
@@ -416,7 +417,7 @@ int nr_rx_pbch( PHY_VARS_NR_UE *ue,
...
@@ -416,7 +417,7 @@ int nr_rx_pbch( PHY_VARS_NR_UE *ue,
int
symbol_offset
=
1
;
int
symbol_offset
=
1
;
if
(
ue
->
is_synchronized
>
0
)
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
else
symbol_offset
=
0
;
symbol_offset
=
0
;
...
...
This diff is collapsed.
Click to expand it.
openair1/PHY/defs_nr_UE.h
View file @
f3cdc112
...
@@ -132,12 +132,9 @@ typedef struct {
...
@@ -132,12 +132,9 @@ typedef struct {
// RRC measurements
// RRC measurements
uint32_t
rssi
;
uint32_t
rssi
;
int
n_adj_cells
;
int
n_adj_cells
;
unsigned
int
adj_cell_id
[
6
];
uint32_t
rsrq
[
7
];
uint32_t
rsrp
[
7
];
uint32_t
rsrp
[
7
];
float
rsrp_filtered
[
7
];
// after layer 3 filtering
float
rsrq_filtered
[
7
];
short
rsrp_dBm
[
7
];
short
rsrp_dBm
[
7
];
int
ssb_rsrp_dBm
[
64
];
// common measurements
// common measurements
//! estimated noise power (linear)
//! estimated noise power (linear)
unsigned
int
n0_power
[
NB_ANTENNAS_RX
];
unsigned
int
n0_power
[
NB_ANTENNAS_RX
];
...
...
This diff is collapsed.
Click to expand it.
openair1/SCHED_NR_UE/phy_procedures_nr_ue.c
View file @
f3cdc112
...
@@ -39,6 +39,7 @@
...
@@ -39,6 +39,7 @@
#include "PHY/NR_REFSIG/dmrs_nr.h"
#include "PHY/NR_REFSIG/dmrs_nr.h"
#include "PHY/phy_extern_nr_ue.h"
#include "PHY/phy_extern_nr_ue.h"
#include "PHY/MODULATION/modulation_UE.h"
#include "PHY/MODULATION/modulation_UE.h"
#include "PHY/INIT/phy_init.h"
#include "PHY/NR_UE_TRANSPORT/nr_transport_ue.h"
#include "PHY/NR_UE_TRANSPORT/nr_transport_ue.h"
#include "PHY/NR_UE_TRANSPORT/nr_transport_proto_ue.h"
#include "PHY/NR_UE_TRANSPORT/nr_transport_proto_ue.h"
#include "PHY/NR_UE_TRANSPORT/srs_modulation_nr.h"
#include "PHY/NR_UE_TRANSPORT/srs_modulation_nr.h"
...
@@ -173,7 +174,7 @@ void nr_fill_rx_indication(fapi_nr_rx_indication_t *rx_ind,
...
@@ -173,7 +174,7 @@ void nr_fill_rx_indication(fapi_nr_rx_indication_t *rx_ind,
rx_ind
->
rx_indication_body
[
n_pdus
-
1
].
ssb_pdu
.
ssb_length
=
frame_parms
->
Lmax
;
rx_ind
->
rx_indication_body
[
n_pdus
-
1
].
ssb_pdu
.
ssb_length
=
frame_parms
->
Lmax
;
rx_ind
->
rx_indication_body
[
n_pdus
-
1
].
ssb_pdu
.
cell_id
=
frame_parms
->
Nid_cell
;
rx_ind
->
rx_indication_body
[
n_pdus
-
1
].
ssb_pdu
.
cell_id
=
frame_parms
->
Nid_cell
;
rx_ind
->
rx_indication_body
[
n_pdus
-
1
].
ssb_pdu
.
ssb_start_subcarrier
=
frame_parms
->
ssb_start_subcarrier
;
rx_ind
->
rx_indication_body
[
n_pdus
-
1
].
ssb_pdu
.
ssb_start_subcarrier
=
frame_parms
->
ssb_start_subcarrier
;
rx_ind
->
rx_indication_body
[
n_pdus
-
1
].
ssb_pdu
.
rsrp_dBm
=
ue
->
measurements
.
rsrp_dBm
[
gNB_id
];
rx_ind
->
rx_indication_body
[
n_pdus
-
1
].
ssb_pdu
.
rsrp_dBm
=
ue
->
measurements
.
ssb_rsrp_dBm
[
frame_parms
->
ssb_index
];
break
;
break
;
case
FAPI_NR_CSIRS_IND
:
case
FAPI_NR_CSIRS_IND
:
memcpy
(
&
rx_ind
->
rx_indication_body
[
n_pdus
-
1
].
csirs_measurements
,
memcpy
(
&
rx_ind
->
rx_indication_body
[
n_pdus
-
1
].
csirs_measurements
,
...
@@ -366,11 +367,13 @@ void nr_ue_measurement_procedures(uint16_t l,
...
@@ -366,11 +367,13 @@ void nr_ue_measurement_procedures(uint16_t l,
}
}
static
void
nr_ue_pbch_procedures
(
uint8_t
gNB_id
,
static
void
nr_ue_pbch_procedures
(
uint8_t
gNB_id
,
PHY_VARS_NR_UE
*
ue
,
PHY_VARS_NR_UE
*
ue
,
UE_nr_rxtx_proc_t
*
proc
,
int
estimateSz
,
struct
complex16
dl_ch_estimates
[][
estimateSz
],
NR_UE_PDCCH_CONFIG
*
phy_pdcch_config
)
UE_nr_rxtx_proc_t
*
proc
,
{
int
estimateSz
,
int
ret
=
0
;
struct
complex16
dl_ch_estimates
[][
estimateSz
],
NR_UE_PDCCH_CONFIG
*
phy_pdcch_config
)
{
int
ret
=
0
;
DevAssert
(
ue
);
DevAssert
(
ue
);
int
frame_rx
=
proc
->
frame_rx
;
int
frame_rx
=
proc
->
frame_rx
;
...
@@ -1319,95 +1322,17 @@ void *UE_thread_slot1_dl_processing(void *arg) {
...
@@ -1319,95 +1322,17 @@ void *UE_thread_slot1_dl_processing(void *arg) {
}
}
#endif
#endif
int
is_ssb_in_slot
(
fapi_nr_config_request_t
*
config
,
int
frame
,
int
slot
,
NR_DL_FRAME_PARMS
*
fp
)
{
int
mu
=
fp
->
numerology_index
;
//uint8_t half_frame_index = fp->half_frame_bit;
//uint8_t i_ssb = fp->ssb_index;
uint8_t
Lmax
=
fp
->
Lmax
;
if
((
config
->
ssb_table
.
ssb_period
>
0
)
&&
!
(
frame
%
(
1
<<
(
config
->
ssb_table
.
ssb_period
-
1
))))
{
if
(
Lmax
<=
8
)
{
if
(
slot
<=
3
&&
(((
config
->
ssb_table
.
ssb_mask_list
[
0
].
ssb_mask
<<
2
*
slot
)
&
0x80000000
)
==
0x80000000
||
((
config
->
ssb_table
.
ssb_mask_list
[
0
].
ssb_mask
<<
(
2
*
slot
+
1
))
&
0x80000000
)
==
0x80000000
))
return
1
;
else
return
0
;
}
else
if
(
Lmax
==
64
)
{
if
(
mu
==
NR_MU_3
){
if
(
slot
>=
0
&&
slot
<=
7
){
if
(((
config
->
ssb_table
.
ssb_mask_list
[
0
].
ssb_mask
<<
2
*
slot
)
&
0x80000000
)
==
0x80000000
||
((
config
->
ssb_table
.
ssb_mask_list
[
0
].
ssb_mask
<<
(
2
*
slot
+
1
))
&
0x80000000
)
==
0x80000000
)
return
1
;
else
return
0
;
}
else
if
(
slot
>=
10
&&
slot
<=
17
){
if
(((
config
->
ssb_table
.
ssb_mask_list
[
0
].
ssb_mask
<<
2
*
(
slot
-
2
))
&
0x80000000
)
==
0x80000000
||
((
config
->
ssb_table
.
ssb_mask_list
[
0
].
ssb_mask
<<
(
2
*
(
slot
-
2
)
+
1
))
&
0x80000000
)
==
0x80000000
)
return
1
;
else
return
0
;
}
else
if
(
slot
>=
20
&&
slot
<=
27
){
if
(((
config
->
ssb_table
.
ssb_mask_list
[
1
].
ssb_mask
<<
2
*
(
slot
-
20
))
&
0x80000000
)
==
0x80000000
||
((
config
->
ssb_table
.
ssb_mask_list
[
1
].
ssb_mask
<<
(
2
*
(
slot
-
20
)
+
1
))
&
0x80000000
)
==
0x80000000
)
return
1
;
else
return
0
;
}
else
if
(
slot
>=
30
&&
slot
<=
37
){
if
(((
config
->
ssb_table
.
ssb_mask_list
[
1
].
ssb_mask
<<
2
*
(
slot
-
22
))
&
0x80000000
)
==
0x80000000
||
((
config
->
ssb_table
.
ssb_mask_list
[
1
].
ssb_mask
<<
(
2
*
(
slot
-
22
)
+
1
))
&
0x80000000
)
==
0x80000000
)
return
1
;
else
return
0
;
}
else
return
0
;
}
else
if
(
mu
==
NR_MU_4
)
{
AssertFatal
(
0
==
1
,
"not implemented for mu = %d yet
\n
"
,
mu
);
}
else
AssertFatal
(
0
==
1
,
"Invalid numerology index %d for the synchronization block
\n
"
,
mu
);
}
else
AssertFatal
(
0
==
1
,
"Invalid Lmax %u for the synchronization block
\n
"
,
Lmax
);
}
else
return
0
;
}
int
is_pbch_in_slot
(
fapi_nr_config_request_t
*
config
,
int
frame
,
int
slot
,
NR_DL_FRAME_PARMS
*
fp
)
{
int
ssb_slot_decoded
=
(
fp
->
ssb_index
>>
1
)
+
((
fp
->
ssb_index
>>
4
)
<<
1
);
//slot in which the decoded SSB can be found
if
(
config
->
ssb_table
.
ssb_period
==
0
)
{
// check for pbch in corresponding slot each half frame
if
(
fp
->
half_frame_bit
)
return
(
slot
==
ssb_slot_decoded
||
slot
==
ssb_slot_decoded
-
fp
->
slots_per_frame
/
2
);
else
return
(
slot
==
ssb_slot_decoded
||
slot
==
ssb_slot_decoded
+
fp
->
slots_per_frame
/
2
);
}
else
{
// if the current frame is supposed to contain ssb
if
(
!
(
frame
%
(
1
<<
(
config
->
ssb_table
.
ssb_period
-
1
))))
return
(
slot
==
ssb_slot_decoded
);
else
return
0
;
}
}
int
phy_procedures_nrUE_RX
(
PHY_VARS_NR_UE
*
ue
,
int
phy_procedures_nrUE_RX
(
PHY_VARS_NR_UE
*
ue
,
UE_nr_rxtx_proc_t
*
proc
,
UE_nr_rxtx_proc_t
*
proc
,
uint8_t
gNB_id
,
uint8_t
gNB_id
,
uint8_t
dlsch_parallel
,
uint8_t
dlsch_parallel
,
NR_UE_PDCCH_CONFIG
*
phy_pdcch_config
,
NR_UE_PDCCH_CONFIG
*
phy_pdcch_config
,
notifiedFIFO_t
*
txFifo
notifiedFIFO_t
*
txFifo
)
{
)
{
int
frame_rx
=
proc
->
frame_rx
;
int
frame_rx
=
proc
->
frame_rx
;
int
nr_slot_rx
=
proc
->
nr_slot_rx
;
int
nr_slot_rx
=
proc
->
nr_slot_rx
;
int
slot_pbch
;
int
slot_ssb
;
fapi_nr_config_request_t
*
cfg
=
&
ue
->
nrUE_config
;
fapi_nr_config_request_t
*
cfg
=
&
ue
->
nrUE_config
;
uint8_t
nb_symb_pdcch
=
phy_pdcch_config
->
nb_search_space
>
0
?
phy_pdcch_config
->
pdcch_config
[
0
].
coreset
.
duration
:
0
;
uint8_t
dci_cnt
=
0
;
NR_DL_FRAME_PARMS
*
fp
=
&
ue
->
frame_parms
;
NR_DL_FRAME_PARMS
*
fp
=
&
ue
->
frame_parms
;
VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME
(
VCD_SIGNAL_DUMPER_FUNCTIONS_PHY_PROCEDURES_UE_RX
,
VCD_FUNCTION_IN
);
VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME
(
VCD_SIGNAL_DUMPER_FUNCTIONS_PHY_PROCEDURES_UE_RX
,
VCD_FUNCTION_IN
);
...
@@ -1417,64 +1342,72 @@ int phy_procedures_nrUE_RX(PHY_VARS_NR_UE *ue,
...
@@ -1417,64 +1342,72 @@ int phy_procedures_nrUE_RX(PHY_VARS_NR_UE *ue,
frame_rx
%
1024
,
nr_slot_rx
,
frame_rx
%
1024
,
nr_slot_rx
,
dB_fixed
(
signal_energy
(
ue
->
common_vars
.
common_vars_rx_data_per_thread
[
proc
->
thread_id
].
rxdataF
[
0
],
2048
*
14
)));
dB_fixed
(
signal_energy
(
ue
->
common_vars
.
common_vars_rx_data_per_thread
[
proc
->
thread_id
].
rxdataF
[
0
],
2048
*
14
)));
/*
// checking if current frame is compatible with SSB periodicity
uint8_t next1_thread_id = proc->thread_id== (RX_NB_TH-1) ? 0:(proc->thread_id+1);
if
(
cfg
->
ssb_table
.
ssb_period
==
0
||
uint8_t next2_thread_id = next1_thread_id== (RX_NB_TH-1) ? 0:(next1_thread_id+1);
!
(
frame_rx
%
(
1
<<
(
cfg
->
ssb_table
.
ssb_period
-
1
)))){
*/
int
coreset_nb_rb
=
0
;
int
coreset_start_rb
=
0
;
if
(
phy_pdcch_config
->
nb_search_space
>
0
)
get_coreset_rballoc
(
phy_pdcch_config
->
pdcch_config
[
0
].
coreset
.
frequency_domain_resource
,
&
coreset_nb_rb
,
&
coreset_start_rb
);
slot_pbch
=
is_pbch_in_slot
(
cfg
,
frame_rx
,
nr_slot_rx
,
fp
);
slot_ssb
=
is_ssb_in_slot
(
cfg
,
frame_rx
,
nr_slot_rx
,
fp
);
// looking for pbch only in slot where it is supposed to be
if
(
slot_ssb
)
{
VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME
(
VCD_SIGNAL_DUMPER_FUNCTIONS_UE_SLOT_FEP_PBCH
,
VCD_FUNCTION_IN
);
LOG_D
(
PHY
,
" ------ PBCH ChannelComp/LLR: frame.slot %d.%d ------
\n
"
,
frame_rx
%
1024
,
nr_slot_rx
);
const
int
estimateSz
=
fp
->
symbols_per_slot
*
fp
->
ofdm_symbol_size
;
const
int
estimateSz
=
fp
->
symbols_per_slot
*
fp
->
ofdm_symbol_size
;
__attribute__
((
aligned
(
32
)))
struct
complex16
dl_ch_estimates
[
fp
->
nb_antennas_rx
][
estimateSz
];
// loop over SSB blocks
__attribute__
((
aligned
(
32
)))
struct
complex16
dl_ch_estimates_time
[
fp
->
nb_antennas_rx
][
fp
->
ofdm_symbol_size
];
for
(
int
ssb_index
=
0
;
ssb_index
<
fp
->
Lmax
;
ssb_index
++
)
{
uint32_t
curr_mask
=
cfg
->
ssb_table
.
ssb_mask_list
[
ssb_index
/
32
].
ssb_mask
;
for
(
int
i
=
1
;
i
<
4
;
i
++
)
{
// check if if current SSB is transmitted
if
((
curr_mask
>>
(
31
-
(
ssb_index
%
32
)))
&
0x01
)
{
nr_slot_fep
(
ue
,
int
ssb_start_symbol
=
nr_get_ssb_start_symbol
(
fp
,
ssb_index
);
proc
,
int
ssb_slot
=
ssb_start_symbol
/
fp
->
symbols_per_slot
;
(
ue
->
symbol_offset
+
i
)
%
(
fp
->
symbols_per_slot
),
int
ssb_slot_2
=
(
cfg
->
ssb_table
.
ssb_period
==
0
)
?
ssb_slot
+
(
fp
->
slots_per_frame
>>
1
)
:
-
1
;
nr_slot_rx
);
if
(
ssb_slot
==
nr_slot_rx
||
start_meas
(
&
ue
->
dlsch_channel_estimation_stats
);
ssb_slot_2
==
nr_slot_rx
)
{
nr_pbch_channel_estimation
(
ue
,
estimateSz
,
dl_ch_estimates
,
dl_ch_estimates_time
,
proc
,
gNB_id
,
nr_slot_rx
,(
ue
->
symbol_offset
+
i
)
%
(
fp
->
symbols_per_slot
),
i
-
1
,(
fp
->
ssb_index
)
&
7
,
fp
->
half_frame_bit
);
stop_meas
(
&
ue
->
dlsch_channel_estimation_stats
);
VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME
(
VCD_SIGNAL_DUMPER_FUNCTIONS_UE_SLOT_FEP_PBCH
,
VCD_FUNCTION_IN
);
}
LOG_D
(
PHY
,
" ------ PBCH ChannelComp/LLR: frame.slot %d.%d ------
\n
"
,
frame_rx
%
1024
,
nr_slot_rx
);
nr_ue_rsrp_measurements
(
ue
,
gNB_id
,
proc
,
nr_slot_rx
,
0
);
__attribute__
((
aligned
(
32
)))
struct
complex16
dl_ch_estimates
[
fp
->
nb_antennas_rx
][
estimateSz
];
__attribute__
((
aligned
(
32
)))
struct
complex16
dl_ch_estimates_time
[
fp
->
nb_antennas_rx
][
fp
->
ofdm_symbol_size
];
if
((
ue
->
decode_MIB
==
1
)
&&
slot_pbch
)
{
for
(
int
i
=
1
;
i
<
4
;
i
++
)
{
LOG_D
(
PHY
,
" ------ Decode MIB: frame.slot %d.%d ------
\n
"
,
frame_rx
%
1024
,
nr_slot_rx
);
nr_slot_fep
(
ue
,
nr_ue_pbch_procedures
(
gNB_id
,
ue
,
proc
,
estimateSz
,
dl_ch_estimates
,
phy_pdcch_config
);
proc
,
(
ssb_start_symbol
+
i
)
%
(
fp
->
symbols_per_slot
),
nr_slot_rx
);
start_meas
(
&
ue
->
dlsch_channel_estimation_stats
);
nr_pbch_channel_estimation
(
ue
,
estimateSz
,
dl_ch_estimates
,
dl_ch_estimates_time
,
proc
,
gNB_id
,
nr_slot_rx
,
(
ssb_start_symbol
+
i
)
%
(
fp
->
symbols_per_slot
),
i
-
1
,
ssb_index
&
7
,
ssb_slot_2
==
nr_slot_rx
);
stop_meas
(
&
ue
->
dlsch_channel_estimation_stats
);
}
if
(
ue
->
no_timing_correction
==
0
)
{
nr_ue_ssb_rsrp_measurements
(
ue
,
ssb_index
,
proc
,
nr_slot_rx
);
LOG_D
(
PHY
,
"start adjust sync slot = %d no timing %d
\n
"
,
nr_slot_rx
,
ue
->
no_timing_correction
);
nr_adjust_synch_ue
(
fp
,
// resetting ssb index for PBCH detection if there is a stronger SSB index
ue
,
if
(
ue
->
measurements
.
ssb_rsrp_dBm
[
ssb_index
]
>
ue
->
measurements
.
ssb_rsrp_dBm
[
fp
->
ssb_index
])
gNB_id
,
fp
->
ssb_index
=
ssb_index
;
fp
->
ofdm_symbol_size
,
dl_ch_estimates_time
,
if
(
ssb_index
==
fp
->
ssb_index
)
{
frame_rx
,
nr_slot_rx
,
LOG_D
(
PHY
,
" ------ Decode MIB: frame.slot %d.%d ------
\n
"
,
frame_rx
%
1024
,
nr_slot_rx
);
0
,
nr_ue_pbch_procedures
(
gNB_id
,
ue
,
proc
,
estimateSz
,
dl_ch_estimates
,
phy_pdcch_config
);
16384
);
if
(
ue
->
no_timing_correction
==
0
)
{
LOG_D
(
PHY
,
"start adjust sync slot = %d no timing %d
\n
"
,
nr_slot_rx
,
ue
->
no_timing_correction
);
nr_adjust_synch_ue
(
fp
,
ue
,
gNB_id
,
fp
->
ofdm_symbol_size
,
dl_ch_estimates_time
,
frame_rx
,
nr_slot_rx
,
0
,
16384
);
}
}
LOG_D
(
PHY
,
"Doing N0 measurements in %s
\n
"
,
__FUNCTION__
);
nr_ue_rrc_measurements
(
ue
,
proc
,
nr_slot_rx
);
VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME
(
VCD_SIGNAL_DUMPER_FUNCTIONS_UE_SLOT_FEP_PBCH
,
VCD_FUNCTION_OUT
);
}
}
}
LOG_D
(
PHY
,
"Doing N0 measurements in %s
\n
"
,
__FUNCTION__
);
nr_ue_rrc_measurements
(
ue
,
proc
,
nr_slot_rx
);
VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME
(
VCD_SIGNAL_DUMPER_FUNCTIONS_UE_SLOT_FEP_PBCH
,
VCD_FUNCTION_OUT
);
}
}
}
}
...
@@ -1499,6 +1432,7 @@ int phy_procedures_nrUE_RX(PHY_VARS_NR_UE *ue,
...
@@ -1499,6 +1432,7 @@ int phy_procedures_nrUE_RX(PHY_VARS_NR_UE *ue,
LOG_D
(
PHY
,
" ------ --> PDCCH ChannelComp/LLR Frame.slot %d.%d ------
\n
"
,
frame_rx
%
1024
,
nr_slot_rx
);
LOG_D
(
PHY
,
" ------ --> PDCCH ChannelComp/LLR Frame.slot %d.%d ------
\n
"
,
frame_rx
%
1024
,
nr_slot_rx
);
VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME
(
VCD_SIGNAL_DUMPER_FUNCTIONS_UE_SLOT_FEP_PDCCH
,
VCD_FUNCTION_IN
);
VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME
(
VCD_SIGNAL_DUMPER_FUNCTIONS_UE_SLOT_FEP_PDCCH
,
VCD_FUNCTION_IN
);
uint8_t
nb_symb_pdcch
=
phy_pdcch_config
->
nb_search_space
>
0
?
phy_pdcch_config
->
pdcch_config
[
0
].
coreset
.
duration
:
0
;
for
(
uint16_t
l
=
0
;
l
<
nb_symb_pdcch
;
l
++
)
{
for
(
uint16_t
l
=
0
;
l
<
nb_symb_pdcch
;
l
++
)
{
start_meas
(
&
ue
->
ofdm_demod_stats
);
start_meas
(
&
ue
->
ofdm_demod_stats
);
...
@@ -1512,7 +1446,13 @@ int phy_procedures_nrUE_RX(PHY_VARS_NR_UE *ue,
...
@@ -1512,7 +1446,13 @@ int phy_procedures_nrUE_RX(PHY_VARS_NR_UE *ue,
int32_t
pdcch_est_size
=
((((
fp
->
symbols_per_slot
*
(
fp
->
ofdm_symbol_size
+
LTE_CE_FILTER_LENGTH
))
+
15
)
/
16
)
*
16
);
int32_t
pdcch_est_size
=
((((
fp
->
symbols_per_slot
*
(
fp
->
ofdm_symbol_size
+
LTE_CE_FILTER_LENGTH
))
+
15
)
/
16
)
*
16
);
__attribute__
((
aligned
(
16
)))
int32_t
pdcch_dl_ch_estimates
[
4
*
fp
->
nb_antennas_rx
][
pdcch_est_size
];
__attribute__
((
aligned
(
16
)))
int32_t
pdcch_dl_ch_estimates
[
4
*
fp
->
nb_antennas_rx
][
pdcch_est_size
];
dci_cnt
=
0
;
int
coreset_nb_rb
=
0
;
int
coreset_start_rb
=
0
;
if
(
phy_pdcch_config
->
nb_search_space
>
0
)
get_coreset_rballoc
(
phy_pdcch_config
->
pdcch_config
[
0
].
coreset
.
frequency_domain_resource
,
&
coreset_nb_rb
,
&
coreset_start_rb
);
uint8_t
dci_cnt
=
0
;
for
(
int
n_ss
=
0
;
n_ss
<
phy_pdcch_config
->
nb_search_space
;
n_ss
++
)
{
for
(
int
n_ss
=
0
;
n_ss
<
phy_pdcch_config
->
nb_search_space
;
n_ss
++
)
{
for
(
uint16_t
l
=
0
;
l
<
nb_symb_pdcch
;
l
++
)
{
for
(
uint16_t
l
=
0
;
l
<
nb_symb_pdcch
;
l
++
)
{
...
...
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,
...
@@ -2617,27 +2617,31 @@ uint8_t get_ssb_rsrp_payload(NR_UE_MAC_INST_t *mac,
}
else
}
else
nb_meas
=
2
;
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
++
)
{
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
==
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
])){
*
(
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
///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
;
break
;
}
}
}
}
AssertFatal
(
nb_ssb
>
0
,
"No SSB found in the resource set
\n
"
);
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
));
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)
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
//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
;
ssb_rsrp
[
1
][
0
]
=
mac
->
ssb_rsrp_dBm
;
uint8_t
ssbi
;
uint8_t
ssbi
;
...
...
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