summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTayler Hetherington <[email protected]>2013-04-03 11:17:41 -0800
committerAndrew Boktor <[email protected]>2014-08-14 13:50:06 -0700
commit49d9395b32cae5d5a15b932f841a0888a98d4d31 (patch)
tree3c1ad446351b23f20262075c9d7fd157df27aa46
parent63ced796dc4b66ef2e3f8ab7b768b84c11251126 (diff)
Fix incorrect initialization of wire_length variable in cacti/wire.cc - causing incorrect per-access cache energy
Adding 32bit/64bit check to Cacti's Makefile. [git-p4: depot-paths = "//depot/gpgpu_sim_research/fermi/distribution/": change = 15668]
-rw-r--r--CHANGES2
-rw-r--r--src/gpuwattch/cacti/cacti.mk13
-rw-r--r--src/gpuwattch/cacti/wire.cc11
-rw-r--r--src/gpuwattch/cacti/wire.h2
4 files changed, 15 insertions, 13 deletions
diff --git a/CHANGES b/CHANGES
index e5faaf1..d3dc9e2 100644
--- a/CHANGES
+++ b/CHANGES
@@ -74,6 +74,8 @@ Version 3.2.1 versus 3.2.0
- Fixing GPUWattch McPAT Makefile to use -m32 for 32 bit and -m64
for 64 bit Linux.
- Fix for [Bug 43] Incorrect power results - new gpuwattch_gtx480.xml file
+ - Fix incorrect initialization of wire_length variable in cacti/wire.cc.
+ Caused incorrect per-access cache energy.
Version 3.2.0 versus 3.1.2
- Added GPUWattch GPGPU power model based on McPAT 0.8beta.
diff --git a/src/gpuwattch/cacti/cacti.mk b/src/gpuwattch/cacti/cacti.mk
index ca921a5..506f3af 100644
--- a/src/gpuwattch/cacti/cacti.mk
+++ b/src/gpuwattch/cacti/cacti.mk
@@ -21,8 +21,15 @@ endif
#CXXFLAGS = -Wall -Wno-unknown-pragmas -Winline $(DBG) $(OPT)
CXXFLAGS = -Wno-unknown-pragmas $(DBG) $(OPT)
-CXX = g++ -m32
-CC = gcc -m32
+
+ifeq ($(shell getconf LONG_BIT),64)
+ CXX = g++ -m64
+ CC = gcc -m64
+else
+ CXX = g++ -m32
+ CC = gcc -m32
+endif
+
SRCS = area.cc bank.cc mat.cc main.cc Ucache.cc io.cc technology.cc basic_circuit.cc parameter.cc \
decoder.cc component.cc uca.cc subarray.cc wire.cc htree2.cc \
@@ -54,4 +61,4 @@ obj_$(TAG)/%.o : %.cc
clean:
-rm -f *.o _cacti.so cacti.py $(TARGET)
-include ../Makefile.makedepend
+#include ../Makefile.makedepend
diff --git a/src/gpuwattch/cacti/wire.cc b/src/gpuwattch/cacti/wire.cc
index 9b0f19c..79429af 100644
--- a/src/gpuwattch/cacti/wire.cc
+++ b/src/gpuwattch/cacti/wire.cc
@@ -41,17 +41,10 @@ Wire::Wire(
enum Wire_placement wp,
double _resistivity,
TechnologyParameter::DeviceType *dt
- )
+ ):wt(wire_model), wire_length(wl*1e-6), nsense(n), w_scale(w_s), s_scale(s_s),
+ resistivity(resistivity), deviceType(dt)
{
- wt= wire_model;
- wire_length=1e-6;
- nsense=n;
- w_scale=w_s;
- s_scale=s_s;
- resistivity=_resistivity;
- deviceType=dt;
-
wire_placement = wp;
min_w_pmos = deviceType->n_to_p_eff_curr_drv_ratio*g_tp.min_w_nmos_;
in_rise_time = 0;
diff --git a/src/gpuwattch/cacti/wire.h b/src/gpuwattch/cacti/wire.h
index fb82c5f..ace7c9c 100644
--- a/src/gpuwattch/cacti/wire.h
+++ b/src/gpuwattch/cacti/wire.h
@@ -45,7 +45,7 @@
class Wire : public Component
{
public:
- Wire(enum Wire_type wire_model, double len = 0 /* in u*/,
+ Wire(enum Wire_type wire_model, double len = 0/* in u*/,
int nsense = 1/* no. of sense amps connected to the low-swing wire */,
double width_scaling = 1,
double spacing_scaling = 1,