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 * 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
28 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
29 *
30 ***************************************************************************/
31
32
33
34#ifndef __BASIC_CIRCUIT_H__
35#define __BASIC_CIRCUIT_H__
36

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

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

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

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

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

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

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

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