fixed bug in ulsch_scheduler
ue runs again on exmimo2 (but does not connect yet) added openair0_reconfig function in exmimo2 library added sensing thread for SPECTRA in lte-softmodem (protected by #ifdef SPECTRA) added Rohde and Schwarz client git-svn-id: http://svn.eurecom.fr/openair4G/trunk@5780 818b1a75-f10b-46b9-bf7c-635c3b92a50f
This commit is contained in:
@@ -520,7 +520,7 @@ typedef struct{
|
||||
uint8_t bsr_info[MAX_NUM_LCGID];
|
||||
|
||||
/// phr information
|
||||
uint8_t phr_info;
|
||||
int8_t phr_info;
|
||||
|
||||
//dl buffer info
|
||||
uint32_t dl_buffer_info[MAX_NUM_LCID];
|
||||
|
||||
@@ -99,7 +99,7 @@ void rx_sdu(module_id_t enb_mod_idP,int CC_id,frame_t frameP,rnti_t rntiP,uint8_
|
||||
switch (rx_ces[i]) { // implement and process BSR + CRNTI +
|
||||
case POWER_HEADROOM:
|
||||
if (UE_id != UE_INDEX_INVALID ){
|
||||
UE_list->UE_template[CC_id][UE_id].phr_info = (payload_ptr[0] & 0x3f);// - PHR_MAPPING_OFFSET;
|
||||
UE_list->UE_template[CC_id][UE_id].phr_info = (payload_ptr[0] & 0x3f) - PHR_MAPPING_OFFSET;
|
||||
LOG_D(MAC, "[eNB] MAC CE_LCID %d : Received PHR PH = %d (db)\n", rx_ces[i], UE_list->UE_template[CC_id][UE_id].phr_info);
|
||||
}
|
||||
payload_ptr+=sizeof(POWER_HEADROOM_CMD);
|
||||
@@ -490,7 +490,7 @@ void schedule_ulsch_rnti(module_id_t module_idP,
|
||||
uint8_t status = 0;
|
||||
uint8_t rb_table_index = -1;
|
||||
uint16_t TBS,i;
|
||||
uint32_t buffer_occupancy;
|
||||
int32_t buffer_occupancy;
|
||||
uint32_t tmp_bsr;
|
||||
uint32_t cqi_req,cshift,ndi,mcs,rballoc;
|
||||
|
||||
@@ -521,25 +521,25 @@ void schedule_ulsch_rnti(module_id_t module_idP,
|
||||
if (eNB_UE_stats==NULL)
|
||||
mac_xface->macphy_exit("[MAC][eNB] Cannot find eNB_UE_stats\n");
|
||||
|
||||
LOG_I(MAC,"[eNB %d] Scheduler Frame %d, subframeP %d, nCCE %d: Checking ULSCH next UE_id %d mode id %d (rnti %x,mode %s), format 0\n",
|
||||
LOG_D(MAC,"[eNB %d] Scheduler Frame %d, subframeP %d, nCCE %d: Checking ULSCH next UE_id %d mode id %d (rnti %x,mode %s), format 0\n",
|
||||
module_idP,frameP,subframeP,*nCCE,UE_id,module_idP, rnti,mode_string[eNB_UE_stats->mode]);
|
||||
|
||||
if (eNB_UE_stats->mode == PUSCH) { // ue has a ulsch channel
|
||||
int8_t ret;
|
||||
// Get candidate harq_pid from PHY
|
||||
ret = mac_xface->get_ue_active_harq_pid(module_idP,CC_id,rnti,frameP,subframeP,&harq_pid,&round,1);
|
||||
LOG_I(MAC,"Got harq_pid %d, round %d, UE_id %d (UE_to_be_scheduled %d)\n",harq_pid,round,UE_id,
|
||||
LOG_D(MAC,"Got harq_pid %d, round %d, UE_id %d (UE_to_be_scheduled %d)\n",harq_pid,round,UE_id,
|
||||
UE_is_to_be_scheduled(module_idP,CC_id,UE_id));
|
||||
|
||||
/* [SR] 01/07/13: Don't schedule UE if we cannot get harq pid */
|
||||
//#ifndef EXMIMO_IOT
|
||||
// if ((((UE_is_to_be_scheduled(module_idP,CC_id,UE_id)>0)) || (round>0) || ((frameP%10)==0)) && (ret == 0))
|
||||
#ifndef EXMIMO_IOT
|
||||
if ((((UE_is_to_be_scheduled(module_idP,CC_id,UE_id)>0)) || (round>0) || ((frameP%10)==0)) && (ret == 0))
|
||||
// if there is information on bsr of DCCH, DTCH or if there is UL_SR, or if there is a packet to retransmit, or we want to schedule a periodic feedback every 10 frames
|
||||
//#else
|
||||
#else
|
||||
if (round==0)
|
||||
//#endif
|
||||
#endif
|
||||
{
|
||||
LOG_D(MAC,"[eNB %d][PUSCH %d] Frame %d subframeP %d Scheduling UE %d round %d (SR %d)\n",
|
||||
LOG_I(MAC,"[eNB %d][PUSCH %d] Frame %d subframeP %d Scheduling UE %d round %d (SR %d)\n",
|
||||
module_idP,harq_pid,frameP,subframeP,UE_id,round,
|
||||
UE_template->ul_SR);
|
||||
|
||||
@@ -636,37 +636,38 @@ void schedule_ulsch_rnti(module_id_t module_idP,
|
||||
|
||||
UE_template->nb_rb_ul[harq_pid] = rb_table[rb_table_index]; //store for possible retransmission
|
||||
|
||||
buffer_occupancy -= mac_xface->get_TBS_UL(mcs,rb_table[rb_table_index]);
|
||||
i = bytes_to_bsr_index((int32_t)buffer_occupancy);
|
||||
|
||||
// Adjust BSR entries for LCGIDs
|
||||
if (i>0) {
|
||||
if (UE_template->bsr_info[LCGID0] <= i) {
|
||||
tmp_bsr = BSR_TABLE[UE_template->bsr_info[LCGID0]];
|
||||
// the max TBS that could be served is : mac_xface->get_TBS_UL(mcs,rb_table[rb_table_index]
|
||||
TBS = mac_xface->get_TBS_UL(mcs,rb_table[rb_table_index]);
|
||||
buffer_occupancy -= TBS;
|
||||
|
||||
// Adjust BSR entries for LCGIDs
|
||||
if (buffer_occupancy > 0 ) { // could not serve all the uplink traffic
|
||||
if (BSR_TABLE[UE_template->bsr_info[LCGID0]] <= TBS ) {
|
||||
tmp_bsr = BSR_TABLE[UE_template->bsr_info[LCGID0]]; // serving this amout of bytes
|
||||
UE_template->bsr_info[LCGID0] = 0;
|
||||
if (BSR_TABLE[UE_template->bsr_info[LCGID1]] <= (buffer_occupancy-tmp_bsr)) {
|
||||
if (BSR_TABLE[UE_template->bsr_info[LCGID1]] <= (TBS-tmp_bsr)) {
|
||||
tmp_bsr += BSR_TABLE[UE_template->bsr_info[LCGID1]];
|
||||
UE_template->bsr_info[LCGID1] = 0;
|
||||
if (BSR_TABLE[UE_template->bsr_info[LCGID2]] <= (buffer_occupancy-tmp_bsr)) {
|
||||
if (BSR_TABLE[UE_template->bsr_info[LCGID2]] <= (TBS-tmp_bsr)) {
|
||||
tmp_bsr += BSR_TABLE[UE_template->bsr_info[LCGID2]];
|
||||
UE_template->bsr_info[LCGID2] = 0;
|
||||
if (BSR_TABLE[UE_template->bsr_info[LCGID3]] <= (buffer_occupancy-tmp_bsr)) {
|
||||
if (BSR_TABLE[UE_template->bsr_info[LCGID3]] <= (TBS-tmp_bsr)) {
|
||||
tmp_bsr += BSR_TABLE[UE_template->bsr_info[LCGID3]];
|
||||
UE_template->bsr_info[LCGID3] = 0;
|
||||
} else {
|
||||
UE_template->bsr_info[LCGID3] = bytes_to_bsr_index((int32_t)BSR_TABLE[UE_template->bsr_info[LCGID3]] - ((int32_t)buffer_occupancy - (int32_t)tmp_bsr));
|
||||
UE_template->bsr_info[LCGID3] = bytes_to_bsr_index((int32_t)BSR_TABLE[UE_template->bsr_info[LCGID3]] - ((int32_t) TBS - (int32_t)tmp_bsr));
|
||||
}
|
||||
}
|
||||
else {
|
||||
UE_template->bsr_info[LCGID2] = bytes_to_bsr_index((int32_t)BSR_TABLE[UE_template->bsr_info[LCGID2]] - ((int32_t)buffer_occupancy -(int32_t)tmp_bsr));
|
||||
UE_template->bsr_info[LCGID2] = bytes_to_bsr_index((int32_t)BSR_TABLE[UE_template->bsr_info[LCGID2]] - ((int32_t)TBS - (int32_t)tmp_bsr));
|
||||
}
|
||||
}
|
||||
else {
|
||||
UE_template->bsr_info[LCGID1] = bytes_to_bsr_index((int32_t)BSR_TABLE[UE_template->bsr_info[LCGID1]] - (int32_t)buffer_occupancy);
|
||||
UE_template->bsr_info[LCGID1] = bytes_to_bsr_index((int32_t)BSR_TABLE[UE_template->bsr_info[LCGID1]] - ((int32_t)TBS - (int32_t)tmp_bsr));
|
||||
}
|
||||
}
|
||||
else {
|
||||
UE_template->bsr_info[LCGID0] = bytes_to_bsr_index((int32_t)BSR_TABLE[UE_template->bsr_info[LCGID0]] - (int32_t)buffer_occupancy);
|
||||
UE_template->bsr_info[LCGID0] = bytes_to_bsr_index((int32_t)BSR_TABLE[UE_template->bsr_info[LCGID0]] - (int32_t)TBS);
|
||||
}
|
||||
}
|
||||
else { // we have flushed all buffers so clear bsr
|
||||
|
||||
@@ -110,7 +110,7 @@ int dump_eNB_l2_stats(char *buffer, int length){
|
||||
}
|
||||
len += sprintf(&buffer[len],"\n");
|
||||
|
||||
for (UE_id=UE_list->head;UE_id>0;UE_id=UE_list->next[UE_id]) {
|
||||
for (UE_id=UE_list->head;UE_id>=0;UE_id=UE_list->next[UE_id]) {
|
||||
for (i=0;i<UE_list->numactiveCCs[UE_id];i++) {
|
||||
CC_id=UE_list->ordered_CCids[i][UE_id];
|
||||
UE_list->eNB_UE_stats[CC_id][UE_id].dlsch_bitrate=((UE_list->eNB_UE_stats[CC_id][UE_id].TBS*8)/((eNB->frame + 1)*10));
|
||||
@@ -118,7 +118,7 @@ int dump_eNB_l2_stats(char *buffer, int length){
|
||||
UE_list->eNB_UE_stats[CC_id][UE_id].total_overhead_bytes+= UE_list->eNB_UE_stats[CC_id][UE_id].overhead_bytes;
|
||||
UE_list->eNB_UE_stats[CC_id][UE_id].avg_overhead_bytes=((UE_list->eNB_UE_stats[CC_id][UE_id].total_overhead_bytes*8)/((eNB->frame + 1)*10));
|
||||
|
||||
len += sprintf(&buffer[len],"UE %d %s, RNTI %x : CQI %d, MCS(%d->%d), RB(tx %d, retx %d, total %d), ncce (tx %d, retx %d) \n ",
|
||||
len += sprintf(&buffer[len],"UE %d %s, RNTI %x : CQI %d, MCS1 %d, MCS2 %d, RB (tx %d, retx %d, total %d), ncce (tx %d, retx %d) \n",
|
||||
UE_id,
|
||||
map_int_to_str(rrc_status_names, UE_list->eNB_UE_stats[CC_id][UE_id].rrc_status),
|
||||
UE_list->eNB_UE_stats[CC_id][UE_id].crnti,
|
||||
@@ -135,7 +135,7 @@ int dump_eNB_l2_stats(char *buffer, int length){
|
||||
len += sprintf(&buffer[len],
|
||||
"[MAC] DLSCH bitrate (TTI %d, avg %d), Transmitted bytes "
|
||||
"(TTI %d, total %"PRIu64"), Total Transmitted PDU %d, Overhead "
|
||||
"(TTI %"PRIu64", total %"PRIu64", avg %"PRIu64,
|
||||
"(TTI %"PRIu64", total %"PRIu64", avg %"PRIu64")\n",
|
||||
UE_list->eNB_UE_stats[CC_id][UE_id].dlsch_bitrate,
|
||||
UE_list->eNB_UE_stats[CC_id][UE_id].total_dlsch_bitrate,
|
||||
UE_list->eNB_UE_stats[CC_id][UE_id].TBS,
|
||||
@@ -145,6 +145,7 @@ int dump_eNB_l2_stats(char *buffer, int length){
|
||||
UE_list->eNB_UE_stats[CC_id][UE_id].total_overhead_bytes,
|
||||
UE_list->eNB_UE_stats[CC_id][UE_id].avg_overhead_bytes
|
||||
);
|
||||
len+= sprintf(&buffer[len],"Received PHR PH = %d (db)\n", UE_list->UE_template[CC_id][UE_id].phr_info);
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
@@ -734,8 +734,8 @@ uint8_t do_SIB23(uint8_t Mod_id,
|
||||
// uplinkPowerControlCommon
|
||||
|
||||
#ifdef EXMIMO
|
||||
(*sib2)->radioResourceConfigCommon.uplinkPowerControlCommon.p0_NominalPUSCH = -90;
|
||||
(*sib2)->radioResourceConfigCommon.uplinkPowerControlCommon.p0_NominalPUCCH = -96;
|
||||
(*sib2)->radioResourceConfigCommon.uplinkPowerControlCommon.p0_NominalPUSCH = -98;//-90;
|
||||
(*sib2)->radioResourceConfigCommon.uplinkPowerControlCommon.p0_NominalPUCCH = -98;//-96;
|
||||
#else
|
||||
(*sib2)->radioResourceConfigCommon.uplinkPowerControlCommon.p0_NominalPUSCH = -108;
|
||||
(*sib2)->radioResourceConfigCommon.uplinkPowerControlCommon.p0_NominalPUCCH = -108;
|
||||
|
||||
+14
-15
@@ -897,7 +897,8 @@ static void rrc_eNB_generate_defaultRRCConnectionReconfiguration(
|
||||
|
||||
MeasObj->measObjectId = 1;
|
||||
MeasObj->measObject.present = MeasObjectToAddMod__measObject_PR_measObjectEUTRA;
|
||||
MeasObj->measObject.choice.measObjectEUTRA.carrierFreq = 36090;
|
||||
MeasObj->measObject.choice.measObjectEUTRA.carrierFreq = 3350; //band 7, 2.68GHz
|
||||
//MeasObj->measObject.choice.measObjectEUTRA.carrierFreq = 36090; //band 33, 1.909GHz
|
||||
MeasObj->measObject.choice.measObjectEUTRA.allowedMeasBandwidth = AllowedMeasBandwidth_mbw25;
|
||||
MeasObj->measObject.choice.measObjectEUTRA.presenceAntennaPort1 = 1;
|
||||
MeasObj->measObject.choice.measObjectEUTRA.neighCellConfig.buf = CALLOC(1, sizeof(uint8_t));
|
||||
@@ -1143,16 +1144,17 @@ static void rrc_eNB_generate_defaultRRCConnectionReconfiguration(
|
||||
|
||||
memset(buffer, 0, RRC_BUF_SIZE);
|
||||
|
||||
size = do_RRCConnectionReconfiguration(enb_mod_idP, buffer, ue_mod_idP, rrc_eNB_get_next_transaction_identifier(enb_mod_idP), //Transaction_id,
|
||||
NULL, /// NN: do not reconfig srb1: SRB_configList2,
|
||||
*DRB_configList, NULL, // DRB2_list,
|
||||
NULL, // *sps_Config,
|
||||
size = do_RRCConnectionReconfiguration(enb_mod_idP, buffer, ue_mod_idP,
|
||||
rrc_eNB_get_next_transaction_identifier(enb_mod_idP), //Transaction_id,
|
||||
NULL, /// NN: do not reconfig srb1: SRB_configList2,
|
||||
*DRB_configList, NULL, // DRB2_list,
|
||||
NULL, // *sps_Config,
|
||||
#ifdef EXMIMO_IOT
|
||||
NULL, NULL, NULL, NULL,NULL,
|
||||
NULL, NULL, NULL, NULL,NULL,
|
||||
#else
|
||||
physicalConfigDedicated[ue_mod_idP], MeasObj_list, ReportConfig_list, quantityConfig, MeasId_list,
|
||||
physicalConfigDedicated[ue_mod_idP], MeasObj_list, ReportConfig_list, quantityConfig, MeasId_list,
|
||||
#endif
|
||||
mac_MainConfig, NULL, NULL, Sparams, rsrp, cba_RNTI, dedicatedInfoNASList);
|
||||
mac_MainConfig, NULL, NULL, Sparams, rsrp, cba_RNTI, dedicatedInfoNASList);
|
||||
|
||||
#ifdef RRC_MSG_PRINT
|
||||
LOG_F(RRC,"[MSG] RRC Connection Reconfiguration\n");
|
||||
@@ -2483,11 +2485,8 @@ void rrc_eNB_generate_RRCConnectionSetup(
|
||||
eNB_rrc_inst[enb_mod_idP].Srb0.Tx_buffer.payload_size =
|
||||
do_RRCConnectionSetup(enb_mod_idP,
|
||||
(uint8_t *) eNB_rrc_inst[enb_mod_idP].Srb0.Tx_buffer.Payload,
|
||||
mac_xface->get_transmission_mode(enb_mod_idP,0, //CC_id 0!!!!
|
||||
UE_RNTI
|
||||
(enb_mod_idP,
|
||||
ue_mod_idP)),
|
||||
ue_mod_idP,
|
||||
(mac_xface->lte_frame_parms->nb_antennas_tx==2)?2:1,
|
||||
ue_mod_idP,
|
||||
rrc_eNB_get_next_transaction_identifier(enb_mod_idP),
|
||||
mac_xface->lte_frame_parms,
|
||||
SRB_configList, &eNB_rrc_inst[enb_mod_idP].physicalConfigDedicated[ue_mod_idP]);
|
||||
@@ -3128,9 +3127,9 @@ int rrc_eNB_decode_dcch(
|
||||
ul_dcch_msg->message.choice.c1.choice.ueCapabilityInformation.criticalExtensions.
|
||||
choice.c1.choice.ueCapabilityInformation_r8.ue_CapabilityRAT_ContainerList.list.
|
||||
array[0]->ueCapabilityRAT_Container.size, 0, 0);
|
||||
#ifdef XER_PRINT
|
||||
//#ifdef XER_PRINT
|
||||
xer_fprint(stdout, &asn_DEF_UE_EUTRA_Capability, (void *)UE_EUTRA_Capability);
|
||||
#endif
|
||||
//#endif
|
||||
|
||||
#if defined(ENABLE_USE_MME)
|
||||
if (EPC_MODE_ENABLED == 1) {
|
||||
|
||||
Reference in New Issue
Block a user