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
wangwenhui
OpenXG-RAN
Commits
8acf8456
Commit
8acf8456
authored
Feb 20, 2018
by
Niccolò Iardella
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add positioning support for DL
parent
e56ae69b
Changes
3
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
165 additions
and
130 deletions
+165
-130
openair2/LAYER2/MAC/eNB_scheduler_dlsch.c
openair2/LAYER2/MAC/eNB_scheduler_dlsch.c
+55
-29
openair2/LAYER2/MAC/pre_processor.c
openair2/LAYER2/MAC/pre_processor.c
+100
-82
openair2/LAYER2/MAC/proto.h
openair2/LAYER2/MAC/proto.h
+10
-19
No files found.
openair2/LAYER2/MAC/eNB_scheduler_dlsch.c
View file @
8acf8456
...
@@ -83,6 +83,10 @@ float slice_percentage_current[MAX_NUM_SLICES] = {1.0, 0.0, 0.0, 0.0};
...
@@ -83,6 +83,10 @@ float slice_percentage_current[MAX_NUM_SLICES] = {1.0, 0.0, 0.0, 0.0};
float
total_slice_percentage
=
0
;
float
total_slice_percentage
=
0
;
float
total_slice_percentage_current
=
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
// MAX MCS for each slice for past and current time
int
slice_maxmcs
[
MAX_NUM_SLICES
]
=
{
28
,
28
,
28
,
28
};
int
slice_maxmcs
[
MAX_NUM_SLICES
]
=
{
28
,
28
,
28
,
28
};
int
slice_maxmcs_current
[
MAX_NUM_SLICES
]
=
{
28
,
28
,
28
,
28
};
int
slice_maxmcs_current
[
MAX_NUM_SLICES
]
=
{
28
,
28
,
28
,
28
};
...
@@ -445,9 +449,7 @@ set_ul_DAI(int module_idP, int UE_idP, int CC_idP, int frameP,
...
@@ -445,9 +449,7 @@ set_ul_DAI(int module_idP, int UE_idP, int CC_idP, int frameP,
//------------------------------------------------------------------------------
//------------------------------------------------------------------------------
void
void
schedule_dlsch
(
module_id_t
module_idP
,
schedule_dlsch
(
module_id_t
module_idP
,
frame_t
frameP
,
sub_frame_t
subframeP
,
int
*
mbsfn_flag
)
frame_t
frameP
,
sub_frame_t
subframeP
,
int
*
mbsfn_flag
)
//------------------------------------------------------------------------------{
{
{
int
i
=
0
;
int
i
=
0
;
...
@@ -462,7 +464,7 @@ schedule_dlsch(module_id_t module_idP,
...
@@ -462,7 +464,7 @@ schedule_dlsch(module_id_t module_idP,
for
(
i
=
0
;
i
<
n_active_slices
;
i
++
)
{
for
(
i
=
0
;
i
<
n_active_slices
;
i
++
)
{
if
(
slice_percentage
[
i
]
<
0
){
if
(
slice_percentage
[
i
]
<
0
){
LOG_W
(
MAC
,
"[eNB %d] frame %d subframe %d:invalid slice %d percentage %f. resetting to zero"
,
LOG_W
(
MAC
,
"[eNB %d] frame %d subframe %d:invalid slice %d percentage %f. resetting to zero"
,
module_idP
,
frameP
,
subframeP
,
i
,
slice_percentage
[
i
]);
module_idP
,
frameP
,
subframeP
,
i
,
slice_percentage
[
i
]);
slice_percentage
[
i
]
=
0
;
slice_percentage
[
i
]
=
0
;
}
}
total_slice_percentage
+=
slice_percentage
[
i
];
total_slice_percentage
+=
slice_percentage
[
i
];
...
@@ -482,37 +484,38 @@ schedule_dlsch(module_id_t module_idP,
...
@@ -482,37 +484,38 @@ schedule_dlsch(module_id_t module_idP,
// check if the number of slices has changed, and log
// check if the number of slices has changed, and log
if
(
n_active_slices_current
!=
n_active_slices
){
if
(
n_active_slices_current
!=
n_active_slices
){
if
((
n_active_slices
>
0
)
&&
(
n_active_slices
<=
MAX_NUM_SLICES
))
{
if
((
n_active_slices
>
0
)
&&
(
n_active_slices
<=
MAX_NUM_SLICES
))
{
LOG_N
(
MAC
,
"[eNB %d]frame %d subframe %d: number of active DL slices has changed: %d-->%d
\n
"
,
LOG_N
(
MAC
,
"[eNB %d]frame %d subframe %d: number of active DL slices has changed: %d-->%d
\n
"
,
module_idP
,
frameP
,
subframeP
,
n_active_slices_current
,
n_active_slices
);
module_idP
,
frameP
,
subframeP
,
n_active_slices_current
,
n_active_slices
);
n_active_slices_current
=
n_active_slices
;
n_active_slices_current
=
n_active_slices
;
}
else
{
LOG_W
(
MAC
,
"invalid number of DL slices %d, revert to the previous value %d
\n
"
,
}
else
{
n_active_slices
,
n_active_slices_current
);
LOG_W
(
MAC
,
"invalid number of DL slices %d, revert to the previous value %d
\n
"
,
n_active_slices
,
n_active_slices_current
);
n_active_slices
=
n_active_slices_current
;
n_active_slices
=
n_active_slices_current
;
}
}
}
}
// check if the slice rb share has changed, and log the console
// check if the slice rb share has changed, and log the console
if
(
slice_percentage_current
[
i
]
!=
slice_percentage
[
i
]){
// new slice percentage
if
(
slice_percentage_current
[
i
]
!=
slice_percentage
[
i
])
{
// new slice percentage
LOG_N
(
MAC
,
"[eNB %d][SLICE %d][DL] frame %d subframe %d: total percentage %f-->%f, slice RB percentage has changed: %f-->%f
\n
"
,
LOG_N
(
MAC
,
module_idP
,
i
,
frameP
,
subframeP
,
total_slice_percentage_current
,
total_slice_percentage
,
slice_percentage_current
[
i
],
slice_percentage
[
i
]);
"[eNB %d][SLICE %d][DL] frame %d subframe %d: total percentage %f-->%f, slice RB percentage has changed: %f-->%f
\n
"
,
total_slice_percentage_current
=
total_slice_percentage
;
module_idP
,
i
,
frameP
,
subframeP
,
total_slice_percentage_current
,
total_slice_percentage
,
slice_percentage_current
[
i
]
=
slice_percentage
[
i
];
slice_percentage_current
[
i
],
slice_percentage
[
i
]);
total_slice_percentage_current
=
total_slice_percentage
;
slice_percentage_current
[
i
]
=
slice_percentage
[
i
];
}
}
// check if the slice max MCS, and log the console
// check if the slice max MCS, and log the console
if
(
slice_maxmcs_current
[
i
]
!=
slice_maxmcs
[
i
]){
if
(
slice_maxmcs_current
[
i
]
!=
slice_maxmcs
[
i
])
{
if
((
slice_maxmcs
[
i
]
>=
0
)
&&
(
slice_maxmcs
[
i
]
<
29
)){
if
((
slice_maxmcs
[
i
]
>=
0
)
&&
(
slice_maxmcs
[
i
]
<
29
))
{
LOG_N
(
MAC
,
"[eNB %d][SLICE %d][DL] frame %d subframe %d: slice MAX MCS has changed: %d-->%d
\n
"
,
LOG_N
(
MAC
,
"[eNB %d][SLICE %d][DL] frame %d subframe %d: slice MAX MCS has changed: %d-->%d
\n
"
,
module_idP
,
i
,
frameP
,
subframeP
,
slice_maxmcs_current
[
i
],
slice_maxmcs
[
i
]);
module_idP
,
i
,
frameP
,
subframeP
,
slice_maxmcs_current
[
i
],
slice_maxmcs
[
i
]);
slice_maxmcs_current
[
i
]
=
slice_maxmcs
[
i
];
slice_maxmcs_current
[
i
]
=
slice_maxmcs
[
i
];
}
else
{
}
else
{
LOG_W
(
MAC
,
"[eNB %d][SLICE %d][DL] invalid slice max mcs %d, revert the previous value %d
\n
"
,
module_idP
,
i
,
slice_maxmcs
[
i
],
slice_maxmcs_current
[
i
]);
LOG_W
(
MAC
,
"[eNB %d][SLICE %d][DL] invalid slice max mcs %d, revert the previous value %d
\n
"
,
slice_maxmcs
[
i
]
=
slice_maxmcs_current
[
i
];
module_idP
,
i
,
slice_maxmcs
[
i
],
slice_maxmcs_current
[
i
]);
}
slice_maxmcs
[
i
]
=
slice_maxmcs_current
[
i
];
}
}
}
// check if a new scheduler, and log the console
// check if a new scheduler, and log the console
...
@@ -541,6 +544,29 @@ schedule_dlsch(module_id_t module_idP,
...
@@ -541,6 +544,29 @@ schedule_dlsch(module_id_t module_idP,
}
}
}
}
// Check for new slice positions
if
(
slice_position
[
i
*
2
]
>
slice_position
[
i
*
2
+
1
]
||
slice_position
[
i
*
2
]
<
0
||
slice_position
[
i
*
2
+
1
]
>
N_RBG_MAX
)
{
LOG_W
(
MAC
,
"[eNB %d][SLICE %d][DL] invalid slicing position (%d-%d), using previous values (%d-%d)
\n
"
,
module_idP
,
i
,
slice_position
[
i
*
2
],
slice_position
[
i
*
2
+
1
],
slice_position_current
[
i
*
2
],
slice_position_current
[
i
*
2
+
1
]);
slice_position
[
i
*
2
]
=
slice_position_current
[
i
*
2
];
slice_position
[
i
*
2
+
1
]
=
slice_position_current
[
i
*
2
+
1
];
}
else
{
if
(
slice_position_current
[
i
*
2
]
!=
slice_position
[
i
*
2
])
{
LOG_N
(
MAC
,
"[eNB %d][SLICE %d][DL] frame %d subframe %d: start frequency has changed (%d-->%d)
\n
"
,
module_idP
,
i
,
frameP
,
subframeP
,
slice_position_current
[
i
*
2
],
slice_position
[
i
*
2
]);
slice_position_current
[
i
*
2
]
=
slice_position
[
i
*
2
];
}
if
(
slice_position_current
[
i
*
2
+
1
]
!=
slice_position
[
i
*
2
+
1
])
{
LOG_N
(
MAC
,
"[eNB %d][SLICE %d][DL] frame %d subframe %d: end frequency has changed (%d-->%d)
\n
"
,
module_idP
,
i
,
frameP
,
subframeP
,
slice_position_current
[
i
*
2
+
1
],
slice_position
[
i
*
2
+
1
]);
slice_position_current
[
i
*
2
+
1
]
=
slice_position
[
i
*
2
+
1
];
}
}
// Check for new sorting policy
// Check for new sorting policy
if
(
sorting_policy_current
[
i
]
!=
sorting_policy
[
i
])
{
if
(
sorting_policy_current
[
i
]
!=
sorting_policy
[
i
])
{
LOG_N
(
MAC
,
"[eNB %d][SLICE %d][DL] frame %d subframe %d: UE sorting policy has changed (%x-->%x)
\n
"
,
LOG_N
(
MAC
,
"[eNB %d][SLICE %d][DL] frame %d subframe %d: UE sorting policy has changed (%x-->%x)
\n
"
,
...
...
openair2/LAYER2/MAC/pre_processor.c
View file @
8acf8456
This diff is collapsed.
Click to expand it.
openair2/LAYER2/MAC/proto.h
View file @
8acf8456
...
@@ -234,25 +234,16 @@ void dlsch_scheduler_pre_processor(module_id_t module_idP,
...
@@ -234,25 +234,16 @@ void dlsch_scheduler_pre_processor(module_id_t module_idP,
void
dlsch_scheduler_pre_processor_allocate
(
module_id_t
Mod_id
,
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
transmission_mode
,
int
transmission_mode
,
int
min_rb_unit
,
int
min_rb_unit
,
uint8_t
N_RB_DL
,
uint16_t
nb_rbs_required
[
MAX_NUM_CCs
][
NUMBER_OF_UE_MAX
],
uint16_t
uint16_t
nb_rbs_required_remaining
[
MAX_NUM_CCs
][
NUMBER_OF_UE_MAX
],
nb_rbs_required
[
MAX_NUM_CCs
]
unsigned
char
rballoc_sub
[
MAX_NUM_CCs
][
N_RBG_MAX
],
[
NUMBER_OF_UE_MAX
],
uint8_t
slice_allocation_mask
[
MAX_NUM_CCs
][
N_RBG_MAX
],
uint16_t
unsigned
char
MIMO_mode_indicator
[
MAX_NUM_CCs
][
N_RBG_MAX
]);
nb_rbs_required_remaining
[
MAX_NUM_CCs
]
[
NUMBER_OF_UE_MAX
],
unsigned
char
rballoc_sub
[
MAX_NUM_CCs
]
[
N_RBG_MAX
],
unsigned
char
MIMO_mode_indicator
[
MAX_NUM_CCs
][
N_RBG_MAX
]);
/* \brief Function to trigger the eNB scheduling procedure. It is called by PHY at the beginning of each subframe, \f$n$\f
/* \brief Function to trigger the eNB scheduling procedure. It is called by PHY at the beginning of each subframe, \f$n$\f
and generates all DLSCH allocations for subframe \f$n\f$ and ULSCH allocations for subframe \f$n+k$\f.
and generates all DLSCH allocations for subframe \f$n\f$ and ULSCH allocations for subframe \f$n+k$\f.
...
...
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