blob: 72cb10903be39872e6326f39393bc46501ffa3b6 (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
|
// license:GPL-2.0+
// copyright-holders:Couriersud
/*!
*
* \file nl_config.h
*
*/
#ifndef NLCONFIG_H_
#define NLCONFIG_H_
#include "plib/pconfig.h"
//============================================================
// SETUP
//============================================================
//============================================================
// GENERAL
//============================================================
/*! Make use of a memory pool for performance related objects.
*
* Set to 1 to compile netlist with memory allocations from a
* linear memory pool. This is based of the assumption that
* due to enhanced locality there will be less cache misses.
* Your mileage may vary.
* This will cause crashes on OSX and thus is ignored on OSX.
*
*/
#define USE_MEMPOOL (0)
/*
* FIXME: Using truthtable is a lot slower than the explicit device
* in breakout. Performance drops by 20%. This can be fixed by
* setting param USE_DEACTIVATE for the device.
*/
#define USE_TRUTHTABLE_7448 (0)
// How many times do we try to resolve links (connections)
#define NL_MAX_LINK_RESOLVE_LOOPS (100)
//============================================================
// Solver defines
//============================================================
#define USE_GABS (1)
// savings are eaten up by effort
// FIXME: Convert into solver parameter
#define USE_LINEAR_PREDICTION (0)
#define NETLIST_GMIN_DEFAULT (1e-9)
//============================================================
// DEBUGGING
//============================================================
#define NL_DEBUG (false)
#define NL_KEEP_STATISTICS (0)
//============================================================
// General Macros
//============================================================
#if defined(OPENMP)
#define HAS_OPENMP ( OPENMP >= 200805 )
#elif defined(_OPENMP)
#define HAS_OPENMP ( _OPENMP >= 200805 )
#else
#define HAS_OPENMP (0)
#endif
//============================================================
// General
//============================================================
// The following adds about 10% performance ...
#if !defined(USE_OPENMP)
#define USE_OPENMP (0)
#endif // !defined(USE_OPENMP)
// Use nano-second resolution - Sufficient for now
#define NETLIST_INTERNAL_RES (UINT64_C(1000000000))
//#define NETLIST_INTERNAL_RES (UINT64_C(1000000000000))
#define NETLIST_CLOCK (NETLIST_INTERNAL_RES)
//#define nl_double float
//#define NL_FCONST(x) (x ## f)
//#define nl_double double
#define NL_FCONST(x) x
using nl_double = double;
/* The following option determines how object::update is called.
* If set to 1, a virtual call is used. If it is left undefined, the best
* approach will be automatically selected.
*/
//============================================================
// WARNINGS
//============================================================
#if (USE_OPENMP)
#if (!(HAS_OPENMP))
#error To use openmp compile and link with "-fopenmp"
#endif
#endif
#endif /* NLCONFIG_H_ */
|