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
Michael Black
OpenXG-RAN
Commits
53c617cd
Commit
53c617cd
authored
Feb 23, 2018
by
Niccolò Iardella
Committed by
Robert Schmidt
Sep 03, 2018
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Move slicing configuration variables in header files
parent
490e2456
Changes
7
Expand all
Show whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
448 additions
and
320 deletions
+448
-320
openair2/LAYER2/MAC/eNB_scheduler_dlsch.c
openair2/LAYER2/MAC/eNB_scheduler_dlsch.c
+1
-38
openair2/LAYER2/MAC/eNB_scheduler_dlsch.h
openair2/LAYER2/MAC/eNB_scheduler_dlsch.h
+77
-0
openair2/LAYER2/MAC/eNB_scheduler_primitives.c
openair2/LAYER2/MAC/eNB_scheduler_primitives.c
+1
-1
openair2/LAYER2/MAC/eNB_scheduler_ulsch.c
openair2/LAYER2/MAC/eNB_scheduler_ulsch.c
+1
-32
openair2/LAYER2/MAC/eNB_scheduler_ulsch.h
openair2/LAYER2/MAC/eNB_scheduler_ulsch.h
+71
-0
openair2/LAYER2/MAC/mac_proto.h
openair2/LAYER2/MAC/mac_proto.h
+5
-6
openair2/LAYER2/MAC/pre_processor.c
openair2/LAYER2/MAC/pre_processor.c
+292
-243
No files found.
openair2/LAYER2/MAC/eNB_scheduler_dlsch.c
View file @
53c617cd
...
@@ -44,6 +44,7 @@
...
@@ -44,6 +44,7 @@
#include "RRC/L2_INTERFACE/openair_rrc_L2_interface.h"
#include "RRC/L2_INTERFACE/openair_rrc_L2_interface.h"
//#include "LAYER2/MAC/pre_processor.c"
//#include "LAYER2/MAC/pre_processor.c"
#include "eNB_scheduler_dlsch.h"
#include "pdcp.h"
#include "pdcp.h"
#include "SIMULATION/TOOLS/sim.h" // for taus
#include "SIMULATION/TOOLS/sim.h" // for taus
...
@@ -68,44 +69,6 @@
...
@@ -68,44 +69,6 @@
extern
RAN_CONTEXT_t
RC
;
extern
RAN_CONTEXT_t
RC
;
extern
uint8_t
nfapi_mode
;
extern
uint8_t
nfapi_mode
;
// number of active slices for past and current time
int
n_active_slices
=
1
;
int
n_active_slices_current
=
1
;
// RB share for each slice for past and current time
float
avg_slice_percentage
=
0
.
25
;
float
slice_percentage
[
MAX_NUM_SLICES
]
=
{
1
.
0
,
0
.
0
,
0
.
0
,
0
.
0
};
float
slice_percentage_current
[
MAX_NUM_SLICES
]
=
{
1
.
0
,
0
.
0
,
0
.
0
,
0
.
0
};
float
total_slice_percentage
=
0
;
float
total_slice_percentage_current
=
0
;
// Frequency ranges for slice positioning
int
slice_position
[
MAX_NUM_SLICES
*
2
]
=
{
0
,
N_RBG_MAX
,
0
,
N_RBG_MAX
,
0
,
N_RBG_MAX
,
0
,
N_RBG_MAX
};
int
slice_position_current
[
MAX_NUM_SLICES
*
2
]
=
{
0
,
N_RBG_MAX
,
0
,
N_RBG_MAX
,
0
,
N_RBG_MAX
,
0
,
N_RBG_MAX
};
// MAX MCS for each slice for past and current time
int
slice_maxmcs
[
MAX_NUM_SLICES
]
=
{
28
,
28
,
28
,
28
};
int
slice_maxmcs_current
[
MAX_NUM_SLICES
]
=
{
28
,
28
,
28
,
28
};
int
update_dl_scheduler
[
MAX_NUM_SLICES
]
=
{
1
,
1
,
1
,
1
};
int
update_dl_scheduler_current
[
MAX_NUM_SLICES
]
=
{
1
,
1
,
1
,
1
};
// name of available scheduler
char
*
dl_scheduler_type
[
MAX_NUM_SLICES
]
=
{
"schedule_ue_spec"
,
"schedule_ue_spec"
,
"schedule_ue_spec"
,
"schedule_ue_spec"
};
// The lists of criteria that enforce the sorting policies of the slices
uint32_t
sorting_policy
[
MAX_NUM_SLICES
]
=
{
0x01234
,
0x01234
,
0x01234
,
0x01234
};
uint32_t
sorting_policy_current
[
MAX_NUM_SLICES
]
=
{
0x01234
,
0x01234
,
0x01234
,
0x01234
};
// pointer to the slice specific scheduler
slice_scheduler_dl
slice_sched_dl
[
MAX_NUM_SLICES
]
=
{
0
};
//------------------------------------------------------------------------------
//------------------------------------------------------------------------------
void
void
add_ue_dlsch_info
(
module_id_t
module_idP
,
add_ue_dlsch_info
(
module_id_t
module_idP
,
...
...
openair2/LAYER2/MAC/eNB_scheduler_dlsch.h
0 → 100644
View file @
53c617cd
/*
* Licensed to the OpenAirInterface (OAI) Software Alliance under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The OpenAirInterface Software Alliance licenses this file to You under
* the OAI Public License, Version 1.1 (the "License"); you may not use this file
* except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.openairinterface.org/?page_id=698
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*-------------------------------------------------------------------------------
* For more information about the OpenAirInterface (OAI) Software Alliance:
* contact@openairinterface.org
*/
/*! \file LAYER2/MAC/eNB_scheduler_dlsch.h
* \brief DLSCH Scheduler policy variables used during different phases of scheduling
* \author Navid Nikaein and Niccolo' Iardella
* \date 2018
* \version 0.2
* \email navid.nikaein@eurecom.fr
*/
/** @defgroup _oai2 openair2 Reference Implementation
* @ingroup _ref_implementation_
* @{
*/
/*@}*/
#ifndef __LAYER2_MAC_ENB_SCHEDULER_DLSCH_H__
#define __LAYER2_MAC_ENB_SCHEDULER_DLSCH_H__
// number of active slices for past and current time
int
n_active_slices
=
1
;
int
n_active_slices_current
=
1
;
// RB share for each slice for past and current time
float
avg_slice_percentage
=
0
.
25
;
float
slice_percentage
[
MAX_NUM_SLICES
]
=
{
1
.
0
,
0
.
0
,
0
.
0
,
0
.
0
};
float
slice_percentage_current
[
MAX_NUM_SLICES
]
=
{
1
.
0
,
0
.
0
,
0
.
0
,
0
.
0
};
float
total_slice_percentage
=
0
;
float
total_slice_percentage_current
=
0
;
// Frequency ranges for slice positioning
int
slice_position
[
MAX_NUM_SLICES
*
2
]
=
{
0
,
N_RBG_MAX
,
0
,
N_RBG_MAX
,
0
,
N_RBG_MAX
,
0
,
N_RBG_MAX
};
int
slice_position_current
[
MAX_NUM_SLICES
*
2
]
=
{
0
,
N_RBG_MAX
,
0
,
N_RBG_MAX
,
0
,
N_RBG_MAX
,
0
,
N_RBG_MAX
};
// MAX MCS for each slice for past and current time
int
slice_maxmcs
[
MAX_NUM_SLICES
]
=
{
28
,
28
,
28
,
28
};
int
slice_maxmcs_current
[
MAX_NUM_SLICES
]
=
{
28
,
28
,
28
,
28
};
int
update_dl_scheduler
[
MAX_NUM_SLICES
]
=
{
1
,
1
,
1
,
1
};
int
update_dl_scheduler_current
[
MAX_NUM_SLICES
]
=
{
1
,
1
,
1
,
1
};
// name of available scheduler
char
*
dl_scheduler_type
[
MAX_NUM_SLICES
]
=
{
"schedule_ue_spec"
,
"schedule_ue_spec"
,
"schedule_ue_spec"
,
"schedule_ue_spec"
};
// The lists of criteria that enforce the sorting policies of the slices
uint32_t
sorting_policy
[
MAX_NUM_SLICES
]
=
{
0x01234
,
0x01234
,
0x01234
,
0x01234
};
uint32_t
sorting_policy_current
[
MAX_NUM_SLICES
]
=
{
0x01234
,
0x01234
,
0x01234
,
0x01234
};
// pointer to the slice specific scheduler
slice_scheduler_dl
slice_sched_dl
[
MAX_NUM_SLICES
]
=
{
0
};
#endif //__LAYER2_MAC_ENB_SCHEDULER_DLSCH_H__
openair2/LAYER2/MAC/eNB_scheduler_primitives.c
View file @
53c617cd
...
@@ -4536,7 +4536,7 @@ harq_indication(module_id_t mod_idP, int CC_idP, frame_t frameP,
...
@@ -4536,7 +4536,7 @@ harq_indication(module_id_t mod_idP, int CC_idP, frame_t frameP,
// Flexran Slicing functions
// Flexran Slicing functions
uint16_t
flexran_
nb_rbs_allowed_slice
(
float
rb_percentage
,
int
total_rbs
)
uint16_t
nb_rbs_allowed_slice
(
float
rb_percentage
,
int
total_rbs
)
{
{
return
(
uint16_t
)
floor
(
rb_percentage
*
total_rbs
);
return
(
uint16_t
)
floor
(
rb_percentage
*
total_rbs
);
}
}
...
...
openair2/LAYER2/MAC/eNB_scheduler_ulsch.c
View file @
53c617cd
...
@@ -48,6 +48,7 @@
...
@@ -48,6 +48,7 @@
#include "assertions.h"
#include "assertions.h"
//#include "LAYER2/MAC/pre_processor.c"
//#include "LAYER2/MAC/pre_processor.c"
#include "eNB_scheduler_ulsch.h"
#include "pdcp.h"
#include "pdcp.h"
#if defined(ENABLE_ITTI)
#if defined(ENABLE_ITTI)
...
@@ -72,46 +73,14 @@ extern uint16_t sfnsf_add_subframe(uint16_t frameP, uint16_t subframeP, int offs
...
@@ -72,46 +73,14 @@ extern uint16_t sfnsf_add_subframe(uint16_t frameP, uint16_t subframeP, int offs
extern
int
oai_nfapi_ul_config_req
(
nfapi_ul_config_request_t
*
ul_config_req
);
extern
int
oai_nfapi_ul_config_req
(
nfapi_ul_config_request_t
*
ul_config_req
);
extern
uint8_t
nfapi_mode
;
extern
uint8_t
nfapi_mode
;
extern
uint8_t
nfapi_mode
;
// This table holds the allowable PRB sizes for ULSCH transmissions
// This table holds the allowable PRB sizes for ULSCH transmissions
uint8_t
rb_table
[
34
]
=
uint8_t
rb_table
[
34
]
=
{
1
,
2
,
3
,
4
,
5
,
6
,
8
,
9
,
10
,
12
,
15
,
16
,
18
,
20
,
24
,
25
,
27
,
30
,
32
,
{
1
,
2
,
3
,
4
,
5
,
6
,
8
,
9
,
10
,
12
,
15
,
16
,
18
,
20
,
24
,
25
,
27
,
30
,
32
,
36
,
40
,
45
,
48
,
50
,
54
,
60
,
64
,
72
,
75
,
80
,
81
,
90
,
96
,
100
36
,
40
,
45
,
48
,
50
,
54
,
60
,
64
,
72
,
75
,
80
,
81
,
90
,
96
,
100
};
};
/* number of active slices for past and current time*/
int
n_active_slices_uplink
=
1
;
int
n_active_slices_current_uplink
=
1
;
/* RB share for each slice for past and current time*/
float
avg_slice_percentage_uplink
=
0
.
25
;
float
slice_percentage_uplink
[
MAX_NUM_SLICES
]
=
{
1
.
0
,
0
.
0
,
0
.
0
,
0
.
0
};
float
slice_percentage_current_uplink
[
MAX_NUM_SLICES
]
=
{
1
.
0
,
0
.
0
,
0
.
0
,
0
.
0
};
float
total_slice_percentage_uplink
=
0
;
float
total_slice_percentage_current_uplink
=
0
;
// MAX MCS for each slice for past and current time
int
slice_maxmcs_uplink
[
MAX_NUM_SLICES
]
=
{
20
,
20
,
20
,
20
};
int
slice_maxmcs_current_uplink
[
MAX_NUM_SLICES
]
=
{
20
,
20
,
20
,
20
};
/*resource blocks allowed*/
uint16_t
nb_rbs_allowed_slice_uplink
[
MAX_NUM_CCs
][
MAX_NUM_SLICES
];
/*Slice Update */
int
update_ul_scheduler
[
MAX_NUM_SLICES
]
=
{
1
,
1
,
1
,
1
};
int
update_ul_scheduler_current
[
MAX_NUM_SLICES
]
=
{
1
,
1
,
1
,
1
};
/* name of available scheduler*/
char
*
ul_scheduler_type
[
MAX_NUM_SLICES
]
=
{
"schedule_ulsch_rnti"
,
"schedule_ulsch_rnti"
,
"schedule_ulsch_rnti"
,
"schedule_ulsch_rnti"
};
extern
mui_t
rrc_eNB_mui
;
extern
mui_t
rrc_eNB_mui
;
/* Slice Function Pointer */
slice_scheduler_ul
slice_sched_ul
[
MAX_NUM_SLICES
]
=
{
0
};
void
void
rx_sdu
(
const
module_id_t
enb_mod_idP
,
rx_sdu
(
const
module_id_t
enb_mod_idP
,
const
int
CC_idP
,
const
int
CC_idP
,
...
...
openair2/LAYER2/MAC/eNB_scheduler_ulsch.h
0 → 100644
View file @
53c617cd
/*
* Licensed to the OpenAirInterface (OAI) Software Alliance under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The OpenAirInterface Software Alliance licenses this file to You under
* the OAI Public License, Version 1.1 (the "License"); you may not use this file
* except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.openairinterface.org/?page_id=698
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*-------------------------------------------------------------------------------
* For more information about the OpenAirInterface (OAI) Software Alliance:
* contact@openairinterface.org
*/
/*! \file LAYER2/MAC/eNB_scheduler_ulsch.h
* \brief ULSCH Scheduler policy variables used during different phases of scheduling
* \author Navid Nikaein and Niccolo' Iardella
* \date 2018
* \version 0.2
* \email navid.nikaein@eurecom.fr
*/
/** @defgroup _oai2 openair2 Reference Implementation
* @ingroup _ref_implementation_
* @{
*/
/*@}*/
#ifndef __LAYER2_MAC_ENB_SCHEDULER_ULSCH_H__
#define __LAYER2_MAC_ENB_SCHEDULER_ULSCH_H__
/* number of active slices for past and current time*/
int
n_active_slices_uplink
=
1
;
int
n_active_slices_current_uplink
=
1
;
/* RB share for each slice for past and current time*/
float
avg_slice_percentage_uplink
=
0
.
25
;
float
slice_percentage_uplink
[
MAX_NUM_SLICES
]
=
{
1
.
0
,
0
.
0
,
0
.
0
,
0
.
0
};
float
slice_percentage_current_uplink
[
MAX_NUM_SLICES
]
=
{
1
.
0
,
0
.
0
,
0
.
0
,
0
.
0
};
float
total_slice_percentage_uplink
=
0
;
float
total_slice_percentage_current_uplink
=
0
;
// MAX MCS for each slice for past and current time
int
slice_maxmcs_uplink
[
MAX_NUM_SLICES
]
=
{
20
,
20
,
20
,
20
};
int
slice_maxmcs_current_uplink
[
MAX_NUM_SLICES
]
=
{
20
,
20
,
20
,
20
};
/*resource blocks allowed*/
uint16_t
nb_rbs_allowed_slice_uplink
[
NFAPI_CC_MAX
][
MAX_NUM_SLICES
];
/*Slice Update */
int
update_ul_scheduler
[
MAX_NUM_SLICES
]
=
{
1
,
1
,
1
,
1
};
int
update_ul_scheduler_current
[
MAX_NUM_SLICES
]
=
{
1
,
1
,
1
,
1
};
/* name of available scheduler*/
char
*
ul_scheduler_type
[
MAX_NUM_SLICES
]
=
{
"schedule_ulsch_rnti"
,
"schedule_ulsch_rnti"
,
"schedule_ulsch_rnti"
,
"schedule_ulsch_rnti"
};
/* Slice Function Pointer */
slice_scheduler_ul
slice_sched_ul
[
MAX_NUM_SLICES
]
=
{
0
};
#endif //__LAYER2_MAC_ENB_SCHEDULER_ULSCH_H__
openair2/LAYER2/MAC/mac_proto.h
View file @
53c617cd
...
@@ -237,14 +237,14 @@ void dlsch_scheduler_pre_processor_accounting(module_id_t Mod_id,
...
@@ -237,14 +237,14 @@ void dlsch_scheduler_pre_processor_accounting(module_id_t Mod_id,
int
min_rb_unit
[
NFAPI_CC_MAX
],
int
min_rb_unit
[
NFAPI_CC_MAX
],
uint8_t
total_ue_count
[
NFAPI_CC_MAX
],
uint8_t
total_ue_count
[
NFAPI_CC_MAX
],
uint16_t
nb_rbs_required
[
NFAPI_CC_MAX
][
MAX_MOBILES_PER_ENB
],
uint16_t
nb_rbs_required
[
NFAPI_CC_MAX
][
MAX_MOBILES_PER_ENB
],
uint16_t
nb_rbs_
required_remaining_1
[
NFAPI_CC_MAX
][
MAX_MOBILES_PER_ENB
]);
uint16_t
nb_rbs_
accounted
[
NFAPI_CC_MAX
][
MAX_MOBILES_PER_ENB
]);
void
dlsch_scheduler_pre_processor_positioning
(
module_id_t
Mod_id
,
void
dlsch_scheduler_pre_processor_positioning
(
module_id_t
Mod_id
,
slice_id_t
slice_id
,
slice_id_t
slice_id
,
int
min_rb_unit
[
NFAPI_CC_MAX
],
int
min_rb_unit
[
NFAPI_CC_MAX
],
uint8_t
total_ue_count
[
NFAPI_CC_MAX
],
uint8_t
total_ue_count
[
NFAPI_CC_MAX
],
uint16_t
nb_rbs_required
[
NFAPI_CC_MAX
][
MAX_MOBILES_PER_ENB
],
uint16_t
nb_rbs_required
[
NFAPI_CC_MAX
][
MAX_MOBILES_PER_ENB
],
uint16_t
nb_rbs_
required_remaining_1
[
NFAPI_CC_MAX
][
MAX_MOBILES_PER_ENB
],
uint16_t
nb_rbs_
accounted
[
NFAPI_CC_MAX
][
MAX_MOBILES_PER_ENB
],
uint8_t
rballoc_sub
[
NFAPI_CC_MAX
][
N_RBG_MAX
],
uint8_t
rballoc_sub
[
NFAPI_CC_MAX
][
N_RBG_MAX
],
uint8_t
MIMO_mode_indicator
[
NFAPI_CC_MAX
][
N_RBG_MAX
]);
uint8_t
MIMO_mode_indicator
[
NFAPI_CC_MAX
][
N_RBG_MAX
]);
...
@@ -252,10 +252,10 @@ void dlsch_scheduler_pre_processor_allocate(module_id_t Mod_id,
...
@@ -252,10 +252,10 @@ void dlsch_scheduler_pre_processor_allocate(module_id_t Mod_id,
int
UE_id
,
int
UE_id
,
uint8_t
CC_id
,
uint8_t
CC_id
,
int
N_RBG
,
int
N_RBG
,
int
t
ransmission_mode
,
int
t
m
,
int
min_rb_unit
,
int
min_rb_unit
,
uint16_t
nb_rbs_required
[
NFAPI_CC_MAX
][
MAX_MOBILES_PER_ENB
],
uint16_t
nb_rbs_required
[
NFAPI_CC_MAX
][
MAX_MOBILES_PER_ENB
],
uint16_t
nb_rbs_re
quired_re
maining
[
NFAPI_CC_MAX
][
MAX_MOBILES_PER_ENB
],
uint16_t
nb_rbs_remaining
[
NFAPI_CC_MAX
][
MAX_MOBILES_PER_ENB
],
unsigned
char
rballoc_sub
[
NFAPI_CC_MAX
][
N_RBG_MAX
],
unsigned
char
rballoc_sub
[
NFAPI_CC_MAX
][
N_RBG_MAX
],
uint8_t
slice_allocation_mask
[
NFAPI_CC_MAX
][
N_RBG_MAX
],
uint8_t
slice_allocation_mask
[
NFAPI_CC_MAX
][
N_RBG_MAX
],
unsigned
char
MIMO_mode_indicator
[
NFAPI_CC_MAX
][
N_RBG_MAX
]);
unsigned
char
MIMO_mode_indicator
[
NFAPI_CC_MAX
][
N_RBG_MAX
]);
...
@@ -1256,8 +1256,7 @@ void pre_scd_nb_rbs_required( module_id_t module_idP,
...
@@ -1256,8 +1256,7 @@ void pre_scd_nb_rbs_required( module_id_t module_idP,
#endif
#endif
/*Slice related functions */
/*Slice related functions */
uint16_t
flexran_nb_rbs_allowed_slice
(
float
rb_percentage
,
int
total_rbs
);
uint16_t
nb_rbs_allowed_slice
(
float
rb_percentage
,
int
total_rbs
);
int
ue_slice_membership
(
int
UE_id
,
int
slice_id
);
int
ue_slice_membership
(
int
UE_id
,
int
slice_id
);
/* from here: prototypes to get rid of compilation warnings: doc to be written by function author */
/* from here: prototypes to get rid of compilation warnings: doc to be written by function author */
...
...
openair2/LAYER2/MAC/pre_processor.c
View file @
53c617cd
This diff is collapsed.
Click to expand it.
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