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:
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user