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
be9667b9
Commit
be9667b9
authored
Nov 12, 2020
by
ChiehChun
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Find max coeff from UE_sched
parent
5db632ff
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
24 additions
and
13 deletions
+24
-13
openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_dlsch.c
openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_dlsch.c
+24
-13
No files found.
openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_dlsch.c
View file @
be9667b9
...
@@ -450,7 +450,6 @@ void pf_dl(module_id_t module_id,
...
@@ -450,7 +450,6 @@ void pf_dl(module_id_t module_id,
uint8_t
*
rballoc_mask
,
uint8_t
*
rballoc_mask
,
int
max_num_ue
)
{
int
max_num_ue
)
{
const
int
UE_id
=
0
;
float
coeff_ue
[
MAX_MOBILES_PER_GNB
];
float
coeff_ue
[
MAX_MOBILES_PER_GNB
];
NR_UE_list_t
UE_sched
;
// UEs that could be scheduled
NR_UE_list_t
UE_sched
;
// UEs that could be scheduled
int
*
uep
=
&
UE_sched
.
head
;
int
*
uep
=
&
UE_sched
.
head
;
...
@@ -522,7 +521,7 @@ void pf_dl(module_id_t module_id,
...
@@ -522,7 +521,7 @@ void pf_dl(module_id_t module_id,
1
/* nrOfLayers */
)
1
/* nrOfLayers */
)
>>
3
;
>>
3
;
coeff_ue
[
UE_id
]
=
(
float
)
tbs
/
thr_ue
[
UE_id
];
coeff_ue
[
UE_id
]
=
(
float
)
tbs
/
thr_ue
[
UE_id
];
LOG_
I
(
MAC
,
"b %d, thr_ue[%d] %f, tbs %d, coeff_ue[%d] %f
\n
"
,
LOG_
D
(
MAC
,
"b %d, thr_ue[%d] %f, tbs %d, coeff_ue[%d] %f
\n
"
,
b
,
UE_id
,
thr_ue
[
UE_id
],
tbs
,
UE_id
,
coeff_ue
[
UE_id
]);
b
,
UE_id
,
thr_ue
[
UE_id
],
tbs
,
UE_id
,
coeff_ue
[
UE_id
]);
/* Create UE_sched list for transmission*/
/* Create UE_sched list for transmission*/
...
@@ -532,24 +531,36 @@ void pf_dl(module_id_t module_id,
...
@@ -532,24 +531,36 @@ void pf_dl(module_id_t module_id,
}
}
*
uep
=
-
1
;
*
uep
=
-
1
;
NR_UE_sched_ctrl_t
*
sched_ctrl
=
&
UE_info
->
UE_sched_ctrl
[
UE_id
];
const
uint16_t
rnti
=
UE_info
->
rnti
[
UE_id
];
const
uint16_t
bwpSize
=
NRRIV2BW
(
sched_ctrl
->
active_bwp
->
bwp_Common
->
genericParameters
.
locationAndBandwidth
,
275
);
int
rbStart
=
NRRIV2PRBOFFSET
(
sched_ctrl
->
active_bwp
->
bwp_Common
->
genericParameters
.
locationAndBandwidth
,
275
);
// for now HARQ PID is fixed and should be the same as in post-processor
const
int
current_harq_pid
=
slot
%
8
;
NR_UE_harq_t
*
harq
=
&
sched_ctrl
->
harq_processes
[
current_harq_pid
];
/* Loop UE_sched to find max coeff and allocate transmission */
/* Loop UE_sched to find max coeff and allocate transmission */
//while(n_rb_sched > 0 && UE_sched.head >= 0){
while
(
max_num_ue
>
0
&&
n_rb_sched
>
0
&&
UE_sched
.
head
>=
0
)
{
if
(
harq
->
round
==
0
)
{
// temp
/* Find max coeff from UE_sched*/
/* Find max coeff from UE_sched*/
int
*
max
=
&
UE_sched
.
head
;
/* assume head is max */
int
*
p
=
&
UE_sched
.
next
[
*
max
];
while
(
*
p
>=
0
)
{
/* if the current one has larger coeff, save for later */
if
(
coeff_ue
[
*
p
]
>
coeff_ue
[
*
max
])
max
=
p
;
p
=
&
UE_sched
.
next
[
*
p
];
}
/* remove the max one */
const
int
UE_id
=
*
max
;
p
=
&
UE_sched
.
next
[
*
max
];
*
max
=
UE_sched
.
next
[
*
max
];
*
p
=
-
1
;
NR_UE_sched_ctrl_t
*
sched_ctrl
=
&
UE_info
->
UE_sched_ctrl
[
UE_id
];
const
uint16_t
rnti
=
UE_info
->
rnti
[
UE_id
];
const
uint16_t
bwpSize
=
NRRIV2BW
(
sched_ctrl
->
active_bwp
->
bwp_Common
->
genericParameters
.
locationAndBandwidth
,
275
);
int
rbStart
=
NRRIV2PRBOFFSET
(
sched_ctrl
->
active_bwp
->
bwp_Common
->
genericParameters
.
locationAndBandwidth
,
275
);
/* Find a free CCE */
/* Find a free CCE */
bool
freeCCEE
=
find_free_CCE
(
module_id
,
slot
,
UE_info
,
UE_id
);
bool
freeCCEE
=
find_free_CCE
(
module_id
,
slot
,
UE_info
,
UE_id
);
if
(
!
freeCCEE
)
if
(
!
freeCCEE
)
return
;
continue
;
max_num_ue
--
;
/* Find PUCCH occasion: if it fails, undo CCE allocation (undoing PUCCH
/* Find PUCCH occasion: if it fails, undo CCE allocation (undoing PUCCH
* allocation after CCE alloc fail would be more complex) */
* allocation after CCE alloc fail would be more complex) */
const
bool
alloc
=
nr_acknack_scheduling
(
module_id
,
UE_id
,
frame
,
slot
);
const
bool
alloc
=
nr_acknack_scheduling
(
module_id
,
UE_id
,
frame
,
slot
);
...
...
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