Commit b398103b authored by Rakesh's avatar Rakesh

Fix for dlulperiodicity

parent 08865255
...@@ -52,14 +52,41 @@ ...@@ -52,14 +52,41 @@
*********************************************************************/ *********************************************************************/
int set_tdd_config_nr( nfapi_nr_config_request_scf_t *cfg, int set_tdd_config_nr( nfapi_nr_config_request_scf_t *cfg,
int mu, int dl_UL_TransmissionPeriodicity, int mu,
int nrofDownlinkSlots, int nrofDownlinkSymbols, int nrofDownlinkSlots, int nrofDownlinkSymbols,
int nrofUplinkSlots, int nrofUplinkSymbols) int nrofUplinkSlots, int nrofUplinkSymbols)
{ {
int slot_number = 0; int slot_number = 0,nb_periods_per_frame;
int nb_slots_to_set = TDD_CONFIG_NB_FRAMES*(1<<mu)*LTE_NUMBER_OF_SUBFRAMES_PER_FRAME; int nb_slots_to_set = TDD_CONFIG_NB_FRAMES*(1<<mu)*LTE_NUMBER_OF_SUBFRAMES_PER_FRAME;
int nb_periods_per_frame = (FRAME_DURATION_MICRO_SEC/dl_UL_TransmissionPeriodicity); switch(cfg->tdd_table.tdd_period.value) {
case 0:
nb_periods_per_frame = 20; // 10ms/0p5ms
break;
case 1:
nb_periods_per_frame = 16; // 10ms/0p625ms
break;
case 2:
nb_periods_per_frame = 10; // 10ms/1ms
break;
case 3:
nb_periods_per_frame = 8; // 10ms/1p25ms
break;
case 4:
nb_periods_per_frame = 5; // 10ms/2ms
break;
case 5:
nb_periods_per_frame = 4; // 10ms/2p5ms
break;
case 6:
nb_periods_per_frame = 2; // 10ms/5ms
break;
case 7:
nb_periods_per_frame = 1; // 10ms/10ms
break;
default:
AssertFatal(1==0,"Undefined tdd period %d\n", cfg->tdd_table.tdd_period.value);
}
int nb_slots_per_period = ((1<<mu) * LTE_NUMBER_OF_SUBFRAMES_PER_FRAME)/nb_periods_per_frame; int nb_slots_per_period = ((1<<mu) * LTE_NUMBER_OF_SUBFRAMES_PER_FRAME)/nb_periods_per_frame;
AssertFatal(nb_slots_per_period == (nrofDownlinkSlots + nrofUplinkSlots + 1), AssertFatal(nb_slots_per_period == (nrofDownlinkSlots + nrofUplinkSlots + 1),
......
...@@ -47,7 +47,7 @@ ...@@ -47,7 +47,7 @@
* @param nrofUplinkSymbols number of uplink symbols * @param nrofUplinkSymbols number of uplink symbols
@returns 0 if tdd dedicated configuration has been properly set or -1 on error with message */ @returns 0 if tdd dedicated configuration has been properly set or -1 on error with message */
int set_tdd_config_nr(nfapi_nr_config_request_scf_t *cfg, int mu,int dl_UL_TransmissionPeriodicity, int set_tdd_config_nr(nfapi_nr_config_request_scf_t *cfg, int mu,
int nrofDownlinkSlots, int nrofDownlinkSymbols, int nrofDownlinkSlots, int nrofDownlinkSymbols,
int nrofUplinkSlots, int nrofUplinkSymbols); int nrofUplinkSlots, int nrofUplinkSymbols);
......
...@@ -45,7 +45,7 @@ ...@@ -45,7 +45,7 @@
* @param nrofUplinkSymbols number of uplink symbols * @param nrofUplinkSymbols number of uplink symbols
@returns 0 if tdd dedicated configuration has been properly set or -1 on error with message */ @returns 0 if tdd dedicated configuration has been properly set or -1 on error with message */
int set_tdd_config_nr(nfapi_nr_config_request_scf_t *cfg, int mu, int dl_UL_TransmissionPeriodicity, int set_tdd_config_nr(nfapi_nr_config_request_scf_t *cfg, int mu,
int nrofDownlinkSlots, int nrofDownlinkSymbols, int nrofDownlinkSlots, int nrofDownlinkSymbols,
int nrofUplinkSlots, int nrofUplinkSymbols); int nrofUplinkSlots, int nrofUplinkSymbols);
......
...@@ -409,7 +409,6 @@ void config_common(int Mod_idP, NR_ServingCellConfigCommon_t *scc) { ...@@ -409,7 +409,6 @@ void config_common(int Mod_idP, NR_ServingCellConfigCommon_t *scc) {
if(cfg->cell_config.frame_duplex_type.value == TDD){ if(cfg->cell_config.frame_duplex_type.value == TDD){
int return_tdd = set_tdd_config_nr(cfg, int return_tdd = set_tdd_config_nr(cfg,
scc->uplinkConfigCommon->frequencyInfoUL->scs_SpecificCarrierList.list.array[0]->subcarrierSpacing, scc->uplinkConfigCommon->frequencyInfoUL->scs_SpecificCarrierList.list.array[0]->subcarrierSpacing,
5000,
scc->tdd_UL_DL_ConfigurationCommon->pattern1.nrofDownlinkSlots, scc->tdd_UL_DL_ConfigurationCommon->pattern1.nrofDownlinkSlots,
scc->tdd_UL_DL_ConfigurationCommon->pattern1.nrofDownlinkSymbols, scc->tdd_UL_DL_ConfigurationCommon->pattern1.nrofDownlinkSymbols,
scc->tdd_UL_DL_ConfigurationCommon->pattern1.nrofUplinkSlots, scc->tdd_UL_DL_ConfigurationCommon->pattern1.nrofUplinkSlots,
......
...@@ -169,7 +169,7 @@ gNBs = ...@@ -169,7 +169,7 @@ gNBs =
# pattern1 # pattern1
# dl_UL_TransmissionPeriodicity # dl_UL_TransmissionPeriodicity
# 0=ms0p5, 1=ms0p625, 2=ms1, 3=ms1p25, 4=ms2, 5=ms2p5, 6=ms5, 7=ms10 # 0=ms0p5, 1=ms0p625, 2=ms1, 3=ms1p25, 4=ms2, 5=ms2p5, 6=ms5, 7=ms10
dl_UL_TransmissionPeriodicity = 0; dl_UL_TransmissionPeriodicity = 6;
nrofDownlinkSlots = 7; nrofDownlinkSlots = 7;
nrofDownlinkSymbols = 6; nrofDownlinkSymbols = 6;
nrofUplinkSlots = 2; nrofUplinkSlots = 2;
......
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