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
promise
OpenXG-RAN
Commits
22348335
Commit
22348335
authored
7 years ago
by
Niccolò Iardella
Committed by
Robert Schmidt
6 years ago
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Move slicing configuration variables in header files
parent
361af123
Changes
7
Expand all
Show whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
376 additions
and
327 deletions
+376
-327
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
-33
openair2/LAYER2/MAC/eNB_scheduler_ulsch.h
openair2/LAYER2/MAC/eNB_scheduler_ulsch.h
+71
-0
openair2/LAYER2/MAC/pre_processor.c
openair2/LAYER2/MAC/pre_processor.c
+222
-251
openair2/LAYER2/MAC/proto.h
openair2/LAYER2/MAC/proto.h
+3
-4
No files found.
openair2/LAYER2/MAC/eNB_scheduler_dlsch.c
View file @
22348335
...
@@ -49,6 +49,7 @@
...
@@ -49,6 +49,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/defs.h" // for taus
#include "SIMULATION/TOOLS/defs.h" // for taus
...
@@ -71,44 +72,6 @@
...
@@ -71,44 +72,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
,
...
...
This diff is collapsed.
Click to expand it.
openair2/LAYER2/MAC/eNB_scheduler_dlsch.h
0 → 100644
View file @
22348335
/*
* 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__
This diff is collapsed.
Click to expand it.
openair2/LAYER2/MAC/eNB_scheduler_primitives.c
View file @
22348335
...
@@ -4135,7 +4135,7 @@ harq_indication(module_id_t mod_idP, int CC_idP, frame_t frameP,
...
@@ -4135,7 +4135,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
);
}
}
...
...
This diff is collapsed.
Click to expand it.
openair2/LAYER2/MAC/eNB_scheduler_ulsch.c
View file @
22348335
...
@@ -51,6 +51,7 @@
...
@@ -51,6 +51,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_ulsch.h"
#include "pdcp.h"
#include "pdcp.h"
#if defined(ENABLE_ITTI)
#if defined(ENABLE_ITTI)
...
@@ -75,45 +76,12 @@ extern uint16_t sfnsf_add_subframe(uint16_t frameP, uint16_t subframeP, int offs
...
@@ -75,45 +76,12 @@ 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"
};
/* 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
,
...
...
This diff is collapsed.
Click to expand it.
openair2/LAYER2/MAC/eNB_scheduler_ulsch.h
0 → 100644
View file @
22348335
/*
* 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
[
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"
};
/* Slice Function Pointer */
slice_scheduler_ul
slice_sched_ul
[
MAX_NUM_SLICES
]
=
{
0
};
#endif //__LAYER2_MAC_ENB_SCHEDULER_ULSCH_H__
This diff is collapsed.
Click to expand it.
openair2/LAYER2/MAC/pre_processor.c
View file @
22348335
This diff is collapsed.
Click to expand it.
openair2/LAYER2/MAC/proto.h
View file @
22348335
...
@@ -238,7 +238,7 @@ void dlsch_scheduler_pre_processor_accounting(module_id_t Mod_id,
...
@@ -238,7 +238,7 @@ void dlsch_scheduler_pre_processor_accounting(module_id_t Mod_id,
int
min_rb_unit
[
MAX_NUM_CCs
],
int
min_rb_unit
[
MAX_NUM_CCs
],
uint8_t
total_ue_count
[
MAX_NUM_CCs
],
uint8_t
total_ue_count
[
MAX_NUM_CCs
],
uint16_t
nb_rbs_required
[
MAX_NUM_CCs
][
NUMBER_OF_UE_MAX
],
uint16_t
nb_rbs_required
[
MAX_NUM_CCs
][
NUMBER_OF_UE_MAX
],
uint16_t
nb_rbs_
required_remaining_1
[
MAX_NUM_CCs
][
NUMBER_OF_UE_MAX
]);
uint16_t
nb_rbs_
accounted
[
MAX_NUM_CCs
][
NUMBER_OF_UE_MAX
]);
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
,
...
@@ -246,7 +246,7 @@ void dlsch_scheduler_pre_processor_positioning(module_id_t Mod_id,
...
@@ -246,7 +246,7 @@ void dlsch_scheduler_pre_processor_positioning(module_id_t Mod_id,
int
min_rb_unit
[
MAX_NUM_CCs
],
int
min_rb_unit
[
MAX_NUM_CCs
],
uint8_t
total_ue_count
[
MAX_NUM_CCs
],
uint8_t
total_ue_count
[
MAX_NUM_CCs
],
uint16_t
nb_rbs_required
[
MAX_NUM_CCs
][
NUMBER_OF_UE_MAX
],
uint16_t
nb_rbs_required
[
MAX_NUM_CCs
][
NUMBER_OF_UE_MAX
],
uint16_t
nb_rbs_
required_remaining_1
[
MAX_NUM_CCs
][
NUMBER_OF_UE_MAX
],
uint16_t
nb_rbs_
accounted
[
MAX_NUM_CCs
][
NUMBER_OF_UE_MAX
],
uint8_t
rballoc_sub
[
MAX_NUM_CCs
][
N_RBG_MAX
],
uint8_t
rballoc_sub
[
MAX_NUM_CCs
][
N_RBG_MAX
],
uint8_t
MIMO_mode_indicator
[
MAX_NUM_CCs
][
N_RBG_MAX
]);
uint8_t
MIMO_mode_indicator
[
MAX_NUM_CCs
][
N_RBG_MAX
]);
...
@@ -1193,8 +1193,7 @@ int l2_init_ue(int eMBMS_active, char *uecap_xer, uint8_t cba_group_active,
...
@@ -1193,8 +1193,7 @@ int l2_init_ue(int eMBMS_active, char *uecap_xer, uint8_t cba_group_active,
uint8_t
HO_active
);
uint8_t
HO_active
);
/*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
);
#endif
#endif
...
...
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