From 47da01aae42b390317e9deb7c065f8710ca51e8d Mon Sep 17 00:00:00 2001 From: "Andrew M. B. Boktor" Date: Thu, 19 Apr 2012 14:38:19 -0800 Subject: Changing the configs to be backward compatible by disabling bank groups by default if its configurations are not present [git-p4: depot-paths = "//depot/gpgpu_sim_research/fermi/distribution/": change = 12033] --- src/gpgpu-sim/gpu-sim.h | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (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 fe66d04..208cfb8 100644 --- a/src/gpgpu-sim/gpu-sim.h +++ b/src/gpgpu-sim/gpu-sim.h @@ -71,15 +71,20 @@ struct memory_config { } void init() { + //Disabling bank groups if their values are not specified + nbkgrp = 1; + tCCDL = 0; + tRTPL = 0; assert(gpgpu_dram_timing_opt); sscanf(gpgpu_dram_timing_opt,"%d:%d:%d:%d:%d:%d:%d:%d:%d:%d:%d:%d:%d:%d", - &nbk,&nbkgrp,&tCCD,&tCCDL,&tRRD,&tRCD,&tRAS,&tRP,&tRTPL,&tRC,&CL,&WL,&tCDLR,&tWR); + &nbk,&tCCD,&tRRD,&tRCD,&tRAS,&tRP,&tRC,&CL,&WL,&tCDLR,&tWR,&nbkgrp,&tCCDL,&tRTPL); 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/2)+2-WL); tWTR = (WL+(BL/2)+tCDLR); -- cgit v1.3