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
Hide 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,
}
}
void
find_free_CCE
(
module_id_t
module_id
,
bool
find_free_CCE
(
module_id_t
module_id
,
sub_frame_t
slot
,
NR_UE_info_t
*
UE_info
,
int
UE_id
){
...
...
@@ -522,12 +522,13 @@ void find_free_CCE(module_id_t module_id,
nr_of_candidates
);
if
(
sched_ctrl
->
cce_index
<
0
)
{
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
]
++
;
return
true
;
}
void
allocate_retransmission
(
module_id_t
module_id
,
bool
allocate_retransmission
(
module_id_t
module_id
,
uint8_t
*
rballoc_mask
,
int
*
n_rb_sched
,
NR_UE_info_t
*
UE_info
,
...
...
@@ -552,7 +553,7 @@ void allocate_retransmission(module_id_t module_id,
"cannot allocate retransmission for UE %d/RNTI %04x: no resources
\n
"
,
UE_id
,
rnti
);
return
;
return
false
;
}
while
(
rbStart
+
rbSize
<
bwpSize
&&
rballoc_mask
[
rbStart
+
rbSize
]
...
...
@@ -569,13 +570,9 @@ void allocate_retransmission(module_id_t module_id,
/* retransmissions: directly allocate */
*
n_rb_sched
-=
sched_ctrl
->
rbSize
;
int
n_rb_ret
=
sched_ctrl
->
rbSize
;
for
(
int
i
=
sched_ctrl
->
rbStart
;
n_rb_ret
>
0
;
i
++
)
{
if
(
!
rballoc_mask
[
i
])
continue
;
rballoc_mask
[
i
]
=
0
;
n_rb_ret
--
;
}
for
(
int
rb
=
0
;
rb
<
sched_ctrl
->
rbSize
;
rb
++
)
rballoc_mask
[
rb
+
sched_ctrl
->
rbStart
]
=
0
;
return
true
;
}
void
pf_dl
(
module_id_t
module_id
,
...
...
@@ -600,10 +597,10 @@ void pf_dl(module_id_t module_id,
/* retransmission */
if
(
harq
->
round
!=
0
)
{
/* 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 */
nr_acknack_scheduling
(
module_id
,
UE_id
,
...
...
@@ -614,10 +611,8 @@ void pf_dl(module_id_t module_id,
&
sched_ctrl
->
pucch_occ_idx
);
AssertFatal
(
sched_ctrl
->
pucch_sched_idx
>=
0
,
"no uplink slot for PUCCH found!
\n
"
);
/* 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
{
/* Check DL buffer */
...
...
@@ -641,8 +636,9 @@ void pf_dl(module_id_t module_id,
/* Find max coeff from UE_sched*/
/* 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 */
nr_acknack_scheduling
(
module_id
,
UE_id
,
...
...
@@ -680,11 +676,11 @@ void pf_dl(module_id_t module_id,
rbSize
,
nrOfSymbols
,
N_PRB_DMRS
,
// FIXME // This should be multiplied by the
// number of dmrs symbols
// number of dmrs symbols
0
/* N_PRB_oh, 0 for initialBWP */
,
0
/* tb_scaling */
,
1
/* nrOfLayers */
)
>>
3
;
>>
3
;
}
while
(
rbStart
+
rbSize
<
bwpSize
&&
rballoc_mask
[
rbStart
+
rbSize
]
&&
TBS
<
sched_ctrl
->
num_total_bytes
);
sched_ctrl
->
rbSize
=
rbSize
;
sched_ctrl
->
rbStart
=
rbStart
;
...
...
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