diff --git a/cacti/cacti_interface.cc b/cacti/cacti_interface.cc index a337c8a..fae6caf 100644 --- a/cacti/cacti_interface.cc +++ b/cacti/cacti_interface.cc @@ -163,6 +163,7 @@ uca_org_t :: uca_org_t() data_array2(0), uca_pg_reference(0) { + memset((void *)this, 0, sizeof(uca_org_t)); uca_q = vector(0); } diff --git a/cacti/cacti_interface.h b/cacti/cacti_interface.h index b2b8c4c..c125625 100644 --- a/cacti/cacti_interface.h +++ b/cacti/cacti_interface.h @@ -578,6 +578,7 @@ uca_org_t cacti_interface( class mem_array { public: + mem_array() { memset((void *)this, 0, sizeof(mem_array)); } int Ndcm; int Ndwl; int Ndbl; diff --git a/cacti/io.cc b/cacti/io.cc index cb40e82..9fb4543 100644 --- a/cacti/io.cc +++ b/cacti/io.cc @@ -45,6 +45,7 @@ #include "crossbar.h" #include "arbiter.h" #include "version_cacti.h" +#include //#include "highradix.h" using namespace std; @@ -61,6 +62,9 @@ InputParameter::InputParameter() cl_vertical (true), long_channel_device(false) { + memset((void *)this, 0, sizeof(InputParameter)); + perfloss = 0.01; + cl_vertical = true; dvs_voltage = std::vector(0); } @@ -3402,7 +3406,12 @@ uca_org_t cacti_interface(InputParameter * const local_interface) init_tech_params(g_ip->F_sz_um, false); Wire winit; // Do not delete this line. It initializes wires. + cache_key_t key; + cache_key(&key, g_ip); + if (!cache_get(&key, &fin_res)) { solve(&fin_res); + cache_set(&key, &fin_res); + } if (!g_ip->dvs_voltage.empty()) {