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
alex037yang
OpenXG-RAN
Commits
cc824e45
Commit
cc824e45
authored
Jan 12, 2021
by
ChiehChun
Committed by
Robert Schmidt
Mar 19, 2021
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Check UL resource first for retransmission
parent
85a93882
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
15 additions
and
12 deletions
+15
-12
openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_ulsch.c
openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_ulsch.c
+15
-12
No files found.
openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_ulsch.c
View file @
cc824e45
...
@@ -582,22 +582,12 @@ void pf_ul(module_id_t module_id,
...
@@ -582,22 +582,12 @@ void pf_ul(module_id_t module_id,
sched_ctrl
->
sched_pusch
.
ul_harq_pid
=
sched_ctrl
->
retrans_ul_harq
.
head
;
sched_ctrl
->
sched_pusch
.
ul_harq_pid
=
sched_ctrl
->
retrans_ul_harq
.
head
;
if
(
sched_ctrl
->
sched_pusch
.
ul_harq_pid
>=
0
)
{
if
(
sched_ctrl
->
sched_pusch
.
ul_harq_pid
>=
0
)
{
/* RETRANSMISSION: Allocate retransmission*/
/* RETRANSMISSION: Allocate retransmission*/
/* Find free CCE */
bool
freeCCE
=
find_free_CCE
(
module_id
,
slot
,
UE_id
);
if
(
!
freeCCE
)
{
LOG_D
(
MAC
,
"%4d.%2d no free CCE for retransmission UL DCI 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 fi
le
d */
/* Save shced_frame and sched_slot before overwrite by previous PUSCH fi
el
d */
NR_UE_ul_harq_t
*
cur_harq
=
&
sched_ctrl
->
ul_harq_processes
[
sched_ctrl
->
sched_pusch
.
ul_harq_pid
];
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
;
cur_harq
->
sched_pusch
.
frame
=
sched_ctrl
->
sched_pusch
.
frame
;
cur_harq
->
sched_pusch
.
slot
=
sched_ctrl
->
sched_pusch
.
slot
;
cur_harq
->
sched_pusch
.
slot
=
sched_ctrl
->
sched_pusch
.
slot
;
/* Get previous PSUCH fi
le
d info */
/* Get previous PSUCH fi
el
d info */
sched_ctrl
->
sched_pusch
=
cur_harq
->
sched_pusch
;
sched_ctrl
->
sched_pusch
=
cur_harq
->
sched_pusch
;
NR_sched_pusch_t
*
sched_pusch
=
&
sched_ctrl
->
sched_pusch
;
NR_sched_pusch_t
*
sched_pusch
=
&
sched_ctrl
->
sched_pusch
;
LOG_D
(
MAC
,
"%4d.%2d Allocate UL retransmission UE %d/RNTI %04x sched %4d.%2d (%d RBs)
\n
"
,
LOG_D
(
MAC
,
"%4d.%2d Allocate UL retransmission UE %d/RNTI %04x sched %4d.%2d (%d RBs)
\n
"
,
...
@@ -605,6 +595,7 @@ void pf_ul(module_id_t module_id,
...
@@ -605,6 +595,7 @@ void pf_ul(module_id_t module_id,
sched_pusch
->
frame
,
sched_pusch
->
slot
,
sched_pusch
->
frame
,
sched_pusch
->
slot
,
sched_pusch
->
rbSize
);
sched_pusch
->
rbSize
);
/* Check the resource is enough for retransmission */
while
(
rbStart
<
bwpSize
&&
!
rballoc_mask
[
rbStart
])
rbStart
++
;
while
(
rbStart
<
bwpSize
&&
!
rballoc_mask
[
rbStart
])
rbStart
++
;
if
(
rbStart
+
sched_pusch
->
rbSize
>=
bwpSize
)
{
if
(
rbStart
+
sched_pusch
->
rbSize
>=
bwpSize
)
{
LOG_W
(
MAC
,
"cannot allocate UL data for UE %d/RNTI %04x: no resources
\n
"
,
LOG_W
(
MAC
,
"cannot allocate UL data for UE %d/RNTI %04x: no resources
\n
"
,
...
@@ -612,8 +603,20 @@ void pf_ul(module_id_t module_id,
...
@@ -612,8 +603,20 @@ void pf_ul(module_id_t module_id,
return
;
return
;
}
}
sched_pusch
->
rbStart
=
rbStart
;
sched_pusch
->
rbStart
=
rbStart
;
/* no need to recompute the TBS, it will be the same */
/* no need to recompute the TBS, it will be the same */
/* Find free CCE */
bool
freeCCE
=
find_free_CCE
(
module_id
,
slot
,
UE_id
);
if
(
!
freeCCE
)
{
LOG_D
(
MAC
,
"%4d.%2d no free CCE for retransmission UL DCI 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
;
/* Mark the corresponding RBs as used */
/* Mark the corresponding RBs as used */
n_rb_sched
-=
sched_pusch
->
rbSize
;
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
++
)
...
...
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