Commit 89772f56 authored by magounak's avatar magounak

fix build issues

parent fe28f8e4
...@@ -459,7 +459,7 @@ int phy_init_lte_eNB(PHY_VARS_eNB *eNB, ...@@ -459,7 +459,7 @@ int phy_init_lte_eNB(PHY_VARS_eNB *eNB,
prach_vars_br->prach_ifft[ce_level][i] = (int32_t *) malloc16_clear (1024 * 2 * sizeof (int32_t)); prach_vars_br->prach_ifft[ce_level][i] = (int32_t *) malloc16_clear (1024 * 2 * sizeof (int32_t));
prach_vars->rxsigF[ce_level] = (int16_t **) malloc16_clear (64 * sizeof (int16_t *)); prach_vars->rxsigF[ce_level] = (int16_t **) malloc16_clear (64 * sizeof (int16_t *));
} }
#endif
/* number of elements of an array X is computed as sizeof(X) / sizeof(X[0]) /* number of elements of an array X is computed as sizeof(X) / sizeof(X[0])
AssertFatal(fp->nb_antennas_rx <= sizeof(prach_vars->rxsigF) / sizeof(prach_vars->rxsigF[0]), AssertFatal(fp->nb_antennas_rx <= sizeof(prach_vars->rxsigF) / sizeof(prach_vars->rxsigF[0]),
...@@ -498,12 +498,9 @@ int phy_init_lte_eNB(PHY_VARS_eNB *eNB, ...@@ -498,12 +498,9 @@ int phy_init_lte_eNB(PHY_VARS_eNB *eNB,
} }
pusch_vars[UE_id]->llr = (int16_t*)malloc16_clear( (8*((3*8*6144)+12))*sizeof(int16_t) ); pusch_vars[UE_id]->llr = (int16_t*)malloc16_clear( (8*((3*8*6144)+12))*sizeof(int16_t) );
LOG_I(PHY,"llr[0] %p\n",pusch_vars[UE_id]->llr); //LOG_I(PHY,"llr[0] %p\n",pusch_vars[UE_id]->llr);
} //UE_id } //UE_id
pusch_vars[UE_id]->llr = (int16_t *)malloc16_clear( (8*((3*8*6144)+12))*sizeof(int16_t) );
} //UE_id
for (UE_id = 0; UE_id < NUMBER_OF_UE_MAX; UE_id++) for (UE_id = 0; UE_id < NUMBER_OF_UE_MAX; UE_id++)
eNB->UE_stats_ptr[UE_id] = &eNB->UE_stats[UE_id]; eNB->UE_stats_ptr[UE_id] = &eNB->UE_stats[UE_id];
} }
......
...@@ -59,7 +59,6 @@ int phy_init_RU(RU_t *ru) { ...@@ -59,7 +59,6 @@ int phy_init_RU(RU_t *ru) {
for (i=0; i<ru->nb_rx; i++) { for (i=0; i<ru->nb_rx; i++) {
calibration->drs_ch_estimates_time[i] = (int32_t*)malloc16_clear(2*sizeof(int32_t)*fp->ofdm_symbol_size); calibration->drs_ch_estimates_time[i] = (int32_t*)malloc16_clear(2*sizeof(int32_t)*fp->ofdm_symbol_size);
} }
}
for (i=0; i<ru->nb_rx; i++) { for (i=0; i<ru->nb_rx; i++) {
ru->common.rxdata[i] = (int32_t *)malloc16_clear( fp->samples_per_tti*10*sizeof(int32_t) ); ru->common.rxdata[i] = (int32_t *)malloc16_clear( fp->samples_per_tti*10*sizeof(int32_t) );
......
...@@ -422,6 +422,10 @@ typedef enum { ...@@ -422,6 +422,10 @@ typedef enum {
typedef struct RU_t_s { typedef struct RU_t_s {
/// tag of this ru
uint32_t tag;
/// number of RRUs
uint32_t p;
/// index of this ru /// index of this ru
uint32_t idx; uint32_t idx;
/// Pointer to configuration file /// Pointer to configuration file
...@@ -458,6 +462,8 @@ typedef struct RU_t_s { ...@@ -458,6 +462,8 @@ typedef struct RU_t_s {
int wait_cnt; int wait_cnt;
/// counter to delay start of slave RUs until stable synchronization /// counter to delay start of slave RUs until stable synchronization
int wait_check; int wait_check;
/// counter to count missed synch events during synchronization of RU
int missed_synch_events;
/// Total gain of receive chain /// Total gain of receive chain
uint32_t rx_total_gain_dB; uint32_t rx_total_gain_dB;
/// number of bands that this device can support /// number of bands that this device can support
...@@ -664,6 +670,10 @@ typedef struct RRU_capabilities_s { ...@@ -664,6 +670,10 @@ typedef struct RRU_capabilities_s {
typedef struct RRU_config_s { typedef struct RRU_config_s {
/// tag of an RU
uint32_t tag;
/// number of slave RRUs
uint32_t p;
/// Fronthaul format /// Fronthaul format
RU_if_south_t FH_fmt; RU_if_south_t FH_fmt;
/// number of EUTRA bands (<=4) configured in RRU /// number of EUTRA bands (<=4) configured in RRU
......
...@@ -326,7 +326,7 @@ void fh_if4p5_south_in(RU_t *ru, ...@@ -326,7 +326,7 @@ void fh_if4p5_south_in(RU_t *ru,
Ns = (ru->is_slave==0 ? 1 : 1); Ns = (ru->is_slave==0 ? 1 : 1);
l = (ru->is_slave==0 ? 10 : 10); l = (ru->is_slave==0 ? 10 : 10);
u = (ru->is_slave==0 ? 0 : 0); u = (ru->is_slave==0 ? 0 : 0);
ru->frame_parms.nb_antennas_rx = ru->nb_rx; ru->frame_parms->nb_antennas_rx = ru->nb_rx;
ulsch_extract_rbs_single(ru->common.rxdataF, ulsch_extract_rbs_single(ru->common.rxdataF,
calibration->rxdataF_ext, calibration->rxdataF_ext,
0, 0,
...@@ -676,16 +676,16 @@ void fh_if4p5_north_out(RU_t *ru) { ...@@ -676,16 +676,16 @@ void fh_if4p5_north_out(RU_t *ru) {
if ((fp->frame_type == TDD) && (subframe_select(fp,subframe)!=SF_UL)) { if ((fp->frame_type == TDD) && (subframe_select(fp,subframe)!=SF_UL)) {
/// **** in TDD during DL send_IF4 of ULTICK to RCC **** /// /// **** in TDD during DL send_IF4 of ULTICK to RCC **** ///
if (subframe_select(fp,subframe)==SF_S && subframe==1 /*&& ru->state==RU_RUN*/) { if (subframe_select(fp,subframe)==SF_S && subframe==1 /*&& ru->state==RU_RUN*/) {
send_IF4p5(ru, proc->frame_rx, proc->subframe_rx, IF4p5_PULCALIB); send_IF4p5(ru, proc->frame_rx, proc->tti_rx, IF4p5_PULCALIB);
LOG_D(PHY,"~~~~~~******* Sending PULCALIB frame %d, subframe %d\n",proc->frame_rx,proc->subframe_rx); LOG_D(PHY,"~~~~~~******* Sending PULCALIB frame %d, subframe %d\n",proc->frame_rx,proc->tti_rx);
T(T_RAU_INPUT_DMRS, T_INT(ru->idx), T_INT(proc->frame_rx), T_INT(proc->subframe_rx), T(T_RAU_INPUT_DMRS, T_INT(ru->idx), T_INT(proc->frame_rx), T_INT(proc->tti_rx),
T_BUFFER(&ru->common.rxdataF[0][proc->subframe_rx*fp->symbols_per_tti*fp->ofdm_symbol_size], T_BUFFER(&ru->common.rxdataF[0][proc->tti_rx*fp->symbols_per_tti*fp->ofdm_symbol_size],
fp->symbols_per_tti*fp->ofdm_symbol_size*sizeof(int32_t))); fp->symbols_per_tti*fp->ofdm_symbol_size*sizeof(int32_t)));
} else { } else {
send_IF4p5(ru, proc->frame_rx, proc->subframe_rx, IF4p5_PULTICK); send_IF4p5(ru, proc->frame_rx, proc->tti_rx, IF4p5_PULTICK);
LOG_D(PHY,"~~~~~~******* Sending PULTICK frame %d, subframe %d\n",proc->frame_rx,proc->subframe_rx); LOG_D(PHY,"~~~~~~******* Sending PULTICK frame %d, subframe %d\n",proc->frame_rx,proc->tti_rx);
} }
LOG_D(PHY,"fh_if4p5_north_out: Sending IF4p5_PULCALIB SFN.SF %d.%d\n",proc->frame_rx,proc->subframe_rx); LOG_D(PHY,"fh_if4p5_north_out: Sending IF4p5_PULCALIB SFN.SF %d.%d\n",proc->frame_rx,proc->tti_rx);
ru->north_out_cnt++; ru->north_out_cnt++;
return; return;
} }
...@@ -944,8 +944,8 @@ void tx_rf(RU_t *ru, ...@@ -944,8 +944,8 @@ void tx_rf(RU_t *ru,
#endif #endif
for (i=0; i<ru->nb_tx; i++) { for (i=0; i<ru->nb_tx; i++) {
txp[i] = (void *)&ru->common.txdata[i][(proc->subframe_tx*fp->samples_per_tti)-sf_extension]; txp[i] = (void *)&ru->common.txdata[i][(proc->tti_tx*fp->samples_per_tti)-sf_extension];
txp1[i] = (void*)&ru->common.txdata[i][(proc->subframe_tx*fp->samples_per_tti)+(sigoff2)-sf_extension]; // pointer to 1st sample of 10th symbol txp1[i] = (void*)&ru->common.txdata[i][(proc->tti_tx*fp->samples_per_tti)+(sigoff2)-sf_extension]; // pointer to 1st sample of 10th symbol
} }
/* add fail safe for late command */ /* add fail safe for late command */
...@@ -991,7 +991,7 @@ void tx_rf(RU_t *ru, ...@@ -991,7 +991,7 @@ void tx_rf(RU_t *ru,
siglen+sf_extension, siglen+sf_extension,
ru->nb_tx, ru->nb_tx,
flags); flags);
if (ru->state==RU_RUN && proc->frame_tx%ru->p==ru->tag && proc->subframe_tx==1) { if (ru->state==RU_RUN && proc->frame_tx%ru->p==ru->tag && proc->tti_tx==1) {
txs1 = ru->rfdevice.trx_write_func(&ru->rfdevice, txs1 = ru->rfdevice.trx_write_func(&ru->rfdevice,
proc->timestamp_tx+(ru->ts_offset+sigoff2)-ru->openair0_cfg.tx_sample_advance-sf_extension, proc->timestamp_tx+(ru->ts_offset+sigoff2)-ru->openair0_cfg.tx_sample_advance-sf_extension,
txp1, txp1,
...@@ -1001,7 +1001,7 @@ void tx_rf(RU_t *ru, ...@@ -1001,7 +1001,7 @@ void tx_rf(RU_t *ru,
//LOG_M("txdata.m","txdata",&ru->common.txdata[0][0], fp->samples_per_tti*10,1,1); // save 1 frame //LOG_M("txdata.m","txdata",&ru->common.txdata[0][0], fp->samples_per_tti*10,1,1); // save 1 frame
//exit(-1); //exit(-1);
int se1 = dB_fixed(signal_energy(txp1[0],siglen2+sf_extension)); int se1 = dB_fixed(signal_energy(txp1[0],siglen2+sf_extension));
LOG_D(PHY,"******** frame %d subframe %d RRU sends DMRS of energy10 %d, energy3 %d\n",proc->frame_tx,proc->subframe_tx,se1,dB_fixed(signal_energy(txp[0],siglen+sf_extension))); LOG_D(PHY,"******** frame %d subframe %d RRU sends DMRS of energy10 %d, energy3 %d\n",proc->frame_tx,proc->tti_tx,se1,dB_fixed(signal_energy(txp[0],siglen+sf_extension)));
LOG_D(PHY,"txs1 %d, siglen2 %d, sf_extension %d\n",txs1,siglen2,sf_extension); LOG_D(PHY,"txs1 %d, siglen2 %d, sf_extension %d\n",txs1,siglen2,sf_extension);
} }
...@@ -1014,7 +1014,7 @@ void tx_rf(RU_t *ru, ...@@ -1014,7 +1014,7 @@ void tx_rf(RU_t *ru,
VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME( VCD_SIGNAL_DUMPER_FUNCTIONS_TRX_WRITE, 0 ); VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME( VCD_SIGNAL_DUMPER_FUNCTIONS_TRX_WRITE, 0 );
if (ru->state==RU_RUN && proc->frame_tx%ru->p==ru->tag && proc->subframe_tx==1) { if (ru->state==RU_RUN && proc->frame_tx%ru->p==ru->tag && proc->tti_tx==1) {
if( (txs1!=siglen2+sf_extension) && (late_control==STATE_BURST_NORMAL) ){ /* add fail safe for late command */ if( (txs1!=siglen2+sf_extension) && (late_control==STATE_BURST_NORMAL) ){ /* add fail safe for late command */
late_control=STATE_BURST_TERMINATE; late_control=STATE_BURST_TERMINATE;
LOG_E(PHY,"TX : Timeout (sent %d/%d) state =%d\n",txs1, siglen2,late_control); LOG_E(PHY,"TX : Timeout (sent %d/%d) state =%d\n",txs1, siglen2,late_control);
......
...@@ -424,9 +424,9 @@ void configure_ru(int idx, ...@@ -424,9 +424,9 @@ void configure_ru(int idx,
config->tdd_config_S[0] = ru->frame_parms->tdd_config_S; config->tdd_config_S[0] = ru->frame_parms->tdd_config_S;
config->att_tx[0] = ru->att_tx; config->att_tx[0] = ru->att_tx;
config->att_rx[0] = ru->att_rx; config->att_rx[0] = ru->att_rx;
config->N_RB_DL[0] = ru->frame_parms.N_RB_DL; config->N_RB_DL[0] = ru->frame_parms->N_RB_DL;
config->N_RB_UL[0] = ru->frame_parms.N_RB_UL; config->N_RB_UL[0] = ru->frame_parms->N_RB_UL;
config->threequarter_fs[0] = ru->frame_parms.threequarter_fs; config->threequarter_fs[0] = ru->frame_parms->threequarter_fs;
config->tag = idx; config->tag = idx;
config->p = RC.nb_RU; config->p = RC.nb_RU;
if (ru->if_south==REMOTE_IF4p5) { if (ru->if_south==REMOTE_IF4p5) {
...@@ -455,14 +455,14 @@ void configure_rru(int idx, ...@@ -455,14 +455,14 @@ void configure_rru(int idx,
ru->tag = config->tag; ru->tag = config->tag;
ru->p = config->p; ru->p = config->p;
ru->frame_parms.eutra_band = config->band_list[0]; ru->frame_parms->eutra_band = config->band_list[0];
ru->frame_parms.dl_CarrierFreq = config->tx_freq[0]; ru->frame_parms->dl_CarrierFreq = config->tx_freq[0];
ru->frame_parms.ul_CarrierFreq = config->rx_freq[0]; ru->frame_parms->ul_CarrierFreq = config->rx_freq[0];
if (ru->frame_parms.dl_CarrierFreq == ru->frame_parms.ul_CarrierFreq) { if (ru->frame_parms->dl_CarrierFreq == ru->frame_parms->ul_CarrierFreq) {
LOG_I(PHY,"Setting RRU to TDD frame type\n"); LOG_I(PHY,"Setting RRU to TDD frame type\n");
ru->frame_parms.frame_type = TDD; ru->frame_parms->frame_type = TDD;
ru->frame_parms.tdd_config = config->tdd_config[0]; ru->frame_parms->tdd_config = config->tdd_config[0];
ru->frame_parms.tdd_config_S = config->tdd_config_S[0]; ru->frame_parms->tdd_config_S = config->tdd_config_S[0];
} }
else ru->frame_parms->frame_type = FDD; else ru->frame_parms->frame_type = FDD;
......
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