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
canghaiwuhen
OpenXG-RAN
Commits
da7d2a8c
Commit
da7d2a8c
authored
Dec 19, 2018
by
Stefan
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
SSR 2018-12-19
parent
b805cfc6
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
57 additions
and
62 deletions
+57
-62
openair2/LAYER2/MAC/pre_processor.c
openair2/LAYER2/MAC/pre_processor.c
+57
-62
No files found.
openair2/LAYER2/MAC/pre_processor.c
View file @
da7d2a8c
...
...
@@ -1608,9 +1608,9 @@ void ulsch_scheduler_pre_processor(module_id_t module_idP,
int16_t
i
;
uint16_t
UE_id
,
n
,
r
;
uint8_t
CC_id
,
harq_pid
;
uint16_t
nb_allocated_rbs
[
NFAPI_CC_MAX
][
MAX_MOBILES_PER_ENB
]
,
total_allocated_rbs
[
NFAPI_CC_MAX
],
average_rbs_per_user
[
NFAPI_CC_MAX
];
uint16_t
nb_allocated_rbs
[
NFAPI_CC_MAX
][
MAX_MOBILES_PER_ENB
]
;
uint16_t
total_allocated_rbs
[
NFAPI_CC_MAX
];
uint16_t
average_rbs_per_user
[
NFAPI_CC_MAX
];
int16_t
total_remaining_rbs
[
NFAPI_CC_MAX
];
uint16_t
total_ue_count
[
NFAPI_CC_MAX
];
rnti_t
rnti
=
-
1
;
...
...
@@ -1620,6 +1620,9 @@ void ulsch_scheduler_pre_processor(module_id_t module_idP,
UE_sched_ctrl
*
ue_sched_ctl
;
int
N_RB_UL
=
0
;
uint16_t
available_rbs
,
first_rb_offset
;
rnti_t
rntiTable
[
MAX_MOBILES_PER_ENB
];
bool
continueTable
[
MAX_MOBILES_PER_ENB
];
bool
sliceMember
;
LOG_D
(
MAC
,
"In ulsch_preprocessor: assign max mcs min rb
\n
"
);
// maximize MCS and then allocate required RB according to the buffer occupancy with the limit of max available UL RB
...
...
@@ -1640,45 +1643,42 @@ void ulsch_scheduler_pre_processor(module_id_t module_idP,
}
// Step 1.5: Calculate total_ue_count
for
(
i
=
UE_list
->
head_ul
;
i
>=
0
;
i
=
UE_list
->
next_ul
[
i
])
{
for
(
n
=
0
;
n
<
UE_list
->
numactiveULCCs
[
i
];
n
++
)
{
// This is the actual CC_id in the list
CC_id
=
UE_list
->
ordered_ULCCids
[
n
][
i
];
UE_template
=
&
UE_list
->
UE_template
[
CC_id
][
i
];
if
(
!
ue_ul_slice_membership
(
module_idP
,
i
,
slice_idx
))
continue
;
for
(
UE_id
=
UE_list
->
head_ul
;
UE_id
>=
0
;
i
=
UE_list
->
next_ul
[
UE_id
])
{
rntiTable
[
UE_id
]
=
UE_RNTI
(
module_idP
,
UE_id
);
sliceMember
=
ue_ul_slice_membership
(
module_idP
,
UE_id
,
slice_idx
);
continueTable
[
UE_id
]
=
(
rntiTable
[
UE_id
]
==
NOT_A_RNTI
||
UE_list
->
UE_sched_ctrl
[
UE_id
].
ul_out_of_sync
==
1
||
!
sliceMember
);
// This is not the actual CC_id in the list
if
(
sliceMember
)
{
for
(
n
=
0
;
n
<
UE_list
->
numactiveULCCs
[
UE_id
];
n
++
)
{
CC_id
=
UE_list
->
ordered_ULCCids
[
n
][
UE_id
];
UE_template
=
&
UE_list
->
UE_template
[
CC_id
][
UE_id
];
if
(
UE_template
->
pre_allocated_nb_rb_ul
[
slice_idx
]
>
0
)
{
total_ue_count
[
CC_id
]
+=
1
;
}
}
}
}
LOG_D
(
MAC
,
"In ulsch_preprocessor: step2
\n
"
);
// step 2: calculate the average rb per UE
for
(
i
=
UE_list
->
head_ul
;
i
>=
0
;
i
=
UE_list
->
next_ul
[
i
])
{
for
(
UE_id
=
UE_list
->
head_ul
;
UE_id
>=
0
;
i
=
UE_list
->
next_ul
[
UE_id
])
{
if
(
continueTable
[
UE_id
])
continue
;
/*
rnti = UE_RNTI(module_idP, i);
UE_id = i;
if (rnti == NOT_A_RNTI)
continue;
if (UE_list->UE_sched_ctrl[i].ul_out_of_sync == 1)
continue;
if (!ue_ul_slice_membership(module_idP, UE_id, slice_idx))
continue;
*/
LOG_D
(
MAC
,
"In ulsch_preprocessor: handling UE %d/%x
\n
"
,
UE_id
,
rnti
);
rnti
Table
[
UE_id
]
);
for
(
n
=
0
;
n
<
UE_list
->
numactiveULCCs
[
UE_id
];
n
++
)
{
// This is the actual CC_id in the list
CC_id
=
UE_list
->
ordered_ULCCids
[
n
][
UE_id
];
LOG_D
(
MAC
,
"In ulsch_preprocessor: handling UE %d/%x CCid %d
\n
"
,
UE_id
,
rnti
,
CC_id
);
average_rbs_per_user
[
CC_id
]
=
0
;
LOG_D
(
MAC
,
"In ulsch_preprocessor: handling UE %d/%x CCid %d
\n
"
,
UE_id
,
rntiTable
[
UE_id
],
CC_id
);
/*
if((mac_xface->get_nCCE_max(module_idP,CC_id,3,subframeP) - nCCE_to_be_used[CC_id]) > (1<<aggregation)) {
...
...
@@ -1686,8 +1686,6 @@ void ulsch_scheduler_pre_processor(module_id_t module_idP,
max_num_ue_to_be_scheduled+=1;
} */
N_RB_UL
=
to_prb
(
RC
.
mac
[
module_idP
]
->
common_channels
[
CC_id
].
ul_Bandwidth
);
ue_sched_ctl
=
&
UE_list
->
UE_sched_ctrl
[
UE_id
];
ue_sched_ctl
->
max_rbs_allowed_slice_uplink
[
CC_id
][
slice_idx
]
=
...
...
@@ -1711,26 +1709,26 @@ void ulsch_scheduler_pre_processor(module_id_t module_idP,
"[eNB %d] frame %d subframe %d: UE %d CC %d: can't get average rb per user (should not be here)
\n
"
,
module_idP
,
frameP
,
subframeP
,
UE_id
,
CC_id
);
}
if
(
total_ue_count
[
CC_id
]
>
0
)
if
(
total_ue_count
[
CC_id
]
>
0
)
{
LOG_D
(
MAC
,
"[eNB %d] Frame %d subframe %d: total ue to be scheduled %d
\n
"
,
module_idP
,
frameP
,
subframeP
,
total_ue_count
[
CC_id
]);
}
}
}
// step 3: assigne RBS
for
(
i
=
UE_list
->
head_ul
;
i
>=
0
;
i
=
UE_list
->
next_ul
[
i
])
{
for
(
UE_id
=
UE_list
->
head_ul
;
UE_id
>=
0
;
UE_id
=
UE_list
->
next_ul
[
UE_id
])
{
if
(
continueTable
[
UE_id
])
continue
;
/*
rnti = UE_RNTI(module_idP, i);
if (rnti == NOT_A_RNTI)
continue;
if (UE_list->UE_sched_ctrl[i].ul_out_of_sync == 1)
continue;
if (!ue_ul_slice_membership(module_idP, i, slice_idx))
continue;
UE_id = i;
*/
for
(
n
=
0
;
n
<
UE_list
->
numactiveULCCs
[
UE_id
];
n
++
)
{
// This is the actual CC_id in the list
CC_id
=
UE_list
->
ordered_ULCCids
[
n
][
UE_id
];
...
...
@@ -1751,7 +1749,7 @@ void ulsch_scheduler_pre_processor(module_id_t module_idP,
total_allocated_rbs
[
CC_id
]
+=
nb_allocated_rbs
[
CC_id
][
UE_id
];
LOG_D
(
MAC
,
"In ulsch_preprocessor: assigning %d RBs for UE %d/%x CCid %d, harq_pid %d
\n
"
,
nb_allocated_rbs
[
CC_id
][
UE_id
],
UE_id
,
rnti
,
CC_id
,
nb_allocated_rbs
[
CC_id
][
UE_id
],
UE_id
,
rnti
Table
[
UE_id
]
,
CC_id
,
harq_pid
);
}
}
...
...
@@ -1759,23 +1757,25 @@ void ulsch_scheduler_pre_processor(module_id_t module_idP,
// step 4: assigne the remaining RBs and set the pre_allocated rbs accordingly
for
(
r
=
0
;
r
<
2
;
r
++
)
{
for
(
i
=
UE_list
->
head_ul
;
i
>=
0
;
i
=
UE_list
->
next_ul
[
i
])
{
for
(
UE_id
=
UE_list
->
head_ul
;
UE_id
>=
0
;
UE_id
=
UE_list
->
next_ul
[
UE_id
])
{
if
(
continueTable
[
UE_id
])
continue
;
/*
rnti = UE_RNTI(module_idP, i);
if (rnti == NOT_A_RNTI)
continue;
if (UE_list->UE_sched_ctrl[i].ul_out_of_sync == 1)
continue;
if (!ue_ul_slice_membership(module_idP, i, slice_idx))
continue;
UE_id = i;
*/
ue_sched_ctl
=
&
UE_list
->
UE_sched_ctrl
[
UE_id
];
for
(
n
=
0
;
n
<
UE_list
->
numactiveULCCs
[
UE_id
];
n
++
)
{
// This is the actual CC_id in the list
CC_id
=
UE_list
->
ordered_ULCCids
[
n
][
UE_id
];
UE_template
=
&
UE_list
->
UE_template
[
CC_id
][
UE_id
];
if
(
r
==
0
)
{
N_RB_UL
=
to_prb
(
RC
.
mac
[
module_idP
]
->
common_channels
[
CC_id
].
ul_Bandwidth
);
first_rb_offset
=
UE_list
->
first_rb_offset
[
CC_id
][
slice_idx
];
available_rbs
=
cmin
(
ue_sched_ctl
->
max_rbs_allowed_slice_uplink
[
CC_id
][
slice_idx
],
...
...
@@ -1786,7 +1786,6 @@ void ulsch_scheduler_pre_processor(module_id_t module_idP,
total_remaining_rbs
[
CC_id
]
+=
1
;
}
if
(
r
==
0
)
{
while
((
UE_template
->
pre_allocated_nb_rb_ul
[
slice_idx
]
>
0
)
&&
(
nb_allocated_rbs
[
CC_id
][
UE_id
]
<
UE_template
->
pre_allocated_nb_rb_ul
[
slice_idx
])
&&
(
total_remaining_rbs
[
CC_id
]
>
0
))
{
...
...
@@ -1797,15 +1796,11 @@ void ulsch_scheduler_pre_processor(module_id_t module_idP,
total_allocated_rbs
[
CC_id
]
++
;
}
}
else
{
UE_template
->
pre_allocated_nb_rb_ul
[
slice_idx
]
=
nb_allocated_rbs
[
CC_id
][
UE_id
];
LOG_D
(
MAC
,
"******************UL Scheduling Information for UE%d CC_id %d ************************
\n
"
,
UE_template
->
pre_allocated_nb_rb_ul
[
slice_idx
]
=
nb_allocated_rbs
[
CC_id
][
UE_id
];
LOG_D
(
MAC
,
"******************UL Scheduling Information for UE%d CC_id %d ************************
\n
"
,
UE_id
,
CC_id
);
LOG_D
(
MAC
,
"[eNB %d] total RB allocated for UE%d CC_id %d = %d
\n
"
,
module_idP
,
UE_id
,
CC_id
,
UE_template
->
pre_allocated_nb_rb_ul
[
slice_idx
]);
LOG_D
(
MAC
,
"[eNB %d] total RB allocated for UE%d CC_id %d = %d
\n
"
,
module_idP
,
UE_id
,
CC_id
,
UE_template
->
pre_allocated_nb_rb_ul
[
slice_idx
]);
}
}
}
...
...
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