abc-master
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros
amapInt.h
Go to the documentation of this file.
1 /**CFile****************************************************************
2 
3  FileName [amapInt.h]
4 
5  SystemName [ABC: Logic synthesis and verification system.]
6 
7  PackageName [Technology mapper for standard cells.]
8 
9  Synopsis [Internal declarations.]
10 
11  Author [Alan Mishchenko]
12 
13  Affiliation [UC Berkeley]
14 
15  Date [Ver. 1.0. Started - June 20, 2005.]
16 
17  Revision [$Id: amapInt.h,v 1.00 2005/06/20 00:00:00 alanmi Exp $]
18 
19 ***********************************************************************/
20 
21 #ifndef ABC__map__amap__amapInt_h
22 #define ABC__map__amap__amapInt_h
23 
24 
25 ////////////////////////////////////////////////////////////////////////
26 /// INCLUDES ///
27 ////////////////////////////////////////////////////////////////////////
28 
29 #include "misc/extra/extra.h"
30 #include "aig/aig/aig.h"
31 #include "amap.h"
32 
33 ////////////////////////////////////////////////////////////////////////
34 /// PARAMETERS ///
35 ////////////////////////////////////////////////////////////////////////
36 
37 
38 
40 
41 
42 // the largest gate size in the library
43 // (gates above this size will be ignored)
44 #define AMAP_MAXINS 15
45 
46 #define AMAP_STRING_CONST0 "CONST0"
47 #define AMAP_STRING_CONST1 "CONST1"
48 
49 // object types
50 typedef enum {
51  AMAP_OBJ_NONE, // 0: non-existent object
52  AMAP_OBJ_CONST1, // 1: constant 1
53  AMAP_OBJ_PI, // 2: primary input
54  AMAP_OBJ_PO, // 3: primary output
55  AMAP_OBJ_AND, // 4: AND node
56  AMAP_OBJ_XOR, // 5: XOR node
57  AMAP_OBJ_MUX, // 6: MUX node
58  AMAP_OBJ_VOID // 7: unused object
59 } Amap_Type_t;
60 
61 ////////////////////////////////////////////////////////////////////////
62 /// BASIC TYPES ///
63 ////////////////////////////////////////////////////////////////////////
64 
65 typedef struct Amap_Pin_t_ Amap_Pin_t;
66 typedef struct Amap_Gat_t_ Amap_Gat_t;
67 typedef struct Amap_Nod_t_ Amap_Nod_t;
68 typedef struct Amap_Set_t_ Amap_Set_t;
69 
70 typedef struct Amap_Man_t_ Amap_Man_t;
71 typedef struct Amap_Obj_t_ Amap_Obj_t;
72 typedef struct Amap_Cut_t_ Amap_Cut_t;
73 typedef struct Amap_Mat_t_ Amap_Mat_t;
74 
76 {
77  // user data
80  // internal parameters
82  float fAreaInv;
83  int fUseXor;
84  int fUseMux;
85  // internal AIG with choices
95  int nLevelMax;
98  // mapping data-structures
100  int * pMatsTemp;
106  // statistics
111 };
113 {
114  char * pName; // library name
115  Vec_Ptr_t * vGates; // represenation of gates
116  Vec_Ptr_t * vSorted; // gates sorted for area-only mapping
117  Vec_Ptr_t * vSelect; // gates selected for area-only mapping
118  Amap_Gat_t * pGate0; // the constant zero gate
119  Amap_Gat_t * pGate1; // the constant one gate
120  Amap_Gat_t * pGateBuf; // the buffer
121  Amap_Gat_t * pGateInv; // the inverter
122  Aig_MmFlex_t * pMemGates; // memory manager for objects
123  int fHasXor; // XOR/NXOR gates are present
124  int fHasMux; // MUX/NMUX gates are present
125  // structural representation
126  int fVerbose; // enable detailed statistics
127  Amap_Nod_t * pNodes; // representation nodes
128  int nNodes; // the number of nodes used
129  int nNodesAlloc; // the number of nodes allocated
130  Vec_Ptr_t * vRules; // the rule of AND gate
131  Vec_Ptr_t * vRulesX; // the rule of XOR gate
132  Vec_Int_t * vRules3; // the rule of MUX gate
133  int ** pRules; // simplified representation
134  int ** pRulesX; // simplified representation
135  Aig_MmFlex_t * pMemSet; // memory manager for sets
136  int nSets; // the number of sets created
137 };
139 {
140  char * pName;
141  int Phase;
142  double dLoadInput;
143  double dLoadMax;
149 };
151 {
152  Amap_Lib_t * pLib; // library
153  Amap_Gat_t * pTwin; // twin gate
154  char * pName; // the name of the gate
155  char * pOutName; // name of the output
156  double dArea; // the area of the gate
157  char * pForm; // the formula describing functionality
158  unsigned * pFunc; // truth table
159  unsigned Id : 23; // unique number of the gate
160  unsigned fMux : 1; // denotes MUX-gates
161  unsigned nPins : 8; // number of inputs
162  Amap_Pin_t Pins[0]; // description of inputs
163 };
165 {
167  unsigned iGate : 16;
168  unsigned fInv : 1;
169  unsigned nIns : 15;
170  char Ins[AMAP_MAXINS];// mapping from gate inputs into fanins
171 };
173 {
174  unsigned Id : 16; // ID of the node
175  unsigned nSuppSize: 8; // support size
176  unsigned Type : 8; // the type of node
177  short iFan0; // fanin0
178  short iFan1; // fanin1
179  short iFan2; // fanin2
180  short Unused; //
181  Amap_Set_t * pSets; // implementable gates
182 };
184 {
185  unsigned iMat : 16;
186  unsigned fInv : 1;
187  unsigned nFans : 15;
188  int Fans[0];
189 };
191 {
192  Amap_Cut_t * pCut; // the cut
193  Amap_Set_t * pSet; // the set
194  float Area; // area flow / exact area of the node
195  float AveFan; // edge flow of the node
196  float Delay; // delay of the node
197 };
199 {
200  unsigned Type : 3;
201  unsigned Id : 29;
202  unsigned IdPio : 29;
203  unsigned fPhase : 1;
204  unsigned fRepr : 1;
205  unsigned fPolar : 1; // pCutBest->fInv ^ pSetBest->fInv
206  unsigned Level : 12; // 20 (July 16, 2009)
207  unsigned nCuts : 20; // 12 (July 16, 2009)
208  int nRefs;
209  int Equiv;
210  int Fan[3];
211  union {
212  void * pData;
213  int iData;
214  };
215  // match of the node
216  float EstRefs; // the number of estimated fanouts
217  int nFouts[2]; // the number of refs in each polarity
218  Amap_Mat_t Best; // the best match of the node
219 };
220 
221 static inline Amap_Obj_t * Amap_Regular( Amap_Obj_t * p ) { return (Amap_Obj_t *)((ABC_PTRUINT_T)(p) & ~01); }
222 static inline Amap_Obj_t * Amap_Not( Amap_Obj_t * p ) { return (Amap_Obj_t *)((ABC_PTRUINT_T)(p) ^ 01); }
223 static inline Amap_Obj_t * Amap_NotCond( Amap_Obj_t * p, int c ) { return (Amap_Obj_t *)((ABC_PTRUINT_T)(p) ^ (c)); }
224 static inline int Amap_IsComplement( Amap_Obj_t * p ) { return (int )(((ABC_PTRUINT_T)p) & 01); }
225 
226 static inline int Amap_ManPiNum( Amap_Man_t * p ) { return p->nObjs[AMAP_OBJ_PI]; }
227 static inline int Amap_ManPoNum( Amap_Man_t * p ) { return p->nObjs[AMAP_OBJ_PO]; }
228 static inline int Amap_ManAndNum( Amap_Man_t * p ) { return p->nObjs[AMAP_OBJ_AND]; }
229 static inline int Amap_ManXorNum( Amap_Man_t * p ) { return p->nObjs[AMAP_OBJ_XOR]; }
230 static inline int Amap_ManMuxNum( Amap_Man_t * p ) { return p->nObjs[AMAP_OBJ_MUX]; }
231 static inline int Amap_ManObjNum( Amap_Man_t * p ) { return Vec_PtrSize(p->vObjs); }
232 static inline int Amap_ManNodeNum( Amap_Man_t * p ) { return p->nObjs[AMAP_OBJ_AND] + p->nObjs[AMAP_OBJ_XOR] + p->nObjs[AMAP_OBJ_MUX]; }
233 
234 static inline Amap_Obj_t * Amap_ManConst1( Amap_Man_t * p ) { return p->pConst1; }
235 static inline Amap_Obj_t * Amap_ManPi( Amap_Man_t * p, int i ) { return (Amap_Obj_t *)Vec_PtrEntry( p->vPis, i ); }
236 static inline Amap_Obj_t * Amap_ManPo( Amap_Man_t * p, int i ) { return (Amap_Obj_t *)Vec_PtrEntry( p->vPos, i ); }
237 static inline Amap_Obj_t * Amap_ManObj( Amap_Man_t * p, int i ) { return (Amap_Obj_t *)Vec_PtrEntry( p->vObjs, i ); }
238 
239 static inline int Amap_ObjIsConst1( Amap_Obj_t * pObj ) { return pObj->Type == AMAP_OBJ_CONST1; }
240 static inline int Amap_ObjIsPi( Amap_Obj_t * pObj ) { return pObj->Type == AMAP_OBJ_PI; }
241 static inline int Amap_ObjIsPo( Amap_Obj_t * pObj ) { return pObj->Type == AMAP_OBJ_PO; }
242 static inline int Amap_ObjIsAnd( Amap_Obj_t * pObj ) { return pObj->Type == AMAP_OBJ_AND; }
243 static inline int Amap_ObjIsXor( Amap_Obj_t * pObj ) { return pObj->Type == AMAP_OBJ_XOR; }
244 static inline int Amap_ObjIsMux( Amap_Obj_t * pObj ) { return pObj->Type == AMAP_OBJ_MUX; }
245 static inline int Amap_ObjIsNode( Amap_Obj_t * pObj ) { return pObj->Type == AMAP_OBJ_AND || pObj->Type == AMAP_OBJ_XOR || pObj->Type == AMAP_OBJ_MUX; }
246 
247 static inline int Amap_ObjToLit( Amap_Obj_t * pObj ) { return Abc_Var2Lit( Amap_Regular(pObj)->Id, Amap_IsComplement(pObj) ); }
248 static inline Amap_Obj_t * Amap_ObjFanin0( Amap_Man_t * p, Amap_Obj_t * pObj ) { return Amap_ManObj(p, Abc_Lit2Var(pObj->Fan[0])); }
249 static inline Amap_Obj_t * Amap_ObjFanin1( Amap_Man_t * p, Amap_Obj_t * pObj ) { return Amap_ManObj(p, Abc_Lit2Var(pObj->Fan[1])); }
250 static inline Amap_Obj_t * Amap_ObjFanin2( Amap_Man_t * p, Amap_Obj_t * pObj ) { return Amap_ManObj(p, Abc_Lit2Var(pObj->Fan[2])); }
251 static inline int Amap_ObjFaninC0( Amap_Obj_t * pObj ) { return Abc_LitIsCompl(pObj->Fan[0]); }
252 static inline int Amap_ObjFaninC1( Amap_Obj_t * pObj ) { return Abc_LitIsCompl(pObj->Fan[1]); }
253 static inline int Amap_ObjFaninC2( Amap_Obj_t * pObj ) { return Abc_LitIsCompl(pObj->Fan[2]); }
254 static inline void * Amap_ObjCopy( Amap_Obj_t * pObj ) { return pObj->pData; }
255 static inline int Amap_ObjLevel( Amap_Obj_t * pObj ) { return pObj->Level; }
256 static inline void Amap_ObjSetLevel( Amap_Obj_t * pObj, int Level ) { pObj->Level = Level; }
257 static inline void Amap_ObjSetCopy( Amap_Obj_t * pObj, void * pCopy ) { pObj->pData = pCopy; }
258 static inline Amap_Obj_t * Amap_ObjChoice( Amap_Man_t * p, Amap_Obj_t * pObj ) { return pObj->Equiv? Amap_ManObj(p, pObj->Equiv) : NULL; }
259 static inline void Amap_ObjSetChoice( Amap_Obj_t * pObj, Amap_Obj_t * pEqu){ assert(pObj->Equiv==0); pObj->Equiv = pEqu->Id; }
260 static inline int Amap_ObjPhaseReal( Amap_Obj_t * pObj ) { return Amap_Regular(pObj)->fPhase ^ Amap_IsComplement(pObj); }
261 static inline int Amap_ObjRefsTotal( Amap_Obj_t * pObj ) { return pObj->nFouts[0] + pObj->nFouts[1]; }
262 
263 static inline Amap_Gat_t * Amap_LibGate( Amap_Lib_t * p, int i ) { return (Amap_Gat_t *)Vec_PtrEntry(p->vGates, i); }
264 static inline Amap_Nod_t * Amap_LibNod( Amap_Lib_t * p, int i ) { return p->pNodes + i; }
265 
266 // returns pointer to the next cut (internal cuts only)
267 static inline Amap_Cut_t * Amap_ManCutNext( Amap_Cut_t * pCut )
268 { return (Amap_Cut_t *)(((int *)pCut)+pCut->nFans+1); }
269 // returns pointer to the place of the next cut (temporary cuts only)
270 static inline Amap_Cut_t ** Amap_ManCutNextP( Amap_Cut_t * pCut )
271 { return (Amap_Cut_t **)(((int *)pCut)+pCut->nFans+1); }
272 
273 extern void Kit_DsdPrintFromTruth( unsigned * pTruth, int nVars );
274 
275 ////////////////////////////////////////////////////////////////////////
276 /// MACRO DEFINITIONS ///
277 ////////////////////////////////////////////////////////////////////////
278 
279 // iterator over the primary inputs
280 #define Amap_ManForEachPi( p, pObj, i ) \
281  Vec_PtrForEachEntry( Amap_Obj_t *, p->vPis, pObj, i )
282 // iterator over the primary outputs
283 #define Amap_ManForEachPo( p, pObj, i ) \
284  Vec_PtrForEachEntry( Amap_Obj_t *, p->vPos, pObj, i )
285 // iterator over all objects, including those currently not used
286 #define Amap_ManForEachObj( p, pObj, i ) \
287  Vec_PtrForEachEntry( Amap_Obj_t *, p->vObjs, pObj, i ) if ( (pObj) == NULL ) {} else
288 // iterator over all nodes
289 #define Amap_ManForEachNode( p, pObj, i ) \
290  Vec_PtrForEachEntry( Amap_Obj_t *, p->vObjs, pObj, i ) if ( (pObj) == NULL || !Amap_ObjIsNode(pObj) ) {} else
291 
292 // iterator through all gates of the library
293 #define Amap_LibForEachGate( pLib, pGate, i ) \
294  Vec_PtrForEachEntry( Amap_Gat_t *, pLib->vGates, pGate, i )
295 // iterator through all pins of the gate
296 #define Amap_GateForEachPin( pGate, pPin ) \
297  for ( pPin = pGate->Pins; pPin < pGate->Pins + pGate->nPins; pPin++ )
298 
299 // iterator through all cuts of the node
300 #define Amap_NodeForEachCut( pNode, pCut, i ) \
301  for ( i = 0, pCut = (Amap_Cut_t *)pNode->pData; i < (int)pNode->nCuts; \
302  i++, pCut = Amap_ManCutNext(pCut) )
303 
304 // iterator through all sets of one library node
305 #define Amap_LibNodeForEachSet( pNod, pSet ) \
306  for ( pSet = pNod->pSets; pSet; pSet = pSet->pNext )
307 
308 // iterates through each fanin of the match
309 #define Amap_MatchForEachFaninCompl( p, pM, pFanin, fCompl, i ) \
310  for ( i = 0; i < (int)(pM)->pCut->nFans && \
311  ((pFanin = Amap_ManObj((p), Abc_Lit2Var((pM)->pCut->Fans[Abc_Lit2Var((pM)->pSet->Ins[i])]))), 1) && \
312  ((fCompl = Abc_LitIsCompl((pM)->pSet->Ins[i]) ^ Abc_LitIsCompl((pM)->pCut->Fans[Abc_Lit2Var((pM)->pSet->Ins[i])])), 1); \
313  i++ )
314 
315 // iterates through each fanin of the match
316 #define Amap_MatchForEachFanin( p, pM, pFanin, i ) \
317  for ( i = 0; i < (int)(pM)->pCut->nFans && \
318  ((pFanin = Amap_ManObj((p), Abc_Lit2Var((pM)->pCut->Fans[Abc_Lit2Var((pM)->pSet->Ins[i])]))), 1); \
319  i++ )
320 
321 ////////////////////////////////////////////////////////////////////////
322 /// FUNCTION DECLARATIONS ///
323 ////////////////////////////////////////////////////////////////////////
324 
325 /*=== amapCore.c ==========================================================*/
326 /*=== amapGraph.c ==========================================================*/
328 extern Amap_Obj_t * Amap_ManCreatePo( Amap_Man_t * p, Amap_Obj_t * pFan0 );
329 extern Amap_Obj_t * Amap_ManCreateAnd( Amap_Man_t * p, Amap_Obj_t * pFan0, Amap_Obj_t * pFan1 );
330 extern Amap_Obj_t * Amap_ManCreateXor( Amap_Man_t * p, Amap_Obj_t * pFan0, Amap_Obj_t * pFan1 );
331 extern Amap_Obj_t * Amap_ManCreateMux( Amap_Man_t * p, Amap_Obj_t * pFanC, Amap_Obj_t * pFan1, Amap_Obj_t * pFan0 );
332 extern void Amap_ManCreateChoice( Amap_Man_t * p, Amap_Obj_t * pObj );
333 extern void Amap_ManCreate( Amap_Man_t * p, Aig_Man_t * pAig );
334 /*=== amapLib.c ==========================================================*/
335 extern Amap_Lib_t * Amap_LibAlloc();
336 extern int Amap_LibNumPinsMax( Amap_Lib_t * p );
337 extern void Amap_LibWrite( FILE * pFile, Amap_Lib_t * pLib, int fPrintDsd );
338 extern Vec_Ptr_t * Amap_LibSelectGates( Amap_Lib_t * p, int fVerbose );
339 /*=== amapMan.c ==========================================================*/
340 extern Amap_Man_t * Amap_ManStart( int nNodes );
341 extern void Amap_ManStop( Amap_Man_t * p );
342 /*=== amapMatch.c ==========================================================*/
343 extern void Amap_ManMap( Amap_Man_t * p );
344 /*=== amapMerge.c ==========================================================*/
345 extern void Amap_ManMerge( Amap_Man_t * p );
346 /*=== amapOutput.c ==========================================================*/
348 /*=== amapParse.c ==========================================================*/
349 extern int Amap_LibParseEquations( Amap_Lib_t * p, int fVerbose );
350 /*=== amapPerm.c ==========================================================*/
351 /*=== amapRead.c ==========================================================*/
352 extern Amap_Lib_t * Amap_LibReadBuffer( char * pBuffer, int fVerbose );
353 extern Amap_Lib_t * Amap_LibReadFile( char * pFileName, int fVerbose );
354 /*=== amapRule.c ==========================================================*/
355 extern short * Amap_LibTableFindNode( Amap_Lib_t * p, int iFan0, int iFan1, int fXor );
356 extern void Amap_LibCreateRules( Amap_Lib_t * p, int fVeryVerbose );
357 /*=== amapUniq.c ==========================================================*/
358 extern int Amap_LibFindNode( Amap_Lib_t * pLib, int iFan0, int iFan1, int fXor );
359 extern int Amap_LibFindMux( Amap_Lib_t * p, int iFan0, int iFan1, int iFan2 );
360 extern int Amap_LibCreateVar( Amap_Lib_t * p );
361 extern int Amap_LibCreateNode( Amap_Lib_t * p, int iFan0, int iFan1, int fXor );
362 extern int Amap_LibCreateMux( Amap_Lib_t * p, int iFan0, int iFan1, int iFan2 );
363 extern int ** Amap_LibLookupTableAlloc( Vec_Ptr_t * vVec, int fVerbose );
364 
365 
366 
368 
369 
370 
371 #endif
372 
373 ////////////////////////////////////////////////////////////////////////
374 /// END OF FILE ///
375 ////////////////////////////////////////////////////////////////////////
376 
unsigned fMux
Definition: amapInt.h:160
int Amap_LibNumPinsMax(Amap_Lib_t *p)
Definition: amapLib.c:103
void Amap_ManMerge(Amap_Man_t *p)
Definition: amapMerge.c:514
Amap_Lib_t * pLib
Definition: amapInt.h:152
Vec_Ptr_t * vRulesX
Definition: amapInt.h:131
Vec_Ptr_t * vGates
Definition: amapInt.h:115
Vec_Int_t * vTemp
Definition: amapInt.h:99
unsigned IdPio
Definition: amapInt.h:202
Amap_Lib_t * Amap_LibReadFile(char *pFileName, int fVerbose)
Definition: amapRead.c:473
static Amap_Gat_t * Amap_LibGate(Amap_Lib_t *p, int i)
Definition: amapInt.h:263
typedefABC_NAMESPACE_HEADER_START struct Vec_Ptr_t_ Vec_Ptr_t
INCLUDES ///.
Definition: vecPtr.h:42
static void Amap_ObjSetLevel(Amap_Obj_t *pObj, int Level)
Definition: amapInt.h:256
static int Amap_ObjFaninC2(Amap_Obj_t *pObj)
Definition: amapInt.h:253
double dLoadInput
Definition: amapInt.h:142
float EstRefs
Definition: amapInt.h:216
char * pForm
Definition: amapInt.h:157
Amap_Gat_t * pGate0
Definition: amapInt.h:118
Aig_MmFlex_t * pMemGates
Definition: amapInt.h:122
static int Amap_ManPiNum(Amap_Man_t *p)
Definition: amapInt.h:226
int nChoicesAdded
Definition: amapInt.h:97
static int Amap_ObjIsXor(Amap_Obj_t *pObj)
Definition: amapInt.h:243
typedefABC_NAMESPACE_HEADER_START struct Aig_Man_t_ Aig_Man_t
INCLUDES ///.
Definition: aig.h:50
Vec_Ptr_t * vRules
Definition: amapInt.h:130
static Llb_Mgr_t * p
Definition: llb3Image.c:950
int nCutsTried3
Definition: amapInt.h:109
Aig_MmFlex_t * pMemCuts
Definition: amapInt.h:90
typedefABC_NAMESPACE_IMPL_START struct Vec_Int_t_ Vec_Int_t
DECLARATIONS ///.
Definition: bblif.c:37
void Amap_ManCreateChoice(Amap_Man_t *p, Amap_Obj_t *pObj)
Definition: amapGraph.c:222
void Amap_ManCreate(Amap_Man_t *p, Aig_Man_t *pAig)
Definition: amapGraph.c:323
void Amap_LibWrite(FILE *pFile, Amap_Lib_t *pLib, int fPrintDsd)
Definition: amapLib.c:179
int ** pRulesX
Definition: amapInt.h:134
int Phase
Definition: amapInt.h:141
Vec_Ptr_t * vCuts0
Definition: amapInt.h:103
int nNodes
Definition: amapInt.h:128
short iFan0
Definition: amapInt.h:177
void Kit_DsdPrintFromTruth(unsigned *pTruth, int nVars)
Definition: kitDsd.c:490
static int Amap_ObjPhaseReal(Amap_Obj_t *pObj)
Definition: amapInt.h:260
Amap_Mat_t Best
Definition: amapInt.h:218
Amap_Set_t * pNext
Definition: amapInt.h:166
unsigned fInv
Definition: amapInt.h:168
static Amap_Obj_t * Amap_ObjFanin0(Amap_Man_t *p, Amap_Obj_t *pObj)
Definition: amapInt.h:248
int nFouts[2]
Definition: amapInt.h:217
static Amap_Obj_t * Amap_ManPi(Amap_Man_t *p, int i)
Definition: amapInt.h:235
Amap_Obj_t * pConst1
Definition: amapInt.h:93
static void Amap_ObjSetChoice(Amap_Obj_t *pObj, Amap_Obj_t *pEqu)
Definition: amapInt.h:259
static int Abc_Var2Lit(int Var, int fCompl)
Definition: abc_global.h:263
void Amap_ManMap(Amap_Man_t *p)
Definition: amapMatch.c:593
Amap_Lib_t * Amap_LibAlloc()
DECLARATIONS ///.
Definition: amapLib.c:45
unsigned Level
Definition: amapInt.h:206
unsigned Id
Definition: amapInt.h:201
int nSets
Definition: amapInt.h:136
char * pOutName
Definition: amapInt.h:155
int fHasMux
Definition: amapInt.h:124
short iFan2
Definition: amapInt.h:179
Vec_Int_t * vRules3
Definition: amapInt.h:132
double dDelayBlockRise
Definition: amapInt.h:144
float AveFan
Definition: amapInt.h:195
static void * Amap_ObjCopy(Amap_Obj_t *pObj)
Definition: amapInt.h:254
int nCutsUsed
Definition: amapInt.h:107
static int Amap_ManPoNum(Amap_Man_t *p)
Definition: amapInt.h:227
double dLoadMax
Definition: amapInt.h:143
int fVerbose
Definition: amapInt.h:126
static int Vec_PtrSize(Vec_Ptr_t *p)
Definition: vecPtr.h:295
int Amap_LibFindMux(Amap_Lib_t *p, int iFan0, int iFan1, int iFan2)
Definition: amapUniq.c:109
Aig_MmFlex_t * pMemCutBest
Definition: amapInt.h:91
static int Amap_ObjIsPi(Amap_Obj_t *pObj)
Definition: amapInt.h:240
static int Amap_ManAndNum(Amap_Man_t *p)
Definition: amapInt.h:228
Vec_Ptr_t * Amap_LibSelectGates(Amap_Lib_t *p, int fVerbose)
Definition: amapLib.c:261
DECLARATIONS ///.
Definition: aigMem.c:30
Amap_Cut_t * pCut
Definition: amapInt.h:192
double dDelayBlockMax
Definition: amapInt.h:148
Amap_Cut_t ** ppCutsTemp
Definition: amapInt.h:101
Amap_Gat_t * pGateInv
Definition: amapInt.h:121
static int Amap_ObjIsNode(Amap_Obj_t *pObj)
Definition: amapInt.h:245
Amap_Pin_t Pins[0]
Definition: amapInt.h:162
static int Amap_ObjRefsTotal(Amap_Obj_t *pObj)
Definition: amapInt.h:261
static int Amap_ObjIsPo(Amap_Obj_t *pObj)
Definition: amapInt.h:241
Amap_Nod_t * pNodes
Definition: amapInt.h:127
Vec_Ptr_t * vObjs
Definition: amapInt.h:88
static int Abc_LitIsCompl(int Lit)
Definition: abc_global.h:265
unsigned Type
Definition: amapInt.h:176
Amap_Gat_t * pTwin
Definition: amapInt.h:153
void * pData
Definition: amapInt.h:212
float fAreaInv
Definition: amapInt.h:82
char Ins[AMAP_MAXINS]
Definition: amapInt.h:170
Aig_MmFlex_t * pMemSet
Definition: amapInt.h:135
static Amap_Obj_t * Amap_Regular(Amap_Obj_t *p)
Definition: amapInt.h:221
int Amap_LibCreateVar(Amap_Lib_t *p)
Definition: amapUniq.c:164
short * Amap_LibTableFindNode(Amap_Lib_t *p, int iFan0, int iFan1, int fXor)
int nRefs
Definition: amapInt.h:208
static int Amap_ObjToLit(Amap_Obj_t *pObj)
Definition: amapInt.h:247
static int Amap_ManXorNum(Amap_Man_t *p)
Definition: amapInt.h:229
Amap_Lib_t * pLib
Definition: amapInt.h:79
static int Amap_ObjIsMux(Amap_Obj_t *pObj)
Definition: amapInt.h:244
Vec_Ptr_t * vPis
Definition: amapInt.h:86
float Delay
Definition: amapInt.h:196
#define AMAP_MAXINS
INCLUDES ///.
Definition: amapInt.h:44
int ** Amap_LibLookupTableAlloc(Vec_Ptr_t *vVec, int fVerbose)
Definition: amapUniq.c:278
Amap_Obj_t * Amap_ManCreateMux(Amap_Man_t *p, Amap_Obj_t *pFanC, Amap_Obj_t *pFan1, Amap_Obj_t *pFan0)
Definition: amapGraph.c:192
static int Amap_IsComplement(Amap_Obj_t *p)
Definition: amapInt.h:224
static Amap_Cut_t * Amap_ManCutNext(Amap_Cut_t *pCut)
Definition: amapInt.h:267
Amap_Obj_t * Amap_ManCreateAnd(Amap_Man_t *p, Amap_Obj_t *pFan0, Amap_Obj_t *pFan1)
Definition: amapGraph.c:137
unsigned nCuts
Definition: amapInt.h:207
unsigned Type
Definition: amapInt.h:200
Aig_MmFixed_t * pMemObj
Definition: amapInt.h:89
Amap_Obj_t * Amap_ManCreatePi(Amap_Man_t *p)
FUNCTION DECLARATIONS ///.
Definition: amapGraph.c:88
static Amap_Obj_t * Amap_ManConst1(Amap_Man_t *p)
Definition: amapInt.h:234
static int Amap_ObjIsConst1(Amap_Obj_t *pObj)
Definition: amapInt.h:239
unsigned nSuppSize
Definition: amapInt.h:175
unsigned fPhase
Definition: amapInt.h:203
unsigned * pFunc
Definition: amapInt.h:158
static Amap_Obj_t * Amap_ManPo(Amap_Man_t *p, int i)
Definition: amapInt.h:236
unsigned fInv
Definition: amapInt.h:186
int Amap_LibCreateMux(Amap_Lib_t *p, int iFan0, int iFan1, int iFan2)
Definition: amapUniq.c:244
#define ABC_NAMESPACE_HEADER_START
NAMESPACES ///.
Definition: abc_global.h:105
unsigned nPins
Definition: amapInt.h:161
double dDelayFanoutFall
Definition: amapInt.h:147
Vec_Ptr_t * vCuts2
Definition: amapInt.h:105
int Fan[3]
Definition: amapInt.h:210
int Amap_LibCreateNode(Amap_Lib_t *p, int iFan0, int iFan1, int fXor)
Definition: amapUniq.c:189
float Area
Definition: amapInt.h:194
int nBytesUsed
Definition: amapInt.h:110
char * pName
Definition: amapInt.h:140
Amap_Obj_t * Amap_ManCreateXor(Amap_Man_t *p, Amap_Obj_t *pFan0, Amap_Obj_t *pFan1)
Definition: amapGraph.c:165
double dArea
Definition: amapInt.h:156
Vec_Ptr_t * vSorted
Definition: amapInt.h:116
#define ABC_NAMESPACE_HEADER_END
Definition: abc_global.h:106
int fUseMux
Definition: amapInt.h:84
unsigned fRepr
Definition: amapInt.h:204
static Amap_Obj_t * Amap_ObjChoice(Amap_Man_t *p, Amap_Obj_t *pObj)
Definition: amapInt.h:258
static Amap_Obj_t * Amap_NotCond(Amap_Obj_t *p, int c)
Definition: amapInt.h:223
static int Amap_ManNodeNum(Amap_Man_t *p)
Definition: amapInt.h:232
Amap_Type_t
Definition: amapInt.h:50
int Equiv
Definition: amapInt.h:209
static void Amap_ObjSetCopy(Amap_Obj_t *pObj, void *pCopy)
Definition: amapInt.h:257
int fHasXor
Definition: amapInt.h:123
static int Amap_ManObjNum(Amap_Man_t *p)
Definition: amapInt.h:231
Vec_Ptr_t * vSelect
Definition: amapInt.h:117
static Amap_Obj_t * Amap_ManObj(Amap_Man_t *p, int i)
Definition: amapInt.h:237
static void * Vec_PtrEntry(Vec_Ptr_t *p, int i)
Definition: vecPtr.h:362
unsigned nFans
Definition: amapInt.h:187
static int Amap_ObjFaninC1(Amap_Obj_t *pObj)
Definition: amapInt.h:252
static Amap_Obj_t * Amap_ObjFanin1(Amap_Man_t *p, Amap_Obj_t *pObj)
Definition: amapInt.h:249
Amap_Set_t * pSets
Definition: amapInt.h:181
typedefABC_NAMESPACE_HEADER_START struct Amap_Lib_t_ Amap_Lib_t
INCLUDES ///.
Definition: amap.h:42
int nObjs[AMAP_OBJ_VOID]
Definition: amapInt.h:94
int nCutsTried
Definition: amapInt.h:108
Amap_Par_t * pPars
Definition: amapInt.h:78
unsigned iMat
Definition: amapInt.h:185
double dDelayFanoutRise
Definition: amapInt.h:145
void Amap_ManStop(Amap_Man_t *p)
Definition: amapMan.c:79
int * pMatsTemp
Definition: amapInt.h:100
static int Abc_Lit2Var(int Lit)
Definition: abc_global.h:264
Amap_Man_t * Amap_ManStart(int nNodes)
DECLARATIONS ///.
Definition: amapMan.c:45
unsigned Id
Definition: amapInt.h:174
static int Amap_ObjLevel(Amap_Obj_t *pObj)
Definition: amapInt.h:255
double dDelayBlockFall
Definition: amapInt.h:146
Vec_Ptr_t * Amap_ManProduceMapped(Amap_Man_t *p)
Definition: amapOutput.c:71
static Amap_Obj_t * Amap_ObjFanin2(Amap_Man_t *p, Amap_Obj_t *pObj)
Definition: amapInt.h:250
unsigned iGate
Definition: amapInt.h:167
short Unused
Definition: amapInt.h:180
Amap_Lib_t * Amap_LibReadBuffer(char *pBuffer, int fVerbose)
Definition: amapRead.c:446
short iFan1
Definition: amapInt.h:178
#define assert(ex)
Definition: util_old.h:213
int Amap_LibParseEquations(Amap_Lib_t *p, int fVerbose)
Definition: amapParse.c:392
unsigned nIns
Definition: amapInt.h:169
Aig_MmFlex_t * pMemTemp
Definition: amapInt.h:92
static Amap_Obj_t * Amap_Not(Amap_Obj_t *p)
Definition: amapInt.h:222
static int Amap_ObjFaninC0(Amap_Obj_t *pObj)
Definition: amapInt.h:251
unsigned fPolar
Definition: amapInt.h:205
int Amap_LibFindNode(Amap_Lib_t *pLib, int iFan0, int iFan1, int fXor)
Definition: amapUniq.c:90
Amap_Set_t * pSet
Definition: amapInt.h:193
char * pName
Definition: amapInt.h:154
Amap_Obj_t * Amap_ManCreatePo(Amap_Man_t *p, Amap_Obj_t *pFan0)
Definition: amapGraph.c:110
static Amap_Nod_t * Amap_LibNod(Amap_Lib_t *p, int i)
Definition: amapInt.h:264
Amap_Gat_t * pGateBuf
Definition: amapInt.h:120
void Amap_LibCreateRules(Amap_Lib_t *p, int fVeryVerbose)
Definition: amapRule.c:426
int fUseXor
Definition: amapInt.h:83
Vec_Ptr_t * vCuts1
Definition: amapInt.h:104
int ** pRules
Definition: amapInt.h:133
Amap_Cut_t * pCutsPi
Definition: amapInt.h:102
int iData
Definition: amapInt.h:213
unsigned Id
Definition: amapInt.h:159
int Fans[0]
Definition: amapInt.h:188
static int Amap_ObjIsAnd(Amap_Obj_t *pObj)
Definition: amapInt.h:242
int nChoicesGiven
Definition: amapInt.h:96
Amap_Gat_t * pGate1
Definition: amapInt.h:119
static Amap_Cut_t ** Amap_ManCutNextP(Amap_Cut_t *pCut)
Definition: amapInt.h:270
int nLevelMax
Definition: amapInt.h:95
int nNodesAlloc
Definition: amapInt.h:129
char * pName
Definition: amapInt.h:114
static int Amap_ManMuxNum(Amap_Man_t *p)
Definition: amapInt.h:230
Vec_Ptr_t * vPos
Definition: amapInt.h:87
float fEpsilonInternal
Definition: amapInt.h:81