From bcbfad7e45fd0dc4a48f8f8beee03aa4fd8f201a Mon Sep 17 00:00:00 2001 From: Ahmed El-Shafiey Date: Sun, 9 Dec 2012 19:48:05 -0800 Subject: Merging //depot/gpgpu_sim_research/fermi_power/... to //depot/gpgpu_sim_research/fermi/... [git-p4: depot-paths = "//depot/gpgpu_sim_research/fermi/distribution/": change = 14777] --- src/gpgpu-sim/gpu-sim.h | 67 +++++++++++++++++++++++-------------------------- 1 file changed, 32 insertions(+), 35 deletions(-) (limited to 'src/gpgpu-sim/gpu-sim.h') diff --git a/src/gpgpu-sim/gpu-sim.h b/src/gpgpu-sim/gpu-sim.h index 98f719f..7fad76d 100644 --- a/src/gpgpu-sim/gpu-sim.h +++ b/src/gpgpu-sim/gpu-sim.h @@ -80,35 +80,32 @@ struct power_config { void init() { - if (!g_power_simulation_enabled) - return; - - // initialize file name if it is not set - time_t curr_time; - time(&curr_time); - char *date = ctime(&curr_time); - char *s = date; - while (*s) { - if (*s == ' ' || *s == '\t' || *s == ':') *s = '-'; - if (*s == '\n' || *s == '\r' ) *s = 0; - s++; - } - char buf1[1024]; - snprintf(buf1,1024,"gpgpusim_power_report__%s.log",date); - g_power_filename = strdup(buf1); - char buf2[1024]; - snprintf(buf2,1024,"gpgpusim_power_trace_report__%s.log.gz",date); - g_power_trace_filename = strdup(buf2); - char buf3[1024]; - snprintf(buf3,1024,"gpgpusim_metric_trace_report__%s.log.gz",date); - g_metric_trace_filename = strdup(buf3); - char buf4[1024]; - snprintf(buf4,1024,"gpgpusim_steady_state_tracking_report__%s.log.gz",date); - g_steady_state_tracking_filename = strdup(buf4); - - if(g_steady_power_levels_enabled){ - sscanf(gpu_steady_state_definition,"%lf:%lf", &gpu_steady_power_deviation,&gpu_steady_min_period); - } + // initialize file name if it is not set + time_t curr_time; + time(&curr_time); + char *date = ctime(&curr_time); + char *s = date; + while (*s) { + if (*s == ' ' || *s == '\t' || *s == ':') *s = '-'; + if (*s == '\n' || *s == '\r' ) *s = 0; + s++; + } + char buf1[1024]; + snprintf(buf1,1024,"gpgpusim_power_report__%s.log",date); + g_power_filename = strdup(buf1); + char buf2[1024]; + snprintf(buf2,1024,"gpgpusim_power_trace_report__%s.log.gz",date); + g_power_trace_filename = strdup(buf2); + char buf3[1024]; + snprintf(buf3,1024,"gpgpusim_metric_trace_report__%s.log.gz",date); + g_metric_trace_filename = strdup(buf3); + char buf4[1024]; + snprintf(buf4,1024,"gpgpusim_steady_state_tracking_report__%s.log.gz",date); + g_steady_state_tracking_filename = strdup(buf4); + + if(g_steady_power_levels_enabled){ + sscanf(gpu_steady_state_definition,"%lf:%lf", &gpu_steady_power_deviation,&gpu_steady_min_period); + } //NOTE: After changing the nonlinear model to only scaling idle core, //NOTE: The min_inc_per_active_sm is not used any more @@ -192,12 +189,12 @@ struct memory_config { option_parser_destroy(dram_opp); } - int nbkt = nbk/nbkgrp; - unsigned i; - for (i=0; nbkt>0; i++) { - nbkt = nbkt>>1; - } - bk_tag_length = i; + int nbkt = nbk/nbkgrp; + unsigned i; + for (i=0; nbkt>0; i++) { + nbkt = nbkt>>1; + } + bk_tag_length = i; assert(nbkgrp>0 && "Number of bank groups cannot be zero"); tRCDWR = tRCD-(WL+1); tRTW = (CL+(BL/data_command_freq_ratio)+2-WL); -- cgit v1.3