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
promise
OpenXG-RAN
Commits
99256c24
Commit
99256c24
authored
Feb 10, 2020
by
cig
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
MAC CE contention resolution reception
parent
bbc0d1de
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
38 additions
and
37 deletions
+38
-37
openair1/SCHED_NR_UE/phy_procedures_nr_ue.c
openair1/SCHED_NR_UE/phy_procedures_nr_ue.c
+9
-37
openair2/LAYER2/NR_MAC_UE/nr_ue_procedures.c
openair2/LAYER2/NR_MAC_UE/nr_ue_procedures.c
+29
-0
No files found.
openair1/SCHED_NR_UE/phy_procedures_nr_ue.c
View file @
99256c24
...
...
@@ -294,43 +294,6 @@ void nr_dump_dlsch_ra(PHY_VARS_NR_UE *ue,UE_nr_rxtx_proc_t *proc,uint8_t eNB_id,
write_output("dlsch_mag2.m","dlschmag2",ue->pdsch_vars_ra[0]->dl_ch_magb0,300*nsymb,1,1);
}
void ra_failed(uint8_t Mod_id,uint8_t CC_id,uint8_t eNB_index)
{
// if contention resolution fails, go back to PRACH
PHY_vars_UE_g[Mod_id][CC_id]->UE_mode[eNB_index] = PRACH;
PHY_vars_UE_g[Mod_id][CC_id]->pdcch_vars[0][eNB_index]->crnti_is_temporary = 0;
PHY_vars_UE_g[Mod_id][CC_id]->pdcch_vars[0][eNB_index]->crnti = 0;
PHY_vars_UE_g[Mod_id][CC_id]->pdcch_vars[1][eNB_index]->crnti_is_temporary = 0;
PHY_vars_UE_g[Mod_id][CC_id]->pdcch_vars[1][eNB_index]->crnti = 0;
LOG_E(PHY,"[UE %d] Random-access procedure fails, going back to PRACH, setting SIStatus = 0, discard temporary C-RNTI and State RRC_IDLE\n",Mod_id);
//mac_xface->macphy_exit("");
}
void ra_succeeded(uint8_t Mod_id,uint8_t CC_id,uint8_t eNB_index)
{
int i;
LOG_I(PHY,"[UE %d][RAPROC] Random-access procedure succeeded. Set C-RNTI = Temporary C-RNTI\n",Mod_id);
PHY_vars_UE_g[Mod_id][CC_id]->pdcch_vars[0][eNB_index]->crnti_is_temporary = 0;
PHY_vars_UE_g[Mod_id][CC_id]->pdcch_vars[1][eNB_index]->crnti_is_temporary = 0;
PHY_vars_UE_g[Mod_id][CC_id]->ulsch_Msg3_active[eNB_index] = 0;
PHY_vars_UE_g[Mod_id][CC_id]->UE_mode[eNB_index] = PUSCH;
for (i=0; i<8; i++) {
if (PHY_vars_UE_g[Mod_id][CC_id]->ulsch[eNB_index]->harq_processes[i]) {
PHY_vars_UE_g[Mod_id][CC_id]->ulsch[eNB_index]->harq_processes[i]->status=IDLE;
PHY_vars_UE_g[Mod_id][CC_id]->dlsch[0][eNB_index][0]->harq_processes[i]->round=0;
PHY_vars_UE_g[Mod_id][CC_id]->dlsch[1][eNB_index][0]->harq_processes[i]->round=0;
PHY_vars_UE_g[Mod_id][CC_id]->ulsch[eNB_index]->harq_processes[i]->subframe_scheduling_flag=0;
}
}
}
uint8_t nr_is_SR_TXOp(PHY_VARS_NR_UE *ue,UE_nr_rxtx_proc_t *proc,uint8_t eNB_id)
{
...
...
@@ -3285,6 +3248,15 @@ void nr_ra_failed(uint8_t Mod_id, uint8_t CC_id, uint8_t gNB_index) {
LOG_E
(
PHY
,
"[UE %d] [RAPROC] Random-access procedure fails, going back to PRACH
\n
"
,
Mod_id
);
}
void
nr_ra_succeeded
(
uint8_t
Mod_id
,
uint8_t
CC_id
,
uint8_t
gNB_index
){
LOG_I
(
PHY
,
"[UE %d][RAPROC] RA procedure succeeded. UE set to PUSCH mode
\n
"
,
Mod_id
);
PHY_VARS_NR_UE
*
ue
=
PHY_vars_UE_g
[
Mod_id
][
CC_id
];
ue
->
ulsch_Msg3_active
[
gNB_index
]
=
0
;
ue
->
UE_mode
[
gNB_index
]
=
PUSCH
;
}
void
nr_ue_dlsch_procedures
(
PHY_VARS_NR_UE
*
ue
,
UE_nr_rxtx_proc_t
*
proc
,
int
eNB_id
,
...
...
openair2/LAYER2/NR_MAC_UE/nr_ue_procedures.c
View file @
99256c24
...
...
@@ -3101,6 +3101,7 @@ void nr_ue_process_mac_pdu(module_id_t module_idP,
uint8_t
*
pdu_ptr
=
pduP
,
rx_lcid
,
done
=
0
;
int
pdu_len
=
mac_pdu_len
;
uint16_t
mac_ce_len
,
mac_subheader_len
,
mac_sdu_len
;
NR_UE_MAC_INST_t
*
mac
=
get_mac_inst
(
module_idP
);
//NR_UE_MAC_INST_t *UE_mac_inst = get_mac_inst(module_idP);
//uint8_t scs = UE_mac_inst->mib->subCarrierSpacingCommon;
...
...
@@ -3261,7 +3262,35 @@ void nr_ue_process_mac_pdu(module_id_t module_idP,
break
;
case
DL_SCH_LCID_CON_RES_ID
:
// 38.321 Ch6.1.3.3
// WIP todo: handle CCCH_pdu
mac_ce_len
=
6
;
LOG_I
(
MAC
,
"[UE %d][RAPROC] Frame %d : received contention resolution msg: %x.%x.%x.%x.%x.%x, Terminating RA procedure
\n
"
,
module_idP
,
frameP
,
pdu_ptr
[
0
],
pdu_ptr
[
1
],
pdu_ptr
[
2
],
pdu_ptr
[
3
],
pdu_ptr
[
4
],
pdu_ptr
[
5
]);
if
(
mac
->
RA_active
==
1
)
{
LOG_I
(
MAC
,
"[UE %d][RAPROC] Frame %d : Clearing RA_active flag
\n
"
,
module_idP
,
frameP
);
mac
->
RA_active
=
0
;
// // check if RA procedure has finished completely (no contention)
// tx_sdu = &mac->CCCH_pdu.payload[3];
// //Note: 3 assumes sizeof(SCH_SUBHEADER_SHORT) + PADDING CE, which is when UL-Grant has TBS >= 9 (64 bits)
// // (other possibility is 1 for TBS=7 (SCH_SUBHEADER_FIXED), or 2 for TBS=8 (SCH_SUBHEADER_FIXED+PADDING or // SCH_SUBHEADER_SHORT)
// for (i = 0; i < 6; i++)
// if (tx_sdu[i] != payload_ptr[i]) {
// LOG_E(MAC, "[UE %d][RAPROC] Contention detected, RA failed\n", module_idP);
// nr_ra_failed(module_idP, CC_id, eNB_index);
// mac->RA_contention_resolution_timer_active = 0;
// return;
// }
LOG_I
(
MAC
,
"[UE %d][RAPROC] Frame %d : Cleared contention resolution timer. Set C-RNTI to TC-RNTI
\n
"
,
module_idP
,
frameP
);
mac
->
RA_contention_resolution_timer_active
=
0
;
nr_ra_succeeded
(
module_idP
,
CC_id
,
gNB_index
);
mac
->
crnti
=
mac
->
t_crnti
;
mac
->
t_crnti
=
0
;
}
break
;
break
;
case
DL_SCH_LCID_PADDING
:
...
...
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