diff --git a/common/utils/nr/nr_common.c b/common/utils/nr/nr_common.c index 0a532c346b..a704a66c76 100644 --- a/common/utils/nr/nr_common.c +++ b/common/utils/nr/nr_common.c @@ -65,8 +65,8 @@ nr_bandentry_t nr_bandtable[] = { {41, 2496000, 2690000, 2496000, 2690000, 3, 499200, 15}, {41, 2496000, 2690000, 2496000, 2690000, 6, 499200, 30}, {47, 5855000, 5925000, 5855000, 5925000, 1, 790334, 15}, - //{48, 3550000, 3700000, 3550000, 3700000, 1, 636667, 15}, - //{48, 3550000, 3700000, 3550000, 3700000, 2, 636668, 30}, + {48, 3550000, 3700000, 3550000, 3700000, 1, 636667, 15}, + {48, 3550000, 3700000, 3550000, 3700000, 2, 636668, 30}, {50, 1432000, 1517000, 1432000, 1517000, 20, 286400, 100}, {51, 1427000, 1432000, 1427000, 1432000, 20, 285400, 100}, {53, 2483500, 2495000, 2483500, 2495000, 20, 496700, 100}, @@ -90,14 +90,15 @@ nr_bandentry_t nr_bandtable[] = { {84, 1920000, 1980000, 000, 000, 20, 384000, 100}, {86, 1710000, 1785000, 000, 000, 20, 342000, 100}, {89, 824000, 849000, 000, 000, 20, 342000, 100}, - {90, 2496000, 2690000, 2496000, 2690000, 3, 499200, 15}, - {90, 2496000, 2690000, 2496000, 2690000, 6, 499200, 30}, + {90, 2496000, 2690000, 2496000, 2690000, 3, 499200, 15}, + {90, 2496000, 2690000, 2496000, 2690000, 6, 499200, 30}, {90, 2496000, 2690000, 2496000, 2690000, 20, 499200, 100}, {91, 832000, 862000, 1427000, 1432000, 20, 285400, 100}, {92, 832000, 862000, 1432000, 1517000, 20, 286400, 100}, {93, 880000, 915000, 1427000, 1432000, 20, 285400, 100}, {94, 880000, 915000, 1432000, 1517000, 20, 286400, 100}, {95, 2010000, 2025000, 000, 000, 20, 402000, 100}, + {96, 5925000, 7125000, 5925000, 7125000, 1, 795000, 15}, {257,26500020,29500000,26500020,29500000, 1,2054166, 60}, {257,26500080,29500000,26500080,29500000, 2,2054167, 120}, {258,24250080,27500000,24250080,27500000, 1,2016667, 60}, @@ -437,9 +438,17 @@ int get_nr_table_idx(int nr_bandP, uint8_t scs_index) { AssertFatal(nr_bandP <= nr_bandtable[nr_bandtable_size-1].band, "NR band %d exceeds NR bands table maximum limit %d\n", nr_bandP, nr_bandtable[nr_bandtable_size-1].band); for (i = 0; i < nr_bandtable_size && nr_bandtable[i].band != nr_bandP; i++); - // selection of correct Deltaf raster according to SCS - if ((nr_bandtable[i].deltaf_raster != 100) && (nr_bandtable[i].deltaf_raster != scs_khz)) + // In frequency bands with two deltaFRaster, + // the higher deltaFRaster applies to channels using only the SCS that is equal to or larger than the higher deltaFRaster + // and SSB SCS is equal to the higher deltaFRaster. + while(((i+1)subcarrier_spacing = nr_subcarrier_spacing[NR_MU_0]; fp->slots_per_subframe = nr_slots_per_subframe[NR_MU_0]; fp->ssb_type = nr_ssb_type_A; + while(nr_ssb_table[idx][0]!=fp->nr_band) + idx++; + AssertFatal(nr_ssb_table[idx][1]==15,"SCS %d not applicable to band %d\n", + fp->subcarrier_spacing,fp->nr_band); break; case NR_MU_1: //30kHz scs fp->subcarrier_spacing = nr_subcarrier_spacing[NR_MU_1]; fp->slots_per_subframe = nr_slots_per_subframe[NR_MU_1]; - - // selection of SS block pattern according to TS 38101-1 Table 5.4.3.3-1 for SCS 30kHz - if (fp->nr_band == 5 || fp->nr_band == 66) - fp->ssb_type = nr_ssb_type_B; - else{ - if (fp->nr_band == 41 || fp->nr_band == 38 || ( fp->nr_band > 76 && fp->nr_band < 80) ) - fp->ssb_type = nr_ssb_type_C; - else - AssertFatal(1==0,"NR Operating Band n%d not available for SS block SCS with mu=%d\n", fp->nr_band, mu); + while(nr_ssb_table[idx][0]!=fp->nr_band || + nr_ssb_table[idx][1]!=30) { + AssertFatal(nr_ssb_table[idx][0]<=fp->nr_band,"SCS %d not applicable to band %d\n", + fp->subcarrier_spacing,fp->nr_band); + idx++; } + fp->ssb_type = nr_ssb_table[idx][2]; break; case NR_MU_2: //60kHz scs diff --git a/openair1/PHY/NR_TRANSPORT/pucch_rx.c b/openair1/PHY/NR_TRANSPORT/pucch_rx.c index cdc6825d4c..2491c24ab6 100644 --- a/openair1/PHY/NR_TRANSPORT/pucch_rx.c +++ b/openair1/PHY/NR_TRANSPORT/pucch_rx.c @@ -206,7 +206,9 @@ void nr_decode_pucch0(PHY_VARS_gNB *gNB, nr_sequences=8>>(1-pucch_pdu->sr_flag); } - LOG_D(PHY,"pucch0: nr_symbols %d, start_symbol %d, prb_start %d, second_hop_prb %d, group_hop_flag %d, sequence_hop_flag %d, O_ACK %d, O_SR %d, mcs %d initial_cyclic_shift %d\n",pucch_pdu->nr_of_symbols,pucch_pdu->start_symbol_index,pucch_pdu->prb_start,pucch_pdu->second_hop_prb,pucch_pdu->group_hop_flag,pucch_pdu->sequence_hop_flag,pucch_pdu->bit_len_harq,pucch_pdu->sr_flag,mcs[0],pucch_pdu->initial_cyclic_shift); + LOG_D(PHY,"pucch0: nr_symbols %d, start_symbol %d, prb_start %d, second_hop_prb %d, group_hop_flag %d, sequence_hop_flag %d, O_ACK %d, O_SR %d, mcs %d initial_cyclic_shift %d\n", + pucch_pdu->nr_of_symbols,pucch_pdu->start_symbol_index,pucch_pdu->prb_start,pucch_pdu->second_hop_prb,pucch_pdu->group_hop_flag,pucch_pdu->sequence_hop_flag,pucch_pdu->bit_len_harq, + pucch_pdu->sr_flag,mcs[0],pucch_pdu->initial_cyclic_shift); int cs_ind = get_pucch0_cs_lut_index(gNB,pucch_pdu); /* diff --git a/openair1/PHY/NR_UE_TRANSPORT/pucch_nr.c b/openair1/PHY/NR_UE_TRANSPORT/pucch_nr.c index 68d8735411..cb929f1642 100644 --- a/openair1/PHY/NR_UE_TRANSPORT/pucch_nr.c +++ b/openair1/PHY/NR_UE_TRANSPORT/pucch_nr.c @@ -90,8 +90,8 @@ void nr_generate_pucch0(PHY_VARS_NR_UE *ue, // the value of u,v (delta always 0 for PUCCH) has to be calculated according to TS 38.211 Subclause 6.3.2.2.1 uint8_t u[2]={0,0},v[2]={0,0}; - LOG_D(PHY,"pucch0: slot %d nr_symbols %d, start_symbol %d, prb_start %d, second_hop_prb %d, group_hop_flag %d, sequence_hop_flag %d, mcs %d\n",nr_slot_tx,pucch_pdu->nr_of_symbols,pucch_pdu->start_symbol_index,pucch_pdu->prb_start,pucch_pdu->second_hop_prb,pucch_pdu->group_hop_flag,pucch_pdu->sequence_hop_flag,pucch_pdu->mcs); - + LOG_D(PHY,"pucch0: slot %d nr_symbols %d, start_symbol %d, prb_start %d, second_hop_prb %d, group_hop_flag %d, sequence_hop_flag %d, mcs %d\n", + nr_slot_tx,pucch_pdu->nr_of_symbols,pucch_pdu->start_symbol_index,pucch_pdu->prb_start,pucch_pdu->second_hop_prb,pucch_pdu->group_hop_flag,pucch_pdu->sequence_hop_flag,pucch_pdu->mcs); #ifdef DEBUG_NR_PUCCH_TX printf("\t [nr_generate_pucch0] sequence generation: variable initialization for test\n"); diff --git a/openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_bch.c b/openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_bch.c index f35de9e28b..df25b085e6 100644 --- a/openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_bch.c +++ b/openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_bch.c @@ -60,22 +60,21 @@ uint16_t get_ssboffset_pointa(NR_ServingCellConfigCommon_t *scc,const long band) int ratio; switch (*scc->ssbSubcarrierSpacing) { case NR_SubcarrierSpacing_kHz15: - AssertFatal(band <= 79, + AssertFatal(band <= 95, "Band %ld is not possible for SSB with 15 kHz SCS\n", band); - if (band < 77) // below 3GHz - ratio = 3; // NRARFCN step is 5 kHz - else - ratio = 1; // NRARFCN step is 15 kHz + // no band available above 3GHz using 15kHz + ratio = 3; // NRARFCN step is 5 kHz break; case NR_SubcarrierSpacing_kHz30: - AssertFatal(band <= 79, - "Band %ld is not possible for SSB with 15 kHz SCS\n", + AssertFatal(band <= 96, + "Band %ld is not possible for SSB with 30 kHz SCS\n", band); - if (band < 77) // below 3GHz - ratio = 6; // NRARFCN step is 5 kHz + if (band == 46 || band == 48 || band == 77 || + band == 78 || band == 79 || band == 96) // above 3GHz + ratio = 2; // NRARFCN step is 15 kHz else - ratio = 2; // NRARFCN step is 15 kHz + ratio = 6; // NRARFCN step is 5 kHz break; case NR_SubcarrierSpacing_kHz120: AssertFatal(band >= 257,