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
lizhongxiao
OpenXG-RAN
Commits
1581fcb5
Commit
1581fcb5
authored
Jun 16, 2016
by
Rohit Gupta
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'develop' into feature-34-test_framework
parents
6bb3a001
4ea0121c
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
56 additions
and
64 deletions
+56
-64
openair2/LAYER2/MAC/eNB_scheduler_primitives.c
openair2/LAYER2/MAC/eNB_scheduler_primitives.c
+56
-64
No files found.
openair2/LAYER2/MAC/eNB_scheduler_primitives.c
View file @
1581fcb5
...
...
@@ -996,14 +996,13 @@ int allocate_CCEs(int module_idP,
int
nCCE_max
=
mac_xface
->
get_nCCE_max
(
module_idP
,
CC_idP
,
1
,
subframeP
);
int
fCCE
;
int
i
,
j
;
int
allocation_is_feasible
=
1
;
DCI_ALLOC_t
*
dci_alloc
;
int
nCCE
=
0
;
LOG_D
(
MAC
,
"Allocate CCEs subframe %d, test %d : (common %d,uspec %d)
\n
"
,
subframeP
,
test_onlyP
,
DCI_pdu
->
Num_common_dci
,
DCI_pdu
->
Num_ue_spec_dci
);
DCI_pdu
->
num_pdcch_symbols
=
1
;
while
(
allocation_is_feasible
==
1
)
{
try_again:
init_CCE_table
(
module_idP
,
CC_idP
);
nCCE
=
0
;
...
...
@@ -1017,35 +1016,24 @@ int allocate_CCEs(int module_idP,
if
(
nCCE
+
(
1
<<
dci_alloc
->
L
)
>
nCCE_max
)
{
if
(
DCI_pdu
->
num_pdcch_symbols
==
3
)
allocation_is_feasible
=
0
;
else
{
goto
failed
;
DCI_pdu
->
num_pdcch_symbols
++
;
nCCE_max
=
mac_xface
->
get_nCCE_max
(
module_idP
,
CC_idP
,
DCI_pdu
->
num_pdcch_symbols
,
subframeP
);
goto
try_again
;
}
break
;
}
else
{
// number of CCEs left can potentially hold this allocation
if
((
fCCE
=
get_nCCE_offset
(
CCE_table
,
// number of CCEs left can potentially hold this allocation
fCCE
=
get_nCCE_offset
(
CCE_table
,
1
<<
(
dci_alloc
->
L
),
nCCE_max
,
(
i
<
DCI_pdu
->
Num_common_dci
)
?
1
:
0
,
dci_alloc
->
rnti
,
subframeP
))
>=
0
)
{
// the allocation is feasible, rnti rule passes
LOG_D
(
MAC
,
"Allocating at nCCE %d
\n
"
,
fCCE
);
if
(
test_onlyP
==
0
)
{
nCCE
+=
(
1
<<
dci_alloc
->
L
);
dci_alloc
->
firstCCE
=
fCCE
;
LOG_D
(
MAC
,
"Allocate CCEs subframe %d, test %d
\n
"
,
subframeP
,
test_onlyP
);
}
}
// fCCE>=0
else
{
subframeP
);
if
(
fCCE
==
-
1
)
{
if
(
DCI_pdu
->
num_pdcch_symbols
==
3
)
{
allocation_is_feasible
=
0
;
LOG_I
(
MAC
,
"subframe %d: Dropping Allocation for RNTI %x
\n
"
,
subframeP
,
dci_alloc
->
rnti
);
for
(
j
=
0
;
j
<=
i
;
j
++
){
LOG_I
(
MAC
,
"DCI %d/%d (%d,%d) : rnti %x dci format %d, aggreg %d nCCE %d / %d (num_pdcch_symbols %d)
\n
"
,
i
,
DCI_pdu
->
Num_common_dci
+
DCI_pdu
->
Num_ue_spec_dci
,
DCI_pdu
->
Num_common_dci
,
DCI_pdu
->
Num_ue_spec_dci
,
...
...
@@ -1053,22 +1041,26 @@ int allocate_CCEs(int module_idP,
1
<<
DCI_pdu
->
dci_alloc
[
j
].
L
,
nCCE
,
nCCE_max
,
DCI_pdu
->
num_pdcch_symbols
);
}
goto
failed
;
}
else
{
DCI_pdu
->
num_pdcch_symbols
++
;
nCCE_max
=
mac_xface
->
get_nCCE_max
(
module_idP
,
CC_idP
,
DCI_pdu
->
num_pdcch_symbols
,
subframeP
);
}
break
;
goto
try_again
;
}
// fCCE==-1
}
// nCCE <= nCCE_max
}
// for i = 0 ... num_dcis
if
(
allocation_is_feasible
==
1
)
return
(
0
);
}
// allocation_is_feasible == 1
return
(
-
1
);
// the allocation is feasible, rnti rule passes
nCCE
+=
(
1
<<
dci_alloc
->
L
);
LOG_D
(
MAC
,
"Allocating at nCCE %d
\n
"
,
fCCE
);
if
(
test_onlyP
==
0
)
{
dci_alloc
->
firstCCE
=
fCCE
;
LOG_D
(
MAC
,
"Allocate CCEs subframe %d, test %d
\n
"
,
subframeP
,
test_onlyP
);
}
}
// for i = 0 ... num_dcis
return
0
;
failed:
return
-
1
;
}
boolean_t
CCE_allocation_infeasible
(
int
module_idP
,
...
...
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