Commit 9d5621e6 authored by fnabet's avatar fnabet

[OAI-UE] SRS feature

               1- Implement SRS procedures
               2- Implement SRS procedures part2
parent 0705e71f
......@@ -881,8 +881,9 @@ void phy_config_dedicated_ue(uint8_t Mod_id,int CC_id,uint8_t eNB_id,
if (physicalConfigDedicated->soundingRS_UL_ConfigDedicated) {
phy_vars_ue->soundingrs_ul_config_dedicated[eNB_id].srsConfigDedicatedSetup = 0;
if (physicalConfigDedicated->soundingRS_UL_ConfigDedicated->present == SchedulingRequestConfig_PR_setup) {
phy_vars_ue->soundingrs_ul_config_dedicated[eNB_id].srsConfigDedicatedSetup = 1;
phy_vars_ue->soundingrs_ul_config_dedicated[eNB_id].duration = physicalConfigDedicated->soundingRS_UL_ConfigDedicated->choice.setup.duration;
phy_vars_ue->soundingrs_ul_config_dedicated[eNB_id].cyclicShift = physicalConfigDedicated->soundingRS_UL_ConfigDedicated->choice.setup.cyclicShift;
phy_vars_ue->soundingrs_ul_config_dedicated[eNB_id].freqDomainPosition = physicalConfigDedicated->soundingRS_UL_ConfigDedicated->choice.setup.freqDomainPosition;
......
......@@ -319,6 +319,8 @@ typedef struct {
uint16_t srs_ConfigIndex;
/// Parameter: \f$n^\text{CS}_\text{SRS}\f$. See TS 36.211 (5.5.3.1). \vr{[0..7]} \note the specification sais it is an enumerated value.
uint8_t cyclicShift;
// Parameter: ue srs subframe for internal implementation
uint8_t srsConfigDedicatedSetup;
// Parameter: cell srs subframe for internal implementation
uint8_t srsCellSubframe;
// Parameter: ue srs subframe for internal implementation
......
......@@ -502,7 +502,7 @@ void ue_compute_srs_occasion(PHY_VARS_UE *ue,UE_rxtx_proc_t *proc,uint8_t eNB_id
if(frame_parms->soundingrs_ul_config_common.enabled_flag)
{
LOG_D(PHY," SRS SUBFRAMECONFIG: %d, Isrs: %d \n", frame_parms->soundingrs_ul_config_common.srs_SubframeConfig, pSoundingrs_ul_config_dedicated->srs_ConfigIndex);
LOG_I(PHY," SRS SUBFRAMECONFIG: %d, Isrs: %d \n", frame_parms->soundingrs_ul_config_common.srs_SubframeConfig, pSoundingrs_ul_config_dedicated->srs_ConfigIndex);
uint8_t TSFC;
uint16_t deltaTSFC; // bitmap
......@@ -528,8 +528,6 @@ void ue_compute_srs_occasion(PHY_VARS_UE *ue,UE_rxtx_proc_t *proc,uint8_t eNB_id
TSFC = deltaTSFCTabType2[srs_SubframeConfig][1];
}
LOG_D(PHY," ISTDD: %d, TSFC: %d, deltaTSFC: %d, AbsSubframeTX: %d\n", frame_parms->frame_type, TSFC, deltaTSFC, (((int)frame_tx*10)+(int)subframe_tx));
// Sounding reference signal subframes are the subframes satisfying ns/2 mod TSFC (- deltaTSFC
uint16_t tmp = (subframe_tx % TSFC);
if((1<<tmp) & deltaTSFC)
......@@ -538,8 +536,10 @@ void ue_compute_srs_occasion(PHY_VARS_UE *ue,UE_rxtx_proc_t *proc,uint8_t eNB_id
isSubframeSRS = 1;
pSoundingrs_ul_config_dedicated->srsCellSubframe = 1;
}
LOG_I(PHY," ISTDD: %d, TSFC: %d, deltaTSFC: %d, AbsSubframeTX: %d.%d, srsCellSubframe: %d \n", frame_parms->frame_type, TSFC, deltaTSFC, frame_tx, subframe_tx, pSoundingrs_ul_config_dedicated->srsCellSubframe);
if(pSoundingrs_ul_config_dedicated->srsConfigDedicatedSetup)
{
compute_srs_pos(frame_parms->frame_type, pSoundingrs_ul_config_dedicated->srs_ConfigIndex, &srsPeriodicity, &srsOffset);
// transmit SRS if the four following constraints are respected:
......@@ -556,7 +556,8 @@ void ue_compute_srs_occasion(PHY_VARS_UE *ue,UE_rxtx_proc_t *proc,uint8_t eNB_id
isSubframeSRSTx = 1;
pSoundingrs_ul_config_dedicated->srsUeSubframe = 1;
}
LOG_D(PHY," isSubframeSRS: %d, isSubframeSRSTx: %d \n", isSubframeSRS, isSubframeSRSTx);
LOG_I(PHY," isSubframeSRS: %d, isSubframeSRSTx: %d \n", isSubframeSRS, isSubframeSRSTx);
}
}
}
......
......@@ -59,7 +59,7 @@ void srs_power_cntl(PHY_VARS_UE *ue,UE_rxtx_proc_t *proc,uint8_t eNB_id,uint8_t
uint8_t Bsrs = psoundingrs_ul_config_dedicated->srs_Bandwidth;
uint8_t Csrs = pframe_parms->soundingrs_ul_config_common.srs_BandwidthConfig;
LOG_I(PHY," SRS Power Control; AbsSubframe %d.%d, eNB_id %d, srs_Bandwidth %d, srs_BandwidthConfig %d \n",proc->frame_tx,proc->subframe_tx,eNB_id,Bsrs,Csrs);
LOG_I(PHY," SRS Power Control; AbsSubframe %d.%d, eNB_id %d, N_RB_UL %d, srs_Bandwidth %d, srs_BandwidthConfig %d \n",proc->frame_tx,proc->subframe_tx,eNB_id,pframe_parms->N_RB_UL,Bsrs,Csrs);
if (pframe_parms->N_RB_UL < 41)
{
......@@ -88,12 +88,13 @@ void srs_power_cntl(PHY_VARS_UE *ue,UE_rxtx_proc_t *proc,uint8_t eNB_id,uint8_t
PL = get_PL(ue->Mod_id,ue->CC_id,eNB_id);
LOG_I(PHY," SRS Power Control; eNB_id %d, p0_NominalPUSCH %d, alpha %d \n",eNB_id,P_opusch,alpha);
LOG_I(PHY," SRS Power Control; eNB_id %d, pSRS_Offset %d, Msrs %d, PL %d, f_pusch %d \n",eNB_id,Psrs_offset,Msrs,PL,f_pusch);
LOG_I(PHY," SRS Power Control; eNB_id %d, pSRS_Offset[dB] %d, Msrs %d, PL %d, f_pusch %d \n",eNB_id,Psrs_offset,Msrs,PL,f_pusch);
P_srs = P_opusch + Psrs_offset + f_pusch;
P_srs += (((int32_t)alpha * (int32_t)PL) + hundred_times_log10_NPRB[Msrs-1])/100 ;
ue->ulsch[eNB_id]->Po_SRS = P_srs;
ue->ulsch[eNB_id]->Po_SRS = P_srs < ue->tx_power_max_dBm ? P_srs:ue->tx_power_max_dBm; // MIN(PcMax,Psrs)
pnb_rb_srs[0] = Msrs;
LOG_I(PHY," SRS Power Control; eNB_id %d, P_srs[dBm] %d\n",eNB_id,P_srs);
LOG_I(PHY," SRS Power Control; eNB_id %d, P_srs[dBm] %d, P_cmax[dBm] %d, Psrs[dBm] %d\n",eNB_id,P_srs,ue->tx_power_max_dBm,ue->ulsch[eNB_id]->Po_SRS);
}
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