wire.h (10152:52c552138ba1) wire.h (10234:5cb711fa6176)
1/*****************************************************************************
2 * McPAT/CACTI
3 * SOFTWARE LICENSE AGREEMENT
4 * Copyright 2012 Hewlett-Packard Development Company, L.P.
1/*****************************************************************************
2 * McPAT/CACTI
3 * SOFTWARE LICENSE AGREEMENT
4 * Copyright 2012 Hewlett-Packard Development Company, L.P.
5 * Copyright (c) 2010-2013 Advanced Micro Devices, Inc.
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

--- 7 unchanged lines hidden (view full) ---

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
6 * All Rights Reserved
7 *
8 * Redistribution and use in source and binary forms, with or without
9 * modification, are permitted provided that the following conditions are
10 * met: redistributions of source code must retain the above copyright
11 * notice, this list of conditions and the following disclaimer;
12 * redistributions in binary form must reproduce the above copyright
13 * notice, this list of conditions and the following disclaimer in the

--- 7 unchanged lines hidden (view full) ---

21 * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
22 * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
23 * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
24 * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
25 * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
26 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
27 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
28 * (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 * 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
30 *
31 ***************************************************************************/
32
33
34
35#ifndef __WIRE_H__
36#define __WIRE_H__
37
38#include <iostream>
39#include <list>
40
41#include "assert.h"
42#include "basic_circuit.h"
43#include "cacti_interface.h"
44#include "component.h"
45#include "parameter.h"
46
46class Wire : public Component
47{
48 public:
47class Wire : public Component {
48public:
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,
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
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();
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);
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
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;
84 void set_in_rise_time(double rt) {
85 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
86 }
87 static Component global;
88 static Component global_5;
89 static Component global_10;
90 static Component global_20;
91 static Component global_30;
92 static Component low_swing;
93 static double wire_width_init;
94 static double wire_spacing_init;
95 void print_wire();
96
98 private:
97private:
99
100 int nsense; // no. of sense amps connected to a low-swing wire if it
98
99 int nsense; // no. of sense amps connected to a low-swing wire if it
101 // is broadcasting data to multiple destinations
100 // 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();

--- 15 unchanged lines hidden ---
101 // width and spacing scaling factor can be used
102 // to model low level wires or special
103 // fat wires
104 double w_scale, s_scale;
105 double resistivity;
106 powerDef wire_model (double space, double size, double *delay);
107 list <Component> repeated_wire;
108 void update_fullswing();

--- 15 unchanged lines hidden ---