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
a6136177
Commit
a6136177
authored
Feb 21, 2021
by
rmagueta
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix preamble shift at gNB for RA works with all preambles
parent
22fa28e7
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
29 additions
and
37 deletions
+29
-37
openair1/PHY/NR_TRANSPORT/nr_prach.c
openair1/PHY/NR_TRANSPORT/nr_prach.c
+3
-12
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
+24
-25
No files found.
openair1/PHY/NR_TRANSPORT/nr_prach.c
View file @
a6136177
...
...
@@ -678,19 +678,10 @@ void rx_nr_prach(PHY_VARS_gNB *gNB,
}
else
{
preamble_shift
-=
NCS
;
// 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
;
}
if
(
preamble_shift
<
0
)
preamble_shift
+=
((
N_ZC
/
NCS
)
*
NCS
);
}
}
else
{
// This is the high-speed case
new_dft
=
0
;
...
...
openair2/LAYER2/NR_MAC_UE/mac_defs.h
View file @
a6136177
...
...
@@ -257,6 +257,8 @@ typedef struct {
uint8_t
RA_attempt_number
;
/// Random-access procedure flag
uint8_t
RA_active
;
/// Random-access preamble index
int
ra_PreambleIndex
;
/// Flag for the Msg1 generation: enabled at every occurrence of nr prach slot
uint8_t
generate_nr_prach
;
...
...
openair2/LAYER2/NR_MAC_UE/nr_ra_procedures.c
View file @
a6136177
...
...
@@ -64,6 +64,8 @@ void init_RA(module_id_t mod_id,
RA_config_t
*
ra
=
&
mac
->
ra
;
ra
->
RA_active
=
1
;
ra
->
ra_PreambleIndex
=
-
1
;
ra
->
RA_usedGroupA
=
1
;
ra
->
RA_RAPID_found
=
0
;
ra
->
preambleTransMax
=
0
;
ra
->
first_Msg3
=
1
;
...
...
@@ -251,7 +253,7 @@ void ra_preambles_config(NR_PRACH_RESOURCES_t *prach_resources, NR_UE_MAC_INST_t
int
messageSizeGroupA
=
0
;
int
sizeOfRA_PreamblesGroupA
=
0
;
int
messagePowerOffsetGroupB
=
0
;
int
PLThreshold
;
int
PLThreshold
=
0
;
long
deltaPreamble_Msg3
=
0
;
uint8_t
noGroupB
=
0
;
RA_config_t
*
ra
=
&
mac
->
ra
;
...
...
@@ -354,37 +356,34 @@ void ra_preambles_config(NR_PRACH_RESOURCES_t *prach_resources, NR_UE_MAC_INST_t
}
/* Msg3 has not been transmitted yet */
if
(
ra
->
first_Msg3
)
{
if
(
noGroupB
)
{
// use Group A preamble
prach_resources
->
ra_PreambleIndex
=
ra
->
starting_preamble_nb
+
((
taus
())
%
ra
->
cb_preambles_per_ssb
);
ra
->
RA_usedGroupA
=
1
;
}
else
if
((
ra
->
Msg3_size
<
messageSizeGroupA
)
&&
(
dl_pathloss
>
PLThreshold
))
{
// Group B is configured and RA preamble Group A is used
// - todo add condition on CCCH_sdu_size for initiation by CCCH
prach_resources
->
ra_PreambleIndex
=
ra
->
starting_preamble_nb
+
((
taus
())
%
sizeOfRA_PreamblesGroupA
);
ra
->
RA_usedGroupA
=
1
;
}
else
{
// Group B preamble is configured and used
// the first sizeOfRA_PreamblesGroupA RA preambles belong to RA Preambles Group A
// the remaining belong to RA Preambles Group B
prach_resources
->
ra_PreambleIndex
=
ra
->
starting_preamble_nb
+
sizeOfRA_PreamblesGroupA
+
((
taus
())
%
(
ra
->
cb_preambles_per_ssb
-
sizeOfRA_PreamblesGroupA
));
ra
->
RA_usedGroupA
=
0
;
if
(
ra
->
ra_PreambleIndex
<
0
||
ra
->
ra_PreambleIndex
>
63
)
{
if
(
noGroupB
)
{
// use Group A preamble
ra
->
ra_PreambleIndex
=
ra
->
starting_preamble_nb
+
((
taus
())
%
ra
->
cb_preambles_per_ssb
);
ra
->
RA_usedGroupA
=
1
;
}
else
if
((
ra
->
Msg3_size
<
messageSizeGroupA
)
&&
(
dl_pathloss
>
PLThreshold
))
{
// Group B is configured and RA preamble Group A is used
// - todo add condition on CCCH_sdu_size for initiation by CCCH
ra
->
ra_PreambleIndex
=
ra
->
starting_preamble_nb
+
((
taus
())
%
sizeOfRA_PreamblesGroupA
);
ra
->
RA_usedGroupA
=
1
;
}
else
{
// Group B preamble is configured and used
// the first sizeOfRA_PreamblesGroupA RA preambles belong to RA Preambles Group A
// the remaining belong to RA Preambles Group B
ra
->
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
);
ra
->
ra_PreambleIndex
=
ra
->
starting_preamble_nb
+
((
taus
())
%
ra
->
cb_preambles_per_ssb
);
}
else
if
(
ra
->
RA_usedGroupA
&&
!
noGroupB
){
prach_resources
->
ra_PreambleIndex
=
ra
->
starting_preamble_nb
+
((
taus
())
%
sizeOfRA_PreamblesGroupA
);
ra
->
ra_PreambleIndex
=
ra
->
starting_preamble_nb
+
((
taus
())
%
sizeOfRA_PreamblesGroupA
);
}
else
{
prach_resources
->
ra_PreambleIndex
=
ra
->
starting_preamble_nb
+
sizeOfRA_PreamblesGroupA
+
((
taus
())
%
(
ra
->
cb_preambles_per_ssb
-
sizeOfRA_PreamblesGroupA
));
ra
->
ra_PreambleIndex
=
ra
->
starting_preamble_nb
+
sizeOfRA_PreamblesGroupA
+
((
taus
())
%
(
ra
->
cb_preambles_per_ssb
-
sizeOfRA_PreamblesGroupA
));
}
}
prach_resources
->
ra_PreambleIndex
=
ra
->
ra_PreambleIndex
;
}
// RA-RNTI computation (associated to PRACH occasion in which the RA Preamble is transmitted)
...
...
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