fix for nr_is_ssb_slot in nr_slot_select
This commit is contained in:
@@ -79,30 +79,36 @@ int nr_get_ssb_start_symbol(NR_DL_FRAME_PARMS *fp, uint8_t i_ssb, uint8_t half_f
|
||||
return symbol;
|
||||
}
|
||||
|
||||
int nr_is_ssb_slot(nfapi_nr_config_request_t *cfg, int slot)
|
||||
int nr_is_ssb_slot(nfapi_nr_config_request_t *cfg, int slot, int frame)
|
||||
{
|
||||
|
||||
uint8_t n_hf;
|
||||
uint16_t p;
|
||||
uint64_t ssb_map;
|
||||
int rel_slot;
|
||||
|
||||
ssb_map = cfg->sch_config.ssb_scg_position_in_burst.value;
|
||||
p = cfg->sch_config.ssb_periodicity.value;
|
||||
n_hf = cfg->sch_config.half_frame_index.value;
|
||||
|
||||
// if SSB periodicity is 5ms, they are transmitted in both half frames
|
||||
if ( cfg->sch_config.ssb_periodicity.value == 5) {
|
||||
if (slot<10)
|
||||
n_hf=0;
|
||||
else
|
||||
n_hf=1;
|
||||
}
|
||||
|
||||
// to set a effective slot number between 0 to 9 in the half frame where the SSB is supposed to be
|
||||
rel_slot = (n_hf)? (slot-10) : slot;
|
||||
|
||||
if(rel_slot<10 && rel_slot>=0)
|
||||
return 1;
|
||||
else
|
||||
// checking if the ssb is transmitted in given frame according to periodicity
|
||||
if ( (p>10) && (frame%(p/10)) )
|
||||
return 0;
|
||||
else {
|
||||
// if SSB periodicity is 5ms, they are transmitted in both half frames
|
||||
if ( p == 5) {
|
||||
if (slot<10) //the value 10 needs to be changed for other numerologies (using slots_per_frame) in this function
|
||||
n_hf=0;
|
||||
else
|
||||
n_hf=1;
|
||||
}
|
||||
|
||||
// to set a effective slot number between 0 to 9 in the half frame where the SSB is supposed to be
|
||||
rel_slot = (n_hf)? (slot-10) : slot;
|
||||
|
||||
// there are two potential SSB per slot
|
||||
return ( ((ssb_map >> rel_slot*2) & 0x01) || ((ssb_map >> (1+rel_slot*2)) & 0x01) );
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -378,7 +378,7 @@ void phy_config_request(PHY_Config_t *phy_config);
|
||||
int init_frame_parms(LTE_DL_FRAME_PARMS *frame_parms,uint8_t osf);
|
||||
void dump_frame_parms(LTE_DL_FRAME_PARMS *frame_parms);
|
||||
int nr_get_ssb_start_symbol(NR_DL_FRAME_PARMS *fp, uint8_t i_ssb, uint8_t half_frame_index);
|
||||
int nr_is_ssb_slot(nfapi_nr_config_request_t *cfg, int slot);
|
||||
int nr_is_ssb_slot(nfapi_nr_config_request_t *cfg, int slot, int frame);
|
||||
int nr_init_frame_parms(nfapi_nr_config_request_t *config, NR_DL_FRAME_PARMS *frame_parms);
|
||||
int nr_init_frame_parms_ue(NR_DL_FRAME_PARMS *frame_parms,int mu,int Ncp,int N_RB_DL,int n_ssb_crb,int ssb_subcarrier_offset);
|
||||
int init_nr_ue_signal(PHY_VARS_NR_UE *ue,int nb_connected_eNB,uint8_t abstraction_flag);
|
||||
|
||||
Reference in New Issue
Block a user