* Compile Rel10 with component carrier
* Add VCD timing for PDCP, RLC, and MAC * Update MAC-PHY interface * update eNB MAC DLSCH scheduler and preprocessor with component carrier * Add test case for dlsim performance git-svn-id: http://svn.eurecom.fr/openair4G/trunk@5708 818b1a75-f10b-46b9-bf7c-635c3b92a50f
This commit is contained in:
@@ -244,10 +244,11 @@ int rrc_mac_config_req(module_id_t Mod_id, eNB_flag_t eNB_flagP,uint8_t UE_id,ui
|
||||
#ifdef Rel10
|
||||
if (sCellToAddMod_r10 != NULL) {
|
||||
|
||||
if (eNB_flag==1){
|
||||
if (eNB_flagP==1){
|
||||
mac_xface->phy_config_dedicated_scell_eNB(Mod_id,UE_RNTI(Mod_id,UE_id),sCellToAddMod_r10,1);
|
||||
}
|
||||
else {
|
||||
#warning "phy_config_dedicated_scell_ue is empty"
|
||||
mac_xface->phy_config_dedicated_scell_ue(Mod_id,eNB_index,sCellToAddMod_r10,1);
|
||||
UE_mac_inst[Mod_id].physicalConfigDedicatedSCell_r10 = sCellToAddMod_r10->radioResourceConfigDedicatedSCell_r10->physicalConfigDedicatedSCell_r10; // using SCell index 0
|
||||
}
|
||||
@@ -420,7 +421,7 @@ int rrc_mac_config_req(module_id_t Mod_id, eNB_flag_t eNB_flagP,uint8_t UE_id,ui
|
||||
|
||||
// MBMS session info list in each MCH
|
||||
eNB_mac_inst[Mod_id].common_channels[0].mbms_SessionList[i] = &pmch_InfoList->list.array[i]->mbms_SessionInfoList_r9;
|
||||
LOG_I(MAC, "PMCH[%d] Number of session (MTCH) is: %d\n",i, eNB_mac_inst[Mod_id].mbms_SessionList[i]->list.count);
|
||||
LOG_I(MAC, "PMCH[%d] Number of session (MTCH) is: %d\n",i, eNB_mac_inst[Mod_id].common_channels[0].mbms_SessionList[i]->list.count);
|
||||
}
|
||||
}
|
||||
else { // UE
|
||||
|
||||
@@ -128,7 +128,11 @@
|
||||
// The power headroom reporting range is from -23 ...+40 dB and beyond, with step 1
|
||||
#define PHR_MAPPING_OFFSET 23 // if ( x>= -23 ) val = floor (x + 23)
|
||||
|
||||
#define N_RBGS_MAX 25
|
||||
#define N_RBG_MAX 25 // for 20MHz channel BW
|
||||
|
||||
#define MIN_CQI_VALUE 0
|
||||
#define MAX_CQI_VALUE 15
|
||||
|
||||
|
||||
#define LCGID0 0
|
||||
#define LCGID1 1
|
||||
@@ -529,6 +533,8 @@ typedef struct{
|
||||
|
||||
uint32_t dl_buffer_head_sdu_creation_time[MAX_NUM_LCID];
|
||||
|
||||
uint32_t dl_buffer_head_sdu_creation_time_max;
|
||||
|
||||
uint8_t dl_buffer_head_sdu_is_segmented[MAX_NUM_LCID];
|
||||
|
||||
uint32_t dl_buffer_head_sdu_remaining_size_to_send[MAX_NUM_LCID];
|
||||
@@ -702,7 +708,7 @@ typedef struct{
|
||||
/// active flag for Other lcid
|
||||
// uint8_t lcid_active[NB_RB_MAX];
|
||||
// eNB stats
|
||||
eNB_STATS eNB_stats;
|
||||
eNB_STATS eNB_stats[MAX_NUM_CCs];
|
||||
// MAC function execution peformance profiler
|
||||
time_stats_t eNB_scheduler;
|
||||
time_stats_t schedule_si;
|
||||
|
||||
@@ -82,7 +82,6 @@
|
||||
|
||||
void eNB_dlsch_ulsch_scheduler(module_id_t module_idP,uint8_t cooperation_flag, frame_t frameP, sub_frame_t subframeP) {//, int calibration_flag) {
|
||||
|
||||
start_meas(&eNB_mac_inst[module_idP].eNB_scheduler);
|
||||
unsigned int nprb[MAX_NUM_CCs];
|
||||
unsigned int nCCE[MAX_NUM_CCs];
|
||||
int mbsfn_status[MAX_NUM_CCs];
|
||||
@@ -101,9 +100,8 @@ void eNB_dlsch_ulsch_scheduler(module_id_t module_idP,uint8_t cooperation_flag,
|
||||
|
||||
LOG_D(MAC,"[eNB %d] Frame %d, Subframe %d, entering MAC scheduler\n",module_idP, frameP, subframeP);
|
||||
|
||||
|
||||
|
||||
vcd_signal_dumper_dump_function_by_name(VCD_SIGNAL_DUMPER_FUNCTIONS_ENB_DLSCH_ULSCH_SCHEDULER,1);
|
||||
start_meas(&eNB_mac_inst[module_idP].eNB_scheduler);
|
||||
vcd_signal_dumper_dump_function_by_name(VCD_SIGNAL_DUMPER_FUNCTIONS_ENB_DLSCH_ULSCH_SCHEDULER,VCD_FUNCTION_IN);
|
||||
|
||||
for (CC_id=0;CC_id<MAX_NUM_CCs;CC_id++) {
|
||||
DCI_pdu[CC_id] = &eNB_mac_inst[module_idP].common_channels[CC_id].DCI_pdu;
|
||||
@@ -170,7 +168,7 @@ void eNB_dlsch_ulsch_scheduler(module_id_t module_idP,uint8_t cooperation_flag,
|
||||
eNB_mac_inst[module_idP].common_channels[CC_id].bcch_active = 0;
|
||||
|
||||
#ifdef Rel10
|
||||
eNB_mac_inst[module_idP].common_channels.mcch_active =0;
|
||||
eNB_mac_inst[module_idP].common_channels[CC_id].mcch_active =0;
|
||||
#endif
|
||||
|
||||
eNB_mac_inst[module_idP].frame = frameP;
|
||||
@@ -181,22 +179,19 @@ void eNB_dlsch_ulsch_scheduler(module_id_t module_idP,uint8_t cooperation_flag,
|
||||
#ifdef EXMIMO
|
||||
pdcp_run(frameP, 1, 0, module_idP);
|
||||
#endif
|
||||
#ifdef CELLULAR
|
||||
rrc_rx_tx(module_idP, frameP, 0, 0);
|
||||
#else
|
||||
|
||||
// check HO
|
||||
rrc_rx_tx(module_idP,
|
||||
frameP,
|
||||
1,
|
||||
module_idP);
|
||||
#endif
|
||||
frameP,
|
||||
1,
|
||||
module_idP);
|
||||
|
||||
#ifdef Rel10
|
||||
for (CC_id=0;CC_id<MAX_NUM_CCs;CC_id++) {
|
||||
if (eNB_mac_inst[module_idP].common_channels.MBMS_flag >0) {
|
||||
start_meas(&eNB_mac_inst[module_idP].common_channels.schedule_mch);
|
||||
mbsfn_status = schedule_MBMS(module_idP,CC_id,frameP,subframeP);
|
||||
stop_meas(&eNB_mac_inst[module_idP][CC-id].schedule_mch);
|
||||
if (eNB_mac_inst[module_idP].common_channels[CC_id].MBMS_flag >0) {
|
||||
start_meas(&eNB_mac_inst[module_idP].schedule_mch);
|
||||
mbsfn_status[CC_id] = schedule_MBMS(module_idP,CC_id,frameP,subframeP);
|
||||
stop_meas(&eNB_mac_inst[module_idP].schedule_mch);
|
||||
}
|
||||
}
|
||||
#endif
|
||||
@@ -473,9 +468,9 @@ void eNB_dlsch_ulsch_scheduler(module_id_t module_idP,uint8_t cooperation_flag,
|
||||
DCI_pdu[CC_id]->nCCE = nCCE[CC_id];
|
||||
LOG_D(MAC,"frameP %d, subframeP %d nCCE %d\n",frameP,subframeP,nCCE[0]);
|
||||
|
||||
vcd_signal_dumper_dump_function_by_name(VCD_SIGNAL_DUMPER_FUNCTIONS_ENB_DLSCH_ULSCH_SCHEDULER,0);
|
||||
stop_meas(&eNB_mac_inst[module_idP].eNB_scheduler);
|
||||
|
||||
vcd_signal_dumper_dump_function_by_name(VCD_SIGNAL_DUMPER_FUNCTIONS_ENB_DLSCH_ULSCH_SCHEDULER,VCD_FUNCTION_OUT);
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -67,6 +67,7 @@
|
||||
# include "intertask_interface.h"
|
||||
#endif
|
||||
|
||||
extern inline unsigned int taus(void);
|
||||
|
||||
void schedule_RA(module_id_t module_idP,frame_t frameP, sub_frame_t subframeP,unsigned char Msg3_subframe,unsigned int *nprb,unsigned int *nCCE) {
|
||||
|
||||
|
||||
@@ -15,8 +15,8 @@
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with OpenAirInterface.The full GNU General Public License is
|
||||
included in this distribution in the file called "COPYING". If not,
|
||||
see <http://www.gnu.org/licenses/>.
|
||||
included in this distribution in the file called "COPYING". If not,
|
||||
see <http://www.gnu.org/licenses/>.
|
||||
|
||||
Contact Information
|
||||
OpenAirInterface Admin: openair_admin@eurecom.fr
|
||||
@@ -298,237 +298,156 @@ void schedule_ue_spec(module_id_t module_idP,
|
||||
unsigned int *nCCE_used,
|
||||
int *mbsfn_flag) {
|
||||
|
||||
int CC_id;
|
||||
uint8_t CC_id;
|
||||
int UE_id;
|
||||
uint16_t nCCE[MAX_NUM_CCs];
|
||||
int N_RBGS[MAX_NUM_CCs];
|
||||
int N_RBG[MAX_NUM_CCs];
|
||||
unsigned char aggregation;
|
||||
mac_rlc_status_resp_t rlc_status;
|
||||
unsigned char header_len_dcch=0, header_len_dcch_tmp=0,header_len_dtch=0,header_len_dtch_tmp=0, ta_len=0;
|
||||
unsigned char sdu_lcids[11],offset,num_sdus=0;
|
||||
uint16_t nb_rb,nb_rb_temp,nb_available_rb,TBS,j,sdu_lengths[11],rnti,padding=0,post_padding=0;
|
||||
uint16_t nb_rb,nb_rb_temp,total_nb_available_rb[MAX_NUM_CCs],nb_available_rb;
|
||||
uint16_t TBS,j,sdu_lengths[11],rnti,padding=0,post_padding=0;
|
||||
unsigned char dlsch_buffer[MAX_DLSCH_PAYLOAD_BYTES];
|
||||
unsigned char round = 0;
|
||||
unsigned char harq_pid = 0;
|
||||
void *DLSCH_dci = NULL;
|
||||
LTE_eNB_UE_stats *eNB_UE_stats = NULL;
|
||||
uint16_t sdu_length_total = 0;
|
||||
uint16_t sdu_length_total = 0;
|
||||
unsigned char DAI;
|
||||
int i;
|
||||
uint8_t dl_pow_off[MAX_NUM_CCs][NUMBER_OF_UE_MAX];
|
||||
unsigned char rballoc_sub_UE[MAX_NUM_CCs][NUMBER_OF_UE_MAX][N_RBGS_MAX];
|
||||
uint16_t pre_nb_available_rbs[MAX_NUM_CCs][NUMBER_OF_UE_MAX];
|
||||
int i = 0;
|
||||
uint8_t dl_pow_off[MAX_NUM_CCs][NUMBER_OF_UE_MAX];
|
||||
unsigned char rballoc_sub_UE[MAX_NUM_CCs][NUMBER_OF_UE_MAX][N_RBG_MAX];
|
||||
uint16_t pre_nb_available_rbs[MAX_NUM_CCs][NUMBER_OF_UE_MAX];
|
||||
int mcs;
|
||||
uint16_t min_rb_unit[MAX_NUM_CCs];
|
||||
uint16_t min_rb_unit[MAX_NUM_CCs];
|
||||
short ta_update = 0;
|
||||
eNB_MAC_INST *eNB = &eNB_mac_inst[module_idP];
|
||||
UE_list_t *UE_list = &eNB->UE_list;
|
||||
|
||||
reset_meas(&eNB->schedule_dlsch);
|
||||
LTE_DL_FRAME_PARMS *frame_parms[MAX_NUM_CCs];
|
||||
if (UE_list->head==-1)
|
||||
return;
|
||||
|
||||
for (CC_id=0;CC_id<MAX_NUM_CCs;CC_id++) {
|
||||
switch (PHY_vars_eNB_g[module_idP][CC_id]->lte_frame_parms.N_RB_DL) {
|
||||
case 6:
|
||||
min_rb_unit[CC_id]=1;
|
||||
break;
|
||||
case 25:
|
||||
min_rb_unit[CC_id]=2;
|
||||
break;
|
||||
case 50:
|
||||
min_rb_unit[CC_id]=3;
|
||||
break;
|
||||
case 100:
|
||||
min_rb_unit[CC_id]=4;
|
||||
break;
|
||||
default:
|
||||
min_rb_unit[CC_id]=2;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
start_meas(&eNB->schedule_dlsch);
|
||||
vcd_signal_dumper_dump_function_by_name(VCD_SIGNAL_DUMPER_FUNCTIONS_SCHEDULE_DLSCH,VCD_FUNCTION_IN);
|
||||
|
||||
//weight = get_ue_weight(module_idP,UE_id);
|
||||
aggregation = 1; // set to the maximum aggregation level
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
for (CC_id=0;CC_id<MAX_NUM_CCs;CC_id++) {
|
||||
|
||||
// set current available nb_rb and nCCE to maximum
|
||||
nb_available_rb = PHY_vars_eNB_g[module_idP][CC_id]->lte_frame_parms.N_RB_DL - nb_rb_used0[CC_id];
|
||||
|
||||
/// Initialization for pre-processor
|
||||
for(i=UE_list->head;i>=0;i=UE_list->next[i]){
|
||||
pre_nb_available_rbs[CC_id][i] = 0;
|
||||
dl_pow_off[CC_id][i] = 2;
|
||||
|
||||
for(j=0;j<PHY_vars_eNB_g[module_idP][CC_id]->lte_frame_parms.N_RBGS;j++){
|
||||
// rballoc_sub[j] = 0;
|
||||
rballoc_sub_UE[CC_id][i][j] = 0;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
for (i = UE_list->head; i>=0; i=UE_list->next[i]) {
|
||||
PHY_vars_eNB_g[module_idP][CC_id]->mu_mimo_mode[i].pre_nb_available_rbs = 0;
|
||||
for (j = 0; j < PHY_vars_eNB_g[module_idP][CC_id]->lte_frame_parms.N_RBGS; j++) {
|
||||
PHY_vars_eNB_g[module_idP][CC_id]->mu_mimo_mode[i].rballoc_sub[j] = 0;
|
||||
}
|
||||
}
|
||||
|
||||
min_rb_unit[CC_id]=get_min_rb_unit(module_idP,CC_id);
|
||||
frame_parms[CC_id] = mac_xface->get_lte_frame_parms(module_idP,CC_id);
|
||||
total_nb_available_rb[CC_id] = frame_parms[CC_id]->N_RB_DL - nb_rb_used0[CC_id];
|
||||
nCCE[CC_id] = mac_xface->get_nCCE_max(module_idP,CC_id) - nCCE_used[CC_id];
|
||||
N_RBGS[CC_id] = PHY_vars_eNB_g[module_idP][CC_id]->lte_frame_parms.N_RBGS;
|
||||
// store the goloabl enb stats
|
||||
eNB->eNB_stats.num_dlactive_UEs = UE_list->num_UEs;
|
||||
eNB->eNB_stats.available_prbs = nb_available_rb;
|
||||
eNB->eNB_stats.total_available_prbs += nb_available_rb;
|
||||
eNB->eNB_stats.available_ncces = nCCE[CC_id];
|
||||
eNB->eNB_stats.dlsch_bytes_tx=0;
|
||||
eNB->eNB_stats.dlsch_pdus_tx=0;
|
||||
N_RBG[CC_id] = frame_parms[CC_id]->N_RBG;
|
||||
|
||||
// store the global enb stats:
|
||||
eNB->eNB_stats[CC_id].num_dlactive_UEs = UE_list->num_UEs;
|
||||
eNB->eNB_stats[CC_id].available_prbs = total_nb_available_rb[CC_id];
|
||||
eNB->eNB_stats[CC_id].total_available_prbs += total_nb_available_rb[CC_id];
|
||||
eNB->eNB_stats[CC_id].available_ncces = nCCE[CC_id];
|
||||
eNB->eNB_stats[CC_id].dlsch_bytes_tx=0;
|
||||
eNB->eNB_stats[CC_id].dlsch_pdus_tx=0;
|
||||
}
|
||||
|
||||
/// CALLING Pre_Processor for downlink scheduling (Returns estimation of RBs required by each UE and the allocation on sub-band)
|
||||
|
||||
vcd_signal_dumper_dump_function_by_name(VCD_SIGNAL_DUMPER_FUNCTIONS_DLSCH_PREPROCESSOR,VCD_FUNCTION_IN);
|
||||
start_meas(&eNB->schedule_dlsch_preprocessor);
|
||||
printf("preprocessor in\n");
|
||||
dlsch_scheduler_pre_processor(module_idP,
|
||||
frameP,
|
||||
subframeP,
|
||||
dl_pow_off,
|
||||
pre_nb_available_rbs,
|
||||
N_RBGS,
|
||||
N_RBG,
|
||||
rballoc_sub_UE,
|
||||
mbsfn_flag);
|
||||
stop_meas(&eNB->schedule_dlsch_preprocessor);
|
||||
printf("preprocessor out\n");
|
||||
|
||||
vcd_signal_dumper_dump_function_by_name(VCD_SIGNAL_DUMPER_FUNCTIONS_DLSCH_PREPROCESSOR,VCD_FUNCTION_OUT);
|
||||
|
||||
for (CC_id=0;CC_id<MAX_NUM_CCs;CC_id++) {
|
||||
if (mbsfn_flag[CC_id]>0)
|
||||
continue;
|
||||
for (UE_id=UE_list->head;UE_id>=0;UE_id=UE_list->next[UE_id]) {
|
||||
|
||||
|
||||
|
||||
rnti = UE_RNTI(module_idP,UE_id);
|
||||
|
||||
printf("Scheduling UE %d for CC_id %d (rnti %x)\n",UE_id,CC_id,rnti);
|
||||
|
||||
UE_list->eNB_UE_stats[CC_id][UE_id].crnti= rnti;
|
||||
UE_list->eNB_UE_stats[CC_id][UE_id].rrc_status=mac_get_rrc_status(module_idP,1,UE_id);
|
||||
if (rnti==0) {
|
||||
LOG_E(MAC,"Cannot find rnti for UE_id %d (num_UEs %d)\n",UE_id,UE_list->num_UEs);
|
||||
mac_xface->macphy_exit("Cannot find rnti for UE_id");//continue;
|
||||
}
|
||||
|
||||
eNB_UE_stats = mac_xface->get_eNB_UE_stats(module_idP,CC_id,rnti);
|
||||
if (eNB_UE_stats==NULL)
|
||||
mac_xface->macphy_exit("[MAC][eNB] Cannot find eNB_UE_stats\n");
|
||||
|
||||
// Get candidate harq_pid from PHY
|
||||
mac_xface->get_ue_active_harq_pid(module_idP,CC_id,rnti,subframeP,&harq_pid,&round,0);
|
||||
printf("Got harq_pid %d, round %d\n",harq_pid,round);
|
||||
|
||||
|
||||
nb_available_rb = pre_nb_available_rbs[CC_id][UE_id];
|
||||
|
||||
if ((nb_available_rb == 0) || (nCCE[CC_id] < (1<<aggregation))) {
|
||||
LOG_D(MAC,"UE %d, CC_id %d: nb_availiable_rb exhausted (nb_rb_used %d, nb_available_rb %d, nCCE %d, aggregation %d)\n",
|
||||
UE_id, CC_id, nb_rb_used0[CC_id], nb_available_rb, nCCE[CC_id], aggregation);
|
||||
if (rnti==0) {
|
||||
LOG_N(MAC,"Cannot find rnti for UE_id %d (num_UEs %d)\n",UE_id,UE_list->num_UEs);
|
||||
// mac_xface->macphy_exit("Cannot find rnti for UE_id");
|
||||
continue;
|
||||
}
|
||||
if (eNB_UE_stats==NULL) {
|
||||
LOG_N(MAC,"[eNB] Cannot find eNB_UE_stats\n");
|
||||
// mac_xface->macphy_exit("[MAC][eNB] Cannot find eNB_UE_stats\n");
|
||||
continue;
|
||||
}
|
||||
if ((pre_nb_available_rbs[CC_id][UE_id] == 0) || (nCCE[CC_id] < (1<<aggregation))) {
|
||||
LOG_D(MAC,"[eNB %d] Frame %d : no RB allocated for UE %d on CC_id %d: continue \n",
|
||||
module_idP, frameP, UE_id, CC_id, nb_rb_used0[CC_id], pre_nb_available_rbs[CC_id][UE_id], nCCE[CC_id], aggregation);
|
||||
//if(mac_xface->get_transmission_mode(module_idP,rnti)==5)
|
||||
continue; //to next user (there might be rbs availiable for other UEs in TM5
|
||||
// else
|
||||
// break;
|
||||
}
|
||||
if (frame_parms[CC_id]->frame_type == TDD)
|
||||
set_ue_dai (subframeP,
|
||||
frame_parms[CC_id]->tdd_config,
|
||||
UE_id,
|
||||
CC_id,
|
||||
UE_list);
|
||||
|
||||
nb_available_rb = pre_nb_available_rbs[CC_id][UE_id];
|
||||
UE_list->eNB_UE_stats[CC_id][UE_id].crnti= rnti;
|
||||
UE_list->eNB_UE_stats[CC_id][UE_id].rrc_status=mac_get_rrc_status(module_idP,1,UE_id);
|
||||
mac_xface->get_ue_active_harq_pid(module_idP,CC_id,rnti,subframeP,&harq_pid,&round,0);
|
||||
UE_list->eNB_UE_stats[CC_id][UE_id].harq_pid = harq_pid;
|
||||
UE_list->eNB_UE_stats[CC_id][UE_id].harq_round = round;
|
||||
|
||||
sdu_length_total=0;
|
||||
num_sdus=0;
|
||||
|
||||
// get Round-Robin allocation
|
||||
|
||||
if (PHY_vars_eNB_g[module_idP][CC_id]->lte_frame_parms.frame_type == TDD) {
|
||||
switch (PHY_vars_eNB_g[module_idP][CC_id]->lte_frame_parms.tdd_config) {
|
||||
case 0:
|
||||
if ((subframeP==0)||(subframeP==1)||(subframeP==3)||(subframeP==5)||(subframeP==6)||(subframeP==8))
|
||||
UE_list->UE_template[CC_id][UE_id].DAI = 0;
|
||||
case 1:
|
||||
if ((subframeP==0)||(subframeP==4)||(subframeP==5)||(subframeP==9))
|
||||
UE_list->UE_template[CC_id][UE_id].DAI = 0;
|
||||
break;
|
||||
case 2:
|
||||
if ((subframeP==4)||(subframeP==5))
|
||||
UE_list->UE_template[CC_id][UE_id].DAI = 0;
|
||||
break;
|
||||
case 3:
|
||||
if ((subframeP==5)||(subframeP==7)||(subframeP==9))
|
||||
UE_list->UE_template[CC_id][UE_id].DAI = 0;
|
||||
break;
|
||||
case 4:
|
||||
if ((subframeP==0)||(subframeP==6))
|
||||
UE_list->UE_template[CC_id][UE_id].DAI = 0;
|
||||
break;
|
||||
case 5:
|
||||
if (subframeP==9)
|
||||
UE_list->UE_template[CC_id][UE_id].DAI = 0;
|
||||
break;
|
||||
case 6:
|
||||
if ((subframeP==0)||(subframeP==1)||(subframeP==5)||(subframeP==6)||(subframeP==9))
|
||||
UE_list->UE_template[CC_id][UE_id].DAI = 0;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
// This is an allocated UE_id
|
||||
rnti = UE_RNTI(module_idP,UE_id);
|
||||
if (rnti==0)
|
||||
continue;
|
||||
|
||||
eNB_UE_stats = mac_xface->get_eNB_UE_stats(module_idP,CC_id,rnti);
|
||||
|
||||
if (eNB_UE_stats==NULL)
|
||||
mac_xface->macphy_exit("[MAC][eNB] Cannot find eNB_UE_stats\n");
|
||||
|
||||
if (openair_daq_vars.target_ue_dl_mcs <= 0) {
|
||||
/*
|
||||
DevCheck(((eNB_UE_stats->DL_cqi[0] < MIN_CQI_VALUE) || (eNB_UE_stats->DL_cqi[0] > MAX_CQI_VALUE)),
|
||||
eNB_UE_stats->DL_cqi[0], MIN_CQI_VALUE, MAX_CQI_VALUE);
|
||||
*/
|
||||
eNB_UE_stats->dlsch_mcs1 = cqi_to_mcs[eNB_UE_stats->DL_cqi[0]];
|
||||
LOG_T(MAC,"CQI %d\n",eNB_UE_stats->DL_cqi[0]);
|
||||
}
|
||||
else
|
||||
eNB_UE_stats->dlsch_mcs1 = openair_daq_vars.target_ue_dl_mcs;
|
||||
|
||||
|
||||
if(eNB_UE_stats->dlsch_mcs1>22)
|
||||
eNB_UE_stats->dlsch_mcs1=22;
|
||||
|
||||
|
||||
// for TM5, limit the MCS to 16QAM
|
||||
|
||||
|
||||
// for EXMIMO, limit the MCS to 16QAM as well
|
||||
|
||||
#ifdef EXMIMO
|
||||
eNB_UE_stats->dlsch_mcs1 = cmin(eNB_UE_stats->dlsch_mcs1,16);
|
||||
if (mac_xface->get_transmission_mode(module_idP,CC_id, rnti)==5)
|
||||
eNB_UE_stats->dlsch_mcs1 = cmin(eNB_UE_stats->dlsch_mcs1,16);
|
||||
#endif
|
||||
|
||||
// Get candidate harq_pid from PHY
|
||||
mac_xface->get_ue_active_harq_pid(module_idP,CC_id,rnti,subframeP,&harq_pid,&round,0);
|
||||
|
||||
UE_list->eNB_UE_stats[CC_id][UE_id].harq_pid = harq_pid;
|
||||
UE_list->eNB_UE_stats[CC_id][UE_id].harq_round = round;
|
||||
// store stats
|
||||
UE_list->eNB_UE_stats[CC_id][UE_id].dl_cqi= eNB_UE_stats->DL_cqi[0];
|
||||
// initializing the rb allocation indicator for each UE
|
||||
for(j=0;j<frame_parms[CC_id]->N_RBG;j++){
|
||||
UE_list->UE_template[CC_id][UE_id].rballoc_subband[harq_pid][j] = 0;
|
||||
}
|
||||
|
||||
LOG_D(MAC,"[eNB %d] Frame %d: Scheduling UE %d on CC_id %d (rnti %x, harq_pid %d, round %d, available rb %d, cqi %d, mcs %d, rrc status %d)\n",
|
||||
module_idP, frameP, UE_id,CC_id,rnti,harq_pid, round,nb_available_rb,
|
||||
eNB_UE_stats->DL_cqi[0], eNB_UE_stats->dlsch_mcs1,
|
||||
UE_list->eNB_UE_stats[CC_id][UE_id].rrc_status);
|
||||
|
||||
|
||||
// Note this code is for a specific DCI format
|
||||
DLSCH_dci = (void *)UE_list->UE_template[CC_id][UE_id].DLSCH_DCI[harq_pid];
|
||||
|
||||
for(j=0;j<PHY_vars_eNB_g[module_idP][CC_id]->lte_frame_parms.N_RBGS;j++){ // initializing the rb allocation indicator for each UE
|
||||
UE_list->UE_template[CC_id][UE_id].rballoc_subband[harq_pid][j] = 0;
|
||||
}
|
||||
// store stats
|
||||
UE_list->eNB_UE_stats[CC_id][UE_id].dl_cqi= eNB_UE_stats->DL_cqi[0];
|
||||
|
||||
|
||||
/* process retransmission */
|
||||
|
||||
if (round > 0) {
|
||||
if (PHY_vars_eNB_g[module_idP][CC_id]->lte_frame_parms.frame_type == TDD) {
|
||||
|
||||
if (frame_parms[CC_id]->frame_type == TDD) {
|
||||
UE_list->UE_template[CC_id][UE_id].DAI++;
|
||||
LOG_D(MAC,"DAI update: subframeP %d: UE %d, DAI %d\n",subframeP,UE_id,UE_list->UE_template[CC_id][UE_id].DAI);
|
||||
|
||||
update_ul_dci(module_idP,CC_id,rnti,UE_list->UE_template[CC_id][UE_id].DAI);
|
||||
LOG_D(MAC,"DAI update: subframeP %d: UE %d, DAI %d\n",
|
||||
subframeP,UE_id,UE_list->UE_template[CC_id][UE_id].DAI);
|
||||
}
|
||||
|
||||
// get freq_allocation
|
||||
@@ -536,26 +455,25 @@ void schedule_ue_spec(module_id_t module_idP,
|
||||
if (nb_rb <= nb_available_rb) {
|
||||
|
||||
if(nb_rb == pre_nb_available_rbs[CC_id][UE_id]){
|
||||
for(j=0;j<PHY_vars_eNB_g[module_idP][CC_id]->lte_frame_parms.N_RBGS;j++) // for indicating the rballoc for each sub-band
|
||||
UE_list->UE_template[CC_id][UE_id].rballoc_subband[harq_pid][j] = rballoc_sub_UE[CC_id][UE_id][j];}
|
||||
else
|
||||
{
|
||||
nb_rb_temp = nb_rb;
|
||||
j = 0;
|
||||
while((nb_rb_temp > 0) && (j<PHY_vars_eNB_g[module_idP][CC_id]->lte_frame_parms.N_RBGS)){
|
||||
if(rballoc_sub_UE[CC_id][UE_id][j] == 1){
|
||||
UE_list->UE_template[CC_id][UE_id].rballoc_subband[harq_pid][j] = rballoc_sub_UE[CC_id][UE_id][j];
|
||||
if((j == PHY_vars_eNB_g[module_idP][CC_id]->lte_frame_parms.N_RBGS-1) &&
|
||||
((PHY_vars_eNB_g[module_idP][CC_id]->lte_frame_parms.N_RB_DL == 25)||
|
||||
(PHY_vars_eNB_g[module_idP][CC_id]->lte_frame_parms.N_RB_DL == 50)))
|
||||
nb_rb_temp = nb_rb_temp - min_rb_unit[CC_id]+1;
|
||||
else
|
||||
nb_rb_temp = nb_rb_temp - min_rb_unit[CC_id];
|
||||
}
|
||||
j = j+1;
|
||||
for(j=0;j<frame_parms[CC_id]->N_RBG;j++) // for indicating the rballoc for each sub-band
|
||||
UE_list->UE_template[CC_id][UE_id].rballoc_subband[harq_pid][j] = rballoc_sub_UE[CC_id][UE_id][j];
|
||||
} else {
|
||||
nb_rb_temp = nb_rb;
|
||||
j = 0;
|
||||
while((nb_rb_temp > 0) && (j<frame_parms[CC_id]->N_RBG)){
|
||||
if(rballoc_sub_UE[CC_id][UE_id][j] == 1){
|
||||
UE_list->UE_template[CC_id][UE_id].rballoc_subband[harq_pid][j] = rballoc_sub_UE[CC_id][UE_id][j];
|
||||
if((j == frame_parms[CC_id]->N_RBG-1) &&
|
||||
((frame_parms[CC_id]->N_RB_DL == 25)||
|
||||
(frame_parms[CC_id]->N_RB_DL == 50)))
|
||||
nb_rb_temp = nb_rb_temp - min_rb_unit[CC_id]+1;
|
||||
else
|
||||
nb_rb_temp = nb_rb_temp - min_rb_unit[CC_id];
|
||||
}
|
||||
j = j+1;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
nb_available_rb -= nb_rb;
|
||||
aggregation = process_ue_cqi(module_idP,UE_id);
|
||||
nCCE[CC_id]-=(1<<aggregation); // adjust the remaining nCCE
|
||||
@@ -564,17 +482,16 @@ void schedule_ue_spec(module_id_t module_idP,
|
||||
|
||||
PHY_vars_eNB_g[module_idP][CC_id]->mu_mimo_mode[UE_id].pre_nb_available_rbs = nb_rb;
|
||||
PHY_vars_eNB_g[module_idP][CC_id]->mu_mimo_mode[UE_id].dl_pow_off = dl_pow_off[CC_id][UE_id];
|
||||
|
||||
for(j=0;j<PHY_vars_eNB_g[module_idP][CC_id]->lte_frame_parms.N_RBGS;j++)
|
||||
for(j=0;j<frame_parms[CC_id]->N_RBG;j++)
|
||||
PHY_vars_eNB_g[module_idP][CC_id]->mu_mimo_mode[UE_id].rballoc_sub[j] = UE_list->UE_template[CC_id][UE_id].rballoc_subband[harq_pid][j];
|
||||
|
||||
switch (mac_xface->get_transmission_mode(module_idP,CC_id,rnti)) {
|
||||
case 1:
|
||||
case 2:
|
||||
default:
|
||||
switch (PHY_vars_eNB_g[module_idP][CC_id]->lte_frame_parms.N_RB_DL) {
|
||||
switch (frame_parms[CC_id]->N_RB_DL) {
|
||||
case 6:
|
||||
if (PHY_vars_eNB_g[module_idP][CC_id]->lte_frame_parms.frame_type == TDD) {
|
||||
if (frame_parms[CC_id]->frame_type == TDD) {
|
||||
// ((DCI1_1_5MHz_TDD_t*)DLSCH_dci)->ndi = 0;
|
||||
((DCI1_1_5MHz_TDD_t*)DLSCH_dci)->harq_pid = harq_pid;
|
||||
((DCI1_1_5MHz_TDD_t*)DLSCH_dci)->rv = round&3;
|
||||
@@ -590,7 +507,7 @@ void schedule_ue_spec(module_id_t module_idP,
|
||||
}
|
||||
break;
|
||||
case 25:
|
||||
if (PHY_vars_eNB_g[module_idP][CC_id]->lte_frame_parms.frame_type == TDD) {
|
||||
if (frame_parms[CC_id]->frame_type == TDD) {
|
||||
// ((DCI1_5MHz_TDD_t*)DLSCH_dci)->ndi = 0;
|
||||
((DCI1_5MHz_TDD_t*)DLSCH_dci)->harq_pid = harq_pid;
|
||||
((DCI1_5MHz_TDD_t*)DLSCH_dci)->rv = round&3;
|
||||
@@ -606,7 +523,7 @@ void schedule_ue_spec(module_id_t module_idP,
|
||||
}
|
||||
break;
|
||||
case 50:
|
||||
if (PHY_vars_eNB_g[module_idP][CC_id]->lte_frame_parms.frame_type == TDD) {
|
||||
if (frame_parms[CC_id]->frame_type == TDD) {
|
||||
// ((DCI1_10MHz_TDD_t*)DLSCH_dci)->ndi = 0;
|
||||
((DCI1_10MHz_TDD_t*)DLSCH_dci)->harq_pid = harq_pid;
|
||||
((DCI1_10MHz_TDD_t*)DLSCH_dci)->rv = round&3;
|
||||
@@ -622,7 +539,7 @@ void schedule_ue_spec(module_id_t module_idP,
|
||||
}
|
||||
break;
|
||||
case 100:
|
||||
if (PHY_vars_eNB_g[module_idP][CC_id]->lte_frame_parms.frame_type == TDD) {
|
||||
if (frame_parms[CC_id]->frame_type == TDD) {
|
||||
// ((DCI1_20MHz_TDD_t*)DLSCH_dci)->ndi = 0;
|
||||
((DCI1_20MHz_TDD_t*)DLSCH_dci)->harq_pid = harq_pid;
|
||||
((DCI1_20MHz_TDD_t*)DLSCH_dci)->rv = round&3;
|
||||
@@ -687,13 +604,11 @@ void schedule_ue_spec(module_id_t module_idP,
|
||||
UE_list->eNB_UE_stats[CC_id][UE_id].dlsch_mcs1=eNB_UE_stats->dlsch_mcs1;
|
||||
UE_list->eNB_UE_stats[CC_id][UE_id].dlsch_mcs2=eNB_UE_stats->dlsch_mcs1;
|
||||
}
|
||||
else { // don't schedule this UE, its retransmission takes more resources than we have
|
||||
|
||||
else {
|
||||
LOG_D(MAC,"[eNB %d] Frame %d : don't schedule UE %d, its retransmission takes more resources than we have\n", module_idP, frameP, UE_id);
|
||||
}
|
||||
}
|
||||
else { // This is a potentially new SDU opportunity
|
||||
|
||||
// calculate mcs
|
||||
else { /* This is a potentially new SDU opportunity */
|
||||
|
||||
rlc_status.bytes_in_buffer = 0;
|
||||
// Now check RLC information to compute number of required RBs
|
||||
@@ -859,19 +774,19 @@ void schedule_ue_spec(module_id_t module_idP,
|
||||
}
|
||||
|
||||
if(nb_rb == pre_nb_available_rbs[CC_id][UE_id]) {
|
||||
for(j=0;j<PHY_vars_eNB_g[module_idP][CC_id]->lte_frame_parms.N_RBGS;j++) {// for indicating the rballoc for each sub-band
|
||||
for(j=0;j<frame_parms[CC_id]->N_RBG;j++) {// for indicating the rballoc for each sub-band
|
||||
UE_list->UE_template[CC_id][UE_id].rballoc_subband[harq_pid][j] = rballoc_sub_UE[CC_id][UE_id][j];
|
||||
}
|
||||
} else
|
||||
{
|
||||
nb_rb_temp = nb_rb;
|
||||
j = 0;
|
||||
while((nb_rb_temp > 0) && (j<PHY_vars_eNB_g[module_idP][CC_id]->lte_frame_parms.N_RBGS)){
|
||||
while((nb_rb_temp > 0) && (j<frame_parms[CC_id]->N_RBG)){
|
||||
if(rballoc_sub_UE[CC_id][UE_id][j] == 1){
|
||||
UE_list->UE_template[CC_id][UE_id].rballoc_subband[harq_pid][j] = rballoc_sub_UE[CC_id][UE_id][j];
|
||||
if ((j == PHY_vars_eNB_g[module_idP][CC_id]->lte_frame_parms.N_RBGS-1) &&
|
||||
((PHY_vars_eNB_g[module_idP][CC_id]->lte_frame_parms.N_RB_DL == 25)||
|
||||
(PHY_vars_eNB_g[module_idP][CC_id]->lte_frame_parms.N_RB_DL == 50)))
|
||||
if ((j == frame_parms[CC_id]->N_RBG-1) &&
|
||||
((frame_parms[CC_id]->N_RB_DL == 25)||
|
||||
(frame_parms[CC_id]->N_RB_DL == 50)))
|
||||
nb_rb_temp = nb_rb_temp - min_rb_unit[CC_id]+1;
|
||||
else
|
||||
nb_rb_temp = nb_rb_temp - min_rb_unit[CC_id];
|
||||
@@ -883,7 +798,7 @@ void schedule_ue_spec(module_id_t module_idP,
|
||||
PHY_vars_eNB_g[module_idP][CC_id]->mu_mimo_mode[UE_id].pre_nb_available_rbs = nb_rb;
|
||||
PHY_vars_eNB_g[module_idP][CC_id]->mu_mimo_mode[UE_id].dl_pow_off = dl_pow_off[CC_id][UE_id];
|
||||
|
||||
for(j=0;j<PHY_vars_eNB_g[module_idP][CC_id]->lte_frame_parms.N_RBGS;j++)
|
||||
for(j=0;j<frame_parms[CC_id]->N_RBG;j++)
|
||||
PHY_vars_eNB_g[module_idP][CC_id]->mu_mimo_mode[UE_id].rballoc_sub[j] = UE_list->UE_template[CC_id][UE_id].rballoc_subband[harq_pid][j];
|
||||
|
||||
|
||||
@@ -939,9 +854,9 @@ void schedule_ue_spec(module_id_t module_idP,
|
||||
padding,
|
||||
post_padding);
|
||||
//#ifdef DEBUG_eNB_SCHEDULER
|
||||
LOG_I(MAC,"[eNB %d][USER-PLANE DEFAULT DRB] Generate header : sdu_length_total %d, num_sdus %d, sdu_lengths[0] %d, sdu_lcids[0] %d => payload offset %d,timing advance value : %d, UE_id %d,padding %d,post_padding %d,(mcs %d, TBS %d, nb_rb %d),header_dcch %d, header_dtch %d\n",
|
||||
module_idP,sdu_length_total,num_sdus,sdu_lengths[0],sdu_lcids[0],offset,
|
||||
ta_len,UE_id,padding,post_padding,mcs,TBS,nb_rb,header_len_dcch,header_len_dtch);
|
||||
LOG_I(MAC,"[eNB %d][DLSCH] Frame %d Generate header for UE_id %d on CC_id %d: sdu_length_total %d, num_sdus %d, sdu_lengths[0] %d, sdu_lcids[0] %d => payload offset %d,timing advance value : %d, padding %d,post_padding %d,(mcs %d, TBS %d, nb_rb %d),header_dcch %d, header_dtch %d\n",
|
||||
module_idP,frameP, UE_id, CC_id, sdu_length_total,num_sdus,sdu_lengths[0],sdu_lcids[0],offset,
|
||||
ta_len,padding,post_padding,mcs,TBS,nb_rb,header_len_dcch,header_len_dtch);
|
||||
//#endif
|
||||
|
||||
LOG_T(MAC,"[eNB %d] First 16 bytes of DLSCH : \n");
|
||||
@@ -979,8 +894,8 @@ void schedule_ue_spec(module_id_t module_idP,
|
||||
subframeP,
|
||||
S_DL_SCHEDULED);
|
||||
// store stats
|
||||
eNB->eNB_stats.dlsch_bytes_tx+=sdu_length_total;
|
||||
eNB->eNB_stats.dlsch_pdus_tx+=1;
|
||||
eNB->eNB_stats[CC_id].dlsch_bytes_tx+=sdu_length_total;
|
||||
eNB->eNB_stats[CC_id].dlsch_pdus_tx+=1;
|
||||
|
||||
UE_list->eNB_UE_stats[CC_id][UE_id].rbs_used = nb_rb;
|
||||
UE_list->eNB_UE_stats[CC_id][UE_id].total_rbs_used += nb_rb;
|
||||
@@ -994,7 +909,7 @@ void schedule_ue_spec(module_id_t module_idP,
|
||||
UE_list->eNB_UE_stats[CC_id][UE_id].total_pdu_bytes+= TBS;
|
||||
UE_list->eNB_UE_stats[CC_id][UE_id].total_num_pdus+=1;
|
||||
|
||||
if (PHY_vars_eNB_g[module_idP][CC_id]->lte_frame_parms.frame_type == TDD) {
|
||||
if (frame_parms[CC_id]->frame_type == TDD) {
|
||||
UE_list->UE_template[CC_id][UE_id].DAI++;
|
||||
// printf("DAI update: subframeP %d: UE %d, DAI %d\n",subframeP,UE_id,UE_list->UE_template[CC_id][UE_id].DAI);
|
||||
#warning only for 5MHz channel
|
||||
@@ -1005,8 +920,8 @@ void schedule_ue_spec(module_id_t module_idP,
|
||||
case 1:
|
||||
case 2:
|
||||
default:
|
||||
if (PHY_vars_eNB_g[module_idP][CC_id]->lte_frame_parms.frame_type == TDD) {
|
||||
switch (PHY_vars_eNB_g[module_idP][CC_id]->lte_frame_parms.N_RB_DL) {
|
||||
if (frame_parms[CC_id]->frame_type == TDD) {
|
||||
switch (frame_parms[CC_id]->N_RB_DL) {
|
||||
case 6:
|
||||
((DCI1_1_5MHz_TDD_t*)DLSCH_dci)->mcs = mcs;
|
||||
((DCI1_1_5MHz_TDD_t*)DLSCH_dci)->harq_pid = harq_pid;
|
||||
@@ -1046,7 +961,7 @@ void schedule_ue_spec(module_id_t module_idP,
|
||||
}
|
||||
}
|
||||
else {
|
||||
switch (PHY_vars_eNB_g[module_idP][CC_id]->lte_frame_parms.N_RB_DL) {
|
||||
switch (frame_parms[CC_id]->N_RB_DL) {
|
||||
case 6:
|
||||
((DCI1_1_5MHz_FDD_t*)DLSCH_dci)->mcs = mcs;
|
||||
((DCI1_1_5MHz_FDD_t*)DLSCH_dci)->harq_pid = harq_pid;
|
||||
@@ -1130,12 +1045,12 @@ void schedule_ue_spec(module_id_t module_idP,
|
||||
|
||||
}
|
||||
}
|
||||
if (PHY_vars_eNB_g[module_idP][CC_id]->lte_frame_parms.frame_type == TDD) {
|
||||
if (frame_parms[CC_id]->frame_type == TDD) {
|
||||
DAI = (UE_list->UE_template[CC_id][UE_id].DAI-1)&3;
|
||||
LOG_D(MAC,"[eNB %d] Frame %d: DAI %d for UE %d\n",module_idP,frameP,DAI,UE_id);
|
||||
// Save DAI for Format 0 DCI
|
||||
|
||||
switch (PHY_vars_eNB_g[module_idP][CC_id]->lte_frame_parms.tdd_config) {
|
||||
switch (frame_parms[CC_id]->tdd_config) {
|
||||
case 0:
|
||||
// if ((subframeP==0)||(subframeP==1)||(subframeP==5)||(subframeP==6))
|
||||
break;
|
||||
@@ -1185,7 +1100,8 @@ void schedule_ue_spec(module_id_t module_idP,
|
||||
//printf("MAC nCCE : %d\n",*nCCE_used);
|
||||
|
||||
|
||||
stop_meas(&eNB->schedule_dlsch);
|
||||
stop_meas(&eNB->schedule_dlsch);
|
||||
vcd_signal_dumper_dump_function_by_name(VCD_SIGNAL_DUMPER_FUNCTIONS_SCHEDULE_DLSCH,VCD_FUNCTION_OUT);
|
||||
|
||||
}
|
||||
|
||||
@@ -1196,7 +1112,7 @@ void fill_DLSCH_dci(module_id_t module_idP,frame_t frameP, sub_frame_t subframeP
|
||||
uint8_t first_rb,nb_rb=3;
|
||||
rnti_t rnti;
|
||||
unsigned char vrb_map[100];
|
||||
uint8_t rballoc_sub[25];
|
||||
uint8_t rballoc_sub[25];
|
||||
//uint8_t number_of_subbands=13;
|
||||
uint32_t *rballoc=RBallocP;
|
||||
|
||||
@@ -1214,7 +1130,7 @@ void fill_DLSCH_dci(module_id_t module_idP,frame_t frameP, sub_frame_t subframeP
|
||||
|
||||
|
||||
start_meas(&eNB->fill_DLSCH_dci);
|
||||
|
||||
vcd_signal_dumper_dump_function_by_name(VCD_SIGNAL_DUMPER_FUNCTIONS_FILL_DLSCH_DCI,VCD_FUNCTION_IN);
|
||||
for (CC_id=0;CC_id<MAX_NUM_CCs;CC_id++) {
|
||||
|
||||
if (mbsfn_flagP[CC_id]>0)
|
||||
@@ -1788,7 +1704,7 @@ void fill_DLSCH_dci(module_id_t module_idP,frame_t frameP, sub_frame_t subframeP
|
||||
|
||||
|
||||
/// Synchronizing rballoc with rballoc_sub
|
||||
for(i=0;i<PHY_vars_eNB_g[module_idP][CC_id]->lte_frame_parms.N_RBGS;i++){
|
||||
for(i=0;i<PHY_vars_eNB_g[module_idP][CC_id]->lte_frame_parms.N_RBG;i++){
|
||||
rballoc_sub[i] = UE_list->UE_template[CC_id][UE_id].rballoc_subband[harq_pid][i];
|
||||
if(rballoc_sub[i] == 1)
|
||||
rballoc[CC_id] |= (0x0001<<i); // TO be FIXED!!!!!!
|
||||
@@ -1943,6 +1859,7 @@ void fill_DLSCH_dci(module_id_t module_idP,frame_t frameP, sub_frame_t subframeP
|
||||
|
||||
}
|
||||
stop_meas(&eNB->fill_DLSCH_dci);
|
||||
vcd_signal_dumper_dump_function_by_name(VCD_SIGNAL_DUMPER_FUNCTIONS_FILL_DLSCH_DCI,VCD_FUNCTION_OUT);
|
||||
}
|
||||
|
||||
unsigned char *get_dlsch_sdu(module_id_t module_idP, int CC_id, frame_t frameP, rnti_t rntiP, uint8_t TBindex) {
|
||||
@@ -1954,8 +1871,7 @@ unsigned char *get_dlsch_sdu(module_id_t module_idP, int CC_id, frame_t frameP,
|
||||
LOG_D(MAC,"[eNB %d] Frame %d Get DLSCH sdu for BCCH \n",module_idP,frameP);
|
||||
|
||||
return((unsigned char *)&eNB->common_channels[CC_id].BCCH_pdu.payload[0]);
|
||||
}
|
||||
else if ((UE_id = find_UE_id(module_idP,rntiP)) != UE_INDEX_INVALID ){
|
||||
} else if ((UE_id = find_UE_id(module_idP,rntiP)) != UE_INDEX_INVALID ){
|
||||
LOG_D(MAC,"[eNB %d] Frame %d: CC_id %d Get DLSCH sdu for rnti %x => UE_id %d\n",module_idP,frameP,CC_id,rntiP,UE_id);
|
||||
return((unsigned char *)&eNB->UE_list.DLSCH_pdu[CC_id][TBindex][UE_id].payload[0]);
|
||||
} else {
|
||||
@@ -1964,3 +1880,61 @@ unsigned char *get_dlsch_sdu(module_id_t module_idP, int CC_id, frame_t frameP,
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
void update_ul_dci(module_id_t module_idP,uint8_t CC_id,rnti_t rnti,uint8_t dai) {
|
||||
|
||||
DCI_PDU *DCI_pdu = &eNB_mac_inst[module_idP].common_channels[CC_id].DCI_pdu;
|
||||
int i;
|
||||
DCI0_5MHz_TDD_1_6_t *ULSCH_dci = NULL;;
|
||||
|
||||
if (mac_xface->lte_frame_parms->frame_type == TDD) {
|
||||
for (i=0;i<DCI_pdu->Num_common_dci+DCI_pdu->Num_ue_spec_dci;i++) {
|
||||
ULSCH_dci = (DCI0_5MHz_TDD_1_6_t *)DCI_pdu->dci_alloc[i].dci_pdu;
|
||||
if ((DCI_pdu->dci_alloc[i].format == format0) && (DCI_pdu->dci_alloc[i].rnti == rnti))
|
||||
ULSCH_dci->dai = (dai-1)&3;
|
||||
}
|
||||
}
|
||||
// printf("Update UL DCI: DAI %d\n",dai);
|
||||
}
|
||||
|
||||
|
||||
void set_ue_dai(sub_frame_t subframeP,
|
||||
uint8_t tdd_config,
|
||||
int UE_id,
|
||||
uint8_t CC_id,
|
||||
UE_list_t *UE_list) {
|
||||
|
||||
switch (tdd_config) {
|
||||
case 0:
|
||||
if ((subframeP==0)||(subframeP==1)||(subframeP==3)||(subframeP==5)||(subframeP==6)||(subframeP==8))
|
||||
UE_list->UE_template[CC_id][UE_id].DAI = 0;
|
||||
case 1:
|
||||
if ((subframeP==0)||(subframeP==4)||(subframeP==5)||(subframeP==9))
|
||||
UE_list->UE_template[CC_id][UE_id].DAI = 0;
|
||||
break;
|
||||
case 2:
|
||||
if ((subframeP==4)||(subframeP==5))
|
||||
UE_list->UE_template[CC_id][UE_id].DAI = 0;
|
||||
break;
|
||||
case 3:
|
||||
if ((subframeP==5)||(subframeP==7)||(subframeP==9))
|
||||
UE_list->UE_template[CC_id][UE_id].DAI = 0;
|
||||
break;
|
||||
case 4:
|
||||
if ((subframeP==0)||(subframeP==6))
|
||||
UE_list->UE_template[CC_id][UE_id].DAI = 0;
|
||||
break;
|
||||
case 5:
|
||||
if (subframeP==9)
|
||||
UE_list->UE_template[CC_id][UE_id].DAI = 0;
|
||||
break;
|
||||
case 6:
|
||||
if ((subframeP==0)||(subframeP==1)||(subframeP==5)||(subframeP==6)||(subframeP==9))
|
||||
UE_list->UE_template[CC_id][UE_id].DAI = 0;
|
||||
default:
|
||||
UE_list->UE_template[CC_id][UE_id].DAI = 0;
|
||||
LOG_N(MAC,"unknow TDD config %d\n",tdd_config);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -72,13 +72,13 @@
|
||||
extern inline unsigned int taus(void);
|
||||
|
||||
#ifdef Rel10
|
||||
int8_t get_mbsfn_sf_alloction (module_id_t module_idP, uint8_t mbsfn_sync_area){
|
||||
int8_t get_mbsfn_sf_alloction (module_id_t module_idP, uint8_t CC_id, uint8_t mbsfn_sync_area){
|
||||
// currently there is one-to-one mapping between sf allocation pattern and sync area
|
||||
if (mbsfn_sync_area > MAX_MBSFN_AREA){
|
||||
LOG_W(MAC,"[eNB %d] MBSFN synchronization area %d out of range\n ", module_idP, mbsfn_sync_area);
|
||||
return -1;
|
||||
}
|
||||
else if (eNB_mac_inst[module_idP].mbsfn_SubframeConfig[mbsfn_sync_area] != NULL)
|
||||
else if (eNB_mac_inst[module_idP].common_channels[CC_id].mbsfn_SubframeConfig[mbsfn_sync_area] != NULL)
|
||||
return mbsfn_sync_area;
|
||||
else {
|
||||
LOG_W(MAC,"[eNB %d] MBSFN Subframe Config pattern %d not found \n ", module_idP, mbsfn_sync_area);
|
||||
@@ -86,12 +86,12 @@ int8_t get_mbsfn_sf_alloction (module_id_t module_idP, uint8_t mbsfn_sync_area){
|
||||
}
|
||||
}
|
||||
|
||||
int schedule_MBMS(module_id_t module_idP, frame_t frameP, sub_frame_t subframeP) {
|
||||
int schedule_MBMS(module_id_t module_idP, uint8_t CC_id, frame_t frameP, sub_frame_t subframeP) {
|
||||
|
||||
int mcch_flag=0,mtch_flag=0, msi_flag=0;
|
||||
int mbsfn_period =0;// 1<<(eNB_mac_inst[module_idP].mbsfn_SubframeConfig[0]->radioframeAllocationPeriod);
|
||||
int mcch_period = 0;//32<<(eNB_mac_inst[module_idP].mbsfn_AreaInfo[0]->mcch_Config_r9.mcch_RepetitionPeriod_r9);
|
||||
int mch_scheduling_period = 8<<(eNB_mac_inst[module_idP].pmch_Config[0]->mch_SchedulingPeriod_r9);
|
||||
int mch_scheduling_period = 8<<(eNB_mac_inst[module_idP].common_channels[CC_id].pmch_Config[0]->mch_SchedulingPeriod_r9);
|
||||
unsigned char mcch_sdu_length;
|
||||
unsigned char header_len_mcch=0,header_len_msi=0,header_len_mtch=0, header_len_mtch_temp=0, header_len_mcch_temp=0, header_len_msi_temp=0;
|
||||
int ii=0, msi_pos=0;
|
||||
@@ -104,24 +104,24 @@ int schedule_MBMS(module_id_t module_idP, frame_t frameP, sub_frame_t subframeP)
|
||||
uint16_t sdu_lengths[11], sdu_length_total=0;
|
||||
unsigned char mch_buffer[MAX_DLSCH_PAYLOAD_BYTES]; // check the max value, this is for dlsch only
|
||||
|
||||
eNB_mac_inst[module_idP].MCH_pdu.Pdu_size=0;
|
||||
eNB_mac_inst[module_idP].common_channels[CC_id].MCH_pdu.Pdu_size=0;
|
||||
|
||||
for (i=0;
|
||||
i< eNB_mac_inst[module_idP].num_active_mbsfn_area;
|
||||
i< eNB_mac_inst[module_idP].common_channels[CC_id].num_active_mbsfn_area;
|
||||
i++ ){
|
||||
// assume, that there is always a mapping
|
||||
if ((j=get_mbsfn_sf_alloction(module_idP,i)) == -1)
|
||||
if ((j=get_mbsfn_sf_alloction(module_idP,CC_id,i)) == -1)
|
||||
return 0;
|
||||
|
||||
mbsfn_period = 1<<(eNB_mac_inst[module_idP].mbsfn_SubframeConfig[j]->radioframeAllocationPeriod);
|
||||
mcch_period = 32<<(eNB_mac_inst[module_idP].mbsfn_AreaInfo[i]->mcch_Config_r9.mcch_RepetitionPeriod_r9);
|
||||
mbsfn_period = 1<<(eNB_mac_inst[module_idP].common_channels[CC_id].mbsfn_SubframeConfig[j]->radioframeAllocationPeriod);
|
||||
mcch_period = 32<<(eNB_mac_inst[module_idP].common_channels[CC_id].mbsfn_AreaInfo[i]->mcch_Config_r9.mcch_RepetitionPeriod_r9);
|
||||
msi_pos=0; ii=0;
|
||||
LOG_D(MAC,"[eNB %d] Frame %d subframeP %d : Checking MBSFN Sync Area %d/%d with SF allocation %d/%d for MCCH and MTCH (mbsfn period %d, mcch period %d)\n",
|
||||
module_idP,frameP, subframeP,i,eNB_mac_inst[module_idP].num_active_mbsfn_area,
|
||||
j,eNB_mac_inst[module_idP].num_sf_allocation_pattern,mbsfn_period,mcch_period);
|
||||
module_idP,frameP, subframeP,i,eNB_mac_inst[module_idP].common_channels[CC_id].num_active_mbsfn_area,
|
||||
j,eNB_mac_inst[module_idP].common_channels[CC_id].num_sf_allocation_pattern,mbsfn_period,mcch_period);
|
||||
|
||||
|
||||
switch (eNB_mac_inst[module_idP].mbsfn_AreaInfo[i]->mcch_Config_r9.signallingMCS_r9) {
|
||||
switch (eNB_mac_inst[module_idP].common_channels[CC_id].mbsfn_AreaInfo[i]->mcch_Config_r9.signallingMCS_r9) {
|
||||
case 0:
|
||||
mcch_mcs = 2;
|
||||
break;
|
||||
@@ -137,27 +137,27 @@ int schedule_MBMS(module_id_t module_idP, frame_t frameP, sub_frame_t subframeP)
|
||||
}
|
||||
|
||||
// 1st: Check the MBSFN subframes from SIB2 info (SF allocation pattern i, max 8 non-overlapping patterns exist)
|
||||
if (frameP % mbsfn_period == eNB_mac_inst[module_idP].mbsfn_SubframeConfig[j]->radioframeAllocationOffset){ // MBSFN frameP
|
||||
if (eNB_mac_inst[module_idP].mbsfn_SubframeConfig[j]->subframeAllocation.present == MBSFN_SubframeConfig__subframeAllocation_PR_oneFrame){// one-frameP format
|
||||
if (frameP % mbsfn_period == eNB_mac_inst[module_idP].common_channels[CC_id].mbsfn_SubframeConfig[j]->radioframeAllocationOffset){ // MBSFN frameP
|
||||
if (eNB_mac_inst[module_idP].common_channels[CC_id].mbsfn_SubframeConfig[j]->subframeAllocation.present == MBSFN_SubframeConfig__subframeAllocation_PR_oneFrame){// one-frameP format
|
||||
|
||||
// Find the first subframeP in this MCH to transmit MSI
|
||||
if (frameP % mch_scheduling_period == eNB_mac_inst[module_idP].mbsfn_SubframeConfig[j]->radioframeAllocationOffset ) {
|
||||
if (frameP % mch_scheduling_period == eNB_mac_inst[module_idP].common_channels[CC_id].mbsfn_SubframeConfig[j]->radioframeAllocationOffset ) {
|
||||
while (ii == 0) {
|
||||
ii = eNB_mac_inst[module_idP].mbsfn_SubframeConfig[j]->subframeAllocation.choice.oneFrame.buf[0] & (0x80>>msi_pos);
|
||||
ii = eNB_mac_inst[module_idP].common_channels[CC_id].mbsfn_SubframeConfig[j]->subframeAllocation.choice.oneFrame.buf[0] & (0x80>>msi_pos);
|
||||
msi_pos++;
|
||||
}
|
||||
LOG_D(MAC,"[eNB %d] Frame %d subframeP %d : sync area %d sf allocation pattern %d sf alloc %x msi pos is %d \n", module_idP,frameP, subframeP,i,j,eNB_mac_inst[module_idP].mbsfn_SubframeConfig[j]->subframeAllocation.choice.oneFrame.buf[0], msi_pos);
|
||||
LOG_D(MAC,"[eNB %d] Frame %d subframeP %d : sync area %d sf allocation pattern %d sf alloc %x msi pos is %d \n", module_idP,frameP, subframeP,i,j,eNB_mac_inst[module_idP].common_channels[CC_id].mbsfn_SubframeConfig[j]->subframeAllocation.choice.oneFrame.buf[0], msi_pos);
|
||||
}
|
||||
|
||||
// Check if the subframeP is for MSI, MCCH or MTCHs and Set the correspoding flag to 1
|
||||
switch (subframeP) {
|
||||
case 1:
|
||||
if (mac_xface->lte_frame_parms->frame_type == FDD) {
|
||||
if ((eNB_mac_inst[module_idP].mbsfn_SubframeConfig[j]->subframeAllocation.choice.oneFrame.buf[0] & MBSFN_FDD_SF1) == MBSFN_FDD_SF1) {
|
||||
if ((eNB_mac_inst[module_idP].common_channels[CC_id].mbsfn_SubframeConfig[j]->subframeAllocation.choice.oneFrame.buf[0] & MBSFN_FDD_SF1) == MBSFN_FDD_SF1) {
|
||||
if (msi_pos == 1)
|
||||
msi_flag = 1;
|
||||
if ( (frameP % mcch_period == eNB_mac_inst[module_idP].mbsfn_AreaInfo[i]->mcch_Config_r9.mcch_Offset_r9) &&
|
||||
((eNB_mac_inst[module_idP].mbsfn_AreaInfo[i]->mcch_Config_r9.sf_AllocInfo_r9.buf[0] & MBSFN_FDD_SF1) == MBSFN_FDD_SF1) )
|
||||
if ( (frameP % mcch_period == eNB_mac_inst[module_idP].common_channels[CC_id].mbsfn_AreaInfo[i]->mcch_Config_r9.mcch_Offset_r9) &&
|
||||
((eNB_mac_inst[module_idP].common_channels[CC_id].mbsfn_AreaInfo[i]->mcch_Config_r9.sf_AllocInfo_r9.buf[0] & MBSFN_FDD_SF1) == MBSFN_FDD_SF1) )
|
||||
mcch_flag = 1;
|
||||
mtch_flag = 1;
|
||||
}
|
||||
@@ -166,11 +166,11 @@ int schedule_MBMS(module_id_t module_idP, frame_t frameP, sub_frame_t subframeP)
|
||||
|
||||
case 2:
|
||||
if (mac_xface->lte_frame_parms->frame_type == FDD){
|
||||
if ((eNB_mac_inst[module_idP].mbsfn_SubframeConfig[j]->subframeAllocation.choice.oneFrame.buf[0] & MBSFN_FDD_SF2) == MBSFN_FDD_SF2) {
|
||||
if ((eNB_mac_inst[module_idP].common_channels[CC_id].mbsfn_SubframeConfig[j]->subframeAllocation.choice.oneFrame.buf[0] & MBSFN_FDD_SF2) == MBSFN_FDD_SF2) {
|
||||
if (msi_pos == 2)
|
||||
msi_flag = 1;
|
||||
if ( (frameP % mcch_period == eNB_mac_inst[module_idP].mbsfn_AreaInfo[i]->mcch_Config_r9.mcch_Offset_r9) &&
|
||||
((eNB_mac_inst[module_idP].mbsfn_AreaInfo[i]->mcch_Config_r9.sf_AllocInfo_r9.buf[0] & MBSFN_FDD_SF2) == MBSFN_FDD_SF2) )
|
||||
if ( (frameP % mcch_period == eNB_mac_inst[module_idP].common_channels[CC_id].mbsfn_AreaInfo[i]->mcch_Config_r9.mcch_Offset_r9) &&
|
||||
((eNB_mac_inst[module_idP].common_channels[CC_id].mbsfn_AreaInfo[i]->mcch_Config_r9.sf_AllocInfo_r9.buf[0] & MBSFN_FDD_SF2) == MBSFN_FDD_SF2) )
|
||||
mcch_flag = 1;
|
||||
mtch_flag = 1;
|
||||
}
|
||||
@@ -179,21 +179,21 @@ int schedule_MBMS(module_id_t module_idP, frame_t frameP, sub_frame_t subframeP)
|
||||
|
||||
case 3:
|
||||
if (mac_xface->lte_frame_parms->frame_type == TDD){// TDD
|
||||
if ((eNB_mac_inst[module_idP].mbsfn_SubframeConfig[j]->subframeAllocation.choice.oneFrame.buf[0] & MBSFN_TDD_SF3) == MBSFN_TDD_SF3) {
|
||||
if ((eNB_mac_inst[module_idP].common_channels[CC_id].mbsfn_SubframeConfig[j]->subframeAllocation.choice.oneFrame.buf[0] & MBSFN_TDD_SF3) == MBSFN_TDD_SF3) {
|
||||
if (msi_pos == 1)
|
||||
msi_flag = 1;
|
||||
if ( (frameP % mcch_period == eNB_mac_inst[module_idP].mbsfn_AreaInfo[i]->mcch_Config_r9.mcch_Offset_r9) &&
|
||||
((eNB_mac_inst[module_idP].mbsfn_AreaInfo[i]->mcch_Config_r9.sf_AllocInfo_r9.buf[0] & MBSFN_TDD_SF3) == MBSFN_TDD_SF3) )
|
||||
if ( (frameP % mcch_period == eNB_mac_inst[module_idP].common_channels[CC_id].mbsfn_AreaInfo[i]->mcch_Config_r9.mcch_Offset_r9) &&
|
||||
((eNB_mac_inst[module_idP].common_channels[CC_id].mbsfn_AreaInfo[i]->mcch_Config_r9.sf_AllocInfo_r9.buf[0] & MBSFN_TDD_SF3) == MBSFN_TDD_SF3) )
|
||||
mcch_flag = 1;
|
||||
mtch_flag = 1;
|
||||
}
|
||||
}
|
||||
else {// FDD
|
||||
if ((eNB_mac_inst[module_idP].mbsfn_SubframeConfig[j]->subframeAllocation.choice.oneFrame.buf[0] & MBSFN_FDD_SF3) == MBSFN_FDD_SF3) {
|
||||
if ((eNB_mac_inst[module_idP].common_channels[CC_id].mbsfn_SubframeConfig[j]->subframeAllocation.choice.oneFrame.buf[0] & MBSFN_FDD_SF3) == MBSFN_FDD_SF3) {
|
||||
if (msi_pos == 3)
|
||||
msi_flag = 1;
|
||||
if ( (frameP % mcch_period == eNB_mac_inst[module_idP].mbsfn_AreaInfo[i]->mcch_Config_r9.mcch_Offset_r9) &&
|
||||
((eNB_mac_inst[module_idP].mbsfn_AreaInfo[i]->mcch_Config_r9.sf_AllocInfo_r9.buf[0] & MBSFN_FDD_SF3) == MBSFN_FDD_SF3) )
|
||||
if ( (frameP % mcch_period == eNB_mac_inst[module_idP].common_channels[CC_id].mbsfn_AreaInfo[i]->mcch_Config_r9.mcch_Offset_r9) &&
|
||||
((eNB_mac_inst[module_idP].common_channels[CC_id].mbsfn_AreaInfo[i]->mcch_Config_r9.sf_AllocInfo_r9.buf[0] & MBSFN_FDD_SF3) == MBSFN_FDD_SF3) )
|
||||
mcch_flag = 1;
|
||||
mtch_flag = 1;
|
||||
}
|
||||
@@ -202,11 +202,11 @@ int schedule_MBMS(module_id_t module_idP, frame_t frameP, sub_frame_t subframeP)
|
||||
|
||||
case 4:
|
||||
if (mac_xface->lte_frame_parms->frame_type == TDD){
|
||||
if ((eNB_mac_inst[module_idP].mbsfn_SubframeConfig[j]->subframeAllocation.choice.oneFrame.buf[0] & MBSFN_TDD_SF4) == MBSFN_TDD_SF4) {
|
||||
if ((eNB_mac_inst[module_idP].common_channels[CC_id].mbsfn_SubframeConfig[j]->subframeAllocation.choice.oneFrame.buf[0] & MBSFN_TDD_SF4) == MBSFN_TDD_SF4) {
|
||||
if (msi_pos == 2)
|
||||
msi_flag = 1;
|
||||
if ( (frameP % mcch_period == eNB_mac_inst[module_idP].mbsfn_AreaInfo[i]->mcch_Config_r9.mcch_Offset_r9) &&
|
||||
((eNB_mac_inst[module_idP].mbsfn_AreaInfo[i]->mcch_Config_r9.sf_AllocInfo_r9.buf[0] & MBSFN_TDD_SF4) == MBSFN_TDD_SF4) )
|
||||
if ( (frameP % mcch_period == eNB_mac_inst[module_idP].common_channels[CC_id].mbsfn_AreaInfo[i]->mcch_Config_r9.mcch_Offset_r9) &&
|
||||
((eNB_mac_inst[module_idP].common_channels[CC_id].mbsfn_AreaInfo[i]->mcch_Config_r9.sf_AllocInfo_r9.buf[0] & MBSFN_TDD_SF4) == MBSFN_TDD_SF4) )
|
||||
mcch_flag = 1;
|
||||
mtch_flag = 1;
|
||||
}
|
||||
@@ -215,11 +215,11 @@ int schedule_MBMS(module_id_t module_idP, frame_t frameP, sub_frame_t subframeP)
|
||||
|
||||
case 6:
|
||||
if (mac_xface->lte_frame_parms->frame_type == FDD){
|
||||
if ((eNB_mac_inst[module_idP].mbsfn_SubframeConfig[j]->subframeAllocation.choice.oneFrame.buf[0] & MBSFN_FDD_SF6) == MBSFN_FDD_SF6) {
|
||||
if ((eNB_mac_inst[module_idP].common_channels[CC_id].mbsfn_SubframeConfig[j]->subframeAllocation.choice.oneFrame.buf[0] & MBSFN_FDD_SF6) == MBSFN_FDD_SF6) {
|
||||
if (msi_pos == 4)
|
||||
msi_flag = 1;
|
||||
if ( (frameP % mcch_period == eNB_mac_inst[module_idP].mbsfn_AreaInfo[i]->mcch_Config_r9.mcch_Offset_r9) &&
|
||||
((eNB_mac_inst[module_idP].mbsfn_AreaInfo[i]->mcch_Config_r9.sf_AllocInfo_r9.buf[0] & MBSFN_FDD_SF6) == MBSFN_FDD_SF6) )
|
||||
if ( (frameP % mcch_period == eNB_mac_inst[module_idP].common_channels[CC_id].mbsfn_AreaInfo[i]->mcch_Config_r9.mcch_Offset_r9) &&
|
||||
((eNB_mac_inst[module_idP].common_channels[CC_id].mbsfn_AreaInfo[i]->mcch_Config_r9.sf_AllocInfo_r9.buf[0] & MBSFN_FDD_SF6) == MBSFN_FDD_SF6) )
|
||||
mcch_flag = 1;
|
||||
mtch_flag = 1;
|
||||
}
|
||||
@@ -228,21 +228,21 @@ int schedule_MBMS(module_id_t module_idP, frame_t frameP, sub_frame_t subframeP)
|
||||
|
||||
case 7:
|
||||
if (mac_xface->lte_frame_parms->frame_type == TDD){ // TDD
|
||||
if ((eNB_mac_inst[module_idP].mbsfn_SubframeConfig[j]->subframeAllocation.choice.oneFrame.buf[0] & MBSFN_TDD_SF7) == MBSFN_TDD_SF7) {
|
||||
if ((eNB_mac_inst[module_idP].common_channels[CC_id].mbsfn_SubframeConfig[j]->subframeAllocation.choice.oneFrame.buf[0] & MBSFN_TDD_SF7) == MBSFN_TDD_SF7) {
|
||||
if (msi_pos == 3)
|
||||
msi_flag = 1;
|
||||
if ( (frameP % mcch_period == eNB_mac_inst[module_idP].mbsfn_AreaInfo[i]->mcch_Config_r9.mcch_Offset_r9) &&
|
||||
((eNB_mac_inst[module_idP].mbsfn_AreaInfo[i]->mcch_Config_r9.sf_AllocInfo_r9.buf[0] & MBSFN_TDD_SF7) == MBSFN_TDD_SF7) )
|
||||
if ( (frameP % mcch_period == eNB_mac_inst[module_idP].common_channels[CC_id].mbsfn_AreaInfo[i]->mcch_Config_r9.mcch_Offset_r9) &&
|
||||
((eNB_mac_inst[module_idP].common_channels[CC_id].mbsfn_AreaInfo[i]->mcch_Config_r9.sf_AllocInfo_r9.buf[0] & MBSFN_TDD_SF7) == MBSFN_TDD_SF7) )
|
||||
mcch_flag = 1;
|
||||
mtch_flag = 1;
|
||||
}
|
||||
}
|
||||
else {// FDD
|
||||
if ((eNB_mac_inst[module_idP].mbsfn_SubframeConfig[j]->subframeAllocation.choice.oneFrame.buf[0] & MBSFN_FDD_SF7) == MBSFN_FDD_SF7) {
|
||||
if ((eNB_mac_inst[module_idP].common_channels[CC_id].mbsfn_SubframeConfig[j]->subframeAllocation.choice.oneFrame.buf[0] & MBSFN_FDD_SF7) == MBSFN_FDD_SF7) {
|
||||
if (msi_pos == 5)
|
||||
msi_flag = 1;
|
||||
if ( (frameP % mcch_period == eNB_mac_inst[module_idP].mbsfn_AreaInfo[i]->mcch_Config_r9.mcch_Offset_r9) &&
|
||||
((eNB_mac_inst[module_idP].mbsfn_AreaInfo[i]->mcch_Config_r9.sf_AllocInfo_r9.buf[0] & MBSFN_FDD_SF7) == MBSFN_FDD_SF7) )
|
||||
if ( (frameP % mcch_period == eNB_mac_inst[module_idP].common_channels[CC_id].mbsfn_AreaInfo[i]->mcch_Config_r9.mcch_Offset_r9) &&
|
||||
((eNB_mac_inst[module_idP].common_channels[CC_id].mbsfn_AreaInfo[i]->mcch_Config_r9.sf_AllocInfo_r9.buf[0] & MBSFN_FDD_SF7) == MBSFN_FDD_SF7) )
|
||||
mcch_flag = 1;
|
||||
mtch_flag = 1;
|
||||
}
|
||||
@@ -251,21 +251,21 @@ int schedule_MBMS(module_id_t module_idP, frame_t frameP, sub_frame_t subframeP)
|
||||
|
||||
case 8:
|
||||
if (mac_xface->lte_frame_parms->frame_type == TDD){ //TDD
|
||||
if ((eNB_mac_inst[module_idP].mbsfn_SubframeConfig[j]->subframeAllocation.choice.oneFrame.buf[0] & MBSFN_TDD_SF8) == MBSFN_TDD_SF8) {
|
||||
if ((eNB_mac_inst[module_idP].common_channels[CC_id].mbsfn_SubframeConfig[j]->subframeAllocation.choice.oneFrame.buf[0] & MBSFN_TDD_SF8) == MBSFN_TDD_SF8) {
|
||||
if (msi_pos == 4)
|
||||
msi_flag = 1;
|
||||
if ( (frameP % mcch_period == eNB_mac_inst[module_idP].mbsfn_AreaInfo[i]->mcch_Config_r9.mcch_Offset_r9) &&
|
||||
((eNB_mac_inst[module_idP].mbsfn_AreaInfo[i]->mcch_Config_r9.sf_AllocInfo_r9.buf[0] & MBSFN_TDD_SF8) == MBSFN_TDD_SF8) )
|
||||
if ( (frameP % mcch_period == eNB_mac_inst[module_idP].common_channels[CC_id].mbsfn_AreaInfo[i]->mcch_Config_r9.mcch_Offset_r9) &&
|
||||
((eNB_mac_inst[module_idP].common_channels[CC_id].mbsfn_AreaInfo[i]->mcch_Config_r9.sf_AllocInfo_r9.buf[0] & MBSFN_TDD_SF8) == MBSFN_TDD_SF8) )
|
||||
mcch_flag = 1;
|
||||
mtch_flag = 1;
|
||||
}
|
||||
}
|
||||
else{ // FDD
|
||||
if ((eNB_mac_inst[module_idP].mbsfn_SubframeConfig[j]->subframeAllocation.choice.oneFrame.buf[0] & MBSFN_FDD_SF8) == MBSFN_FDD_SF8) {
|
||||
if ((eNB_mac_inst[module_idP].common_channels[CC_id].mbsfn_SubframeConfig[j]->subframeAllocation.choice.oneFrame.buf[0] & MBSFN_FDD_SF8) == MBSFN_FDD_SF8) {
|
||||
if (msi_pos == 6)
|
||||
msi_flag = 1;
|
||||
if ( (frameP % mcch_period == eNB_mac_inst[module_idP].mbsfn_AreaInfo[i]->mcch_Config_r9.mcch_Offset_r9) &&
|
||||
((eNB_mac_inst[module_idP].mbsfn_AreaInfo[i]->mcch_Config_r9.sf_AllocInfo_r9.buf[0] & MBSFN_FDD_SF8) == MBSFN_FDD_SF8) )
|
||||
if ( (frameP % mcch_period == eNB_mac_inst[module_idP].common_channels[CC_id].mbsfn_AreaInfo[i]->mcch_Config_r9.mcch_Offset_r9) &&
|
||||
((eNB_mac_inst[module_idP].common_channels[CC_id].mbsfn_AreaInfo[i]->mcch_Config_r9.sf_AllocInfo_r9.buf[0] & MBSFN_FDD_SF8) == MBSFN_FDD_SF8) )
|
||||
mcch_flag = 1;
|
||||
mtch_flag = 1;
|
||||
}
|
||||
@@ -274,11 +274,11 @@ int schedule_MBMS(module_id_t module_idP, frame_t frameP, sub_frame_t subframeP)
|
||||
|
||||
case 9:
|
||||
if (mac_xface->lte_frame_parms->frame_type == TDD){
|
||||
if ((eNB_mac_inst[module_idP].mbsfn_SubframeConfig[j]->subframeAllocation.choice.oneFrame.buf[0] & MBSFN_TDD_SF9) == MBSFN_TDD_SF9) {
|
||||
if ((eNB_mac_inst[module_idP].common_channels[CC_id].mbsfn_SubframeConfig[j]->subframeAllocation.choice.oneFrame.buf[0] & MBSFN_TDD_SF9) == MBSFN_TDD_SF9) {
|
||||
if (msi_pos == 5)
|
||||
msi_flag = 1;
|
||||
if ( (frameP % mcch_period == eNB_mac_inst[module_idP].mbsfn_AreaInfo[i]->mcch_Config_r9.mcch_Offset_r9) &&
|
||||
((eNB_mac_inst[module_idP].mbsfn_AreaInfo[i]->mcch_Config_r9.sf_AllocInfo_r9.buf[0] & MBSFN_TDD_SF9) == MBSFN_TDD_SF9) )
|
||||
if ( (frameP % mcch_period == eNB_mac_inst[module_idP].common_channels[CC_id].mbsfn_AreaInfo[i]->mcch_Config_r9.mcch_Offset_r9) &&
|
||||
((eNB_mac_inst[module_idP].common_channels[CC_id].mbsfn_AreaInfo[i]->mcch_Config_r9.sf_AllocInfo_r9.buf[0] & MBSFN_TDD_SF9) == MBSFN_TDD_SF9) )
|
||||
mcch_flag = 1;
|
||||
mtch_flag = 1;
|
||||
}
|
||||
@@ -296,15 +296,15 @@ int schedule_MBMS(module_id_t module_idP, frame_t frameP, sub_frame_t subframeP)
|
||||
}
|
||||
}
|
||||
} // end of for loop
|
||||
eNB_mac_inst[module_idP].msi_active=0;
|
||||
eNB_mac_inst[module_idP].mcch_active=0;
|
||||
eNB_mac_inst[module_idP].mtch_active=0;
|
||||
eNB_mac_inst[module_idP].common_channels[CC_id].msi_active=0;
|
||||
eNB_mac_inst[module_idP].common_channels[CC_id].mcch_active=0;
|
||||
eNB_mac_inst[module_idP].common_channels[CC_id].mtch_active=0;
|
||||
// Calculate the mcs
|
||||
if ((msi_flag==1) || (mcch_flag==1)) {
|
||||
eNB_mac_inst[module_idP].MCH_pdu.mcs = mcch_mcs;
|
||||
eNB_mac_inst[module_idP].common_channels[CC_id].MCH_pdu.mcs = mcch_mcs;
|
||||
}
|
||||
else if (mtch_flag == 1) { // only MTCH in this subframeP
|
||||
eNB_mac_inst[module_idP].MCH_pdu.mcs = eNB_mac_inst[module_idP].pmch_Config[0]->dataMCS_r9;
|
||||
eNB_mac_inst[module_idP].common_channels[CC_id].MCH_pdu.mcs = eNB_mac_inst[module_idP].common_channels[CC_id].pmch_Config[0]->dataMCS_r9;
|
||||
}
|
||||
|
||||
|
||||
@@ -328,9 +328,9 @@ int schedule_MBMS(module_id_t module_idP, frame_t frameP, sub_frame_t subframeP)
|
||||
msi_ptr+= sizeof(MSI_ELEMENT);
|
||||
|
||||
//Header for MTCHs
|
||||
num_mtch = eNB_mac_inst[module_idP].mbms_SessionList[0]->list.count;
|
||||
num_mtch = eNB_mac_inst[module_idP].common_channels[CC_id].mbms_SessionList[0]->list.count;
|
||||
for (k=0;k<num_mtch;k++) { // loop for all session in this MCH (MCH[0]) at this moment
|
||||
((MSI_ELEMENT *) msi_ptr)->lcid = eNB_mac_inst[module_idP].mbms_SessionList[0]->list.array[k]->logicalChannelIdentity_r9;//mtch_lcid;
|
||||
((MSI_ELEMENT *) msi_ptr)->lcid = eNB_mac_inst[module_idP].common_channels[CC_id].mbms_SessionList[0]->list.array[k]->logicalChannelIdentity_r9;//mtch_lcid;
|
||||
((MSI_ELEMENT *) msi_ptr)->stop_sf_MSB = 0; // last subframeP of this mtch (only one mtch now)
|
||||
((MSI_ELEMENT *) msi_ptr)->stop_sf_LSB = 0xB;
|
||||
msi_ptr+=sizeof(MSI_ELEMENT);
|
||||
@@ -355,7 +355,7 @@ int schedule_MBMS(module_id_t module_idP, frame_t frameP, sub_frame_t subframeP)
|
||||
sdu_length_total += sdu_lengths[num_sdus];
|
||||
LOG_I(MAC,"[eNB %d] Create %d bytes for MSI\n",module_idP,sdu_lengths[num_sdus]);
|
||||
num_sdus++;
|
||||
eNB_mac_inst[module_idP].msi_active=1;
|
||||
eNB_mac_inst[module_idP].common_channels[CC_id].msi_active=1;
|
||||
}
|
||||
|
||||
// there is MCCH
|
||||
@@ -366,7 +366,7 @@ int schedule_MBMS(module_id_t module_idP, frame_t frameP, sub_frame_t subframeP)
|
||||
mcch_sdu_length = mac_rrc_data_req(module_idP,
|
||||
frameP,
|
||||
MCCH,1,
|
||||
&eNB_mac_inst[module_idP].MCCH_pdu.payload[0],
|
||||
&eNB_mac_inst[module_idP].common_channels[CC_id].MCCH_pdu.payload[0],
|
||||
1,// this is eNB
|
||||
module_idP, // index
|
||||
i); // this is the mbsfn sync area index
|
||||
@@ -389,10 +389,10 @@ int schedule_MBMS(module_id_t module_idP, frame_t frameP, sub_frame_t subframeP)
|
||||
mcch_sdu_length,
|
||||
mcch_mcs);
|
||||
}
|
||||
eNB_mac_inst[module_idP].mcch_active=1;
|
||||
eNB_mac_inst[module_idP].common_channels[CC_id].mcch_active=1;
|
||||
|
||||
memcpy((char *)&mch_buffer[sdu_length_total],
|
||||
&eNB_mac_inst[module_idP].MCCH_pdu.payload[0],
|
||||
&eNB_mac_inst[module_idP].common_channels[CC_id].MCCH_pdu.payload[0],
|
||||
mcch_sdu_length);
|
||||
sdu_lcids[num_sdus] = MCCH_LCHANID;
|
||||
sdu_lengths[num_sdus] = mcch_sdu_length;
|
||||
@@ -403,7 +403,7 @@ int schedule_MBMS(module_id_t module_idP, frame_t frameP, sub_frame_t subframeP)
|
||||
num_sdus++;
|
||||
}
|
||||
}
|
||||
TBS = mac_xface->get_TBS_DL(eNB_mac_inst[module_idP].MCH_pdu.mcs, mac_xface->lte_frame_parms->N_RB_DL);
|
||||
TBS = mac_xface->get_TBS_DL(eNB_mac_inst[module_idP].common_channels[CC_id].MCH_pdu.mcs, mac_xface->lte_frame_parms->N_RB_DL);
|
||||
#ifdef Rel10
|
||||
// do not let mcch and mtch multiplexing when relaying is active
|
||||
// for sync area 1, so not transmit data
|
||||
@@ -460,7 +460,7 @@ int schedule_MBMS(module_id_t module_idP, frame_t frameP, sub_frame_t subframeP)
|
||||
(char*)&mch_buffer[sdu_length_total]);
|
||||
//sdu_lengths[num_sdus] = mac_rlc_data_req(module_idP,frameP, MBMS_FLAG_NO, MTCH+(MAX_NUM_RB*(NUMBER_OF_UE_MAX+1)), (char*)&mch_buffer[sdu_length_total]);
|
||||
LOG_I(MAC,"[eNB %d][MBMS USER-PLANE] Got %d bytes for MTCH %d\n",module_idP,sdu_lengths[num_sdus],MTCH);
|
||||
eNB_mac_inst[module_idP].mtch_active=1;
|
||||
eNB_mac_inst[module_idP].common_channels[CC_id].mtch_active=1;
|
||||
sdu_lcids[num_sdus] = MTCH;
|
||||
sdu_length_total += sdu_lengths[num_sdus];
|
||||
if (sdu_lengths[num_sdus] < 128)
|
||||
@@ -512,7 +512,7 @@ int schedule_MBMS(module_id_t module_idP, frame_t frameP, sub_frame_t subframeP)
|
||||
}
|
||||
// Generate the MAC Header for MCH
|
||||
// here we use the function for DLSCH because DLSCH & MCH have the same Header structure
|
||||
offset = generate_dlsch_header((unsigned char*)eNB_mac_inst[module_idP].MCH_pdu.payload,
|
||||
offset = generate_dlsch_header((unsigned char*)eNB_mac_inst[module_idP].common_channels[CC_id].MCH_pdu.payload,
|
||||
num_sdus,
|
||||
sdu_lengths,
|
||||
sdu_lcids,
|
||||
@@ -522,25 +522,25 @@ int schedule_MBMS(module_id_t module_idP, frame_t frameP, sub_frame_t subframeP)
|
||||
padding,
|
||||
post_padding);
|
||||
|
||||
eNB_mac_inst[module_idP].MCH_pdu.Pdu_size=TBS;
|
||||
eNB_mac_inst[module_idP].MCH_pdu.sync_area=i;
|
||||
eNB_mac_inst[module_idP].MCH_pdu.msi_active= eNB_mac_inst[module_idP].msi_active;
|
||||
eNB_mac_inst[module_idP].MCH_pdu.mcch_active= eNB_mac_inst[module_idP].mcch_active;
|
||||
eNB_mac_inst[module_idP].MCH_pdu.mtch_active= eNB_mac_inst[module_idP].mtch_active;
|
||||
LOG_D(MAC," MCS for this sf is %d (mcch active %d, mtch active %d)\n", eNB_mac_inst[module_idP].MCH_pdu.mcs,
|
||||
eNB_mac_inst[module_idP].MCH_pdu.mcch_active,eNB_mac_inst[module_idP].MCH_pdu.mtch_active );
|
||||
eNB_mac_inst[module_idP].common_channels[CC_id].MCH_pdu.Pdu_size=TBS;
|
||||
eNB_mac_inst[module_idP].common_channels[CC_id].MCH_pdu.sync_area=i;
|
||||
eNB_mac_inst[module_idP].common_channels[CC_id].MCH_pdu.msi_active= eNB_mac_inst[module_idP].common_channels[CC_id].msi_active;
|
||||
eNB_mac_inst[module_idP].common_channels[CC_id].MCH_pdu.mcch_active= eNB_mac_inst[module_idP].common_channels[CC_id].mcch_active;
|
||||
eNB_mac_inst[module_idP].common_channels[CC_id].MCH_pdu.mtch_active= eNB_mac_inst[module_idP].common_channels[CC_id].mtch_active;
|
||||
LOG_D(MAC," MCS for this sf is %d (mcch active %d, mtch active %d)\n", eNB_mac_inst[module_idP].common_channels[CC_id].MCH_pdu.mcs,
|
||||
eNB_mac_inst[module_idP].common_channels[CC_id].MCH_pdu.mcch_active,eNB_mac_inst[module_idP].common_channels[CC_id].MCH_pdu.mtch_active );
|
||||
LOG_I(MAC,"[eNB %d][MBMS USER-PLANE ] Generate header : sdu_length_total %d, num_sdus %d, sdu_lengths[0] %d, sdu_lcids[0] %d => payload offset %d,padding %d,post_padding %d (mcs %d, TBS %d), header MTCH %d, header MCCH %d, header MSI %d\n",
|
||||
module_idP,sdu_length_total,num_sdus,sdu_lengths[0],sdu_lcids[0],offset,padding,post_padding,eNB_mac_inst[module_idP].MCH_pdu.mcs,TBS,header_len_mtch, header_len_mcch, header_len_msi);
|
||||
module_idP,sdu_length_total,num_sdus,sdu_lengths[0],sdu_lcids[0],offset,padding,post_padding,eNB_mac_inst[module_idP].common_channels[CC_id].MCH_pdu.mcs,TBS,header_len_mtch, header_len_mcch, header_len_msi);
|
||||
// copy SDU to mch_pdu after the MAC Header
|
||||
memcpy(&eNB_mac_inst[module_idP].MCH_pdu.payload[offset],mch_buffer,sdu_length_total);
|
||||
memcpy(&eNB_mac_inst[module_idP].common_channels[CC_id].MCH_pdu.payload[offset],mch_buffer,sdu_length_total);
|
||||
// filling remainder of MCH with random data if necessery
|
||||
for (j=0;j<(TBS-sdu_length_total-offset);j++)
|
||||
eNB_mac_inst[module_idP].MCH_pdu.payload[offset+sdu_length_total+j] = (char)(taus()&0xff);
|
||||
eNB_mac_inst[module_idP].common_channels[CC_id].MCH_pdu.payload[offset+sdu_length_total+j] = (char)(taus()&0xff);
|
||||
|
||||
#if defined(USER_MODE) && defined(OAI_EMU)
|
||||
/* Tracing of PDU is done on UE side */
|
||||
if (oai_emulation.info.opt_enabled)
|
||||
trace_pdu(1, (uint8_t *)eNB_mac_inst[module_idP].MCH_pdu.payload,
|
||||
trace_pdu(1, (uint8_t *)eNB_mac_inst[module_idP].common_channels[CC_id].MCH_pdu.payload,
|
||||
TBS, module_idP, 6, 0xffff, // M_RNTI = 6 in wirehsark
|
||||
eNB_mac_inst[module_idP].subframe,0,0);
|
||||
LOG_D(OPT,"[eNB %d][MCH] Frame %d : MAC PDU with size %d\n",
|
||||
@@ -553,11 +553,11 @@ int schedule_MBMS(module_id_t module_idP, frame_t frameP, sub_frame_t subframeP)
|
||||
return 1;
|
||||
}
|
||||
else {
|
||||
eNB_mac_inst[module_idP].MCH_pdu.Pdu_size=0;
|
||||
eNB_mac_inst[module_idP].MCH_pdu.sync_area=0;
|
||||
eNB_mac_inst[module_idP].MCH_pdu.msi_active=0;
|
||||
eNB_mac_inst[module_idP].MCH_pdu.mcch_active=0;
|
||||
eNB_mac_inst[module_idP].MCH_pdu.mtch_active=0;
|
||||
eNB_mac_inst[module_idP].common_channels[CC_id].MCH_pdu.Pdu_size=0;
|
||||
eNB_mac_inst[module_idP].common_channels[CC_id].MCH_pdu.sync_area=0;
|
||||
eNB_mac_inst[module_idP].common_channels[CC_id].MCH_pdu.msi_active=0;
|
||||
eNB_mac_inst[module_idP].common_channels[CC_id].MCH_pdu.mcch_active=0;
|
||||
eNB_mac_inst[module_idP].common_channels[CC_id].MCH_pdu.mtch_active=0;
|
||||
// for testing purpose, fill with random data
|
||||
//for (j=0;j<(TBS-sdu_length_total-offset);j++)
|
||||
// eNB_mac_inst[module_idP].MCH_pdu.payload[offset+sdu_length_total+j] = (char)(taus()&0xff);
|
||||
@@ -573,10 +573,11 @@ int schedule_MBMS(module_id_t module_idP, frame_t frameP, sub_frame_t subframeP)
|
||||
return 0;
|
||||
*/
|
||||
}
|
||||
MCH_PDU *get_mch_sdu(uint8_t module_idP,uint32_t frameP, sub_frame_t subframeP) {
|
||||
MCH_PDU *get_mch_sdu(uint8_t module_idP, uint8_t CC_id, uint32_t frameP, sub_frame_t subframeP) {
|
||||
// eNB_mac_inst[module_idP].MCH_pdu.mcs=0;
|
||||
//LOG_D(MAC," MCH_pdu.mcs is %d\n", eNB_mac_inst[module_idP].MCH_pdu.mcs);
|
||||
return(&eNB_mac_inst[module_idP].MCH_pdu);
|
||||
#warning "MCH pdu should take the CC_id index"
|
||||
return(&eNB_mac_inst[module_idP].common_channels[CC_id].MCH_pdu);
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
@@ -532,6 +532,30 @@ uint32_t allocate_prbs(int UE_id,unsigned char nb_rb, uint32_t *rballoc) {
|
||||
return(rballoc_dci);
|
||||
}
|
||||
|
||||
int get_min_rb_unit(module_id_t module_id, uint8_t CC_id){
|
||||
|
||||
int min_rb_unit=0;
|
||||
LTE_DL_FRAME_PARMS* frame_parms = mac_xface->get_lte_frame_parms(module_id,CC_id);
|
||||
switch (frame_parms->N_RB_DL) {
|
||||
case 6: // 1.4 MHz
|
||||
min_rb_unit=1;
|
||||
break;
|
||||
case 25: // 5HMz
|
||||
min_rb_unit=2;
|
||||
break;
|
||||
case 50: // 10HMz
|
||||
min_rb_unit=3;
|
||||
break;
|
||||
case 100: // 20HMz
|
||||
min_rb_unit=4;
|
||||
break;
|
||||
default:
|
||||
min_rb_unit=2;
|
||||
LOG_W(MAC,"[eNB %d] N_DL_RB %d unknown for CC_id %d, setting min_rb_unit to 2\n", module_id, CC_id);
|
||||
break;
|
||||
}
|
||||
return min_rb_unit;
|
||||
}
|
||||
|
||||
uint32_t allocate_prbs_sub(int nb_rb, uint8_t *rballoc) {
|
||||
|
||||
@@ -539,23 +563,23 @@ uint32_t allocate_prbs_sub(int nb_rb, uint8_t *rballoc) {
|
||||
uint32_t rballoc_dci=0;
|
||||
//uint8_t number_of_subbands=13;
|
||||
|
||||
LOG_T(MAC,"*****Check1RBALLOC****: %d%d%d%d (nb_rb %d,N_RBGS %d)\n",
|
||||
rballoc[3],rballoc[2],rballoc[1],rballoc[0],nb_rb,mac_xface->lte_frame_parms->N_RBGS);
|
||||
while((nb_rb >0) && (check < mac_xface->lte_frame_parms->N_RBGS)){
|
||||
LOG_T(MAC,"*****Check1RBALLOC****: %d%d%d%d (nb_rb %d,N_RBG %d)\n",
|
||||
rballoc[3],rballoc[2],rballoc[1],rballoc[0],nb_rb,mac_xface->lte_frame_parms->N_RBG);
|
||||
while((nb_rb >0) && (check < mac_xface->lte_frame_parms->N_RBG)){
|
||||
//printf("rballoc[%d] %d\n",check,rballoc[check]);
|
||||
if(rballoc[check] == 1){
|
||||
rballoc_dci |= (1<<((mac_xface->lte_frame_parms->N_RBGS-1)-check));
|
||||
rballoc_dci |= (1<<((mac_xface->lte_frame_parms->N_RBG-1)-check));
|
||||
switch (mac_xface->lte_frame_parms->N_RB_DL) {
|
||||
case 6:
|
||||
nb_rb--;
|
||||
case 25:
|
||||
if ((check == mac_xface->lte_frame_parms->N_RBGS-1))
|
||||
if ((check == mac_xface->lte_frame_parms->N_RBG-1))
|
||||
nb_rb--;
|
||||
else
|
||||
nb_rb-=2;
|
||||
break;
|
||||
case 50:
|
||||
if ((check == mac_xface->lte_frame_parms->N_RBGS-1))
|
||||
if ((check == mac_xface->lte_frame_parms->N_RBG-1))
|
||||
nb_rb-=2;
|
||||
else
|
||||
nb_rb-=3;
|
||||
@@ -576,21 +600,32 @@ uint32_t allocate_prbs_sub(int nb_rb, uint8_t *rballoc) {
|
||||
}
|
||||
|
||||
|
||||
int get_nb_subband(void){
|
||||
|
||||
int nb_sb=0;
|
||||
|
||||
|
||||
void update_ul_dci(module_id_t module_idP,int CC_id,rnti_t rnti,uint8_t dai) {
|
||||
|
||||
DCI_PDU *DCI_pdu = &eNB_mac_inst[module_idP].common_channels[CC_id].DCI_pdu;
|
||||
int i;
|
||||
DCI0_5MHz_TDD_1_6_t *ULSCH_dci = NULL;;
|
||||
|
||||
if (mac_xface->lte_frame_parms->frame_type == TDD) {
|
||||
for (i=0;i<DCI_pdu->Num_common_dci+DCI_pdu->Num_ue_spec_dci;i++) {
|
||||
ULSCH_dci = (DCI0_5MHz_TDD_1_6_t *)DCI_pdu->dci_alloc[i].dci_pdu;
|
||||
if ((DCI_pdu->dci_alloc[i].format == format0) && (DCI_pdu->dci_alloc[i].rnti == rnti))
|
||||
ULSCH_dci->dai = (dai-1)&3;
|
||||
}
|
||||
switch (mac_xface->lte_frame_parms->N_RB_DL) {
|
||||
case 6:
|
||||
nb_sb=0;
|
||||
break;
|
||||
case 15:
|
||||
nb_sb = 4; // sb_size =4
|
||||
case 25:
|
||||
nb_sb = 7; // sb_size =4, 1 sb with 1PRB, 6 with 2 RBG, each has 2 PRBs
|
||||
break;
|
||||
case 50: // sb_size =6
|
||||
nb_sb = 9;
|
||||
break;
|
||||
case 75: // sb_size =8
|
||||
nb_sb = 10;
|
||||
break;
|
||||
case 100: // sb_size =8 , 1 sb with 1 RBG + 12 sb with 2RBG, each RBG has 4 PRBs
|
||||
nb_sb = 13;
|
||||
break;
|
||||
default:
|
||||
nb_sb=0;
|
||||
break;
|
||||
}
|
||||
// printf("Update UL DCI: DAI %d\n",dai);
|
||||
}
|
||||
return nb_sb;
|
||||
|
||||
}
|
||||
|
||||
@@ -582,7 +582,7 @@ void schedule_ulsch_rnti(module_id_t module_idP,
|
||||
(UE_template->bsr_info[LCGID1] == 0) &&
|
||||
(UE_template->bsr_info[LCGID2] == 0) &&
|
||||
(UE_template->bsr_info[LCGID3] == 0))?
|
||||
BSR_TABLE[10] : // This is when we've received SR and buffers are fully served
|
||||
BSR_TABLE[11] : // This is when we've received SR and buffers are fully served
|
||||
BSR_TABLE[UE_template->bsr_info[LCGID0]]+
|
||||
BSR_TABLE[UE_template->bsr_info[LCGID1]]+
|
||||
BSR_TABLE[UE_template->bsr_info[LCGID2]]+
|
||||
|
||||
@@ -86,6 +86,8 @@ extern EMULATION_VARS *Emul_vars;
|
||||
#endif //PHY_EMUL
|
||||
|
||||
|
||||
extern int cqi_to_mcs[16];
|
||||
|
||||
extern uint32_t RRC_CONNECTION_FLAG;
|
||||
|
||||
|
||||
|
||||
@@ -487,8 +487,14 @@ int l2_init(LTE_DL_FRAME_PARMS *frame_parms,int eMBMS_active, uint8_t cba_group_
|
||||
mac_xface->phy_config_dedicated_eNB = phy_config_dedicated_eNB;
|
||||
mac_xface->phy_config_dedicated_ue = phy_config_dedicated_ue;
|
||||
|
||||
mac_xface->get_lte_frame_parms = get_lte_frame_parms;
|
||||
mac_xface->get_mu_mimo_mode = get_mu_mimo_mode;
|
||||
|
||||
#ifdef Rel10
|
||||
mac_xface->get_mch_sdu = get_mch_sdu;
|
||||
mac_xface->phy_config_dedicated_scell_eNB= phy_config_dedicated_scell_eNB;
|
||||
mac_xface->phy_config_dedicated_scell_ue= phy_config_dedicated_scell_ue;
|
||||
|
||||
#endif
|
||||
|
||||
mac_xface->get_PHR = get_PHR;
|
||||
|
||||
+237
-392
@@ -36,7 +36,7 @@
|
||||
|
||||
*/
|
||||
|
||||
|
||||
#include "assertions.h"
|
||||
#include "PHY/defs.h"
|
||||
#include "PHY/extern.h"
|
||||
|
||||
@@ -70,7 +70,6 @@
|
||||
extern inline unsigned int taus(void);
|
||||
|
||||
|
||||
|
||||
// This function stores the downlink buffer for all the logical channels
|
||||
void store_dlsch_buffer (module_id_t Mod_id,
|
||||
frame_t frameP,
|
||||
@@ -104,10 +103,12 @@ void store_dlsch_buffer (module_id_t Mod_id,
|
||||
UE_template->dl_buffer_info[i] = rlc_status.bytes_in_buffer; //storing the dlsch buffer for each logical channel
|
||||
UE_template->dl_pdus_in_buffer[i] = rlc_status.pdus_in_buffer;
|
||||
UE_template->dl_buffer_head_sdu_creation_time[i] = rlc_status.head_sdu_creation_time ;
|
||||
UE_template->dl_buffer_head_sdu_creation_time_max = cmax(UE_template->dl_buffer_head_sdu_creation_time_max,
|
||||
rlc_status.head_sdu_creation_time );
|
||||
UE_template->dl_buffer_head_sdu_remaining_size_to_send[i] = rlc_status.head_sdu_remaining_size_to_send;
|
||||
UE_template->dl_buffer_head_sdu_is_segmented[i] = rlc_status.head_sdu_is_segmented;
|
||||
UE_template->dl_buffer_total = UE_template->dl_buffer_total + UE_template->dl_buffer_info[i];//storing the total dlsch buffer
|
||||
UE_template->dl_pdus_total += UE_template->dl_pdus_in_buffer[i];
|
||||
UE_template->dl_buffer_total += UE_template->dl_buffer_info[i];//storing the total dlsch buffer
|
||||
UE_template->dl_pdus_total += UE_template->dl_pdus_in_buffer[i];
|
||||
|
||||
#ifdef DEBUG_eNB_SCHEDULER
|
||||
/* note for dl_buffer_head_sdu_remaining_size_to_send[i] :
|
||||
@@ -124,18 +125,18 @@ void store_dlsch_buffer (module_id_t Mod_id,
|
||||
#endif
|
||||
|
||||
}
|
||||
#ifdef DEBUG_eNB_SCHEDULER
|
||||
//#ifdef DEBUG_eNB_SCHEDULER
|
||||
if ( UE_template->dl_buffer_total>0)
|
||||
LOG_D(MAC,"[eNB %d] Frame %d Subframe %d : RLC status for UE %d : total DL buffer size %d and total number of pdu %d \n",
|
||||
Mod_id, frameP, subframeP, UE_id,
|
||||
UE_template->dl_buffer_total,
|
||||
UE_template->dl_pdus_total
|
||||
);
|
||||
#endif
|
||||
//#endif
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
// This function returns the estimated number of RBs required by each UE for downlink scheduling
|
||||
void assign_rbs_required (module_id_t Mod_id,
|
||||
frame_t frameP,
|
||||
@@ -149,76 +150,25 @@ void assign_rbs_required (module_id_t Mod_id,
|
||||
LTE_eNB_UE_stats *eNB_UE_stats[MAX_NUM_CCs];
|
||||
int UE_id,n,i,j,CC_id,pCCid,tmp;
|
||||
UE_list_t *UE_list = &eNB_mac_inst[Mod_id].UE_list;
|
||||
|
||||
UE_TEMPLATE *UE_template;
|
||||
LTE_DL_FRAME_PARMS *frame_parms[MAX_NUM_CCs];
|
||||
|
||||
// clear rb allocations across all CC_ids
|
||||
|
||||
for (UE_id=UE_list->head;UE_id>=0;UE_id=UE_list->next[UE_id]){
|
||||
|
||||
pCCid = UE_PCCID(Mod_id,UE_id);
|
||||
|
||||
//update CQI information across component carriers
|
||||
for (n=0;n<UE_list->numactiveCCs[UE_id];n++) {
|
||||
|
||||
CC_id = UE_list->ordered_CCids[n][UE_id];
|
||||
|
||||
frame_parms[CC_id] = mac_xface->get_lte_frame_parms(Mod_id,CC_id);
|
||||
eNB_UE_stats[CC_id] = mac_xface->get_eNB_UE_stats(Mod_id,CC_id,rnti);
|
||||
|
||||
switch(eNB_UE_stats[CC_id]->DL_cqi[0]) {
|
||||
case 0:
|
||||
eNB_UE_stats[CC_id]->dlsch_mcs1 = 0;
|
||||
break;
|
||||
case 1:
|
||||
eNB_UE_stats[CC_id]->dlsch_mcs1 = 0;
|
||||
break;
|
||||
case 2:
|
||||
eNB_UE_stats[CC_id]->dlsch_mcs1 = 0;
|
||||
break;
|
||||
case 3:
|
||||
eNB_UE_stats[CC_id]->dlsch_mcs1 = 2;
|
||||
break;
|
||||
case 4:
|
||||
eNB_UE_stats[CC_id]->dlsch_mcs1 = 4;
|
||||
break;
|
||||
case 5:
|
||||
eNB_UE_stats[CC_id]->dlsch_mcs1 = 6;
|
||||
break;
|
||||
case 6:
|
||||
eNB_UE_stats[CC_id]->dlsch_mcs1 = 8;
|
||||
break;
|
||||
case 7:
|
||||
eNB_UE_stats[CC_id]->dlsch_mcs1 = 11;
|
||||
break;
|
||||
case 8:
|
||||
eNB_UE_stats[CC_id]->dlsch_mcs1 = 13;
|
||||
break;
|
||||
case 9:
|
||||
eNB_UE_stats[CC_id]->dlsch_mcs1 = 16;
|
||||
break;
|
||||
case 10:
|
||||
eNB_UE_stats[CC_id]->dlsch_mcs1 = 18;
|
||||
break;
|
||||
case 11:
|
||||
eNB_UE_stats[CC_id]->dlsch_mcs1 = 20;
|
||||
break;
|
||||
case 12:
|
||||
eNB_UE_stats[CC_id]->dlsch_mcs1 = 22;
|
||||
break;
|
||||
case 13:
|
||||
eNB_UE_stats[CC_id]->dlsch_mcs1 = 25;
|
||||
break;
|
||||
case 14:
|
||||
eNB_UE_stats[CC_id]->dlsch_mcs1 = 27;
|
||||
break;
|
||||
case 15:
|
||||
eNB_UE_stats[CC_id]->dlsch_mcs1 = 28;
|
||||
break;
|
||||
default:
|
||||
LOG_E(MAC,"preprocessor.c assign_rbs_required(): Invalid CQI %d, should not happen",eNB_UE_stats[CC_id]->DL_cqi[0]);
|
||||
exit(-1);
|
||||
}
|
||||
/*
|
||||
DevCheck(((eNB_UE_stats[CC_id]->DL_cqi[0] < MIN_CQI_VALUE) || (eNB_UE_stats[CC_id]->DL_cqi[0] > MAX_CQI_VALUE)),
|
||||
eNB_UE_stats[CC_id]->DL_cqi[0], MIN_CQI_VALUE, MAX_CQI_VALUE);
|
||||
*/
|
||||
eNB_UE_stats[CC_id]->dlsch_mcs1=cqi_to_mcs[eNB_UE_stats[CC_id]->DL_cqi[0]];
|
||||
}
|
||||
|
||||
// provide the list of CCs sorted according to MCS
|
||||
for (i=0;i<UE_list->numactiveCCs[UE_id];i++) {
|
||||
for (j=i+1;j<UE_list->numactiveCCs[UE_id];j++) {
|
||||
@@ -230,39 +180,43 @@ void assign_rbs_required (module_id_t Mod_id,
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
/*
|
||||
if ((mac_get_rrc_status(Mod_id,1,UE_id) < RRC_RECONFIGURED)){ // If we still don't have a default radio bearer
|
||||
nb_rbs_required[pCCid][UE_id] = PHY_vars_eNB_g[Mod_id][pCCid]->lte_frame_parms.N_RB_DL;
|
||||
continue;
|
||||
}
|
||||
|
||||
if (UE_list->UE_template[UE_id]->dl_buffer_total> 0) {
|
||||
*/
|
||||
/* NN --> RK
|
||||
* check the index of UE_template"
|
||||
*/
|
||||
// if (UE_list->UE_template[UE_id]->dl_buffer_total> 0) {
|
||||
if (UE_list->UE_template[pCCid][UE_id].dl_buffer_total> 0) {
|
||||
LOG_D(MAC,"[preprocessor] assign RB for UE %d\n",UE_id);
|
||||
for (i=0;i<UE_list->numactiveCCs[UE_id];i++) {
|
||||
CC_id = UE_list->ordered_CCids[i][UE_id];
|
||||
|
||||
LOG_D(MAC,"[preprocessor] assign RB for UE %d\n",UE_id);
|
||||
if (eNB_UE_stats[CC_id]->dlsch_mcs1==0) nb_rbs_required[CC_id][UE_id] = 4; // don't let the TBS get too small
|
||||
else nb_rbs_required[CC_id][UE_id] = min_rb_unit[CC_id];
|
||||
|
||||
TBS = mac_xface->get_TBS_DL(eNB_UE_stats[CC_id]->dlsch_mcs1,nb_rbs_required[CC_id][UE_id]);
|
||||
|
||||
/* calculating required number of RBs for each UE */
|
||||
while (TBS < UE_list->UE_template[UE_id]->dl_buffer_total) {
|
||||
nb_rbs_required[CC_id][UE_id] += min_rb_unit[CC_id];
|
||||
if (nb_rbs_required[CC_id][UE_id]>PHY_vars_eNB_g[Mod_id][CC_id]->lte_frame_parms.N_RB_DL) {
|
||||
TBS = mac_xface->get_TBS_DL(eNB_UE_stats[CC_id]->dlsch_mcs1,PHY_vars_eNB_g[Mod_id][CC_id]->lte_frame_parms.N_RB_DL);
|
||||
nb_rbs_required[CC_id][UE_id] = PHY_vars_eNB_g[Mod_id][CC_id]->lte_frame_parms.N_RB_DL;// calculating required number of RBs for each UE
|
||||
if (nb_rbs_required[CC_id][UE_id] > frame_parms[CC_id]->N_RB_DL) {
|
||||
TBS = mac_xface->get_TBS_DL(eNB_UE_stats[CC_id]->dlsch_mcs1,frame_parms[CC_id]->N_RB_DL);
|
||||
nb_rbs_required[CC_id][UE_id] = frame_parms[CC_id]->N_RB_DL;
|
||||
break;
|
||||
}
|
||||
TBS = mac_xface->get_TBS_DL(eNB_UE_stats[CC_id]->dlsch_mcs1,nb_rbs_required[CC_id][UE_id]);
|
||||
}
|
||||
} // end of while
|
||||
LOG_D(MAC,"[eNB %d] Frame %d: UE %d on CC %d nb_required RB %d (TBS %d, mcs %d)\n",
|
||||
Mod_id, frameP,UE_id, CC_id, nb_rbs_required[CC_id][UE_id], TBS, eNB_UE_stats[CC_id]->dlsch_mcs1);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
// This function scans all CC_ids for a particular UE to find the maximum round index of its HARQ processes
|
||||
|
||||
int maxround(module_id_t Mod_id,uint16_t rnti,sub_frame_t subframe) {
|
||||
@@ -341,33 +295,24 @@ void sort_UEs (module_id_t Mod_id,
|
||||
// for(j=0;j<MAX_NUM_LCID;j++){
|
||||
// if (eNB_mac_inst[Mod_id][pCC_id1].UE_template[UE_id1].dl_buffer_info[j] <
|
||||
// eNB_mac_inst[Mod_id][pCC_id2].UE_template[UE_id2].dl_buffer_info[j]){
|
||||
if (UE_list->UE_template[pCC_id1][UE_id1].dl_buffer_total <
|
||||
UE_list->UE_template[pCC_id2][UE_id2].dl_buffer_total){
|
||||
swap_UEs(UE_list,UE_id1,UE_id2);
|
||||
// break;
|
||||
}
|
||||
else if (cqi1 < cqi2){
|
||||
swap_UEs(UE_list,UE_id1,UE_id2);
|
||||
}
|
||||
|
||||
|
||||
// if((j == MAX_NUM_LCID-1))
|
||||
// {
|
||||
// first check the buffer status for SRB1 and SRB2
|
||||
|
||||
/* The goal is to sort by priority.
|
||||
* We use the priority of DTCH logical
|
||||
* channel.
|
||||
*/
|
||||
/*if(eNB_mac_inst[Mod_id][CC_id].UE_sched_ctrl[UE_id1].priority[3]<eNB_mac_inst[Mod_id][CC_id].UE_sched_ctrl[UE_id2].priority[3])
|
||||
{
|
||||
UE_id_sorted[i] = UE_id2;
|
||||
UE_id_sorted[ii] = UE_id1;
|
||||
} //if the priority is the same then sort by CQI
|
||||
else if(eNB_mac_inst[Mod_id][CC_id].UE_sched_ctrl[UE_id1].priority[3]==eNB_mac_inst[Mod_id][CC_id].UE_sched_ctrl[UE_id2].priority[3]){*/
|
||||
|
||||
|
||||
//}
|
||||
// }
|
||||
if ( (UE_list->UE_template[pCC_id1][UE_id1].dl_buffer_info[1] + UE_list->UE_template[pCC_id1][UE_id1].dl_buffer_info[2]) <
|
||||
(UE_list->UE_template[pCC_id2][UE_id2].dl_buffer_info[1] + UE_list->UE_template[pCC_id2][UE_id2].dl_buffer_info[2]) ){
|
||||
swap_UEs(UE_list,UE_id1,UE_id2);
|
||||
}
|
||||
else if (UE_list->UE_template[pCC_id1][UE_id1].dl_buffer_head_sdu_creation_time_max <
|
||||
UE_list->UE_template[pCC_id2][UE_id2].dl_buffer_head_sdu_creation_time_max ){
|
||||
swap_UEs(UE_list,UE_id1,UE_id2);
|
||||
}
|
||||
else if (UE_list->UE_template[pCC_id1][UE_id1].dl_buffer_total <
|
||||
UE_list->UE_template[pCC_id2][UE_id2].dl_buffer_total ){
|
||||
swap_UEs(UE_list,UE_id1,UE_id2);
|
||||
}
|
||||
else if (cqi1 < cqi2){
|
||||
swap_UEs(UE_list,UE_id1,UE_id2);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -382,11 +327,11 @@ void dlsch_scheduler_pre_processor (module_id_t Mod_id,
|
||||
sub_frame_t subframeP,
|
||||
uint8_t dl_pow_off[MAX_NUM_CCs][NUMBER_OF_UE_MAX],
|
||||
uint16_t pre_nb_available_rbs[MAX_NUM_CCs][NUMBER_OF_UE_MAX],
|
||||
int N_RBGS[MAX_NUM_CCs],
|
||||
unsigned char rballoc_sub_UE[MAX_NUM_CCs][NUMBER_OF_UE_MAX][N_RBGS_MAX],
|
||||
int *mbsfn_flag){
|
||||
int N_RBG[MAX_NUM_CCs],
|
||||
unsigned char rballoc_sub_UE[MAX_NUM_CCs][NUMBER_OF_UE_MAX][N_RBG_MAX],
|
||||
int *mbsfn_flag){
|
||||
|
||||
unsigned char rballoc_sub[MAX_NUM_CCs][13],harq_pid=0,harq_pid1=0,harq_pid2=0,round=0,round1=0,round2=0,total_ue_count[MAX_NUM_CCs];
|
||||
unsigned char rballoc_sub[MAX_NUM_CCs][13],harq_pid=0,harq_pid1=0,harq_pid2=0,round=0,round1=0,round2=0,total_ue_count;
|
||||
unsigned char MIMO_mode_indicator[MAX_NUM_CCs][13];
|
||||
int UE_id, UE_id2, i;
|
||||
uint16_t ii,j;
|
||||
@@ -400,50 +345,37 @@ void dlsch_scheduler_pre_processor (module_id_t Mod_id,
|
||||
LTE_eNB_UE_stats *eNB_UE_stats2 = NULL;
|
||||
int min_rb_unit[MAX_NUM_CCs];
|
||||
|
||||
int CC_id;
|
||||
uint8_t CC_id;
|
||||
UE_list_t *UE_list = &eNB_mac_inst[Mod_id].UE_list;
|
||||
|
||||
|
||||
LTE_DL_FRAME_PARMS *frame_parms[MAX_NUM_CCs];
|
||||
int rrc_status = RRC_IDLE;
|
||||
int transmission_mode = 0;
|
||||
|
||||
for (CC_id=0;CC_id<MAX_NUM_CCs;CC_id++) {
|
||||
|
||||
if (mbsfn_flag[CC_id]>0) // If this CC is allocated for MBSFN skip it here
|
||||
continue;
|
||||
|
||||
switch (PHY_vars_eNB_g[Mod_id][CC_id]->lte_frame_parms.N_RB_DL) {
|
||||
case 6:
|
||||
min_rb_unit[CC_id]=1;
|
||||
break;
|
||||
case 25:
|
||||
min_rb_unit[CC_id]=2;
|
||||
break;
|
||||
case 50:
|
||||
min_rb_unit[CC_id]=3;
|
||||
break;
|
||||
case 100:
|
||||
min_rb_unit[CC_id]=4;
|
||||
break;
|
||||
default:
|
||||
min_rb_unit[CC_id]=2;
|
||||
break;
|
||||
}
|
||||
|
||||
// Initialize scheduling information for all active UEs
|
||||
|
||||
frame_parms[CC_id] = mac_xface->get_lte_frame_parms(Mod_id,CC_id);
|
||||
min_rb_unit[CC_id]=get_min_rb_unit(Mod_id,CC_id);
|
||||
|
||||
for (i=UE_list->head;i>=0;i=UE_list->next[i]) {
|
||||
UE_id = i;
|
||||
|
||||
nb_rbs_required[CC_id][UE_id] = 0;
|
||||
dl_pow_off[CC_id][UE_id] =2;
|
||||
pre_nb_available_rbs[CC_id][UE_id] = 0;
|
||||
nb_rbs_required_remaining[CC_id][UE_id] = 0;
|
||||
for(j=0;j<N_RBGS[CC_id];j++)
|
||||
{
|
||||
MIMO_mode_indicator[CC_id][j] = 2;
|
||||
rballoc_sub[CC_id][j] = 0;
|
||||
rballoc_sub_UE[CC_id][UE_id][j] = 0;
|
||||
}
|
||||
// Initialize scheduling information for all active UEs
|
||||
dlsch_scheduler_pre_processor_reset(UE_id,
|
||||
CC_id,
|
||||
N_RBG[CC_id],
|
||||
dl_pow_off,
|
||||
nb_rbs_required,
|
||||
pre_nb_available_rbs,
|
||||
nb_rbs_required_remaining,
|
||||
rballoc_sub_UE,
|
||||
rballoc_sub,
|
||||
MIMO_mode_indicator);
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
// Store the DLSCH buffer for each logical channel
|
||||
store_dlsch_buffer (Mod_id,frameP,subframeP);
|
||||
|
||||
@@ -453,7 +385,7 @@ void dlsch_scheduler_pre_processor (module_id_t Mod_id,
|
||||
// Sorts the user on the basis of dlsch logical channel buffer and CQI
|
||||
sort_UEs (Mod_id,subframeP);
|
||||
|
||||
|
||||
total_ue_count =0;
|
||||
// loop over all active UEs
|
||||
for (i=UE_list->head;i>=0;i=UE_list->next[i]) {
|
||||
|
||||
@@ -467,7 +399,6 @@ void dlsch_scheduler_pre_processor (module_id_t Mod_id,
|
||||
for (ii=0;ii<UE_num_active_CC(UE_list,UE_id);ii++) {
|
||||
CC_id = UE_list->ordered_CCids[ii][UE_id];
|
||||
|
||||
total_ue_count[CC_id]=0;
|
||||
average_rbs_per_user[CC_id]=0;
|
||||
|
||||
|
||||
@@ -476,9 +407,10 @@ void dlsch_scheduler_pre_processor (module_id_t Mod_id,
|
||||
nb_rbs_required[CC_id][UE_id] = UE_list->UE_template[CC_id][UE_id].nb_rb[harq_pid];
|
||||
//nb_rbs_required_remaining[UE_id] = nb_rbs_required[UE_id];
|
||||
if (nb_rbs_required[CC_id][UE_id] > 0) {
|
||||
total_ue_count[CC_id] = total_ue_count[CC_id] + 1;
|
||||
total_ue_count = total_ue_count + 1;
|
||||
}
|
||||
|
||||
|
||||
// hypotetical assignement
|
||||
/*
|
||||
* If schedule is enabled and if the priority of the UEs is modified
|
||||
@@ -489,14 +421,17 @@ void dlsch_scheduler_pre_processor (module_id_t Mod_id,
|
||||
* per user by a coefficient which represents the degree of priority.
|
||||
*/
|
||||
|
||||
|
||||
if((total_ue_count[CC_id] > 0) && ( min_rb_unit[CC_id] * total_ue_count[CC_id] <= PHY_vars_eNB_g[Mod_id][CC_id]->lte_frame_parms.N_RB_DL ) )
|
||||
average_rbs_per_user[CC_id] = (uint16_t) ceil(PHY_vars_eNB_g[Mod_id][CC_id]->lte_frame_parms.N_RB_DL/total_ue_count[CC_id]);
|
||||
if (total_ue_count == 0)
|
||||
average_rbs_per_user[CC_id] = 0;
|
||||
else if( (min_rb_unit[CC_id] * total_ue_count) <= (frame_parms[CC_id]->N_RB_DL) )
|
||||
average_rbs_per_user[CC_id] = (uint16_t) ceil(frame_parms[CC_id]->N_RB_DL/total_ue_count);
|
||||
else
|
||||
average_rbs_per_user[CC_id] = min_rb_unit[CC_id];
|
||||
}
|
||||
}
|
||||
|
||||
// note: nb_rbs_required is assigned according to total_buffer_dl
|
||||
// extend nb_rbs_required to capture per LCID RB required
|
||||
for(i=UE_list->head;i>=0;i=UE_list->next[i]){
|
||||
for (ii=0;ii<UE_num_active_CC(UE_list,UE_id);ii++) {
|
||||
CC_id = UE_list->ordered_CCids[ii][UE_id];
|
||||
@@ -508,7 +443,6 @@ void dlsch_scheduler_pre_processor (module_id_t Mod_id,
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
//Allocation to UEs is done in 2 rounds,
|
||||
// 1st round: average number of RBs allocated to each UE
|
||||
// 2nd round: remaining RBs are allocated to high priority UEs
|
||||
@@ -517,165 +451,69 @@ void dlsch_scheduler_pre_processor (module_id_t Mod_id,
|
||||
for(i=UE_list->head; i>=0;i=UE_list->next[i]) {
|
||||
for (ii=0;ii<UE_num_active_CC(UE_list,UE_id);ii++) {
|
||||
CC_id = UE_list->ordered_CCids[ii][UE_id];
|
||||
|
||||
|
||||
if(r1 == 0)
|
||||
nb_rbs_required_remaining[CC_id][i] = nb_rbs_required_remaining_1[CC_id][i];
|
||||
else // rb required based only on the buffer - rb allloctaed in the 1st round + extra reaming rb form the 1st round
|
||||
nb_rbs_required_remaining[CC_id][i] = nb_rbs_required[CC_id][i]-nb_rbs_required_remaining_1[CC_id][i]+nb_rbs_required_remaining[CC_id][i];
|
||||
|
||||
LOG_D(MAC,"round %d : nb_rbs_required_remaining[%d][%d]= %d (remaining_1 %d, required %d, pre_nb_available_rbs %d, N_RBG %d, rb_unit %d)\n",
|
||||
r1, CC_id, i,
|
||||
nb_rbs_required_remaining[CC_id][i],
|
||||
nb_rbs_required_remaining_1[CC_id][i],
|
||||
nb_rbs_required[CC_id][i],
|
||||
pre_nb_available_rbs[CC_id][i],
|
||||
N_RBG[CC_id],
|
||||
min_rb_unit[CC_id]);
|
||||
|
||||
}
|
||||
}
|
||||
// retransmission in control channels
|
||||
for(i=UE_list->head; i>=0;i=UE_list->next[i]) {
|
||||
UE_id = i;
|
||||
for (ii=0;ii<UE_num_active_CC(UE_list,UE_id);ii++) {
|
||||
CC_id = UE_list->ordered_CCids[ii][UE_id];
|
||||
|
||||
if (total_ue_count > 0 ) {
|
||||
for(i=UE_list->head; i>=0;i=UE_list->next[i]) {
|
||||
UE_id = i;
|
||||
for (ii=0;ii<UE_num_active_CC(UE_list,UE_id);ii++) {
|
||||
CC_id = UE_list->ordered_CCids[ii][UE_id];
|
||||
|
||||
|
||||
rnti = UE_RNTI(Mod_id,UE_id);
|
||||
if(rnti == 0)
|
||||
continue;
|
||||
mac_xface->get_ue_active_harq_pid(Mod_id,CC_id,rnti,subframeP,&harq_pid,&round,0);
|
||||
|
||||
if ((mac_get_rrc_status(Mod_id,1,UE_id) < RRC_RECONFIGURED) && (round >0)) {
|
||||
for(j=0;j<N_RBGS[CC_id];j++){
|
||||
rnti = UE_RNTI(Mod_id,UE_id);
|
||||
// LOG_D(MAC,"UE %d rnti 0x\n", UE_id, rnti );
|
||||
if(rnti == 0)
|
||||
continue;
|
||||
transmission_mode = mac_xface->get_transmission_mode(Mod_id,CC_id,rnti);
|
||||
mac_xface->get_ue_active_harq_pid(Mod_id,CC_id,rnti,subframeP,&harq_pid,&round,0);
|
||||
rrc_status = mac_get_rrc_status(Mod_id,1,UE_id);
|
||||
/* 1st allocate for the retx */
|
||||
|
||||
// retransmission in data channels
|
||||
// control channel in the 1st transmission
|
||||
// data channel for all TM
|
||||
LOG_D(MAC,"calling dlsch_scheduler_pre_processor_allocate .. \n ");
|
||||
dlsch_scheduler_pre_processor_allocate (Mod_id,
|
||||
UE_id,
|
||||
CC_id,
|
||||
N_RBG[CC_id],
|
||||
transmission_mode,
|
||||
min_rb_unit[CC_id],
|
||||
frame_parms[CC_id]->N_RB_DL,
|
||||
dl_pow_off,
|
||||
nb_rbs_required,
|
||||
pre_nb_available_rbs,
|
||||
nb_rbs_required_remaining,
|
||||
rballoc_sub_UE,
|
||||
rballoc_sub,
|
||||
MIMO_mode_indicator);
|
||||
|
||||
#ifdef TM5
|
||||
// data chanel TM5: to be revisted
|
||||
if ((round == 0 ) &&
|
||||
(transmission_mode == 5) &&
|
||||
(dl_pow_off[CC_id][UE_id] != 1)){
|
||||
|
||||
for(j=0;j<N_RBG[CC_id];j+=2) {
|
||||
|
||||
if((rballoc_sub[CC_id][j] == 0) && (rballoc_sub_UE[CC_id][UE_id][j] == 0) && (nb_rbs_required_remaining[UE_id]>0)){
|
||||
|
||||
rballoc_sub[CC_id][j] = 1;
|
||||
rballoc_sub_UE[CC_id][UE_id][j] = 1;
|
||||
|
||||
MIMO_mode_indicator[CC_id][j] = 1;
|
||||
|
||||
if(mac_xface->get_transmission_mode(Mod_id,CC_id,rnti)==5)
|
||||
dl_pow_off[CC_id][UE_id] = 1;
|
||||
// if the total rb is odd
|
||||
if ((j == N_RBGS[CC_id]-1) &&
|
||||
((PHY_vars_eNB_g[Mod_id][CC_id]->lte_frame_parms.N_RB_DL == 25)||
|
||||
(PHY_vars_eNB_g[Mod_id][CC_id]->lte_frame_parms.N_RB_DL == 50))) {
|
||||
nb_rbs_required_remaining[CC_id][UE_id] = nb_rbs_required_remaining[CC_id][UE_id] - min_rb_unit[CC_id]+1;
|
||||
pre_nb_available_rbs[CC_id][UE_id] = pre_nb_available_rbs[CC_id][UE_id] + min_rb_unit[CC_id] - 1;
|
||||
}
|
||||
else {
|
||||
nb_rbs_required_remaining[CC_id][UE_id] = nb_rbs_required_remaining[CC_id][UE_id] - min_rb_unit[CC_id];
|
||||
pre_nb_available_rbs[CC_id][UE_id] = pre_nb_available_rbs[CC_id][UE_id] + min_rb_unit[CC_id];
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
// retransmission in data channels
|
||||
|
||||
for(i=UE_list->head; i>=0;i=UE_list->next[i]) {
|
||||
UE_id = i;
|
||||
for (ii=0;ii<UE_num_active_CC(UE_list,UE_id);ii++) {
|
||||
CC_id = UE_list->ordered_CCids[ii][UE_id];
|
||||
|
||||
rnti = UE_RNTI(Mod_id,UE_id);
|
||||
if(rnti == 0)
|
||||
continue;
|
||||
mac_xface->get_ue_active_harq_pid(Mod_id,CC_id,rnti,subframeP,&harq_pid,&round,0);
|
||||
|
||||
if ((mac_get_rrc_status(Mod_id,1,UE_id) >= RRC_RECONFIGURED) && (round > 0)) {
|
||||
|
||||
for(j=0;j<N_RBGS[CC_id];j++){
|
||||
|
||||
if((rballoc_sub[CC_id][j] == 0) && (rballoc_sub_UE[CC_id][UE_id][j] == 0) && (nb_rbs_required_remaining[UE_id]>0)){
|
||||
|
||||
rballoc_sub[CC_id][j] = 1;
|
||||
rballoc_sub_UE[CC_id][UE_id][j] = 1;
|
||||
|
||||
MIMO_mode_indicator[CC_id][j] = 1;
|
||||
|
||||
if(mac_xface->get_transmission_mode(Mod_id,CC_id,rnti)==5)
|
||||
dl_pow_off[CC_id][UE_id] = 1;
|
||||
|
||||
if((j == N_RBGS[CC_id]-1) &&
|
||||
((PHY_vars_eNB_g[Mod_id][CC_id]->lte_frame_parms.N_RB_DL == 25)||
|
||||
(PHY_vars_eNB_g[Mod_id][CC_id]->lte_frame_parms.N_RB_DL == 50))){
|
||||
nb_rbs_required_remaining[CC_id][UE_id] = nb_rbs_required_remaining[CC_id][UE_id] - min_rb_unit[CC_id] + 1;
|
||||
pre_nb_available_rbs[CC_id][UE_id] = pre_nb_available_rbs[CC_id][UE_id] + min_rb_unit[CC_id] - 1;
|
||||
}
|
||||
else {
|
||||
nb_rbs_required_remaining[CC_id][UE_id] = nb_rbs_required_remaining[CC_id][UE_id] - min_rb_unit[CC_id];
|
||||
pre_nb_available_rbs[CC_id][UE_id] = pre_nb_available_rbs[CC_id][UE_id] + min_rb_unit[CC_id];
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// control channel in the 1st transmission
|
||||
|
||||
for(i=UE_list->head; i>=0;i=UE_list->next[i]) {
|
||||
UE_id = i;
|
||||
for (ii=0;ii<UE_num_active_CC(UE_list,UE_id);ii++) {
|
||||
CC_id = UE_list->ordered_CCids[ii][UE_id];
|
||||
|
||||
|
||||
rnti = UE_RNTI(Mod_id,UE_id);
|
||||
if(rnti == 0)
|
||||
continue;
|
||||
mac_xface->get_ue_active_harq_pid(Mod_id,CC_id,rnti,subframeP,&harq_pid,&round,0);
|
||||
|
||||
if ((mac_get_rrc_status(Mod_id,1,UE_id) < RRC_RECONFIGURED) && (round == 0)) {
|
||||
|
||||
|
||||
|
||||
|
||||
for(j=0;j<N_RBGS[CC_id];j++){
|
||||
|
||||
if((rballoc_sub[CC_id][j] == 0) && (rballoc_sub_UE[CC_id][UE_id][j] == 0) && (nb_rbs_required_remaining[CC_id][UE_id]>0)){
|
||||
|
||||
rballoc_sub[CC_id][j] = 1;
|
||||
rballoc_sub_UE[CC_id][UE_id][j] = 1;
|
||||
|
||||
MIMO_mode_indicator[CC_id][j] = 1;
|
||||
|
||||
if(mac_xface->get_transmission_mode(Mod_id,CC_id,rnti)==5)
|
||||
dl_pow_off[CC_id][UE_id] = 1;
|
||||
|
||||
if((j == N_RBGS[CC_id]-1) &&
|
||||
((PHY_vars_eNB_g[Mod_id][CC_id]->lte_frame_parms.N_RB_DL == 25)||
|
||||
(PHY_vars_eNB_g[Mod_id][CC_id]->lte_frame_parms.N_RB_DL == 50))){
|
||||
nb_rbs_required_remaining[CC_id][UE_id] = nb_rbs_required_remaining[CC_id][UE_id] - min_rb_unit[CC_id] + 1;
|
||||
pre_nb_available_rbs[CC_id][UE_id] = pre_nb_available_rbs[CC_id][UE_id] + min_rb_unit[CC_id] - 1;
|
||||
}
|
||||
else {
|
||||
nb_rbs_required_remaining[CC_id][UE_id] = nb_rbs_required_remaining[CC_id][UE_id] - min_rb_unit[CC_id];
|
||||
pre_nb_available_rbs[CC_id][UE_id] = pre_nb_available_rbs[CC_id][UE_id] + min_rb_unit[CC_id];
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
// data chanel TM5
|
||||
for(i=UE_list->head; i>=0;i=UE_list->next[i]) {
|
||||
UE_id = i;
|
||||
for (ii=0;ii<UE_num_active_CC(UE_list,UE_id);ii++) {
|
||||
CC_id = UE_list->ordered_CCids[ii][UE_id];
|
||||
|
||||
|
||||
rnti1 = UE_RNTI(Mod_id,UE_id);
|
||||
if(rnti1 == 0)
|
||||
continue;
|
||||
|
||||
eNB_UE_stats1 = mac_xface->get_eNB_UE_stats(Mod_id,CC_id,rnti1);
|
||||
|
||||
mac_xface->get_ue_active_harq_pid(Mod_id,CC_id,rnti1,subframeP,&harq_pid1,&round1,0);
|
||||
|
||||
if ((mac_get_rrc_status(Mod_id,1,UE_id) >= RRC_RECONFIGURED) && (round1==0) && (mac_xface->get_transmission_mode(Mod_id,CC_id,rnti1)==5) && (dl_pow_off[CC_id][UE_id] != 1)) {
|
||||
|
||||
|
||||
for(j=0;j<N_RBGS[CC_id];j+=2){
|
||||
|
||||
if((((j == (N_RBGS[CC_id]-1))&& (rballoc_sub[CC_id][j] == 0) && (rballoc_sub_UE[CC_id][UE_id][j] == 0)) || ((j < (N_RBGS[CC_id]-1)) && (rballoc_sub[CC_id][j+1] == 0) && (rballoc_sub_UE[CC_id][UE_id][j+1] == 0))) && (nb_rbs_required_remaining[CC_id][UE_id]>0)){
|
||||
if( (((j == (N_RBG[CC_id]-1))&& (rballoc_sub[CC_id][j] == 0) && (rballoc_sub_UE[CC_id][UE_id][j] == 0)) ||
|
||||
((j < (N_RBG[CC_id]-1)) && (rballoc_sub[CC_id][j+1] == 0) && (rballoc_sub_UE[CC_id][UE_id][j+1] == 0)) ) &&
|
||||
(nb_rbs_required_remaining[CC_id][UE_id]>0)){
|
||||
|
||||
for (ii = UE_list->next[i+1];ii >=0;ii=UE_list->next[ii]) {
|
||||
|
||||
@@ -687,9 +525,14 @@ void dlsch_scheduler_pre_processor (module_id_t Mod_id,
|
||||
eNB_UE_stats2 = mac_xface->get_eNB_UE_stats(Mod_id,CC_id,rnti2);
|
||||
mac_xface->get_ue_active_harq_pid(Mod_id,CC_id,rnti2,subframeP,&harq_pid2,&round2,0);
|
||||
|
||||
if ((mac_get_rrc_status(Mod_id,1,UE_id2) >= RRC_RECONFIGURED) && (round2==0) && (mac_xface->get_transmission_mode(Mod_id,CC_id,rnti2)==5) && (dl_pow_off[CC_id][UE_id2] != 1)) {
|
||||
if ((mac_get_rrc_status(Mod_id,1,UE_id2) >= RRC_RECONFIGURED) &&
|
||||
(round2==0) &&
|
||||
(mac_xface->get_transmission_mode(Mod_id,CC_id,rnti2)==5) &&
|
||||
(dl_pow_off[CC_id][UE_id2] != 1)) {
|
||||
|
||||
if((((j == (N_RBGS[CC_id]-1)) && (rballoc_sub_UE[CC_id][UE_id2][j] == 0)) || ((j < (N_RBGS[CC_id]-1)) && (rballoc_sub_UE[CC_id][UE_id2][j+1] == 0))) && (nb_rbs_required_remaining[CC_id][UE_id2]>0)){
|
||||
if( (((j == (N_RBG[CC_id]-1)) && (rballoc_sub_UE[CC_id][UE_id2][j] == 0)) ||
|
||||
((j < (N_RBG[CC_id]-1)) && (rballoc_sub_UE[CC_id][UE_id2][j+1] == 0)) ) &&
|
||||
(nb_rbs_required_remaining[CC_id][UE_id2]>0)){
|
||||
|
||||
if((((eNB_UE_stats2->DL_pmi_single^eNB_UE_stats1->DL_pmi_single)<<(14-j))&0xc000)== 0x4000){ //MU-MIMO only for 25 RBs configuration
|
||||
|
||||
@@ -698,7 +541,7 @@ void dlsch_scheduler_pre_processor (module_id_t Mod_id,
|
||||
rballoc_sub_UE[CC_id][UE_id2][j] = 1;
|
||||
MIMO_mode_indicator[CC_id][j] = 0;
|
||||
|
||||
if (j< N_RBGS[CC_id]-1) {
|
||||
if (j< N_RBG[CC_id]-1) {
|
||||
rballoc_sub[CC_id][j+1] = 1;
|
||||
rballoc_sub_UE[CC_id][UE_id][j+1] = 1;
|
||||
rballoc_sub_UE[CC_id][UE_id2][j+1] = 1;
|
||||
@@ -709,9 +552,7 @@ void dlsch_scheduler_pre_processor (module_id_t Mod_id,
|
||||
dl_pow_off[CC_id][UE_id2] = 0;
|
||||
|
||||
|
||||
|
||||
|
||||
if ((j == N_RBGS[CC_id]-1) &&
|
||||
if ((j == N_RBG[CC_id]-1) &&
|
||||
((PHY_vars_eNB_g[Mod_id][CC_id]->lte_frame_parms.N_RB_DL == 25) ||
|
||||
(PHY_vars_eNB_g[Mod_id][CC_id]->lte_frame_parms.N_RB_DL == 50))){
|
||||
nb_rbs_required_remaining[CC_id][UE_id] = nb_rbs_required_remaining[CC_id][UE_id] - min_rb_unit[CC_id]+1;
|
||||
@@ -730,93 +571,21 @@ void dlsch_scheduler_pre_processor (module_id_t Mod_id,
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
#endif
|
||||
}
|
||||
}
|
||||
}
|
||||
// data channel for all TM
|
||||
|
||||
for(i=UE_list->head; i>=0;i=UE_list->next[i]) {
|
||||
for (ii=0;ii<UE_num_active_CC(UE_list,UE_id);ii++) {
|
||||
CC_id = UE_list->ordered_CCids[ii][UE_id];
|
||||
UE_id = i;
|
||||
|
||||
rnti = UE_RNTI(Mod_id,UE_id);
|
||||
if (rnti == 0)
|
||||
continue;
|
||||
|
||||
mac_xface->get_ue_active_harq_pid(Mod_id,CC_id,rnti,subframeP,&harq_pid,&round,0);
|
||||
|
||||
if ((mac_get_rrc_status(Mod_id,1,UE_id) >= RRC_RECONFIGURED) && (round==0)) {
|
||||
|
||||
|
||||
for(j=0;j<N_RBGS[CC_id];j++){
|
||||
|
||||
if((rballoc_sub[CC_id][j] == 0) && (rballoc_sub_UE[CC_id][UE_id][j] == 0) && (nb_rbs_required_remaining[CC_id][UE_id]>0)){
|
||||
|
||||
|
||||
switch (mac_xface->get_transmission_mode(Mod_id,CC_id,rnti)) {
|
||||
case 1:
|
||||
case 2:
|
||||
case 4:
|
||||
case 6:
|
||||
rballoc_sub[CC_id][j] = 1;
|
||||
rballoc_sub_UE[CC_id][UE_id][j] = 1;
|
||||
|
||||
MIMO_mode_indicator[CC_id][j] = 1;
|
||||
|
||||
if((j == N_RBGS[CC_id]-1) &&
|
||||
((PHY_vars_eNB_g[Mod_id][CC_id]->lte_frame_parms.N_RB_DL == 25)||
|
||||
(PHY_vars_eNB_g[Mod_id][CC_id]->lte_frame_parms.N_RB_DL == 50))){
|
||||
nb_rbs_required_remaining[CC_id][UE_id] = nb_rbs_required_remaining[CC_id][UE_id] - min_rb_unit[CC_id]+1;
|
||||
pre_nb_available_rbs[CC_id][UE_id] = pre_nb_available_rbs[CC_id][UE_id] +min_rb_unit[CC_id]-1;
|
||||
}
|
||||
else {
|
||||
nb_rbs_required_remaining[CC_id][UE_id] = nb_rbs_required_remaining[CC_id][UE_id] - min_rb_unit[CC_id];
|
||||
pre_nb_available_rbs[CC_id][UE_id] = pre_nb_available_rbs[CC_id][UE_id] + min_rb_unit[CC_id];
|
||||
}
|
||||
|
||||
break;
|
||||
case 5:
|
||||
if (dl_pow_off[CC_id][UE_id] != 0){
|
||||
|
||||
dl_pow_off[CC_id][UE_id] = 1;
|
||||
|
||||
rballoc_sub[CC_id][j] = 1;
|
||||
rballoc_sub_UE[CC_id][UE_id][j] = 1;
|
||||
|
||||
MIMO_mode_indicator[CC_id][j] = 1;
|
||||
|
||||
if((j == N_RBGS[CC_id]-1) &&
|
||||
((PHY_vars_eNB_g[Mod_id][CC_id]->lte_frame_parms.N_RB_DL == 25)||
|
||||
(PHY_vars_eNB_g[Mod_id][CC_id]->lte_frame_parms.N_RB_DL == 50))){
|
||||
nb_rbs_required_remaining[CC_id][UE_id] = nb_rbs_required_remaining[CC_id][UE_id] - min_rb_unit[CC_id]+1;
|
||||
pre_nb_available_rbs[CC_id][UE_id] = pre_nb_available_rbs[CC_id][UE_id] + min_rb_unit[CC_id]-1;
|
||||
}
|
||||
else {
|
||||
nb_rbs_required_remaining[CC_id][UE_id] = nb_rbs_required_remaining[CC_id][UE_id] - min_rb_unit[CC_id];
|
||||
pre_nb_available_rbs[CC_id][UE_id] = pre_nb_available_rbs[CC_id][UE_id] + min_rb_unit[CC_id];
|
||||
}
|
||||
}
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
} // total_ue_count
|
||||
} // end of for for r1 and r2
|
||||
#ifdef TM5
|
||||
// This has to be revisited!!!!
|
||||
for (CC_id=0;CC_id<MAX_NUM_CCs;CC_id++) {
|
||||
i1=0;
|
||||
i2=0;
|
||||
i3=0;
|
||||
for (j=0;j<N_RBGS[CC_id];j++){
|
||||
for (j=0;j<N_RBG[CC_id];j++){
|
||||
if(MIMO_mode_indicator[CC_id][j] == 2)
|
||||
i1 = i1+1;
|
||||
else if(MIMO_mode_indicator[CC_id][j] == 1)
|
||||
@@ -824,21 +593,20 @@ void dlsch_scheduler_pre_processor (module_id_t Mod_id,
|
||||
else if(MIMO_mode_indicator[CC_id][j] == 0)
|
||||
i3 = i3+1;
|
||||
}
|
||||
|
||||
|
||||
if((i1 < N_RBGS[CC_id]) && (i2>0) && (i3==0))
|
||||
if((i1 < N_RBG[CC_id]) && (i2>0) && (i3==0))
|
||||
PHY_vars_eNB_g[Mod_id][CC_id]->check_for_SUMIMO_transmissions = PHY_vars_eNB_g[Mod_id][CC_id]->check_for_SUMIMO_transmissions + 1;
|
||||
|
||||
if(i3 == N_RBGS[CC_id] && i1==0 && i2==0)
|
||||
if(i3 == N_RBG[CC_id] && i1==0 && i2==0)
|
||||
PHY_vars_eNB_g[Mod_id][CC_id]->FULL_MUMIMO_transmissions = PHY_vars_eNB_g[Mod_id][CC_id]->FULL_MUMIMO_transmissions + 1;
|
||||
|
||||
if((i1 < N_RBGS[CC_id]) && (i3 > 0))
|
||||
if((i1 < N_RBG[CC_id]) && (i3 > 0))
|
||||
PHY_vars_eNB_g[Mod_id][CC_id]->check_for_MUMIMO_transmissions = PHY_vars_eNB_g[Mod_id][CC_id]->check_for_MUMIMO_transmissions + 1;
|
||||
|
||||
PHY_vars_eNB_g[Mod_id][CC_id]->check_for_total_transmissions = PHY_vars_eNB_g[Mod_id][CC_id]->check_for_total_transmissions + 1;
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
for(i=UE_list->head; i>=0;i=UE_list->next[i]) {
|
||||
for (ii=0;ii<UE_num_active_CC(UE_list,UE_id);ii++) {
|
||||
@@ -848,7 +616,7 @@ void dlsch_scheduler_pre_processor (module_id_t Mod_id,
|
||||
LOG_D(MAC,"******************Scheduling Information for UE%d ************************\n",UE_id);
|
||||
LOG_D(MAC,"dl power offset UE%d = %d \n",UE_id,dl_pow_off[CC_id][UE_id]);
|
||||
LOG_D(MAC,"***********RB Alloc for every subband for UE%d ***********\n",UE_id);
|
||||
for(j=0;j<N_RBGS[CC_id];j++){
|
||||
for(j=0;j<N_RBG[CC_id];j++){
|
||||
//PHY_vars_eNB_g[Mod_id]->mu_mimo_mode[UE_id].rballoc_sub[i] = rballoc_sub_UE[CC_id][UE_id][i];
|
||||
LOG_D(MAC,"RB Alloc for UE%d and Subband%d = %d\n",UE_id,j,rballoc_sub_UE[CC_id][UE_id][j]);
|
||||
}
|
||||
@@ -858,3 +626,80 @@ void dlsch_scheduler_pre_processor (module_id_t Mod_id,
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
void dlsch_scheduler_pre_processor_reset (int UE_id,
|
||||
uint8_t CC_id,
|
||||
int N_RBG,
|
||||
uint8_t dl_pow_off[MAX_NUM_CCs][NUMBER_OF_UE_MAX],
|
||||
uint16_t nb_rbs_required[MAX_NUM_CCs][NUMBER_OF_UE_MAX],
|
||||
uint16_t pre_nb_available_rbs[MAX_NUM_CCs][NUMBER_OF_UE_MAX],
|
||||
uint16_t nb_rbs_required_remaining[MAX_NUM_CCs][NUMBER_OF_UE_MAX],
|
||||
unsigned char rballoc_sub_UE[MAX_NUM_CCs][NUMBER_OF_UE_MAX][N_RBG_MAX],
|
||||
unsigned char rballoc_sub[MAX_NUM_CCs][13],
|
||||
unsigned char MIMO_mode_indicator[MAX_NUM_CCs][13]){
|
||||
int i;
|
||||
nb_rbs_required[CC_id][UE_id]=0;
|
||||
pre_nb_available_rbs[CC_id][UE_id] = 0;
|
||||
dl_pow_off[CC_id][UE_id] = 2;
|
||||
nb_rbs_required_remaining[CC_id][UE_id] = 0;
|
||||
for (i=0;i<N_RBG;i++){
|
||||
rballoc_sub_UE[CC_id][UE_id][i] = 0;
|
||||
rballoc_sub[CC_id][i] = 0;
|
||||
MIMO_mode_indicator[CC_id][i] = 2;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
void dlsch_scheduler_pre_processor_allocate (module_id_t Mod_id,
|
||||
int UE_id,
|
||||
uint8_t CC_id,
|
||||
int N_RBG,
|
||||
int transmission_mode,
|
||||
int min_rb_unit,
|
||||
uint8_t N_RB_DL,
|
||||
uint8_t dl_pow_off[MAX_NUM_CCs][NUMBER_OF_UE_MAX],
|
||||
uint16_t nb_rbs_required[MAX_NUM_CCs][NUMBER_OF_UE_MAX],
|
||||
uint16_t pre_nb_available_rbs[MAX_NUM_CCs][NUMBER_OF_UE_MAX],
|
||||
uint16_t nb_rbs_required_remaining[MAX_NUM_CCs][NUMBER_OF_UE_MAX],
|
||||
unsigned char rballoc_sub_UE[MAX_NUM_CCs][NUMBER_OF_UE_MAX][N_RBG_MAX],
|
||||
unsigned char rballoc_sub[MAX_NUM_CCs][13],
|
||||
unsigned char MIMO_mode_indicator[MAX_NUM_CCs][13]){
|
||||
|
||||
int i;
|
||||
|
||||
for(i=0;i<N_RBG;i++){
|
||||
|
||||
if((rballoc_sub[CC_id][i] == 0) &&
|
||||
(rballoc_sub_UE[CC_id][UE_id][i] == 0) &&
|
||||
(nb_rbs_required_remaining[UE_id]>0) &&
|
||||
(pre_nb_available_rbs[CC_id][UE_id] < nb_rbs_required[CC_id][UE_id])){
|
||||
|
||||
// if this UE is not scheduled for TM5
|
||||
if (dl_pow_off[CC_id][UE_id] != 0 ) {
|
||||
|
||||
rballoc_sub[CC_id][i] = 1;
|
||||
rballoc_sub_UE[CC_id][UE_id][i] = 1;
|
||||
MIMO_mode_indicator[CC_id][i] = 1;
|
||||
|
||||
if (transmission_mode == 5 )
|
||||
dl_pow_off[CC_id][UE_id] = 1;
|
||||
|
||||
if ((i == N_RBG-1) && ((N_RB_DL == 25) || (N_RB_DL == 50))) {
|
||||
nb_rbs_required_remaining[CC_id][UE_id] = nb_rbs_required_remaining[CC_id][UE_id] - min_rb_unit+1;
|
||||
pre_nb_available_rbs[CC_id][UE_id] = pre_nb_available_rbs[CC_id][UE_id] + min_rb_unit - 1;
|
||||
}
|
||||
else {
|
||||
nb_rbs_required_remaining[CC_id][UE_id] = nb_rbs_required_remaining[CC_id][UE_id] - min_rb_unit;
|
||||
pre_nb_available_rbs[CC_id][UE_id] = pre_nb_available_rbs[CC_id][UE_id] + min_rb_unit;
|
||||
}
|
||||
} // dl_pow_off[CC_id][UE_id] ! = 0
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -68,14 +68,14 @@ void schedule_SI(module_id_t module_idP,frame_t frameP,unsigned int *nprb,unsign
|
||||
@param frame Frame index
|
||||
@param subframe Subframe number on which to act
|
||||
*/
|
||||
int schedule_MBMS(module_id_t module_idP,frame_t frameP, sub_frame_t subframe);
|
||||
int schedule_MBMS(module_id_t module_idP,uint8_t CC_id, frame_t frameP, sub_frame_t subframe);
|
||||
|
||||
/** \brief check the mapping between sf allocation and sync area, Currently only supports 1:1 mapping
|
||||
@param Mod_id Instance ID of eNB
|
||||
@param mbsfn_sync_area index of mbsfn sync area
|
||||
@param[out] index of sf pattern
|
||||
*/
|
||||
int8_t get_mbsfn_sf_alloction (module_id_t module_idP, uint8_t mbsfn_sync_area);
|
||||
int8_t get_mbsfn_sf_alloction (module_id_t module_idP, uint8_t CC_id, uint8_t mbsfn_sync_area);
|
||||
|
||||
/** \brief check the mapping between sf allocation and sync area, Currently only supports 1:1 mapping
|
||||
@param Mod_id Instance ID of eNB
|
||||
@@ -170,6 +170,16 @@ void mac_top_cleanup(void);
|
||||
|
||||
void mac_UE_out_of_sync_ind(module_id_t module_idP,frame_t frameP, uint16_t eNB_index);
|
||||
|
||||
void dlsch_scheduler_pre_processor_reset (int UE_id,
|
||||
uint8_t CC_id,
|
||||
int N_RBG,
|
||||
uint8_t dl_pow_off[MAX_NUM_CCs][NUMBER_OF_UE_MAX],
|
||||
uint16_t nb_rbs_required[MAX_NUM_CCs][NUMBER_OF_UE_MAX],
|
||||
uint16_t pre_nb_available_rbs[MAX_NUM_CCs][NUMBER_OF_UE_MAX],
|
||||
uint16_t nb_rbs_required_remaining[MAX_NUM_CCs][NUMBER_OF_UE_MAX],
|
||||
unsigned char rballoc_sub_UE[MAX_NUM_CCs][NUMBER_OF_UE_MAX][N_RBG_MAX],
|
||||
unsigned char rballoc_sub[MAX_NUM_CCs][13],
|
||||
unsigned char MIMO_mode_indicator[MAX_NUM_CCs][13]);
|
||||
|
||||
// eNB functions
|
||||
/* \brief This function assigns pre-available RBS to each UE in specified sub-bands before scheduling is done
|
||||
@@ -188,10 +198,26 @@ void dlsch_scheduler_pre_processor (module_id_t module_idP,
|
||||
sub_frame_t subframe,
|
||||
uint8_t dl_pow_off[MAX_NUM_CCs][NUMBER_OF_UE_MAX],
|
||||
uint16_t pre_nb_available_rbs[MAX_NUM_CCs][NUMBER_OF_UE_MAX],
|
||||
int N_RBGS[MAX_NUM_CCs],
|
||||
unsigned char rballoc_sub_UE[MAX_NUM_CCs][NUMBER_OF_UE_MAX][N_RBGS_MAX],
|
||||
int N_RBG[MAX_NUM_CCs],
|
||||
unsigned char rballoc_sub_UE[MAX_NUM_CCs][NUMBER_OF_UE_MAX][N_RBG_MAX],
|
||||
int *mbsfn_flag);
|
||||
|
||||
|
||||
void dlsch_scheduler_pre_processor_allocate (module_id_t Mod_id,
|
||||
int UE_id,
|
||||
uint8_t CC_id,
|
||||
int N_RBG,
|
||||
int transmission_mode,
|
||||
int min_rb_unit,
|
||||
uint8_t N_RB_DL,
|
||||
uint8_t dl_pow_off[MAX_NUM_CCs][NUMBER_OF_UE_MAX],
|
||||
uint16_t nb_rbs_required[MAX_NUM_CCs][NUMBER_OF_UE_MAX],
|
||||
uint16_t pre_nb_available_rbs[MAX_NUM_CCs][NUMBER_OF_UE_MAX],
|
||||
uint16_t nb_rbs_required_remaining[MAX_NUM_CCs][NUMBER_OF_UE_MAX],
|
||||
unsigned char rballoc_sub_UE[MAX_NUM_CCs][NUMBER_OF_UE_MAX][N_RBG_MAX],
|
||||
unsigned char rballoc_sub[MAX_NUM_CCs][13],
|
||||
unsigned char MIMO_mode_indicator[MAX_NUM_CCs][13]);
|
||||
|
||||
/* \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. The resultant DCI_PDU is
|
||||
ready after returning from this call.
|
||||
@@ -268,7 +294,7 @@ uint8_t *get_dlsch_sdu(module_id_t module_idP,int CC_id,frame_t frameP,rnti_t rn
|
||||
@param mcs Pointer to mcs used by PHY (to be filled by MAC)
|
||||
@returns Pointer to MCH transport block and mcs for subframe
|
||||
*/
|
||||
MCH_PDU *get_mch_sdu(uint8_t Mod_id,uint32_t frame,sub_frame_t subframe);
|
||||
MCH_PDU *get_mch_sdu(uint8_t Mod_id,uint8_t CC_id, uint32_t frame,sub_frame_t subframe);
|
||||
|
||||
|
||||
//added for ALU icic purpose
|
||||
@@ -291,6 +317,12 @@ uint8_t process_ue_cqi (module_id_t module_idP, int UE_id);
|
||||
|
||||
int8_t find_active_UEs_with_traffic(module_id_t module_idP);
|
||||
|
||||
void set_ue_dai(sub_frame_t subframeP,
|
||||
uint8_t tdd_config,
|
||||
int UE_id,
|
||||
uint8_t CC_id,
|
||||
UE_list_t *UE_list);
|
||||
|
||||
uint8_t find_num_active_UEs_in_cbagroup(module_id_t module_idP, unsigned char group_id);
|
||||
uint8_t UE_is_to_be_scheduled(module_id_t module_idP,int CC_id,uint8_t UE_id);
|
||||
/** \brief Round-robin scheduler for ULSCH traffic.
|
||||
@@ -340,7 +372,7 @@ void mac_out_of_sync_ind(module_id_t module_idP, frame_t frameP, uint16_t CH_ind
|
||||
void ue_decode_si(module_id_t module_idP, int CC_id,frame_t frame, uint8_t CH_index, void *pdu, uint16_t len);
|
||||
|
||||
|
||||
void ue_send_sdu(module_id_t module_idP, int CC_id,frame_t frame, uint8_t *sdu,uint16_t sdu_len,uint8_t CH_index);
|
||||
void ue_send_sdu(module_id_t module_idP, uint8_t CC_id,frame_t frame, uint8_t *sdu,uint16_t sdu_len,uint8_t CH_index);
|
||||
|
||||
|
||||
#ifdef Rel10
|
||||
@@ -352,7 +384,7 @@ void ue_send_sdu(module_id_t module_idP, int CC_id,frame_t frame, uint8_t *sdu,u
|
||||
@param eNB_index Index of attached eNB
|
||||
@param sync_area the index of MBSFN sync area
|
||||
*/
|
||||
void ue_send_mch_sdu(module_id_t module_idP,frame_t frameP,uint8_t *sdu,uint16_t sdu_len,uint8_t eNB_index,uint8_t sync_area) ;
|
||||
void ue_send_mch_sdu(module_id_t module_idP,uint8_t CC_id, frame_t frameP,uint8_t *sdu,uint16_t sdu_len,uint8_t eNB_index,uint8_t sync_area) ;
|
||||
|
||||
/*\brief Function to check if UE PHY needs to decode MCH for MAC.
|
||||
@param Mod_id Index of protocol instance
|
||||
@@ -362,7 +394,7 @@ void ue_send_mch_sdu(module_id_t module_idP,frame_t frameP,uint8_t *sdu,uint16_t
|
||||
@param[out] sync_area return the sync area
|
||||
@param[out] mcch_active flag indicating whether this MCCH is active in this SF
|
||||
*/
|
||||
int ue_query_mch(uint8_t Mod_id,uint32_t frame,sub_frame_t subframe, uint8_t eNB_index, uint8_t *sync_area, uint8_t *mcch_active);
|
||||
int ue_query_mch(uint8_t Mod_id,uint8_t CC_id, uint32_t frame,sub_frame_t subframe, uint8_t eNB_index, uint8_t *sync_area, uint8_t *mcch_active);
|
||||
|
||||
#endif
|
||||
|
||||
@@ -447,6 +479,12 @@ int mac_init(void);
|
||||
int add_new_ue(module_id_t Mod_id, int CC_id, rnti_t rnti);
|
||||
int mac_remove_ue(module_id_t Mod_id, int UE_id);
|
||||
|
||||
void swap_UEs(UE_list_t *listP,int nodeiP, int nodejP);
|
||||
int prev(UE_list_t *listP, int nodeP);
|
||||
int UE_num_active_CC(UE_list_t *listP,int ue_idP);
|
||||
int UE_PCCID(module_id_t mod_idP,int ue_idP);
|
||||
rnti_t UE_RNTI(module_id_t mod_idP, int ue_idP);
|
||||
|
||||
/*! \fn UE_L2_state_t ue_scheduler(module_id_t module_idP,frame_t frameP, sub_frame_t subframe, lte_subframe_t direction,uint8_t eNB_index)
|
||||
\brief UE scheduler where all the ue background tasks are done. This function performs the following: 1) Trigger PDCP every 5ms 2) Call RRC for link status return to PHY3) Perform SR/BSR procedures for scheduling feedback 4) Perform PHR procedures.
|
||||
\param[in] module_idP instance of the UE
|
||||
@@ -609,5 +647,9 @@ void add_common_dci(DCI_PDU *DCI_pdu,
|
||||
|
||||
uint32_t allocate_prbs_sub(int nb_rb, uint8_t *rballoc);
|
||||
|
||||
void update_ul_dci(module_id_t module_idP,int CC_id,rnti_t rnti,uint8_t dai);
|
||||
void update_ul_dci(module_id_t module_idP,uint8_t CC_id,rnti_t rnti,uint8_t dai);
|
||||
|
||||
int get_min_rb_unit(module_id_t module_idP, uint8_t CC_id);
|
||||
|
||||
|
||||
#endif
|
||||
|
||||
@@ -274,7 +274,7 @@ uint32_t ue_get_SR(module_id_t module_idP,int CC_id,frame_t frameP,uint8_t eNB_i
|
||||
}
|
||||
}
|
||||
|
||||
void ue_send_sdu(module_id_t module_idP,int CC_id,frame_t frameP,uint8_t *sdu,uint16_t sdu_len,uint8_t eNB_index) {
|
||||
void ue_send_sdu(module_id_t module_idP, uint8_t CC_id,frame_t frameP,uint8_t *sdu,uint16_t sdu_len,uint8_t eNB_index) {
|
||||
|
||||
unsigned char rx_ces[MAX_NUM_CE],num_ce,num_sdu,i,*payload_ptr;
|
||||
unsigned char rx_lcids[NB_RB_MAX];
|
||||
@@ -489,7 +489,7 @@ unsigned char *parse_mch_header(unsigned char *mac_header,
|
||||
}
|
||||
|
||||
// this function is for sending mch_sdu from phy to mac
|
||||
void ue_send_mch_sdu(module_id_t module_idP, frame_t frameP, uint8_t *sdu, uint16_t sdu_len, uint8_t eNB_index, uint8_t sync_area) {
|
||||
void ue_send_mch_sdu(module_id_t module_idP, uint8_t CC_id, frame_t frameP, uint8_t *sdu, uint16_t sdu_len, uint8_t eNB_index, uint8_t sync_area) {
|
||||
|
||||
unsigned char num_sdu, i, *payload_ptr;
|
||||
unsigned char rx_lcids[NB_RB_MAX];
|
||||
@@ -570,7 +570,7 @@ int8_t ue_get_mbsfn_sf_alloction (module_id_t module_idP, uint8_t mbsfn_sync_are
|
||||
}
|
||||
}
|
||||
|
||||
int ue_query_mch(module_id_t module_idP, uint32_t frameP, uint32_t subframe, uint8_t eNB_index,uint8_t *sync_area, uint8_t *mcch_active) {
|
||||
int ue_query_mch(module_id_t module_idP, uint8_t CC_id, uint32_t frameP, uint32_t subframe, uint8_t eNB_index,uint8_t *sync_area, uint8_t *mcch_active) {
|
||||
|
||||
int i=0, j=0, ii=0, msi_pos=0, mcch_mcs = - 1;
|
||||
int mcch_flag=0, mtch_flag=0, msi_flag=0;
|
||||
|
||||
@@ -155,7 +155,9 @@ boolean_t pdcp_data_req(
|
||||
start_meas(&eNB_pdcp_stats[enb_mod_idP].data_req);
|
||||
else
|
||||
start_meas(&UE_pdcp_stats[ue_mod_idP].data_req);
|
||||
|
||||
|
||||
vcd_signal_dumper_dump_function_by_name(VCD_SIGNAL_DUMPER_FUNCTIONS_PDCP_DATA_REQ,VCD_FUNCTION_IN);
|
||||
|
||||
// PDCP transparent mode for MBMS traffic
|
||||
|
||||
if (modeP == PDCP_TRANSMISSION_MODE_TRANSPARENT) {
|
||||
@@ -230,6 +232,7 @@ boolean_t pdcp_data_req(
|
||||
stop_meas(&eNB_pdcp_stats[enb_mod_idP].data_req);
|
||||
else
|
||||
stop_meas(&UE_pdcp_stats[ue_mod_idP].data_req);
|
||||
vcd_signal_dumper_dump_function_by_name(VCD_SIGNAL_DUMPER_FUNCTIONS_PDCP_DATA_REQ,VCD_FUNCTION_OUT);
|
||||
return FALSE;
|
||||
}
|
||||
} else {
|
||||
@@ -243,6 +246,7 @@ boolean_t pdcp_data_req(
|
||||
stop_meas(&eNB_pdcp_stats[enb_mod_idP].data_req);
|
||||
else
|
||||
stop_meas(&UE_pdcp_stats[ue_mod_idP].data_req);
|
||||
vcd_signal_dumper_dump_function_by_name(VCD_SIGNAL_DUMPER_FUNCTIONS_PDCP_DATA_REQ,VCD_FUNCTION_OUT);
|
||||
return FALSE;
|
||||
}
|
||||
}
|
||||
@@ -258,6 +262,7 @@ boolean_t pdcp_data_req(
|
||||
stop_meas(&eNB_pdcp_stats[enb_mod_idP].data_req);
|
||||
else
|
||||
stop_meas(&UE_pdcp_stats[ue_mod_idP].data_req);
|
||||
vcd_signal_dumper_dump_function_by_name(VCD_SIGNAL_DUMPER_FUNCTIONS_PDCP_DATA_REQ,VCD_FUNCTION_OUT);
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
@@ -317,7 +322,8 @@ boolean_t pdcp_data_req(
|
||||
ue_mod_idP,
|
||||
rb_idP);
|
||||
#endif
|
||||
return FALSE;
|
||||
vcd_signal_dumper_dump_function_by_name(VCD_SIGNAL_DUMPER_FUNCTIONS_PDCP_DATA_REQ,VCD_FUNCTION_OUT);
|
||||
return FALSE;
|
||||
}
|
||||
/*
|
||||
* Ask sublayer to transmit data and check return value
|
||||
@@ -376,6 +382,7 @@ boolean_t pdcp_data_req(
|
||||
Pdcp_stats_tx_bytes[module_id][(rb_id & RAB_OFFSET2 )>> RAB_SHIFT2][(rb_id & RAB_OFFSET)-DTCH] += sdu_buffer_size;
|
||||
}
|
||||
}*/
|
||||
vcd_signal_dumper_dump_function_by_name(VCD_SIGNAL_DUMPER_FUNCTIONS_PDCP_DATA_REQ,VCD_FUNCTION_OUT);
|
||||
return ret;
|
||||
|
||||
}
|
||||
@@ -402,10 +409,7 @@ boolean_t pdcp_data_ind(
|
||||
uint8_t payload_offset = 0;
|
||||
rb_id_t rb_id = rb_idP;
|
||||
|
||||
if (enb_flagP)
|
||||
start_meas(&eNB_pdcp_stats[enb_mod_idP].data_ind);
|
||||
else
|
||||
start_meas(&UE_pdcp_stats[ue_mod_idP].data_ind);
|
||||
|
||||
|
||||
#ifdef OAI_EMU
|
||||
if (enb_flagP) {
|
||||
@@ -484,17 +488,19 @@ boolean_t pdcp_data_ind(
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
sdu_list_p = &pdcp_sdu_list;
|
||||
|
||||
if (sdu_buffer_sizeP == 0) {
|
||||
LOG_W(PDCP, "SDU buffer size is zero! Ignoring this chunk!\n");
|
||||
if (enb_flagP)
|
||||
stop_meas(&eNB_pdcp_stats[enb_mod_idP].data_ind);
|
||||
else
|
||||
stop_meas(&UE_pdcp_stats[ue_mod_idP].data_ind);
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
if (enb_flagP)
|
||||
start_meas(&eNB_pdcp_stats[enb_mod_idP].data_ind);
|
||||
else
|
||||
start_meas(&UE_pdcp_stats[ue_mod_idP].data_ind);
|
||||
vcd_signal_dumper_dump_function_by_name(VCD_SIGNAL_DUMPER_FUNCTIONS_PDCP_DATA_IND,VCD_FUNCTION_IN);
|
||||
|
||||
/*
|
||||
* Parse the PDU placed at the beginning of SDU to check
|
||||
@@ -531,6 +537,7 @@ boolean_t pdcp_data_ind(
|
||||
stop_meas(&eNB_pdcp_stats[enb_mod_idP].data_ind);
|
||||
else
|
||||
stop_meas(&UE_pdcp_stats[ue_mod_idP].data_ind);
|
||||
vcd_signal_dumper_dump_function_by_name(VCD_SIGNAL_DUMPER_FUNCTIONS_PDCP_DATA_IND,VCD_FUNCTION_OUT);
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
@@ -591,6 +598,7 @@ boolean_t pdcp_data_ind(
|
||||
stop_meas(&eNB_pdcp_stats[enb_mod_idP].data_ind);
|
||||
else
|
||||
stop_meas(&UE_pdcp_stats[ue_mod_idP].data_ind);
|
||||
vcd_signal_dumper_dump_function_by_name(VCD_SIGNAL_DUMPER_FUNCTIONS_PDCP_DATA_IND,VCD_FUNCTION_OUT);
|
||||
return TRUE;
|
||||
}
|
||||
/*
|
||||
@@ -649,7 +657,8 @@ boolean_t pdcp_data_ind(
|
||||
stop_meas(&eNB_pdcp_stats[enb_mod_idP].data_ind);
|
||||
else
|
||||
stop_meas(&UE_pdcp_stats[ue_mod_idP].data_ind);
|
||||
return TRUE;
|
||||
vcd_signal_dumper_dump_function_by_name(VCD_SIGNAL_DUMPER_FUNCTIONS_PDCP_DATA_IND,VCD_FUNCTION_OUT);
|
||||
return TRUE;
|
||||
}
|
||||
}
|
||||
#else
|
||||
@@ -660,6 +669,7 @@ boolean_t pdcp_data_ind(
|
||||
stop_meas(&eNB_pdcp_stats[enb_mod_idP].data_ind);
|
||||
else
|
||||
stop_meas(&UE_pdcp_stats[ue_mod_idP].data_ind);
|
||||
vcd_signal_dumper_dump_function_by_name(VCD_SIGNAL_DUMPER_FUNCTIONS_PDCP_DATA_IND,VCD_FUNCTION_OUT);
|
||||
return TRUE;
|
||||
}
|
||||
#endif
|
||||
@@ -739,6 +749,7 @@ boolean_t pdcp_data_ind(
|
||||
stop_meas(&eNB_pdcp_stats[enb_mod_idP].data_ind);
|
||||
else
|
||||
stop_meas(&UE_pdcp_stats[ue_mod_idP].data_ind);
|
||||
vcd_signal_dumper_dump_function_by_name(VCD_SIGNAL_DUMPER_FUNCTIONS_PDCP_DATA_IND,VCD_FUNCTION_OUT);
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
@@ -871,12 +882,13 @@ void pdcp_run (
|
||||
else
|
||||
stop_meas(&UE_pdcp_stats[ue_mod_idP].pdcp_ip);
|
||||
|
||||
vcd_signal_dumper_dump_function_by_name(VCD_SIGNAL_DUMPER_FUNCTIONS_PDCP_RUN, VCD_FUNCTION_OUT);
|
||||
if (enb_flagP)
|
||||
stop_meas(&eNB_pdcp_stats[enb_mod_idP].pdcp_run);
|
||||
else
|
||||
stop_meas(&UE_pdcp_stats[ue_mod_idP].pdcp_run);
|
||||
|
||||
vcd_signal_dumper_dump_function_by_name(VCD_SIGNAL_DUMPER_FUNCTIONS_PDCP_RUN, VCD_FUNCTION_OUT);
|
||||
|
||||
}
|
||||
|
||||
boolean_t rrc_pdcp_config_asn1_req (
|
||||
|
||||
@@ -39,6 +39,7 @@
|
||||
#include "../MAC/extern.h"
|
||||
#include "UTIL/LOG/log.h"
|
||||
#include "UTIL/OCG/OCG_vars.h"
|
||||
#include "UTIL/LOG/vcd_signal_dumper.h"
|
||||
|
||||
#include "assertions.h"
|
||||
|
||||
@@ -407,6 +408,8 @@ rlc_op_status_t rlc_data_req (const module_id_t enb_module_idP,
|
||||
DevCheck(MBMS_flagP == 0, MBMS_flagP, 0, 0);
|
||||
#endif
|
||||
|
||||
vcd_signal_dumper_dump_function_by_name(VCD_SIGNAL_DUMPER_FUNCTIONS_RLC_DATA_REQ,VCD_FUNCTION_IN);
|
||||
|
||||
#ifdef Rel10
|
||||
if (MBMS_flagP == TRUE) {
|
||||
if (enb_flagP) {
|
||||
@@ -451,6 +454,7 @@ rlc_op_status_t rlc_data_req (const module_id_t enb_module_idP,
|
||||
enb_module_idP,
|
||||
ue_module_idP,
|
||||
rb_idP);
|
||||
vcd_signal_dumper_dump_function_by_name(VCD_SIGNAL_DUMPER_FUNCTIONS_RLC_DATA_REQ,VCD_FUNCTION_OUT);
|
||||
return RLC_OP_STATUS_BAD_PARAMETER;
|
||||
|
||||
case RLC_MODE_AM:
|
||||
@@ -486,8 +490,10 @@ rlc_op_status_t rlc_data_req (const module_id_t enb_module_idP,
|
||||
rb_idP);
|
||||
LOG_D(RLC, "%s\n",RLC_FG_COLOR_DEFAULT);
|
||||
rlc_am_data_req(&rlc_union_p->rlc.am, frameP, new_sdu_p);
|
||||
vcd_signal_dumper_dump_function_by_name(VCD_SIGNAL_DUMPER_FUNCTIONS_RLC_DATA_REQ,VCD_FUNCTION_OUT);
|
||||
return RLC_OP_STATUS_OK;
|
||||
} else {
|
||||
vcd_signal_dumper_dump_function_by_name(VCD_SIGNAL_DUMPER_FUNCTIONS_RLC_DATA_REQ,VCD_FUNCTION_OUT);
|
||||
return RLC_OP_STATUS_INTERNAL_ERROR;
|
||||
}
|
||||
break;
|
||||
@@ -522,9 +528,11 @@ rlc_op_status_t rlc_data_req (const module_id_t enb_module_idP,
|
||||
rlc_um_data_req(&rlc_union_p->rlc.um, frameP, new_sdu_p);
|
||||
|
||||
//free_mem_block(new_sdu);
|
||||
vcd_signal_dumper_dump_function_by_name(VCD_SIGNAL_DUMPER_FUNCTIONS_RLC_DATA_REQ,VCD_FUNCTION_OUT);
|
||||
return RLC_OP_STATUS_OK;
|
||||
} else {
|
||||
return RLC_OP_STATUS_INTERNAL_ERROR;
|
||||
vcd_signal_dumper_dump_function_by_name(VCD_SIGNAL_DUMPER_FUNCTIONS_RLC_DATA_REQ,VCD_FUNCTION_OUT);
|
||||
return RLC_OP_STATUS_INTERNAL_ERROR;
|
||||
}
|
||||
break;
|
||||
|
||||
@@ -555,15 +563,18 @@ rlc_op_status_t rlc_data_req (const module_id_t enb_module_idP,
|
||||
rb_idP);
|
||||
LOG_D(RLC, "%s\n",RLC_FG_COLOR_DEFAULT);
|
||||
rlc_tm_data_req(&rlc_union_p->rlc.tm, new_sdu_p);
|
||||
vcd_signal_dumper_dump_function_by_name(VCD_SIGNAL_DUMPER_FUNCTIONS_RLC_DATA_REQ,VCD_FUNCTION_OUT);
|
||||
return RLC_OP_STATUS_OK;
|
||||
} else {
|
||||
//handle_event(ERROR,"FILE %s FONCTION rlc_data_req() LINE %s : out of memory\n", __FILE__, __LINE__);
|
||||
return RLC_OP_STATUS_INTERNAL_ERROR;
|
||||
vcd_signal_dumper_dump_function_by_name(VCD_SIGNAL_DUMPER_FUNCTIONS_RLC_DATA_REQ,VCD_FUNCTION_OUT);
|
||||
return RLC_OP_STATUS_INTERNAL_ERROR;
|
||||
}
|
||||
break;
|
||||
|
||||
default:
|
||||
free_mem_block(sdu_pP);
|
||||
vcd_signal_dumper_dump_function_by_name(VCD_SIGNAL_DUMPER_FUNCTIONS_RLC_DATA_REQ,VCD_FUNCTION_OUT);
|
||||
return RLC_OP_STATUS_INTERNAL_ERROR;
|
||||
|
||||
}
|
||||
@@ -598,14 +609,18 @@ rlc_op_status_t rlc_data_req (const module_id_t enb_module_idP,
|
||||
rlc_um_data_req(&rlc_union_p->rlc.um, frameP, new_sdu_p);
|
||||
|
||||
//free_mem_block(new_sdu);
|
||||
vcd_signal_dumper_dump_function_by_name(VCD_SIGNAL_DUMPER_FUNCTIONS_RLC_DATA_REQ,VCD_FUNCTION_OUT);
|
||||
return RLC_OP_STATUS_OK;
|
||||
} else {
|
||||
vcd_signal_dumper_dump_function_by_name(VCD_SIGNAL_DUMPER_FUNCTIONS_RLC_DATA_REQ,VCD_FUNCTION_OUT);
|
||||
return RLC_OP_STATUS_BAD_PARAMETER;
|
||||
}
|
||||
} else {
|
||||
vcd_signal_dumper_dump_function_by_name(VCD_SIGNAL_DUMPER_FUNCTIONS_RLC_DATA_REQ,VCD_FUNCTION_OUT);
|
||||
return RLC_OP_STATUS_BAD_PARAMETER;
|
||||
}
|
||||
} else {
|
||||
vcd_signal_dumper_dump_function_by_name(VCD_SIGNAL_DUMPER_FUNCTIONS_RLC_DATA_REQ,VCD_FUNCTION_OUT);
|
||||
return RLC_OP_STATUS_BAD_PARAMETER;
|
||||
}
|
||||
}
|
||||
@@ -614,6 +629,7 @@ rlc_op_status_t rlc_data_req (const module_id_t enb_module_idP,
|
||||
free_mem_block(sdu_pP);
|
||||
LOG_E(RLC, "MBMS_flag != 0 while Rel10 is not defined...\n");
|
||||
//handle_event(ERROR,"FILE %s FONCTION rlc_data_req() LINE %s : parameter module_id out of bounds :%d\n", __FILE__, __LINE__, module_idP);
|
||||
vcd_signal_dumper_dump_function_by_name(VCD_SIGNAL_DUMPER_FUNCTIONS_RLC_DATA_REQ,VCD_FUNCTION_OUT);
|
||||
return RLC_OP_STATUS_BAD_PARAMETER;
|
||||
}
|
||||
#endif
|
||||
|
||||
@@ -42,6 +42,7 @@
|
||||
#include "UTIL/OCG/OCG_vars.h"
|
||||
#include "hashtable.h"
|
||||
#include "assertions.h"
|
||||
#include "UTIL/LOG/vcd_signal_dumper.h"
|
||||
|
||||
#define DEBUG_MAC_INTERFACE 1
|
||||
|
||||
@@ -130,8 +131,7 @@ tbs_size_t mac_rlc_data_req(
|
||||
hash_key_t key = HASHTABLE_QUESTIONABLE_KEY_VALUE;
|
||||
hashtable_rc_t h_rc;
|
||||
srb_flag_t srb_flag = (channel_idP <= 2) ? SRB_FLAG_YES : SRB_FLAG_NO;
|
||||
|
||||
|
||||
tbs_size_t ret_tb_size = 0;
|
||||
#ifdef DEBUG_MAC_INTERFACE
|
||||
LOG_D(RLC, "\n[RLC] Inst %s enb id %d ue id %d: MAC_RLC_DATA_REQ channel %d (%d) MAX RB %d, Num_tb %d\n",
|
||||
(enb_flagP) ? "eNB" : "UE", enb_module_idP, ue_module_idP, channel_idP, RLC_MAX_LC, NB_RB_MAX);
|
||||
@@ -168,6 +168,7 @@ tbs_size_t mac_rlc_data_req(
|
||||
oai_emulation.info.first_ue_local);
|
||||
}
|
||||
#endif
|
||||
vcd_signal_dumper_dump_function_by_name(VCD_SIGNAL_DUMPER_FUNCTIONS_MAC_RLC_DATA_REQ,VCD_FUNCTION_IN);
|
||||
|
||||
if (MBMS_flagP) {
|
||||
if (enb_flagP) {
|
||||
@@ -195,25 +196,27 @@ tbs_size_t mac_rlc_data_req(
|
||||
|
||||
switch (rlc_mode) {
|
||||
case RLC_MODE_NONE:
|
||||
break;
|
||||
ret_tb_size =0;
|
||||
break;
|
||||
|
||||
case RLC_MODE_AM:
|
||||
data_request = rlc_am_mac_data_request(&rlc_union_p->rlc.am, frameP);
|
||||
return mac_rlc_serialize_tb(buffer_pP, data_request.data);
|
||||
break;
|
||||
ret_tb_size =mac_rlc_serialize_tb(buffer_pP, data_request.data);
|
||||
break;
|
||||
|
||||
case RLC_MODE_UM:
|
||||
data_request = rlc_um_mac_data_request(&rlc_union_p->rlc.um, frameP);
|
||||
return mac_rlc_serialize_tb(buffer_pP, data_request.data);
|
||||
ret_tb_size = mac_rlc_serialize_tb(buffer_pP, data_request.data);
|
||||
break;
|
||||
|
||||
case RLC_MODE_TM:
|
||||
data_request = rlc_tm_mac_data_request(&rlc_union_p->rlc.tm, frameP);
|
||||
return mac_rlc_serialize_tb(buffer_pP, data_request.data);
|
||||
break;
|
||||
ret_tb_size = mac_rlc_serialize_tb(buffer_pP, data_request.data);
|
||||
break;
|
||||
default:;
|
||||
}
|
||||
return (tbs_size_t)0;
|
||||
}
|
||||
vcd_signal_dumper_dump_function_by_name(VCD_SIGNAL_DUMPER_FUNCTIONS_MAC_RLC_DATA_REQ,VCD_FUNCTION_OUT);
|
||||
return ret_tb_size;
|
||||
}
|
||||
//-----------------------------------------------------------------------------
|
||||
void mac_rlc_data_ind (
|
||||
@@ -282,6 +285,9 @@ void mac_rlc_data_ind (
|
||||
oai_emulation.info.first_ue_local);
|
||||
}
|
||||
#endif
|
||||
|
||||
vcd_signal_dumper_dump_function_by_name(VCD_SIGNAL_DUMPER_FUNCTIONS_MAC_RLC_DATA_IND,VCD_FUNCTION_IN);
|
||||
|
||||
if (MBMS_flagP) {
|
||||
if (BOOL_NOT(enb_flagP)) {
|
||||
mbms_id_p = &rlc_mbms_lcid2service_session_id_ue[enb_module_idP][channel_idP];
|
||||
@@ -332,6 +338,9 @@ void mac_rlc_data_ind (
|
||||
rlc_tm_mac_data_indication(&rlc_union_p->rlc.tm, frameP, enb_flagP, data_ind);
|
||||
break;
|
||||
}
|
||||
|
||||
vcd_signal_dumper_dump_function_by_name(VCD_SIGNAL_DUMPER_FUNCTIONS_MAC_RLC_DATA_IND,VCD_FUNCTION_OUT);
|
||||
|
||||
}
|
||||
//-----------------------------------------------------------------------------
|
||||
mac_rlc_status_resp_t mac_rlc_status_ind(
|
||||
@@ -399,7 +408,9 @@ mac_rlc_status_resp_t mac_rlc_status_ind(
|
||||
oai_emulation.info.first_ue_local);
|
||||
}
|
||||
#endif
|
||||
|
||||
|
||||
vcd_signal_dumper_dump_function_by_name(VCD_SIGNAL_DUMPER_FUNCTIONS_MAC_RLC_STATUS_IND,VCD_FUNCTION_IN);
|
||||
|
||||
|
||||
if (MBMS_flagP) {
|
||||
if (enb_flagP) {
|
||||
@@ -428,7 +439,8 @@ mac_rlc_status_resp_t mac_rlc_status_ind(
|
||||
switch (rlc_mode) {
|
||||
case RLC_MODE_NONE:
|
||||
//handle_event(WARNING,"FILE %s FONCTION mac_rlc_data_ind() LINE %s : no radio bearer configured :%d\n", __FILE__, __LINE__, channel_idP);
|
||||
break;
|
||||
mac_rlc_status_resp.bytes_in_buffer = 0;
|
||||
break;
|
||||
|
||||
case RLC_MODE_AM:
|
||||
status_resp = rlc_am_mac_status_indication(&rlc_union_p->rlc.am, frameP, tb_sizeP, tx_status);
|
||||
@@ -436,7 +448,7 @@ mac_rlc_status_resp_t mac_rlc_status_ind(
|
||||
mac_rlc_status_resp.head_sdu_creation_time = status_resp.head_sdu_creation_time;
|
||||
mac_rlc_status_resp.head_sdu_remaining_size_to_send = status_resp.head_sdu_remaining_size_to_send;
|
||||
mac_rlc_status_resp.head_sdu_is_segmented = status_resp.head_sdu_is_segmented;
|
||||
return mac_rlc_status_resp;
|
||||
//return mac_rlc_status_resp;
|
||||
break;
|
||||
|
||||
case RLC_MODE_UM:
|
||||
@@ -446,18 +458,21 @@ mac_rlc_status_resp_t mac_rlc_status_ind(
|
||||
mac_rlc_status_resp.head_sdu_creation_time = status_resp.head_sdu_creation_time;
|
||||
mac_rlc_status_resp.head_sdu_remaining_size_to_send = status_resp.head_sdu_remaining_size_to_send;
|
||||
mac_rlc_status_resp.head_sdu_is_segmented = status_resp.head_sdu_is_segmented;
|
||||
return mac_rlc_status_resp;
|
||||
// return mac_rlc_status_resp;
|
||||
break;
|
||||
|
||||
case RLC_MODE_TM:
|
||||
status_resp = rlc_tm_mac_status_indication(&rlc_union_p->rlc.tm, frameP, tb_sizeP, tx_status);
|
||||
mac_rlc_status_resp.bytes_in_buffer = status_resp.buffer_occupancy_in_bytes;
|
||||
mac_rlc_status_resp.pdus_in_buffer = status_resp.buffer_occupancy_in_pdus;
|
||||
return mac_rlc_status_resp;
|
||||
// return mac_rlc_status_resp;
|
||||
break;
|
||||
|
||||
default:;
|
||||
default:
|
||||
mac_rlc_status_resp.bytes_in_buffer = 0 ;
|
||||
}
|
||||
|
||||
vcd_signal_dumper_dump_function_by_name(VCD_SIGNAL_DUMPER_FUNCTIONS_MAC_RLC_STATUS_IND,VCD_FUNCTION_OUT);
|
||||
return mac_rlc_status_resp;
|
||||
}
|
||||
|
||||
|
||||
@@ -85,28 +85,29 @@ int dump_eNB_l2_stats(char *buffer, int length){
|
||||
/* reset the values */
|
||||
eNB = &eNB_mac_inst[eNB_id];
|
||||
UE_list = &eNB->UE_list;
|
||||
|
||||
eNB->eNB_stats.dlsch_bitrate= 0;
|
||||
|
||||
len += sprintf(&buffer[len],"eNB %d Frame %d: Active UEs %d, Available PRBs %d, nCCE %d \n",
|
||||
eNB_id, eNB->frame,
|
||||
eNB->eNB_stats.num_dlactive_UEs,
|
||||
eNB->eNB_stats.available_prbs,
|
||||
eNB->eNB_stats.available_ncces);
|
||||
|
||||
eNB->eNB_stats.dlsch_bitrate=((eNB->eNB_stats.dlsch_bytes_tx*8)/((eNB->frame + 1)*10));
|
||||
eNB->eNB_stats.total_dlsch_pdus_tx+=eNB->eNB_stats.dlsch_pdus_tx;
|
||||
eNB->eNB_stats.total_dlsch_bytes_tx+=eNB->eNB_stats.dlsch_bytes_tx;
|
||||
eNB->eNB_stats.total_dlsch_bitrate=((eNB->eNB_stats.total_dlsch_bytes_tx*8)/((eNB->frame + 1)*10));
|
||||
|
||||
len += sprintf(&buffer[len],"DLSCH bitrate (TTI %u, avg %u) kbps, Transmitted bytes (TTI %u, total %u), Transmitted PDU (TTI %u, total %u) \n",
|
||||
eNB->eNB_stats.dlsch_bitrate,
|
||||
eNB->eNB_stats.total_dlsch_bitrate,
|
||||
eNB->eNB_stats.dlsch_bytes_tx,
|
||||
eNB->eNB_stats.total_dlsch_bytes_tx,
|
||||
eNB->eNB_stats.dlsch_pdus_tx,
|
||||
eNB->eNB_stats.total_dlsch_pdus_tx);
|
||||
for (CC_id=0 ; CC_id < MAX_NUM_CCs; CC_id++) {
|
||||
eNB->eNB_stats[CC_id].dlsch_bitrate= 0;
|
||||
|
||||
len += sprintf(&buffer[len],"eNB %d CC %d Frame %d: Active UEs %d, Available PRBs %d, nCCE %d \n",
|
||||
eNB_id, CC_id, eNB->frame,
|
||||
eNB->eNB_stats[CC_id].num_dlactive_UEs,
|
||||
eNB->eNB_stats[CC_id].available_prbs,
|
||||
eNB->eNB_stats[CC_id].available_ncces);
|
||||
|
||||
eNB->eNB_stats[CC_id].dlsch_bitrate=((eNB->eNB_stats[CC_id].dlsch_bytes_tx*8)/((eNB->frame + 1)*10));
|
||||
eNB->eNB_stats[CC_id].total_dlsch_pdus_tx+=eNB->eNB_stats[CC_id].dlsch_pdus_tx;
|
||||
eNB->eNB_stats[CC_id].total_dlsch_bytes_tx+=eNB->eNB_stats[CC_id].dlsch_bytes_tx;
|
||||
eNB->eNB_stats[CC_id].total_dlsch_bitrate=((eNB->eNB_stats[CC_id].total_dlsch_bytes_tx*8)/((eNB->frame + 1)*10));
|
||||
|
||||
len += sprintf(&buffer[len],"DLSCH bitrate (TTI %u, avg %u) kbps, Transmitted bytes (TTI %u, total %u), Transmitted PDU (TTI %u, total %u) \n",
|
||||
eNB->eNB_stats[CC_id].dlsch_bitrate,
|
||||
eNB->eNB_stats[CC_id].total_dlsch_bitrate,
|
||||
eNB->eNB_stats[CC_id].dlsch_bytes_tx,
|
||||
eNB->eNB_stats[CC_id].total_dlsch_bytes_tx,
|
||||
eNB->eNB_stats[CC_id].dlsch_pdus_tx,
|
||||
eNB->eNB_stats[CC_id].total_dlsch_pdus_tx);
|
||||
}
|
||||
len += sprintf(&buffer[len],"\n");
|
||||
|
||||
for (UE_id=UE_list->head;UE_id>0;UE_id=UE_list->next[UE_id]) {
|
||||
|
||||
@@ -117,15 +117,20 @@ typedef struct
|
||||
/// Configure Common PHY parameters from SIB13
|
||||
void (*phy_config_sib13_eNB)(module_id_t Mod_id,int CC_id, int mbsfn_Area_idx,
|
||||
long mbsfn_AreaId_r9);
|
||||
|
||||
void (*phy_config_dedicated_scell_eNB)(uint8_t Mod_id,
|
||||
uint16_t rnti,
|
||||
SCellToAddMod_r10_t *sCellToAddMod_r10,
|
||||
int CC_id);
|
||||
#endif
|
||||
|
||||
/// PHY-Config-Dedicated eNB
|
||||
void (*phy_config_dedicated_eNB)(module_id_t Mod_id,int CC_id,rnti_t rnti,
|
||||
void (*phy_config_dedicated_eNB)(module_id_t Mod_id,int CC_id,rnti_t rnti,
|
||||
struct PhysicalConfigDedicated *physicalConfigDedicated);
|
||||
|
||||
#ifdef Rel10
|
||||
/// Get MCH sdu and corresponding MCS for particular MBSFN subframe
|
||||
MCH_PDU* (*get_mch_sdu)(module_id_t Mod_id,frame_t frameP,sub_frame_t subframe);
|
||||
MCH_PDU* (*get_mch_sdu)(module_id_t Mod_id, uint8_t CC_id, frame_t frameP,sub_frame_t subframe);
|
||||
#endif
|
||||
// configure the cba rnti at the physical layer
|
||||
void (*phy_config_cba_rnti)(module_id_t Mod_id,eNB_flag_t eNB_flag, uint8_t index, uint16_t cba_rnti, uint8_t cba_group_id, uint8_t num_active_cba_groups);
|
||||
@@ -142,15 +147,15 @@ typedef struct
|
||||
void (*ue_decode_si)(module_id_t Mod_id,int CC_id,frame_t frameP, uint8_t CH_index, void *pdu, uint16_t len);
|
||||
|
||||
/// Send a received DLSCH sdu to MAC
|
||||
void (*ue_send_sdu)(module_id_t Mod_id,int CC_id,frame_t frameP,uint8_t *sdu,uint16_t sdu_len,uint8_t CH_index);
|
||||
void (*ue_send_sdu)(module_id_t Mod_id,uint8_t CC_id,frame_t frameP,uint8_t *sdu,uint16_t sdu_len,uint8_t CH_index);
|
||||
|
||||
#ifdef Rel10
|
||||
/// Send a received MCH sdu to MAC
|
||||
void (*ue_send_mch_sdu)(module_id_t Mod_id,frame_t frameP,uint8_t *sdu,uint16_t sdu_len,uint8_t eNB_index,uint8_t sync_area);
|
||||
void (*ue_send_mch_sdu)(module_id_t Mod_id,uint8_t CC_id, frame_t frameP,uint8_t *sdu,uint16_t sdu_len,uint8_t eNB_index,uint8_t sync_area);
|
||||
|
||||
/// Function to check if UE PHY needs to decode MCH for MAC
|
||||
/// get the sync area id, and teturn MCS value if need to decode, otherwise -1
|
||||
int (*ue_query_mch)(module_id_t Mod_id,int CC_id,frame_t frameP,sub_frame_t subframe,uint8_t eNB_index,uint8_t *sync_area, uint8_t *mcch_active);
|
||||
/// get the sync area id, and return MCS value if need to decode, otherwise -1
|
||||
int (*ue_query_mch)(module_id_t Mod_id, uint8_t CC_id,frame_t frameP,sub_frame_t subframe,uint8_t eNB_index,uint8_t *sync_area, uint8_t *mcch_active);
|
||||
#endif
|
||||
|
||||
/// Retrieve ULSCH sdu from MAC
|
||||
@@ -191,8 +196,13 @@ typedef struct
|
||||
|
||||
#ifdef Rel10
|
||||
/// Configure Common PHY parameters from SIB13
|
||||
void (*phy_config_sib13_ue)(uint8_t Mod_id,uint8_t CH_index,int mbsfn_Area_idx,
|
||||
void (*phy_config_sib13_ue)(uint8_t Mod_id,int CC_id, uint8_t eNB_index,int mbsfn_Area_idx,
|
||||
long mbsfn_AreaId_r9);
|
||||
|
||||
void (*phy_config_dedicated_scell_ue)(uint8_t Mod_id,
|
||||
uint8_t eNB_index,
|
||||
SCellToAddMod_r10_t *sCellToAddMod_r10,
|
||||
int CC_id);
|
||||
#endif
|
||||
/// Configure Common PHY parameters from mobilityControlInfo
|
||||
void (*phy_config_afterHO_ue)(module_id_t Mod_id,uint8_t CH_index,
|
||||
@@ -200,19 +210,19 @@ typedef struct
|
||||
uint8_t ho_failed);
|
||||
|
||||
/// Function to indicate failure of contention resolution or RA procedure
|
||||
void (*ra_failed)(module_id_t Mod_id,int CC_id,uint8_t eNB_index);
|
||||
void (*ra_failed)(module_id_t Mod_id, uint8_t CC_id,uint8_t eNB_index);
|
||||
|
||||
/// Function to indicate success of contention resolution or RA procedure
|
||||
void (*ra_succeeded)(module_id_t Mod_id,int CC_id, uint8_t eNB_index);
|
||||
void (*ra_succeeded)(module_id_t Mod_id,uint8_t CC_id, uint8_t eNB_index);
|
||||
|
||||
/// Function to indicate the transmission of msg1/rach to MAC
|
||||
void (*Msg1_transmitted)(module_id_t Mod_id,int CC_id,frame_t frameP,uint8_t eNB_id);
|
||||
void (*Msg1_transmitted)(module_id_t Mod_id,uint8_t CC_id,frame_t frameP,uint8_t eNB_id);
|
||||
|
||||
/// Function to indicate Msg3 transmission/retransmission which initiates/reset Contention Resolution Timer
|
||||
void (*Msg3_transmitted)(module_id_t Mod_id,int CC_id,frame_t frameP,uint8_t eNB_id);
|
||||
void (*Msg3_transmitted)(module_id_t Mod_id,uint8_t CC_id,frame_t frameP,uint8_t eNB_id);
|
||||
|
||||
/// Function to pass inter-cell measurement parameters to PHY (cell Ids)
|
||||
void (*phy_config_meas_ue)(module_id_t Mod_id,int CC_id,uint8_t eNB_index,uint8_t n_adj_cells,uint32_t *adj_cell_id);
|
||||
void (*phy_config_meas_ue)(module_id_t Mod_id,uint8_t CC_id,uint8_t eNB_index,uint8_t n_adj_cells,uint32_t *adj_cell_id);
|
||||
|
||||
// PHY Helper Functions
|
||||
|
||||
@@ -226,22 +236,22 @@ typedef struct
|
||||
uint16_t (*get_TBS_UL)(uint8_t mcs, uint16_t nb_rb);
|
||||
|
||||
/// Function to retrieve the HARQ round index for a particular UL/DLSCH and harq_pid
|
||||
int (*get_ue_active_harq_pid)(module_id_t Mod_id, int CC_id,rnti_t rnti, uint8_t subframe, uint8_t *harq_pid, uint8_t *round, uint8_t ul_flag);
|
||||
int (*get_ue_active_harq_pid)(module_id_t Mod_id, uint8_t CC_id,rnti_t rnti, uint8_t subframe, uint8_t *harq_pid, uint8_t *round, uint8_t ul_flag);
|
||||
|
||||
/// Function to retrieve number of CCE
|
||||
uint16_t (*get_nCCE_max)(module_id_t Mod_id,int CC_id);
|
||||
uint16_t (*get_nCCE_max)(module_id_t Mod_id,uint8_t CC_id);
|
||||
|
||||
/// Function to retrieve number of PRB in an rb_alloc
|
||||
uint32_t (*get_nb_rb)(uint8_t ra_header, uint32_t rb_alloc, int n_rb_dl);
|
||||
|
||||
/// Function to retrieve transmission mode for UE
|
||||
uint8_t (*get_transmission_mode)(module_id_t Mod_id,int CC_id,rnti_t rnti);
|
||||
uint8_t (*get_transmission_mode)(module_id_t Mod_id,uint8_t CC_id,rnti_t rnti);
|
||||
|
||||
/// Function to retrieve rb_alloc bitmap from dci rballoc field and VRB type
|
||||
uint32_t (*get_rballoc)(uint8_t vrb_type, uint16_t rb_alloc_dci);
|
||||
|
||||
/// Function for UE MAC to retrieve current PHY connectivity mode (PRACH,RA_RESPONSE,PUSCH)
|
||||
UE_MODE_t (*get_ue_mode)(module_id_t Mod_id,int CC_id,uint8_t eNB_index);
|
||||
UE_MODE_t (*get_ue_mode)(module_id_t Mod_id, uint8_t CC_id,uint8_t eNB_index);
|
||||
|
||||
/// Function for UE MAC to retrieve measured Path Loss
|
||||
int16_t (*get_PL)(uint8_t Mod_id,uint8_t CC_id,uint8_t eNB_index);
|
||||
@@ -274,21 +284,25 @@ typedef struct
|
||||
uint8_t (*get_fid_prach_tdd)(LTE_DL_FRAME_PARMS *frame_parms,uint8_t tdd_map_index);
|
||||
|
||||
/// Function for eNB MAC to retrieve subframe direction
|
||||
lte_subframe_t (*get_subframe_direction)(module_id_t Mod_id, uint8_t subframe);
|
||||
lte_subframe_t (*get_subframe_direction)(module_id_t Mod_id, uint8_t CC_id, uint8_t subframe);
|
||||
|
||||
// MAC Helper functions
|
||||
/// Function for UE/PHY to compute PUSCH transmit power in power-control procedure (Po_NOMINAL_PUSCH parameter)
|
||||
int8_t (*get_Po_NOMINAL_PUSCH)(module_id_t Mod_id,int CC_id);
|
||||
int8_t (*get_Po_NOMINAL_PUSCH)(module_id_t Mod_id,uint8_t CC_id);
|
||||
|
||||
/// Function for UE/PHY to compute PUSCH transmit power in power-control procedure (deltaP_rampup parameter)
|
||||
int8_t (*get_deltaP_rampup)(module_id_t Mod_id,int CC_id);
|
||||
int8_t (*get_deltaP_rampup)(module_id_t Mod_id,uint8_t CC_id);
|
||||
|
||||
/// Function for UE/PHY to compute PHR
|
||||
int8_t (*get_PHR)(module_id_t Mod_id, int CC_id,uint8_t eNB_index);
|
||||
int8_t (*get_PHR)(module_id_t Mod_id, uint8_t CC_id,uint8_t eNB_index);
|
||||
|
||||
void (*process_timing_advance)(module_id_t Mod_id,int16_t timing_advance);
|
||||
|
||||
LTE_eNB_UE_stats* (*get_eNB_UE_stats)(module_id_t Mod_id, int CC_id, rnti_t rnti);
|
||||
LTE_eNB_UE_stats* (*get_eNB_UE_stats)(module_id_t Mod_id, uint8_t CC_id, rnti_t rnti);
|
||||
|
||||
LTE_DL_FRAME_PARMS* (*get_lte_frame_parms)(module_id_t Mod_id, uint8_t CC_id);
|
||||
|
||||
MU_MIMO_mode* (*get_mu_mimo_mode) (module_id_t Mod_id, uint8_t CC_id);
|
||||
|
||||
unsigned char is_cluster_head;
|
||||
unsigned char is_primary_cluster_head;
|
||||
|
||||
@@ -671,6 +671,10 @@ void rrc_ue_process_measConfig(module_id_t ue_mod_idP, frame_t frameP, uint8_t
|
||||
rrc_mac_config_req(ue_mod_idP,ENB_FLAG_NO,0,eNB_index,
|
||||
(RadioResourceConfigCommonSIB_t *)NULL,
|
||||
(struct PhysicalConfigDedicated *)NULL,
|
||||
#ifdef Rel10
|
||||
(SCellToAddMod_r10_t *)NULL,
|
||||
//struct PhysicalConfigDedicatedSCell_r10 *physicalConfigDedicatedSCell_r10,
|
||||
#endif
|
||||
UE_rrc_inst[ue_mod_idP].MeasObj[eNB_index],
|
||||
(MAC_MainConfig_t *)NULL,
|
||||
0,
|
||||
@@ -936,6 +940,10 @@ rrc_ue_process_radioResourceConfigDedicated(module_id_t ue_mod_idP, frame_t fram
|
||||
rrc_mac_config_req(ue_mod_idP,ENB_FLAG_NO,0,eNB_index,
|
||||
(RadioResourceConfigCommonSIB_t *)NULL,
|
||||
UE_rrc_inst[ue_mod_idP].physicalConfigDedicated[eNB_index],
|
||||
#ifdef Rel10
|
||||
(SCellToAddMod_r10_t *)NULL,
|
||||
//struct PhysicalConfigDedicatedSCell_r10 *physicalConfigDedicatedSCell_r10,
|
||||
#endif
|
||||
(MeasObjectToAddMod_t **)NULL,
|
||||
UE_rrc_inst[ue_mod_idP].mac_MainConfig[eNB_index],
|
||||
1,
|
||||
@@ -992,6 +1000,10 @@ rrc_ue_process_radioResourceConfigDedicated(module_id_t ue_mod_idP, frame_t fram
|
||||
rrc_mac_config_req(ue_mod_idP,ENB_FLAG_NO,0,eNB_index,
|
||||
(RadioResourceConfigCommonSIB_t *)NULL,
|
||||
UE_rrc_inst[ue_mod_idP].physicalConfigDedicated[eNB_index],
|
||||
#ifdef Rel10
|
||||
(SCellToAddMod_r10_t *)NULL,
|
||||
//struct PhysicalConfigDedicatedSCell_r10 *physicalConfigDedicatedSCell_r10,
|
||||
#endif
|
||||
(MeasObjectToAddMod_t **)NULL,
|
||||
UE_rrc_inst[ue_mod_idP].mac_MainConfig[eNB_index],
|
||||
2,
|
||||
@@ -1071,6 +1083,10 @@ rrc_ue_process_radioResourceConfigDedicated(module_id_t ue_mod_idP, frame_t fram
|
||||
rrc_mac_config_req(ue_mod_idP,ENB_FLAG_NO,0,eNB_index,
|
||||
(RadioResourceConfigCommonSIB_t *)NULL,
|
||||
UE_rrc_inst[ue_mod_idP].physicalConfigDedicated[eNB_index],
|
||||
#ifdef Rel10
|
||||
(SCellToAddMod_r10_t *)NULL,
|
||||
//struct PhysicalConfigDedicatedSCell_r10 *physicalConfigDedicatedSCell_r10,
|
||||
#endif
|
||||
(MeasObjectToAddMod_t **)NULL,
|
||||
UE_rrc_inst[ue_mod_idP].mac_MainConfig[eNB_index],
|
||||
*UE_rrc_inst[ue_mod_idP].DRB_config[eNB_index][DRB_id]->logicalChannelIdentity,
|
||||
@@ -1471,6 +1487,10 @@ void rrc_ue_process_mobilityControlInfo(uint8_t eNB_index, uint8_t UE_id, frame_
|
||||
rrc_mac_config_req(ue_mod_idP,ENB_FLAG_NO,0,eNB_index,
|
||||
(RadioResourceConfigCommonSIB_t *)NULL,
|
||||
(struct PhysicalConfigDedicated *)NULL,
|
||||
#ifdef Rel10
|
||||
(SCellToAddMod_r10_t *)NULL,
|
||||
//(struct PhysicalConfigDedicatedSCell_r10 *)NULL,
|
||||
#endif
|
||||
(MeasObjectToAddMod_t **)NULL,
|
||||
(MAC_MainConfig_t *)NULL,
|
||||
0,
|
||||
@@ -1976,6 +1996,10 @@ int decode_SIB1(module_id_t ue_mod_idP,uint8_t eNB_index, uint8_t rsrq, uint8_t
|
||||
rrc_mac_config_req(ue_mod_idP,ENB_FLAG_NO,0,eNB_index,
|
||||
(RadioResourceConfigCommonSIB_t *)NULL,
|
||||
(struct PhysicalConfigDedicated *)NULL,
|
||||
#ifdef Rel10
|
||||
(SCellToAddMod_r10_t *)NULL,
|
||||
//(struct PhysicalConfigDedicatedSCell_r10 *)NULL,
|
||||
#endif
|
||||
(MeasObjectToAddMod_t **)NULL,
|
||||
(MAC_MainConfig_t *)NULL,
|
||||
0,
|
||||
@@ -2197,6 +2221,10 @@ int decode_SI(module_id_t ue_mod_idP, frame_t frameP,uint8_t eNB_index,uint8_t s
|
||||
rrc_mac_config_req(ue_mod_idP,ENB_FLAG_NO,0,eNB_index,
|
||||
&UE_rrc_inst[ue_mod_idP].sib2[eNB_index]->radioResourceConfigCommon,
|
||||
(struct PhysicalConfigDedicated *)NULL,
|
||||
#ifdef Rel10
|
||||
(SCellToAddMod_r10_t *)NULL,
|
||||
//(struct PhysicalConfigDedicatedSCell_r10 *)NULL,
|
||||
#endif
|
||||
(MeasObjectToAddMod_t **)NULL,
|
||||
(MAC_MainConfig_t *)NULL,
|
||||
0,
|
||||
@@ -2316,6 +2344,10 @@ int decode_SI(module_id_t ue_mod_idP, frame_t frameP,uint8_t eNB_index,uint8_t s
|
||||
rrc_mac_config_req(ue_mod_idP,ENB_FLAG_NO,0,eNB_index,
|
||||
(RadioResourceConfigCommonSIB_t *)NULL,
|
||||
(struct PhysicalConfigDedicated *)NULL,
|
||||
#ifdef Rel10
|
||||
(SCellToAddMod_r10_t *)NULL,
|
||||
//(struct PhysicalConfigDedicatedSCell_r10 *)NULL,
|
||||
#endif
|
||||
(MeasObjectToAddMod_t **)NULL,
|
||||
(MAC_MainConfig_t *)NULL,
|
||||
0,
|
||||
@@ -2668,6 +2700,10 @@ void decode_MBSFNAreaConfiguration(module_id_t ue_mod_idP, uint8_t eNB_index, fr
|
||||
rrc_mac_config_req(ue_mod_idP,ENB_FLAG_NO,0,eNB_index,
|
||||
(RadioResourceConfigCommonSIB_t *)NULL,
|
||||
(struct PhysicalConfigDedicated *)NULL,
|
||||
#ifdef Rel10
|
||||
(SCellToAddMod_r10_t *)NULL,
|
||||
//(struct PhysicalConfigDedicatedSCell_r10 *)NULL,
|
||||
#endif
|
||||
(MeasObjectToAddMod_t **)NULL,
|
||||
(MAC_MainConfig_t *)NULL,
|
||||
0,
|
||||
|
||||
@@ -295,6 +295,10 @@ static void init_SI(
|
||||
(RadioResourceConfigCommonSIB_t *) &
|
||||
eNB_rrc_inst[enb_mod_idP].sib2->radioResourceConfigCommon,
|
||||
(struct PhysicalConfigDedicated *)NULL,
|
||||
#ifdef Rel10
|
||||
(SCellToAddMod_r10_t *)NULL,
|
||||
//(struct PhysicalConfigDedicatedSCell_r10 *)NULL,
|
||||
#endif
|
||||
(MeasObjectToAddMod_t **) NULL,
|
||||
(MAC_MainConfig_t *) NULL, 0,
|
||||
(struct LogicalChannelConfig *)NULL,
|
||||
@@ -378,6 +382,10 @@ static void init_MCCH(
|
||||
rrc_mac_config_req(enb_mod_idP, ENB_FLAG_YES, 0, 0,
|
||||
(RadioResourceConfigCommonSIB_t *) NULL,
|
||||
(struct PhysicalConfigDedicated *)NULL,
|
||||
#ifdef Rel10
|
||||
(SCellToAddMod_r10_t *)NULL,
|
||||
//(struct PhysicalConfigDedicatedSCell_r10 *)NULL,
|
||||
#endif
|
||||
(MeasObjectToAddMod_t **) NULL,
|
||||
(MAC_MainConfig_t *) NULL,
|
||||
0,
|
||||
@@ -751,7 +759,7 @@ static void rrc_eNB_generate_defaultRRCConnectionReconfiguration(
|
||||
DRB_rlc_config = CALLOC(1, sizeof(*DRB_rlc_config));
|
||||
DRB_config->rlc_Config = DRB_rlc_config;
|
||||
|
||||
#ifdef EXMIMO_IOT
|
||||
#ifdef RRC_RLC_AM // EXMIMO_IOT
|
||||
DRB_rlc_config->present = RLC_Config_PR_am;
|
||||
DRB_rlc_config->choice.am.ul_AM_RLC.t_PollRetransmit = T_PollRetransmit_ms50;
|
||||
DRB_rlc_config->choice.am.ul_AM_RLC.pollPDU = PollPDU_p16;
|
||||
@@ -773,7 +781,7 @@ static void rrc_eNB_generate_defaultRRCConnectionReconfiguration(
|
||||
DRB_pdcp_config->rlc_AM = NULL;
|
||||
DRB_pdcp_config->rlc_UM = NULL;
|
||||
|
||||
#ifdef EXMIMO_IOT
|
||||
#ifdef RRC_RLC_AM // EXMIMO_IOT
|
||||
PDCP_rlc_AM = CALLOC(1, sizeof(*PDCP_rlc_AM));
|
||||
DRB_pdcp_config->rlc_AM = PDCP_rlc_AM;
|
||||
PDCP_rlc_AM->statusReportRequired = FALSE;
|
||||
@@ -1633,7 +1641,12 @@ void rrc_eNB_generate_RRCConnectionReconfiguration_handover(
|
||||
"handover_config [FRAME %05d][RRC_eNB][MOD %02d][][--- MAC_CONFIG_REQ (SRB1 UE %d) --->][MAC_eNB][MOD %02d][]\n",
|
||||
frameP, enb_mod_idP, ue_mod_idP, enb_mod_idP);
|
||||
rrc_mac_config_req(enb_mod_idP, ENB_FLAG_YES, ue_mod_idP, 0, (RadioResourceConfigCommonSIB_t *) NULL,
|
||||
eNB_rrc_inst[enb_mod_idP].physicalConfigDedicated[ue_mod_idP], (MeasObjectToAddMod_t **) NULL,
|
||||
eNB_rrc_inst[enb_mod_idP].physicalConfigDedicated[ue_mod_idP],
|
||||
#ifdef Rel10
|
||||
(SCellToAddMod_r10_t *)NULL,
|
||||
//(struct PhysicalConfigDedicatedSCell_r10 *)NULL,
|
||||
#endif
|
||||
(MeasObjectToAddMod_t **) NULL,
|
||||
eNB_rrc_inst[enb_mod_idP].mac_MainConfig[ue_mod_idP], 1, SRB1_logicalChannelConfig,
|
||||
eNB_rrc_inst[enb_mod_idP].measGapConfig[ue_mod_idP], (TDD_Config_t *) NULL,
|
||||
(MobilityControlInfo_t *) NULL, (uint8_t *) NULL, (uint16_t *) NULL, NULL, NULL, NULL,
|
||||
@@ -2161,6 +2174,10 @@ void rrc_eNB_generate_RRCConnectionReconfiguration_handover(
|
||||
rrc_mac_config_req(enb_mod_idP, ENB_FLAG_YES, ue_mod_idP, 0,
|
||||
(RadioResourceConfigCommonSIB_t *) NULL,
|
||||
eNB_rrc_inst[enb_mod_idP].physicalConfigDedicated[ue_mod_idP],
|
||||
#ifdef Rel10
|
||||
(SCellToAddMod_r10_t *)NULL,
|
||||
//(struct PhysicalConfigDedicatedSCell_r10 *)NULL,
|
||||
#endif
|
||||
(MeasObjectToAddMod_t **) NULL,
|
||||
eNB_rrc_inst[enb_mod_idP].mac_MainConfig[ue_mod_idP],
|
||||
1,
|
||||
@@ -2381,6 +2398,10 @@ void rrc_eNB_process_RRCConnectionReconfigurationComplete(
|
||||
0,
|
||||
(RadioResourceConfigCommonSIB_t *) NULL,
|
||||
eNB_rrc_inst[enb_mod_idP].physicalConfigDedicated[ue_mod_idP],
|
||||
#ifdef Rel10
|
||||
(SCellToAddMod_r10_t *)NULL,
|
||||
//(struct PhysicalConfigDedicatedSCell_r10 *)NULL,
|
||||
#endif
|
||||
(MeasObjectToAddMod_t **) NULL,
|
||||
eNB_rrc_inst[enb_mod_idP].mac_MainConfig[ue_mod_idP],
|
||||
DRB2LCHAN[i],
|
||||
@@ -2419,6 +2440,10 @@ void rrc_eNB_process_RRCConnectionReconfigurationComplete(
|
||||
0,
|
||||
(RadioResourceConfigCommonSIB_t *) NULL,
|
||||
eNB_rrc_inst[enb_mod_idP].physicalConfigDedicated[ue_mod_idP],
|
||||
#ifdef Rel10
|
||||
(SCellToAddMod_r10_t *)NULL,
|
||||
//(struct PhysicalConfigDedicatedSCell_r10 *)NULL,
|
||||
#endif
|
||||
(MeasObjectToAddMod_t **) NULL,
|
||||
eNB_rrc_inst[enb_mod_idP].mac_MainConfig[ue_mod_idP],
|
||||
DRB2LCHAN[i],
|
||||
@@ -2498,6 +2523,10 @@ void rrc_eNB_generate_RRCConnectionSetup(
|
||||
rrc_mac_config_req(enb_mod_idP, ENB_FLAG_YES, ue_mod_idP, 0,
|
||||
(RadioResourceConfigCommonSIB_t *) NULL,
|
||||
eNB_rrc_inst[enb_mod_idP].physicalConfigDedicated[ue_mod_idP],
|
||||
#ifdef Rel10
|
||||
(SCellToAddMod_r10_t *)NULL,
|
||||
//(struct PhysicalConfigDedicatedSCell_r10 *)NULL,
|
||||
#endif
|
||||
(MeasObjectToAddMod_t **) NULL,
|
||||
eNB_rrc_inst[enb_mod_idP].mac_MainConfig[ue_mod_idP],
|
||||
1,
|
||||
|
||||
@@ -64,6 +64,30 @@
|
||||
// main log variables
|
||||
log_t *g_log;
|
||||
|
||||
mapping log_level_names[] =
|
||||
{
|
||||
{"emerg", LOG_EMERG},
|
||||
{"alert", LOG_ALERT},
|
||||
{"crit", LOG_CRIT},
|
||||
{"error", LOG_ERR},
|
||||
{"warn", LOG_WARNING},
|
||||
{"notice", LOG_NOTICE},
|
||||
{"info", LOG_INFO},
|
||||
{"debug", LOG_DEBUG},
|
||||
{"file", LOG_FILE},
|
||||
{"trace", LOG_TRACE},
|
||||
{NULL, -1}
|
||||
};
|
||||
mapping log_verbosity_names[] =
|
||||
{
|
||||
{"none", 0x0},
|
||||
{"low", 0x5},
|
||||
{"medium", 0x15},
|
||||
{"high", 0x35},
|
||||
{"full", 0x75},
|
||||
{NULL, -1}
|
||||
};
|
||||
|
||||
// vars for the log thread
|
||||
LOG_params log_list[2000];
|
||||
int log_list_tail = 0;
|
||||
|
||||
@@ -322,14 +322,6 @@ typedef struct LOG_params {
|
||||
int len;
|
||||
} LOG_params;
|
||||
|
||||
extern log_t *g_log;
|
||||
|
||||
#if !defined(LOG_NO_THREAD)
|
||||
extern LOG_params log_list[2000];
|
||||
extern pthread_mutex_t log_lock;
|
||||
extern pthread_cond_t log_notify;
|
||||
extern int log_shutdown;
|
||||
#endif
|
||||
|
||||
#if defined(ENABLE_ITTI)
|
||||
typedef enum log_instance_type_e {
|
||||
|
||||
@@ -26,3 +26,17 @@
|
||||
Address : Eurecom, Compus SophiaTech 450, route des chappes, 06451 Biot, France.
|
||||
|
||||
*******************************************************************************/
|
||||
|
||||
#include"log.h"
|
||||
|
||||
extern log_t *g_log;
|
||||
|
||||
#if !defined(LOG_NO_THREAD)
|
||||
extern LOG_params log_list[2000];
|
||||
extern pthread_mutex_t log_lock;
|
||||
extern pthread_cond_t log_notify;
|
||||
extern int log_shutdown;
|
||||
#endif
|
||||
|
||||
extern mapping log_level_names[];
|
||||
extern mapping log_verbosity_names[];
|
||||
|
||||
@@ -92,41 +92,10 @@ const char* eurecomVariablesNames[] = {
|
||||
};
|
||||
|
||||
const char* eurecomFunctionsNames[] = {
|
||||
"macxface_macphy_init",
|
||||
"macxface_macphy_exit",
|
||||
"macxface_eNB_dlsch_ulsch_scheduler",
|
||||
"macxface_fill_rar",
|
||||
"macxface_terminate_ra_proc",
|
||||
"macxface_initiate_ra_proc",
|
||||
"macxface_cancel_ra_proc",
|
||||
"macxface_get_dci_sdu",
|
||||
"macxface_get_dlsch_sdu",
|
||||
"macxface_rx_sdu",
|
||||
"macxface_mrbch_phy_sync_failure",
|
||||
"macxface_SR_indication",
|
||||
"macxface_phy_config_sib1_eNB",
|
||||
"macxface_phy_config_sib2_eNB",
|
||||
"macxface_phy_config_dedicated_eNB",
|
||||
"macxface_out_of_sync_ind",
|
||||
"macxface_ue_decode_si",
|
||||
"macxface_ue_decode_ccch",
|
||||
"macxface_ue_decode_bcch",
|
||||
"macxface_ue_send_sdu",
|
||||
"macxface_ue_get_sdu",
|
||||
"macxface_ue_get_rach",
|
||||
"macxface_ue_process_rar",
|
||||
"macxface_ue_scheduler",
|
||||
"macxface_ue_get_sr",
|
||||
"ue_send_mch_sdu",
|
||||
"lte_ue_measurement_procedures",
|
||||
"lte_ue_pdcch_procedures",
|
||||
"lte_ue_pbch_procedures",
|
||||
"phy_procedures_eNb_tx",
|
||||
"phy_procedures_eNb_rx",
|
||||
"phy_procedures_ue_tx",
|
||||
"phy_procedures_ue_rx",
|
||||
"phy_procedures_eNB_lte",
|
||||
"phy_procedures_UE_lte",
|
||||
/* softmodem signals */
|
||||
"rt_sleep",
|
||||
"trx_read",
|
||||
"trx_write",
|
||||
"eNB_thread_tx0",
|
||||
"eNB_thread_rx0",
|
||||
"eNB_thread_tx1",
|
||||
@@ -147,12 +116,17 @@ const char* eurecomFunctionsNames[] = {
|
||||
"eNB_thread_rx8",
|
||||
"eNB_thread_tx9",
|
||||
"eNB_thread_rx9",
|
||||
"emu_transport",
|
||||
"log_record",
|
||||
"pdcp_run",
|
||||
"rt_sleep",
|
||||
"trx_read",
|
||||
"trx_write",
|
||||
|
||||
/* PHY signals */
|
||||
"lte_ue_measurement_procedures",
|
||||
"lte_ue_pdcch_procedures",
|
||||
"lte_ue_pbch_procedures",
|
||||
"phy_procedures_eNb_tx",
|
||||
"phy_procedures_eNb_rx",
|
||||
"phy_procedures_ue_tx",
|
||||
"phy_procedures_ue_rx",
|
||||
"phy_procedures_eNB_lte",
|
||||
"phy_procedures_UE_lte",
|
||||
"pdsch_thread",
|
||||
"dlsch_thread0",
|
||||
"dlsch_thread1",
|
||||
@@ -171,11 +145,11 @@ const char* eurecomFunctionsNames[] = {
|
||||
"dlsch_decoding6",
|
||||
"dlsch_decoding7",
|
||||
"rx_pdcch",
|
||||
"dci_decoding",
|
||||
"rrc_mac_config_req",
|
||||
"rrc_ue_decode_sib1",
|
||||
"rrc_ue_decode_si",
|
||||
"phy_ue_config_sib2",
|
||||
"dci_decoding",
|
||||
"phy_ue_config_sib2",
|
||||
"macxface_phy_config_sib1_eNB",
|
||||
"macxface_phy_config_sib2_eNB",
|
||||
"macxface_phy_config_dedicated_eNB",
|
||||
"phy_ue_compute_prach",
|
||||
"phy_enb_ulsch_decoding",
|
||||
"phy_enb_sfgen",
|
||||
@@ -188,8 +162,56 @@ const char* eurecomFunctionsNames[] = {
|
||||
"phy_eNB_dlsch_modulation",
|
||||
"phy_eNB_dlsch_encoding",
|
||||
"phy_eNB_dlsch_scrambling",
|
||||
|
||||
/* MAC signals */
|
||||
"macxface_macphy_init",
|
||||
"macxface_macphy_exit",
|
||||
"macxface_eNB_dlsch_ulsch_scheduler",
|
||||
"macxface_fill_rar",
|
||||
"macxface_terminate_ra_proc",
|
||||
"macxface_initiate_ra_proc",
|
||||
"macxface_cancel_ra_proc",
|
||||
"macxface_get_dci_sdu",
|
||||
"macxface_get_dlsch_sdu",
|
||||
"macxface_rx_sdu",
|
||||
"macxface_mrbch_phy_sync_failure",
|
||||
"macxface_SR_indication",
|
||||
"mac_dlsch_preprocessor",
|
||||
"mac_schedule_dlsch",
|
||||
"mac_fill_dlsch_dci",
|
||||
"macxface_out_of_sync_ind",
|
||||
"macxface_ue_decode_si",
|
||||
"macxface_ue_decode_ccch",
|
||||
"macxface_ue_decode_bcch",
|
||||
"macxface_ue_send_sdu",
|
||||
"macxface_ue_get_sdu",
|
||||
"macxface_ue_get_rach",
|
||||
"macxface_ue_process_rar",
|
||||
"macxface_ue_scheduler",
|
||||
"macxface_ue_get_sr",
|
||||
|
||||
"ue_send_mch_sdu",
|
||||
|
||||
/*RLC signals */
|
||||
"rlc_data_req",
|
||||
// "rlc_data_ind", // this calls "pdcp_data_ind",
|
||||
"mac_rlc_status_ind",
|
||||
"mac_rlc_data_req",
|
||||
"mac_rlc_data_ind",
|
||||
/* PDCP signals */
|
||||
"pdcp_run",
|
||||
"pdcp_data_req",
|
||||
"pdcp_data_ind",
|
||||
"pdcp_apply_security",
|
||||
"pdcp_validate_security",
|
||||
/* RRC signals */
|
||||
"rrc_mac_config_req",
|
||||
"rrc_ue_decode_sib1",
|
||||
"rrc_ue_decode_si",
|
||||
|
||||
/* MISC signals */
|
||||
"emu_transport",
|
||||
"log_record",
|
||||
"itti_enqueue_message",
|
||||
"itti_dump_enqueue_message",
|
||||
"itti_dump_enqueue_message_malloc",
|
||||
|
||||
@@ -66,113 +66,136 @@ typedef enum
|
||||
VCD_SIGNAL_DUMPER_VARIABLES_END = VCD_SIGNAL_DUMPER_VARIABLES_LAST,
|
||||
} vcd_signal_dump_variables;
|
||||
|
||||
typedef enum
|
||||
{
|
||||
VCD_SIGNAL_DUMPER_FUNCTIONS_MACPHY_INIT = 0,
|
||||
VCD_SIGNAL_DUMPER_FUNCTIONS_MACPHY_EXIT,
|
||||
VCD_SIGNAL_DUMPER_FUNCTIONS_ENB_DLSCH_ULSCH_SCHEDULER,
|
||||
VCD_SIGNAL_DUMPER_FUNCTIONS_FILL_RAR,
|
||||
VCD_SIGNAL_DUMPER_FUNCTIONS_TERMINATE_RA_PROC,
|
||||
VCD_SIGNAL_DUMPER_FUNCTIONS_INITIATE_RA_PROC,
|
||||
VCD_SIGNAL_DUMPER_FUNCTIONS_CANCEL_RA_PROC,
|
||||
VCD_SIGNAL_DUMPER_FUNCTIONS_GET_DCI_SDU,
|
||||
VCD_SIGNAL_DUMPER_FUNCTIONS_GET_DLSCH_SDU,
|
||||
VCD_SIGNAL_DUMPER_FUNCTIONS_RX_SDU,
|
||||
VCD_SIGNAL_DUMPER_FUNCTIONS_MRBCH_PHY_SYNC_FAILURE,
|
||||
VCD_SIGNAL_DUMPER_FUNCTIONS_SR_INDICATION,
|
||||
VCD_SIGNAL_DUMPER_FUNCTIONS_PHY_CONFIG_SIB1_ENB,
|
||||
VCD_SIGNAL_DUMPER_FUNCTIONS_PHY_CONFIG_SIB2_ENB,
|
||||
VCD_SIGNAL_DUMPER_FUNCTIONS_PHY_CONFIG_DEDICATED_ENB,
|
||||
VCD_SIGNAL_DUMPER_FUNCTIONS_OUT_OF_SYNC_IND,
|
||||
VCD_SIGNAL_DUMPER_FUNCTIONS_UE_DECODE_SI,
|
||||
VCD_SIGNAL_DUMPER_FUNCTIONS_UE_DECODE_CCCH,
|
||||
VCD_SIGNAL_DUMPER_FUNCTIONS_UE_DECODE_BCCH,
|
||||
VCD_SIGNAL_DUMPER_FUNCTIONS_UE_SEND_SDU,
|
||||
VCD_SIGNAL_DUMPER_FUNCTIONS_UE_GET_SDU,
|
||||
VCD_SIGNAL_DUMPER_FUNCTIONS_UE_GET_RACH,
|
||||
VCD_SIGNAL_DUMPER_FUNCTIONS_UE_PROCESS_RAR,
|
||||
VCD_SIGNAL_DUMPER_FUNCTIONS_UE_SCHEDULER,
|
||||
VCD_SIGNAL_DUMPER_FUNCTIONS_UE_GET_SR,
|
||||
VCD_SIGNAL_DUMPER_FUNCTIONS_UE_SEND_MCH_SDU,
|
||||
VCD_SIGNAL_DUMPER_FUNCTIONS_UE_MEASUREMENT_PROCEDURES,
|
||||
VCD_SIGNAL_DUMPER_FUNCTIONS_UE_PDCCH_PROCEDURES,
|
||||
VCD_SIGNAL_DUMPER_FUNCTIONS_UE_PBCH_PROCEDURES,
|
||||
VCD_SIGNAL_DUMPER_FUNCTIONS_PHY_PROCEDURES_ENB_TX,
|
||||
VCD_SIGNAL_DUMPER_FUNCTIONS_PHY_PROCEDURES_ENB_RX,
|
||||
VCD_SIGNAL_DUMPER_FUNCTIONS_PHY_PROCEDURES_UE_TX,
|
||||
VCD_SIGNAL_DUMPER_FUNCTIONS_PHY_PROCEDURES_UE_RX,
|
||||
VCD_SIGNAL_DUMPER_FUNCTIONS_PHY_PROCEDURES_ENB_LTE,
|
||||
VCD_SIGNAL_DUMPER_FUNCTIONS_PHY_PROCEDURES_UE_LTE,
|
||||
VCD_SIGNAL_DUMPER_FUNCTIONS_eNB_PROC_TX0,
|
||||
VCD_SIGNAL_DUMPER_FUNCTIONS_eNB_PROC_RX0,
|
||||
VCD_SIGNAL_DUMPER_FUNCTIONS_eNB_PROC_TX1,
|
||||
VCD_SIGNAL_DUMPER_FUNCTIONS_eNB_PROC_RX1,
|
||||
VCD_SIGNAL_DUMPER_FUNCTIONS_eNB_PROC_TX2,
|
||||
VCD_SIGNAL_DUMPER_FUNCTIONS_eNB_PROC_RX2,
|
||||
VCD_SIGNAL_DUMPER_FUNCTIONS_eNB_PROC_TX3,
|
||||
VCD_SIGNAL_DUMPER_FUNCTIONS_eNB_PROC_RX3,
|
||||
VCD_SIGNAL_DUMPER_FUNCTIONS_eNB_PROC_TX4,
|
||||
VCD_SIGNAL_DUMPER_FUNCTIONS_eNB_PROC_RX4,
|
||||
VCD_SIGNAL_DUMPER_FUNCTIONS_eNB_PROC_TX5,
|
||||
VCD_SIGNAL_DUMPER_FUNCTIONS_eNB_PROC_RX5,
|
||||
VCD_SIGNAL_DUMPER_FUNCTIONS_eNB_PROC_TX6,
|
||||
VCD_SIGNAL_DUMPER_FUNCTIONS_eNB_PROC_RX6,
|
||||
VCD_SIGNAL_DUMPER_FUNCTIONS_eNB_PROC_TX7,
|
||||
VCD_SIGNAL_DUMPER_FUNCTIONS_eNB_PROC_RX7,
|
||||
VCD_SIGNAL_DUMPER_FUNCTIONS_eNB_PROC_TX8,
|
||||
VCD_SIGNAL_DUMPER_FUNCTIONS_eNB_PROC_RX8,
|
||||
VCD_SIGNAL_DUMPER_FUNCTIONS_eNB_PROC_TX9,
|
||||
VCD_SIGNAL_DUMPER_FUNCTIONS_eNB_PROC_RX9,
|
||||
VCD_SIGNAL_DUMPER_FUNCTIONS_EMU_TRANSPORT,
|
||||
VCD_SIGNAL_DUMPER_FUNCTIONS_LOG_RECORD,
|
||||
VCD_SIGNAL_DUMPER_FUNCTIONS_PDCP_RUN,
|
||||
VCD_SIGNAL_DUMPER_FUNCTIONS_RT_SLEEP,
|
||||
VCD_SIGNAL_DUMPER_FUNCTIONS_TRX_READ,
|
||||
VCD_SIGNAL_DUMPER_FUNCTIONS_TRX_WRITE,
|
||||
VCD_SIGNAL_DUMPER_FUNCTIONS_PDSCH_THREAD,
|
||||
VCD_SIGNAL_DUMPER_FUNCTIONS_DLSCH_THREAD0,
|
||||
VCD_SIGNAL_DUMPER_FUNCTIONS_DLSCH_THREAD1,
|
||||
VCD_SIGNAL_DUMPER_FUNCTIONS_DLSCH_THREAD2,
|
||||
VCD_SIGNAL_DUMPER_FUNCTIONS_DLSCH_THREAD3,
|
||||
VCD_SIGNAL_DUMPER_FUNCTIONS_DLSCH_THREAD4,
|
||||
VCD_SIGNAL_DUMPER_FUNCTIONS_DLSCH_THREAD5,
|
||||
VCD_SIGNAL_DUMPER_FUNCTIONS_DLSCH_THREAD6,
|
||||
VCD_SIGNAL_DUMPER_FUNCTIONS_DLSCH_THREAD7,
|
||||
VCD_SIGNAL_DUMPER_FUNCTIONS_DLSCH_DECODING0,
|
||||
VCD_SIGNAL_DUMPER_FUNCTIONS_DLSCH_DECODING1,
|
||||
VCD_SIGNAL_DUMPER_FUNCTIONS_DLSCH_DECODING2,
|
||||
VCD_SIGNAL_DUMPER_FUNCTIONS_DLSCH_DECODING3,
|
||||
VCD_SIGNAL_DUMPER_FUNCTIONS_DLSCH_DECODING4,
|
||||
VCD_SIGNAL_DUMPER_FUNCTIONS_DLSCH_DECODING5,
|
||||
VCD_SIGNAL_DUMPER_FUNCTIONS_DLSCH_DECODING6,
|
||||
VCD_SIGNAL_DUMPER_FUNCTIONS_DLSCH_DECODING7,
|
||||
VCD_SIGNAL_DUMPER_FUNCTIONS_RX_PDCCH,
|
||||
VCD_SIGNAL_DUMPER_FUNCTIONS_DCI_DECODING,
|
||||
VCD_SIGNAL_DUMPER_FUNCTIONS_RRC_MAC_CONFIG,
|
||||
VCD_SIGNAL_DUMPER_FUNCTIONS_RRC_UE_DECODE_SIB1,
|
||||
VCD_SIGNAL_DUMPER_FUNCTIONS_RRC_UE_DECODE_SI,
|
||||
VCD_SIGNAL_DUMPER_FUNCTIONS_PHY_UE_CONFIG_SIB2,
|
||||
VCD_SIGNAL_DUMPER_FUNCTIONS_PHY_UE_COMPUTE_PRACH,
|
||||
VCD_SIGNAL_DUMPER_FUNCTIONS_PHY_ENB_ULSCH_DECODING,
|
||||
VCD_SIGNAL_DUMPER_FUNCTIONS_PHY_ENB_SFGEN,
|
||||
VCD_SIGNAL_DUMPER_FUNCTIONS_PHY_ENB_PRACH_RX,
|
||||
VCD_SIGNAL_DUMPER_FUNCTIONS_PHY_ENB_PDCCH_TX,
|
||||
VCD_SIGNAL_DUMPER_FUNCTIONS_PHY_ENB_RS_TX,
|
||||
VCD_SIGNAL_DUMPER_FUNCTIONS_UE_ULSCH_MODULATION,
|
||||
VCD_SIGNAL_DUMPER_FUNCTIONS_UE_ULSCH_ENCODING,
|
||||
VCD_SIGNAL_DUMPER_FUNCTIONS_UE_ULSCH_SCRAMBLING,
|
||||
VCD_SIGNAL_DUMPER_FUNCTIONS_ENB_DLSCH_MODULATION,
|
||||
VCD_SIGNAL_DUMPER_FUNCTIONS_ENB_DLSCH_ENCODING,
|
||||
VCD_SIGNAL_DUMPER_FUNCTIONS_ENB_DLSCH_SCRAMBLING,
|
||||
VCD_SIGNAL_DUMPER_FUNCTIONS_PDCP_APPLY_SECURITY,
|
||||
VCD_SIGNAL_DUMPER_FUNCTIONS_PDCP_VALIDATE_SECURITY,
|
||||
VCD_SIGNAL_DUMPER_FUNCTIONS_ITTI_ENQUEUE_MESSAGE,
|
||||
VCD_SIGNAL_DUMPER_FUNCTIONS_ITTI_DUMP_ENQUEUE_MESSAGE,
|
||||
VCD_SIGNAL_DUMPER_FUNCTIONS_ITTI_DUMP_ENQUEUE_MESSAGE_MALLOC,
|
||||
VCD_SIGNAL_DUMPER_FUNCTIONS_ITTI_RELAY_THREAD,
|
||||
VCD_SIGNAL_DUMPER_FUNCTIONS_TEST,
|
||||
VCD_SIGNAL_DUMPER_FUNCTIONS_LAST,
|
||||
VCD_SIGNAL_DUMPER_FUNCTIONS_END = VCD_SIGNAL_DUMPER_FUNCTIONS_LAST,
|
||||
typedef enum {
|
||||
/* softmodem signals */
|
||||
VCD_SIGNAL_DUMPER_FUNCTIONS_RT_SLEEP=0,
|
||||
VCD_SIGNAL_DUMPER_FUNCTIONS_TRX_READ,
|
||||
VCD_SIGNAL_DUMPER_FUNCTIONS_TRX_WRITE,
|
||||
VCD_SIGNAL_DUMPER_FUNCTIONS_eNB_PROC_TX0,
|
||||
VCD_SIGNAL_DUMPER_FUNCTIONS_eNB_PROC_RX0,
|
||||
VCD_SIGNAL_DUMPER_FUNCTIONS_eNB_PROC_TX1,
|
||||
VCD_SIGNAL_DUMPER_FUNCTIONS_eNB_PROC_RX1,
|
||||
VCD_SIGNAL_DUMPER_FUNCTIONS_eNB_PROC_TX2,
|
||||
VCD_SIGNAL_DUMPER_FUNCTIONS_eNB_PROC_RX2,
|
||||
VCD_SIGNAL_DUMPER_FUNCTIONS_eNB_PROC_TX3,
|
||||
VCD_SIGNAL_DUMPER_FUNCTIONS_eNB_PROC_RX3,
|
||||
VCD_SIGNAL_DUMPER_FUNCTIONS_eNB_PROC_TX4,
|
||||
VCD_SIGNAL_DUMPER_FUNCTIONS_eNB_PROC_RX4,
|
||||
VCD_SIGNAL_DUMPER_FUNCTIONS_eNB_PROC_TX5,
|
||||
VCD_SIGNAL_DUMPER_FUNCTIONS_eNB_PROC_RX5,
|
||||
VCD_SIGNAL_DUMPER_FUNCTIONS_eNB_PROC_TX6,
|
||||
VCD_SIGNAL_DUMPER_FUNCTIONS_eNB_PROC_RX6,
|
||||
VCD_SIGNAL_DUMPER_FUNCTIONS_eNB_PROC_TX7,
|
||||
VCD_SIGNAL_DUMPER_FUNCTIONS_eNB_PROC_RX7,
|
||||
VCD_SIGNAL_DUMPER_FUNCTIONS_eNB_PROC_TX8,
|
||||
VCD_SIGNAL_DUMPER_FUNCTIONS_eNB_PROC_RX8,
|
||||
VCD_SIGNAL_DUMPER_FUNCTIONS_eNB_PROC_TX9,
|
||||
VCD_SIGNAL_DUMPER_FUNCTIONS_eNB_PROC_RX9,
|
||||
|
||||
/* PHY signals */
|
||||
VCD_SIGNAL_DUMPER_FUNCTIONS_UE_MEASUREMENT_PROCEDURES,
|
||||
VCD_SIGNAL_DUMPER_FUNCTIONS_UE_PDCCH_PROCEDURES,
|
||||
VCD_SIGNAL_DUMPER_FUNCTIONS_UE_PBCH_PROCEDURES,
|
||||
VCD_SIGNAL_DUMPER_FUNCTIONS_PHY_PROCEDURES_ENB_TX,
|
||||
VCD_SIGNAL_DUMPER_FUNCTIONS_PHY_PROCEDURES_ENB_RX,
|
||||
VCD_SIGNAL_DUMPER_FUNCTIONS_PHY_PROCEDURES_UE_TX,
|
||||
VCD_SIGNAL_DUMPER_FUNCTIONS_PHY_PROCEDURES_UE_RX,
|
||||
VCD_SIGNAL_DUMPER_FUNCTIONS_PHY_PROCEDURES_ENB_LTE,
|
||||
VCD_SIGNAL_DUMPER_FUNCTIONS_PHY_PROCEDURES_UE_LTE,
|
||||
VCD_SIGNAL_DUMPER_FUNCTIONS_PDSCH_THREAD,
|
||||
VCD_SIGNAL_DUMPER_FUNCTIONS_DLSCH_THREAD0,
|
||||
VCD_SIGNAL_DUMPER_FUNCTIONS_DLSCH_THREAD1,
|
||||
VCD_SIGNAL_DUMPER_FUNCTIONS_DLSCH_THREAD2,
|
||||
VCD_SIGNAL_DUMPER_FUNCTIONS_DLSCH_THREAD3,
|
||||
VCD_SIGNAL_DUMPER_FUNCTIONS_DLSCH_THREAD4,
|
||||
VCD_SIGNAL_DUMPER_FUNCTIONS_DLSCH_THREAD5,
|
||||
VCD_SIGNAL_DUMPER_FUNCTIONS_DLSCH_THREAD6,
|
||||
VCD_SIGNAL_DUMPER_FUNCTIONS_DLSCH_THREAD7,
|
||||
VCD_SIGNAL_DUMPER_FUNCTIONS_DLSCH_DECODING0,
|
||||
VCD_SIGNAL_DUMPER_FUNCTIONS_DLSCH_DECODING1,
|
||||
VCD_SIGNAL_DUMPER_FUNCTIONS_DLSCH_DECODING2,
|
||||
VCD_SIGNAL_DUMPER_FUNCTIONS_DLSCH_DECODING3,
|
||||
VCD_SIGNAL_DUMPER_FUNCTIONS_DLSCH_DECODING4,
|
||||
VCD_SIGNAL_DUMPER_FUNCTIONS_DLSCH_DECODING5,
|
||||
VCD_SIGNAL_DUMPER_FUNCTIONS_DLSCH_DECODING6,
|
||||
VCD_SIGNAL_DUMPER_FUNCTIONS_DLSCH_DECODING7,
|
||||
VCD_SIGNAL_DUMPER_FUNCTIONS_RX_PDCCH,
|
||||
VCD_SIGNAL_DUMPER_FUNCTIONS_DCI_DECODING,
|
||||
VCD_SIGNAL_DUMPER_FUNCTIONS_PHY_UE_CONFIG_SIB2,
|
||||
VCD_SIGNAL_DUMPER_FUNCTIONS_PHY_CONFIG_SIB1_ENB,
|
||||
VCD_SIGNAL_DUMPER_FUNCTIONS_PHY_CONFIG_SIB2_ENB,
|
||||
VCD_SIGNAL_DUMPER_FUNCTIONS_PHY_CONFIG_DEDICATED_ENB,
|
||||
VCD_SIGNAL_DUMPER_FUNCTIONS_PHY_UE_COMPUTE_PRACH,
|
||||
VCD_SIGNAL_DUMPER_FUNCTIONS_PHY_ENB_ULSCH_DECODING,
|
||||
VCD_SIGNAL_DUMPER_FUNCTIONS_PHY_ENB_SFGEN,
|
||||
VCD_SIGNAL_DUMPER_FUNCTIONS_PHY_ENB_PRACH_RX,
|
||||
VCD_SIGNAL_DUMPER_FUNCTIONS_PHY_ENB_PDCCH_TX,
|
||||
VCD_SIGNAL_DUMPER_FUNCTIONS_PHY_ENB_RS_TX,
|
||||
VCD_SIGNAL_DUMPER_FUNCTIONS_UE_ULSCH_MODULATION,
|
||||
VCD_SIGNAL_DUMPER_FUNCTIONS_UE_ULSCH_ENCODING,
|
||||
VCD_SIGNAL_DUMPER_FUNCTIONS_UE_ULSCH_SCRAMBLING,
|
||||
VCD_SIGNAL_DUMPER_FUNCTIONS_ENB_DLSCH_MODULATION,
|
||||
VCD_SIGNAL_DUMPER_FUNCTIONS_ENB_DLSCH_ENCODING,
|
||||
VCD_SIGNAL_DUMPER_FUNCTIONS_ENB_DLSCH_SCRAMBLING,
|
||||
|
||||
/* MAC signals */
|
||||
VCD_SIGNAL_DUMPER_FUNCTIONS_MACPHY_INIT,
|
||||
VCD_SIGNAL_DUMPER_FUNCTIONS_MACPHY_EXIT,
|
||||
VCD_SIGNAL_DUMPER_FUNCTIONS_ENB_DLSCH_ULSCH_SCHEDULER,
|
||||
VCD_SIGNAL_DUMPER_FUNCTIONS_FILL_RAR,
|
||||
VCD_SIGNAL_DUMPER_FUNCTIONS_TERMINATE_RA_PROC,
|
||||
VCD_SIGNAL_DUMPER_FUNCTIONS_INITIATE_RA_PROC,
|
||||
VCD_SIGNAL_DUMPER_FUNCTIONS_CANCEL_RA_PROC,
|
||||
VCD_SIGNAL_DUMPER_FUNCTIONS_GET_DCI_SDU,
|
||||
VCD_SIGNAL_DUMPER_FUNCTIONS_GET_DLSCH_SDU,
|
||||
VCD_SIGNAL_DUMPER_FUNCTIONS_RX_SDU,
|
||||
VCD_SIGNAL_DUMPER_FUNCTIONS_MRBCH_PHY_SYNC_FAILURE,
|
||||
VCD_SIGNAL_DUMPER_FUNCTIONS_SR_INDICATION,
|
||||
VCD_SIGNAL_DUMPER_FUNCTIONS_DLSCH_PREPROCESSOR,
|
||||
VCD_SIGNAL_DUMPER_FUNCTIONS_SCHEDULE_DLSCH, // schedule_ue_spec
|
||||
VCD_SIGNAL_DUMPER_FUNCTIONS_FILL_DLSCH_DCI,
|
||||
|
||||
VCD_SIGNAL_DUMPER_FUNCTIONS_OUT_OF_SYNC_IND,
|
||||
VCD_SIGNAL_DUMPER_FUNCTIONS_UE_DECODE_SI,
|
||||
VCD_SIGNAL_DUMPER_FUNCTIONS_UE_DECODE_CCCH,
|
||||
VCD_SIGNAL_DUMPER_FUNCTIONS_UE_DECODE_BCCH,
|
||||
VCD_SIGNAL_DUMPER_FUNCTIONS_UE_SEND_SDU,
|
||||
VCD_SIGNAL_DUMPER_FUNCTIONS_UE_GET_SDU,
|
||||
VCD_SIGNAL_DUMPER_FUNCTIONS_UE_GET_RACH,
|
||||
VCD_SIGNAL_DUMPER_FUNCTIONS_UE_PROCESS_RAR,
|
||||
VCD_SIGNAL_DUMPER_FUNCTIONS_UE_SCHEDULER,
|
||||
VCD_SIGNAL_DUMPER_FUNCTIONS_UE_GET_SR,
|
||||
VCD_SIGNAL_DUMPER_FUNCTIONS_UE_SEND_MCH_SDU,
|
||||
|
||||
/* RLC signals */
|
||||
VCD_SIGNAL_DUMPER_FUNCTIONS_RLC_DATA_REQ,
|
||||
// VCD_SIGNAL_DUMPER_FUNCTIONS_RLC_DATA_IND,
|
||||
VCD_SIGNAL_DUMPER_FUNCTIONS_MAC_RLC_STATUS_IND,
|
||||
VCD_SIGNAL_DUMPER_FUNCTIONS_MAC_RLC_DATA_REQ,
|
||||
VCD_SIGNAL_DUMPER_FUNCTIONS_MAC_RLC_DATA_IND,
|
||||
|
||||
/* PDCP signals */
|
||||
VCD_SIGNAL_DUMPER_FUNCTIONS_PDCP_RUN,
|
||||
VCD_SIGNAL_DUMPER_FUNCTIONS_PDCP_DATA_REQ,
|
||||
VCD_SIGNAL_DUMPER_FUNCTIONS_PDCP_DATA_IND,
|
||||
VCD_SIGNAL_DUMPER_FUNCTIONS_PDCP_APPLY_SECURITY,
|
||||
VCD_SIGNAL_DUMPER_FUNCTIONS_PDCP_VALIDATE_SECURITY,
|
||||
|
||||
/* RRC signals */
|
||||
VCD_SIGNAL_DUMPER_FUNCTIONS_RRC_MAC_CONFIG,
|
||||
VCD_SIGNAL_DUMPER_FUNCTIONS_RRC_UE_DECODE_SIB1,
|
||||
VCD_SIGNAL_DUMPER_FUNCTIONS_RRC_UE_DECODE_SI,
|
||||
|
||||
/* MISC signals */
|
||||
VCD_SIGNAL_DUMPER_FUNCTIONS_EMU_TRANSPORT,
|
||||
VCD_SIGNAL_DUMPER_FUNCTIONS_LOG_RECORD,
|
||||
VCD_SIGNAL_DUMPER_FUNCTIONS_ITTI_ENQUEUE_MESSAGE,
|
||||
VCD_SIGNAL_DUMPER_FUNCTIONS_ITTI_DUMP_ENQUEUE_MESSAGE,
|
||||
VCD_SIGNAL_DUMPER_FUNCTIONS_ITTI_DUMP_ENQUEUE_MESSAGE_MALLOC,
|
||||
VCD_SIGNAL_DUMPER_FUNCTIONS_ITTI_RELAY_THREAD,
|
||||
VCD_SIGNAL_DUMPER_FUNCTIONS_TEST,
|
||||
VCD_SIGNAL_DUMPER_FUNCTIONS_LAST,
|
||||
VCD_SIGNAL_DUMPER_FUNCTIONS_END = VCD_SIGNAL_DUMPER_FUNCTIONS_LAST,
|
||||
} vcd_signal_dump_functions;
|
||||
|
||||
typedef enum
|
||||
|
||||
Reference in New Issue
Block a user