Commit 5f01cf6f authored by Robert Schmidt's avatar Robert Schmidt

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.
parent 6b852a6f
......@@ -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);
}
......@@ -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)
......
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