From 49d9395b32cae5d5a15b932f841a0888a98d4d31 Mon Sep 17 00:00:00 2001 From: Tayler Hetherington Date: Wed, 3 Apr 2013 11:17:41 -0800 Subject: 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] --- src/gpuwattch/cacti/cacti.mk | 13 ++++++++++--- src/gpuwattch/cacti/wire.cc | 11 ++--------- src/gpuwattch/cacti/wire.h | 2 +- 3 files changed, 13 insertions(+), 13 deletions(-) (limited to 'src/gpuwattch') 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, -- cgit v1.3