Adapted get_nr_PL to be used in RA MAC procedures
This commit is contained in:
@@ -90,6 +90,6 @@ void phy_adjust_gain_nr(PHY_VARS_NR_UE *ue,
|
|||||||
uint32_t rx_power_fil_dB,
|
uint32_t rx_power_fil_dB,
|
||||||
uint8_t eNB_id);
|
uint8_t eNB_id);
|
||||||
|
|
||||||
int16_t get_nr_PL(PHY_VARS_NR_UE *ue,uint8_t gNB_index);
|
int16_t get_nr_PL(uint8_t Mod_id, uint8_t CC_id, uint8_t gNB_index);
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|||||||
@@ -55,8 +55,9 @@ void print_ints(char *s,int *x)
|
|||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
int16_t get_nr_PL(PHY_VARS_NR_UE *ue,uint8_t gNB_index)
|
int16_t get_nr_PL(uint8_t Mod_id, uint8_t CC_id, uint8_t gNB_index){
|
||||||
{
|
|
||||||
|
PHY_VARS_NR_UE *ue = PHY_vars_UE_g[Mod_id][CC_id];
|
||||||
|
|
||||||
/*
|
/*
|
||||||
if (ue->frame_parms.mode1_flag == 1)
|
if (ue->frame_parms.mode1_flag == 1)
|
||||||
@@ -75,9 +76,6 @@ int16_t get_nr_PL(PHY_VARS_NR_UE *ue,uint8_t gNB_index)
|
|||||||
//(ue->frame_parms.pdsch_config_common.referenceSignalPower*10))/10));
|
//(ue->frame_parms.pdsch_config_common.referenceSignalPower*10))/10));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
void nr_ue_measurements(PHY_VARS_NR_UE *ue,
|
void nr_ue_measurements(PHY_VARS_NR_UE *ue,
|
||||||
unsigned int subframe_offset,
|
unsigned int subframe_offset,
|
||||||
unsigned char N0_symbol,
|
unsigned char N0_symbol,
|
||||||
|
|||||||
@@ -4545,7 +4545,7 @@ void nr_ue_prach_procedures(PHY_VARS_NR_UE *ue, UE_nr_rxtx_proc_t *proc, uint8_t
|
|||||||
|
|
||||||
ue->generate_nr_prach = 1;
|
ue->generate_nr_prach = 1;
|
||||||
ue->prach_cnt = 0;
|
ue->prach_cnt = 0;
|
||||||
pathloss = get_nr_PL(ue, gNB_id);
|
pathloss = get_nr_PL(mod_id, ue->CC_id, gNB_id);
|
||||||
LOG_I(PHY,"runmode %d\n",runmode);
|
LOG_I(PHY,"runmode %d\n",runmode);
|
||||||
|
|
||||||
if ((ue->mac_enabled == 1) && (runmode != calib_prach_tx)) {
|
if ((ue->mac_enabled == 1) && (runmode != calib_prach_tx)) {
|
||||||
@@ -4591,7 +4591,7 @@ void nr_ue_prach_procedures(PHY_VARS_NR_UE *ue, UE_nr_rxtx_proc_t *proc, uint8_t
|
|||||||
|
|
||||||
LOG_D(PHY,"[UE %d][RAPROC] PRACH PL %d dB, power %d dBm, digital power %d dB (amp %d)\n",
|
LOG_D(PHY,"[UE %d][RAPROC] PRACH PL %d dB, power %d dBm, digital power %d dB (amp %d)\n",
|
||||||
ue->Mod_id,
|
ue->Mod_id,
|
||||||
get_nr_PL(ue,gNB_id),
|
pathloss,
|
||||||
ue->tx_power_dBm[nr_tti_tx],
|
ue->tx_power_dBm[nr_tti_tx],
|
||||||
dB_fixed(prach_power),
|
dB_fixed(prach_power),
|
||||||
ue->prach_vars[gNB_id]->amp);
|
ue->prach_vars[gNB_id]->amp);
|
||||||
|
|||||||
@@ -104,7 +104,7 @@ int16_t get_pucch_tx_power_ue(PHY_VARS_NR_UE *ue,
|
|||||||
|
|
||||||
int P_O_PUCCH = P_O_NOMINAL_PUCCH + P_O_UE_PUCCH;
|
int P_O_PUCCH = P_O_NOMINAL_PUCCH + P_O_UE_PUCCH;
|
||||||
|
|
||||||
int16_t PL = get_nr_PL(ue, gNB_id); /* LTE function because NR path loss not yet implemented FFS TODO NR */
|
int16_t PL = get_nr_PL(ue->Mod_id, ue->CC_id, gNB_id); /* LTE function because NR path loss not yet implemented FFS TODO NR */
|
||||||
|
|
||||||
int16_t delta_F_PUCCH = power_config->deltaF_PUCCH_f[pucch_format];
|
int16_t delta_F_PUCCH = power_config->deltaF_PUCCH_f[pucch_format];
|
||||||
|
|
||||||
|
|||||||
@@ -206,9 +206,8 @@ void nr_get_prach_resources(module_id_t mod_id,
|
|||||||
// use Group A preamble
|
// use Group A preamble
|
||||||
prach_resources->ra_PreambleIndex = (taus()) % numberOfRA_Preambles;
|
prach_resources->ra_PreambleIndex = (taus()) % numberOfRA_Preambles;
|
||||||
mac->RA_usedGroupA = 1;
|
mac->RA_usedGroupA = 1;
|
||||||
} else if ((Msg3_size < messageSizeGroupA) && (get_PL(mod_id, 0, gNB_id) > PLThreshold)) {
|
} else if ((Msg3_size < messageSizeGroupA) && (get_nr_PL(mod_id, CC_id, gNB_id) > PLThreshold)) {
|
||||||
// Group B is configured and RA preamble Group A is used
|
// Group B is configured and RA preamble Group A is used
|
||||||
// - todo TBR update get_PL to NR get_nr_PL (needs PHY_VARS_NR_UE)
|
|
||||||
// - todo add condition on CCCH_sdu_size for initiation by CCCH
|
// - todo add condition on CCCH_sdu_size for initiation by CCCH
|
||||||
prach_resources->ra_PreambleIndex = (taus()) % sizeOfRA_PreamblesGroupA;
|
prach_resources->ra_PreambleIndex = (taus()) % sizeOfRA_PreamblesGroupA;
|
||||||
mac->RA_usedGroupA = 1;
|
mac->RA_usedGroupA = 1;
|
||||||
|
|||||||
Reference in New Issue
Block a user