Commit 550ef12a authored by knopp's avatar knopp

FK/RK, added power control for PUCCH

git-svn-id: http://svn.eurecom.fr/openair4G/trunk@7613 818b1a75-f10b-46b9-bf7c-635c3b92a50f
parent 9bb953f9
...@@ -692,8 +692,10 @@ typedef struct { ...@@ -692,8 +692,10 @@ typedef struct {
int32_t ue_tx_power; int32_t ue_tx_power;
/// stores the frame where the last TPC was transmitted /// stores the frame where the last TPC was transmitted
uint32_t tpc_tx_frame; uint32_t pusch_tpc_tx_frame;
uint32_t tpc_tx_subframe; uint32_t pusch_tpc_tx_subframe;
uint32_t pucch_tpc_tx_frame;
uint32_t pucch_tpc_tx_subframe;
#ifdef LOCALIZATION #ifdef LOCALIZATION
eNB_UE_estimated_distances distance; eNB_UE_estimated_distances distance;
......
This diff is collapsed.
...@@ -611,10 +611,17 @@ void schedule_ulsch(module_id_t module_idP, frame_t frameP,unsigned char coopera ...@@ -611,10 +611,17 @@ void schedule_ulsch(module_id_t module_idP, frame_t frameP,unsigned char coopera
if ((eNB->common_channels[CC_id].RA_template[i].RA_active == TRUE) && if ((eNB->common_channels[CC_id].RA_template[i].RA_active == TRUE) &&
(eNB->common_channels[CC_id].RA_template[i].generate_rar == 0) && (eNB->common_channels[CC_id].RA_template[i].generate_rar == 0) &&
(eNB->common_channels[CC_id].RA_template[i].Msg3_subframe == sched_subframe)) { (eNB->common_channels[CC_id].RA_template[i].Msg3_subframe == sched_subframe)) {
//leave out first RB for PUCCH
first_rb[CC_id]++; first_rb[CC_id]++;
break; break;
} }
} }
/*
if (mac_xface->is_prach_subframe(&(mac_xface->lte_frame_parms),frameP,subframeP)) {
first_rb[CC_id] = (mac_xface->get_prach_prb_offset(&(mac_xface->lte_frame_parms),
*/
} }
schedule_ulsch_rnti(module_idP, cooperation_flag, frameP, subframeP, sched_subframe, nCCE, nCCE_available, first_rb); schedule_ulsch_rnti(module_idP, cooperation_flag, frameP, subframeP, sched_subframe, nCCE, nCCE_available, first_rb);
...@@ -650,7 +657,7 @@ void schedule_ulsch_rnti(module_id_t module_idP, ...@@ -650,7 +657,7 @@ void schedule_ulsch_rnti(module_id_t module_idP,
DCI_PDU *DCI_pdu; DCI_PDU *DCI_pdu;
uint8_t status = 0; uint8_t status = 0;
uint8_t rb_table_index = -1; uint8_t rb_table_index = -1;
uint16_t TBS = 0,i; uint16_t TBS = 0;
int32_t buffer_occupancy=0; int32_t buffer_occupancy=0;
uint32_t cqi_req,cshift,ndi,mcs,rballoc,tpc; uint32_t cqi_req,cshift,ndi,mcs,rballoc,tpc;
int32_t normalized_rx_power, target_rx_power=-90; int32_t normalized_rx_power, target_rx_power=-90;
...@@ -744,13 +751,13 @@ void schedule_ulsch_rnti(module_id_t module_idP, ...@@ -744,13 +751,13 @@ void schedule_ulsch_rnti(module_id_t module_idP,
// this is the normalized RX power and this should be constant (regardless of mcs // this is the normalized RX power and this should be constant (regardless of mcs
normalized_rx_power = eNB_UE_stats->UL_rssi[0]; normalized_rx_power = eNB_UE_stats->UL_rssi[0];
target_rx_power = mac_xface->get_target_ul_rx_power(module_idP,CC_id); target_rx_power = mac_xface->get_target_pusch_rx_power(module_idP,CC_id);
// this assumes accumulated tpc // this assumes accumulated tpc
// make sure that we are only sending a tpc update once a frame, otherwise the control loop will freak out // make sure that we are only sending a tpc update once a frame, otherwise the control loop will freak out
if (((UE_template->tpc_tx_frame*10+UE_template->tpc_tx_subframe)%10240)<(frameP*10+subframeP+10)) { if (((UE_template->pusch_tpc_tx_frame*10+UE_template->pusch_tpc_tx_subframe)%10240)<(frameP*10+subframeP+10)) {
UE_template->tpc_tx_frame=frameP; UE_template->pusch_tpc_tx_frame=frameP;
UE_template->tpc_tx_subframe=subframeP; UE_template->pusch_tpc_tx_subframe=subframeP;
if (normalized_rx_power>(target_rx_power+1)) { if (normalized_rx_power>(target_rx_power+1)) {
tpc = 0; //-1 tpc = 0; //-1
tpc_accumulated--; tpc_accumulated--;
...@@ -760,8 +767,8 @@ void schedule_ulsch_rnti(module_id_t module_idP, ...@@ -760,8 +767,8 @@ void schedule_ulsch_rnti(module_id_t module_idP,
} else { } else {
tpc = 1; //0 tpc = 1; //0
} }
LOG_D(MAC,"[eNB %d] ULSCH scheduler: subframe %d, harq_pid %d, tpc %d, accumulated %d, normalized/target rx power %d/%d\n", LOG_I(MAC,"[eNB %d] ULSCH scheduler: frame %d, subframe %d, harq_pid %d, tpc %d, accumulated %d, normalized/target rx power %d/%d\n",
module_idP,subframeP,harq_pid,tpc, module_idP,frameP,subframeP,harq_pid,tpc,
tpc_accumulated,normalized_rx_power,target_rx_power); tpc_accumulated,normalized_rx_power,target_rx_power);
} else { } else {
tpc = 1; //0 tpc = 1; //0
......
...@@ -534,7 +534,11 @@ int l2_init(LTE_DL_FRAME_PARMS *frame_parms,int eMBMS_active, char *uecap_xer,ui ...@@ -534,7 +534,11 @@ int l2_init(LTE_DL_FRAME_PARMS *frame_parms,int eMBMS_active, char *uecap_xer,ui
mac_xface->get_mu_mimo_mode = get_mu_mimo_mode; mac_xface->get_mu_mimo_mode = get_mu_mimo_mode;
mac_xface->get_hundred_times_delta_TF = get_hundred_times_delta_IF_mac; mac_xface->get_hundred_times_delta_TF = get_hundred_times_delta_IF_mac;
mac_xface->get_target_ul_rx_power = get_target_ul_rx_power; mac_xface->get_target_pusch_rx_power = get_target_pusch_rx_power;
mac_xface->get_target_pucch_rx_power = get_target_pucch_rx_power;
mac_xface->get_prach_prb_offset = get_prach_prb_offset;
mac_xface->is_prach_subframe = is_prach_subframe;
#ifdef Rel10 #ifdef Rel10
mac_xface->get_mch_sdu = get_mch_sdu; mac_xface->get_mch_sdu = get_mch_sdu;
......
...@@ -313,7 +313,8 @@ typedef struct { ...@@ -313,7 +313,8 @@ typedef struct {
/// get the delta TF for Uplink Power Control Calculation /// get the delta TF for Uplink Power Control Calculation
int16_t (*get_hundred_times_delta_TF) (module_id_t module_idP, uint8_t CC_id, rnti_t rnti, uint8_t harq_pid); int16_t (*get_hundred_times_delta_TF) (module_id_t module_idP, uint8_t CC_id, rnti_t rnti, uint8_t harq_pid);
/// get target uplink received power /// get target uplink received power
int16_t (*get_target_ul_rx_power) (module_id_t module_idP, uint8_t CC_id); int16_t (*get_target_pusch_rx_power) (module_id_t module_idP, uint8_t CC_id);
int16_t (*get_target_pucch_rx_power) (module_id_t module_idP, uint8_t CC_id);
unsigned char is_cluster_head; unsigned char is_cluster_head;
unsigned char is_primary_cluster_head; unsigned char is_primary_cluster_head;
...@@ -323,10 +324,13 @@ typedef struct { ...@@ -323,10 +324,13 @@ typedef struct {
/// PHY Frame Configuration /// PHY Frame Configuration
LTE_DL_FRAME_PARMS *lte_frame_parms; LTE_DL_FRAME_PARMS *lte_frame_parms;
//ICIC algos uint8_t (*get_prach_prb_offset)(LTE_DL_FRAME_PARMS *frame_parms, uint8_t tdd_mapindex, uint16_t Nf);
uint8_t (*get_SB_size)(uint8_t n_rb_dl);
int (*is_prach_subframe)(LTE_DL_FRAME_PARMS *frame_parms,frame_t frame, uint8_t subframe);
//end ALU's algo /// ICIC algos
uint8_t (*get_SB_size)(uint8_t n_rb_dl);
///end ALU's algo
} MAC_xface; } MAC_xface;
......
...@@ -2441,7 +2441,6 @@ int decode_BCCH_DLSCH_Message( ...@@ -2441,7 +2441,6 @@ int decode_BCCH_DLSCH_Message(
#endif #endif
) { ) {
rrc_ue_generate_RRCConnectionRequest(ctxt_pP, 0); rrc_ue_generate_RRCConnectionRequest(ctxt_pP, 0);
LOG_I( RRC, "not sending connection request\n" );
rrc_set_sub_state( ctxt_pP->module_id, RRC_SUB_STATE_IDLE_CONNECTING ); rrc_set_sub_state( ctxt_pP->module_id, RRC_SUB_STATE_IDLE_CONNECTING );
} }
...@@ -3072,7 +3071,6 @@ static int decode_SI( const protocol_ctxt_t* const ctxt_pP, const uint8_t eNB_in ...@@ -3072,7 +3071,6 @@ static int decode_SI( const protocol_ctxt_t* const ctxt_pP, const uint8_t eNB_in
#if !(defined(ENABLE_ITTI) && defined(ENABLE_USE_MME)) #if !(defined(ENABLE_ITTI) && defined(ENABLE_USE_MME))
rrc_ue_generate_RRCConnectionRequest( ctxt_pP, eNB_index ); rrc_ue_generate_RRCConnectionRequest( ctxt_pP, eNB_index );
LOG_I( RRC, "not sending connection request\n" );
#endif #endif
if (UE_rrc_inst[ctxt_pP->module_id].Info[eNB_index].State == RRC_IDLE) { if (UE_rrc_inst[ctxt_pP->module_id].Info[eNB_index].State == RRC_IDLE) {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment