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
275b82ea
Commit
275b82ea
authored
Aug 16, 2021
by
francescomani
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix for contention resolution timer at NR UE
parent
356e6cad
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
29 additions
and
26 deletions
+29
-26
openair1/SIMULATION/NR_PHY/nr_dummy_functions_prach.c
openair1/SIMULATION/NR_PHY/nr_dummy_functions_prach.c
+1
-1
openair2/LAYER2/NR_MAC_UE/mac_defs.h
openair2/LAYER2/NR_MAC_UE/mac_defs.h
+2
-2
openair2/LAYER2/NR_MAC_UE/mac_proto.h
openair2/LAYER2/NR_MAC_UE/mac_proto.h
+1
-1
openair2/LAYER2/NR_MAC_UE/nr_ra_procedures.c
openair2/LAYER2/NR_MAC_UE/nr_ra_procedures.c
+24
-21
openair2/LAYER2/NR_MAC_UE/nr_ue_scheduler.c
openair2/LAYER2/NR_MAC_UE/nr_ue_scheduler.c
+1
-1
No files found.
openair1/SIMULATION/NR_PHY/nr_dummy_functions_prach.c
View file @
275b82ea
...
...
@@ -315,7 +315,7 @@ void nr_Msg1_transmitted(module_id_t mod_id, uint8_t CC_id, frame_t frameP, uint
mac
->
RA_attempt_number
++
;
}
void
nr_Msg3_transmitted
(
module_id_t
mod_id
,
uint8_t
CC_id
,
frame_t
frameP
,
uint8_t
gNB_id
){
void
nr_Msg3_transmitted
(
module_id_t
mod_id
,
uint8_t
CC_id
,
frame_t
frameP
,
slot_t
slotP
,
uint8_t
gNB_id
){
AssertFatal
(
CC_id
==
0
,
"Transmission on secondary CCs is not supported yet
\n
"
);
LOG_D
(
MAC
,
"[UE %d][RAPROC] Frame %d : Msg3_tx: Starting contention resolution timer
\n
"
,
mod_id
,
frameP
);
NR_UE_MAC_INST_t
*
mac
=
get_mac_inst
(
mod_id
);
...
...
openair2/LAYER2/NR_MAC_UE/mac_defs.h
View file @
275b82ea
...
...
@@ -292,8 +292,8 @@ typedef struct {
/// Random-access Contention Resolution Timer active flag
uint8_t
RA_contention_resolution_timer_active
;
/// Random-access Contention Resolution Timer count value
uint8_t
RA_contention_resolution_cn
t
;
int
RA_contention_resolution_target_frame
;
int
RA_contention_resolution_target_slo
t
;
/// Transmitted UE Contention Resolution Identifier
uint8_t
cont_res_id
[
6
];
...
...
openair2/LAYER2/NR_MAC_UE/mac_proto.h
View file @
275b82ea
...
...
@@ -360,7 +360,7 @@ void nr_get_prach_resources(module_id_t mod_id,
void
nr_Msg1_transmitted
(
module_id_t
mod_id
,
uint8_t
CC_id
,
frame_t
frameP
,
uint8_t
gNB_id
);
void
nr_Msg3_transmitted
(
module_id_t
mod_id
,
uint8_t
CC_id
,
frame_t
frameP
,
uint8_t
gNB_id
);
void
nr_Msg3_transmitted
(
module_id_t
mod_id
,
uint8_t
CC_id
,
frame_t
frameP
,
slot_t
slotP
,
uint8_t
gNB_id
);
void
nr_ue_msg2_scheduler
(
module_id_t
mod_id
,
uint16_t
rach_frame
,
uint16_t
rach_slot
,
uint16_t
*
msg2_frame
,
uint16_t
*
msg2_slot
);
...
...
openair2/LAYER2/NR_MAC_UE/nr_ra_procedures.c
View file @
275b82ea
...
...
@@ -457,18 +457,27 @@ void nr_Msg1_transmitted(module_id_t mod_id, uint8_t CC_id, frame_t frameP, uint
ra
->
RA_attempt_number
++
;
}
void
nr_Msg3_transmitted
(
module_id_t
mod_id
,
uint8_t
CC_id
,
frame_t
frameP
,
uint8_t
gNB_id
){
void
nr_Msg3_transmitted
(
module_id_t
mod_id
,
uint8_t
CC_id
,
frame_t
frameP
,
slot_t
slotP
,
uint8_t
gNB_id
){
NR_UE_MAC_INST_t
*
mac
=
get_mac_inst
(
mod_id
);
NR_RACH_ConfigCommon_t
*
nr_rach_ConfigCommon
=
(
mac
->
scc
)
?
RA_config_t
*
ra
=
&
mac
->
ra
;
NR_RACH_ConfigCommon_t
*
nr_rach_ConfigCommon
=
(
mac
->
scc
)
?
mac
->
scc
->
uplinkConfigCommon
->
initialUplinkBWP
->
rach_ConfigCommon
->
choice
.
setup
:
mac
->
scc_SIB
->
uplinkConfigCommon
->
initialUplinkBWP
.
rach_ConfigCommon
->
choice
.
setup
;
RA_config_t
*
ra
=
&
mac
->
ra
;
long
mu
=
(
mac
->
scc
)
?
mac
->
scc
->
downlinkConfigCommon
->
frequencyInfoDL
->
scs_SpecificCarrierList
.
list
.
array
[
0
]
->
subcarrierSpacing
:
mac
->
scc_SIB
->
downlinkConfigCommon
.
frequencyInfoDL
.
scs_SpecificCarrierList
.
list
.
array
[
0
]
->
subcarrierSpacing
;
int
subframes_per_slot
=
nr_slots_per_frame
[
mu
]
/
10
;
// start contention resolution timer (cnt in slots)
int
RA_contention_resolution_timer_subframes
=
(
nr_rach_ConfigCommon
->
ra_ContentionResolutionTimer
+
1
)
*
8
;
ra
->
RA_contention_resolution_target_frame
=
frameP
+
(
RA_contention_resolution_timer_subframes
/
10
);
ra
->
RA_contention_resolution_target_slot
=
(
slotP
+
(
RA_contention_resolution_timer_subframes
*
subframes_per_slot
))
%
nr_slots_per_frame
[
mu
];
LOG_D
(
MAC
,
"In %s: [UE %d] Frame %d, CB-RA: starting contention resolution timer
\n
"
,
__FUNCTION__
,
mod_id
,
frameP
);
LOG_D
(
MAC
,
"In %s: [UE %d] CB-RA: starting contention resolution timer set in frame.slot %d.%d and expiring in %d.%d
\n
"
,
__FUNCTION__
,
mod_id
,
frameP
,
slotP
,
ra
->
RA_contention_resolution_target_frame
,
ra
->
RA_contention_resolution_target_slot
);
// start contention resolution timer
ra
->
RA_contention_resolution_cnt
=
(
nr_rach_ConfigCommon
->
ra_ContentionResolutionTimer
+
1
)
*
8
;
ra
->
RA_contention_resolution_timer_active
=
1
;
ra
->
ra_state
=
WAIT_CONTENTION_RESOLUTION
;
...
...
@@ -736,20 +745,15 @@ void nr_ue_contention_resolution(module_id_t module_id, int cc_id, frame_t frame
RA_config_t
*
ra
=
&
mac
->
ra
;
if
(
ra
->
RA_contention_resolution_timer_active
==
1
)
{
ra
->
RA_contention_resolution_cnt
--
;
LOG_D
(
MAC
,
"In %s: [%d.%d] RA contention resolution timer %d
\n
"
,
__FUNCTION__
,
frame
,
slot
,
ra
->
RA_contention_resolution_cnt
);
if
(
ra
->
RA_contention_resolution_cnt
==
0
)
{
ra
->
t_crnti
=
0
;
ra
->
RA_active
=
0
;
ra
->
RA_contention_resolution_timer_active
=
0
;
// Signal PHY to quit RA procedure
LOG_E
(
MAC
,
"[UE %d] CB-RA: Contention resolution timer has expired, RA procedure has failed...
\n
"
,
module_id
);
nr_ra_failed
(
module_id
,
cc_id
,
prach_resources
,
frame
,
slot
);
}
if
(
frame
>=
ra
->
RA_contention_resolution_target_frame
&&
slot
>=
ra
->
RA_contention_resolution_target_frame
)
{
ra
->
t_crnti
=
0
;
ra
->
RA_active
=
0
;
ra
->
RA_contention_resolution_timer_active
=
0
;
// Signal PHY to quit RA procedure
LOG_E
(
MAC
,
"[UE %d] CB-RA: Contention resolution timer has expired, RA procedure has failed...
\n
"
,
module_id
);
nr_ra_failed
(
module_id
,
cc_id
,
prach_resources
,
frame
,
slot
);
}
}
}
...
...
@@ -773,7 +777,6 @@ void nr_ra_succeeded(module_id_t mod_id, frame_t frame, int slot){
LOG_I
(
MAC
,
"[UE %d][%d.%d][RAPROC] RA procedure succeeded. CB-RA: Contention Resolution is successful.
\n
"
,
mod_id
,
frame
,
slot
);
ra
->
RA_contention_resolution_cnt
=
-
1
;
ra
->
RA_contention_resolution_timer_active
=
0
;
mac
->
crnti
=
ra
->
t_crnti
;
ra
->
t_crnti
=
0
;
...
...
openair2/LAYER2/NR_MAC_UE/nr_ue_scheduler.c
View file @
275b82ea
...
...
@@ -1091,7 +1091,7 @@ NR_UE_L2_STATE_t nr_ue_scheduler(nr_downlink_indication_t *dl_info, nr_uplink_in
if
(
ra
->
ra_state
==
WAIT_RAR
&&
!
ra
->
cfra
){
LOG_I
(
NR_MAC
,
"[RAPROC] RA-Msg3 transmitted
\n
"
);
nr_Msg3_transmitted
(
ul_info
->
module_id
,
ul_info
->
cc_id
,
ul_info
->
frame_tx
,
ul_info
->
gNB_index
);
nr_Msg3_transmitted
(
ul_info
->
module_id
,
ul_info
->
cc_id
,
ul_info
->
frame_tx
,
ul_info
->
slot_tx
,
ul_info
->
gNB_index
);
}
}
...
...
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