#ifndef __WIRE_H1#define __WIRE_H23#include "flp.h"4#include "math.h"56/*7* a simple wire-delay model based on8*9* 1) Equations 1-3 of the following paper:10* R. H. J. M. Otten and R. K. Brayton, "Planning for11* performance," in DAC '98: Proceedings of the 35th annual12* conference on Design automation, pp. 122--127, 1998.13*14* and15*16* 2) Equations 30-33 of the following paper:17* K. Banerjee and A. Mehrotra, "Global (interconnect)18* warming," IEEE Circuits and Devices Magazine, vol. 17,19* pp. 16--32, September 2001. The lcrit and sopt values20* for the global metal layers defined below are taken from21* Table 4 of this paper.22*23* The resistance and capacitance values of wires per unit24* length defined below (WIRE_R*, WIRE_C*) are taken from25* Table 2 of the following paper:26*27* V. Agarwal, S. W. Keckler, and D. Burger, "The effect28* of technology scaling on microarchitectural structures,"29* Tech. Rep. TR-00-02, University of Texas at Austin Computer30* Sciences, May 2001.31*/3233/* we are modeling a 130 nm wire */34#define TECHNODE1303536/* metal layer */37#define WIRE_GLOBAL 038#define WIRE_INTER 13940/*41* constants dependent on the swing assumptions of the42* repeaters inserted. usually, a 50% swing is assumed.43* in such a case, a = 0.4, b = 0.744*/45#define WIRE_A 0.446#define WIRE_B 0.74748/*49* *_G are values for global metal while *_I are50* for intermediate metal layers respectively.51* The units used are listed below:52* WIRE_R_* - mohm/u53* WIRE_C_* - fF/u54* WIRE_LCRIT_* - mm55* WIRE_SOPT_* - dimensionless56*/57#if defined(TECHNODE180)58#define WIRE_R_G 36.059#define WIRE_C_G 0.35060#define WIRE_R_I 107.061#define WIRE_C_I 0.33362#define WIRE_LCRIT_G 3.063#define WIRE_SOPT_G 179.064#elif defined(TECHNODE130)65#define WIRE_R_G 61.066#define WIRE_C_G 0.35967#define WIRE_R_I 188.068#define WIRE_C_I 0.33669#define WIRE_LCRIT_G 2.470#define WIRE_SOPT_G 146.071#elif defined(TECHNODE100)72#define WIRE_R_G 103.073#define WIRE_C_G 0.36174#define WIRE_R_I 316.075#define WIRE_C_I 0.33276#define WIRE_LCRIT_G 2.1277#define WIRE_SOPT_G 96.078#elif defined(TECHNODE70)79#define WIRE_R_G 164.080#define WIRE_C_G 0.36081#define WIRE_R_I 500.082#define WIRE_C_I 0.33183#define WIRE_LCRIT_G 1.284#define WIRE_SOPT_G 82.085#elif defined(TECHNODE50)86#define WIRE_R_G 321.087#define WIRE_C_G 0.35888#define WIRE_R_I 1020.089#define WIRE_C_I 0.34190#define WIRE_LCRIT_G 0.9991#define WIRE_SOPT_G 48.092#endif9394/*95* lcrit and sopt values for intermediate layer96* are derived from the values for global layer.97* lcrit * sqrt(wire_r * wire_c) is a constant98* for a given layer. So is the expression99* sopt * sqrt(wire_r / wire_c) (Equation 2 and100* Theorem 2 from Brayton et. al). Using this101* for the global layer, one can find the constants102* for the intermediate layer and combining this103* with the wire_r and wire_c values for the104* intermediate layer, its lcrit and sopt values105* can be calculated.106*/107#define WIRE_LCRIT_I (WIRE_LCRIT_G * \108sqrt((WIRE_R_G / WIRE_R_I) * (WIRE_C_G / WIRE_C_I)))109#define WIRE_SOPT_I (WIRE_SOPT_G * \110sqrt((WIRE_R_G / WIRE_R_I) / (WIRE_C_G / WIRE_C_I)))111112/*113* delay (in secs) per meter of a wire using114* Equation 2 and Theorem 2 of Brayton et al.115* the following expression is derived by116* setting cp = co in the delay equation and117* substituting for sqrt(ro*co) in the same118* from Equation 2. The 1.0e-9 is added to take119* care of the units120*/121#define WIRE_DELAY_G (WIRE_LCRIT_G * WIRE_R_G * WIRE_C_G * 1.0e-9 * \122(2.0 * WIRE_A + sqrt (2.0 * WIRE_A * WIRE_B)))123#define WIRE_DELAY_I (WIRE_LCRIT_I * WIRE_R_I * WIRE_C_I * 1.0e-9 * \124(2.0 * WIRE_A + sqrt (2.0 * WIRE_A * WIRE_B)))125126/* function for wire-length to wire-delay conversion */127double wire_length2delay(double length, int layer);128129#endif130131132