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
94be6b07
Commit
94be6b07
authored
Nov 09, 2020
by
ChiehChun
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix find CCE and retransmission
parent
d2e6b9f5
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
17 additions
and
21 deletions
+17
-21
openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_dlsch.c
openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_dlsch.c
+17
-21
No files found.
openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_dlsch.c
View file @
94be6b07
...
@@ -498,7 +498,7 @@ void nr_store_dlsch_buffer(module_id_t module_id,
...
@@ -498,7 +498,7 @@ void nr_store_dlsch_buffer(module_id_t module_id,
}
}
}
}
void
find_free_CCE
(
module_id_t
module_id
,
bool
find_free_CCE
(
module_id_t
module_id
,
sub_frame_t
slot
,
sub_frame_t
slot
,
NR_UE_info_t
*
UE_info
,
NR_UE_info_t
*
UE_info
,
int
UE_id
){
int
UE_id
){
...
@@ -522,12 +522,13 @@ void find_free_CCE(module_id_t module_id,
...
@@ -522,12 +522,13 @@ void find_free_CCE(module_id_t module_id,
nr_of_candidates
);
nr_of_candidates
);
if
(
sched_ctrl
->
cce_index
<
0
)
{
if
(
sched_ctrl
->
cce_index
<
0
)
{
LOG_E
(
MAC
,
"%s(): could not find CCE for UE %d
\n
"
,
__func__
,
UE_id
);
LOG_E
(
MAC
,
"%s(): could not find CCE for UE %d
\n
"
,
__func__
,
UE_id
);
return
;
return
false
;
}
}
UE_info
->
num_pdcch_cand
[
UE_id
][
cid
]
++
;
UE_info
->
num_pdcch_cand
[
UE_id
][
cid
]
++
;
return
true
;
}
}
void
allocate_retransmission
(
module_id_t
module_id
,
bool
allocate_retransmission
(
module_id_t
module_id
,
uint8_t
*
rballoc_mask
,
uint8_t
*
rballoc_mask
,
int
*
n_rb_sched
,
int
*
n_rb_sched
,
NR_UE_info_t
*
UE_info
,
NR_UE_info_t
*
UE_info
,
...
@@ -552,7 +553,7 @@ void allocate_retransmission(module_id_t module_id,
...
@@ -552,7 +553,7 @@ void allocate_retransmission(module_id_t module_id,
"cannot allocate retransmission for UE %d/RNTI %04x: no resources
\n
"
,
"cannot allocate retransmission for UE %d/RNTI %04x: no resources
\n
"
,
UE_id
,
UE_id
,
rnti
);
rnti
);
return
;
return
false
;
}
}
while
(
rbStart
+
rbSize
<
bwpSize
while
(
rbStart
+
rbSize
<
bwpSize
&&
rballoc_mask
[
rbStart
+
rbSize
]
&&
rballoc_mask
[
rbStart
+
rbSize
]
...
@@ -569,13 +570,9 @@ void allocate_retransmission(module_id_t module_id,
...
@@ -569,13 +570,9 @@ void allocate_retransmission(module_id_t module_id,
/* retransmissions: directly allocate */
/* retransmissions: directly allocate */
*
n_rb_sched
-=
sched_ctrl
->
rbSize
;
*
n_rb_sched
-=
sched_ctrl
->
rbSize
;
int
n_rb_ret
=
sched_ctrl
->
rbSize
;
for
(
int
rb
=
0
;
rb
<
sched_ctrl
->
rbSize
;
rb
++
)
for
(
int
i
=
sched_ctrl
->
rbStart
;
n_rb_ret
>
0
;
i
++
)
{
rballoc_mask
[
rb
+
sched_ctrl
->
rbStart
]
=
0
;
if
(
!
rballoc_mask
[
i
])
return
true
;
continue
;
rballoc_mask
[
i
]
=
0
;
n_rb_ret
--
;
}
}
}
void
pf_dl
(
module_id_t
module_id
,
void
pf_dl
(
module_id_t
module_id
,
...
@@ -600,10 +597,10 @@ void pf_dl(module_id_t module_id,
...
@@ -600,10 +597,10 @@ void pf_dl(module_id_t module_id,
/* retransmission */
/* retransmission */
if
(
harq
->
round
!=
0
)
{
if
(
harq
->
round
!=
0
)
{
/* Find a free CCE */
/* Find a free CCE */
find_free_CCE
(
module_id
,
slot
,
UE_info
,
UE_id
);
bool
freeCCEE
=
find_free_CCE
(
module_id
,
slot
,
UE_info
,
UE_id
);
if
(
!
freeCCEE
)
continue
;
/* Find PUCCH occasion */
/* Find PUCCH occasion */
nr_acknack_scheduling
(
module_id
,
nr_acknack_scheduling
(
module_id
,
UE_id
,
UE_id
,
...
@@ -614,10 +611,8 @@ void pf_dl(module_id_t module_id,
...
@@ -614,10 +611,8 @@ void pf_dl(module_id_t module_id,
&
sched_ctrl
->
pucch_occ_idx
);
&
sched_ctrl
->
pucch_occ_idx
);
AssertFatal
(
sched_ctrl
->
pucch_sched_idx
>=
0
,
"no uplink slot for PUCCH found!
\n
"
);
AssertFatal
(
sched_ctrl
->
pucch_sched_idx
>=
0
,
"no uplink slot for PUCCH found!
\n
"
);
/* Allocate retransmission */
/* Allocate retransmission */
allocate_retransmission
(
module_id
,
rballoc_mask
,
&
n_rb_sched
,
UE_info
,
UE_id
);
bool
r
=
allocate_retransmission
(
module_id
,
rballoc_mask
,
&
n_rb_sched
,
UE_info
,
UE_id
);
}
else
{
}
else
{
/* Check DL buffer */
/* Check DL buffer */
...
@@ -641,8 +636,9 @@ void pf_dl(module_id_t module_id,
...
@@ -641,8 +636,9 @@ void pf_dl(module_id_t module_id,
/* Find max coeff from UE_sched*/
/* Find max coeff from UE_sched*/
/* Find a free CCE */
/* Find a free CCE */
find_free_CCE
(
module_id
,
slot
,
UE_info
,
UE_id
);
bool
freeCCEE
=
find_free_CCE
(
module_id
,
slot
,
UE_info
,
UE_id
);
if
(
!
freeCCEE
)
return
;
/* Find PUCCH occasion */
/* Find PUCCH occasion */
nr_acknack_scheduling
(
module_id
,
nr_acknack_scheduling
(
module_id
,
UE_id
,
UE_id
,
...
...
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