Deleted Added
sdiff udiff text old ( 10152:52c552138ba1 ) new ( 10234:5cb711fa6176 )
full compact
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.
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
29 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
30 *
31 ***************************************************************************/
32
33
34
35#ifndef __BASIC_CIRCUIT_H__
36#define __BASIC_CIRCUIT_H__
37

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

45int powers (int base, int n);
46bool is_pow2(int64_t val);
47uint32_t _log2(uint64_t num);
48int factorial(int n, int m = 1);
49int combination(int n, int m);
50
51//#define DBG
52#ifdef DBG
53#define PRINTDW(a);\
54 a;
55#else
56#define PRINTDW(a);\
57
58#endif
59
60
61enum Wire_placement {
62 outside_mat,
63 inside_mat,
64 local_wires

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

72 Data_out_htree,
73 Search_in_htree,
74 Search_out_htree,
75};
76
77enum Gate_type {
78 nmos,
79 pmos,
80 inv,
81 nand,
82 nor,
83 tri,
84 tg
85};
86
87enum Half_net_topology {
88 parallel,

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

160 bool _is_dram = false,
161 bool _is_cell = false,
162 bool _is_wl_tr = false);
163
164double cmos_Ig_n(
165 double nWidth,
166 bool _is_dram = false,
167 bool _is_cell = false,
168 bool _is_wl_tr = false);
169
170double cmos_Ig_p(
171 double pWidth,
172 bool _is_dram = false,
173 bool _is_cell = false,
174 bool _is_wl_tr = false);
175
176
177double cmos_Isub_leakage(
178 double nWidth,
179 double pWidth,
180 int fanin,
181 enum Gate_type g_type,
182 bool _is_dram = false,

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

216 double w_pmos,
217 double i_on_n,
218 double i_on_p,
219 double i_on_n_in,
220 double i_on_p_in,
221 double vdd);
222//set power point product mask; strictly speaking this is not real point product
223inline void set_pppm(
224 double * pppv,
225 double a = 1,
226 double b = 1,
227 double c = 1,
228 double d = 1
229) {
230 pppv[0] = a;
231 pppv[1] = b;
232 pppv[2] = c;
233 pppv[3] = d;
234
235}
236
237inline void set_sppm(
238 double * sppv,
239 double a = 1,
240 double b = 1,
241 double c = 1,
242 double d = 1
243) {
244 sppv[0] = a;
245 sppv[1] = b;
246 sppv[2] = c;
247}
248
249#endif