component.h revision 10152
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 __COMPONENT_H__
35#define __COMPONENT_H__
36
37#include "area.h"
38#include "parameter.h"
39
40using namespace std;
41
42class Crossbar;
43class Bank;
44
45class Component
46{
47  public:
48    Component();
49    ~Component();
50
51    Area area;
52    powerDef power,rt_power;
53    double delay;
54    double cycle_time;
55
56    double compute_gate_area(
57        int gate_type,
58        int num_inputs,
59        double w_pmos,
60        double w_nmos,
61        double h_gate);
62
63    double compute_tr_width_after_folding(double input_width, double threshold_folding_width);
64    double height_sense_amplifier(double pitch_sense_amp);
65
66  protected:
67    int logical_effort(
68        int    num_gates_min,
69        double g,
70        double F,
71        double * w_n,
72        double * w_p,
73        double C_load,
74        double p_to_n_sz_ratio,
75        bool   is_dram_,
76        bool   is_wl_tr_,
77        double max_w_nmos);
78
79  private:
80    double compute_diffusion_width(int num_stacked_in, int num_folded_tr);
81};
82
83#endif
84
85