Keep track of number of RUs in L1

Need to keep track of number of RUs, as the RU initialization increments
the number of RUs. Therefore, subsequent initializations would fail if
we don't decrement first. There is no better place (or I did not find
it) to decrement the number of RUs than in nr_phy_free_RU(). For this
reason, we also have to manually set the number of RUs in nr_prachsim to
1, otherwise the assert will trigger.
This commit is contained in:
Robert Schmidt
2024-12-16 16:18:10 +01:00
parent 6b852a6fff
commit 5f01cf6f93
2 changed files with 5 additions and 0 deletions
+4
View File
@@ -180,4 +180,8 @@ void nr_phy_free_RU(RU_t *ru)
free_and_zero(ru->common.beam_id[i]);
free_and_zero(ru->common.beam_id);
}
PHY_VARS_gNB *gNB0 = ru->gNB_list[0];
gNB0->num_RU--;
DevAssert(gNB0->num_RU >= 0);
}
+1
View File
@@ -467,6 +467,7 @@ int main(int argc, char **argv){
ru->nb_rx = n_rx;
ru->num_gNB = 1;
ru->gNB_list[0] = gNB;
gNB->num_RU = 1;
gNB->gNB_config.carrier_config.num_tx_ant.value = 1;
gNB->gNB_config.carrier_config.num_rx_ant.value = 1;
if (mu == 0)