Commit 28b0c07d authored by Cedric Roux's avatar Cedric Roux

Merge remote-tracking branch 'origin/359-dlsim-performance-counters' into...

Merge remote-tracking branch 'origin/359-dlsim-performance-counters' into develop_integration_2018_w44
parents a7cf0cfa 97ac7809
......@@ -956,20 +956,20 @@
<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/dlsim.Rel14</main_exec>
<main_exec_args> -m5 -gF -s-1 -w1.0 -f.2 -n500 -B50 -c2 -z2 -O60
-m4 -gF -s0 -w1.0 -f.2 -n500 -B6 -c4 -z2 -O60
-m15 -gF -s6.7 -w1.0 -f.2 -n500 -B50 -c2 -z2 -O60
-m15 -gF -s6.7 -w1.0 -f.2 -n500 -B25 -c2 -z2 -O60
-m15 -gG -s1.4 -w1.0 -f.2 -n500 -B50 -c2 -z2 -O25
-m15 -gG -s1.4 -w1.0 -f.2 -n500 -B25 -c2 -z2 -O25
-m25 -gF -s17.4 -w1.0 -f.2 -n500 -B25 -c3 -z2 -O60
-m25 -gF -s17.5 -w1.0 -f.2 -n500 -B25 -c3 -z2 -r1022 -O60
-m26 -gF -s17.7 -w1.0 -f.2 -n500 -B50 -c2 -z2 -O60
-m26 -gF -s17.6 -w1.0 -f.2 -n500 -B100 -c2 -z2 -O60
-m26 -gF -s17.3 -w1.0 -f.2 -n500 -B100 -c2 -z2 -r1600 -O60
-m26 -gF -s16.6 -w1.0 -f.2 -n500 -B100 -c2 -z2 -r1899 -O60
-m14 -gF -s6.8 -w1.0 -f.2 -n500 -B50 -c2 -x2 -y2 -z2 -O60
-m13 -gF -s5.9 -w1.0 -f.2 -n500 -B25 -c3 -x2 -y2 -z2 -O60</main_exec_args>
<main_exec_args> -m=5 -g=F -s=-1= -w=1.0 -f=.2 -n=500 -B=50 -c=2 -z=2 -O=60
-m=4 -g=F -s=0 -w=1.0 -f=.2 -n=500 -B=6 -c=4 -z=2 -O=60
-m=15 -g=F -s=6.7 -w=1.0 -f=.2 -n=500 -B=50 -c=2 -z=2 -O=60
-m=15 -g=F -s=6.7 -w=1.0 -f=.2 -n=500 -B=25 -c=2 -z=2 -O=60
-m=15 -g=G -s=1.4 -w=1.0 -f=.2 -n=500 -B=50 -c=2 -z=2 -O=25
-m=15 -g=G -s=1.4 -w=1.0 -f=.2 -n=500 -B=25 -c=2 -z=2 -O=25
-m=25 -g=F -s=17.4 -w=1.0 -f=.2 -n=500 -B=25 -c=3 -z=2 -O=60
-m=25 -g=F -s=17.5 -w=1.0 -f=.2 -n=500 -B=25 -c=3 -z=2 -r=1022 -O=60
-m=26 -g=F -s=17.7 -w=1.0 -f=.2 -n=500 -B=50 -c=2 -z=2 -O=60
-m=26 -g=F -s=17.6 -w=1.0 -f=.2 -n=500 -B=100 -c=2 -z=2 -O=60
-m=26 -g=F -s=17.3 -w=1.0 -f=.2 -n=500 -B=100 -c=2 -z=2 -r=1600 -O=60
-m=26 -g=F -s=16.6 -w=1.0 -f=.2 -n=500 -B=100 -c=2 -z=2 -r=1899 -O=60
-m=14 -g=F -s=6.8 -w=1.0 -f=.2 -n=500 -B=50 -c=2 -x=2 -y=2 -z=2 -O=60
-m=13 -g=F -s=5.9 -w=1.0 -f=.2 -n=500 -B=25 -c=3 -x=2 -y=2 -z=2 -O=60</main_exec_args>
<tags>dlsim.test1 dlsim.test5 dlsim.test6 dlsim.test6b dlsim.test7 dlsim.test7b dlsim.test10 dlsim.test10b dlsim.test11 dlsim.TM2_test1 dlsim.TM2_test1b</tags>
<search_expr_true>"passed"</search_expr_true>
<search_expr_false>segmentation fault|assertion|exiting|fatal</search_expr_false>
......
......@@ -9,4 +9,5 @@ set(MU_RECIEVER False)
set(NAS_UE False)
set(MESSAGE_CHART_GENERATOR False)
set(RRC_ASN1_VERSION "Rel14")
set (UE_TIMING_TRACE True)
include(${CMAKE_CURRENT_SOURCE_DIR}/../CMakeLists.txt)
......@@ -847,6 +847,7 @@ typedef struct {
time_stats_t pdsch_procedures_stat[RX_NB_TH];
time_stats_t pdsch_procedures_per_slot_stat[RX_NB_TH][LTE_SLOTS_PER_SUBFRAME];
time_stats_t dlsch_procedures_stat[RX_NB_TH];
time_stats_t crnti_procedures_stats;
time_stats_t ofdm_demod_stats;
time_stats_t dlsch_rx_pdcch_stats;
......
......@@ -1074,12 +1074,12 @@ typedef struct PHY_VARS_eNB_s {
int hw_timing_advance;
time_stats_t phy_proc;
time_stats_t phy_proc_tx;
time_stats_t phy_proc_rx;
time_stats_t rx_prach;
time_stats_t ofdm_mod_stats;
time_stats_t dlsch_common_and_dci;
time_stats_t dlsch_encoding_stats;
time_stats_t dlsch_modulation_stats;
time_stats_t dlsch_scrambling_stats;
......
......@@ -484,6 +484,7 @@ void phy_procedures_eNB_TX(PHY_VARS_eNB *eNB,
VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME(VCD_SIGNAL_DUMPER_FUNCTIONS_PHY_PROCEDURES_ENB_TX+(eNB->CC_id),1);
if (do_meas==1) start_meas(&eNB->phy_proc_tx);
if (do_meas==1) start_meas(&eNB->dlsch_common_and_dci);
// clear the transmit data array for the current subframe
for (aa=0; aa<fp->nb_antenna_ports_eNB; aa++) {
......@@ -578,6 +579,7 @@ void phy_procedures_eNB_TX(PHY_VARS_eNB *eNB,
subframe);
}
if (do_meas==1) stop_meas(&eNB->dlsch_common_and_dci);
VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME(VCD_SIGNAL_DUMPER_FUNCTIONS_PHY_ENB_PDCCH_TX,0);
......
This diff is collapsed.
static int cmpdouble(const void *p1, const void *p2) {
return *(double *)p1 > *(double *)p2;
}
double median(varArray_t *input) {
return *(double *)((uint8_t *)(input+1)+(input->size/2)*input->atomSize);
}
double q1(varArray_t *input) {
return *(double *)((uint8_t *)(input+1)+(input->size/4)*input->atomSize);
}
double q3(varArray_t *input) {
return *(double *)((uint8_t *)(input+1)+(3*input->size/4)*input->atomSize);
}
void dumpVarArray(varArray_t *input) {
double *ptr=dataArray(input);
printf("dumping size=%ld\n", input->size);
for (int i=0; i < input->size; i++)
printf("%.1f:", *ptr++);
printf("\n");
}
void sumUpStats(time_stats_t * res, time_stats_t * src, int lastActive) {
reset_meas(res);
for (int i=0; i<RX_NB_TH; i++) {
res->diff+=src[i].diff;
res->diff_square+=src[i].diff_square;
res->trials+=src[i].trials;
if (src[i].max > res->max)
res->max=src[i].max;
}
res->p_time=src[lastActive].p_time;
}
void sumUpStatsSlot(time_stats_t *res, time_stats_t src[RX_NB_TH][2], int lastActive) {
reset_meas(res);
for (int i=0; i<RX_NB_TH; i++) {
res->diff+=src[i][0].diff+src[i][1].diff;
res->diff_square+=src[i][0].diff_square+src[i][1].diff_square;
res->trials+=src[i][0].trials+src[i][1].trials;
if (src[i][0].max > res->max)
res->max=src[i][0].max;
if (src[i][1].max > res->max)
res->max=src[i][1].max;}
int last=src[lastActive][0].in < src[lastActive][1].in? 1 : 0 ;
res->p_time=src[lastActive][last].p_time;
}
void printStatIndent(time_stats_t *ptr, char *txt) {
printf("|__ %-50s %.2f us (%d trials)\n",
txt,
ptr->trials?inMicroS(ptr->diff/ptr->trials):0,
ptr->trials);
}
void printStatIndent2(time_stats_t *ptr, char *txt, int turbo_iter) {
double timeBase=1/(1000*cpu_freq_GHz);
printf(" |__ %-45s %.2f us (cycles/block %ld, %5d trials)\n",
txt,
ptr->trials?((double)ptr->diff)/ptr->trials*timeBase:0,
turbo_iter?(uint64_t)round(((double)ptr->diff)/turbo_iter):0,
ptr->trials);
}
double squareRoot(time_stats_t *ptr) {
double timeBase=1/(1000*cpu_freq_GHz);
return sqrt((double)ptr->diff_square*pow(timeBase,2)/ptr->trials -
pow((double)ptr->diff/ptr->trials*timeBase,2));
}
void printDistribution(time_stats_t *ptr, varArray_t *sortedList, char *txt) {
double timeBase=1/(1000*cpu_freq_GHz);
printf("%-50s :%.2f us (%d trials)\n",
txt,
(double)ptr->diff/ptr->trials*timeBase,
ptr->trials);
printf("|__ Statistics std=%.2f, median=%.2f, q1=%.2f, q3=%.2f µs (on %ld trials)\n",
squareRoot(ptr), median(sortedList),q1(sortedList),q3(sortedList), sortedList->size);
}
void logDistribution(FILE* fd, time_stats_t *ptr, varArray_t *sortedList, int dropped) {
fprintf(fd,"%f;%f;%f;%f;%f;%f;%d;",
squareRoot(ptr),
(double)ptr->max, *(double*)dataArray(sortedList),
median(sortedList),q1(sortedList),q3(sortedList),
dropped);
}
struct option * parse_oai_options(paramdef_t *options) {
int l;
for(l=0; options[l].optname[0]!=0; l++) {};
struct option *long_options=calloc(sizeof(struct option),l);
for(int i=0; options[i].optname[0]!=0; i++) {
long_options[i].name=options[i].optname;
long_options[i].has_arg=options[i].paramflags==PARAMFLAG_BOOL?no_argument:required_argument;
if ( options[i].voidptr)
switch (options[i].type) {
case TYPE_INT:
*options[i].iptr=options[i].defintval;
break;
case TYPE_DOUBLE:
*options[i].dblptr=options[i].defdblval;
break;
case TYPE_UINT8:
*options[i].u8ptr=options[i].defintval;
break;
case TYPE_UINT16:
*options[i].u16ptr=options[i].defintval;
break;
default:
printf("not parsed type for default value %s\n", options[i].optname );
exit(1);
}
continue;
};
return long_options;
}
void display_options_values(paramdef_t *options, int verbose) {
for(paramdef_t * ptr=options; ptr->optname[0]!=0; ptr++) {
char varText[256]="need specific display";
if (ptr->voidptr != NULL) {
if ( (ptr->paramflags & PARAMFLAG_BOOL) )
strcpy(varText, *(bool *)ptr->iptr ? "True": "False" );
else switch (ptr->type) {
case TYPE_INT:
sprintf(varText,"%d",*ptr->iptr);
break;
case TYPE_DOUBLE:
sprintf(varText,"%.2f",*ptr->dblptr);
break;
case TYPE_UINT8:
sprintf(varText,"%d",(int)*ptr->u8ptr);
break;
case TYPE_UINT16:
sprintf(varText,"%d",(int)*ptr->u16ptr);
break;
default:
printf("not decoded type\n");
exit(1);
}
}
printf("--%-20s set to %s\n",ptr->optname, varText);
if (verbose) printf("%s\n",ptr->helpstr);
}
}
This diff is collapsed.
This diff is collapsed.
......@@ -257,9 +257,8 @@ 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 ",
LOG_D(PHY, "rxtx:%lld nfapi:%lld tx:%lld rx:%lld prach:%lld ofdm:%lld ",
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),
TICK_TO_US(eNB->rx_prach),
......
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