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
canghaiwuhen
OpenXG-RAN
Commits
93be78e0
Commit
93be78e0
authored
Dec 07, 2020
by
ChiehChun
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Find the largest contiguos region
parent
641433ab
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
23 additions
and
1 deletion
+23
-1
openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_ulsch.c
openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_ulsch.c
+23
-1
No files found.
openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_ulsch.c
View file @
93be78e0
...
...
@@ -712,11 +712,33 @@ void nr_simple_ulsch_preprocessor(module_id_t module_id,
const
uint16_t
bwpSize
=
NRRIV2BW
(
sched_ctrl
->
active_ubwp
->
bwp_Common
->
genericParameters
.
locationAndBandwidth
,
275
);
uint8_t
rballoc_mask
[
bwpSize
];
int
n_rb_sched
=
0
;
int
st
=
0
,
e
=
0
,
rb_block
=
1
;
for
(
int
i
=
0
;
i
<
bwpSize
;
i
++
)
{
// calculate mask: init with "NOT" vrb_map_UL:
// if any RB in vrb_map_UL is blocked (1), the current RB will be 0
rballoc_mask
[
i
]
=
!
vrb_map_UL
[
i
];
n_rb_sched
+=
rballoc_mask
[
i
];
/* Find the largest contiguous region */
if
(
rballoc_mask
[
i
]
==
1
&&
rb_block
==
1
)
{
rb_block
=
0
;
st
=
i
;
}
if
(
rballoc_mask
[
i
]
==
1
&&
rb_block
==
0
&&
(
i
-
st
+
1
)
>
n_rb_sched
)
{
e
=
i
;
n_rb_sched
=
e
-
st
+
1
;
}
if
(
rballoc_mask
[
i
]
==
0
&&
rb_block
==
0
)
{
rb_block
=
1
;
n_rb_sched
=
cmax
(
i
-
st
,
n_rb_sched
);
}
}
st
=
e
-
n_rb_sched
+
1
;
for
(
int
i
=
0
;
i
<
bwpSize
;
i
++
)
{
if
(
i
>=
st
&&
i
<=
e
)
rballoc_mask
[
i
]
=
1
;
else
rballoc_mask
[
i
]
=
0
;
}
/* proportional fair scheduling algorithm */
...
...
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