Move DLSCH/PDSCH variables to gNB

The next commit will remove msgDataTx. We can therefore not use
msgDataTx to retain the PDSCH/DLSCH variables, and move them to the gNB.

Note that the only reason for NR_gNB_DLSCH_t after this commit is to
hold various large buffers (c, b, f). Future work could be done to
remove this, in which case the array inside PHY_VARS_gNB could be
deleted.

On this occasion, clean up the use of init_DLSCH_struct() and
reset_DLSCH_struct() (renamed destroy_DLSCH_struct()) and centralize
their call in phy_init_nr_gNB()/phy_free_nr_gNB(), and correct
simulators accordingly.
This commit is contained in:
Robert Schmidt
2025-11-14 18:14:02 +01:00
parent 8d2a5c6fd6
commit e17c165c9d
8 changed files with 23 additions and 23 deletions
+3 -5
View File
@@ -439,9 +439,9 @@ int main(int argc, char **argv)
nr_init_dl_harq_processes(UE->dl_harq_processes, 8, nb_rb);
unsigned char harq_pid = 0; //dlsch->harq_ids[subframe];
processingData_L1tx_t msgDataTx;
init_DLSCH_struct(gNB, &msgDataTx);
NR_gNB_DLSCH_t *dlsch = &msgDataTx.dlsch[0];
processingData_L1tx_t msgDataTx = {0};
msgDataTx.gNB = gNB;
NR_gNB_DLSCH_t *dlsch = &msgDataTx.gNB->dlsch[0];
nfapi_nr_dl_tti_pdsch_pdu_rel15_t *rel15 = &dlsch->pdsch_pdu.pdsch_pdu_rel15;
//time_stats_t *rm_stats, *te_stats, *i_stats;
unsigned int TBS = 8424;
@@ -621,8 +621,6 @@ int main(int argc, char **argv)
free_channel_desc_scm(gNB2UE);
reset_DLSCH_struct(gNB, &msgDataTx);
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);
+2 -2
View File
@@ -976,9 +976,9 @@ int main(int argc, char **argv)
initNotifiedFIFO(&gNB->L1_tx_out);
// we create 2 threads for L1 tx processing
processingData_L1tx_t *msgDataTx = malloc(sizeof(processingData_L1tx_t));
init_DLSCH_struct(gNB, msgDataTx);
msgDataTx->slot = slot;
msgDataTx->frame = frame;
msgDataTx->gNB = gNB;
gNB->msgDataTx = msgDataTx;
// Buffers to store internal memory of slot process
@@ -1058,7 +1058,7 @@ int main(int argc, char **argv)
n_false_positive = 0;
if (n_trials== 1) num_rounds = 1;
NR_gNB_DLSCH_t *gNB_dlsch = &msgDataTx->dlsch[0];
NR_gNB_DLSCH_t *gNB_dlsch = &msgDataTx->gNB->dlsch[0];
nfapi_nr_dl_tti_pdsch_pdu_rel15_t *rel15 = &gNB_dlsch->pdsch_pdu.pdsch_pdu_rel15;
for (trial = 0; trial < n_trials && !stop; trial++) {