wire.h revision 10152:52c552138ba1
1/***************************************************************************** 2 * McPAT/CACTI 3 * SOFTWARE LICENSE AGREEMENT 4 * Copyright 2012 Hewlett-Packard Development Company, L.P. 5 * All Rights Reserved 6 * 7 * Redistribution and use in source and binary forms, with or without 8 * modification, are permitted provided that the following conditions are 9 * met: redistributions of source code must retain the above copyright 10 * notice, this list of conditions and the following disclaimer; 11 * redistributions in binary form must reproduce the above copyright 12 * notice, this list of conditions and the following disclaimer in the 13 * documentation and/or other materials provided with the distribution; 14 * neither the name of the copyright holders nor the names of its 15 * contributors may be used to endorse or promote products derived from 16 * this software without specific prior written permission. 17 18 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 19 * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 20 * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 21 * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 22 * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 23 * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 24 * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 25 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 26 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 27 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 28 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.” 29 * 30 ***************************************************************************/ 31 32 33 34#ifndef __WIRE_H__ 35#define __WIRE_H__ 36 37#include <iostream> 38#include <list> 39 40#include "assert.h" 41#include "basic_circuit.h" 42#include "cacti_interface.h" 43#include "component.h" 44#include "parameter.h" 45 46class Wire : public Component 47{ 48 public: 49 Wire(enum Wire_type wire_model, double len /* in u*/, 50 int nsense = 1/* no. of sense amps connected to the low-swing wire */, 51 double width_scaling = 1, 52 double spacing_scaling = 1, 53 enum Wire_placement wire_placement = outside_mat, 54 double resistivity = CU_RESISTIVITY, 55 TechnologyParameter::DeviceType *dt = &(g_tp.peri_global)); 56 ~Wire(); 57 58 Wire( double width_scaling = 1, 59 double spacing_scaling = 1, 60 enum Wire_placement wire_placement = outside_mat, 61 double resistivity = CU_RESISTIVITY, 62 TechnologyParameter::DeviceType *dt = &(g_tp.peri_global) 63 ); // should be used only once for initializing static members 64 void init_wire(); 65 66 void calculate_wire_stats(); 67 void delay_optimal_wire(); 68 double wire_cap(double len, bool call_from_outside=false); 69 double wire_res(double len); 70 void low_swing_model(); 71 double signal_fall_time(); 72 double signal_rise_time(); 73 double sense_amp_input_cap(); 74 75 enum Wire_type wt; 76 double wire_spacing; 77 double wire_width; 78 enum Wire_placement wire_placement; 79 double repeater_size; 80 double repeater_spacing; 81 double wire_length; 82 double in_rise_time, out_rise_time; 83 84 void set_in_rise_time(double rt) 85 { 86 in_rise_time = rt; 87 } 88 static Component global; 89 static Component global_5; 90 static Component global_10; 91 static Component global_20; 92 static Component global_30; 93 static Component low_swing; 94 static double wire_width_init; 95 static double wire_spacing_init; 96 void print_wire(); 97 98 private: 99 100 int nsense; // no. of sense amps connected to a low-swing wire if it 101 // is broadcasting data to multiple destinations 102 // width and spacing scaling factor can be used 103 // to model low level wires or special 104 // fat wires 105 double w_scale, s_scale; 106 double resistivity; 107 powerDef wire_model (double space, double size, double *delay); 108 list <Component> repeated_wire; 109 void update_fullswing(); 110 static int initialized; 111 112 113 //low-swing 114 Component transmitter; 115 Component l_wire; 116 Component sense_amp; 117 118 double min_w_pmos; 119 120 TechnologyParameter::DeviceType *deviceType; 121 122}; 123 124#endif 125