Commit 7260c9a9 authored by Raphael Defosseux's avatar Raphael Defosseux

Merge remote-tracking branch 'origin/fix_ulsim' into develop_integration_2018_w40

parents 1d850ee8 f7b69a7b
......@@ -990,12 +990,12 @@
<pre_exec>$OPENAIR_DIR/cmake_targets/autotests/tools/free_mem.bash</pre_exec>
<pre_exec_args></pre_exec_args>
<main_exec> $OPENAIR_DIR/targets/bin/ulsim.Rel14</main_exec>
<main_exec_args> -B25 -m5 -y1 -gN -x1 -s6 -w1.0 -e.1 -P -n500 -O70
-B25 -m16 -y1 -gN -x1 -s12 -w1.0 -e.1 -P -n500 -O70
-B50 -m5 -y1 -gN -x1 -s6 -w1.0 -e.1 -P -n500 -O70
-B50 -m16 -y1 -gN -x1 -s12 -w1.0 -e.1 -P -n500 -O70
-B100 -m5 -y1 -gN -x1 -s6 -w1.0 -e.1 -P -n500 -O70
-B100 -m16 -y1 -gN -x1 -s12 -w1.0 -e.1 -P -n500 -O70 </main_exec_args>
<main_exec_args> -BnbRBs=25 -mcs=5 -yN_rx=1 -gchannel=N -xTransmission=1 -snr=6 -wsnrInterrupt=1.0 -e_snr_step=.1 -P -nb_frame=500 -Operf=70
-BnbRBs=25 -mcs=16 -yN_rx=1 -gchannel=N -xTransmission=1 -snr=12 -wsnrInterrupt=1.0 -e_snr_step=.1 -P -nb_frame=500 -Operf=70
-BnbRBs=50 -mcs=5 -yN_rx=1 -gchannel=N -xTransmission=1 -snr=6 -wsnrInterrupt=1.0 -e_snr_step=.1 -P -nb_frame=500 -Operf=70
-BnbRBs=50 -mcs=16 -yN_rx=1 -gchannel=N -xTransmission=1 -snr=12 -wsnrInterrupt=1.0 -e_snr_step=.1 -P -nb_frame=500 -Operf=70
-BnbRBs=100 -mcs=5 -yN_rx=1 -gchannel=N -xTransmission=1 -snr=6 -wsnrInterrupt=1.0 -e_snr_step=.1 -P -nb_frame=500 -Operf=70
-BnbRBs=100 -mcs=16 -yN_rx=1 -gchannel=N -xTransmission=1 -snr=12 -wsnrInterrupt=1.0 -e_snr_step=.1 -P -nb_frame=500 -Operf=70 </main_exec_args>
<tags>ulsim.test1 ulsim.test2 ulsim.test3 ulsim.test4 ulsim.test5 ulsim.test6</tags>
<search_expr_true>"passed"</search_expr_true>
<search_expr_false>segmentation fault|assertion|exiting|fatal</search_expr_false>
......
......@@ -363,7 +363,7 @@ void *te_thread(void *param) {
exit_fun( "ERROR pthread_cond_signal" );
return(NULL);
}
/*if(opp_enabled == 1 && te_wakeup_stats0->diff_now>50*3000){
/*if(opp_enabled == 1 && te_wakeup_stats0->p_time>50*3000){
print_meas_now(te_wakeup_stats0,"coding_wakeup",stderr);
printf("te_thread0 delay for waking up in frame_rx: %d subframe_rx: %d \n",proc->frame_rx,proc->subframe_rx);
}*/
......@@ -573,7 +573,7 @@ int dlsch_encoding_2threads(PHY_VARS_eNB *eNB,
}
stop_meas(te_wait_stats);
/*if(opp_enabled == 1 && te_wait_stats->diff_now>100*3000){
/*if(opp_enabled == 1 && te_wait_stats->p_time>100*3000){
print_meas_now(te_wait_stats,"coding_wait",stderr);
printf("coding delay in wait on codition in frame_rx: %d \n",proc->frame_rx);
}*/
......
......@@ -782,7 +782,7 @@ int rx_pdsch(PHY_VARS_UE *ue,
#if DISABLE_LOG_X
printf("[AbsSFN %d.%d] Slot%d Symbol %d log2_maxh %d channel_level %d: Channel Comp %5.2f \n",frame,subframe,slot,symbol,pdsch_vars[eNB_id]->log2_maxh,proc->channel_level,ue->generic_stat_bis[ue->current_thread_id[subframe]][slot].p_time/(cpuf*1000.0));
#else
LOG_I(PHY, "[AbsSFN %d.%d] Slot%d Symbol %d log2_maxh %d channel_level %d: Channel Comp %5.2f \n",frame,subframe,slot,symbol,pdsch_vars[eNB_id]->log2_maxh,proc->channel_level,ue->generic_stat_bis[ue->current_thread_id[subframe]][slot].p_time/(cpuf*1000.0));
LOG_I(PHY, "[AbsSFN %d.%d] Slot%d Symbol %d log2_maxh %d Channel Comp %5.2f \n",frame,subframe,slot,symbol,pdsch_vars[eNB_id]->log2_maxh,ue->generic_stat_bis[ue->current_thread_id[subframe]][slot].p_time/(cpuf*1000.0));
#endif
#endif
// MRC
......
......@@ -52,8 +52,8 @@ void print_meas_now(time_stats_t *ts, const char* name, FILE* file_name){
if (ts->trials>0) {
//fprintf(file_name,"Name %25s: Processing %15.3f ms for SF %d, diff_now %15.3f \n", name,(ts->diff_now/(cpu_freq_GHz*1000000.0)),subframe,ts->diff_now);
fprintf(file_name,"%15.3f us, diff_now %15.3f \n",(ts->diff_now/(cpu_freq_GHz*1000.0)),(double)ts->diff_now);
//fprintf(file_name,"Name %25s: Processing %15.3f ms for SF %d, diff_now %15.3f \n", name,(ts->p_time/(cpu_freq_GHz*1000000.0)),subframe,ts->p_time);
fprintf(file_name,"%15.3f us, diff_now %15.3f \n",(ts->p_time/(cpu_freq_GHz*1000.0)),(double)ts->p_time);
}
}
......
......@@ -40,7 +40,6 @@ typedef struct {
long long in;
long long diff;
long long diff_now;
long long p_time; /*!< \brief absolute process duration */
long long diff_square; /*!< \brief process duration square */
long long max;
......@@ -50,7 +49,6 @@ typedef struct {
#elif defined(__arm__)
typedef struct {
uint32_t in;
uint32_t diff_now;
uint32_t diff;
uint32_t p_time; /*!< \brief absolute process duration */
uint32_t diff_square; /*!< \brief process duration square */
......@@ -116,9 +114,6 @@ static inline void stop_meas(time_stats_t *ts)
if (opp_enabled) {
long long out = rdtsc_oai();
ts->diff_now = (out-ts->in);
ts->diff_now = (out-ts->in);
ts->diff += (out-ts->in);
/// process duration is the difference between two clock points
ts->p_time = (out-ts->in);
......@@ -135,7 +130,6 @@ static inline void reset_meas(time_stats_t *ts) {
ts->trials=0;
ts->diff=0;
ts->diff_now=0;
ts->p_time=0;
ts->diff_square=0;
ts->max=0;
......
......@@ -412,7 +412,7 @@ void pdsch_procedures(PHY_VARS_eNB *eNB,
&eNB->dlsch_turbo_encoding_wakeup_stats1,
&eNB->dlsch_interleaving_stats);
stop_meas(&eNB->dlsch_encoding_stats);
if(eNB->dlsch_encoding_stats.diff_now>500*3000 && opp_enabled == 1)
if(eNB->dlsch_encoding_stats.p_time>500*3000 && opp_enabled == 1)
{
print_meas_now(&eNB->dlsch_encoding_stats,"total coding",stderr);
}
......@@ -1337,7 +1337,7 @@ void pusch_procedures(PHY_VARS_eNB *eNB,eNB_rxtx_proc_t *proc)
ret,
ulsch_harq->cqi_crc_status,
ulsch_harq->O_ACK,
eNB->ulsch_decoding_stats.diff_now, eNB->ulsch_decoding_stats.max);
eNB->ulsch_decoding_stats.p_time, eNB->ulsch_decoding_stats.max);
//compute the expected ULSCH RX power (for the stats)
ulsch_harq->delta_TF = get_hundred_times_delta_IF_eNB(eNB,i,harq_pid, 0); // 0 means bw_factor is not considered
......@@ -2084,7 +2084,4 @@ void phy_procedures_eNB_uespec_RX(PHY_VARS_eNB *eNB,eNB_rxtx_proc_t *proc)
}
VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME( VCD_SIGNAL_DUMPER_FUNCTIONS_PHY_PROCEDURES_ENB_RX_UESPEC, 0 );
stop_meas(&eNB->phy_proc_rx);
}
......@@ -156,7 +156,7 @@ static void *feptx_thread(void *param) {
exit_fun( "ERROR pthread_cond_signal" );
return NULL;
}
/*if(opp_enabled == 1 && ru->ofdm_mod_wakeup_stats.diff_now>30*3000){
/*if(opp_enabled == 1 && ru->ofdm_mod_wakeup_stats.p_time>30*3000){
print_meas_now(&ru->ofdm_mod_wakeup_stats,"fep wakeup",stderr);
printf("delay in fep wakeup in frame_tx: %d subframe_rx: %d \n",proc->frame_tx,proc->subframe_tx);
}*/
......@@ -216,7 +216,7 @@ void feptx_ofdm_2thread(RU_t *ru) {
start_meas(&ru->ofdm_mod_wait_stats);
wait_on_busy_condition(&proc->mutex_feptx,&proc->cond_feptx,&proc->instance_cnt_feptx,"feptx thread");
stop_meas(&ru->ofdm_mod_wait_stats);
/*if(opp_enabled == 1 && ru->ofdm_mod_wait_stats.diff_now>30*3000){
/*if(opp_enabled == 1 && ru->ofdm_mod_wait_stats.p_time>30*3000){
print_meas_now(&ru->ofdm_mod_wait_stats,"fep wakeup",stderr);
printf("delay in feptx wait on codition in frame_rx: %d subframe_rx: %d \n",proc->frame_tx,proc->subframe_tx);
}*/
......@@ -463,7 +463,7 @@ static void *fep_thread(void *param) {
exit_fun( "ERROR pthread_cond_signal" );
return NULL;
}
/*if(opp_enabled == 1 && ru->ofdm_demod_wakeup_stats.diff_now>30*3000){
/*if(opp_enabled == 1 && ru->ofdm_demod_wakeup_stats.p_time>30*3000){
print_meas_now(&ru->ofdm_demod_wakeup_stats,"fep wakeup",stderr);
printf("delay in fep wakeup in frame_rx: %d subframe_rx: %d \n",proc->frame_rx,proc->subframe_rx);
}*/
......@@ -578,7 +578,7 @@ void ru_fep_full_2thread(RU_t *ru) {
start_meas(&ru->ofdm_demod_wait_stats);
wait_on_busy_condition(&proc->mutex_fep,&proc->cond_fep,&proc->instance_cnt_fep,"fep thread");
stop_meas(&ru->ofdm_demod_wait_stats);
if(opp_enabled == 1 && ru->ofdm_demod_wakeup_stats.diff_now>30*3000){
if(opp_enabled == 1 && ru->ofdm_demod_wakeup_stats.p_time>30*3000){
print_meas_now(&ru->ofdm_demod_wakeup_stats,"fep wakeup",stderr);
printf("delay in fep wait on codition in frame_rx: %d subframe_rx: %d \n",proc->frame_rx,proc->subframe_rx);
}
......
This diff is collapsed.
......@@ -44,6 +44,8 @@
#include<linux/types.h>
#include<stdlib.h>
#include<sys/queue.h>
#include <string.h>
#include "UTIL/MEM/mem_block.h"
......@@ -103,4 +105,37 @@ void totable (double*, struct list*);
int compare (const void * a, const void * b);
int32_t calculate_median(struct list *loc_list);
typedef struct {
size_t size;
size_t mallocedSize;
size_t atomSize;
size_t increment;
} varArray_t;
static inline varArray_t * initVarArray(size_t increment, size_t atomSize) {
varArray_t * tmp=malloc(sizeof(varArray_t)+increment*atomSize);
tmp->size=0;
tmp->atomSize=atomSize;
tmp->mallocedSize=increment;
tmp->increment=increment;
return(tmp);
}
static inline void * dataArray(varArray_t * input) {
return input+1;
}
static inline void appendVarArray(varArray_t * input, void* data) {
if (input->size>=input->mallocedSize) {
input->mallocedSize+=input->increment;
input=realloc(input,sizeof(varArray_t)+input->mallocedSize*input->atomSize);
}
memcpy((uint8_t*)(input+1)+input->atomSize*input->size++, data, input->atomSize);
}
static inline void freeVarArray(varArray_t * input) {
free(input);
}
#endif
......@@ -258,7 +258,7 @@ static inline int rxtx(PHY_VARS_eNB *eNB,eNB_rxtx_proc_t *proc, char *thread_nam
LOG_D(PHY,"%s() Exit proc[rx:%d%d tx:%d%d]\n", __FUNCTION__, proc->frame_rx, proc->subframe_rx, proc->frame_tx, proc->subframe_tx);
LOG_D(PHY, "rxtx:%lld nfapi:%lld phy:%lld tx:%lld rx:%lld prach:%lld ofdm:%lld ",
softmodem_stats_rxtx_sf.diff_now, nfapi_meas.diff_now,
softmodem_stats_rxtx_sf.p_time, nfapi_meas.p_time,
TICK_TO_US(eNB->phy_proc),
TICK_TO_US(eNB->phy_proc_tx),
TICK_TO_US(eNB->phy_proc_rx),
......
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