Commit 7ea7891b authored by Raymond Knopp's avatar Raymond Knopp

more warning removal

parent 31356472
......@@ -1769,6 +1769,7 @@ add_executable(lte-softmodem-nos1
${XFORMS_SOURCE}
${XFORMS_SOURCE_SOFTMODEM}
${T_SOURCE}
${CONFIG_SOURCES}
)
target_link_libraries (lte-softmodem-nos1
-Wl,--start-group
......@@ -1856,6 +1857,7 @@ add_executable(oaisim
${OPENAIR_TARGETS}/COMMON/create_tasks.c
${XFORMS_SOURCE}
${T_SOURCE}
${CONFIG_SOURCES}
)
......
......@@ -106,6 +106,7 @@ void phy_config_request(PHY_Config_t *phy_config) {
fp->phich_config_common.phich_resource = phich_resource_table[cfg->phich_config.phich_resource.value];
fp->phich_config_common.phich_duration = cfg->phich_config.phich_duration.value;
// Note: "from_earfcn" has to be in a common library with MACRLC
fp->dl_CarrierFreq = from_earfcn(eutra_band,dl_CarrierFreq);
fp->ul_CarrierFreq = fp->dl_CarrierFreq - (get_uldl_offset(eutra_band)*100000);
......@@ -1708,8 +1709,11 @@ int phy_init_RU(RU_t *ru) {
}
#endif
}
AssertFatal(RC.nb_L1_inst>NUMBER_OF_eNB_MAX,"eNB instances %d > %d\n",
RC.nb_L1_inst,NUMBER_OF_eNB_MAX);
for (i=0; i<RC.nb_inst; i++) {
for (i=0; i<RC.nb_L1_inst; i++) {
for (p=0;p<15;p++) {
if (p<ru->eNB_list[i]->frame_parms.nb_antenna_ports_eNB || p==5) {
ru->beam_weights[i][p] = (int32_t **)malloc16_clear(ru->nb_tx*sizeof(int32_t*));
......@@ -1718,11 +1722,11 @@ int phy_init_RU(RU_t *ru) {
// antenna ports 0-3 are mapped on antennas 0-3
// antenna port 4 is mapped on antenna 0
// antenna ports 5-14 are mapped on all antennas
if (((i<4) && (i==j)) || ((i==4) && (j==0))) {
if (((p<4) && (p==j)) || ((p==4) && (j==0))) {
for (re=0; re<fp->ofdm_symbol_size; re++)
ru->beam_weights[i][p][j][re] = 0x00007fff;
}
else if (i>4) {
else if (p>4) {
for (re=0; re<fp->ofdm_symbol_size; re++)
ru->beam_weights[i][p][j][re] = 0x00007fff/ru->nb_tx;
}
......@@ -1753,7 +1757,7 @@ int phy_init_lte_eNB(PHY_VARS_eNB *eNB,
#ifdef Rel14
LTE_eNB_PRACH* const prach_vars_br = &eNB->prach_vars_br;
#endif
int i, eNB_id, UE_id;
int i, UE_id;
eNB->total_dlsch_bitrate = 0;
......
......@@ -354,7 +354,7 @@ void recv_IF4p5(RU_t *ru, int *frame, int *subframe, uint16_t *packet_type, uint
}
LOG_D(PHY,"PRACH_IF4p5: CC_id %d : frame %d, subframe %d => %d dB\n",ru->idx,*frame,*subframe,
dB_fixed(signal_energy(&prach_rxsigF[0][0],839)));
dB_fixed(signal_energy((int*)&prach_rxsigF[0][0],839)));
for (idx=0;idx<ru->num_eNB;idx++) ru->wakeup_prach_eNB(ru->eNB_list[idx],ru,*frame,*subframe);
} else if (*packet_type == IF4p5_PULTICK) {
......
......@@ -1130,8 +1130,6 @@ void rx_prach0(PHY_VARS_eNB *eNB,
uint16_t d_start=0;
uint16_t numshift=0;
uint16_t *prach_root_sequence_map;
uint8_t prach_fmt = get_prach_fmt(prach_ConfigIndex,frame_type);
uint16_t N_ZC = (prach_fmt <4)?839:139;
uint8_t not_found;
int k;
uint16_t u;
......@@ -1145,8 +1143,8 @@ void rx_prach0(PHY_VARS_eNB *eNB,
int16_t levdB;
int fft_size,log2_ifft_size;
int16_t prach_ifft_tmp[2048*2] __attribute__((aligned(32)));
int32_t *prach_ifft;
int32_t **prach_ifftp;
int32_t *prach_ifft=(int32_t*)NULL;
int32_t **prach_ifftp=(int32_t **)NULL;
#ifdef Rel14
int prach_ifft_cnt=0;
#endif
......@@ -1197,6 +1195,8 @@ void rx_prach0(PHY_VARS_eNB *eNB,
}
int16_t *prach[nb_rx];
uint8_t prach_fmt = get_prach_fmt(prach_ConfigIndex,frame_type);
uint16_t N_ZC = (prach_fmt <4)?839:139;
if (eNB) {
#ifdef Rel14
......@@ -1472,7 +1472,7 @@ void rx_prach0(PHY_VARS_eNB *eNB,
return;
} else if (eNB!=NULL) {
en = dB_fixed(signal_energy(&rxsigF[0][0],840));
en = dB_fixed(signal_energy((int32_t*)&rxsigF[0][0],840));
#ifdef PRACH_DEBUG
if ((en > 60)&&(br_flag==1)) LOG_I(PHY,"PRACH (br_flag %d,ce_level %d, n_ra_prb %d, k %d): Frame %d, Subframe %d => %d dB\n",br_flag,ce_level,n_ra_prb,k,eNB->proc.frame_rx,eNB->proc.subframe_rx,en);
#endif
......@@ -1683,9 +1683,9 @@ void rx_prach0(PHY_VARS_eNB *eNB,
*max_preamble_energy = levdB;
*max_preamble_delay = ((i*fft_size)>>log2_ifft_size)*update_TA/update_TA2;
*max_preamble = preamble_index;
//#ifdef PRACH_DEBUG
#ifdef PRACH_DEBUG
if ((en>60) && (br_flag==1)) LOG_D(PHY,"frame %d, subframe %d : max_preamble_energy %d, max_preamble_delay %d, max_preamble %d (br_flag %d,ce_level %d, levdB %d, lev %d)\n",frame,subframe,*max_preamble_energy,*max_preamble_delay,*max_preamble,br_flag,ce_level,levdB,lev);
//#endif
#endif
}
}
......
......@@ -226,7 +226,7 @@ int ulsch_decoding_data_2thread0(td_params* tdp) {
LTE_UL_eNB_HARQ_t *ulsch_harq = ulsch->harq_processes[harq_pid];
int Q_m = ulsch_harq->Qm;
int G = ulsch_harq->G;
uint32_t E;
uint32_t E=0;
uint32_t Gp,GpmodC,Nl=1;
uint32_t C = ulsch_harq->C;
......@@ -273,8 +273,7 @@ int ulsch_decoding_data_2thread0(td_params* tdp) {
else if (Kr_bytes <= 768)
iind = 123 + ((Kr_bytes-256)>>3);
else {
LOG_E(PHY,"ulsch_decoding: Illegal codeword size %d!!!\n",Kr_bytes);
return(-1);
AssertFatal(1==0,"ulsch_decoding: Illegal codeword size %d!!!\n",Kr_bytes);
}
// This is stolen from rate-matching algorithm to get the value of E
......@@ -954,7 +953,7 @@ unsigned int ulsch_decoding(PHY_VARS_eNB *eNB,eNB_rxtx_proc_t *proc,
}
AssertFatal(sumKr>0,
"[eNB %d] ulsch_decoding.c: FATAL sumKr is 0! (Nid_cell %d, rnti %x, x2 %x): harq_pid %d round %d, RV %d, O_RI %d, O_ACK %d, G %d, subframe %d\n",
"[eNB] ulsch_decoding.c: FATAL sumKr is 0! (Nid_cell %d, rnti %x, x2 %x): harq_pid %d round %d, RV %d, O_RI %d, O_ACK %d, G %d, subframe %d\n",
frame_parms->Nid_cell,ulsch->rnti,x2,
harq_pid,
ulsch_harq->round,
......
......@@ -35,7 +35,6 @@ int slot_fep_ul(RU_t *ru,
unsigned char aa;
RU_COMMON *common=&ru->common;
LTE_DL_FRAME_PARMS *fp = &ru->frame_parms;
RU_proc_t *proc = &ru->proc;
unsigned char symbol = l+((7-fp->Ncp)*(Ns&1)); ///symbol within sub-frame
unsigned int nb_prefix_samples = (no_prefix ? 0 : fp->nb_prefix_samples);
unsigned int nb_prefix_samples0 = (no_prefix ? 0 : fp->nb_prefix_samples0);
......
......@@ -698,11 +698,11 @@ typedef struct RU_t_s{
/// function pointer to TX front-end processing routine (PRECODING)
void (*feptx_prec)(struct RU_t_s *ru);
/// function pointer to wakeup routine in lte-enb.
int (*wakeup_rxtx)(struct PHY_VARS_eNB_s *eNB,int frame_rx,int subframe_rx);
int (*wakeup_rxtx)(struct PHY_VARS_eNB_s *eNB, struct RU_t_s *ru);
/// function pointer to wakeup routine in lte-enb.
int (*wakeup_prach_eNB)(struct PHY_VARS_eNB_s *eNB,struct RU_t_s *ru,int frame,int subframe);
void (*wakeup_prach_eNB)(struct PHY_VARS_eNB_s *eNB,struct RU_t_s *ru,int frame,int subframe);
/// function pointer to wakeup routine in lte-enb.
int (*wakeup_prach_eNB_br)(struct PHY_VARS_eNB_s *eNB,struct RU_t_s *ru,int frame,int subframe);
void (*wakeup_prach_eNB_br)(struct PHY_VARS_eNB_s *eNB,struct RU_t_s *ru,int frame,int subframe);
/// function pointer to eNB entry routine
void (*eNB_top)(struct PHY_VARS_eNB_s *eNB, int frame_rx, int subframe_rx, char *string);
/// Timing statistics
......@@ -710,7 +710,7 @@ typedef struct RU_t_s{
/// RX and TX buffers for precoder output
RU_COMMON common;
/// beamforming weight vectors per eNB
int32_t **beam_weights[NUMBER_OF_eNB_MAX][15];
int32_t **beam_weights[NUMBER_OF_eNB_MAX+1][15];
/// received frequency-domain signal for PRACH (IF4p5 RRU)
int16_t **prach_rxsigF;
......
......@@ -80,7 +80,6 @@ void handle_nfapi_hi_dci0_dci_pdu(PHY_VARS_eNB *eNB,eNB_rxtx_proc_t *proc,
void handle_nfapi_hi_dci0_hi_pdu(PHY_VARS_eNB *eNB,eNB_rxtx_proc_t *proc,
nfapi_hi_dci0_request_pdu_t *hi_dci0_config_pdu) {
nfapi_hi_dci0_hi_pdu *pdu = &hi_dci0_config_pdu->hi_pdu;
LTE_eNB_PHICH *phich = &eNB->phich_vars[proc->subframe_tx&1];
// copy dci configuration in to eNB structure
......
......@@ -960,7 +960,7 @@ void uci_procedures(PHY_VARS_eNB *eNB,eNB_rxtx_proc_t *proc)
}
fill_uci_harq_indication(eNB,uci,frame,subframe,harq_ack,2,0xffff); // special_bundling mode
}
else if ((uci->tdd_bundling == 0) && (res==2)){ // multiplexing + no SR, implement Table 10.1.3-5 (Rel14) for multiplexing with M=2
else if ((uci->tdd_bundling == 0) && (uci->num_pucch_resources==2)){ // multiplexing + no SR, implement Table 10.1.3-5 (Rel14) for multiplexing with M=2
if (pucch_b0b1[0][0] == 4 ||
pucch_b0b1[1][0] == 4) { // there isn't a likely transmission
harq_ack[0] = 4; // DTX
......@@ -1001,7 +1001,7 @@ void uci_procedures(PHY_VARS_eNB *eNB,eNB_rxtx_proc_t *proc)
}
fill_uci_harq_indication(eNB,uci,frame,subframe,harq_ack,1,tdd_multiplexing_mask); // multiplexing mode
} //else if ((uci->tdd_bundling == 0) && (res==2))
else if ((uci->tdd_bundling == 0) && (res==3)){ // multiplexing + no SR, implement Table 10.1.3-6 (Rel14) for multiplexing with M=3
else if ((uci->tdd_bundling == 0) && (uci->num_pucch_resources==3)){ // multiplexing + no SR, implement Table 10.1.3-6 (Rel14) for multiplexing with M=3
if (harq_ack[0] == 4 ||
harq_ack[1] == 4 ||
......@@ -1082,7 +1082,7 @@ void uci_procedures(PHY_VARS_eNB *eNB,eNB_rxtx_proc_t *proc)
}
fill_uci_harq_indication(eNB,uci,frame,subframe,harq_ack,1,tdd_multiplexing_mask); // multiplexing mode
} //else if ((uci->tdd_bundling == 0) && (res==3))
else if ((uci->tdd_bundling == 0) && (res==4)){ // multiplexing + no SR, implement Table 10.1.3-7 (Rel14) for multiplexing with M=4
else if ((uci->tdd_bundling == 0) && (uci->num_pucch_resources==4)){ // multiplexing + no SR, implement Table 10.1.3-7 (Rel14) for multiplexing with M=4
if (pucch_b0b1[0][0] == 4 ||
pucch_b0b1[1][0] == 4 ||
pucch_b0b1[2][0] == 4 ||
......
......@@ -358,8 +358,6 @@ void check_ul_failure(module_id_t module_idP,int CC_id,int UE_id,
}
void clear_nfapi_information(eNB_MAC_INST *eNB,int CC_idP,frame_t frameP,sub_frame_t subframeP);
void clear_nfapi_information(eNB_MAC_INST *eNB,int CC_idP,frame_t frameP,sub_frame_t subframeP) {
nfapi_dl_config_request_t *DL_req = &eNB->DL_req[0];
......
......@@ -79,9 +79,7 @@ void mac_UE_out_of_sync_ind(module_id_t module_idP, frame_t frameP, uint16_t eNB
int mac_top_init_ue(int eMBMS_active, char *uecap_xer, uint8_t cba_group_active, uint8_t HO_active)
{
module_id_t Mod_id,i;
int list_el;
UE_list_t *UE_list;
int i;
LOG_I(MAC,"[MAIN] Init function start:Nb_UE_INST=%d\n",NB_UE_INST);
......@@ -114,10 +112,10 @@ int mac_top_init_ue(int eMBMS_active, char *uecap_xer, uint8_t cba_group_active,
}
int mac_top_init_eNB()
void mac_top_init_eNB()
{
module_id_t Mod_id,i,j;
module_id_t i,j;
int list_el;
UE_list_t *UE_list;
eNB_MAC_INST *mac;
......@@ -137,7 +135,7 @@ int mac_top_init_eNB()
RC.nb_macrlc_inst*sizeof(eNB_MAC_INST*),RC.nb_macrlc_inst,sizeof(eNB_MAC_INST));
LOG_D(MAC,"[MAIN] ALLOCATE %zu Bytes for %d eNB_MAC_INST @ %p\n",sizeof(eNB_MAC_INST),RC.nb_macrlc_inst,RC.mac);
bzero(RC.mac[i],sizeof(eNB_MAC_INST));
RC.mac[i]->Mod_id = Mod_id;
RC.mac[i]->Mod_id = i;
for (j=0;j<MAX_NUM_CCs;j++) {
RC.mac[i]->DL_req[j].dl_config_request_body.dl_config_pdu_list = RC.mac[i]->dl_config_pdu_list[j];
RC.mac[i]->UL_req[j].ul_config_request_body.ul_config_pdu_list = RC.mac[i]->ul_config_pdu_list[j];
......@@ -160,11 +158,11 @@ int mac_top_init_eNB()
}
// Initialize Linked-List for Active UEs
for(Mod_id=0; Mod_id<RC.nb_macrlc_inst; Mod_id++) {
mac = RC.mac[Mod_id];
for(i=0; i<RC.nb_macrlc_inst; i++) {
mac = RC.mac[i];
mac->if_inst = IF_Module_init(Mod_id);
mac->if_inst = IF_Module_init(i);
UE_list = &mac->UE_list;
......
......@@ -147,7 +147,9 @@ void add_msg3(module_id_t module_idP,int CC_id, RA_TEMPLATE *RA_template, frame_
int mac_top_init(int eMBMS_active, char *uecap_xer,uint8_t cba_group_active, uint8_t HO_active);
int mac_top_init_eNB(void);
void mac_top_init_eNB(void);
void mac_init_cell_params(int Mod_idP,int CC_idP);
char layer2_init_UE(module_id_t module_idP);
......@@ -161,6 +163,8 @@ void mac_top_cleanup(void);
void mac_UE_out_of_sync_ind(module_id_t module_idP,frame_t frameP, uint16_t eNB_index);
void clear_nfapi_information(eNB_MAC_INST *eNB,int CC_idP,frame_t frameP,sub_frame_t subframeP);
void dlsch_scheduler_pre_processor_reset (int module_idP,int UE_id,
uint8_t CC_id,
int frameP,
......@@ -311,6 +315,27 @@ void SR_indication(module_id_t module_idP,int CC_id,frame_t frameP,sub_frame_t s
*/
void UL_failure_indication(module_id_t Mod_id,int CC_id,frame_t frameP,rnti_t rnti,sub_frame_t subframe);
/* \brief Function to indicate an HARQ ACK/NAK.
@param Mod_id Instance ID of eNB
@param CC_id Component carrier
@param frameP Frame index
@param subframeP subframe index
@param harq_pdu NFAPI HARQ PDU descriptor
*/
void harq_indication(module_id_t mod_idP, int CC_idP, frame_t frameP, sub_frame_t subframeP, nfapi_harq_indication_pdu_t *harq_pdu);
/* \brief Function to indicate a received CQI pdu
@param Mod_id Instance ID of eNB
@param CC_id Component carrier
@param frameP Frame index
@param subframeP subframe index
@param rntiP RNTI of incoming CQI information
@param ul_cqi_information NFAPI UL CQI measurement
*/
void cqi_indication(module_id_t mod_idP, int CC_idP, frame_t frameP, sub_frame_t subframeP, rnti_t rntiP,
nfapi_cqi_indication_rel9_t *rel9,uint8_t *pdu,
nfapi_ul_cqi_information_t *ul_cqi_information);
uint8_t *get_dlsch_sdu(module_id_t module_idP,int CC_id,frame_t frameP,rnti_t rnti,uint8_t TBindex);
/* \brief Function to retrieve MCH transport block and MCS used for MCH in this MBSFN subframe. Returns null if no MCH is to be transmitted
......
......@@ -137,8 +137,8 @@ unsigned short fill_rar_br(eNB_MAC_INST *eNB,
RA_HEADER_RAPID *rarh = (RA_HEADER_RAPID *)dlsch_buffer;
COMMON_channels_t *cc = &eNB->common_channels[CC_id];
uint8_t *rar = (uint8_t *)(dlsch_buffer+1);
int i;
uint8_t nb,rballoc,reps;
// uint8_t nb,reps;
uint8_t rballoc;
uint8_t mcs,TPC,ULdelay,cqireq;
int input_buffer_length;
......@@ -168,11 +168,11 @@ unsigned short fill_rar_br(eNB_MAC_INST *eNB,
rar[4] = (uint8_t)(RA_template->rnti>>8);
rar[5] = (uint8_t)(RA_template->rnti&0xff);
//cc->RA_template[ra_idx].timing_offset = 0;
nb = 0;
// nb = 0;
rballoc = mac_computeRIV(6,1+ce_level,1); // one PRB only for UL Grant in position 1+ce_level within Narrowband
rar[1] |= (rballoc&15)<<(4-N_NB_index); // Hopping = 0 (bit 3), 3 MSBs of rballoc
reps = 4;
// reps = 4;
mcs = 7;
TPC = 3; // no power increase
ULdelay = 0;
......
......@@ -127,8 +127,6 @@ init_SI(
)
//-----------------------------------------------------------------------------
{
uint8_t SIwindowsize = 1;
uint16_t SIperiod = 8;
#if defined(Rel10) || defined(Rel14)
int i;
#endif
......@@ -148,9 +146,9 @@ init_SI(
RC.rrc[ctxt_pP->module_id]->carrier[CC_id].pbch_repetition = configuration->pbch_repetition[CC_id];
#endif
LOG_I(RRC, "Configuring MIB (N_RB_DL %d,phich_Resource %d,phich_Duration %d)\n",
configuration->N_RB_DL[CC_id],
configuration->phich_resource[CC_id],
configuration->phich_duration[CC_id]);
(int)configuration->N_RB_DL[CC_id],
(int)configuration->phich_resource[CC_id],
(int)configuration->phich_duration[CC_id]);
do_MIB(&RC.rrc[ctxt_pP->module_id]->carrier[CC_id],
#ifdef ENABLE_ITTI
configuration->N_RB_DL[CC_id],
......@@ -271,14 +269,16 @@ init_SI(
if ((RC.rrc[ctxt_pP->module_id]->carrier[CC_id].mib.message.schedulingInfoSIB1_BR_r13>0) &&
(RC.rrc[ctxt_pP->module_id]->carrier[CC_id].sib1_BR!=NULL)) {
AssertFatal(RC.rrc[ctxt_pP->module_id]->carrier[CC_id].sib1_BR->nonCriticalExtension!=NULL,
"sib2_br->nonCriticalExtension is null (v9.2)\n");
"sib2_br->nonCriticalExtension is null (v8.9)\n");
AssertFatal(RC.rrc[ctxt_pP->module_id]->carrier[CC_id].sib1_BR->nonCriticalExtension->nonCriticalExtension!=NULL,
"sib2_br->nonCriticalExtension is null (v11.3)\n");
"sib2_br->nonCriticalExtension is null (v9.2)\n");
AssertFatal(RC.rrc[ctxt_pP->module_id]->carrier[CC_id].sib1_BR->nonCriticalExtension->nonCriticalExtension->nonCriticalExtension!=NULL,
"sib2_br->nonCriticalExtension is null (v12.5)\n");
"sib2_br->nonCriticalExtension is null (v11.3)\n");
AssertFatal(RC.rrc[ctxt_pP->module_id]->carrier[CC_id].sib1_BR->nonCriticalExtension->nonCriticalExtension->nonCriticalExtension->nonCriticalExtension!=NULL,
"sib2_br->nonCriticalExtension is null (v12.5)\n");
AssertFatal(RC.rrc[ctxt_pP->module_id]->carrier[CC_id].sib1_BR->nonCriticalExtension->nonCriticalExtension->nonCriticalExtension->nonCriticalExtension->nonCriticalExtension!=NULL,
"sib2_br->nonCriticalExtension is null (v13.10)\n");
sib1_v13ext = RC.rrc[ctxt_pP->module_id]->carrier[CC_id].sib1_BR->nonCriticalExtension->nonCriticalExtension->nonCriticalExtension->nonCriticalExtension;
sib1_v13ext = RC.rrc[ctxt_pP->module_id]->carrier[CC_id].sib1_BR->nonCriticalExtension->nonCriticalExtension->nonCriticalExtension->nonCriticalExtension->nonCriticalExtension;
}
#endif
......
......@@ -359,7 +359,7 @@ struct openair0_device_t {
* \param idx RU index
* \param arg pointer to capabilities or configuration
*/
int (*configure_rru)(int idx, void* arg);
void (*configure_rru)(int idx, void* arg);
};
/* type of device init function, implemented in shared lib */
......
......@@ -30,6 +30,8 @@
* \warning
*/
#define _GNU_SOURCE
#include <pthread.h>
#include "time_utils.h"
......@@ -241,8 +243,8 @@ static void* eNB_thread_rxtx( void* param ) {
}
#if defined(ENABLE_ITTI) && defined(ENABLE_USE_MME)
/* Wait for eNB application initialization to be complete (eNB registration to MME) */
#if 0 //defined(ENABLE_ITTI) && defined(ENABLE_USE_MME)
// Wait for eNB application initialization to be complete (eNB registration to MME)
static void wait_system_ready (char *message, volatile int *start_flag) {
static char *indicator[] = {". ", ".. ", "... ", ".... ", ".....",
......@@ -280,7 +282,7 @@ void eNB_top(PHY_VARS_eNB *eNB, int frame_rx, int subframe_rx, char *string) {
LOG_D(PHY,"eNB_top in %p (proc %p, CC_id %d), frame %d, subframe %d, instance_cnt_prach %d\n",
pthread_self(), proc, eNB->CC_id, proc->frame_rx,proc->subframe_rx,proc->instance_cnt_prach);
(void*)pthread_self(), proc, eNB->CC_id, proc->frame_rx,proc->subframe_rx,proc->instance_cnt_prach);
......@@ -295,7 +297,7 @@ void eNB_top(PHY_VARS_eNB *eNB, int frame_rx, int subframe_rx, char *string) {
if (rxtx(eNB,proc_rxtx,string) < 0) LOG_E(PHY,"eNB %d CC_id %d failed during execution\n",eNB->Mod_id,eNB->CC_id);
LOG_D(PHY,"eNB_top out %p (proc %p, CC_id %d), frame %d, subframe %d, instance_cnt_prach %d\n",
pthread_self(), proc, eNB->CC_id, proc->frame_rx,proc->subframe_rx,proc->instance_cnt_prach);
(void*)pthread_self(), proc, eNB->CC_id, proc->frame_rx,proc->subframe_rx,proc->instance_cnt_prach);
}
}
......@@ -399,7 +401,7 @@ void wakeup_prach_eNB(PHY_VARS_eNB *eNB,RU_t *ru,int frame,int subframe) {
}
if (proc->RU_mask_prach != (1<<eNB->num_RU)-1) { // not all RUs have provided their information so return
pthread_mutex_unlock(&proc->mutex_RU_PRACH);
return(0);
return;
}
else { // all RUs have provided their information so continue on and wakeup eNB processing
proc->RU_mask_prach = 0;
......@@ -459,7 +461,7 @@ void wakeup_prach_eNB_br(PHY_VARS_eNB *eNB,RU_t *ru,int frame,int subframe) {
}
if (proc->RU_mask_prach_br != (1<<eNB->num_RU)-1) { // not all RUs have provided their information so return
pthread_mutex_unlock(&proc->mutex_RU_PRACH_br);
return(0);
return;
}
else { // all RUs have provided their information so continue on and wakeup eNB processing
proc->RU_mask_prach_br = 0;
......@@ -591,7 +593,8 @@ void init_eNB_proc(int inst) {
PHY_VARS_eNB *eNB;
eNB_proc_t *proc;
eNB_rxtx_proc_t *proc_rxtx;
pthread_attr_t *attr0=NULL,*attr1=NULL,*attr_FH=NULL,*attr_prach=NULL,*attr_asynch=NULL,*attr_single=NULL,*attr_fep=NULL,*attr_td=NULL,*attr_te=NULL,*attr_synch=NULL;
pthread_attr_t *attr0=NULL,*attr1=NULL,*attr_prach=NULL;
//*attr_td=NULL,*attr_te=NULL;
#ifdef Rel14
pthread_attr_t *attr_prach_br=NULL;
#endif
......@@ -631,9 +634,8 @@ void init_eNB_proc(int inst) {
pthread_attr_init( &proc->attr_prach);
pthread_attr_init( &proc->attr_asynch_rxtx);
pthread_attr_init( &proc->attr_single);
pthread_attr_init( &proc->attr_td);
pthread_attr_init( &proc->attr_te);
// pthread_attr_init( &proc->attr_td);
// pthread_attr_init( &proc->attr_te);
pthread_attr_init( &proc_rxtx[0].attr_rxtx);
pthread_attr_init( &proc_rxtx[1].attr_rxtx);
#ifdef Rel14
......@@ -652,10 +654,8 @@ void init_eNB_proc(int inst) {
attr_prach_br = &proc->attr_prach_br;
#endif
attr_asynch = &proc->attr_asynch_rxtx;
attr_single = &proc->attr_single;
attr_td = &proc->attr_td;
attr_te = &proc->attr_te;
// attr_td = &proc->attr_td;
// attr_te = &proc->attr_te;
#endif
if (eNB->single_thread_flag==0) {
......@@ -749,9 +749,9 @@ void kill_eNB_proc(int inst) {
int i;
if (eNB->single_thread_flag==0) {
for (i=0;i<2;i++) {
LOG_I(PHY, "Joining rxtx[%d] mutex/cond\n");
LOG_I(PHY, "Joining rxtx[%d] mutex/cond\n",i);
pthread_join( proc_rxtx[i].pthread_rxtx, (void**)&status );
LOG_I(PHY, "Destroying rxtx[%d] mutex/cond\n");
LOG_I(PHY, "Destroying rxtx[%d] mutex/cond\n",i);
pthread_mutex_destroy( &proc_rxtx[i].mutex_rxtx );
pthread_cond_destroy( &proc_rxtx[i].cond_rxtx );
}
......@@ -849,7 +849,8 @@ void init_transport(PHY_VARS_eNB *eNB) {
fp->pucch_config_common.deltaPUCCH_Shift = 1;
}
void init_eNB_afterRU() {
void init_eNB_afterRU(void) {
int inst,CC_id,ru_id,i,aa;
PHY_VARS_eNB *eNB;
......@@ -863,10 +864,10 @@ void init_eNB_afterRU() {
AssertFatal(eNB->num_RU>0,"Number of RU attached to eNB %d is zero\n",eNB->Mod_id);
LOG_I(PHY,"Mapping RX ports from %d RUs to eNB %d\n",eNB->num_RU,eNB->Mod_id);
eNB->frame_parms.nb_antennas_rx = 0;
eNB->prach_vars.rxsigF[0] = (int16_t*)malloc16(64*sizeof(int16_t*));
eNB->prach_vars.rxsigF[0] = (int16_t**)malloc16(64*sizeof(int16_t*));
#ifdef Rel14
for (int ce_level=0;ce_level<4;ce_level++)
eNB->prach_vars_br.rxsigF[ce_level] = (int16_t*)malloc16(64*sizeof(int16_t*));
eNB->prach_vars_br.rxsigF[ce_level] = (int16_t**)malloc16(64*sizeof(int16_t*));
#endif
for (ru_id=0,aa=0;ru_id<eNB->num_RU;ru_id++) {
eNB->frame_parms.nb_antennas_rx += eNB->RU_list[ru_id]->nb_rx;
......@@ -881,7 +882,11 @@ void init_eNB_afterRU() {
for (i=0;i<eNB->RU_list[ru_id]->nb_rx;aa++,i++) {
LOG_I(PHY,"Attaching RU %d antenna %d to eNB antenna %d\n",eNB->RU_list[ru_id]->idx,i,aa);
eNB->prach_vars.rxsigF[aa] = eNB->RU_list[ru_id]->prach_rxsigF[i];
eNB->prach_vars.rxsigF[0][aa] = eNB->RU_list[ru_id]->prach_rxsigF[i];
#ifdef Rel14
for (int ce_level=0;ce_level<4;ce_level++)
eNB->prach_vars_br.rxsigF[ce_level][aa] = eNB->RU_list[ru_id]->prach_rxsigF_br[ce_level][i];
#endif
eNB->common_vars.rxdataF[aa] = eNB->RU_list[ru_id]->common.rxdataF[i];
}
}
......@@ -890,7 +895,7 @@ void init_eNB_afterRU() {
LOG_I(PHY,"inst %d, CC_id %d : nb_antennas_rx %d\n",inst,CC_id,eNB->frame_parms.nb_antennas_rx);
init_transport(eNB);
init_precoding_weights(RC.eNB[inst][CC_id]);
//init_precoding_weights(RC.eNB[inst][CC_id]);
}
init_eNB_proc(inst);
}
......
This diff is collapsed.
......@@ -713,7 +713,6 @@ void *UE_thread(void *arg) {
void* rxp[NB_ANTENNAS_RX], *txp[NB_ANTENNAS_TX];
int start_rx_stream = 0;
int i;
char threadname[128];
cpu_set_t cpuset;
CPU_ZERO(&cpuset);
......
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