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
spbro
OpenXG-RAN
Commits
527c0164
Commit
527c0164
authored
May 17, 2023
by
francescomani
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
tick for timing at RRC
parent
b5819904
Changes
11
Hide whitespace changes
Inline
Side-by-side
Showing
11 changed files
with
81 additions
and
58 deletions
+81
-58
executables/nr-ue.c
executables/nr-ue.c
+2
-0
executables/nr-uesoftmodem.c
executables/nr-uesoftmodem.c
+0
-4
openair1/SIMULATION/NR_PHY/nr_dummy_functions.c
openair1/SIMULATION/NR_PHY/nr_dummy_functions.c
+1
-1
openair2/COMMON/mac_messages_types.h
openair2/COMMON/mac_messages_types.h
+2
-2
openair2/COMMON/rrc_messages_def.h
openair2/COMMON/rrc_messages_def.h
+1
-0
openair2/COMMON/rrc_messages_types.h
openair2/COMMON/rrc_messages_types.h
+7
-1
openair2/F1AP/f1ap_cu_rrc_message_transfer.c
openair2/F1AP/f1ap_cu_rrc_message_transfer.c
+4
-4
openair2/NR_UE_PHY_INTERFACE/NR_IF_Module.h
openair2/NR_UE_PHY_INTERFACE/NR_IF_Module.h
+0
-3
openair2/RRC/NR_UE/L2_interface_ue.c
openair2/RRC/NR_UE/L2_interface_ue.c
+3
-3
openair2/RRC/NR_UE/rrc_UE.c
openair2/RRC/NR_UE/rrc_UE.c
+58
-39
openair2/RRC/NR_UE/rrc_proto.h
openair2/RRC/NR_UE/rrc_proto.h
+3
-1
No files found.
executables/nr-ue.c
View file @
527c0164
...
...
@@ -949,6 +949,8 @@ void *UE_thread(void *arg) {
timing_advance
=
UE
->
timing_advance
;
}
nr_ue_rrc_timer_trigger
(
UE
->
Mod_id
,
curMsg
.
proc
.
frame_tx
,
curMsg
.
proc
.
nr_slot_tx
);
// Start TX slot processing here. It runs in parallel with RX slot processing
notifiedFIFO_elt_t
*
newElt
=
newNotifiedFIFO_elt
(
sizeof
(
nr_rxtx_thread_data_t
),
curMsg
.
proc
.
nr_slot_tx
,
&
txFifo
,
processSlotTX
);
nr_rxtx_thread_data_t
*
curMsgTx
=
(
nr_rxtx_thread_data_t
*
)
NotifiedFifoData
(
newElt
);
...
...
executables/nr-uesoftmodem.c
View file @
527c0164
...
...
@@ -214,10 +214,6 @@ int create_tasks_nrue(uint32_t ue_nb) {
itti_wait_ready
(
0
);
// Thread to update the RRC timers (in msec) at UE
pthread_t
timers_update
;
threadCreate
(
&
timers_update
,
nr_rrc_timers_update
,
NULL
,
"nr_rrc_timer_update"
,
-
1
,
OAI_PRIORITY_RT_LOW
);
return
0
;
}
...
...
openair1/SIMULATION/NR_PHY/nr_dummy_functions.c
View file @
527c0164
...
...
@@ -38,7 +38,7 @@ int8_t nr_mac_rrc_data_ind_ue(const module_id_t module_id,
const
int
CC_id
,
const
uint8_t
gNB_index
,
const
frame_t
frame
,
const
sub_frame_t
sub_frame
,
const
int
slot
,
const
rnti_t
rnti
,
const
channel_t
channel
,
const
uint8_t
*
pduP
,
...
...
openair2/COMMON/mac_messages_types.h
View file @
527c0164
...
...
@@ -91,7 +91,7 @@ typedef struct RrcMacBcchDataInd_s {
typedef
struct
NRRrcMacBcchDataInd_s
{
uint32_t
frame
;
uint8_t
s
ub_frame
;
uint8_t
s
lot
;
uint32_t
sdu_size
;
uint8_t
sdu
[
BCCH_SDU_SIZE
];
uint8_t
gnb_index
;
...
...
@@ -140,7 +140,7 @@ typedef struct RrcMacCcchDataInd_s {
typedef
struct
NRRrcMacCcchDataInd_s
{
uint32_t
frame
;
uint8_t
s
ub_frame
;
uint8_t
s
lot
;
uint16_t
rnti
;
uint32_t
sdu_size
;
uint8_t
sdu
[
CCCH_SDU_SIZE
];
...
...
openair2/COMMON/rrc_messages_def.h
View file @
527c0164
...
...
@@ -79,6 +79,7 @@ MESSAGE_DEF(NAS_DOWNLINK_DATA_IND, MESSAGE_PRIORITY_MED, NasDlDataInd
// eNB: realtime -> RRC messages
MESSAGE_DEF
(
RRC_SUBFRAME_PROCESS
,
MESSAGE_PRIORITY_MED
,
RrcSubframeProcess
,
rrc_subframe_process
)
MESSAGE_DEF
(
NRRRC_SLOT_PROCESS
,
MESSAGE_PRIORITY_MED
,
NRRrcSlotProcess
,
nr_rrc_slot_process
)
// eNB: RLC -> RRC messages
MESSAGE_DEF
(
RLC_SDU_INDICATION
,
MESSAGE_PRIORITY_MED
,
RlcSduIndication
,
rlc_sdu_indication
)
openair2/COMMON/rrc_messages_types.h
View file @
527c0164
...
...
@@ -88,6 +88,7 @@
#define NAS_DOWNLINK_DATA_IND(mSGpTR) (mSGpTR)->ittiMsg.nas_dl_data_ind
#define RRC_SUBFRAME_PROCESS(mSGpTR) (mSGpTR)->ittiMsg.rrc_subframe_process
#define NRRRC_SLOT_PROCESS(mSGpTR) (mSGpTR)->ittiMsg.nr_rrc_slot_process
#define RLC_SDU_INDICATION(mSGpTR) (mSGpTR)->ittiMsg.rlc_sdu_indication
#define NRDuDlReq(mSGpTR) (mSGpTR)->ittiMsg.nr_du_dl_req
...
...
@@ -460,9 +461,14 @@ typedef dl_info_transfer_ind_t NasDlDataInd;
// eNB: realtime -> RRC messages
typedef
struct
rrc_subframe_process_s
{
protocol_ctxt_t
ctxt
;
int
CC_id
;
int
CC_id
;
}
RrcSubframeProcess
;
typedef
struct
nrrrc_slot_process_s
{
int
frame
;
int
slot
;
}
NRRrcSlotProcess
;
// eNB: RLC -> RRC messages
typedef
struct
rlc_sdu_indication_s
{
int
rnti
;
...
...
openair2/F1AP/f1ap_cu_rrc_message_transfer.c
View file @
527c0164
...
...
@@ -116,12 +116,12 @@ int CU_handle_INITIAL_UL_RRC_MESSAGE_TRANSFER(instance_t instance,
ccch_sdu_len
=
rrccont
->
value
.
choice
.
RRCContainer
.
size
;
memcpy
(
RRC_MAC_CCCH_DATA_IND
(
message_p
).
sdu
,
rrccont
->
value
.
choice
.
RRCContainer
.
buf
,
ccch_sdu_len
);
NR_RRC_MAC_CCCH_DATA_IND
(
message_p
).
frame
=
0
;
NR_RRC_MAC_CCCH_DATA_IND
(
message_p
).
s
ub_frame
=
0
;
NR_RRC_MAC_CCCH_DATA_IND
(
message_p
).
frame
=
0
;
NR_RRC_MAC_CCCH_DATA_IND
(
message_p
).
s
lot
=
0
;
NR_RRC_MAC_CCCH_DATA_IND
(
message_p
).
sdu_size
=
ccch_sdu_len
;
NR_RRC_MAC_CCCH_DATA_IND
(
message_p
).
nr_cellid
=
nr_cellid
;
// CU instance
NR_RRC_MAC_CCCH_DATA_IND
(
message_p
).
rnti
=
rnti
;
NR_RRC_MAC_CCCH_DATA_IND
(
message_p
).
CC_id
=
CC_id
;
NR_RRC_MAC_CCCH_DATA_IND
(
message_p
).
rnti
=
rnti
;
NR_RRC_MAC_CCCH_DATA_IND
(
message_p
).
CC_id
=
CC_id
;
if
(
du2cu
)
{
NR_RRC_MAC_CCCH_DATA_IND
(
message_p
).
du_to_cu_rrc_container
=
malloc
(
sizeof
(
OCTET_STRING_t
));
NR_RRC_MAC_CCCH_DATA_IND
(
message_p
).
du_to_cu_rrc_container
->
size
=
du2cu
->
value
.
choice
.
DUtoCURRCContainer
.
size
;
...
...
openair2/NR_UE_PHY_INTERFACE/NR_IF_Module.h
View file @
527c0164
...
...
@@ -206,8 +206,6 @@ typedef int (nr_ue_dl_indication_f)(nr_downlink_indication_t *dl_info);
*/
typedef
int
(
nr_ue_ul_indication_f
)(
nr_uplink_indication_t
*
ul_info
);
typedef
int
(
nr_ue_dcireq_f
)(
nr_dcireq_t
*
ul_info
);
// TODO check this stuff can be reuse of need modification
typedef
struct
nr_ue_if_module_s
{
nr_ue_scheduled_response_f
*
scheduled_response
;
...
...
@@ -215,7 +213,6 @@ typedef struct nr_ue_if_module_s {
nr_ue_synch_request_f
*
synch_request
;
nr_ue_dl_indication_f
*
dl_indication
;
nr_ue_ul_indication_f
*
ul_indication
;
//nr_ue_dcireq_f *dcireq;
uint32_t
cc_mask
;
uint32_t
current_frame
;
uint32_t
current_slot
;
...
...
openair2/RRC/NR_UE/L2_interface_ue.c
View file @
527c0164
...
...
@@ -43,7 +43,7 @@ int8_t nr_mac_rrc_data_ind_ue(const module_id_t module_id,
const
int
CC_id
,
const
uint8_t
gNB_index
,
const
frame_t
frame
,
const
sub_frame_t
sub_frame
,
const
int
slot
,
const
rnti_t
rnti
,
const
channel_t
channel
,
const
uint8_t
*
pduP
,
...
...
@@ -75,7 +75,7 @@ int8_t nr_mac_rrc_data_ind_ue(const module_id_t module_id,
memset
(
NR_RRC_MAC_BCCH_DATA_IND
(
message_p
).
sdu
,
0
,
BCCH_SDU_SIZE
);
memcpy
(
NR_RRC_MAC_BCCH_DATA_IND
(
message_p
).
sdu
,
pduP
,
sdu_size
);
NR_RRC_MAC_BCCH_DATA_IND
(
message_p
).
frame
=
frame
;
//frameP
NR_RRC_MAC_BCCH_DATA_IND
(
message_p
).
s
ub_frame
=
sub_frame
;
//sub_frameP
NR_RRC_MAC_BCCH_DATA_IND
(
message_p
).
s
lot
=
slot
;
NR_RRC_MAC_BCCH_DATA_IND
(
message_p
).
sdu_size
=
sdu_size
;
NR_RRC_MAC_BCCH_DATA_IND
(
message_p
).
gnb_index
=
gNB_index
;
itti_send_msg_to_task
(
TASK_RRC_NRUE
,
GNB_MODULE_ID_TO_INSTANCE
(
module_id
),
message_p
);
...
...
@@ -100,7 +100,7 @@ int8_t nr_mac_rrc_data_ind_ue(const module_id_t module_id,
memset
(
NR_RRC_MAC_CCCH_DATA_IND
(
message_p
).
sdu
,
0
,
CCCH_SDU_SIZE
);
memcpy
(
NR_RRC_MAC_CCCH_DATA_IND
(
message_p
).
sdu
,
pduP
,
sdu_size
);
NR_RRC_MAC_CCCH_DATA_IND
(
message_p
).
frame
=
frame
;
//frameP
NR_RRC_MAC_CCCH_DATA_IND
(
message_p
).
s
ub_frame
=
sub_frame
;
//sub_frameP
NR_RRC_MAC_CCCH_DATA_IND
(
message_p
).
s
lot
=
slot
;
NR_RRC_MAC_CCCH_DATA_IND
(
message_p
).
sdu_size
=
sdu_size
;
NR_RRC_MAC_CCCH_DATA_IND
(
message_p
).
gnb_index
=
gNB_index
;
NR_RRC_MAC_CCCH_DATA_IND
(
message_p
).
rnti
=
rnti
;
//rntiP
...
...
openair2/RRC/NR_UE/rrc_UE.c
View file @
527c0164
...
...
@@ -2241,15 +2241,33 @@ nr_rrc_ue_establish_srb2(
return
0
;
}
//-----------------------------------------------------------------------------
void
*
rrc_nrue_task
(
void
*
args_p
)
{
MessageDef
*
msg_p
;
instance_t
instance
;
unsigned
int
ue_mod_id
;
int
result
;
NR_SRB_INFO
*
srb_info_p
;
protocol_ctxt_t
ctxt
;
itti_mark_task_ready
(
TASK_RRC_NRUE
);
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
;
instance_t
instance
;
unsigned
int
ue_mod_id
;
int
result
;
NR_SRB_INFO
*
srb_info_p
;
protocol_ctxt_t
ctxt
;
itti_mark_task_ready
(
TASK_RRC_NRUE
);
while
(
1
)
{
// Wait for a message
...
...
@@ -2267,16 +2285,22 @@ nr_rrc_ue_establish_srb2(
LOG_D
(
NR_RRC
,
"[UE %d] Received %s
\n
"
,
ue_mod_id
,
ITTI_MSG_NAME
(
msg_p
));
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
);
break
;
case
NR_RRC_MAC_BCCH_DATA_IND
:
LOG_D
(
NR_RRC
,
"[UE %d] Received %s: frameP %d, gNB %d
\n
"
,
ue_mod_id
,
ITTI_MSG_NAME
(
msg_p
),
NR_RRC_MAC_BCCH_DATA_IND
(
msg_p
).
frame
,
NR_RRC_MAC_BCCH_DATA_IND
(
msg_p
).
gnb_index
);
PROTOCOL_CTXT_SET_BY_MODULE_ID
(
&
ctxt
,
ue_mod_id
,
GNB_FLAG_NO
,
NOT_A_RNTI
,
NR_RRC_MAC_BCCH_DATA_IND
(
msg_p
).
frame
,
0
,
NR_RRC_MAC_BCCH_DATA_IND
(
msg_p
).
gnb_index
);
nr_rrc_ue_decode_NR_BCCH_DL_SCH_Message
(
ctxt
.
module_id
,
NR_RRC_MAC_BCCH_DATA_IND
(
msg_p
).
gnb_index
,
NR_RRC_MAC_BCCH_DATA_IND
(
msg_p
).
sdu
,
NR_RRC_MAC_BCCH_DATA_IND
(
msg_p
).
sdu_size
,
NR_RRC_MAC_BCCH_DATA_IND
(
msg_p
).
rsrq
,
NR_RRC_MAC_BCCH_DATA_IND
(
msg_p
).
rsrp
);
NR_RRC_MAC_BCCH_DATA_IND
(
msg_p
).
gnb_index
,
NR_RRC_MAC_BCCH_DATA_IND
(
msg_p
).
sdu
,
NR_RRC_MAC_BCCH_DATA_IND
(
msg_p
).
sdu_size
,
NR_RRC_MAC_BCCH_DATA_IND
(
msg_p
).
rsrq
,
NR_RRC_MAC_BCCH_DATA_IND
(
msg_p
).
rsrp
);
break
;
case
NR_RRC_MAC_CCCH_DATA_IND
:
...
...
@@ -2288,18 +2312,24 @@ nr_rrc_ue_establish_srb2(
NR_RRC_MAC_CCCH_DATA_IND
(
msg_p
).
gnb_index
);
srb_info_p
=
&
NR_UE_rrc_inst
[
ue_mod_id
].
Srb0
[
NR_RRC_MAC_CCCH_DATA_IND
(
msg_p
).
gnb_index
];
memcpy
(
srb_info_p
->
Rx_buffer
.
Payload
,
NR_RRC_MAC_CCCH_DATA_IND
(
msg_p
).
sdu
,
NR_RRC_MAC_CCCH_DATA_IND
(
msg_p
).
sdu_size
);
NR_RRC_MAC_CCCH_DATA_IND
(
msg_p
).
sdu_size
);
srb_info_p
->
Rx_buffer
.
payload_size
=
NR_RRC_MAC_CCCH_DATA_IND
(
msg_p
).
sdu_size
;
PROTOCOL_CTXT_SET_BY_INSTANCE
(
&
ctxt
,
instance
,
GNB_FLAG_NO
,
NR_RRC_MAC_CCCH_DATA_IND
(
msg_p
).
rnti
,
NR_RRC_MAC_CCCH_DATA_IND
(
msg_p
).
frame
,
0
);
// PROTOCOL_CTXT_SET_BY_MODULE_ID(&ctxt, ue_mod_id, GNB_FLAG_NO, NR_RRC_MAC_CCCH_DATA_IND (msg_p).rnti, NR_RRC_MAC_CCCH_DATA_IND (msg_p).frame, 0, NR_RRC_MAC_CCCH_DATA_IND (msg_p).gnb_index);
nr_rrc_ue_decode_ccch
(
&
ctxt
,
srb_info_p
,
NR_RRC_MAC_CCCH_DATA_IND
(
msg_p
).
gnb_index
);
// PROTOCOL_CTXT_SET_BY_MODULE_ID(&ctxt, ue_mod_id, GNB_FLAG_NO, NR_RRC_MAC_CCCH_DATA_IND (msg_p).rnti, NR_RRC_MAC_CCCH_DATA_IND (msg_p).frame, 0, NR_RRC_MAC_CCCH_DATA_IND (msg_p).gnb_index);
nr_rrc_ue_decode_ccch
(
&
ctxt
,
srb_info_p
,
NR_RRC_MAC_CCCH_DATA_IND
(
msg_p
).
gnb_index
);
break
;
/* PDCP messages */
case
NR_RRC_DCCH_DATA_IND
:
PROTOCOL_CTXT_SET_BY_MODULE_ID
(
&
ctxt
,
NR_RRC_DCCH_DATA_IND
(
msg_p
).
module_id
,
GNB_FLAG_NO
,
NR_RRC_DCCH_DATA_IND
(
msg_p
).
rnti
,
NR_RRC_DCCH_DATA_IND
(
msg_p
).
frame
,
0
,
NR_RRC_DCCH_DATA_IND
(
msg_p
).
gNB_index
);
PROTOCOL_CTXT_SET_BY_MODULE_ID
(
&
ctxt
,
NR_RRC_DCCH_DATA_IND
(
msg_p
).
module_id
,
GNB_FLAG_NO
,
NR_RRC_DCCH_DATA_IND
(
msg_p
).
rnti
,
NR_RRC_DCCH_DATA_IND
(
msg_p
).
frame
,
0
,
NR_RRC_DCCH_DATA_IND
(
msg_p
).
gNB_index
);
LOG_D
(
NR_RRC
,
"[UE %d] Received %s: frameP %d, DCCH %d, gNB %d
\n
"
,
NR_RRC_DCCH_DATA_IND
(
msg_p
).
module_id
,
ITTI_MSG_NAME
(
msg_p
),
...
...
@@ -2735,23 +2765,12 @@ void process_lte_nsa_msg(nsa_msg_t *msg, int msg_len)
}
}
void
*
nr_rrc_timers_update
()
{
while
(
1
)
{
for
(
int
mod_id
=
0
;
mod_id
<
NB_NR_UE_INST
;
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.
}
}
}
usleep
(
10000
);
// update every 10ms (is this a correct implementation ?)
}
void
nr_ue_rrc_timer_trigger
(
int
module_id
,
int
frame
,
int
slot
)
{
MessageDef
*
message_p
;
message_p
=
itti_alloc_new_message
(
TASK_RRC_NRUE
,
0
,
NRRRC_SLOT_PROCESS
);
NRRRC_SLOT_PROCESS
(
message_p
).
frame
=
frame
;
NRRRC_SLOT_PROCESS
(
message_p
).
slot
=
slot
;
LOG_D
(
NR_RRC
,
"RRC timer trigger: frame %d slot %d
\n
"
,
frame
,
slot
);
itti_send_msg_to_task
(
TASK_RRC_NRUE
,
GNB_MODULE_ID_TO_INSTANCE
(
module_id
),
message_p
);
}
openair2/RRC/NR_UE/rrc_proto.h
View file @
527c0164
...
...
@@ -121,7 +121,7 @@ int8_t nr_mac_rrc_data_ind_ue(const module_id_t module_id,
const
int
CC_id
,
const
uint8_t
gNB_index
,
const
frame_t
frame
,
const
sub_frame_t
sub_frame
,
const
int
slot
,
const
rnti_t
rnti
,
const
channel_t
channel
,
const
uint8_t
*
pduP
,
...
...
@@ -169,6 +169,8 @@ void process_lte_nsa_msg(nsa_msg_t *msg, int msg_len);
int
get_from_lte_ue_fd
();
void
nr_ue_rrc_timer_trigger
(
int
module_id
,
int
frame
,
int
slot
);
void
configure_spcell
(
NR_UE_RRC_INST_t
*
rrc
,
NR_SpCellConfig_t
*
spcell_config
);
void
reset_rlf_timers_and_constants
(
NR_UE_Timers_Constants_t
*
tac
);
void
set_default_timers_and_constants
(
NR_UE_Timers_Constants_t
*
tac
);
...
...
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