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
9653b954
Commit
9653b954
authored
Feb 10, 2020
by
cig
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Contention resolution TS 38.321 ch 5.1.5
parent
6149d825
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
61 additions
and
0 deletions
+61
-0
openair1/SCHED_NR_UE/phy_procedures_nr_ue.c
openair1/SCHED_NR_UE/phy_procedures_nr_ue.c
+11
-0
openair2/LAYER2/NR_MAC_UE/mac_proto.h
openair2/LAYER2/NR_MAC_UE/mac_proto.h
+4
-0
openair2/LAYER2/NR_MAC_UE/nr_ue_procedures.c
openair2/LAYER2/NR_MAC_UE/nr_ue_procedures.c
+46
-0
No files found.
openair1/SCHED_NR_UE/phy_procedures_nr_ue.c
View file @
9653b954
...
...
@@ -3273,6 +3273,17 @@ void nr_process_rar(nr_downlink_indication_t *dl_info) {
}
}
// if contention resolution fails, go back to UE mode PRACH
void
nr_ra_failed
(
uint8_t
Mod_id
,
uint8_t
CC_id
,
uint8_t
gNB_index
)
{
PHY_VARS_NR_UE
*
ue
=
PHY_vars_UE_g
[
Mod_id
][
CC_id
];
ue
->
UE_mode
[
gNB_index
]
=
PRACH
;
for
(
int
i
=
0
;
i
<
RX_NB_TH_MAX
;
i
++
)
{
ue
->
pdcch_vars
[
i
][
gNB_index
]
->
pdcch_config
[
0
].
rnti
=
0
;
}
LOG_E
(
PHY
,
"[UE %d] [RAPROC] Random-access procedure fails, going back to PRACH
\n
"
,
Mod_id
);
}
void
nr_ue_dlsch_procedures
(
PHY_VARS_NR_UE
*
ue
,
UE_nr_rxtx_proc_t
*
proc
,
...
...
openair2/LAYER2/NR_MAC_UE/mac_proto.h
View file @
9653b954
...
...
@@ -216,5 +216,9 @@ uint16_t nr_ue_process_rar(module_id_t mod_id,
void
nr_process_rar
(
nr_downlink_indication_t
*
dl_info
);
void
ue_contention_resolution
(
module_id_t
module_id
,
uint8_t
gNB_index
,
int
cc_id
,
frame_t
tx_frame
);
void
nr_ra_failed
(
uint8_t
Mod_id
,
uint8_t
CC_id
,
uint8_t
gNB_index
);
#endif
/** @}*/
openair2/LAYER2/NR_MAC_UE/nr_ue_procedures.c
View file @
9653b954
...
...
@@ -728,6 +728,9 @@ NR_UE_L2_STATE_t nr_ue_scheduler(const module_id_t module_id,
*/
}
if
(
mac
->
RA_contention_resolution_timer_active
==
1
)
{
ue_contention_resolution
(
module_id
,
gNB_index
,
cc_id
,
tx_frame
);
}
mac
->
scheduled_response
.
dl_config
=
dl_config
;
...
...
@@ -735,6 +738,49 @@ NR_UE_L2_STATE_t nr_ue_scheduler(const module_id_t module_id,
return
UE_CONNECTION_OK
;
}
////////////////////////////////////////////////////////////////////////////
/////////* Random Access Contention Resolution (5.1.35 TS 38.321) */////////
////////////////////////////////////////////////////////////////////////////
// Handling contention resolution timer
// WIP todo:
// - beam failure recovery
// - RA completed
void
ue_contention_resolution
(
module_id_t
module_id
,
uint8_t
gNB_index
,
int
cc_id
,
frame_t
tx_frame
){
NR_UE_MAC_INST_t
*
mac
=
get_mac_inst
(
module_id
);
NR_RACH_ConfigCommon_t
*
rach_ConfigCommon
;
if
(
mac
->
RA_contention_resolution_timer_active
==
1
)
{
if
(
mac
->
nr_rach_ConfigCommon
)
{
rach_ConfigCommon
=
&
mac
->
nr_rach_ConfigCommon
;
}
else
{
// LOG_E(MAC, "FATAL: radioResourceConfigCommon is NULL!!!\n");
// VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME(VCD_SIGNAL_DUMPER_FUNCTIONS_UE_SCHEDULER,VCD_FUNCTION_OUT);
// stop_meas(&mac->ue_scheduler);
// AssertFatal(1 == 0, "");
// #if UE_TIMING_TRACE
// stop_meas(&mac->ue_scheduler);
// #endif
}
LOG_I
(
MAC
,
"Frame %d: Contention resolution timer %d/%ld
\n
"
,
tx_frame
,
mac
->
RA_contention_resolution_cnt
,
((
1
+
rach_ConfigCommon
->
ra_ContentionResolutionTimer
)
<<
3
));
mac
->
RA_contention_resolution_cnt
++
;
if
(
mac
->
RA_contention_resolution_cnt
==
((
1
+
rach_ConfigCommon
->
ra_ContentionResolutionTimer
)
<<
3
))
{
mac
->
t_crnti
=
0
;
mac
->
RA_active
=
0
;
mac
->
RA_contention_resolution_timer_active
=
0
;
// Signal PHY to quit RA procedure
LOG_E
(
MAC
,
"[UE %u] [RAPROC] Contention resolution timer expired, RA failed, discarded TC-RNTI
\n
"
,
module_id
);
nr_ra_failed
(
module_id
,
cc_id
,
gNB_index
);
}
}
}
#if 0
uint16_t nr_dci_format_size (PHY_VARS_NR_UE *ue,
uint8_t slot,
...
...
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