Commit fc4d2fb2 authored by Niccolò Iardella's avatar Niccolò Iardella

Add sorting policy to UL pre-processor

parent 73dbcb1a
......@@ -110,6 +110,14 @@ typedef enum {
CR_NUM = 6
} sorting_criterion_t;
typedef enum {
CRU_ROUND = 0,
CRU_BUF = 1,
CRU_BTS = 2,
CRU_MCS = 3,
CRU_NUM = 4
} sorting_criterion_ul_t;
typedef enum {
POL_FAIR = 0,
POL_GREEDY = 1,
......
......@@ -982,6 +982,7 @@ typedef struct {
/// Sorting criteria for the UE list in the MAC preprocessor
uint16_t sorting_criteria[MAX_NUM_SLICES][CR_NUM];
uint16_t sorting_criteria_ul[MAX_NUM_SLICES][CR_NUM];
} UE_list_t;
......
......@@ -1009,6 +1009,13 @@ schedule_ulsch(module_id_t module_idP, frame_t frameP,
}
}
// Check for new sorting policy
if (slice_sorting_uplink_current[i] != slice_sorting_uplink[i]) {
LOG_N(MAC, "[eNB %d][SLICE %d][UL] frame %d subframe %d: UE sorting policy has changed (%x-->%x)\n",
module_idP, i, frameP, subframeP, slice_sorting_uplink_current[i], slice_sorting_uplink[i]);
slice_sorting_uplink_current[i] = slice_sorting_uplink[i];
}
// check if a new scheduler, and log the console
if (update_ul_scheduler_current[i] != update_ul_scheduler[i]){
LOG_N(MAC,"[eNB %d][SLICE %d][UL] frame %d subframe %d: UL scheduler for this slice is updated: %s \n",
......
......@@ -52,6 +52,10 @@ float total_slice_percentage_current_uplink = 0;
int slice_maxmcs_uplink[MAX_NUM_SLICES] = {20, 20, 20, 20};
int slice_maxmcs_current_uplink[MAX_NUM_SLICES] = {20,20,20,20};
// The lists of criteria that enforce the sorting policies of the slices
uint32_t slice_sorting_uplink[MAX_NUM_SLICES] = {0x0123, 0x0123, 0x0123, 0x0123};
uint32_t slice_sorting_uplink_current[MAX_NUM_SLICES] = {0x0123, 0x0123, 0x0123, 0x0123};
/*resource blocks allowed*/
uint16_t nb_rbs_allowed_slice_uplink[MAX_NUM_CCs][MAX_NUM_SLICES];
/*Slice Update */
......
This diff is collapsed.
......@@ -691,9 +691,28 @@ void ulsch_scheduler_pre_processor(module_id_t module_idP, slice_id_t slice_id,
uint16_t * first_rb);
void store_ulsch_buffer(module_id_t module_idP, int frameP,
sub_frame_t subframeP);
void sort_ue_ul(module_id_t module_idP, int frameP, sub_frame_t subframeP);
void sort_ue_ul(module_id_t module_idP, slice_id_t slice_id, int frameP, sub_frame_t subframeP);
void assign_max_mcs_min_rb(module_id_t module_idP, int slice_id, int frameP,
sub_frame_t subframeP, uint16_t * first_rb);
void ulsch_scheduler_pre_processor_accounting(module_id_t module_idP,
slice_id_t slice_id,
int frameP,
sub_frame_t subframeP,
uint16_t * first_rb,
uint16_t total_ue_count[MAX_NUM_CCs],
uint16_t nb_allocated_rbs[MAX_NUM_CCs][NUMBER_OF_UE_MAX],
uint16_t total_allocated_rbs[MAX_NUM_CCs]);
void ulsch_scheduler_pre_processor_allocation(module_id_t module_idP,
slice_id_t slice_id,
int frameP,
sub_frame_t subframeP,
uint16_t * first_rb,
uint16_t total_ue_count[MAX_NUM_CCs],
uint16_t nb_allocated_rbs[MAX_NUM_CCs][NUMBER_OF_UE_MAX],
uint16_t total_allocated_rbs[MAX_NUM_CCs]);
void adjust_bsr_info(int buffer_occupancy, uint16_t TBS,
UE_TEMPLATE * UE_template);
int phy_stats_exist(module_id_t Mod_id, int rnti);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment