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
2ef60b2f
Commit
2ef60b2f
authored
Dec 10, 2020
by
ChiehChun
Committed by
Robert Schmidt
Jan 20, 2021
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Find max coeff & Decrease n_rb_sched
parent
2c5a116b
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
20 additions
and
5 deletions
+20
-5
openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_ulsch.c
openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_ulsch.c
+20
-5
No files found.
openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_ulsch.c
View file @
2ef60b2f
...
@@ -622,17 +622,31 @@ void pf_ul(module_id_t module_id,
...
@@ -622,17 +622,31 @@ void pf_ul(module_id_t module_id,
b
,
UE_id
,
ul_thr_ue
[
UE_id
],
tbs
,
UE_id
,
coeff_ue
[
UE_id
]);
b
,
UE_id
,
ul_thr_ue
[
UE_id
],
tbs
,
UE_id
,
coeff_ue
[
UE_id
]);
}
}
NR_UE_sched_ctrl_t
*
sched_ctrl
=
&
UE_info
->
UE_sched_ctrl
[
UE_id
];
int
rbStart
=
NRRIV2PRBOFFSET
(
sched_ctrl
->
active_bwp
->
bwp_Common
->
genericParameters
.
locationAndBandwidth
,
275
);
const
uint16_t
bwpSize
=
NRRIV2BW
(
sched_ctrl
->
active_ubwp
->
bwp_Common
->
genericParameters
.
locationAndBandwidth
,
275
);
/* Loop UE_sched to find max coeff and allocate transmission */
/* Loop UE_sched to find max coeff and allocate transmission */
//while (UE_sched.head > 0 && max_num_ue> 0 && n_rb_sched > 0)
while
(
UE_sched
.
head
>=
0
&&
max_num_ue
>
0
&&
n_rb_sched
>
0
)
{
if
(
n_rb_sched
>
0
){
//temp
/* Find max coeff */
/* Find max coeff */
int
*
max
=
&
UE_sched
.
head
;
/* Find max coeff: assume head is max */
int
*
p
=
&
UE_sched
.
next
[
*
max
];
while
(
*
p
>=
0
)
{
/* Find max coeff: if the current one has larger coeff, save for later */
if
(
coeff_ue
[
*
p
]
>
coeff_ue
[
*
max
])
max
=
p
;
p
=
&
UE_sched
.
next
[
*
p
];
}
/* Find max coeff: remove the max one: do not use remove_nr_list() since it
* goes through the whole list every time. Note that UE_sched.tail might
* not be set correctly anymore */
const
int
UE_id
=
*
max
;
p
=
&
UE_sched
.
next
[
*
max
];
*
max
=
UE_sched
.
next
[
*
max
];
*
p
=
-
1
;
max_num_ue
--
;
max_num_ue
--
;
NR_UE_sched_ctrl_t
*
sched_ctrl
=
&
UE_info
->
UE_sched_ctrl
[
UE_id
];
int
rbStart
=
NRRIV2PRBOFFSET
(
sched_ctrl
->
active_bwp
->
bwp_Common
->
genericParameters
.
locationAndBandwidth
,
275
);
const
uint16_t
bwpSize
=
NRRIV2BW
(
sched_ctrl
->
active_ubwp
->
bwp_Common
->
genericParameters
.
locationAndBandwidth
,
275
);
NR_sched_pusch_t
*
sched_pusch
=
&
sched_ctrl
->
sched_pusch
;
NR_sched_pusch_t
*
sched_pusch
=
&
sched_ctrl
->
sched_pusch
;
...
@@ -665,6 +679,7 @@ void pf_ul(module_id_t module_id,
...
@@ -665,6 +679,7 @@ void pf_ul(module_id_t module_id,
rbSize
,
sched_pusch
->
tb_size
,
sched_ctrl
->
estimated_ul_buffer
,
sched_ctrl
->
sched_ul_bytes
,
B
);
rbSize
,
sched_pusch
->
tb_size
,
sched_ctrl
->
estimated_ul_buffer
,
sched_ctrl
->
sched_ul_bytes
,
B
);
/* Mark the corresponding RBs as used */
/* Mark the corresponding RBs as used */
n_rb_sched
-=
sched_pusch
->
rbSize
;
for
(
int
rb
=
0
;
rb
<
sched_ctrl
->
sched_pusch
.
rbSize
;
rb
++
)
for
(
int
rb
=
0
;
rb
<
sched_ctrl
->
sched_pusch
.
rbSize
;
rb
++
)
rballoc_mask
[
rb
+
sched_ctrl
->
sched_pusch
.
rbStart
]
=
0
;
rballoc_mask
[
rb
+
sched_ctrl
->
sched_pusch
.
rbStart
]
=
0
;
}
}
...
...
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