LOG_D(PHY,"RU %d has frame %d and subframe %d, state %s\n",eNB->RU_list[i]->idx,eNB->RU_list[i]->proc.frame_rx,eNB->RU_list[i]->proc.subframe_rx,ru_states[eNB->RU_list[i]->state]);
if(ru->is_slave==0&&((proc->RU_mask[ru->proc.subframe_rx]&(1<<i))==1)&&eNB->RU_list[i]->state==RU_RUN){// This is master & the RRU has already been received
LOG_E(PHY,"RU %d is not SYNC, subframe %d, time %f this is master\n",eNB->RU_list[i]->idx,ru->proc.subframe_rx,fabs(eNB->RU_list[i]->proc.t[ru->proc.subframe_rx].tv_nsec-eNB->RU_list[0]->proc.t[ru->proc.subframe_rx].tv_nsec));
}elseif(ru->is_slave==1&&ru->state==RU_RUN&&((proc->RU_mask[ru->proc.subframe_rx]&(1<<0))==1)){// master already received. TODO: we assume that RU0 is master.
LOG_E(PHY,"RU %d is not SYNC time, subframe %d, time %f\n",ru->idx,ru->proc.subframe_rx,fabs(ru->proc.t[ru->proc.subframe_rx].tv_nsec-eNB->RU_list[0]->proc.t[ru->proc.subframe_rx].tv_nsec));
}
}
if(proc->RU_mask[ru->proc.subframe_rx]==(1<<eNB->num_RU)-1){// all RUs have provided their information so continue on and wakeup eNB top
LOG_D(PHY,"ru_mask is %d \n ",proc->RU_mask[ru->proc.subframe_rx]);
LOG_D(PHY,"the number of RU is %d, the current ru is RU %d \n ",(1<<eNB->num_RU)-1,ru->idx);
LOG_D(PHY,"ru->proc.subframe_rx is %d \n",ru->proc.subframe_rx);
LOG_D(PHY,"Reseting mask frame %d, subframe %d, this is RU %d\n",ru->proc.frame_rx,ru->proc.subframe_rx,ru->idx);
LOG_D(PHY,"RU %d has frame %d and subframe %d, state %s\n",eNB->RU_list[i]->idx,eNB->RU_list[i]->proc.frame_rx,eNB->RU_list[i]->proc.subframe_rx,ru_states[eNB->RU_list[i]->state]);
// AssertFatal((proc->RU_mask&(1<<i)) == 0, "eNB %d frame %d, subframe %d : previous information from RU %d (num_RU %d,mask %x) has not been served yet!\n",eNB->Mod_id,ru->proc.frame_rx,ru->proc.subframe_rx,ru->idx,eNB->num_RU,proc->RU_mask);
if(ru->is_slave==0&&((proc->RU_mask[ru->proc.subframe_rx]&(1<<i))==1)&&eNB->RU_list[i]->state==RU_RUN){// This is master & the RRU has already been received
LOG_E(PHY,"RU %d is not SYNC, subframe %d, time %f this is master\n",eNB->RU_list[i]->idx,ru->proc.subframe_rx,fabs(eNB->RU_list[i]->proc.t[ru->proc.subframe_rx].tv_nsec-eNB->RU_list[0]->proc.t[ru->proc.subframe_rx].tv_nsec));
}elseif(ru->is_slave==1&&ru->state==RU_RUN&&((proc->RU_mask[ru->proc.subframe_rx]&(1<<0))==1)){// master already received. TODO: we assume that RU0 is master.
LOG_E(PHY,"RU %d is not SYNC time, subframe %d, time %f\n",ru->idx,ru->proc.subframe_rx,fabs(ru->proc.t[ru->proc.subframe_rx].tv_nsec-eNB->RU_list[0]->proc.t[ru->proc.subframe_rx].tv_nsec));
}
}
//clock_gettime(CLOCK_MONOTONIC,&t);
//LOG_I(PHY,"RU mask is now %x, time is %lu\n",proc->RU_mask[ru->proc.subframe_rx], t.tv_nsec - proc->t[ru->proc.subframe_rx].tv_nsec);
if(proc->RU_mask[ru->proc.subframe_rx]==(1<<eNB->num_RU)-1){// all RUs have provided their information so continue on and wakeup eNB top
LOG_D(PHY,"ru_mask is %d \n ",proc->RU_mask[ru->proc.subframe_rx]);
LOG_D(PHY,"the number of RU is %d, the current ru is RU %d \n ",(1<<eNB->num_RU)-1,ru->idx);
LOG_D(PHY,"ru->proc.subframe_rx is %d \n",ru->proc.subframe_rx);
LOG_D(PHY,"Reseting mask frame %d, subframe %d, this is RU %d\n",ru->proc.frame_rx,ru->proc.subframe_rx,ru->idx);