summaryrefslogtreecommitdiff
path: root/src/gpuwattch/cacti/basic_circuit.cc
diff options
context:
space:
mode:
Diffstat (limited to 'src/gpuwattch/cacti/basic_circuit.cc')
-rw-r--r--src/gpuwattch/cacti/basic_circuit.cc43
1 files changed, 2 insertions, 41 deletions
diff --git a/src/gpuwattch/cacti/basic_circuit.cc b/src/gpuwattch/cacti/basic_circuit.cc
index 9aeb4e7..a8ea501 100644
--- a/src/gpuwattch/cacti/basic_circuit.cc
+++ b/src/gpuwattch/cacti/basic_circuit.cc
@@ -736,7 +736,7 @@ double shortcircuit_simple(
double vdd)
{
- double p_short_circuit, p_short_circuit_discharge, p_short_circuit_charge, p_short_circuit_discharge_low, p_short_circuit_discharge_high, p_short_circuit_charge_low, p_short_circuit_charge_high; //this is actually energy
+ double p_short_circuit, p_short_circuit_discharge, p_short_circuit_charge, p_short_circuit_discharge_low, p_short_circuit_charge_low;//this is actually energy
double fo_n, fo_p, fanout, beta_ratio, vt_to_vdd_ratio;
fo_n = i_on_n/i_on_n_in;
@@ -755,8 +755,6 @@ double shortcircuit_simple(
// t4=t1/t2/t3;
// cout <<t1<<"t1\n"<<t2<<"t2\n"<<t3<<"t3\n"<<t4<<"t4\n"<<fanout<<endl;
- p_short_circuit_discharge_high = pow(((vdd-vt)-vt_to_vdd_ratio),1.5)*c_in*vdd*vdd*fo_p/10/pow(2, 3*vt_to_vdd_ratio+2*velocity_index);
- p_short_circuit_charge_high = pow(((vdd-vt)-vt_to_vdd_ratio),1.5)*c_in*vdd*vdd*fo_n/10/pow(2, 3*vt_to_vdd_ratio+2*velocity_index);
// t1=pow(((vdd-vt)-vt_to_vdd_ratio),1.5);
// t2=pow(2, 3*vt_to_vdd_ratio+2*velocity_index);
@@ -786,43 +784,6 @@ double shortcircuit(
double vdd)
{
- double p_short_circuit=0, p_short_circuit_discharge;//, p_short_circuit_charge, p_short_circuit_discharge_low, p_short_circuit_discharge_high, p_short_circuit_charge_low, p_short_circuit_charge_high; //this is actually energy
- double fo_n, fo_p, fanout, beta_ratio, vt_to_vdd_ratio;
- double f_alpha, k_v, e, g_v_alpha, h_v_alpha;
-
- fo_n = i_on_n/i_on_n_in;
- fo_p = i_on_p/i_on_p_in;
- fanout = 1;
- beta_ratio = i_on_p/i_on_n;
- vt_to_vdd_ratio = vt/vdd;
- e = 2.71828;
- f_alpha = 1/(velocity_index+2) -velocity_index/(2*(velocity_index+3)) +velocity_index/(velocity_index+4)*(velocity_index/2-1);
- k_v = 0.9/0.8+(vdd-vt)/0.8*log(10*(vdd-vt)/e);
- g_v_alpha = (velocity_index + 1)*pow((1-velocity_index),velocity_index)*pow((1-velocity_index),velocity_index/2)/f_alpha/pow((1-velocity_index-velocity_index),(velocity_index/2+velocity_index+2));
- h_v_alpha = pow(2, velocity_index)*(velocity_index+1)*pow((1-velocity_index),velocity_index)/pow((1-velocity_index-velocity_index),(velocity_index+1));
-
- //p_short_circuit_discharge_low = 10/3*(pow(0.5-vt_to_vdd_ratio,3.0)/pow(velocity_index,2.0)/pow(2.0,3*vt_to_vdd_ratio*vt_to_vdd_ratio))*c_in*vdd*vdd*fo_p*fo_p/fanout/beta_ratio;
-// p_short_circuit_discharge_low = 10/3*(pow(((vdd-vt)-vt_to_vdd_ratio),3.0)/pow(velocity_index,2.0)/pow(2.0,3*vt_to_vdd_ratio*vt_to_vdd_ratio))*c_in*vdd*vdd*fo_p*fo_p/fanout/beta_ratio;
-// p_short_circuit_charge_low = 10/3*(pow(((vdd-vt)-vt_to_vdd_ratio),3.0)/pow(velocity_index,2.0)/pow(2.0,3*vt_to_vdd_ratio*vt_to_vdd_ratio))*c_in*vdd*vdd*fo_n*fo_n/fanout*beta_ratio;
-// double t1, t2, t3, t4, t5;
-// t1=pow(((vdd-vt)-vt_to_vdd_ratio),3);
-// t2=pow(velocity_index,2.0);
-// t3=pow(2.0,3*vt_to_vdd_ratio*vt_to_vdd_ratio);
-// t4=t1/t2/t3;
-//
-// cout <<t1<<"t1\n"<<t2<<"t2\n"<<t3<<"t3\n"<<t4<<"t4\n"<<fanout<<endl;
-//
-//
-// p_short_circuit_discharge_high = pow(((vdd-vt)-vt_to_vdd_ratio),1.5)*c_in*vdd*vdd*fo_p/10/pow(2, 3*vt_to_vdd_ratio+2*velocity_index);
-// p_short_circuit_charge_high = pow(((vdd-vt)-vt_to_vdd_ratio),1.5)*c_in*vdd*vdd*fo_n/10/pow(2, 3*vt_to_vdd_ratio+2*velocity_index);
-//
-// p_short_circuit_discharge = 1.0/(1.0/p_short_circuit_discharge_low + 1.0/p_short_circuit_discharge_high);
-// p_short_circuit_charge = 1/(1/p_short_circuit_charge_low + 1/p_short_circuit_charge_high);
-//
-// p_short_circuit = (p_short_circuit_discharge + p_short_circuit_charge)/2;
-//
-// p_short_circuit = p_short_circuit_discharge;
-
- p_short_circuit_discharge = k_v*vdd*vdd*c_in*fo_p*fo_p/((vdd-vt)*g_v_alpha*fanout*beta_ratio/2/k_v + h_v_alpha*fo_p);
+ double p_short_circuit=0;
return (p_short_circuit);
}