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
98e268d1
Commit
98e268d1
authored
Jan 07, 2021
by
Robert Schmidt
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ULSCH fix: Only allocate CCEs when necessary
parent
570160c5
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
30 additions
and
7 deletions
+30
-7
openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_ulsch.c
openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_ulsch.c
+30
-7
No files found.
openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_ulsch.c
View file @
98e268d1
...
...
@@ -535,13 +535,6 @@ void pf_ul(module_id_t module_id,
const
uint32_t
b
=
UE_info
->
mac_stats
[
UE_id
].
ulsch_current_bytes
;
ul_thr_ue
[
UE_id
]
=
(
1
-
a
)
*
ul_thr_ue
[
UE_id
]
+
a
*
b
;
/* Find free CCE */
bool
freeCCE
=
find_free_CCE
(
module_id
,
slot
,
UE_id
);
if
(
!
freeCCE
)
{
LOG_E
(
MAC
,
"%4d.%2d could not find CCE for UE %d/RNTI %04x
\n
"
,
frame
,
slot
,
UE_id
,
UE_info
->
rnti
[
UE_id
]);
continue
;
}
/* Save PUSCH field */
/* we want to avoid a lengthy deduction of DMRS and other parameters in
* every TTI if we can save it, so check whether dci_format, TDA, or
...
...
@@ -562,6 +555,17 @@ void pf_ul(module_id_t module_id,
sched_ctrl
->
sched_pusch
.
ul_harq_pid
=
sched_ctrl
->
retrans_ul_harq
.
head
;
if
(
sched_ctrl
->
sched_pusch
.
ul_harq_pid
>=
0
)
{
/* RETRANSMISSION: Allocate retransmission*/
/* Find free CCE */
bool
freeCCE
=
find_free_CCE
(
module_id
,
slot
,
UE_id
);
if
(
!
freeCCE
)
{
LOG_E
(
MAC
,
"%4d.%2d no free CCE for retransmission UE %04x
\n
"
,
frame
,
slot
,
UE_info
->
rnti
[
UE_id
]);
continue
;
}
/* reduce max_num_ue once we are sure UE can be allocated, i.e., has CCE */
max_num_ue
--
;
if
(
max_num_ue
<
0
)
return
;
/* Save shced_frame and sched_slot before overwrite by previous PUSCH filed */
NR_UE_ul_harq_t
*
cur_harq
=
&
sched_ctrl
->
ul_harq_processes
[
sched_ctrl
->
sched_pusch
.
ul_harq_pid
];
cur_harq
->
sched_pusch
.
frame
=
sched_ctrl
->
sched_pusch
.
frame
;
...
...
@@ -606,6 +610,16 @@ void pf_ul(module_id_t module_id,
/* Check BSR */
if
(
sched_ctrl
->
estimated_ul_buffer
-
sched_ctrl
->
sched_ul_bytes
<=
0
)
{
/* if no data, pre-allocate 5RB */
bool
freeCCE
=
find_free_CCE
(
module_id
,
slot
,
UE_id
);
if
(
!
freeCCE
)
{
LOG_E
(
MAC
,
"%4d.%2d no free CCE for UE %04x
\n
"
,
frame
,
slot
,
UE_info
->
rnti
[
UE_id
]);
continue
;
}
/* reduce max_num_ue once we are sure UE can be allocated, i.e., has CCE */
max_num_ue
--
;
if
(
max_num_ue
<
0
)
return
;
while
(
rbStart
<
bwpSize
&&
!
rballoc_mask
[
rbStart
])
rbStart
++
;
if
(
rbStart
+
min_rb
>=
bwpSize
)
{
LOG_W
(
MAC
,
"cannot allocate UL data for UE %d/RNTI %04x: no resources
\n
"
,
...
...
@@ -670,7 +684,16 @@ void pf_ul(module_id_t module_id,
*
max
=
UE_sched
.
next
[
*
max
];
*
p
=
-
1
;
bool
freeCCE
=
find_free_CCE
(
module_id
,
slot
,
UE_id
);
if
(
!
freeCCE
)
{
LOG_E
(
MAC
,
"%4d.%2d no free CCE for UE %04x
\n
"
,
frame
,
slot
,
UE_info
->
rnti
[
UE_id
]);
continue
;
}
/* reduce max_num_ue once we are sure UE can be allocated, i.e., has CCE */
max_num_ue
--
;
if
(
max_num_ue
<
0
)
return
;
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
);
...
...
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