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
edf88b61
Commit
edf88b61
authored
Dec 07, 2020
by
ChiehChun
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Create find_CCE (same as dl_pf)
parent
f8753c51
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
37 additions
and
23 deletions
+37
-23
openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_primitives.c
openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_primitives.c
+30
-0
openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_ulsch.c
openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_ulsch.c
+6
-23
openair2/LAYER2/NR_MAC_gNB/mac_proto.h
openair2/LAYER2/NR_MAC_gNB/mac_proto.h
+1
-0
No files found.
openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_primitives.c
View file @
edf88b61
...
@@ -2019,6 +2019,36 @@ void find_aggregation_candidates(uint8_t *aggregation_level,
...
@@ -2019,6 +2019,36 @@ void find_aggregation_candidates(uint8_t *aggregation_level,
}
}
}
}
bool
find_free_CCE
(
module_id_t
module_id
,
sub_frame_t
slot
,
NR_UE_info_t
*
UE_info
,
int
UE_id
){
NR_UE_sched_ctrl_t
*
sched_ctrl
=
&
UE_info
->
UE_sched_ctrl
[
UE_id
];
const
int
target_ss
=
NR_SearchSpace__searchSpaceType_PR_ue_Specific
;
sched_ctrl
->
search_space
=
get_searchspace
(
sched_ctrl
->
active_bwp
,
target_ss
);
uint8_t
nr_of_candidates
;
find_aggregation_candidates
(
&
sched_ctrl
->
aggregation_level
,
&
nr_of_candidates
,
sched_ctrl
->
search_space
);
sched_ctrl
->
coreset
=
get_coreset
(
sched_ctrl
->
active_bwp
,
sched_ctrl
->
search_space
,
1
/* dedicated */
);
int
cid
=
sched_ctrl
->
coreset
->
controlResourceSetId
;
const
uint16_t
Y
=
UE_info
->
Y
[
UE_id
][
cid
][
slot
];
const
int
m
=
UE_info
->
num_pdcch_cand
[
UE_id
][
cid
];
sched_ctrl
->
cce_index
=
allocate_nr_CCEs
(
RC
.
nrmac
[
module_id
],
sched_ctrl
->
active_bwp
,
sched_ctrl
->
coreset
,
sched_ctrl
->
aggregation_level
,
Y
,
m
,
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
false
;
}
UE_info
->
num_pdcch_cand
[
UE_id
][
cid
]
++
;
return
true
;
}
/*void fill_nfapi_coresets_and_searchspaces(NR_CellGroupConfig_t *cg,
/*void fill_nfapi_coresets_and_searchspaces(NR_CellGroupConfig_t *cg,
nfapi_nr_coreset_t *coreset,
nfapi_nr_coreset_t *coreset,
...
...
openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_ulsch.c
View file @
edf88b61
...
@@ -578,6 +578,8 @@ void pf_ul(module_id_t module_id,
...
@@ -578,6 +578,8 @@ void pf_ul(module_id_t module_id,
/* RETRANSMISSION: Check retransmission */
/* RETRANSMISSION: Check retransmission */
/* RETRANSMISSION: Find free CCE */
/* RETRANSMISSION: Find free CCE */
bool
freeCCE
=
find_free_CCE
(
module_id
,
slot
,
UE_info
,
UE_id
);
if
(
!
freeCCE
)
continue
;
/* RETRANSMISSION: Allocate retransmission*/
/* RETRANSMISSION: Allocate retransmission*/
...
@@ -597,29 +599,10 @@ void pf_ul(module_id_t module_id,
...
@@ -597,29 +599,10 @@ void pf_ul(module_id_t module_id,
/* Find max coeff */
/* Find max coeff */
/* Find free CCE */
/* Find free CCE */
const
int
target_ss
=
NR_SearchSpace__searchSpaceType_PR_ue_Specific
;
bool
freeCCE
=
find_free_CCE
(
module_id
,
slot
,
UE_info
,
UE_id
);
sched_ctrl
->
search_space
=
get_searchspace
(
sched_ctrl
->
active_bwp
,
target_ss
);
if
(
!
freeCCE
)
return
;
uint8_t
nr_of_candidates
;
find_aggregation_candidates
(
&
sched_ctrl
->
aggregation_level
,
max_num_ue
--
;
&
nr_of_candidates
,
sched_ctrl
->
search_space
);
sched_ctrl
->
coreset
=
get_coreset
(
sched_ctrl
->
active_bwp
,
sched_ctrl
->
search_space
,
1
/* dedicated */
);
const
int
cid
=
sched_ctrl
->
coreset
->
controlResourceSetId
;
const
uint16_t
Y
=
UE_info
->
Y
[
UE_id
][
cid
][
slot
];
const
int
m
=
UE_info
->
num_pdcch_cand
[
UE_id
][
cid
];
sched_ctrl
->
cce_index
=
allocate_nr_CCEs
(
RC
.
nrmac
[
module_id
],
sched_ctrl
->
active_bwp
,
sched_ctrl
->
coreset
,
sched_ctrl
->
aggregation_level
,
Y
,
m
,
nr_of_candidates
);
if
(
sched_ctrl
->
cce_index
<
0
)
{
LOG_E
(
MAC
,
"%s(): CCE list not empty, couldn't schedule PUSCH
\n
"
,
__func__
);
return
;
}
UE_info
->
num_pdcch_cand
[
UE_id
][
cid
]
++
;
/* Save PUSCH filed */
/* Save PUSCH filed */
sched_ctrl
->
sched_pusch
.
time_domain_allocation
=
tda
;
sched_ctrl
->
sched_pusch
.
time_domain_allocation
=
tda
;
...
...
openair2/LAYER2/NR_MAC_gNB/mac_proto.h
View file @
edf88b61
...
@@ -432,4 +432,5 @@ int16_t ssb_index_from_prach(module_id_t module_idP,
...
@@ -432,4 +432,5 @@ int16_t ssb_index_from_prach(module_id_t module_idP,
void
find_SSB_and_RO_available
(
module_id_t
module_idP
);
void
find_SSB_and_RO_available
(
module_id_t
module_idP
);
bool
find_free_CCE
(
module_id_t
module_id
,
sub_frame_t
slot
,
NR_UE_info_t
*
UE_info
,
int
UE_id
);
#endif
/*__LAYER2_NR_MAC_PROTO_H__*/
#endif
/*__LAYER2_NR_MAC_PROTO_H__*/
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