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
littleBu
OpenXG-RAN
Commits
76bc07a3
Commit
76bc07a3
authored
Aug 19, 2021
by
francescomani
Browse files
Options
Browse Files
Download
Plain Diff
Merge remote-tracking branch 'origin/NR_msg3_allocation_fix' into NR_BWP_fixes
parents
2780e004
8f4a46e3
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
16 additions
and
8 deletions
+16
-8
openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_RA.c
openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_RA.c
+16
-8
No files found.
openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_RA.c
View file @
76bc07a3
...
...
@@ -745,10 +745,19 @@ void nr_get_Msg3alloc(module_id_t module_id,
LOG_D
(
NR_MAC
,
"[RAPROC] Msg3 slot %d: current slot %u Msg3 frame %u k2 %u Msg3_tda_id %u start symbol index %u
\n
"
,
ra
->
Msg3_slot
,
current_slot
,
ra
->
Msg3_frame
,
k2
,
ra
->
Msg3_tda_id
,
StartSymbolIndex
);
uint16_t
*
vrb_map_UL
=
&
RC
.
nrmac
[
module_id
]
->
common_channels
[
CC_id
].
vrb_map_UL
[
ra
->
Msg3_slot
*
MAX_BWP_SIZE
];
const
uint16_t
bwpSize
=
NRRIV2BW
(
ubwp
?
ubwp
->
bwp_Common
->
genericParameters
.
locationAndBandwidth
:
scc
->
uplinkConfigCommon
->
initialUplinkBWP
->
genericParameters
.
locationAndBandwidth
,
MAX_BWP_SIZE
);
int
bwpSize
=
NRRIV2BW
(
scc
->
uplinkConfigCommon
->
initialUplinkBWP
->
genericParameters
.
locationAndBandwidth
,
MAX_BWP_SIZE
);
int
bwpStart
=
NRRIV2PRBOFFSET
(
scc
->
uplinkConfigCommon
->
initialUplinkBWP
->
genericParameters
.
locationAndBandwidth
,
MAX_BWP_SIZE
);
if
(
ra
->
CellGroup
)
{
AssertFatal
(
ra
->
CellGroup
->
spCellConfig
->
spCellConfigDedicated
->
downlinkBWP_ToAddModList
->
list
.
count
==
1
,
"downlinkBWP_ToAddModList has %d BWP!
\n
"
,
ra
->
CellGroup
->
spCellConfig
->
spCellConfigDedicated
->
downlinkBWP_ToAddModList
->
list
.
count
);
NR_BWP_Uplink_t
*
ubwp
=
ra
->
CellGroup
->
spCellConfig
->
spCellConfigDedicated
->
uplinkConfig
->
uplinkBWP_ToAddModList
->
list
.
array
[
ra
->
bwp_id
-
1
];
int
act_bwp_start
=
NRRIV2PRBOFFSET
(
ubwp
->
bwp_Common
->
genericParameters
.
locationAndBandwidth
,
MAX_BWP_SIZE
);
int
act_bwp_size
=
NRRIV2BW
(
ubwp
->
bwp_Common
->
genericParameters
.
locationAndBandwidth
,
MAX_BWP_SIZE
);
if
((
bwpStart
<
act_bwp_start
)
||
(
bwpSize
>
act_bwp_size
))
bwpStart
=
act_bwp_start
;
}
/* search msg3_nb_rb free RBs */
int
rbSize
=
0
;
...
...
@@ -756,11 +765,11 @@ void nr_get_Msg3alloc(module_id_t module_id,
while
(
rbSize
<
msg3_nb_rb
)
{
rbStart
+=
rbSize
;
/* last iteration rbSize was not enough, skip it */
rbSize
=
0
;
while
(
rbStart
<
bwpSize
&&
vrb_map_UL
[
rbStart
])
while
(
rbStart
<
bwpSize
&&
vrb_map_UL
[
rbStart
+
bwpStart
])
rbStart
++
;
AssertFatal
(
rbStart
<
bwpSize
-
msg3_nb_rb
,
"no space to allocate Msg 3 for RA!
\n
"
);
while
(
rbStart
+
rbSize
<
bwpSize
&&
!
vrb_map_UL
[
rbStart
+
rbSize
]
&&
!
vrb_map_UL
[
rbStart
+
bwpStart
+
rbSize
]
&&
rbSize
<
msg3_nb_rb
)
rbSize
++
;
}
...
...
@@ -871,7 +880,6 @@ void nr_add_msg3(module_id_t module_idP, int CC_id, frame_t frameP, sub_frame_t
pusch_pdu
->
dmrs_ports
=
1
;
// 6.2.2 in 38.214 only port 0 to be used
pusch_pdu
->
num_dmrs_cdm_grps_no_data
=
2
;
// no data in dmrs symbols as in 6.2.2 in 38.214
pusch_pdu
->
resource_alloc
=
1
;
//type 1
//pusch_pdu->rb_start = ra->msg3_first_rb + ibwp_start - abwp_start; // as for 6.3.1.7 in 38.211
pusch_pdu
->
rb_start
=
ra
->
msg3_first_rb
;
if
(
ra
->
msg3_nb_rb
>
pusch_pdu
->
bwp_size
)
AssertFatal
(
1
==
0
,
"MSG3 allocated number of RBs exceed the BWP size
\n
"
);
...
...
@@ -897,7 +905,7 @@ void nr_add_msg3(module_id_t module_idP, int CC_id, frame_t frameP, sub_frame_t
12
,
// nb dmrs set for no data in dmrs symbol
0
,
//nb_rb_oh
0
,
// to verify tb scaling
pusch_pdu
->
nrOfLayers
=
1
)
>>
3
;
pusch_pdu
->
nrOfLayers
)
>>
3
;
// calling function to fill rar message
nr_fill_rar
(
module_idP
,
ra
,
RAR_pdu
,
pusch_pdu
);
...
...
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