NFAPI SNR interfaces for PUCCH1/PUSCH integrated with power control loops.
This commit is contained in:
@@ -819,8 +819,11 @@ typedef struct {
|
||||
int32_t phr_received;
|
||||
uint8_t periodic_ri_received[NFAPI_CC_MAX];
|
||||
uint8_t aperiodic_ri_received[NFAPI_CC_MAX];
|
||||
uint8_t pucch1_cqi_update[NFAPI_CC_MAX];
|
||||
uint8_t pucch1_snr[NFAPI_CC_MAX];
|
||||
uint8_t pucch2_cqi_update[NFAPI_CC_MAX];
|
||||
uint8_t pucch2_snr[NFAPI_CC_MAX];
|
||||
uint8_t pucch3_cqi_update[NFAPI_CC_MAX];
|
||||
uint8_t pucch3_snr[NFAPI_CC_MAX];
|
||||
uint8_t pusch_snr[NFAPI_CC_MAX];
|
||||
uint16_t feedback_cnt[NFAPI_CC_MAX];
|
||||
|
||||
@@ -1165,16 +1165,17 @@ schedule_ue_spec(
|
||||
// do PUCCH power control
|
||||
// this is the normalized RX power
|
||||
eNB_UE_stats = &UE_list->eNB_UE_stats[CC_id][UE_id];
|
||||
normalized_rx_power = eNB_UE_stats->Po_PUCCH_dBm;
|
||||
target_rx_power = cc[CC_id].radioResourceConfigCommon->uplinkPowerControlCommon.p0_NominalPUCCH + 20;
|
||||
|
||||
normalized_rx_power = ue_sched_ctl->pucch1_snr[CC_id];
|
||||
target_rx_power = 20;
|
||||
|
||||
// this assumes accumulated tpc
|
||||
// make sure that we are only sending a tpc update once a frame, otherwise the control loop will freak out
|
||||
int32_t framex10psubframe = UE_list->UE_template[CC_id][UE_id].pucch_tpc_tx_frame*10+UE_list->UE_template[CC_id][UE_id].pucch_tpc_tx_subframe;
|
||||
if (((framex10psubframe+10)<=(frameP*10+subframeP)) || //normal case
|
||||
((framex10psubframe>(frameP*10+subframeP)) && (((10240-framex10psubframe+frameP*10+subframeP)>=10)))) //frame wrap-around
|
||||
if (eNB_UE_stats->Po_PUCCH_update == 1) {
|
||||
eNB_UE_stats->Po_PUCCH_update = 0;
|
||||
if (ue_sched_ctl->pucch1_cqi_update[CC_id] == 1) {
|
||||
ue_sched_ctl->pucch1_cqi_update[CC_id] = 0;
|
||||
|
||||
UE_list->UE_template[CC_id][UE_id].pucch_tpc_tx_frame=frameP;
|
||||
UE_list->UE_template[CC_id][UE_id].pucch_tpc_tx_subframe=subframeP;
|
||||
@@ -1188,10 +1189,10 @@ schedule_ue_spec(
|
||||
} else {
|
||||
tpc = 1; //0
|
||||
}
|
||||
/*
|
||||
LOG_I(MAC,"[eNB %d] DLSCH scheduler: frame %d, subframe %d, harq_pid %d, tpc %d, accumulated %d, normalized/target rx power %d/%d\n",
|
||||
|
||||
LOG_D(MAC,"[eNB %d] DLSCH scheduler: frame %d, subframe %d, harq_pid %d, tpc %d, accumulated %d, normalized/target rx power %d/%d\n",
|
||||
module_idP,frameP, subframeP,harq_pid,tpc,
|
||||
tpc_accumulated,normalized_rx_power,target_rx_power);*/
|
||||
tpc_accumulated,normalized_rx_power,target_rx_power);
|
||||
|
||||
} // Po_PUCCH has been updated
|
||||
else {
|
||||
|
||||
@@ -3626,6 +3626,12 @@ void SR_indication(module_id_t mod_idP, int cc_idP, frame_t frameP, sub_frame_t
|
||||
if (UE_id != -1) {
|
||||
if (mac_eNB_get_rrc_status(mod_idP,UE_RNTI(mod_idP,UE_id)) < RRC_CONNECTED)
|
||||
LOG_I(MAC,"[eNB %d][SR %x] Frame %d subframeP %d Signaling SR for UE %d on CC_id %d\n",mod_idP,rntiP,frameP,subframeP, UE_id,cc_idP);
|
||||
|
||||
UE_sched_ctrl *sched_ctl = &UE_list->UE_sched_ctrl[UE_id];
|
||||
|
||||
sched_ctl->pucch1_snr[cc_idP] = ul_cqi;
|
||||
sched_ctl->pucch1_cqi_update[cc_idP] = 1;
|
||||
|
||||
UE_list->UE_template[cc_idP][UE_id].ul_SR = 1;
|
||||
UE_list->UE_template[cc_idP][UE_id].ul_active = TRUE;
|
||||
VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME(VCD_SIGNAL_DUMPER_FUNCTIONS_SR_INDICATION,1);
|
||||
@@ -3667,9 +3673,11 @@ void harq_indication(module_id_t mod_idP, int CC_idP, frame_t frameP, sub_frame_
|
||||
UE_sched_ctrl *sched_ctl = &UE_list->UE_sched_ctrl[UE_id];
|
||||
COMMON_channels_t *cc = &RC.mac[mod_idP]->common_channels[CC_idP];
|
||||
// extract HARQ Information
|
||||
LOG_D(MAC,"Frame %d, subframe %d: Received harq indication (%d) from UE %d/%x\n",frameP,subframeP,channel,UE_id,rnti);
|
||||
LOG_D(MAC,"Frame %d, subframe %d: Received harq indication (%d) from UE %d/%x, ul_cqi %d\n",frameP,subframeP,channel,UE_id,rnti,ul_cqi);
|
||||
if (cc->tdd_Config) extract_harq(mod_idP,CC_idP,UE_id,frameP,subframeP,(void*)&harq_pdu->harq_indication_tdd_rel13,channel);
|
||||
else extract_harq(mod_idP,CC_idP,UE_id,frameP,subframeP,(void*)&harq_pdu->harq_indication_fdd_rel13,channel);
|
||||
if (channel == 0) sched_ctl->pucch1_snr[CC_idP] = ul_cqi;
|
||||
|
||||
if (channel == 0) {
|
||||
sched_ctl->pucch1_snr[CC_idP] = ul_cqi;
|
||||
sched_ctl->pucch1_cqi_update[CC_idP] = 1;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -994,8 +994,8 @@ abort();
|
||||
//compute the expected ULSCH RX power (for the stats)
|
||||
|
||||
// this is the normalized RX power and this should be constant (regardless of mcs
|
||||
normalized_rx_power = eNB_UE_stats->UL_rssi;
|
||||
target_rx_power = cc[CC_id].radioResourceConfigCommon->uplinkPowerControlCommon.p0_NominalPUSCH;//get_target_pusch_rx_power(module_idP,CC_id);
|
||||
normalized_rx_power = UE_sched_ctrl->pusch_snr[CC_id];
|
||||
target_rx_power = 20;
|
||||
|
||||
// this assumes accumulated tpc
|
||||
// make sure that we are only sending a tpc update once a frame, otherwise the control loop will freak out
|
||||
|
||||
Reference in New Issue
Block a user