abc-master
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros
nwk.h
Go to the documentation of this file.
1 /**CFile****************************************************************
2 
3  FileName [nwk.h]
4 
5  SystemName [ABC: Logic synthesis and verification system.]
6 
7  PackageName [Logic network representation.]
8 
9  Synopsis [External 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: nwk.h,v 1.1 2008/05/14 22:13:09 wudenni Exp $]
18 
19 ***********************************************************************/
20 
21 #ifndef __NWK_abc_opt_nwk_h
22 #define __NWK_abc_opt_nwk_h
23 
24 
25 ////////////////////////////////////////////////////////////////////////
26 /// INCLUDES ///
27 ////////////////////////////////////////////////////////////////////////
28 
29 #include "aig/aig/aig.h"
30 #include "aig/hop/hop.h"
31 #include "misc/tim/tim.h"
32 #include "map/if/if.h"
33 #include "bool/bdc/bdc.h"
34 
35 #include "proof/fra/fra.h"
36 #include "proof/ssw/ssw.h"
37 #include "ntlnwk.h"
38 
39 ////////////////////////////////////////////////////////////////////////
40 /// PARAMETERS ///
41 ////////////////////////////////////////////////////////////////////////
42 
44 
45 ////////////////////////////////////////////////////////////////////////
46 /// BASIC TYPES ///
47 ////////////////////////////////////////////////////////////////////////
48 
49 typedef struct Nwk_Obj_t_ Nwk_Obj_t;
50 
51 // object types
52 typedef enum {
53  NWK_OBJ_NONE, // 0: non-existant object
54  NWK_OBJ_CI, // 1: combinational input
55  NWK_OBJ_CO, // 2: combinational output
56  NWK_OBJ_NODE, // 3: logic node
57  NWK_OBJ_LATCH, // 4: register
58  NWK_OBJ_VOID // 5: unused object
59 } Nwk_Type_t;
60 
61 struct Nwk_Man_t_
62 {
63  // models of this design
64  char * pName; // the name of this design
65  char * pSpec; // the name of input file
66  // node representation
67  Vec_Ptr_t * vCis; // the primary inputs of the extracted part
68  Vec_Ptr_t * vCos; // the primary outputs of the extracted part
69  Vec_Ptr_t * vObjs; // the objects in the topological order
70  int nObjs[NWK_OBJ_VOID]; // counter of objects of each type
71  int nFanioPlus; // the number of extra fanins/fanouts alloc by default
72  // functionality, timing, memory, etc
73  Hop_Man_t * pManHop; // the functionality representation
74  Tim_Man_t * pManTime; // the timing manager
75  If_LibLut_t * pLutLib; // the LUT library
76  Aig_MmFlex_t * pMemObjs; // memory for objects
77  Vec_Ptr_t * vTemp; // array used for incremental updates
78  int nTravIds; // the counter of traversal IDs
79  int nRealloced; // the number of realloced nodes
80  // sequential information
81  int nLatches; // the total number of latches
82  int nTruePis; // the number of true primary inputs
83  int nTruePos; // the number of true primary outputs
84 };
85 
86 struct Nwk_Obj_t_
87 {
88  Nwk_Man_t * pMan; // the manager
89  Hop_Obj_t * pFunc; // functionality
90  void * pCopy; // temporary pointer
91  union {
92  void * pNext; // temporary pointer
93  int iTemp; // temporary number
94  };
95  // node information
96  unsigned Type : 3; // object type
97  unsigned fInvert : 1; // complemented attribute
98  unsigned MarkA : 1; // temporary mark
99  unsigned MarkB : 1; // temporary mark
100  unsigned MarkC : 1; // temporary mark
101  unsigned PioId : 25; // number of this node in the PI/PO list
102  int Id; // unique ID
103  int TravId; // traversal ID
104  // timing information
105  int Level; // the topological level
106  float tArrival; // the arrival time
107  float tRequired; // the required time
108  float tSlack; // the slack
109  // fanin/fanout representation
110  int nFanins; // the number of fanins
111  int nFanouts; // the number of fanouts
112  int nFanioAlloc; // the number of allocated fanins/fanouts
113  Nwk_Obj_t ** pFanio; // fanins/fanouts
114 };
115 
116 ////////////////////////////////////////////////////////////////////////
117 /// MACRO DEFINITIONS ///
118 ////////////////////////////////////////////////////////////////////////
119 
120 
121 ////////////////////////////////////////////////////////////////////////
122 /// INLINED FUNCTIONS ///
123 ////////////////////////////////////////////////////////////////////////
124 
125 static inline int Nwk_ManCiNum( Nwk_Man_t * p ) { return p->nObjs[NWK_OBJ_CI]; }
126 static inline int Nwk_ManCoNum( Nwk_Man_t * p ) { return p->nObjs[NWK_OBJ_CO]; }
127 static inline int Nwk_ManNodeNum( Nwk_Man_t * p ) { return p->nObjs[NWK_OBJ_NODE]; }
128 static inline int Nwk_ManLatchNum( Nwk_Man_t * p ) { return p->nObjs[NWK_OBJ_LATCH]; }
129 static inline int Nwk_ManObjNumMax( Nwk_Man_t * p ) { return Vec_PtrSize(p->vObjs); }
130 
131 static inline Nwk_Obj_t * Nwk_ManCi( Nwk_Man_t * p, int i ) { return (Nwk_Obj_t *)Vec_PtrEntry( p->vCis, i ); }
132 static inline Nwk_Obj_t * Nwk_ManCo( Nwk_Man_t * p, int i ) { return (Nwk_Obj_t *)Vec_PtrEntry( p->vCos, i ); }
133 static inline Nwk_Obj_t * Nwk_ManObj( Nwk_Man_t * p, int i ) { return (Nwk_Obj_t *)Vec_PtrEntry( p->vObjs, i ); }
134 
135 static inline int Nwk_ObjId( Nwk_Obj_t * p ) { return p->Id; }
136 static inline int Nwk_ObjPioNum( Nwk_Obj_t * p ) { return p->PioId; }
137 static inline int Nwk_ObjFaninNum( Nwk_Obj_t * p ) { return p->nFanins; }
138 static inline int Nwk_ObjFanoutNum( Nwk_Obj_t * p ) { return p->nFanouts; }
139 
140 static inline Nwk_Obj_t * Nwk_ObjFanin0( Nwk_Obj_t * p ) { return p->pFanio[0]; }
141 static inline Nwk_Obj_t * Nwk_ObjFanout0( Nwk_Obj_t * p ) { return p->pFanio[p->nFanins]; }
142 static inline Nwk_Obj_t * Nwk_ObjFanin( Nwk_Obj_t * p, int i ) { return p->pFanio[i]; }
143 static inline Nwk_Obj_t * Nwk_ObjFanout( Nwk_Obj_t * p, int i ) { return p->pFanio[p->nFanins+1]; }
144 
145 static inline int Nwk_ObjIsNone( Nwk_Obj_t * p ) { return p->Type == NWK_OBJ_NONE; }
146 static inline int Nwk_ObjIsCi( Nwk_Obj_t * p ) { return p->Type == NWK_OBJ_CI; }
147 static inline int Nwk_ObjIsCo( Nwk_Obj_t * p ) { return p->Type == NWK_OBJ_CO; }
148 static inline int Nwk_ObjIsNode( Nwk_Obj_t * p ) { return p->Type == NWK_OBJ_NODE; }
149 static inline int Nwk_ObjIsLatch( Nwk_Obj_t * p ) { return p->Type == NWK_OBJ_LATCH; }
150 static inline int Nwk_ObjIsPi( Nwk_Obj_t * p ) { return Nwk_ObjIsCi(p) && (p->pMan->pManTime == NULL || Tim_ManBoxForCi(p->pMan->pManTime, p->PioId) == -1); }
151 static inline int Nwk_ObjIsPo( Nwk_Obj_t * p ) { return Nwk_ObjIsCo(p) && (p->pMan->pManTime == NULL || Tim_ManBoxForCo(p->pMan->pManTime, p->PioId) == -1); }
152 static inline int Nwk_ObjIsLi( Nwk_Obj_t * p ) { return p->pMan->nTruePos && Nwk_ObjIsCo(p) && (int)p->PioId >= p->pMan->nTruePos; }
153 static inline int Nwk_ObjIsLo( Nwk_Obj_t * p ) { return p->pMan->nTruePis && Nwk_ObjIsCi(p) && (int)p->PioId >= p->pMan->nTruePis; }
154 
155 static inline float Nwk_ObjArrival( Nwk_Obj_t * pObj ) { return pObj->tArrival; }
156 static inline float Nwk_ObjRequired( Nwk_Obj_t * pObj ) { return pObj->tRequired; }
157 static inline float Nwk_ObjSlack( Nwk_Obj_t * pObj ) { return pObj->tSlack; }
158 static inline void Nwk_ObjSetArrival( Nwk_Obj_t * pObj, float Time ) { pObj->tArrival = Time; }
159 static inline void Nwk_ObjSetRequired( Nwk_Obj_t * pObj, float Time ) { pObj->tRequired = Time; }
160 static inline void Nwk_ObjSetSlack( Nwk_Obj_t * pObj, float Time ) { pObj->tSlack = Time; }
161 
162 static inline int Nwk_ObjLevel( Nwk_Obj_t * pObj ) { return pObj->Level; }
163 static inline void Nwk_ObjSetLevel( Nwk_Obj_t * pObj, int Level ) { pObj->Level = Level; }
164 
165 static inline void Nwk_ObjSetTravId( Nwk_Obj_t * pObj, int TravId ) { pObj->TravId = TravId; }
166 static inline void Nwk_ObjSetTravIdCurrent( Nwk_Obj_t * pObj ) { pObj->TravId = pObj->pMan->nTravIds; }
167 static inline void Nwk_ObjSetTravIdPrevious( Nwk_Obj_t * pObj ) { pObj->TravId = pObj->pMan->nTravIds - 1; }
168 static inline int Nwk_ObjIsTravIdCurrent( Nwk_Obj_t * pObj ) { return pObj->TravId == pObj->pMan->nTravIds; }
169 static inline int Nwk_ObjIsTravIdPrevious( Nwk_Obj_t * pObj ) { return pObj->TravId == pObj->pMan->nTravIds - 1; }
170 
171 static inline int Nwk_ManTimeEqual( float f1, float f2, float Eps ) { return (f1 < f2 + Eps) && (f2 < f1 + Eps); }
172 static inline int Nwk_ManTimeLess( float f1, float f2, float Eps ) { return (f1 < f2 + Eps); }
173 static inline int Nwk_ManTimeMore( float f1, float f2, float Eps ) { return (f1 + Eps > f2); }
174 
175 ////////////////////////////////////////////////////////////////////////
176 /// ITERATORS ///
177 ////////////////////////////////////////////////////////////////////////
178 
179 #define Nwk_ManForEachCi( p, pObj, i ) \
180  Vec_PtrForEachEntry( Nwk_Obj_t *, p->vCis, pObj, i )
181 #define Nwk_ManForEachCo( p, pObj, i ) \
182  Vec_PtrForEachEntry( Nwk_Obj_t *, p->vCos, pObj, i )
183 #define Nwk_ManForEachPi( p, pObj, i ) \
184  Vec_PtrForEachEntry( Nwk_Obj_t *, p->vCis, pObj, i ) \
185  if ( !Nwk_ObjIsPi(pObj) ) {} else
186 #define Nwk_ManForEachPo( p, pObj, i ) \
187  Vec_PtrForEachEntry( Nwk_Obj_t *, p->vCos, pObj, i ) \
188  if ( !Nwk_ObjIsPo(pObj) ) {} else
189 #define Nwk_ManForEachObj( p, pObj, i ) \
190  for ( i = 0; (i < Vec_PtrSize(p->vObjs)) && (((pObj) = (Nwk_Obj_t *)Vec_PtrEntry(p->vObjs, i)), 1); i++ ) \
191  if ( pObj == NULL ) {} else
192 #define Nwk_ManForEachNode( p, pObj, i ) \
193  for ( i = 0; (i < Vec_PtrSize(p->vObjs)) && (((pObj) = (Nwk_Obj_t *)Vec_PtrEntry(p->vObjs, i)), 1); i++ ) \
194  if ( (pObj) == NULL || !Nwk_ObjIsNode(pObj) ) {} else
195 #define Nwk_ManForEachLatch( p, pObj, i ) \
196  for ( i = 0; (i < Vec_PtrSize(p->vObjs)) && (((pObj) = (Nwk_Obj_t *)Vec_PtrEntry(p->vObjs, i)), 1); i++ ) \
197  if ( (pObj) == NULL || !Nwk_ObjIsLatch(pObj) ) {} else
198 
199 #define Nwk_ObjForEachFanin( pObj, pFanin, i ) \
200  for ( i = 0; (i < (int)(pObj)->nFanins) && ((pFanin) = (pObj)->pFanio[i]); i++ )
201 #define Nwk_ObjForEachFanout( pObj, pFanout, i ) \
202  for ( i = 0; (i < (int)(pObj)->nFanouts) && ((pFanout) = (pObj)->pFanio[(pObj)->nFanins+i]); i++ )
203 
204 // sequential iterators
205 #define Nwk_ManForEachPiSeq( p, pObj, i ) \
206  Vec_PtrForEachEntryStop( Nwk_Obj_t *, p->vCis, pObj, i, (p)->nTruePis )
207 #define Nwk_ManForEachPoSeq( p, pObj, i ) \
208  Vec_PtrForEachEntryStop( Nwk_Obj_t *, p->vCos, pObj, i, (p)->nTruePos )
209 #define Nwk_ManForEachLoSeq( p, pObj, i ) \
210  for ( i = 0; (i < (p)->nLatches) && (((pObj) = (Nwk_Obj_t *)Vec_PtrEntry(p->vCis, i+(p)->nTruePis)), 1); i++ )
211 #define Nwk_ManForEachLiSeq( p, pObj, i ) \
212  for ( i = 0; (i < (p)->nLatches) && (((pObj) = (Nwk_Obj_t *)Vec_PtrEntry(p->vCos, i+(p)->nTruePos)), 1); i++ )
213 #define Nwk_ManForEachLiLoSeq( p, pObjLi, pObjLo, i ) \
214  for ( i = 0; (i < (p)->nLatches) && (((pObjLi) = Nwk_ManCo(p, i+(p)->nTruePos)), 1) \
215  && (((pObjLo) = Nwk_ManCi(p, i+(p)->nTruePis)), 1); i++ )
216 
217 
218 ////////////////////////////////////////////////////////////////////////
219 /// FUNCTION DECLARATIONS ///
220 ////////////////////////////////////////////////////////////////////////
221 
222 /*=== nwkAig.c ==========================================================*/
223 extern ABC_DLL Vec_Ptr_t * Nwk_ManDeriveRetimingCut( Aig_Man_t * p, int fForward, int fVerbose );
224 /*=== nwkBidec.c ==========================================================*/
225 extern ABC_DLL void Nwk_ManBidecResyn( Nwk_Man_t * pNtk, int fVerbose );
226 extern ABC_DLL Hop_Obj_t * Nwk_NodeIfNodeResyn( Bdc_Man_t * p, Hop_Man_t * pHop, Hop_Obj_t * pRoot, int nVars, Vec_Int_t * vTruth, unsigned * puCare, float dProb );
227 /*=== nwkCheck.c ==========================================================*/
228 extern ABC_DLL int Nwk_ManCheck( Nwk_Man_t * p );
229 /*=== nwkDfs.c ==========================================================*/
230 extern ABC_DLL int Nwk_ManVerifyTopoOrder( Nwk_Man_t * pNtk );
231 extern ABC_DLL int Nwk_ManLevelBackup( Nwk_Man_t * pNtk );
232 extern ABC_DLL int Nwk_ManLevel( Nwk_Man_t * pNtk );
233 extern ABC_DLL int Nwk_ManLevelMax( Nwk_Man_t * pNtk );
234 extern ABC_DLL Vec_Vec_t * Nwk_ManLevelize( Nwk_Man_t * pNtk );
235 extern ABC_DLL Vec_Ptr_t * Nwk_ManDfs( Nwk_Man_t * pNtk );
236 extern ABC_DLL Vec_Ptr_t * Nwk_ManDfsNodes( Nwk_Man_t * pNtk, Nwk_Obj_t ** ppNodes, int nNodes );
237 extern ABC_DLL Vec_Ptr_t * Nwk_ManDfsReverse( Nwk_Man_t * pNtk );
238 extern ABC_DLL Vec_Ptr_t * Nwk_ManSupportNodes( Nwk_Man_t * pNtk, Nwk_Obj_t ** ppNodes, int nNodes );
239 extern ABC_DLL void Nwk_ManSupportSum( Nwk_Man_t * pNtk );
240 extern ABC_DLL int Nwk_ObjMffcLabel( Nwk_Obj_t * pNode );
241 /*=== nwkFanio.c ==========================================================*/
242 extern ABC_DLL void Nwk_ObjCollectFanins( Nwk_Obj_t * pNode, Vec_Ptr_t * vNodes );
243 extern ABC_DLL void Nwk_ObjCollectFanouts( Nwk_Obj_t * pNode, Vec_Ptr_t * vNodes );
244 extern ABC_DLL int Nwk_ObjFindFanin( Nwk_Obj_t * pObj, Nwk_Obj_t * pFanin );
245 extern ABC_DLL int Nwk_ObjFindFanout( Nwk_Obj_t * pObj, Nwk_Obj_t * pFanout );
246 extern ABC_DLL void Nwk_ObjAddFanin( Nwk_Obj_t * pObj, Nwk_Obj_t * pFanin );
247 extern ABC_DLL void Nwk_ObjDeleteFanin( Nwk_Obj_t * pObj, Nwk_Obj_t * pFanin );
248 extern ABC_DLL void Nwk_ObjPatchFanin( Nwk_Obj_t * pObj, Nwk_Obj_t * pFaninOld, Nwk_Obj_t * pFaninNew );
249 extern ABC_DLL void Nwk_ObjTransferFanout( Nwk_Obj_t * pNodeFrom, Nwk_Obj_t * pNodeTo );
250 extern ABC_DLL void Nwk_ObjReplace( Nwk_Obj_t * pNodeOld, Nwk_Obj_t * pNodeNew );
251 /*=== nwkFlow.c ============================================================*/
252 extern ABC_DLL Vec_Ptr_t * Nwk_ManRetimeCutForward( Nwk_Man_t * pMan, int nLatches, int fVerbose );
253 extern ABC_DLL Vec_Ptr_t * Nwk_ManRetimeCutBackward( Nwk_Man_t * pMan, int nLatches, int fVerbose );
254 /*=== nwkMan.c ============================================================*/
255 extern ABC_DLL Nwk_Man_t * Nwk_ManAlloc();
256 extern ABC_DLL void Nwk_ManFree( Nwk_Man_t * p );
257 extern ABC_DLL float Nwl_ManComputeTotalSwitching( Nwk_Man_t * pNtk );
258 extern ABC_DLL void Nwk_ManPrintStats( Nwk_Man_t * p, If_LibLut_t * pLutLib, int fSaveBest, int fDumpResult, int fPower, Ntl_Man_t * pNtl );
259 /*=== nwkMap.c ============================================================*/
260 extern ABC_DLL Nwk_Man_t * Nwk_MappingIf( Aig_Man_t * p, Tim_Man_t * pManTime, If_Par_t * pPars );
261 /*=== nwkObj.c ============================================================*/
262 extern ABC_DLL Nwk_Obj_t * Nwk_ManCreateCi( Nwk_Man_t * pMan, int nFanouts );
263 extern ABC_DLL Nwk_Obj_t * Nwk_ManCreateCo( Nwk_Man_t * pMan );
264 extern ABC_DLL Nwk_Obj_t * Nwk_ManCreateNode( Nwk_Man_t * pMan, int nFanins, int nFanouts );
265 extern ABC_DLL Nwk_Obj_t * Nwk_ManCreateBox( Nwk_Man_t * pMan, int nFanins, int nFanouts );
266 extern ABC_DLL Nwk_Obj_t * Nwk_ManCreateLatch( Nwk_Man_t * pMan );
267 extern ABC_DLL void Nwk_ManDeleteNode( Nwk_Obj_t * pObj );
268 extern ABC_DLL void Nwk_ManDeleteNode_rec( Nwk_Obj_t * pObj );
269 /*=== nwkSpeedup.c ============================================================*/
270 extern ABC_DLL Aig_Man_t * Nwk_ManSpeedup( Nwk_Man_t * pNtk, int fUseLutLib, int Percentage, int Degree, int fVerbose, int fVeryVerbose );
271 /*=== nwkStrash.c ============================================================*/
272 extern ABC_DLL Aig_Man_t * Nwk_ManStrash( Nwk_Man_t * pNtk );
273 /*=== nwkTiming.c ============================================================*/
274 extern ABC_DLL int Nwk_ManVerifyTiming( Nwk_Man_t * pNtk );
275 extern ABC_DLL void Nwk_ManDelayTraceSortPins( Nwk_Obj_t * pNode, int * pPinPerm, float * pPinDelays );
276 extern ABC_DLL float Nwk_ManDelayTraceLut( Nwk_Man_t * pNtk );
277 extern ABC_DLL void Nwk_ManDelayTracePrint( Nwk_Man_t * pNtk );
278 extern ABC_DLL void Nwk_ManUpdate( Nwk_Obj_t * pObj, Nwk_Obj_t * pObjNew, Vec_Vec_t * vLevels );
279 extern ABC_DLL int Nwk_ManVerifyLevel( Nwk_Man_t * pNtk );
280 /*=== nwkUtil.c ============================================================*/
281 extern ABC_DLL void Nwk_ManIncrementTravId( Nwk_Man_t * pNtk );
282 extern ABC_DLL int Nwk_ManGetFaninMax( Nwk_Man_t * pNtk );
283 extern ABC_DLL int Nwk_ManGetTotalFanins( Nwk_Man_t * pNtk );
284 extern ABC_DLL int Nwk_ManPiNum( Nwk_Man_t * pNtk );
285 extern ABC_DLL int Nwk_ManPoNum( Nwk_Man_t * pNtk );
286 extern ABC_DLL int Nwk_ManGetAigNodeNum( Nwk_Man_t * pNtk );
287 extern ABC_DLL int Nwk_NodeCompareLevelsIncrease( Nwk_Obj_t ** pp1, Nwk_Obj_t ** pp2 );
288 extern ABC_DLL int Nwk_NodeCompareLevelsDecrease( Nwk_Obj_t ** pp1, Nwk_Obj_t ** pp2 );
289 extern ABC_DLL void Nwk_ObjPrint( Nwk_Obj_t * pObj );
290 extern ABC_DLL void Nwk_ManDumpBlif( Nwk_Man_t * pNtk, char * pFileName, Vec_Ptr_t * vCiNames, Vec_Ptr_t * vCoNames );
291 extern ABC_DLL void Nwk_ManPrintFanioNew( Nwk_Man_t * pNtk );
292 extern ABC_DLL void Nwk_ManCleanMarks( Nwk_Man_t * pNtk );
293 extern ABC_DLL void Nwk_ManMinimumBase( Nwk_Man_t * pNtk, int fVerbose );
294 extern ABC_DLL void Nwk_ManRemoveDupFanins( Nwk_Man_t * pNtk, int fVerbose );
295 
296 
297 
299 
300 
301 
302 #endif
303 
304 ////////////////////////////////////////////////////////////////////////
305 /// END OF FILE ///
306 ////////////////////////////////////////////////////////////////////////
307 
int Tim_ManBoxForCi(Tim_Man_t *p, int iCo)
Definition: timBox.c:86
ABC_DLL int Nwk_ObjFindFanout(Nwk_Obj_t *pObj, Nwk_Obj_t *pFanout)
Definition: nwkFanio.c:106
static Nwk_Obj_t * Nwk_ManCo(Nwk_Man_t *p, int i)
Definition: nwk.h:132
ABC_DLL int Nwk_ManLevelBackup(Nwk_Man_t *pNtk)
Definition: nwkDfs.c:102
static int Nwk_ObjIsCi(Nwk_Obj_t *p)
Definition: nwk.h:146
ABC_DLL Aig_Man_t * Nwk_ManSpeedup(Nwk_Man_t *pNtk, int fUseLutLib, int Percentage, int Degree, int fVerbose, int fVeryVerbose)
Definition: nwkSpeedup.c:203
static Nwk_Obj_t * Nwk_ManCi(Nwk_Man_t *p, int i)
Definition: nwk.h:131
unsigned MarkC
Definition: nwk.h:100
typedefABC_NAMESPACE_HEADER_START struct Vec_Ptr_t_ Vec_Ptr_t
INCLUDES ///.
Definition: vecPtr.h:42
ABC_DLL void Nwk_ManDeleteNode_rec(Nwk_Obj_t *pObj)
Definition: nwkObj.c:183
static int Nwk_ObjFanoutNum(Nwk_Obj_t *p)
Definition: nwk.h:138
ABC_DLL void Nwk_ManCleanMarks(Nwk_Man_t *pNtk)
Definition: nwkUtil.c:464
ABC_DLL int Nwk_ManLevel(Nwk_Man_t *pNtk)
Definition: nwkDfs.c:215
ABC_DLL int Nwk_ManVerifyLevel(Nwk_Man_t *pNtk)
Definition: nwkTiming.c:832
ABC_DLL Vec_Ptr_t * Nwk_ManRetimeCutForward(Nwk_Man_t *pMan, int nLatches, int fVerbose)
Definition: nwkFlow.c:442
ABC_DLL int Nwk_ManPoNum(Nwk_Man_t *pNtk)
Definition: nwkUtil.c:135
ABC_DLL void Nwk_ManDeleteNode(Nwk_Obj_t *pObj)
Definition: nwkObj.c:155
static int Nwk_ManLatchNum(Nwk_Man_t *p)
Definition: nwk.h:128
typedefABC_NAMESPACE_HEADER_START struct Vec_Vec_t_ Vec_Vec_t
INCLUDES ///.
Definition: vecVec.h:42
ABC_DLL void Nwk_ObjTransferFanout(Nwk_Obj_t *pNodeFrom, Nwk_Obj_t *pNodeTo)
Definition: nwkFanio.c:272
static int Nwk_ManTimeLess(float f1, float f2, float Eps)
Definition: nwk.h:172
int nTruePis
Definition: nwk.h:82
typedefABC_NAMESPACE_HEADER_START struct Aig_Man_t_ Aig_Man_t
INCLUDES ///.
Definition: aig.h:50
unsigned MarkA
Definition: nwk.h:98
typedefABC_NAMESPACE_HEADER_START struct Nwk_Obj_t_ Nwk_Obj_t
INCLUDES ///.
Definition: nwk.h:49
static Llb_Mgr_t * p
Definition: llb3Image.c:950
Definition: if.h:100
ABC_DLL void Nwk_ManPrintStats(Nwk_Man_t *p, If_LibLut_t *pLutLib, int fSaveBest, int fDumpResult, int fPower, Ntl_Man_t *pNtl)
Definition: nwkMan.c:234
int nFanins
Definition: nwk.h:110
typedefABC_NAMESPACE_IMPL_START struct Vec_Int_t_ Vec_Int_t
DECLARATIONS ///.
Definition: bblif.c:37
static float Nwk_ObjSlack(Nwk_Obj_t *pObj)
Definition: nwk.h:157
char * pSpec
Definition: nwk.h:65
Nwk_Man_t * pMan
Definition: nwk.h:88
ABC_DLL Nwk_Obj_t * Nwk_ManCreateBox(Nwk_Man_t *pMan, int nFanins, int nFanouts)
float tSlack
Definition: nwk.h:108
ABC_DLL Vec_Ptr_t * Nwk_ManDfsReverse(Nwk_Man_t *pNtk)
Definition: nwkDfs.c:451
int Tim_ManBoxForCo(Tim_Man_t *p, int iCi)
Definition: timBox.c:104
static void Nwk_ObjSetSlack(Nwk_Obj_t *pObj, float Time)
Definition: nwk.h:160
unsigned Type
Definition: nwk.h:96
static void Nwk_ObjSetTravId(Nwk_Obj_t *pObj, int TravId)
Definition: nwk.h:165
ABC_DLL void Nwk_ManFree(Nwk_Man_t *p)
Definition: nwkMan.c:71
ABC_DLL int Nwk_ObjMffcLabel(Nwk_Obj_t *pNode)
Definition: nwkDfs.c:644
static int Nwk_ObjId(Nwk_Obj_t *p)
Definition: nwk.h:135
static int Nwk_ObjIsPi(Nwk_Obj_t *p)
Definition: nwk.h:150
Hop_Obj_t * pFunc
Definition: nwk.h:89
unsigned MarkB
Definition: nwk.h:99
ABC_DLL void Nwk_ManDelayTracePrint(Nwk_Man_t *pNtk)
Definition: nwkTiming.c:459
ABC_DLL void Nwk_ManDumpBlif(Nwk_Man_t *pNtk, char *pFileName, Vec_Ptr_t *vCiNames, Vec_Ptr_t *vCoNames)
Definition: nwkUtil.c:257
Aig_MmFlex_t * pMemObjs
Definition: nwk.h:76
ABC_DLL int Nwk_NodeCompareLevelsIncrease(Nwk_Obj_t **pp1, Nwk_Obj_t **pp2)
Definition: nwkUtil.c:184
Vec_Ptr_t * vCos
Definition: nwk.h:68
char * pName
Definition: nwk.h:64
ABC_DLL int Nwk_ManGetAigNodeNum(Nwk_Man_t *pNtk)
Definition: nwkUtil.c:155
unsigned PioId
Definition: nwk.h:101
ABC_DLL void Nwk_ObjReplace(Nwk_Obj_t *pNodeOld, Nwk_Obj_t *pNodeNew)
Definition: nwkFanio.c:302
static int Vec_PtrSize(Vec_Ptr_t *p)
Definition: vecPtr.h:295
ABC_DLL void Nwk_ManSupportSum(Nwk_Man_t *pNtk)
Definition: nwkDfs.c:538
ABC_DLL int Nwk_ManLevelMax(Nwk_Man_t *pNtk)
Definition: nwkDfs.c:248
ABC_DLL void Nwk_ManUpdate(Nwk_Obj_t *pObj, Nwk_Obj_t *pObjNew, Vec_Vec_t *vLevels)
Definition: nwkTiming.c:860
Definition: hop.h:65
static int Nwk_ObjFaninNum(Nwk_Obj_t *p)
Definition: nwk.h:137
ABC_DLL int Nwk_ObjFindFanin(Nwk_Obj_t *pObj, Nwk_Obj_t *pFanin)
Definition: nwkFanio.c:85
ABC_DLL Vec_Vec_t * Nwk_ManLevelize(Nwk_Man_t *pNtk)
Definition: nwkDfs.c:269
#define ABC_DLL
Definition: abc_global.h:53
ABC_DLL Vec_Ptr_t * Nwk_ManRetimeCutBackward(Nwk_Man_t *pMan, int nLatches, int fVerbose)
Definition: nwkFlow.c:523
ABC_DLL Nwk_Obj_t * Nwk_ManCreateLatch(Nwk_Man_t *pMan)
Definition: nwkObj.c:114
ABC_DLL void Nwk_ObjCollectFanouts(Nwk_Obj_t *pNode, Vec_Ptr_t *vNodes)
Definition: nwkFanio.c:65
static void Nwk_ObjSetTravIdCurrent(Nwk_Obj_t *pObj)
Definition: nwk.h:166
Vec_Ptr_t * vCis
Definition: nwk.h:67
typedefABC_NAMESPACE_HEADER_START struct Ntl_Man_t_ Ntl_Man_t
INCLUDES ///.
Definition: ntlnwk.h:40
void * pCopy
Definition: nwk.h:90
ABC_DLL int Nwk_NodeCompareLevelsDecrease(Nwk_Obj_t **pp1, Nwk_Obj_t **pp2)
Definition: nwkUtil.c:205
ABC_DLL int Nwk_ManVerifyTiming(Nwk_Man_t *pNtk)
Definition: nwkTiming.c:427
ABC_DLL void Nwk_ManMinimumBase(Nwk_Man_t *pNtk, int fVerbose)
Definition: nwkUtil.c:563
ABC_DLL float Nwl_ManComputeTotalSwitching(Nwk_Man_t *pNtk)
Definition: nwkMan.c:198
static float Nwk_ObjArrival(Nwk_Obj_t *pObj)
Definition: nwk.h:155
ABC_DLL Vec_Ptr_t * Nwk_ManDfs(Nwk_Man_t *pNtk)
Definition: nwkDfs.c:321
ABC_DLL void Nwk_ObjPrint(Nwk_Obj_t *pObj)
Definition: nwkUtil.c:226
ABC_DLL Aig_Man_t * Nwk_ManStrash(Nwk_Man_t *pNtk)
Definition: nwkStrash.c:99
static int Nwk_ObjIsLo(Nwk_Obj_t *p)
Definition: nwk.h:153
Hop_Man_t * pManHop
Definition: nwk.h:73
ABC_DLL void Nwk_ManBidecResyn(Nwk_Man_t *pNtk, int fVerbose)
Definition: nwkBidec.c:129
ABC_DLL Nwk_Man_t * Nwk_MappingIf(Aig_Man_t *p, Tim_Man_t *pManTime, If_Par_t *pPars)
Definition: nwkMap.c:360
static int Nwk_ObjIsCo(Nwk_Obj_t *p)
Definition: nwk.h:147
Definition: nwk.h:61
Definition: nwk.h:54
static int Nwk_ObjIsTravIdCurrent(Nwk_Obj_t *pObj)
Definition: nwk.h:168
int nObjs[NWK_OBJ_VOID]
Definition: nwk.h:70
static int Nwk_ObjIsLatch(Nwk_Obj_t *p)
Definition: nwk.h:149
If_LibLut_t * pLutLib
Definition: nwk.h:75
void * pNext
Definition: nwk.h:92
float tRequired
Definition: nwk.h:107
ABC_DLL int Nwk_ManPiNum(Nwk_Man_t *pNtk)
Definition: nwkUtil.c:115
ABC_DLL Nwk_Man_t * Nwk_ManAlloc()
DECLARATIONS ///.
Definition: nwkMan.c:45
ABC_DLL void Nwk_ManDelayTraceSortPins(Nwk_Obj_t *pNode, int *pPinPerm, float *pPinDelays)
Definition: nwkTiming.c:67
static int Nwk_ObjIsPo(Nwk_Obj_t *p)
Definition: nwk.h:151
static int Nwk_ObjIsNone(Nwk_Obj_t *p)
Definition: nwk.h:145
static void Nwk_ObjSetTravIdPrevious(Nwk_Obj_t *pObj)
Definition: nwk.h:167
ABC_DLL Nwk_Obj_t * Nwk_ManCreateCo(Nwk_Man_t *pMan)
Definition: nwkObj.c:92
int iTemp
Definition: nwk.h:93
ABC_DLL void Nwk_ManIncrementTravId(Nwk_Man_t *pNtk)
DECLARATIONS ///.
Definition: nwkUtil.c:47
ABC_DLL Vec_Ptr_t * Nwk_ManDeriveRetimingCut(Aig_Man_t *p, int fForward, int fVerbose)
FUNCTION DECLARATIONS ///.
Definition: nwkAig.c:85
#define ABC_NAMESPACE_HEADER_START
NAMESPACES ///.
Definition: abc_global.h:105
int nRealloced
Definition: nwk.h:79
int Level
Definition: nwk.h:105
Tim_Man_t * pManTime
Definition: nwk.h:74
ABC_DLL Hop_Obj_t * Nwk_NodeIfNodeResyn(Bdc_Man_t *p, Hop_Man_t *pHop, Hop_Obj_t *pRoot, int nVars, Vec_Int_t *vTruth, unsigned *puCare, float dProb)
FUNCTION DEFINITIONS ///.
Definition: nwkBidec.c:67
#define ABC_NAMESPACE_HEADER_END
Definition: abc_global.h:106
Vec_Ptr_t * vObjs
Definition: nwk.h:69
static int Nwk_ObjIsNode(Nwk_Obj_t *p)
Definition: nwk.h:148
ABC_DLL int Nwk_ManVerifyTopoOrder(Nwk_Man_t *pNtk)
DECLARATIONS ///.
Definition: nwkDfs.c:45
int nFanouts
Definition: nwk.h:111
ABC_DLL int Nwk_ManGetFaninMax(Nwk_Man_t *pNtk)
Definition: nwkUtil.c:71
static int Nwk_ManCiNum(Nwk_Man_t *p)
MACRO DEFINITIONS ///.
Definition: nwk.h:125
static void * Vec_PtrEntry(Vec_Ptr_t *p, int i)
Definition: vecPtr.h:362
Vec_Ptr_t * vTemp
Definition: nwk.h:77
static int Nwk_ObjPioNum(Nwk_Obj_t *p)
Definition: nwk.h:136
ABC_DLL int Nwk_ManCheck(Nwk_Man_t *p)
DECLARATIONS ///.
Definition: nwkCheck.c:45
ABC_DLL void Nwk_ObjCollectFanins(Nwk_Obj_t *pNode, Vec_Ptr_t *vNodes)
DECLARATIONS ///.
Definition: nwkFanio.c:45
ABC_DLL Nwk_Obj_t * Nwk_ManCreateCi(Nwk_Man_t *pMan, int nFanouts)
Definition: nwkObj.c:70
static void Nwk_ObjSetArrival(Nwk_Obj_t *pObj, float Time)
Definition: nwk.h:158
ABC_DLL void Nwk_ManRemoveDupFanins(Nwk_Man_t *pNtk, int fVerbose)
Definition: nwkUtil.c:608
static void Nwk_ObjSetLevel(Nwk_Obj_t *pObj, int Level)
Definition: nwk.h:163
static int Nwk_ManTimeEqual(float f1, float f2, float Eps)
Definition: nwk.h:171
static Nwk_Obj_t * Nwk_ObjFanin(Nwk_Obj_t *p, int i)
Definition: nwk.h:142
static int Nwk_ManObjNumMax(Nwk_Man_t *p)
Definition: nwk.h:129
static int Nwk_ObjIsTravIdPrevious(Nwk_Obj_t *pObj)
Definition: nwk.h:169
ABC_DLL float Nwk_ManDelayTraceLut(Nwk_Man_t *pNtk)
Definition: nwkTiming.c:326
ABC_DLL void Nwk_ObjDeleteFanin(Nwk_Obj_t *pObj, Nwk_Obj_t *pFanin)
Definition: nwkFanio.c:192
ABC_DLL void Nwk_ManPrintFanioNew(Nwk_Man_t *pNtk)
Definition: nwkUtil.c:357
int nFanioAlloc
Definition: nwk.h:112
Definition: nwk.h:55
unsigned fInvert
Definition: nwk.h:97
ABC_DLL int Nwk_ManGetTotalFanins(Nwk_Man_t *pNtk)
Definition: nwkUtil.c:94
ABC_DLL Vec_Ptr_t * Nwk_ManDfsNodes(Nwk_Man_t *pNtk, Nwk_Obj_t **ppNodes, int nNodes)
Definition: nwkDfs.c:378
static int Nwk_ManNodeNum(Nwk_Man_t *p)
Definition: nwk.h:127
static Nwk_Obj_t * Nwk_ObjFanin0(Nwk_Obj_t *p)
Definition: nwk.h:140
static int Nwk_ObjLevel(Nwk_Obj_t *pObj)
Definition: nwk.h:162
float tArrival
Definition: nwk.h:106
ABC_DLL void Nwk_ObjAddFanin(Nwk_Obj_t *pObj, Nwk_Obj_t *pFanin)
Definition: nwkFanio.c:165
static int Nwk_ObjIsLi(Nwk_Obj_t *p)
Definition: nwk.h:152
typedefABC_NAMESPACE_HEADER_START struct Tim_Man_t_ Tim_Man_t
INCLUDES ///.
Definition: tim.h:92
int nTravIds
Definition: nwk.h:78
static float Nwk_ObjRequired(Nwk_Obj_t *pObj)
Definition: nwk.h:156
int nLatches
Definition: nwk.h:81
static Nwk_Obj_t * Nwk_ObjFanout0(Nwk_Obj_t *p)
Definition: nwk.h:141
ABC_DLL Vec_Ptr_t * Nwk_ManSupportNodes(Nwk_Man_t *pNtk, Nwk_Obj_t **ppNodes, int nNodes)
Definition: nwkDfs.c:510
int Id
Definition: nwk.h:102
static Nwk_Obj_t * Nwk_ObjFanout(Nwk_Obj_t *p, int i)
Definition: nwk.h:143
static void Nwk_ObjSetRequired(Nwk_Obj_t *pObj, float Time)
Definition: nwk.h:159
typedefABC_NAMESPACE_HEADER_START struct Hop_Man_t_ Hop_Man_t
INCLUDES ///.
Definition: hop.h:49
Definition: nwk.h:86
static int Nwk_ManTimeMore(float f1, float f2, float Eps)
Definition: nwk.h:173
int TravId
Definition: nwk.h:103
ABC_DLL void Nwk_ObjPatchFanin(Nwk_Obj_t *pObj, Nwk_Obj_t *pFaninOld, Nwk_Obj_t *pFaninNew)
Definition: nwkFanio.c:231
int nTruePos
Definition: nwk.h:83
static Nwk_Obj_t * Nwk_ManObj(Nwk_Man_t *p, int i)
Definition: nwk.h:133
static int Nwk_ManCoNum(Nwk_Man_t *p)
Definition: nwk.h:126
ABC_DLL Nwk_Obj_t * Nwk_ManCreateNode(Nwk_Man_t *pMan, int nFanins, int nFanouts)
Definition: nwkObj.c:134
Nwk_Type_t
Definition: nwk.h:52
Nwk_Obj_t ** pFanio
Definition: nwk.h:113
int nFanioPlus
Definition: nwk.h:71