Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
O
OpenXG UE
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
Michael Black
OpenXG UE
Commits
93c31d78
Commit
93c31d78
authored
Mar 04, 2021
by
rmagueta
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Update RA succeeded procedures
parent
776b338d
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
36 additions
and
29 deletions
+36
-29
openair2/LAYER2/NR_MAC_UE/mac_defs.h
openair2/LAYER2/NR_MAC_UE/mac_defs.h
+2
-0
openair2/LAYER2/NR_MAC_UE/nr_ra_procedures.c
openair2/LAYER2/NR_MAC_UE/nr_ra_procedures.c
+7
-3
openair2/LAYER2/NR_MAC_UE/nr_ue_procedures.c
openair2/LAYER2/NR_MAC_UE/nr_ue_procedures.c
+25
-25
openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_ulsch.c
openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_ulsch.c
+2
-1
No files found.
openair2/LAYER2/NR_MAC_UE/mac_defs.h
View file @
93c31d78
...
@@ -291,6 +291,8 @@ typedef struct {
...
@@ -291,6 +291,8 @@ typedef struct {
uint8_t
RA_contention_resolution_timer_active
;
uint8_t
RA_contention_resolution_timer_active
;
/// Random-access Contention Resolution Timer count value
/// Random-access Contention Resolution Timer count value
uint8_t
RA_contention_resolution_cnt
;
uint8_t
RA_contention_resolution_cnt
;
/// Transmitted UE Contention Resolution Identifier
uint8_t
cont_res_id
[
6
];
/// BeamfailurerecoveryConfig
/// BeamfailurerecoveryConfig
NR_BeamFailureRecoveryConfig_t
RA_BeamFailureRecoveryConfig
;
NR_BeamFailureRecoveryConfig_t
RA_BeamFailureRecoveryConfig
;
...
...
openair2/LAYER2/NR_MAC_UE/nr_ra_procedures.c
View file @
93c31d78
...
@@ -568,6 +568,11 @@ uint8_t nr_ue_get_rach(NR_PRACH_RESOURCES_t *prach_resources,
...
@@ -568,6 +568,11 @@ uint8_t nr_ue_get_rach(NR_PRACH_RESOURCES_t *prach_resources,
if
(
size_sdu
>
0
)
{
if
(
size_sdu
>
0
)
{
// UE Contention Resolution Identity
// Store the first 48 bits belonging to the uplink CCCH SDU within Msg3 to determine whether or not the
// Random Access Procedure has been successful after reception of Msg4
memcpy
(
ra
->
cont_res_id
,
mac_sdus
,
sizeof
(
uint8_t
)
*
6
);
LOG_D
(
MAC
,
"[UE %d][%d.%d]: starting initialisation Random Access Procedure...
\n
"
,
mod_id
,
frame
,
nr_slot_tx
);
LOG_D
(
MAC
,
"[UE %d][%d.%d]: starting initialisation Random Access Procedure...
\n
"
,
mod_id
,
frame
,
nr_slot_tx
);
ra
->
Msg3_size
=
size_sdu
+
sizeof
(
NR_MAC_SUBHEADER_SHORT
)
+
sizeof
(
NR_MAC_SUBHEADER_SHORT
);
ra
->
Msg3_size
=
size_sdu
+
sizeof
(
NR_MAC_SUBHEADER_SHORT
)
+
sizeof
(
NR_MAC_SUBHEADER_SHORT
);
...
@@ -624,10 +629,9 @@ uint8_t nr_ue_get_rach(NR_PRACH_RESOURCES_t *prach_resources,
...
@@ -624,10 +629,9 @@ uint8_t nr_ue_get_rach(NR_PRACH_RESOURCES_t *prach_resources,
prach_resources
->
RA_PREAMBLE_BACKOFF
=
0
;
prach_resources
->
RA_PREAMBLE_BACKOFF
=
0
;
}
}
if
(
ra
->
RA_window_cnt
>=
0
&&
ra
->
RA_RAPID_found
==
1
)
{
if
(
ra
->
RA_window_cnt
>=
0
&&
ra
->
RA_RAPID_found
==
1
&&
ra
->
cfra
)
{
// Reset RA_active flag: it disables Msg3 retransmission (8.3 of TS 38.213)
// Reset RA_active flag: it disables Msg3 retransmission (8.3 of TS 38.213)
nr_ra_succeeded
(
mod_id
,
frame
,
nr_slot_tx
);
//nr_ra_succeeded(mod_id, frame, nr_slot_tx);
}
else
if
(
ra
->
RA_window_cnt
==
0
&&
!
ra
->
RA_RAPID_found
)
{
}
else
if
(
ra
->
RA_window_cnt
==
0
&&
!
ra
->
RA_RAPID_found
)
{
...
...
openair2/LAYER2/NR_MAC_UE/nr_ue_procedures.c
View file @
93c31d78
...
@@ -515,10 +515,6 @@ int8_t nr_ue_process_dci(module_id_t module_id, int cc_id, uint8_t gNB_index, fr
...
@@ -515,10 +515,6 @@ int8_t nr_ue_process_dci(module_id_t module_id, int cc_id, uint8_t gNB_index, fr
// Config PUSCH PDU
// Config PUSCH PDU
ret
=
nr_config_pusch_pdu
(
mac
,
pusch_config_pdu
,
dci
,
NULL
,
rnti
,
&
dci_format
);
ret
=
nr_config_pusch_pdu
(
mac
,
pusch_config_pdu
,
dci
,
NULL
,
rnti
,
&
dci_format
);
//if (ret != -1 && ra->RA_active && mac->crnti){
// nr_ra_succeeded(module_id, frame, slot);
//}
}
}
break
;
break
;
...
@@ -578,10 +574,6 @@ int8_t nr_ue_process_dci(module_id_t module_id, int cc_id, uint8_t gNB_index, fr
...
@@ -578,10 +574,6 @@ int8_t nr_ue_process_dci(module_id_t module_id, int cc_id, uint8_t gNB_index, fr
// Config PUSCH PDU
// Config PUSCH PDU
ret
=
nr_config_pusch_pdu
(
mac
,
pusch_config_pdu
,
dci
,
NULL
,
rnti
,
&
dci_format
);
ret
=
nr_config_pusch_pdu
(
mac
,
pusch_config_pdu
,
dci
,
NULL
,
rnti
,
&
dci_format
);
//if (ret != -1 && ra->RA_active && mac->crnti){
// nr_ra_succeeded(module_id, frame, slot);
//}
}
}
break
;
break
;
...
@@ -782,12 +774,6 @@ int8_t nr_ue_process_dci(module_id_t module_id, int cc_id, uint8_t gNB_index, fr
...
@@ -782,12 +774,6 @@ int8_t nr_ue_process_dci(module_id_t module_id, int cc_id, uint8_t gNB_index, fr
dl_config
->
number_pdus
=
dl_config
->
number_pdus
+
1
;
dl_config
->
number_pdus
=
dl_config
->
number_pdus
+
1
;
// FIXME: Remove this
if
(
ra
->
ra_state
==
WAIT_CONTENTION_RESOLUTION
&&
rnti
==
ra
->
t_crnti
){
LOG_I
(
NR_MAC
,
"RA-Msg4 received
\n
"
);
nr_ra_succeeded
(
module_id
,
frame
,
slot
);
}
break
;
break
;
}
}
...
@@ -1957,20 +1943,34 @@ void nr_ue_process_mac_pdu(nr_downlink_indication_t *dl_info,
...
@@ -1957,20 +1943,34 @@ void nr_ue_process_mac_pdu(nr_downlink_indication_t *dl_info,
break
;
break
;
case
DL_SCH_LCID_CON_RES_ID
:
case
DL_SCH_LCID_CON_RES_ID
:
// Clause 5.1.5 and 6.1.3.3 of 3GPP TS 38.321 version 16.2.1 Release 16
// Clause 5.1.5 and 6.1.3.3 of 3GPP TS 38.321 version 16.2.1 Release 16
// WIP todo: handle CCCH_pdu
// MAC Header: 1 byte (R/R/LCID)
// MAC Header: 1 byte (R/R/LCID)
// MAC SDU: 6 bytes (UE Contention Resolution Identity)
// MAC SDU: 6 bytes (UE Contention Resolution Identity)
mac_ce_len
=
6
;
mac_ce_len
=
6
;
if
(
ra
->
ra_state
==
WAIT_CONTENTION_RESOLUTION
)
{
LOG_I
(
MAC
,
"[UE %d][RAPROC] Frame %d : received contention resolution identity: 0x%x%x%x%x%x%x. Terminating RA procedure
\n
"
,
module_idP
,
frameP
,
pduP
[
1
],
pduP
[
2
],
pduP
[
3
],
pduP
[
4
],
pduP
[
5
],
pduP
[
6
]);
LOG_I
(
MAC
,
"[UE %d][RAPROC] Frame %d : received contention resolution identity: 0x%02x%02x%02x%02x%02x%02x Terminating RA procedure
\n
"
,
module_idP
,
frameP
,
pduP
[
1
],
pduP
[
2
],
pduP
[
3
],
pduP
[
4
],
pduP
[
5
],
pduP
[
6
]);
// FIXME: Only succeeds if received contention resolution equals to the first 48 bits of transmitted Mgs3
if
(
ra
->
RA_active
==
1
)
{
bool
ra_success
=
true
;
for
(
int
i
=
0
;
i
<
mac_ce_len
;
i
++
)
{
if
(
ra
->
cont_res_id
[
i
]
!=
pduP
[
i
+
1
])
{
ra_success
=
false
;
break
;
}
}
if
(
(
ra
->
RA_active
==
1
)
&&
ra_success
)
{
nr_ra_succeeded
(
module_idP
,
frameP
,
slot
);
nr_ra_succeeded
(
module_idP
,
frameP
,
slot
);
}
else
if
(
!
ra_success
){
// TODO: Handle failure of RA procedure @ MAC layer
// nr_ra_failed(module_idP, CC_id, prach_resources, frameP, slot); // prach_resources is a PHY structure
ra
->
ra_state
=
RA_UE_IDLE
;
ra
->
RA_active
=
0
;
}
}
}
break
;
break
;
case
DL_SCH_LCID_PADDING
:
case
DL_SCH_LCID_PADDING
:
done
=
1
;
done
=
1
;
// end of MAC PDU, can ignore the rest.
// end of MAC PDU, can ignore the rest.
...
...
openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_ulsch.c
View file @
93c31d78
...
@@ -506,7 +506,8 @@ void nr_rx_sdu(const module_id_t gnb_mod_idP,
...
@@ -506,7 +506,8 @@ void nr_rx_sdu(const module_id_t gnb_mod_idP,
// UE Contention Resolution Identity
// UE Contention Resolution Identity
// Store the first 48 bits belonging to the uplink CCCH SDU within Msg3 to fill in Msg4
// Store the first 48 bits belonging to the uplink CCCH SDU within Msg3 to fill in Msg4
memcpy
(
ra
->
cont_res_id
,
sduP
,
sizeof
(
uint8_t
)
*
6
);
// First byte corresponds to R/LCID MAC sub-header
memcpy
(
ra
->
cont_res_id
,
&
sduP
[
1
],
sizeof
(
uint8_t
)
*
6
);
// re-initialize ta update variables afrer RA procedure completion
// re-initialize ta update variables afrer RA procedure completion
UE_info
->
UE_sched_ctrl
[
UE_id
].
ta_frame
=
frameP
;
UE_info
->
UE_sched_ctrl
[
UE_id
].
ta_frame
=
frameP
;
...
...
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