Commit 2629cede authored by Cedric Roux's avatar Cedric Roux

remove global variable prach_ifft, make it local

(was a problem with multiple CCs)


git-svn-id: http://svn.eurecom.fr/openair4G/trunk@7525 818b1a75-f10b-46b9-bf7c-635c3b92a50f
parent 65b3846e
...@@ -1346,7 +1346,6 @@ int phy_init_lte_eNB(PHY_VARS_eNB *phy_vars_eNB, ...@@ -1346,7 +1346,6 @@ int phy_init_lte_eNB(PHY_VARS_eNB *phy_vars_eNB,
/* 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(frame_parms->nb_antennas_rx <= sizeof(eNB_prach_vars->rxsigF) / sizeof(eNB_prach_vars->rxsigF[0]), AssertFatal(frame_parms->nb_antennas_rx <= sizeof(eNB_prach_vars->rxsigF) / sizeof(eNB_prach_vars->rxsigF[0]),
"nb_antennas_rx too large"); "nb_antennas_rx too large");
for (i=0; i<frame_parms->nb_antennas_rx; i++) { for (i=0; i<frame_parms->nb_antennas_rx; i++) {
eNB_prach_vars->rxsigF[i] = (int16_t*)malloc16_clear( frame_parms->ofdm_symbol_size*12*2*sizeof(int16_t) ); eNB_prach_vars->rxsigF[i] = (int16_t*)malloc16_clear( frame_parms->ofdm_symbol_size*12*2*sizeof(int16_t) );
#ifdef DEBUG_PHY #ifdef DEBUG_PHY
...@@ -1354,6 +1353,15 @@ int phy_init_lte_eNB(PHY_VARS_eNB *phy_vars_eNB, ...@@ -1354,6 +1353,15 @@ int phy_init_lte_eNB(PHY_VARS_eNB *phy_vars_eNB,
#endif #endif
} }
AssertFatal(frame_parms->nb_antennas_rx <= sizeof(eNB_prach_vars->prach_ifft) / sizeof(eNB_prach_vars->prach_ifft[0]),
"nb_antennas_rx too large");
for (i=0; i<frame_parms->nb_antennas_rx; i++) {
eNB_prach_vars->prach_ifft[i] = (int16_t*)malloc16_clear(1024*2*sizeof(int16_t));
#ifdef DEBUG_PHY
msg("[openair][LTE_PHY][INIT] prach_vars->prach_ifft[%d] = %p\n",i,eNB_prach_vars->prach_ifft[i]);
#endif
}
for (UE_id=0; UE_id<NUMBER_OF_UE_MAX; UE_id++) { for (UE_id=0; UE_id<NUMBER_OF_UE_MAX; UE_id++) {
//FIXME //FIXME
......
...@@ -1002,8 +1002,6 @@ int32_t generate_prach( PHY_VARS_UE *phy_vars_ue, uint8_t eNB_id, uint8_t subfra ...@@ -1002,8 +1002,6 @@ int32_t generate_prach( PHY_VARS_UE *phy_vars_ue, uint8_t eNB_id, uint8_t subfra
__m128i mmtmpX0,mmtmpX1,mmtmpX2,mmtmpX3; __m128i mmtmpX0,mmtmpX1,mmtmpX2,mmtmpX3;
int16_t prach_ifft[4][1024*2];
void rx_prach(PHY_VARS_eNB *phy_vars_eNB,uint8_t subframe,uint16_t *preamble_energy_list, uint16_t *preamble_delay_list, uint16_t Nf, uint8_t tdd_mapindex) void rx_prach(PHY_VARS_eNB *phy_vars_eNB,uint8_t subframe,uint16_t *preamble_energy_list, uint16_t *preamble_delay_list, uint16_t Nf, uint8_t tdd_mapindex)
{ {
...@@ -1019,6 +1017,7 @@ void rx_prach(PHY_VARS_eNB *phy_vars_eNB,uint8_t subframe,uint16_t *preamble_ene ...@@ -1019,6 +1017,7 @@ void rx_prach(PHY_VARS_eNB *phy_vars_eNB,uint8_t subframe,uint16_t *preamble_ene
uint8_t n_ra_prboffset = phy_vars_eNB->lte_frame_parms.prach_config_common.prach_ConfigInfo.prach_FreqOffset; uint8_t n_ra_prboffset = phy_vars_eNB->lte_frame_parms.prach_config_common.prach_ConfigInfo.prach_FreqOffset;
int16_t *prachF = phy_vars_eNB->lte_eNB_prach_vars.prachF; int16_t *prachF = phy_vars_eNB->lte_eNB_prach_vars.prachF;
int16_t **rxsigF = phy_vars_eNB->lte_eNB_prach_vars.rxsigF; int16_t **rxsigF = phy_vars_eNB->lte_eNB_prach_vars.rxsigF;
int16_t **prach_ifft = phy_vars_eNB->lte_eNB_prach_vars.prach_ifft;
int16_t *prach[4]; int16_t *prach[4];
int16_t *prach2; int16_t *prach2;
uint8_t n_ra_prb; uint8_t n_ra_prb;
......
...@@ -1003,6 +1003,10 @@ typedef struct { ...@@ -1003,6 +1003,10 @@ typedef struct {
/// first index: rx antenna [0..3] (hard coded) \note Hard coded array size indexed by \c nb_antennas_rx. /// first index: rx antenna [0..3] (hard coded) \note Hard coded array size indexed by \c nb_antennas_rx.
/// second index: ? [0..ofdm_symbol_size*12[ /// second index: ? [0..ofdm_symbol_size*12[
int16_t *rxsigF[4]; int16_t *rxsigF[4];
/// \brief local buffer to compute prach_ifft (necessary in case of multiple CCs)
/// first index: rx antenna [0..3] (hard coded) \note Hard coded array size indexed by \c nb_antennas_rx.
/// second index: ? [0..2047] (hard coded)
int16_t *prach_ifft[4];
} LTE_eNB_PRACH; } LTE_eNB_PRACH;
typedef struct { typedef struct {
......
...@@ -3034,9 +3034,6 @@ void get_n1_pucch_eNB(PHY_VARS_eNB *phy_vars_eNB, ...@@ -3034,9 +3034,6 @@ void get_n1_pucch_eNB(PHY_VARS_eNB *phy_vars_eNB,
} }
} }
extern int16_t prach_ifft[4][1024*4];
void prach_procedures(PHY_VARS_eNB *phy_vars_eNB,uint8_t sched_subframe,uint8_t abstraction_flag) void prach_procedures(PHY_VARS_eNB *phy_vars_eNB,uint8_t sched_subframe,uint8_t abstraction_flag)
{ {
......
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