code cosmetic improvement

This commit is contained in:
francescomani
2025-06-05 09:42:49 +02:00
parent 627e60f5bd
commit bd05075ac6
7 changed files with 60 additions and 79 deletions
+8 -11
View File
@@ -360,13 +360,11 @@ void term_gNB_Tpool(int inst) {
}
/// eNB kept in function name for nffapi calls, TO FIX
void init_eNB_afterRU(void) {
int inst,ru_id,i,aa;
PHY_VARS_gNB *gNB;
for (inst=0; inst<RC.nb_nr_L1_inst; inst++) {
gNB = RC.gNB[inst];
void init_eNB_afterRU(void)
{
for (int inst = 0; inst < RC.nb_nr_L1_inst; inst++) {
PHY_VARS_gNB *gNB = RC.gNB[inst];
phy_init_nr_gNB(gNB);
// map antennas and PRACH signals to gNB RX
@@ -374,18 +372,18 @@ void init_eNB_afterRU(void) {
LOG_D(NR_PHY, "Mapping RX ports from %d RUs to gNB %d\n", gNB->num_RU, gNB->Mod_id);
for (ru_id=0,aa=0; ru_id<gNB->num_RU; ru_id++) {
int aa = 0;
for (int ru_id = 0; ru_id < gNB->num_RU; ru_id++) {
AssertFatal(gNB->RU_list[ru_id]->common.rxdataF != NULL, "RU %d : common.rxdataF is NULL\n", gNB->RU_list[ru_id]->idx);
AssertFatal(gNB->RU_list[ru_id]->prach_rxsigF != NULL, "RU %d : prach_rxsigF is NULL\n", gNB->RU_list[ru_id]->idx);
for (i=0; i<gNB->RU_list[ru_id]->nb_rx; aa++,i++) {
LOG_I(PHY,"Attaching RU %d antenna %d to gNB antenna %d\n",gNB->RU_list[ru_id]->idx,i,aa);
for (int i = 0; i < gNB->RU_list[ru_id]->nb_rx; aa++, i++) {
LOG_I(PHY,"Attaching RU %d antenna %d to gNB antenna %d\n", gNB->RU_list[ru_id]->idx, i, aa);
gNB->prach_vars.rxsigF[aa] = gNB->RU_list[ru_id]->prach_rxsigF[0][i];
// TODO hardcoded beam to 0, still need to understand how to handle this properly
gNB->common_vars.rxdataF[0][aa] = (c16_t *)gNB->RU_list[ru_id]->common.rxdataF[i];
}
}
/* TODO: review this code, there is something wrong.
* In monolithic mode, we come here with nb_antennas_rx == 0
* (not tested in other modes).
@@ -393,7 +391,6 @@ void init_eNB_afterRU(void) {
//init_precoding_weights(RC.gNB[inst]);
init_gNB_Tpool(inst);
}
}
/**