memory allocation for calibration coefficients and dlsch ue spec bf weight
This commit is contained in:
@@ -123,7 +123,8 @@ LTE_eNB_DLSCH_t *new_eNB_dlsch(unsigned char Kmimo,unsigned char Mdlharq,uint32_
|
|||||||
{
|
{
|
||||||
|
|
||||||
LTE_eNB_DLSCH_t *dlsch;
|
LTE_eNB_DLSCH_t *dlsch;
|
||||||
unsigned char exit_flag = 0,i,j,r,aa;
|
unsigned char exit_flag = 0,i,j,r,aa,layer;
|
||||||
|
int re;
|
||||||
unsigned char bw_scaling =1;
|
unsigned char bw_scaling =1;
|
||||||
uint8_t nb_antennas_tx = frame_parms->nb_antennas_tx;
|
uint8_t nb_antennas_tx = frame_parms->nb_antennas_tx;
|
||||||
|
|
||||||
@@ -154,6 +155,23 @@ LTE_eNB_DLSCH_t *new_eNB_dlsch(unsigned char Kmimo,unsigned char Mdlharq,uint32_
|
|||||||
dlsch->Mlimit = 4;
|
dlsch->Mlimit = 4;
|
||||||
dlsch->Nsoft = Nsoft;
|
dlsch->Nsoft = Nsoft;
|
||||||
|
|
||||||
|
for (layer=0; layer<4; layer++) {
|
||||||
|
dlsch->ue_spec_bf_weights[layer] = (int32_t**)malloc16(frame_parms->nb_antennas_tx*sizeof(int32_t*));
|
||||||
|
|
||||||
|
for (aa=0; aa<frame_parms->nb_antennas_tx; aa++) {
|
||||||
|
dlsch->ue_spec_bf_weights[layer][aa] = (int32_t *)malloc16(OFDM_SYMBOL_SIZE_COMPLEX_SAMPLES*sizeof(int32_t));
|
||||||
|
for (re=0;re<OFDM_SYMBOL_SIZE_COMPLEX_SAMPLES; re++) {
|
||||||
|
dlsch->ue_spec_bf_weights[layer][aa][re] = 0x00007fff;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
dlsch->calib_dl_ch_estimates = (int32_t**)malloc16(frame_parms->nb_antennas_tx*sizeof(int32_t*));
|
||||||
|
for (aa=0; aa<frame_parms->nb_antennas_tx; aa++) {
|
||||||
|
dlsch->calib_dl_ch_estimates[aa] = (int32_t *)malloc16(OFDM_SYMBOL_SIZE_COMPLEX_SAMPLES*sizeof(int32_t));
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
for (i=0; i<10; i++)
|
for (i=0; i<10; i++)
|
||||||
dlsch->harq_ids[i] = Mdlharq;
|
dlsch->harq_ids[i] = Mdlharq;
|
||||||
|
|
||||||
|
|||||||
@@ -934,13 +934,10 @@ int main(int argc, char **argv)
|
|||||||
} else {
|
} else {
|
||||||
// this initilisation may should be moved to another place
|
// this initilisation may should be moved to another place
|
||||||
for (j=0; j<4; j++) {
|
for (j=0; j<4; j++) {
|
||||||
PHY_vars_eNB->dlsch_eNB[k][i]->ue_spec_bf_weights[j] = (int32_t **)malloc16(n_tx_phy*sizeof(int32_t*));
|
|
||||||
|
|
||||||
for (aa=0; aa<n_tx_phy; aa++) {
|
for (aa=0; aa<n_tx_phy; aa++) {
|
||||||
PHY_vars_eNB->dlsch_eNB[k][i]->ue_spec_bf_weights[j][aa] = (int32_t *)malloc16(OFDM_SYMBOL_SIZE_COMPLEX_SAMPLES*sizeof(int32_t));
|
|
||||||
ue_spec_bf_weights = PHY_vars_eNB->dlsch_eNB[k][i]->ue_spec_bf_weights[j][aa];
|
ue_spec_bf_weights = PHY_vars_eNB->dlsch_eNB[k][i]->ue_spec_bf_weights[j][aa];
|
||||||
|
|
||||||
for (re=0;re<frame_parms->ofdm_symbol_size;re++) {
|
for (re=0;re<OFDM_SYMBOL_SIZE_COMPLEX_SAMPLES;re++) {
|
||||||
if (n_tx_phy==1 || n_tx_phy==2)
|
if (n_tx_phy==1 || n_tx_phy==2)
|
||||||
ue_spec_bf_weights[re] = 0x00007fff;
|
ue_spec_bf_weights[re] = 0x00007fff;
|
||||||
else if (n_tx_phy==4 || n_tx_phy==8)
|
else if (n_tx_phy==4 || n_tx_phy==8)
|
||||||
|
|||||||
@@ -79,18 +79,6 @@ PHY_VARS_eNB* init_lte_eNB(LTE_DL_FRAME_PARMS *frame_parms,
|
|||||||
} else {
|
} else {
|
||||||
LOG_D(PHY,"dlsch_eNB[%d][%d] => %p\n",i,j,PHY_vars_eNB->dlsch_eNB[i][j]);
|
LOG_D(PHY,"dlsch_eNB[%d][%d] => %p\n",i,j,PHY_vars_eNB->dlsch_eNB[i][j]);
|
||||||
PHY_vars_eNB->dlsch_eNB[i][j]->rnti=0;
|
PHY_vars_eNB->dlsch_eNB[i][j]->rnti=0;
|
||||||
|
|
||||||
for (layer=0; layer<4; layer++) {
|
|
||||||
PHY_vars_eNB->dlsch_eNB[i][j]->ue_spec_bf_weights[layer] = (int32_t **)malloc16(frame_parms->nb_antennas_tx*sizeof(int32_t*));
|
|
||||||
|
|
||||||
for (aa=0; aa<frame_parms->nb_antennas_tx; aa++) {
|
|
||||||
PHY_vars_eNB->dlsch_eNB[i][j]->ue_spec_bf_weights[layer][aa] = (int32_t *)malloc16(OFDM_SYMBOL_SIZE_COMPLEX_SAMPLES*sizeof(int32_t));
|
|
||||||
for (re=0;re<OFDM_SYMBOL_SIZE_COMPLEX_SAMPLES; re++) {
|
|
||||||
PHY_vars_eNB->dlsch_eNB[i][j]->ue_spec_bf_weights[layer][aa][re] = 0x00007fff;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user