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
wangjie
OpenXG-RAN
Commits
ddf4ca87
Commit
ddf4ca87
authored
Apr 17, 2020
by
Francesco Mani
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[gNB] taking into account preamble set at RRC and finalization of RA procedures
parent
b51beff9
Changes
4
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
50 additions
and
5 deletions
+50
-5
openair2/LAYER2/NR_MAC_gNB/config.c
openair2/LAYER2/NR_MAC_gNB/config.c
+6
-0
openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_RA.c
openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_RA.c
+21
-5
openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_ulsch.c
openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_ulsch.c
+15
-0
openair2/LAYER2/NR_MAC_gNB/nr_mac_gNB.h
openair2/LAYER2/NR_MAC_gNB/nr_mac_gNB.h
+8
-0
No files found.
openair2/LAYER2/NR_MAC_gNB/config.c
View file @
ddf4ca87
...
...
@@ -374,6 +374,12 @@ int rrc_mac_config_req_gNB(module_id_t Mod_idP,
if
(
add_ue
==
1
)
{
UE_id
=
add_new_nr_ue
(
Mod_idP
,
rnti
);
UE_list
->
secondaryCellGroup
[
UE_id
]
=
secondaryCellGroup
;
uint8_t
num_preamble
=
secondaryCellGroup
->
spCellConfig
->
reconfigurationWithSync
->
rach_ConfigDedicated
->
choice
.
uplink
->
cfra
->
resources
.
choice
.
ssb
->
ssb_ResourceList
.
list
.
count
;
UE_list
->
preambles
[
UE_id
].
num_preambles
=
num_preamble
;
UE_list
->
preambles
[
UE_id
].
preamble_list
=
(
uint8_t
*
)
malloc
(
num_preamble
*
sizeof
(
uint8_t
));
for
(
int
i
=
0
;
i
<
num_preamble
;
i
++
)
{
UE_list
->
preambles
[
UE_id
].
preamble_list
[
i
]
=
secondaryCellGroup
->
spCellConfig
->
reconfigurationWithSync
->
rach_ConfigDedicated
->
choice
.
uplink
->
cfra
->
resources
.
choice
.
ssb
->
ssb_ResourceList
.
list
.
array
[
i
]
->
ra_PreambleIndex
;
}
LOG_I
(
PHY
,
"Added new UE_id %d/%x with initial secondaryCellGroup
\n
"
,
UE_id
,
rnti
);
}
else
{
// secondaryCellGroup has been updated
...
...
openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_RA.c
View file @
ddf4ca87
...
...
@@ -244,20 +244,35 @@ void nr_initiate_ra_proc(module_id_t module_idP,
uint8_t
ul_carrier_id
=
0
;
// 0 for NUL 1 for SUL
NR_SearchSpace_t
*
ss
;
int
UE_id
=
0
;
// ra_rnti from 5.1.3 in 38.321
uint16_t
ra_rnti
=
1
+
symbol
+
(
slotP
*
14
)
+
(
freq_index
*
14
*
80
)
+
(
ul_carrier_id
*
14
*
80
*
8
);
uint16_t
msg2_frame
,
msg2_slot
,
monitoring_slot_period
,
monitoring_offset
;
gNB_MAC_INST
*
nr_mac
=
RC
.
nrmac
[
module_idP
];
NR_UE_list_t
*
UE_list
=
&
nr_mac
->
UE_list
;
NR_CellGroupConfig_t
*
secondaryCellGroup
=
UE_list
->
secondaryCellGroup
[
0
];
NR_CellGroupConfig_t
*
secondaryCellGroup
=
UE_list
->
secondaryCellGroup
[
UE_id
];
NR_COMMON_channels_t
*
cc
=
&
nr_mac
->
common_channels
[
CC_id
];
NR_ServingCellConfigCommon_t
*
scc
=
cc
->
ServingCellConfigCommon
;
NR_RA_t
*
ra
=
&
cc
->
ra
[
0
];
// if the preamble received correspond to one of the listed
// the UE sent a RACH either for starting RA procedure or RA procedure failed and UE retries
int
pr_found
=
0
;
for
(
int
i
=
0
;
i
<
UE_list
->
preambles
[
UE_id
].
num_preambles
;
i
++
)
{
if
(
preamble_index
==
UE_list
->
preambles
[
UE_id
].
preamble_list
[
i
])
{
pr_found
=
1
;
break
;
}
}
if
(
pr_found
)
UE_list
->
fiveG_connected
[
UE_id
]
=
false
;
else
{
LOG_E
(
MAC
,
"[gNB %d][RAPROC] FAILURE: preamble %d does not correspond to any of the ones in rach_ConfigDedicated for UE_id %d
\n
"
,
module_idP
,
preamble_index
,
UE_id
);
return
;
// if the PRACH preamble does not correspond to any of the ones sent through RRC abort RA proc
}
// This should be handled differently when we use the initialBWP for RA
ra
->
bwp_id
=
1
;
NR_BWP_Downlink_t
*
bwp
=
secondaryCellGroup
->
spCellConfig
->
spCellConfigDedicated
->
downlinkBWP_ToAddModList
->
list
.
array
[
ra
->
bwp_id
-
1
];
...
...
@@ -307,7 +322,7 @@ void nr_initiate_ra_proc(module_id_t module_idP,
ra
->
RA_rnti
=
ra_rnti
;
ra
->
preamble_index
=
preamble_index
;
UE_list
->
tc_rnti
[
UE_id
]
=
ra
->
rnti
;
LOG_I
(
MAC
,
"[gNB %d][RAPROC] CC_id %d Frame %d Activating Msg2 generation in frame %d, slot %d using RA rnti %x
\n
"
,
module_idP
,
...
...
@@ -405,6 +420,7 @@ void nr_schedule_reception_msg3(module_id_t module_idP, int CC_id, frame_t frame
ul_req
->
pdus_list
[
ul_req
->
n_pdus
].
pdu_size
=
sizeof
(
nfapi_nr_pusch_pdu_t
);
ul_req
->
pdus_list
[
ul_req
->
n_pdus
].
pusch_pdu
=
ra
->
pusch_pdu
;
ul_req
->
n_pdus
+=
1
;
ra
->
state
=
RA_IDLE
;
}
}
}
...
...
openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_ulsch.c
View file @
ddf4ca87
...
...
@@ -307,5 +307,20 @@ void nr_rx_sdu(const module_id_t gnb_mod_idP,
nr_process_mac_pdu
(
gnb_mod_idP
,
CC_idP
,
frameP
,
sduP
,
sdu_lenP
);
}
}
else
{
// random access pusch with TC-RNTI
if
(
sduP
!=
NULL
)
{
// if the CRC passed
for
(
int
i
=
0
;
i
<
MAX_MOBILES_PER_GNB
;
i
++
)
{
if
(
UE_list
->
active
[
i
]
==
TRUE
)
{
if
(
UE_list
->
tc_rnti
[
i
]
==
current_rnti
)
{
// for now the only thing we are doing is set the UE as 5G connected
UE_list
->
fiveG_connected
[
i
]
=
true
;
LOG_I
(
MAC
,
"[gNB %d][RAPROC] PUSCH with TC_RNTI %x received correctly and UE_id %d is now 5G connected
\n
"
,
gnb_mod_idP
,
current_rnti
,
i
);
}
}
}
}
}
}
openair2/LAYER2/NR_MAC_gNB/nr_mac_gNB.h
View file @
ddf4ca87
...
...
@@ -197,6 +197,11 @@ typedef struct {
int16_t
ta_update
;
}
NR_UE_sched_ctrl_t
;
typedef
struct
NR_preamble_ue
{
uint8_t
num_preambles
;
uint8_t
*
preamble_list
;
}
NR_preamble_ue
;
/*! \brief UE list used by gNB to order UEs/CC for scheduling*/
typedef
struct
{
DLSCH_PDU
DLSCH_pdu
[
4
][
MAX_MOBILES_PER_GNB
];
...
...
@@ -209,7 +214,10 @@ typedef struct {
int
avail
;
int
num_UEs
;
boolean_t
active
[
MAX_MOBILES_PER_GNB
];
boolean_t
fiveG_connected
[
MAX_MOBILES_PER_GNB
];
rnti_t
rnti
[
MAX_MOBILES_PER_GNB
];
rnti_t
tc_rnti
[
MAX_MOBILES_PER_GNB
];
NR_preamble_ue
preambles
[
MAX_MOBILES_PER_GNB
];
NR_CellGroupConfig_t
*
secondaryCellGroup
[
MAX_MOBILES_PER_GNB
];
}
NR_UE_list_t
;
...
...
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