fixing asan leaks after merge
This commit is contained in:
@@ -165,9 +165,10 @@ void phy_init_nr_ue_PUSCH(NR_UE_PUSCH *const pusch,
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void phy_term_nr_ue_PUSCH(NR_UE_PUSCH *pusch)
|
void phy_term_nr_ue_PUSCH(NR_UE_PUSCH *pusch,
|
||||||
|
const NR_DL_FRAME_PARMS* fp)
|
||||||
{
|
{
|
||||||
for (int i = 0; i < NR_MAX_NB_LAYERS; i++)
|
for (int i = 0; i < fp->nb_antennas_tx; i++)
|
||||||
free_and_zero(pusch->txdataF_layers[i]);
|
free_and_zero(pusch->txdataF_layers[i]);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -513,7 +514,7 @@ void term_nr_ue_signal(PHY_VARS_NR_UE *ue, int nb_connected_gNB)
|
|||||||
|
|
||||||
for (int th_id = 0; th_id < RX_NB_TH_MAX; th_id++) {
|
for (int th_id = 0; th_id < RX_NB_TH_MAX; th_id++) {
|
||||||
for (int gNB_id = 0; gNB_id < ue->n_connected_gNB; gNB_id++) {
|
for (int gNB_id = 0; gNB_id < ue->n_connected_gNB; gNB_id++) {
|
||||||
phy_term_nr_ue_PUSCH(ue->pusch_vars[th_id][gNB_id]);
|
phy_term_nr_ue_PUSCH(ue->pusch_vars[th_id][gNB_id],fp);
|
||||||
free_and_zero(ue->pusch_vars[th_id][gNB_id]);
|
free_and_zero(ue->pusch_vars[th_id][gNB_id]);
|
||||||
free_and_zero(ue->pucch_vars[th_id][gNB_id]);
|
free_and_zero(ue->pucch_vars[th_id][gNB_id]);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -98,7 +98,7 @@ void nr_generate_pdsch(processingData_L1tx_t *msgTx,
|
|||||||
uint16_t nb_re = ((12*rel15->NrOfSymbols)-nb_re_dmrs*dmrs_len-xOverhead)*rel15->rbSize*rel15->nrOfLayers;
|
uint16_t nb_re = ((12*rel15->NrOfSymbols)-nb_re_dmrs*dmrs_len-xOverhead)*rel15->rbSize*rel15->nrOfLayers;
|
||||||
uint8_t Qm = rel15->qamModOrder[0];
|
uint8_t Qm = rel15->qamModOrder[0];
|
||||||
uint32_t encoded_length = nb_re*Qm;
|
uint32_t encoded_length = nb_re*Qm;
|
||||||
uint32_t scrambled_output[rel15->NrOfCodewords][encoded_length>>5];
|
uint32_t scrambled_output[rel15->NrOfCodewords][(encoded_length>>5)+1];
|
||||||
int16_t mod_dmrs[n_dmrs<<1] __attribute__ ((aligned(16)));
|
int16_t mod_dmrs[n_dmrs<<1] __attribute__ ((aligned(16)));
|
||||||
|
|
||||||
/* PTRS */
|
/* PTRS */
|
||||||
@@ -120,8 +120,8 @@ void nr_generate_pdsch(processingData_L1tx_t *msgTx,
|
|||||||
|
|
||||||
/// CRC, coding, interleaving and rate matching
|
/// CRC, coding, interleaving and rate matching
|
||||||
AssertFatal(harq->pdu!=NULL,"harq->pdu is null\n");
|
AssertFatal(harq->pdu!=NULL,"harq->pdu is null\n");
|
||||||
unsigned char output[rel15->rbSize * NR_SYMBOLS_PER_SLOT * NR_NB_SC_PER_RB * 8 * rel15->nrOfLayers] __attribute__((aligned(32)));
|
unsigned char output[rel15->rbSize * NR_SYMBOLS_PER_SLOT * NR_NB_SC_PER_RB * Qm * rel15->nrOfLayers] __attribute__((aligned(32)));
|
||||||
bzero(output,rel15->rbSize * NR_SYMBOLS_PER_SLOT * NR_NB_SC_PER_RB * 8 * rel15->nrOfLayers);
|
bzero(output,rel15->rbSize * NR_SYMBOLS_PER_SLOT * NR_NB_SC_PER_RB * Qm * rel15->nrOfLayers);
|
||||||
start_meas(dlsch_encoding_stats);
|
start_meas(dlsch_encoding_stats);
|
||||||
|
|
||||||
if (nr_dlsch_encoding(gNB,
|
if (nr_dlsch_encoding(gNB,
|
||||||
@@ -146,20 +146,18 @@ void nr_generate_pdsch(processingData_L1tx_t *msgTx,
|
|||||||
}
|
}
|
||||||
printf("\n");
|
printf("\n");
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
/// scrambling
|
/// scrambling
|
||||||
start_meas(dlsch_scrambling_stats);
|
start_meas(dlsch_scrambling_stats);
|
||||||
for (int q=0; q<rel15->NrOfCodewords; q++)
|
for (int q=0; q<rel15->NrOfCodewords; q++) {
|
||||||
memset((void*)scrambled_output[q], 0, (encoded_length>>5)*sizeof(uint32_t));
|
memset((void*)scrambled_output[q], 0, ((encoded_length>>5)+1)*sizeof(uint32_t));
|
||||||
for (int q=0; q<rel15->NrOfCodewords; q++)
|
|
||||||
nr_pdsch_codeword_scrambling(output,
|
nr_pdsch_codeword_scrambling(output,
|
||||||
encoded_length,
|
encoded_length,
|
||||||
q,
|
q,
|
||||||
rel15->dataScramblingId,
|
rel15->dataScramblingId,
|
||||||
rel15->rnti,
|
rel15->rnti,
|
||||||
scrambled_output[q]);
|
scrambled_output[q]);
|
||||||
|
}
|
||||||
|
|
||||||
stop_meas(dlsch_scrambling_stats);
|
stop_meas(dlsch_scrambling_stats);
|
||||||
#ifdef DEBUG_DLSCH
|
#ifdef DEBUG_DLSCH
|
||||||
|
|||||||
@@ -83,7 +83,7 @@ void free_gNB_dlsch(NR_gNB_DLSCH_t **dlschptr,
|
|||||||
for (int q=0; q<nb_codewords; q++)
|
for (int q=0; q<nb_codewords; q++)
|
||||||
free(dlsch->mod_symbs[q]);
|
free(dlsch->mod_symbs[q]);
|
||||||
|
|
||||||
for (int layer = 0; layer < NR_MAX_NB_LAYERS; layer++) {
|
for (int layer = 0; layer < max_layers; layer++) {
|
||||||
free(dlsch->txdataF[layer]);
|
free(dlsch->txdataF[layer]);
|
||||||
for (int aa = 0; aa < 64; aa++)
|
for (int aa = 0; aa < 64; aa++)
|
||||||
free(dlsch->ue_spec_bf_weights[layer][aa]);
|
free(dlsch->ue_spec_bf_weights[layer][aa]);
|
||||||
|
|||||||
@@ -40,7 +40,7 @@ void nr_codeword_scrambling(uint8_t *in,
|
|||||||
__m256i c = ((__m256i*)in)[i];
|
__m256i c = ((__m256i*)in)[i];
|
||||||
uint32_t in32 = _mm256_movemask_epi8(_mm256_slli_epi16(c,7));
|
uint32_t in32 = _mm256_movemask_epi8(_mm256_slli_epi16(c,7));
|
||||||
out[i]=(in32^s);
|
out[i]=(in32^s);
|
||||||
//printf("in[%d] %x => %x\n",i,in32,out[i]);
|
LOG_D(PHY,"in[%d] %x => %x\n",i,in32,out[i]);
|
||||||
s=lte_gold_generic(&x1, &x2, 0);
|
s=lte_gold_generic(&x1, &x2, 0);
|
||||||
}
|
}
|
||||||
#elif defined(__SSE4__)
|
#elif defined(__SSE4__)
|
||||||
|
|||||||
Reference in New Issue
Block a user