Skip to content
Snippets Groups Projects
Commit ad358dec authored by Guy De Souza's avatar Guy De Souza
Browse files

txdata malloc fix

parent e00192e8
Branches
Tags
No related merge requests found
...@@ -49,10 +49,10 @@ int nr_phy_init_RU(RU_t *ru) { ...@@ -49,10 +49,10 @@ int nr_phy_init_RU(RU_t *ru) {
for (i=0; i<ru->nb_tx; i++) { for (i=0; i<ru->nb_tx; i++) {
// Allocate 10 subframes of I/Q TX signal data (time) if not // Allocate 10 subframes of I/Q TX signal data (time) if not
ru->common.txdata[i] = (int32_t*)malloc16_clear( fp->samples_per_frame_wCP*sizeof(int32_t) ); ru->common.txdata[i] = (int32_t*)malloc16_clear( fp->samples_per_frame*sizeof(int32_t) );
LOG_I(PHY,"[INIT] common.txdata[%d] = %p (%lu bytes)\n",i,ru->common.txdata[i], LOG_I(PHY,"[INIT] common.txdata[%d] = %p (%lu bytes)\n",i,ru->common.txdata[i],
fp->samples_per_subframe_wCP*sizeof(int32_t)); fp->samples_per_subframe*sizeof(int32_t));
} }
for (i=0;i<ru->nb_rx;i++) { for (i=0;i<ru->nb_rx;i++) {
...@@ -69,7 +69,7 @@ int nr_phy_init_RU(RU_t *ru) { ...@@ -69,7 +69,7 @@ int nr_phy_init_RU(RU_t *ru) {
LOG_I(PHY,"nb_tx %d\n",ru->nb_tx); LOG_I(PHY,"nb_tx %d\n",ru->nb_tx);
ru->common.rxdata_7_5kHz = (int32_t**)malloc16(ru->nb_rx*sizeof(int32_t*) ); ru->common.rxdata_7_5kHz = (int32_t**)malloc16(ru->nb_rx*sizeof(int32_t*) );
for (i=0;i<ru->nb_rx;i++) { for (i=0;i<ru->nb_rx;i++) {
ru->common.rxdata_7_5kHz[i] = (int32_t*)malloc16_clear( 2*fp->samples_per_subframe_wCP*2*sizeof(int32_t) ); ru->common.rxdata_7_5kHz[i] = (int32_t*)malloc16_clear( 2*fp->samples_per_subframe*2*sizeof(int32_t) );
LOG_I(PHY,"rxdata_7_5kHz[%d] %p for RU %d\n",i,ru->common.rxdata_7_5kHz[i],ru->idx); LOG_I(PHY,"rxdata_7_5kHz[%d] %p for RU %d\n",i,ru->common.rxdata_7_5kHz[i],ru->idx);
} }
......
...@@ -33,7 +33,7 @@ This section deals with basic functions for OFDM Modulation. ...@@ -33,7 +33,7 @@ This section deals with basic functions for OFDM Modulation.
#include "UTIL/LOG/log.h" #include "UTIL/LOG/log.h"
#include "UTIL/LOG/vcd_signal_dumper.h" #include "UTIL/LOG/vcd_signal_dumper.h"
#define DEBUG_OFDM_MOD //#define DEBUG_OFDM_MOD
void normal_prefix_mod(int32_t *txdataF,int32_t *txdata,uint8_t nsymb,LTE_DL_FRAME_PARMS *frame_parms) void normal_prefix_mod(int32_t *txdataF,int32_t *txdata,uint8_t nsymb,LTE_DL_FRAME_PARMS *frame_parms)
......
...@@ -159,57 +159,6 @@ static void *nr_feptx_thread(void *param) { ...@@ -159,57 +159,6 @@ static void *nr_feptx_thread(void *param) {
return(NULL); return(NULL);
} }
/*
void ru_fep_full_2thread(RU_t *ru) {
RU_proc_t *proc = &ru->proc;
struct timespec wait;
LTE_DL_FRAME_PARMS *fp=&ru->frame_parms;
if ((fp->frame_type == TDD) &&
(subframe_select(fp,proc->subframe_rx) != SF_UL)) return;
if (ru->idx == 0) VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME( VCD_SIGNAL_DUMPER_FUNCTIONS_PHY_PROCEDURES_RU_FEPRX, 1 );
wait.tv_sec=0;
wait.tv_nsec=5000000L;
start_meas(&ru->ofdm_demod_stats);
if (pthread_mutex_timedlock(&proc->mutex_fep,&wait) != 0) {
printf("[RU] ERROR pthread_mutex_lock for fep thread (IC %d)\n", proc->instance_cnt_fep);
exit_fun( "error locking mutex_fep" );
return;
}
if (proc->instance_cnt_fep==0) {
printf("[RU] FEP thread busy\n");
exit_fun("FEP thread busy");
pthread_mutex_unlock( &proc->mutex_fep );
return;
}
++proc->instance_cnt_fep;
if (pthread_cond_signal(&proc->cond_fep) != 0) {
printf("[RU] ERROR pthread_cond_signal for fep thread\n");
exit_fun( "ERROR pthread_cond_signal" );
return;
}
pthread_mutex_unlock( &proc->mutex_fep );
// call second slot in this symbol
fep0(ru,1);
wait_on_busy_condition(&proc->mutex_fep,&proc->cond_fep,&proc->instance_cnt_fep,"fep thread");
stop_meas(&ru->ofdm_demod_stats);
}*/
void nr_init_feptx_thread(RU_t *ru,pthread_attr_t *attr_feptx) { void nr_init_feptx_thread(RU_t *ru,pthread_attr_t *attr_feptx) {
RU_proc_t *proc = &ru->proc; RU_proc_t *proc = &ru->proc;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment