00001 /***************************************************************************** 00002 * McPAT 00003 * SOFTWARE LICENSE AGREEMENT 00004 * Copyright 2009 Hewlett-Packard Development Company, L.P. 00005 * All Rights Reserved 00006 * 00007 * Permission to use, copy, and modify this software and its documentation is 00008 * hereby granted only under the following terms and conditions. Both the 00009 * above copyright notice and this permission notice must appear in all copies 00010 * of the software, derivative works or modified versions, and any portions 00011 * thereof, and both notices must appear in supporting documentation. 00012 * 00013 * Any User of the software ("User"), by accessing and using it, agrees to the 00014 * terms and conditions set forth herein, and hereby grants back to Hewlett- 00015 * Packard Development Company, L.P. and its affiliated companies ("HP") a 00016 * non-exclusive, unrestricted, royalty-free right and license to copy, 00017 * modify, distribute copies, create derivate works and publicly display and 00018 * use, any changes, modifications, enhancements or extensions made to the 00019 * software by User, including but not limited to those affording 00020 * compatibility with other hardware or software, but excluding pre-existing 00021 * software applications that may incorporate the software. User further 00022 * agrees to use its best efforts to inform HP of any such changes, 00023 * modifications, enhancements or extensions. 00024 * 00025 * Correspondence should be provided to HP at: 00026 * 00027 * Director of Intellectual Property Licensing 00028 * Office of Strategy and Technology 00029 * Hewlett-Packard Company 00030 * 1501 Page Mill Road 00031 * Palo Alto, California 94304 00032 * 00033 * The software may be further distributed by User (but not offered for 00034 * sale or transferred for compensation) to third parties, under the 00035 * condition that such third parties agree to abide by the terms and 00036 * conditions of this license. 00037 * 00038 * THE SOFTWARE IS PROVIDED "AS IS" WITH ANY AND ALL ERRORS AND DEFECTS 00039 * AND USER ACKNOWLEDGES THAT THE SOFTWARE MAY CONTAIN ERRORS AND DEFECTS. 00040 * HP DISCLAIMS ALL WARRANTIES WITH REGARD TO THE SOFTWARE, INCLUDING ALL 00041 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL 00042 * HP BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES 00043 * OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, 00044 * WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER ACTION, ARISING 00045 * OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THE SOFTWARE. 00046 * 00047 ***************************************************************************/ 00048 00049 #ifndef __WIRE_H__ 00050 #define __WIRE_H__ 00051 00052 #include "basic_circuit.h" 00053 #include "McPATcomponent.h" 00054 #include "parameter.h" 00055 #include "assert.h" 00056 #include "cacti_interface.h" 00057 #include <iostream> 00058 #include <list> 00059 00060 class Wire : public McPATComponent 00061 { 00062 public: 00063 Wire(enum Wire_type wire_model, double len /* in u*/, 00064 int nsense = 1/* no. of sense amps connected to the low-swing wire */, 00065 double width_scaling = 1, 00066 double spacing_scaling = 1, 00067 enum Wire_placement wire_placement = outside_mat, 00068 double resistivity = CU_RESISTIVITY, 00069 TechnologyParameter::DeviceType *dt = &(g_tp.peri_global)); 00070 ~Wire(); 00071 00072 Wire( double width_scaling = 1, 00073 double spacing_scaling = 1, 00074 enum Wire_placement wire_placement = outside_mat, 00075 double resistivity = CU_RESISTIVITY, 00076 TechnologyParameter::DeviceType *dt = &(g_tp.peri_global) 00077 ); // should be used only once for initializing static members 00078 void init_wire(); 00079 00080 void calculate_wire_stats(); 00081 void delay_optimal_wire(); 00082 double wire_cap(double len); 00083 double wire_res(double len); 00084 void low_swing_model(); 00085 double signal_fall_time(); 00086 double signal_rise_time(); 00087 double sense_amp_input_cap(); 00088 00089 enum Wire_type wt; 00090 double wire_spacing; 00091 double wire_width; 00092 enum Wire_placement wire_placement; 00093 double repeater_size; 00094 double repeater_spacing; 00095 double wire_length; 00096 double in_rise_time, out_rise_time; 00097 00098 void set_in_rise_time(double rt) 00099 { 00100 in_rise_time = rt; 00101 } 00102 static McPATComponent global; 00103 static McPATComponent global_5; 00104 static McPATComponent global_10; 00105 static McPATComponent global_20; 00106 static McPATComponent global_30; 00107 void print_wire(); 00108 00109 private: 00110 00111 int nsense; // no. of sense amps connected to a low-swing wire if it 00112 // is broadcasting data to multiple destinations 00113 // width and spacing scaling factor can be used 00114 // to model low level wires or special 00115 // fat wires 00116 double w_scale, s_scale; 00117 double resistivity; 00118 powerDef wire_model (double space, double size, double *delay); 00119 list <McPATComponent> repeated_wire; 00120 void update_fullswing(); 00121 00122 00123 //low-swing 00124 McPATComponent transmitter; 00125 McPATComponent l_wire; 00126 McPATComponent sense_amp; 00127 00128 double min_w_pmos; 00129 00130 TechnologyParameter::DeviceType *deviceType; 00131 00132 }; 00133 00134 #endif