Skip to content
Snippets Groups Projects
Commit fe0c9ba0 authored by Francesco Mani's avatar Francesco Mani
Browse files

fix for number of slots in half frame for different numerologies

parent 433e3edd
No related branches found
No related tags found
11 merge requests!1757Draft: Use pMAX value in configuration file, instead of hardcoded '23' in asn1_msg.c,!1493fix DL arq errors in UE,!1093Issue in generating NR PRACH for High Speed case,!1074PBCH test case support for non-zero bchpyload,!918Develop nfapi,!847Nr vcd,!782Oai ubuntu docker,!730Nr rlc,!729Integration develop nr 2019w48bis,!728Integration develop nr 2019w48,!725Nr x300 fixes
...@@ -83,10 +83,12 @@ int nr_is_ssb_slot(nfapi_nr_config_request_t *cfg, int slot, int frame) ...@@ -83,10 +83,12 @@ int nr_is_ssb_slot(nfapi_nr_config_request_t *cfg, int slot, int frame)
{ {
uint8_t n_hf; uint8_t n_hf;
uint16_t p; uint16_t p,mu,hf_slots;
uint64_t ssb_map; uint64_t ssb_map;
int rel_slot; int rel_slot;
mu = cfg->subframe_config.numerology_index_mu.value;
ssb_map = cfg->sch_config.ssb_scg_position_in_burst.value; ssb_map = cfg->sch_config.ssb_scg_position_in_burst.value;
p = cfg->sch_config.ssb_periodicity.value; p = cfg->sch_config.ssb_periodicity.value;
n_hf = cfg->sch_config.half_frame_index.value; n_hf = cfg->sch_config.half_frame_index.value;
...@@ -95,16 +97,17 @@ int nr_is_ssb_slot(nfapi_nr_config_request_t *cfg, int slot, int frame) ...@@ -95,16 +97,17 @@ int nr_is_ssb_slot(nfapi_nr_config_request_t *cfg, int slot, int frame)
if ( (p>10) && (frame%(p/10)) ) if ( (p>10) && (frame%(p/10)) )
return 0; return 0;
else { else {
hf_slots = (10<<mu)>>1; // number of slots per half frame
// if SSB periodicity is 5ms, they are transmitted in both half frames // if SSB periodicity is 5ms, they are transmitted in both half frames
if ( p == 5) { if ( p == 5) {
if (slot<10) //the value 10 needs to be changed for other numerologies (using slots_per_frame) in this function if (slot<hf_slots)
n_hf=0; n_hf=0;
else else
n_hf=1; n_hf=1;
} }
// to set a effective slot number between 0 to 9 in the half frame where the SSB is supposed to be // to set a effective slot number between 0 to hf_slots-1 in the half frame where the SSB is supposed to be
rel_slot = (n_hf)? (slot-10) : slot; rel_slot = (n_hf)? (slot-hf_slots) : slot;
// there are two potential SSB per slot // there are two potential SSB per slot
return ( ((ssb_map >> rel_slot*2) & 0x01) || ((ssb_map >> (1+rel_slot*2)) & 0x01) ); return ( ((ssb_map >> rel_slot*2) & 0x01) || ((ssb_map >> (1+rel_slot*2)) & 0x01) );
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment