Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
O
OpenXG-AIEngine
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
Operations
Operations
Metrics
Environments
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
OpenXG
OpenXG-AIEngine
Commits
9bc6969e
Commit
9bc6969e
authored
Mar 23, 2021
by
wangdong
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add DDQN Slice
parent
f309fd17
Changes
13
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
13 changed files
with
884 additions
and
317 deletions
+884
-317
ci-scripts/conf_files/enb.conf
ci-scripts/conf_files/enb.conf
+1
-1
ci-scripts/conf_files/enb.l2sim.conf
ci-scripts/conf_files/enb.l2sim.conf
+1
-1
cmake_targets/CMakeLists.txt
cmake_targets/CMakeLists.txt
+1
-1
openair2/ENB_APP/CONTROL_MODULES/MAC/flexran_agent_mac_internal.c
.../ENB_APP/CONTROL_MODULES/MAC/flexran_agent_mac_internal.c
+0
-1
openair2/ENB_APP/MESSAGES/V2/config_common.proto
openair2/ENB_APP/MESSAGES/V2/config_common.proto
+20
-0
openair2/ENB_APP/flexran_agent_ran_api.c
openair2/ENB_APP/flexran_agent_ran_api.c
+64
-1
openair2/LAYER2/MAC/mac.h
openair2/LAYER2/MAC/mac.h
+2
-0
openair2/LAYER2/MAC/slicing/a.out
openair2/LAYER2/MAC/slicing/a.out
+0
-0
openair2/LAYER2/MAC/slicing/b.out
openair2/LAYER2/MAC/slicing/b.out
+0
-0
openair2/LAYER2/MAC/slicing/slicing.c
openair2/LAYER2/MAC/slicing/slicing.c
+756
-308
openair2/LAYER2/MAC/slicing/slicing.h
openair2/LAYER2/MAC/slicing/slicing.h
+26
-0
openair2/LAYER2/MAC/slicing/test.c
openair2/LAYER2/MAC/slicing/test.c
+9
-0
targets/COMMON/openairinterface5g_limits.h
targets/COMMON/openairinterface5g_limits.h
+4
-4
No files found.
ci-scripts/conf_files/enb.conf
View file @
9bc6969e
...
...
@@ -174,7 +174,7 @@ eNBs =
//////////
MME
parameters
:
mme_ip_address
= ( {
ipv4
=
"192.168.1.1
77
"
;
mme_ip_address
= ( {
ipv4
=
"192.168.1.1
2
"
;
ipv6
=
"192:168:30::17"
;
active
=
"yes"
;
preference
=
"ipv4"
;
...
...
ci-scripts/conf_files/enb.l2sim.conf
View file @
9bc6969e
...
...
@@ -176,7 +176,7 @@ eNBs =
//////////
MME
parameters
:
mme_ip_address
= (
{
ipv4
=
"192.168.1.1
77
"
;
ipv4
=
"192.168.1.1
2
"
;
ipv6
=
"192:168:30::17"
;
active
=
"yes"
;
preference
=
"ipv4"
;
...
...
cmake_targets/CMakeLists.txt
View file @
9bc6969e
...
...
@@ -1826,7 +1826,7 @@ set(L2_RRC_SRC
)
set
(
L2_LTE_SRC
${
RLC_V
1
}
${
RLC_V
2
}
)
set
(
L2_NR_SRC
...
...
openair2/ENB_APP/CONTROL_MODULES/MAC/flexran_agent_mac_internal.c
View file @
9bc6969e
...
...
@@ -1076,7 +1076,6 @@ void apply_update_dl_slice_config(mid_t mod_id, Protocol__FlexSliceDlUlConfig *d
/* first update existing slices, then create new. Thus, we go through the
* list twice. First round, if a slice exists, handle and mark as such. Then,
* apply all others in the second round */
printf
(
"Slice Numbers: %d
\n
"
,
dl
->
n_slices
);
LOG_I
(
FLEXRAN_AGENT
,
"Slice Numbers: %d
\n
"
,
dl
->
n_slices
);
if
(
dl
->
n_slices
>
0
)
{
if
(
dl_algo
==
PROTOCOL__FLEX_SLICE_ALGORITHM__None
)
{
...
...
openair2/ENB_APP/MESSAGES/V2/config_common.proto
View file @
9bc6969e
...
...
@@ -66,6 +66,8 @@ enum flex_slice_algorithm {
Static
=
1
;
NVS
=
2
;
SCN19
=
3
;
APEX
=
4
;
DDQN
=
5
;
}
...
...
@@ -87,6 +89,22 @@ message flex_slice_scn19 {
optional
uint32
typeid
=
10
;
}
message
flex_slice_apex
{
optional
uint32
arb
=
1
;
optional
uint32
mrb
=
2
;
optional
uint32
typeid
=
3
;
optional
float
rbru
=
4
;
optional
float
nsrs
=
5
;
optional
float
reward
=
6
;
}
message
flex_slice_ddqn
{
optional
uint32
arb
=
1
;
optional
uint32
mrb
=
2
;
optional
uint32
typeid
=
3
;
optional
float
thrpt
=
4
;
optional
float
delay
=
5
;
}
message
flex_slice_static
{
optional
uint32
posLow
=
1
;
...
...
@@ -108,6 +126,8 @@ message flex_slice {
flex_slice_static
static
=
10
;
flex_slice_dynamic
dynamic
=
11
;
flex_slice_scn19
scn19
=
12
;
flex_slice_apex
apex
=
13
;
flex_slice_ddqn
ddqn
=
14
;
}
}
...
...
openair2/ENB_APP/flexran_agent_ran_api.c
View file @
9bc6969e
...
...
@@ -1402,7 +1402,7 @@ void flexran_set_pdcp_rx_stat_window(mid_t mod_id, uint16_t uid, uint16_t obs_wi
||
uid
>=
MAX_MOBILES_PER_ENB
)
return
;
Pdcp_stats_rx_window_ms
[
mod_id
][
uid
]
=
obs_window
>
0
?
obs_window
:
1
000
;
Pdcp_stats_rx_window_ms
[
mod_id
][
uid
]
=
obs_window
>
0
?
obs_window
:
1
;
}
/*PDCP num tx pdu status flexRAN*/
...
...
@@ -3022,6 +3022,10 @@ Protocol__FlexSliceAlgorithm flexran_get_dl_slice_algo(mid_t mod_id) {
return
PROTOCOL__FLEX_SLICE_ALGORITHM__Static
;
case
SCN19_SLICING
:
return
PROTOCOL__FLEX_SLICE_ALGORITHM__SCN19
;
case
APEX_SLICING
:
return
PROTOCOL__FLEX_SLICE_ALGORITHM__APEX
;
case
DDQN_SLICING
:
return
PROTOCOL__FLEX_SLICE_ALGORITHM__DDQN
;
default:
return
PROTOCOL__FLEX_SLICE_ALGORITHM__None
;
}
...
...
@@ -3037,9 +3041,15 @@ int flexran_set_dl_slice_algo(mid_t mod_id, Protocol__FlexSliceAlgorithm algo) {
case
PROTOCOL__FLEX_SLICE_ALGORITHM__Static
:
mac
->
pre_processor_dl
=
static_dl_init
(
mod_id
,
cc_id
);
break
;
case
PROTOCOL__FLEX_SLICE_ALGORITHM__APEX
:
mac
->
pre_processor_dl
=
apex_dl_init
(
mod_id
,
cc_id
);
break
;
case
PROTOCOL__FLEX_SLICE_ALGORITHM__SCN19
:
mac
->
pre_processor_dl
=
static_dl_init
(
mod_id
,
cc_id
);
break
;
case
PROTOCOL__FLEX_SLICE_ALGORITHM__DDQN
:
mac
->
pre_processor_dl
=
ddqn_dl_init
(
mod_id
,
cc_id
);
break
;
default:
//如未指定slice算法,则回归原有的调度!
mac
->
pre_processor_dl
.
algorithm
=
0
;
...
...
@@ -3138,6 +3148,25 @@ int flexran_create_dl_slice(mid_t mod_id, const Protocol__FlexSlice *s) {
((
dynamic_slice_param_t
*
)
params
)
->
kpsRequired
=
s
->
dynamic
->
kpsrequired
;
((
dynamic_slice_param_t
*
)
params
)
->
kpsReference
=
s
->
dynamic
->
kpsreference
;
break
;
case
PROTOCOL__FLEX_SLICE__PARAMS_APEX
:
params
=
malloc
(
sizeof
(
apex_slice_param_t
));
if
(
!
params
)
return
0
;
((
apex_slice_param_t
*
)
params
)
->
arb
=
s
->
apex
->
arb
;
((
apex_slice_param_t
*
)
params
)
->
mrb
=
s
->
apex
->
mrb
;
((
apex_slice_param_t
*
)
params
)
->
rbru
=
s
->
apex
->
rbru
;
((
apex_slice_param_t
*
)
params
)
->
nsrs
=
s
->
apex
->
nsrs
;
((
apex_slice_param_t
*
)
params
)
->
typeid
=
s
->
apex
->
typeid_
;
((
apex_slice_param_t
*
)
params
)
->
reward
=
s
->
apex
->
reward
;
break
;
case
PROTOCOL__FLEX_SLICE__PARAMS_DDQN
:
params
=
malloc
(
sizeof
(
ddqn_slice_param_t
));
if
(
!
params
)
return
0
;
((
ddqn_slice_param_t
*
)
params
)
->
arb
=
s
->
ddqn
->
arb
;
((
ddqn_slice_param_t
*
)
params
)
->
mrb
=
s
->
ddqn
->
mrb
;
((
ddqn_slice_param_t
*
)
params
)
->
thrpt
=
s
->
ddqn
->
thrpt
;
((
ddqn_slice_param_t
*
)
params
)
->
typeid
=
s
->
ddqn
->
typeid_
;
((
ddqn_slice_param_t
*
)
params
)
->
delay
=
s
->
ddqn
->
delay
;
break
;
case
PROTOCOL__FLEX_SLICE__PARAMS_SCN19
:
params
=
malloc
(
sizeof
(
scn19_slice_param_t
));
if
(
!
params
)
return
0
;
...
...
@@ -3229,6 +3258,40 @@ void flexran_get_dl_slice(mid_t mod_id,
slice
->
static_
->
poshigh
=
((
static_slice_param_t
*
)
s_
->
algo_data
)
->
posHigh
;
slice
->
params_case
=
PROTOCOL__FLEX_SLICE__PARAMS_STATIC
;
break
;
case
PROTOCOL__FLEX_SLICE_ALGORITHM__APEX
:
slice
->
apex
=
malloc
(
sizeof
(
Protocol__FlexSliceApex
));
if
(
!
slice
->
apex
)
return
;
protocol__flex_slice_apex__init
(
slice
->
apex
);
slice
->
apex
->
has_arb
=
1
;
slice
->
apex
->
arb
=
((
apex_slice_param_t
*
)
s_
->
algo_data
)
->
arb
;
slice
->
apex
->
has_mrb
=
1
;
slice
->
apex
->
mrb
=
((
apex_slice_param_t
*
)
s_
->
algo_data
)
->
mrb
;
slice
->
apex
->
has_typeid_
=
1
;
slice
->
apex
->
typeid_
=
((
apex_slice_param_t
*
)
s_
->
algo_data
)
->
typeid
;
slice
->
apex
->
has_nsrs
=
1
;
slice
->
apex
->
nsrs
=
((
apex_slice_param_t
*
)
s_
->
algo_data
)
->
nsrs
;
slice
->
apex
->
has_reward
=
1
;
slice
->
apex
->
reward
=
((
apex_slice_param_t
*
)
s_
->
algo_data
)
->
reward
;
slice
->
apex
->
has_rbru
=
1
;
slice
->
apex
->
rbru
=
((
apex_slice_param_t
*
)
s_
->
algo_data
)
->
rbru
;
slice
->
params_case
=
PROTOCOL__FLEX_SLICE__PARAMS_APEX
;
break
;
case
PROTOCOL__FLEX_SLICE_ALGORITHM__DDQN
:
slice
->
ddqn
=
malloc
(
sizeof
(
Protocol__FlexSliceDdqn
));
if
(
!
slice
->
ddqn
)
return
;
protocol__flex_slice_ddqn__init
(
slice
->
ddqn
);
slice
->
ddqn
->
has_arb
=
1
;
slice
->
ddqn
->
arb
=
((
ddqn_slice_param_t
*
)
s_
->
algo_data
)
->
arb
;
slice
->
ddqn
->
has_mrb
=
1
;
slice
->
ddqn
->
mrb
=
((
ddqn_slice_param_t
*
)
s_
->
algo_data
)
->
mrb
;
slice
->
ddqn
->
has_typeid_
=
1
;
slice
->
ddqn
->
typeid_
=
((
ddqn_slice_param_t
*
)
s_
->
algo_data
)
->
typeid
;
slice
->
ddqn
->
has_thrpt
=
1
;
slice
->
ddqn
->
thrpt
=
((
ddqn_slice_param_t
*
)
s_
->
algo_data
)
->
thrpt
;
slice
->
ddqn
->
has_delay
=
1
;
slice
->
ddqn
->
delay
=
((
ddqn_slice_param_t
*
)
s_
->
algo_data
)
->
delay
;
slice
->
params_case
=
PROTOCOL__FLEX_SLICE__PARAMS_DDQN
;
break
;
case
PROTOCOL__FLEX_SLICE_ALGORITHM__SCN19
:
slice
->
scn19
=
malloc
(
sizeof
(
Protocol__FlexSliceScn19
));
if
(
!
slice
->
scn19
)
return
;
...
...
openair2/LAYER2/MAC/mac.h
View file @
9bc6969e
...
...
@@ -663,6 +663,8 @@ typedef struct {
// total TBS with mcs2
// uint32_t total_TBS;
// total rb used for a new transmission
uint32_t
last_total_rbs_used
;
uint32_t
last_tx_byte
;
uint32_t
total_rbs_used
;
// total rb used for retransmission
uint32_t
total_rbs_used_retx
;
...
...
openair2/LAYER2/MAC/slicing/a.out
View file @
9bc6969e
No preview for this file type
openair2/LAYER2/MAC/slicing/b.out
0 → 100755
View file @
9bc6969e
File added
openair2/LAYER2/MAC/slicing/slicing.c
View file @
9bc6969e
This diff is collapsed.
Click to expand it.
openair2/LAYER2/MAC/slicing/slicing.h
View file @
9bc6969e
...
...
@@ -62,8 +62,11 @@ int slicing_get_UE_slice_idx(slice_info_t *si, int UE_id);
#define STATIC_SLICING 10
#define SCN19_SLICING 11
#define APEX_SLICING 12
#define DDQN_SLICING 13
/* only four static slices for UL, DL resp. (not enough DCIs) */
#define MAX_STATIC_SLICES 10
#define MAX_APEX_SLICES 10
#define MAX_DYNAMIC_SLICES 10
#define RB_NUMS 25
#define BETA 0.1
...
...
@@ -104,6 +107,27 @@ typedef struct {
float
dloss
;
}
scn19_slice_param_t
;
typedef
struct
{
uint16_t
arb
;
uint16_t
mrb
;
uint16_t
typeid
;
uint16_t
rbs
;
uint16_t
tau
;
float
mpsrequire
;
float
delay
;
float
nsrs
;
float
rbru
;
float
weight
;
float
reward
;
}
apex_slice_param_t
;
typedef
struct
{
uint16_t
arb
;
uint16_t
mrb
;
uint16_t
typeid
;
float
thrpt
;
float
delay
;
}
ddqn_slice_param_t
;
typedef
struct
{
uint16_t
fexp
;
...
...
@@ -111,6 +135,8 @@ typedef struct {
uint16_t
texp
;
}
stats_param_t
;
pp_impl_param_t
static_dl_init
(
module_id_t
mod_id
,
int
CC_id
);
pp_impl_param_t
apex_dl_init
(
module_id_t
mod_id
,
int
CC_id
);
pp_impl_param_t
ddqn_dl_init
(
module_id_t
mod_id
,
int
CC_id
);
pp_impl_param_t
static_ul_init
(
module_id_t
mod_id
,
int
CC_id
);
// typedef struct {
...
...
openair2/LAYER2/MAC/slicing/test.c
0 → 100644
View file @
9bc6969e
#include "stdio.h"
#include "stdlib.h"
int
main
(){
int
index1
=
5
;
int
index2
=
2
;
printf
(
"%f
\n
"
,(
float
)
index1
/
(
float
)
index2
);
return
0
;
}
\ No newline at end of file
targets/COMMON/openairinterface5g_limits.h
View file @
9bc6969e
...
...
@@ -14,8 +14,8 @@
// now , if we use --mu option in UE, compiling error will occur.
// This problem will be fixed in the future.
# ifndef UESIM_EXPANSION
# define NUMBER_OF_UE_MAX
4
# define NUMBER_OF_NR_UE_MAX
4
# define NUMBER_OF_UE_MAX
16
# define NUMBER_OF_NR_UE_MAX
16
# define NUMBER_OF_UCI_VARS_MAX 14
# define NUMBER_OF_CONNECTED_eNB_MAX 1
# define NUMBER_OF_CONNECTED_gNB_MAX 1
...
...
@@ -32,7 +32,7 @@
# define NUMBER_OF_CONNECTED_gNB_MAX 1
# endif
# else
# define NUMBER_OF_UE_MAX 1
# define NUMBER_OF_UE_MAX 1
6
# define NUMBER_OF_UCI_VARS_MAX 56
# define NUMBER_OF_CONNECTED_eNB_MAX 1
# define NUMBER_OF_CONNECTED_gNB_MAX 1
...
...
@@ -77,7 +77,7 @@ and the other are using MAX_MOBILES_PER_ENB in for-loop.
# define NUMBER_OF_eNB_MAX 3
# define NUMBER_OF_gNB_MAX 3
# define NUMBER_OF_UE_MAX
3
# define NUMBER_OF_UE_MAX
16
# define NUMBER_OF_RU_MAX 3
# define NUMBER_OF_NR_RU_MAX 3
...
...
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