wire.h revision 10234
110152Satgutier@umich.edu/***************************************************************************** 210152Satgutier@umich.edu * McPAT/CACTI 310152Satgutier@umich.edu * SOFTWARE LICENSE AGREEMENT 410152Satgutier@umich.edu * Copyright 2012 Hewlett-Packard Development Company, L.P. 510234Syasuko.eckert@amd.com * Copyright (c) 2010-2013 Advanced Micro Devices, Inc. 610152Satgutier@umich.edu * All Rights Reserved 710152Satgutier@umich.edu * 810152Satgutier@umich.edu * Redistribution and use in source and binary forms, with or without 910152Satgutier@umich.edu * modification, are permitted provided that the following conditions are 1010152Satgutier@umich.edu * met: redistributions of source code must retain the above copyright 1110152Satgutier@umich.edu * notice, this list of conditions and the following disclaimer; 1210152Satgutier@umich.edu * redistributions in binary form must reproduce the above copyright 1310152Satgutier@umich.edu * notice, this list of conditions and the following disclaimer in the 1410152Satgutier@umich.edu * documentation and/or other materials provided with the distribution; 1510152Satgutier@umich.edu * neither the name of the copyright holders nor the names of its 1610152Satgutier@umich.edu * contributors may be used to endorse or promote products derived from 1710152Satgutier@umich.edu * this software without specific prior written permission. 1810152Satgutier@umich.edu 1910152Satgutier@umich.edu * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 2010152Satgutier@umich.edu * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 2110152Satgutier@umich.edu * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 2210152Satgutier@umich.edu * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 2310152Satgutier@umich.edu * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 2410152Satgutier@umich.edu * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 2510152Satgutier@umich.edu * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 2610152Satgutier@umich.edu * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 2710152Satgutier@umich.edu * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 2810152Satgutier@umich.edu * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 2910234Syasuko.eckert@amd.com * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 3010152Satgutier@umich.edu * 3110152Satgutier@umich.edu ***************************************************************************/ 3210152Satgutier@umich.edu 3310152Satgutier@umich.edu 3410152Satgutier@umich.edu 3510152Satgutier@umich.edu#ifndef __WIRE_H__ 3610152Satgutier@umich.edu#define __WIRE_H__ 3710152Satgutier@umich.edu 3810152Satgutier@umich.edu#include <iostream> 3910152Satgutier@umich.edu#include <list> 4010152Satgutier@umich.edu 4110152Satgutier@umich.edu#include "assert.h" 4210152Satgutier@umich.edu#include "basic_circuit.h" 4310152Satgutier@umich.edu#include "cacti_interface.h" 4410152Satgutier@umich.edu#include "component.h" 4510152Satgutier@umich.edu#include "parameter.h" 4610152Satgutier@umich.edu 4710234Syasuko.eckert@amd.comclass Wire : public Component { 4810234Syasuko.eckert@amd.compublic: 4910152Satgutier@umich.edu Wire(enum Wire_type wire_model, double len /* in u*/, 5010152Satgutier@umich.edu int nsense = 1/* no. of sense amps connected to the low-swing wire */, 5110152Satgutier@umich.edu double width_scaling = 1, 5210152Satgutier@umich.edu double spacing_scaling = 1, 5310152Satgutier@umich.edu enum Wire_placement wire_placement = outside_mat, 5410152Satgutier@umich.edu double resistivity = CU_RESISTIVITY, 5510152Satgutier@umich.edu TechnologyParameter::DeviceType *dt = &(g_tp.peri_global)); 5610152Satgutier@umich.edu ~Wire(); 5710152Satgutier@umich.edu 5810152Satgutier@umich.edu Wire( double width_scaling = 1, 5910234Syasuko.eckert@amd.com double spacing_scaling = 1, 6010234Syasuko.eckert@amd.com enum Wire_placement wire_placement = outside_mat, 6110234Syasuko.eckert@amd.com double resistivity = CU_RESISTIVITY, 6210234Syasuko.eckert@amd.com TechnologyParameter::DeviceType *dt = &(g_tp.peri_global) 6310234Syasuko.eckert@amd.com ); // should be used only once for initializing static members 6410152Satgutier@umich.edu void init_wire(); 6510152Satgutier@umich.edu 6610152Satgutier@umich.edu void calculate_wire_stats(); 6710152Satgutier@umich.edu void delay_optimal_wire(); 6810234Syasuko.eckert@amd.com double wire_cap(double len, bool call_from_outside = false); 6910152Satgutier@umich.edu double wire_res(double len); 7010152Satgutier@umich.edu void low_swing_model(); 7110152Satgutier@umich.edu double signal_fall_time(); 7210152Satgutier@umich.edu double signal_rise_time(); 7310152Satgutier@umich.edu double sense_amp_input_cap(); 7410152Satgutier@umich.edu 7510152Satgutier@umich.edu enum Wire_type wt; 7610152Satgutier@umich.edu double wire_spacing; 7710152Satgutier@umich.edu double wire_width; 7810152Satgutier@umich.edu enum Wire_placement wire_placement; 7910152Satgutier@umich.edu double repeater_size; 8010152Satgutier@umich.edu double repeater_spacing; 8110152Satgutier@umich.edu double wire_length; 8210152Satgutier@umich.edu double in_rise_time, out_rise_time; 8310152Satgutier@umich.edu 8410234Syasuko.eckert@amd.com void set_in_rise_time(double rt) { 8510234Syasuko.eckert@amd.com in_rise_time = rt; 8610152Satgutier@umich.edu } 8710152Satgutier@umich.edu static Component global; 8810152Satgutier@umich.edu static Component global_5; 8910152Satgutier@umich.edu static Component global_10; 9010152Satgutier@umich.edu static Component global_20; 9110152Satgutier@umich.edu static Component global_30; 9210152Satgutier@umich.edu static Component low_swing; 9310152Satgutier@umich.edu static double wire_width_init; 9410152Satgutier@umich.edu static double wire_spacing_init; 9510152Satgutier@umich.edu void print_wire(); 9610152Satgutier@umich.edu 9710234Syasuko.eckert@amd.comprivate: 9810152Satgutier@umich.edu 9910152Satgutier@umich.edu int nsense; // no. of sense amps connected to a low-swing wire if it 10010234Syasuko.eckert@amd.com // is broadcasting data to multiple destinations 10110152Satgutier@umich.edu // width and spacing scaling factor can be used 10210152Satgutier@umich.edu // to model low level wires or special 10310152Satgutier@umich.edu // fat wires 10410152Satgutier@umich.edu double w_scale, s_scale; 10510152Satgutier@umich.edu double resistivity; 10610152Satgutier@umich.edu powerDef wire_model (double space, double size, double *delay); 10710152Satgutier@umich.edu list <Component> repeated_wire; 10810152Satgutier@umich.edu void update_fullswing(); 10910152Satgutier@umich.edu static int initialized; 11010152Satgutier@umich.edu 11110152Satgutier@umich.edu 11210152Satgutier@umich.edu //low-swing 11310152Satgutier@umich.edu Component transmitter; 11410152Satgutier@umich.edu Component l_wire; 11510152Satgutier@umich.edu Component sense_amp; 11610152Satgutier@umich.edu 11710152Satgutier@umich.edu double min_w_pmos; 11810152Satgutier@umich.edu 11910152Satgutier@umich.edu TechnologyParameter::DeviceType *deviceType; 12010152Satgutier@umich.edu 12110152Satgutier@umich.edu}; 12210152Satgutier@umich.edu 12310152Satgutier@umich.edu#endif 124