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
zzha zzha
OpenXG-RAN
Commits
7fc88afb
Commit
7fc88afb
authored
Jun 22, 2023
by
Robert Schmidt
Browse files
Options
Browse Files
Download
Plain Diff
Merge remote-tracking branch 'origin/NR_UE_towards_resync' into integration_2023_w25
parents
773a35ef
85aaf3a0
Changes
14
Show whitespace changes
Inline
Side-by-side
Showing
14 changed files
with
136 additions
and
41 deletions
+136
-41
nfapi/open-nFAPI/nfapi/public_inc/fapi_nr_ue_interface.h
nfapi/open-nFAPI/nfapi/public_inc/fapi_nr_ue_interface.h
+8
-0
openair1/PHY/NR_UE_TRANSPORT/csi_rx.c
openair1/PHY/NR_UE_TRANSPORT/csi_rx.c
+1
-0
openair1/SCHED_NR_UE/phy_procedures_nr_ue.c
openair1/SCHED_NR_UE/phy_procedures_nr_ue.c
+5
-2
openair1/SIMULATION/NR_PHY/nr_dummy_functions.c
openair1/SIMULATION/NR_PHY/nr_dummy_functions.c
+4
-0
openair2/COMMON/mac_messages_def.h
openair2/COMMON/mac_messages_def.h
+1
-0
openair2/COMMON/mac_messages_types.h
openair2/COMMON/mac_messages_types.h
+8
-2
openair2/LAYER2/NR_MAC_UE/mac_defs.h
openair2/LAYER2/NR_MAC_UE/mac_defs.h
+0
-3
openair2/LAYER2/NR_MAC_UE/nr_ue_procedures.c
openair2/LAYER2/NR_MAC_UE/nr_ue_procedures.c
+0
-2
openair2/NR_UE_PHY_INTERFACE/NR_IF_Module.c
openair2/NR_UE_PHY_INTERFACE/NR_IF_Module.c
+14
-11
openair2/RRC/NR_UE/L2_interface_ue.c
openair2/RRC/NR_UE/L2_interface_ue.c
+10
-0
openair2/RRC/NR_UE/rrc_UE.c
openair2/RRC/NR_UE/rrc_UE.c
+13
-19
openair2/RRC/NR_UE/rrc_defs.h
openair2/RRC/NR_UE/rrc_defs.h
+5
-0
openair2/RRC/NR_UE/rrc_proto.h
openair2/RRC/NR_UE/rrc_proto.h
+7
-2
openair2/RRC/NR_UE/rrc_timers_and_constants.c
openair2/RRC/NR_UE/rrc_timers_and_constants.c
+60
-0
No files found.
nfapi/open-nFAPI/nfapi/public_inc/fapi_nr_ue_interface.h
View file @
7fc88afb
...
...
@@ -49,6 +49,12 @@ typedef struct {
uint32_t
sr
;
}
fapi_nr_uci_pdu_rel15_t
;
typedef
enum
{
RLM_no_monitoring
=
0
,
RLM_out_of_sync
=
1
,
RLM_in_sync
=
2
}
rlm_t
;
typedef
struct
{
uint32_t
rsrp
;
int
rsrp_dBm
;
...
...
@@ -56,6 +62,7 @@ typedef struct {
uint8_t
i1
;
uint8_t
i2
;
uint8_t
cqi
;
rlm_t
radiolink_monitoring
;
}
fapi_nr_csirs_measurements_t
;
typedef
struct
{
...
...
@@ -125,6 +132,7 @@ typedef struct {
uint16_t
cell_id
;
uint16_t
ssb_start_subcarrier
;
short
rsrp_dBm
;
rlm_t
radiolink_monitoring
;
// -1 no monitoring, 0 out_of_sync, 1 in_sync
}
fapi_nr_ssb_pdu_t
;
typedef
struct
{
...
...
openair1/PHY/NR_UE_TRANSPORT/csi_rx.c
View file @
7fc88afb
...
...
@@ -1006,6 +1006,7 @@ void nr_ue_csi_rs_procedures(PHY_VARS_NR_UE *ue, UE_nr_rxtx_proc_t *proc, c16_t
csirs_measurements
.
i1
=
*
i1
;
csirs_measurements
.
i2
=
*
i2
;
csirs_measurements
.
cqi
=
cqi
;
csirs_measurements
.
radiolink_monitoring
=
RLM_no_monitoring
;
// TODO do be activated in case of RLM based on CSI-RS
nr_downlink_indication_t
dl_indication
;
fapi_nr_rx_indication_t
rx_ind
=
{
0
};
nr_fill_dl_indication
(
&
dl_indication
,
NULL
,
&
rx_ind
,
proc
,
ue
,
NULL
);
...
...
openair1/SCHED_NR_UE/phy_procedures_nr_ue.c
View file @
7fc88afb
...
...
@@ -164,16 +164,19 @@ void nr_fill_rx_indication(fapi_nr_rx_indication_t *rx_ind,
fapiPbch_t
*
pbch
=
(
fapiPbch_t
*
)
typeSpecific
;
memcpy
(
ssb_pdu
->
pdu
,
pbch
->
decoded_output
,
sizeof
(
pbch
->
decoded_output
));
ssb_pdu
->
additional_bits
=
pbch
->
xtra_byte
;
ssb_pdu
->
ssb_index
=
(
frame_parms
->
ssb_index
)
&
0x7
;
ssb_pdu
->
ssb_index
=
(
frame_parms
->
ssb_index
)
&
0x7
;
ssb_pdu
->
ssb_length
=
frame_parms
->
Lmax
;
ssb_pdu
->
cell_id
=
frame_parms
->
Nid_cell
;
ssb_pdu
->
ssb_start_subcarrier
=
frame_parms
->
ssb_start_subcarrier
;
ssb_pdu
->
rsrp_dBm
=
ue
->
measurements
.
ssb_rsrp_dBm
[
frame_parms
->
ssb_index
];
ssb_pdu
->
radiolink_monitoring
=
RLM_in_sync
;
// TODO to be removed from here
ssb_pdu
->
decoded_pdu
=
true
;
}
else
else
{
ssb_pdu
->
radiolink_monitoring
=
RLM_out_of_sync
;
// TODO to be removed from here
ssb_pdu
->
decoded_pdu
=
false
;
}
}
break
;
case
FAPI_NR_CSIRS_IND
:
memcpy
(
&
rx_ind
->
rx_indication_body
[
n_pdus
-
1
].
csirs_measurements
,
...
...
openair1/SIMULATION/NR_PHY/nr_dummy_functions.c
View file @
7fc88afb
...
...
@@ -28,6 +28,10 @@ int nfapi_nr_p7_message_pack(void *pMessageBuf, void *pPackedBuf, uint32_t packe
int
nfapi_nr_p7_message_unpack
(
void
*
pMessageBuf
,
uint32_t
messageBufLen
,
void
*
pUnpackedBuf
,
uint32_t
unpackedBufLen
,
nfapi_p7_codec_config_t
*
config
)
{
return
0
;
}
int
nfapi_p7_message_header_unpack
(
void
*
pMessageBuf
,
uint32_t
messageBufLen
,
void
*
pUnpackedBuf
,
uint32_t
unpackedBufLen
,
nfapi_p7_codec_config_t
*
config
)
{
return
0
;
}
void
nr_mac_rrc_sync_ind
(
const
module_id_t
module_id
,
const
frame_t
frame
,
const
bool
in_sync
)
{}
void
rrc_data_ind
(
const
protocol_ctxt_t
*
const
ctxt_pP
,
const
rb_id_t
Srb_id
,
const
sdu_size_t
sdu_sizeP
,
...
...
openair2/COMMON/mac_messages_def.h
View file @
7fc88afb
...
...
@@ -30,6 +30,7 @@
// Messages between RRC and MAC layers
MESSAGE_DEF
(
RRC_MAC_IN_SYNC_IND
,
MESSAGE_PRIORITY_MED_PLUS
,
RrcMacInSyncInd
,
rrc_mac_in_sync_ind
)
MESSAGE_DEF
(
RRC_MAC_OUT_OF_SYNC_IND
,
MESSAGE_PRIORITY_MED_PLUS
,
RrcMacOutOfSyncInd
,
rrc_mac_out_of_sync_ind
)
MESSAGE_DEF
(
NR_RRC_MAC_SYNC_IND
,
MESSAGE_PRIORITY_MED_PLUS
,
NRRrcMacSyncInd
,
nr_rrc_mac_sync_ind
)
MESSAGE_DEF
(
RRC_MAC_BCCH_DATA_REQ
,
MESSAGE_PRIORITY_MED_PLUS
,
RrcMacBcchDataReq
,
rrc_mac_bcch_data_req
)
MESSAGE_DEF
(
RRC_MAC_BCCH_DATA_IND
,
MESSAGE_PRIORITY_MED_PLUS
,
RrcMacBcchDataInd
,
rrc_mac_bcch_data_ind
)
...
...
openair2/COMMON/mac_messages_types.h
View file @
7fc88afb
...
...
@@ -36,6 +36,7 @@
// Defines to access message fields.
#define RRC_MAC_IN_SYNC_IND(mSGpTR) (mSGpTR)->ittiMsg.rrc_mac_in_sync_ind
#define RRC_MAC_OUT_OF_SYNC_IND(mSGpTR) (mSGpTR)->ittiMsg.rrc_mac_out_of_sync_ind
#define NR_RRC_MAC_SYNC_IND(mSGpTR) (mSGpTR)->ittiMsg.nr_rrc_mac_sync_ind
#define RRC_MAC_BCCH_DATA_REQ(mSGpTR) (mSGpTR)->ittiMsg.rrc_mac_bcch_data_req
#define RRC_MAC_BCCH_DATA_IND(mSGpTR) (mSGpTR)->ittiMsg.rrc_mac_bcch_data_ind
...
...
@@ -72,6 +73,11 @@ typedef struct RrcMacInSyncInd_s {
typedef
RrcMacInSyncInd
RrcMacOutOfSyncInd
;
typedef
struct
NRRrcMacSyncInd_s
{
uint32_t
frame
;
bool
in_sync
;
}
NRRrcMacSyncInd
;
typedef
struct
RrcMacBcchDataReq_s
{
uint32_t
frame
;
uint32_t
sdu_size
;
...
...
openair2/LAYER2/NR_MAC_UE/mac_defs.h
View file @
7fc88afb
...
...
@@ -367,12 +367,9 @@ typedef struct {
}
PUCCH_sched_t
;
typedef
struct
{
uint32_t
ssb_index
;
/// SSB RSRP in dBm
short
ssb_rsrp_dBm
;
int
consecutive_bch_failures
;
}
NR_SSB_meas_t
;
typedef
struct
NR_UL_TIME_ALIGNMENT
{
...
...
openair2/LAYER2/NR_MAC_UE/nr_ue_procedures.c
View file @
7fc88afb
...
...
@@ -263,8 +263,6 @@ int8_t nr_ue_decode_mib(module_id_t module_id,
AssertFatal
(
mac
->
mib
!=
NULL
,
"nr_ue_decode_mib() mac->mib == NULL
\n
"
);
mac
->
ssb_measurements
.
consecutive_bch_failures
=
0
;
// resetting decoding failures
uint16_t
frame
=
(
mac
->
mib
->
systemFrameNumber
.
buf
[
0
]
>>
mac
->
mib
->
systemFrameNumber
.
bits_unused
);
uint16_t
frame_number_4lsb
=
0
;
...
...
openair2/NR_UE_PHY_INTERFACE/NR_IF_Module.c
View file @
7fc88afb
...
...
@@ -1052,14 +1052,6 @@ int handle_bcch_bch(module_id_t module_id, int cc_id,
}
void
handle_bch_failure
(
NR_UE_MAC_INST_t
*
mac
)
{
mac
->
ssb_measurements
.
consecutive_bch_failures
++
;
//TODO handle this properly by scheduling re-synchronization
AssertFatal
(
mac
->
ssb_measurements
.
consecutive_bch_failures
<
100
,
"Radio link failure caused by 100 consecutive PBCH detection failures.
\n
"
);
}
// L2 Abstraction Layer
int
handle_bcch_dlsch
(
module_id_t
module_id
,
int
cc_id
,
unsigned
int
gNB_index
,
uint8_t
ack_nack
,
uint8_t
*
pduP
,
uint32_t
pdu_len
){
return
nr_ue_decode_BCCH_DL_SCH
(
module_id
,
cc_id
,
gNB_index
,
ack_nack
,
pduP
,
pdu_len
);
...
...
@@ -1098,7 +1090,17 @@ int8_t handle_dlsch(nr_downlink_indication_t *dl_info, int pdu_id)
return
0
;
}
int8_t
handle_csirs_measurements
(
module_id_t
module_id
,
frame_t
frame
,
int
slot
,
fapi_nr_csirs_measurements_t
*
csirs_measurements
)
{
void
handle_rlm
(
rlm_t
rlm_result
,
int
frame
,
module_id_t
module_id
)
{
if
(
rlm_result
==
RLM_no_monitoring
)
return
;
bool
is_sync
=
rlm_result
==
RLM_in_sync
?
true
:
false
;
nr_mac_rrc_sync_ind
(
module_id
,
frame
,
is_sync
);
}
int8_t
handle_csirs_measurements
(
module_id_t
module_id
,
frame_t
frame
,
int
slot
,
fapi_nr_csirs_measurements_t
*
csirs_measurements
)
{
handle_rlm
(
csirs_measurements
->
radiolink_monitoring
,
frame
,
module_id
);
return
nr_ue_process_csirs_measurements
(
module_id
,
frame
,
slot
,
csirs_measurements
);
}
...
...
@@ -1197,6 +1199,9 @@ int nr_ue_dl_indication(nr_downlink_indication_t *dl_info)
switch
(
rx_indication_body
.
pdu_type
){
case
FAPI_NR_RX_PDU_TYPE_SSB
:
handle_rlm
(
rx_indication_body
.
ssb_pdu
.
radiolink_monitoring
,
dl_info
->
frame
,
dl_info
->
module_id
);
if
(
rx_indication_body
.
ssb_pdu
.
decoded_pdu
)
{
handle_ssb_meas
(
mac
,
rx_indication_body
.
ssb_pdu
.
ssb_index
,
...
...
@@ -1209,8 +1214,6 @@ int nr_ue_dl_indication(nr_downlink_indication_t *dl_info)
rx_indication_body
.
ssb_pdu
.
ssb_start_subcarrier
,
rx_indication_body
.
ssb_pdu
.
cell_id
))
<<
FAPI_NR_RX_PDU_TYPE_SSB
;
}
else
handle_bch_failure
(
mac
);
break
;
case
FAPI_NR_RX_PDU_TYPE_SIB
:
ret_mask
|=
(
handle_bcch_dlsch
(
dl_info
->
module_id
,
...
...
openair2/RRC/NR_UE/L2_interface_ue.c
View file @
7fc88afb
...
...
@@ -39,6 +39,16 @@
typedef
uint32_t
channel_t
;
void
nr_mac_rrc_sync_ind
(
const
module_id_t
module_id
,
const
frame_t
frame
,
const
bool
in_sync
)
{
MessageDef
*
message_p
=
itti_alloc_new_message
(
TASK_MAC_UE
,
0
,
NR_RRC_MAC_SYNC_IND
);
NR_RRC_MAC_SYNC_IND
(
message_p
).
frame
=
frame
;
NR_RRC_MAC_SYNC_IND
(
message_p
).
in_sync
=
in_sync
;
itti_send_msg_to_task
(
TASK_RRC_NRUE
,
GNB_MODULE_ID_TO_INSTANCE
(
module_id
),
message_p
);
}
int8_t
nr_mac_rrc_data_ind_ue
(
const
module_id_t
module_id
,
const
int
CC_id
,
const
uint8_t
gNB_index
,
...
...
openair2/RRC/NR_UE/rrc_UE.c
View file @
7fc88afb
...
...
@@ -2249,24 +2249,6 @@ int32_t nr_rrc_ue_establish_drb(module_id_t ue_mod_idP,
return
0
;
}
void
nr_rrc_handle_timers
(
unsigned
int
mod_id
)
{
NR_UE_Timers_Constants_t
*
timers
=
&
NR_UE_rrc_inst
[
mod_id
].
timers_and_constants
;
// T304
if
(
timers
->
T304_active
==
true
)
{
timers
->
T304_cnt
+=
10
;
if
(
timers
->
T304_cnt
>=
timers
->
T304_k
)
{
// TODO
// For T304 of MCG, in case of the handover from NR or intra-NR
// handover, initiate the RRC re-establishment procedure;
// In case of handover to NR, perform the actions defined in the
// specifications applicable for the source RAT.
}
}
}
void
*
rrc_nrue_task
(
void
*
args_p
)
{
MessageDef
*
msg_p
;
...
...
@@ -2293,10 +2275,22 @@ void *rrc_nrue_task(void *args_p)
LOG_D
(
NR_RRC
,
"[UE %d] Received %s
\n
"
,
ue_mod_id
,
ITTI_MSG_NAME
(
msg_p
));
break
;
case
NR_RRC_MAC_SYNC_IND
:
LOG_D
(
NR_RRC
,
"[UE %d] Received %s: frame %d
\n
"
,
ue_mod_id
,
ITTI_MSG_NAME
(
msg_p
),
NR_RRC_MAC_SYNC_IND
(
msg_p
).
frame
);
nr_sync_msg_t
sync_msg
=
NR_RRC_MAC_SYNC_IND
(
msg_p
).
in_sync
?
IN_SYNC
:
OUT_OF_SYNC
;
NR_UE_Timers_Constants_t
*
tac
=
&
NR_UE_rrc_inst
[
ue_mod_id
].
timers_and_constants
;
handle_rlf_sync
(
tac
,
sync_msg
);
break
;
case
NRRRC_SLOT_PROCESS
:
LOG_D
(
NR_RRC
,
"[UE %d] Receided %s: frame %d slot %d
\n
"
,
ue_mod_id
,
ITTI_MSG_NAME
(
msg_p
),
NRRRC_SLOT_PROCESS
(
msg_p
).
frame
,
NRRRC_SLOT_PROCESS
(
msg_p
).
slot
);
nr_rrc_handle_timers
(
ue_mod_id
);
NR_UE_Timers_Constants_t
*
timers
=
&
NR_UE_rrc_inst
[
ue_mod_id
].
timers_and_constants
;
nr_rrc_handle_timers
(
timers
);
break
;
case
NR_RRC_MAC_BCCH_DATA_IND
:
...
...
openair2/RRC/NR_UE/rrc_defs.h
View file @
7fc88afb
...
...
@@ -182,6 +182,11 @@ typedef struct NR_UE_Timers_Constants_s {
uint32_t
T319_k
;
}
NR_UE_Timers_Constants_t
;
typedef
enum
{
OUT_OF_SYNC
=
0
,
IN_SYNC
=
1
}
nr_sync_msg_t
;
typedef
struct
NR_UE_RRC_INST_s
{
NR_MeasConfig_t
*
meas_config
;
NR_CellGroupConfig_t
*
cell_group_config
;
...
...
openair2/RRC/NR_UE/rrc_proto.h
View file @
7fc88afb
...
...
@@ -113,6 +113,10 @@ int8_t nr_mac_rrc_data_ind_ue(const module_id_t module_id,
const
uint8_t
*
pduP
,
const
sdu_size_t
pdu_len
);
void
nr_mac_rrc_sync_ind
(
const
module_id_t
module_id
,
const
frame_t
frame
,
const
bool
in_sync
);
/**\brief
\param module_id module id
\param CC_id component carrier id
...
...
@@ -133,8 +137,7 @@ int8_t nr_rrc_RA_succeeded(const module_id_t mod_id, const uint8_t gNB_index);
\param void *args_p Pointer on arguments to start the task. */
void
*
rrc_nrue_task
(
void
*
args_p
);
/**\brief RRC timers update at UE. */
void
*
nr_rrc_timers_update
();
void
nr_rrc_handle_timers
(
NR_UE_Timers_Constants_t
*
timers
);
/**\brief RRC NSA UE task.
\param void *args_p Pointer on arguments to start the task. */
...
...
@@ -162,6 +165,8 @@ void reset_rlf_timers_and_constants(NR_UE_Timers_Constants_t *tac);
void
set_default_timers_and_constants
(
NR_UE_Timers_Constants_t
*
tac
);
void
nr_rrc_set_sib1_timers_and_constants
(
NR_UE_Timers_Constants_t
*
tac
,
NR_SIB1_t
*
sib1
);
void
nr_rrc_set_T304
(
NR_UE_Timers_Constants_t
*
tac
,
NR_ReconfigurationWithSync_t
*
reconfigurationWithSync
);
void
handle_rlf_sync
(
NR_UE_Timers_Constants_t
*
tac
,
nr_sync_msg_t
sync_msg
);
void
nr_rrc_handle_SetupRelease_RLF_TimersAndConstants
(
NR_UE_RRC_INST_t
*
rrc
,
struct
NR_SetupRelease_RLF_TimersAndConstants
*
rlf_TimersAndConstants
);
...
...
openair2/RRC/NR_UE/rrc_timers_and_constants.c
View file @
7fc88afb
...
...
@@ -21,6 +21,29 @@
#include "openair2/RRC/NR_UE/rrc_proto.h"
void
nr_rrc_handle_timers
(
NR_UE_Timers_Constants_t
*
timers
)
{
// T304
if
(
timers
->
T304_active
==
true
)
{
timers
->
T304_cnt
+=
10
;
if
(
timers
->
T304_cnt
>=
timers
->
T304_k
)
{
// TODO
// For T304 of MCG, in case of the handover from NR or intra-NR
// handover, initiate the RRC re-establishment procedure;
// In case of handover to NR, perform the actions defined in the
// specifications applicable for the source RAT.
}
}
if
(
timers
->
T310_active
==
true
)
{
timers
->
T310_cnt
+=
10
;
if
(
timers
->
T310_cnt
>=
timers
->
T310_k
)
{
// TODO
// handle detection of radio link failure
// as described in 5.3.10.3 of 38.331
AssertFatal
(
false
,
"Radio link failure! Not handled yet!
\n
"
);
}
}
}
void
nr_rrc_set_T304
(
NR_UE_Timers_Constants_t
*
tac
,
NR_ReconfigurationWithSync_t
*
reconfigurationWithSync
)
{
...
...
@@ -402,6 +425,43 @@ void nr_rrc_handle_SetupRelease_RLF_TimersAndConstants(NR_UE_RRC_INST_t *rrc,
}
}
void
handle_rlf_sync
(
NR_UE_Timers_Constants_t
*
tac
,
nr_sync_msg_t
sync_msg
)
{
if
(
sync_msg
==
IN_SYNC
)
{
tac
->
N310_cnt
=
0
;
if
(
tac
->
T310_active
)
{
tac
->
N311_cnt
++
;
// Upon receiving N311 consecutive "in-sync" indications
if
(
tac
->
N311_cnt
>=
tac
->
N311_k
)
{
// stop timer T310
tac
->
T310_active
=
false
;
tac
->
T310_cnt
=
0
;
tac
->
N311_cnt
=
0
;
}
}
}
else
{
// OUT_OF_SYNC
tac
->
N311_cnt
=
0
;
if
(
tac
->
T300_active
||
tac
->
T301_active
||
tac
->
T304_active
||
tac
->
T310_active
||
tac
->
T311_active
||
tac
->
T319_active
)
return
;
tac
->
N310_cnt
++
;
// upon receiving N310 consecutive "out-of-sync" indications
if
(
tac
->
N310_cnt
>=
tac
->
N310_k
)
{
// start timer T310
tac
->
T310_active
=
true
;
tac
->
T310_cnt
=
0
;
tac
->
N310_cnt
=
0
;
}
}
}
void
set_default_timers_and_constants
(
NR_UE_Timers_Constants_t
*
tac
)
{
// 38.331 9.2.3 Default values timers and constants
...
...
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