arbiter.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#ifndef __ARBITER__
33#define __ARBITER__
34
35#include <assert.h>
36
37#include <iostream>
38
39#include "basic_circuit.h"
40#include "cacti_interface.h"
41#include "component.h"
42#include "mat.h"
43#include "parameter.h"
44#include "wire.h"
45
46class Arbiter : public Component
47{
48  public:
49    Arbiter(
50      double Req,
51      double flit_sz,
52      double output_len,
53      TechnologyParameter::DeviceType *dt = &(g_tp.peri_global));
54    ~Arbiter();
55
56    void print_arbiter();
57    double arb_req();
58    double arb_pri();
59    double arb_grant();
60    double arb_int();
61    void compute_power();
62    double Cw3(double len);
63    double crossbar_ctrline();
64    double transmission_buf_ctrcap();
65
66
67
68  private:
69    double NTn1, PTn1, NTn2, PTn2, R, PTi, NTi;
70    double flit_size;
71    double NTtr, PTtr;
72    double o_len;
73    TechnologyParameter::DeviceType *deviceType;
74    double TriS1, TriS2;
75    double min_w_pmos, Vdd;
76
77};
78
79#endif
80