nr_slot_select() and set_tdd_config_nr(): remove useless second frame
FAPI says these lists should be for MAX_TDD_PERIODICITY (which is maybe a frame, or a TDD period? but likely not two frames). Reduce to one frame. Also, the nFAPI code assumes one entire frame, so use that (this commit necessary to actually make the PNF work, otherwise, the packing/unpacking of the FAPI message would need to do 2 frames). Closes: #876
This commit is contained in:
@@ -656,7 +656,7 @@ int main(int argc, char **argv)
|
||||
|
||||
reset_DLSCH_struct(gNB, &msgDataTx);
|
||||
|
||||
int nb_slots_to_set = TDD_CONFIG_NB_FRAMES * (1 << mu) * NR_NUMBER_OF_SUBFRAMES_PER_FRAME;
|
||||
int nb_slots_to_set = (1 << mu) * NR_NUMBER_OF_SUBFRAMES_PER_FRAME;
|
||||
for (int i = 0; i < nb_slots_to_set; ++i)
|
||||
free(gNB->gNB_config.tdd_table.max_tdd_periodicity_list[i].max_num_of_symbol_per_slot_list);
|
||||
free(gNB->gNB_config.tdd_table.max_tdd_periodicity_list);
|
||||
|
||||
@@ -782,7 +782,7 @@ int main(int argc, char **argv)
|
||||
|
||||
free_channel_desc_scm(gNB2UE);
|
||||
|
||||
int nb_slots_to_set = TDD_CONFIG_NB_FRAMES * (1 << mu) * NR_NUMBER_OF_SUBFRAMES_PER_FRAME;
|
||||
int nb_slots_to_set = (1 << mu) * NR_NUMBER_OF_SUBFRAMES_PER_FRAME;
|
||||
for (int i = 0; i < nb_slots_to_set; ++i)
|
||||
free(gNB->gNB_config.tdd_table.max_tdd_periodicity_list[i].max_num_of_symbol_per_slot_list);
|
||||
free(gNB->gNB_config.tdd_table.max_tdd_periodicity_list);
|
||||
|
||||
@@ -825,7 +825,7 @@ int main(int argc, char **argv){
|
||||
|
||||
phy_free_nr_gNB(gNB);
|
||||
// allocated in set_tdd_config_nr()
|
||||
int nb_slots_to_set = TDD_CONFIG_NB_FRAMES*(1<<mu)*NR_NUMBER_OF_SUBFRAMES_PER_FRAME;
|
||||
int nb_slots_to_set = (1<<mu)*NR_NUMBER_OF_SUBFRAMES_PER_FRAME;
|
||||
free(gNB->gNB_config.prach_config.num_prach_fd_occasions_list);
|
||||
for (int i = 0; i < nb_slots_to_set; ++i)
|
||||
free(gNB->gNB_config.tdd_table.max_tdd_periodicity_list[i].max_num_of_symbol_per_slot_list);
|
||||
|
||||
@@ -762,7 +762,7 @@ int main(int argc, char **argv)
|
||||
free_channel_desc_scm(UE2gNB);
|
||||
term_freq_channel();
|
||||
|
||||
int nb_slots_to_set = TDD_CONFIG_NB_FRAMES * (1 << mu) * NR_NUMBER_OF_SUBFRAMES_PER_FRAME;
|
||||
int nb_slots_to_set = (1 << mu) * NR_NUMBER_OF_SUBFRAMES_PER_FRAME;
|
||||
for (int i = 0; i < nb_slots_to_set; ++i)
|
||||
free(gNB->gNB_config.tdd_table.max_tdd_periodicity_list[i].max_num_of_symbol_per_slot_list);
|
||||
free(gNB->gNB_config.tdd_table.max_tdd_periodicity_list);
|
||||
|
||||
@@ -598,7 +598,7 @@ int main(int argc, char **argv)
|
||||
|
||||
free_nr_ue_ul_harq(UE->ul_harq_processes, NR_MAX_ULSCH_HARQ_PROCESSES, UE->frame_parms.N_RB_UL, UE->frame_parms.nb_antennas_tx);
|
||||
|
||||
int nb_slots_to_set = TDD_CONFIG_NB_FRAMES * (1 << mu) * NR_NUMBER_OF_SUBFRAMES_PER_FRAME;
|
||||
int nb_slots_to_set = (1 << mu) * NR_NUMBER_OF_SUBFRAMES_PER_FRAME;
|
||||
for (int i = 0; i < nb_slots_to_set; ++i)
|
||||
free(gNB->gNB_config.tdd_table.max_tdd_periodicity_list[i].max_num_of_symbol_per_slot_list);
|
||||
free(gNB->gNB_config.tdd_table.max_tdd_periodicity_list);
|
||||
|
||||
@@ -54,9 +54,9 @@ void display_frame_configuration(NR_DL_FRAME_PARMS *frame_parms) {
|
||||
printf("\nTdd configuration tti %d downlink %d uplink %d period %d \n", frame_parms->slots_per_subframe, frame_parms->p_tdd_UL_DL_Configuration->nrofDownlinkSlots,
|
||||
frame_parms->p_tdd_UL_DL_Configuration->nrofUplinkSlots, frame_parms->p_tdd_UL_DL_Configuration->dl_UL_TransmissionPeriodicity);
|
||||
|
||||
int k = (TDD_CONFIG_NB_FRAMES * NR_NUMBER_OF_SUBFRAMES_PER_FRAME) - 1; //19;
|
||||
int k = NR_NUMBER_OF_SUBFRAMES_PER_FRAME - 1;
|
||||
int tti = 0;
|
||||
for (int j = 0; j < TDD_CONFIG_NB_FRAMES * frame_parms->slots_per_frame; j++) {
|
||||
for (int j = 0; j < frame_parms->slots_per_frame; j++) {
|
||||
int frame = 0;
|
||||
if (j != 0) {
|
||||
frame = j / frame_parms->slots_per_frame;
|
||||
@@ -81,7 +81,7 @@ void display_frame_configuration(NR_DL_FRAME_PARMS *frame_parms) {
|
||||
}
|
||||
if (j == k) {
|
||||
printf("\n");
|
||||
k += (TDD_CONFIG_NB_FRAMES * NR_NUMBER_OF_SUBFRAMES_PER_FRAME); // 20
|
||||
k += NR_NUMBER_OF_SUBFRAMES_PER_FRAME;
|
||||
}
|
||||
}
|
||||
printf("\n");
|
||||
|
||||
Reference in New Issue
Block a user