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
OpenXG
OpenXG UE
Commits
e970c865
Commit
e970c865
authored
Feb 17, 2021
by
rmagueta
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
First draft implementation of CBRA
parent
898dc383
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
48 additions
and
18 deletions
+48
-18
openair1/PHY/NR_TRANSPORT/nr_prach.c
openair1/PHY/NR_TRANSPORT/nr_prach.c
+13
-4
openair2/LAYER2/NR_MAC_UE/config_ue.c
openair2/LAYER2/NR_MAC_UE/config_ue.c
+7
-5
openair2/LAYER2/NR_MAC_UE/nr_ra_procedures.c
openair2/LAYER2/NR_MAC_UE/nr_ra_procedures.c
+12
-2
openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_RA.c
openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_RA.c
+8
-4
openair2/RRC/NR/rrc_gNB_reconfig.c
openair2/RRC/NR/rrc_gNB_reconfig.c
+8
-3
No files found.
openair1/PHY/NR_TRANSPORT/nr_prach.c
View file @
e970c865
...
...
@@ -678,10 +678,19 @@ void rx_nr_prach(PHY_VARS_gNB *gNB,
}
else
{
preamble_shift
-=
NCS
;
if
(
preamble_shift
<
0
)
preamble_shift
+=
N_ZC
;
// FIXME: It is working, but we need to differentiate between odd and even preamble index
// Check why preamble_shift does not match with UE
// TS 38.211 Section 6.3.3.1 Sequence generation
if
(
preamble_index
%
2
==
0
)
{
preamble_shift
=
(
NCS
==
0
)
?
0
:
(
preamble_index
%
(
N_ZC
/
NCS
));
preamble_shift
*=
NCS
;
}
else
{
preamble_shift
-=
2
*
NCS
;
if
(
preamble_shift
<
0
)
preamble_shift
+=
N_ZC
;
}
}
}
else
{
// This is the high-speed case
new_dft
=
0
;
...
...
openair2/LAYER2/NR_MAC_UE/config_ue.c
View file @
e970c865
...
...
@@ -529,11 +529,13 @@ int nr_rrc_mac_config_req_ue(
mac
->
servCellIndex
=
*
cell_group_config
->
spCellConfig
->
servCellIndex
;
config_control_ue
(
mac
);
if
(
cell_group_config
->
spCellConfig
->
reconfigurationWithSync
)
{
ra
->
rach_ConfigDedicated
=
cell_group_config
->
spCellConfig
->
reconfigurationWithSync
->
rach_ConfigDedicated
->
choice
.
uplink
;
mac
->
scc
=
cell_group_config
->
spCellConfig
->
reconfigurationWithSync
->
spCellConfigCommon
;
config_common_ue
(
mac
,
module_id
,
cc_idP
);
mac
->
crnti
=
cell_group_config
->
spCellConfig
->
reconfigurationWithSync
->
newUE_Identity
;
LOG_I
(
MAC
,
"Configuring CRNTI %x
\n
"
,
mac
->
crnti
);
if
(
cell_group_config
->
spCellConfig
->
reconfigurationWithSync
->
rach_ConfigDedicated
)
{
ra
->
rach_ConfigDedicated
=
cell_group_config
->
spCellConfig
->
reconfigurationWithSync
->
rach_ConfigDedicated
->
choice
.
uplink
;
}
mac
->
scc
=
cell_group_config
->
spCellConfig
->
reconfigurationWithSync
->
spCellConfigCommon
;
config_common_ue
(
mac
,
module_id
,
cc_idP
);
mac
->
crnti
=
cell_group_config
->
spCellConfig
->
reconfigurationWithSync
->
newUE_Identity
;
LOG_I
(
MAC
,
"Configuring CRNTI %x
\n
"
,
mac
->
crnti
);
}
// Setup the SSB to Rach Occasions mapping according to the config
...
...
openair2/LAYER2/NR_MAC_UE/nr_ra_procedures.c
View file @
e970c865
...
...
@@ -79,8 +79,8 @@ void init_RA(module_id_t mod_id,
if
(
rach_ConfigDedicated
)
{
if
(
rach_ConfigDedicated
->
cfra
){
LOG_I
(
MAC
,
"Initialization of
4
-step contention-free random access procedure
\n
"
);
prach_resources
->
RA_TYPE
=
RA_
4
STEP
;
LOG_I
(
MAC
,
"Initialization of
2
-step contention-free random access procedure
\n
"
);
prach_resources
->
RA_TYPE
=
RA_
2
STEP
;
ra
->
cfra
=
1
;
}
else
if
(
rach_ConfigDedicated
->
ext1
){
if
(
rach_ConfigDedicated
->
ext1
->
cfra_TwoStep_r16
){
...
...
@@ -93,6 +93,10 @@ void init_RA(module_id_t mod_id,
}
else
{
LOG_E
(
MAC
,
"In %s: config not handled
\n
"
,
__FUNCTION__
);
}
}
else
if
(
nr_rach_ConfigCommon
){
LOG_I
(
MAC
,
"Initialization of 4-step contention-based random access procedure
\n
"
);
prach_resources
->
RA_TYPE
=
RA_4STEP
;
ra
->
cfra
=
0
;
}
else
{
LOG_E
(
MAC
,
"In %s: config not handled
\n
"
,
__FUNCTION__
);
}
...
...
@@ -366,6 +370,12 @@ void ra_preambles_config(NR_PRACH_RESOURCES_t *prach_resources, NR_UE_MAC_INST_t
prach_resources
->
ra_PreambleIndex
=
ra
->
starting_preamble_nb
+
sizeOfRA_PreamblesGroupA
+
((
taus
())
%
(
ra
->
cb_preambles_per_ssb
-
sizeOfRA_PreamblesGroupA
));
ra
->
RA_usedGroupA
=
0
;
}
// TODO: Remove to generate random ra_PreambleIndex
printf
(
"prach_resources->ra_PreambleIndex = %i
\n
"
,
prach_resources
->
ra_PreambleIndex
);
prach_resources
->
ra_PreambleIndex
=
21
;
ra
->
RA_usedGroupA
=
1
;
}
else
{
// Msg3 is being retransmitted
if
(
ra
->
RA_usedGroupA
&&
noGroupB
)
{
prach_resources
->
ra_PreambleIndex
=
ra
->
starting_preamble_nb
+
((
taus
())
%
ra
->
cb_preambles_per_ssb
);
...
...
openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_RA.c
View file @
e970c865
...
...
@@ -454,11 +454,15 @@ void nr_initiate_ra_proc(module_id_t module_idP,
// 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
<
ra
->
preambles
.
num_preambles
;
i
++
)
{
if
(
preamble_index
==
ra
->
preambles
.
preamble_list
[
i
])
{
pr_found
=
1
;
break
;
if
(
ra
->
preambles
.
num_preambles
>
0
)
{
for
(
int
i
=
0
;
i
<
ra
->
preambles
.
num_preambles
;
i
++
)
{
if
(
preamble_index
==
ra
->
preambles
.
preamble_list
[
i
])
{
pr_found
=
1
;
break
;
}
}
}
else
{
pr_found
=
1
;
}
if
(
!
pr_found
)
{
...
...
openair2/RRC/NR/rrc_gNB_reconfig.c
View file @
e970c865
...
...
@@ -226,7 +226,9 @@ void fill_default_secondaryCellGroup(NR_ServingCellConfigCommon_t *servingcellco
secondaryCellGroup
->
spCellConfig
->
reconfigurationWithSync
->
t304
=
NR_ReconfigurationWithSync__t304_ms2000
;
secondaryCellGroup
->
spCellConfig
->
reconfigurationWithSync
->
rach_ConfigDedicated
=
NULL
;
secondaryCellGroup
->
spCellConfig
->
reconfigurationWithSync
->
ext1
=
NULL
;
/* contention free ra */
// For 2-step contention-free random access procedure
#if 0
secondaryCellGroup->spCellConfig->reconfigurationWithSync->rach_ConfigDedicated = calloc(1,sizeof(struct NR_ReconfigurationWithSync__rach_ConfigDedicated));
secondaryCellGroup->spCellConfig->reconfigurationWithSync->rach_ConfigDedicated->present= NR_ReconfigurationWithSync__rach_ConfigDedicated_PR_uplink;
secondaryCellGroup->spCellConfig->reconfigurationWithSync->rach_ConfigDedicated->choice.uplink= calloc(1,sizeof(struct NR_RACH_ConfigDedicated));
...
...
@@ -240,12 +242,13 @@ void fill_default_secondaryCellGroup(NR_ServingCellConfigCommon_t *servingcellco
secondaryCellGroup->spCellConfig->reconfigurationWithSync->rach_ConfigDedicated->choice.uplink->cfra->resources.present = NR_CFRA__resources_PR_ssb;
secondaryCellGroup->spCellConfig->reconfigurationWithSync->rach_ConfigDedicated->choice.uplink->cfra->resources.choice.ssb = calloc(1,sizeof(struct NR_CFRA__resources__ssb));
secondaryCellGroup->spCellConfig->reconfigurationWithSync->rach_ConfigDedicated->choice.uplink->cfra->resources.choice.ssb->ra_ssb_OccasionMaskIndex = 0;
struct NR_CFRA_SSB_Resource *ssbElem[8];
ssbElem[0] = calloc(1,sizeof(struct NR_CFRA_SSB_Resource));
ssbElem[0]->ssb = 0;
ssbElem[0]->ra_PreambleIndex = 63;
ASN_SEQUENCE_ADD(&secondaryCellGroup->spCellConfig->reconfigurationWithSync->rach_ConfigDedicated->choice.uplink->cfra->resources.choice.ssb->ssb_ResourceList.list,ssbElem[0]);
#if 0
ssbElem[1] = calloc(1,sizeof(struct NR_CFRA_SSB_Resource));
ssbElem[1]->ssb = 1;
ssbElem[1]->ra_PreambleIndex = 62;
...
...
@@ -274,8 +277,10 @@ void fill_default_secondaryCellGroup(NR_ServingCellConfigCommon_t *servingcellco
ssbElem[7]->ssb = 7;
ssbElem[7]->ra_PreambleIndex = 63;
ASN_SEQUENCE_ADD(&secondaryCellGroup->spCellConfig->reconfigurationWithSync->rach_ConfigDedicated->choice.uplink->cfra->resources.choice.ssb->ssb_ResourceList.list,ssbElem[7]);
#endif
secondaryCellGroup->spCellConfig->reconfigurationWithSync->rach_ConfigDedicated->choice.uplink->cfra->ext1 = NULL;
#endif
secondaryCellGroup
->
spCellConfig
->
rlf_TimersAndConstants
=
calloc
(
1
,
sizeof
(
*
secondaryCellGroup
->
spCellConfig
->
rlf_TimersAndConstants
));
secondaryCellGroup
->
spCellConfig
->
rlf_TimersAndConstants
->
present
=
NR_SetupRelease_RLF_TimersAndConstants_PR_setup
;
secondaryCellGroup
->
spCellConfig
->
rlf_TimersAndConstants
->
choice
.
setup
=
calloc
(
1
,
sizeof
(
*
secondaryCellGroup
->
spCellConfig
->
rlf_TimersAndConstants
->
choice
.
setup
));
...
...
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