abc-master
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros
abcDress2.c
Go to the documentation of this file.
1 /**CFile****************************************************************
2 
3  FileName [abcDressw.c]
4 
5  SystemName [ABC: Logic synthesis and verification system.]
6 
7  PackageName [Network and node package.]
8 
9  Synopsis [Transfers names from one netlist to the other.]
10 
11  Author [Alan Mishchenko]
12 
13  Affiliation [UC Berkeley]
14 
15  Date [Ver. 1.0. Started - June 20, 2005.]
16 
17  Revision [$Id: abcDressw.c,v 1.00 2005/06/20 00:00:00 alanmi Exp $]
18 
19 ***********************************************************************/
20 
21 #include "base/abc/abc.h"
22 #include "aig/aig/aig.h"
23 #include "proof/dch/dch.h"
24 
26 
27 
28 /*
29  Procedure Abc_NtkDressComputeEquivs() implemented in this file computes
30  equivalence classes of objects of the two networks (pNtk1 and pNtk2).
31 
32  It is possible that pNtk1 is the network before synthesis and pNtk2 is the
33  network after synthesis. The equiv classes of nodes from these networks
34  can be used to transfer the names from pNtk1 to pNtk2, or vice versa.
35 
36  The above procedure returns the array (Vec_Ptr_t) of integer arrays (Vec_Int_t).
37  Each of the integer arrays contains entries of one equivalence class.
38  Each entry (EquivId) contains the following information:
39  (1) object ID, which is a number 'num', such that 0 <= 'num' < MaxId
40  where MaxId is the largest ID of nodes in a network
41  (2) the polarity of the node, which is a binary number, 0 or 1, giving
42  the node's value when pattern (000...0) is applied to the inputs
43  (3) the number of the network, 0 or 1, which stands for pNtk1 and pNtk2, respectively
44  The first array in the array of arrays is empty, or contains nodes that
45  are equivalent to a constant (if such nodes appear in the network).
46 
47  Given EquivID defined above, use the APIs below to get its components.
48 */
49 
50 // declarations to be added to the application code
51 extern int Abc_ObjEquivId2ObjId( int EquivId );
52 extern int Abc_ObjEquivId2Polar( int EquivId );
53 extern int Abc_ObjEquivId2NtkId( int EquivId );
54 
55 // definition that may remain in this file
56 int Abc_ObjEquivId2ObjId( int EquivId ) { return EquivId >> 2; }
57 int Abc_ObjEquivId2Polar( int EquivId ) { return (EquivId >> 1) & 1; }
58 int Abc_ObjEquivId2NtkId( int EquivId ) { return EquivId & 1; }
59 
60 ////////////////////////////////////////////////////////////////////////
61 /// DECLARATIONS ///
62 ////////////////////////////////////////////////////////////////////////
63 
64 extern Aig_Man_t * Abc_NtkToDar( Abc_Ntk_t * pNtk, int fExors, int fRegisters );
65 extern void Dch_ComputeEquivalences( Aig_Man_t * pAig, Dch_Pars_t * pPars );
66 
67 ////////////////////////////////////////////////////////////////////////
68 /// FUNCTION DEFINITIONS ///
69 ////////////////////////////////////////////////////////////////////////
70 
71 /**Function*************************************************************
72 
73  Synopsis [Creates the dual-output miter.]
74 
75  Description []
76 
77  SideEffects []
78 
79  SeeAlso []
80 
81 ***********************************************************************/
83 {
84  Aig_Man_t * pNew;
85  Aig_Obj_t * pObj;
86  int i;
87  assert( Aig_ManCiNum(p1) == Aig_ManCiNum(p2) );
88  assert( Aig_ManCoNum(p1) == Aig_ManCoNum(p2) );
90  // add first AIG
91  Aig_ManConst1(p1)->pData = Aig_ManConst1(pNew);
92  Aig_ManForEachCi( p1, pObj, i )
93  pObj->pData = Aig_ObjCreateCi( pNew );
94  Aig_ManForEachNode( p1, pObj, i )
95  pObj->pData = Aig_And( pNew, Aig_ObjChild0Copy(pObj), Aig_ObjChild1Copy(pObj) );
96  // add second AIG
97  Aig_ManConst1(p2)->pData = Aig_ManConst1(pNew);
98  Aig_ManForEachCi( p2, pObj, i )
99  pObj->pData = Aig_ManCi( pNew, i );
100  Aig_ManForEachNode( p2, pObj, i )
101  pObj->pData = Aig_And( pNew, Aig_ObjChild0Copy(pObj), Aig_ObjChild1Copy(pObj) );
102  // add the outputs
103  for ( i = 0; i < Aig_ManCoNum(p1); i++ )
104  {
107  }
108  Aig_ManCleanup( pNew );
109  return pNew;
110 }
111 
112 /**Function*************************************************************
113 
114  Synopsis [Sets polarity attribute of each object in the network.]
115 
116  Description []
117 
118  SideEffects []
119 
120  SeeAlso []
121 
122 ***********************************************************************/
124 {
125  Abc_Obj_t * pObj, * pAnd;
126  int i;
127  // each node refers to the the strash copy whose polarity is set
128  Abc_NtkForEachObj( pNtk, pObj, i )
129  {
130  if ( (pAnd = Abc_ObjRegular(pObj->pCopy)) && Abc_ObjType(pAnd) != ABC_OBJ_NONE ) // strashed object is present and legal
131  pObj->fPhase = pAnd->fPhase ^ Abc_ObjIsComplement(pObj->pCopy);
132  }
133 }
134 
135 /**Function*************************************************************
136 
137  Synopsis [Create mapping of node IDs of pNtk into equiv classes of pMiter.]
138 
139  Description []
140 
141  SideEffects []
142 
143  SeeAlso []
144 
145 ***********************************************************************/
147 {
148  Vec_Int_t * vId2Lit;
149  Abc_Obj_t * pObj, * pAnd;
150  Aig_Obj_t * pObjMan, * pObjMiter, * pObjRepr;
151  int i;
152  vId2Lit = Vec_IntAlloc( 0 );
153  Vec_IntFill( vId2Lit, Abc_NtkObjNumMax(pNtk), -1 );
154  Abc_NtkForEachNode( pNtk, pObj, i )
155  {
156  // get the pointer to the miter node corresponding to pObj
157  if ( (pAnd = Abc_ObjRegular(pObj->pCopy)) && Abc_ObjType(pAnd) != ABC_OBJ_NONE && // strashed node is present and legal
158  (pObjMan = Aig_Regular((Aig_Obj_t *)pAnd->pCopy)) && Aig_ObjType(pObjMan) != AIG_OBJ_NONE && // AIG node is present and legal
159  (pObjMiter = Aig_Regular((Aig_Obj_t *)pObjMan->pData)) && Aig_ObjType(pObjMiter) != AIG_OBJ_NONE ) // miter node is present and legal
160  {
161  // get the representative of the miter node
162  pObjRepr = Aig_ObjRepr( pMiter, pObjMiter );
163  pObjRepr = pObjRepr? pObjRepr : pObjMiter;
164  // map pObj (whose ID is i) into the repr node ID (i.e. equiv class)
165  Vec_IntWriteEntry( vId2Lit, i, Aig_ObjId(pObjRepr) );
166  }
167  }
168  return vId2Lit;
169 }
170 
171 /**Function*************************************************************
172 
173  Synopsis [Returns the vector of given equivalence class of objects.]
174 
175  Description []
176 
177  SideEffects []
178 
179  SeeAlso []
180 
181 ***********************************************************************/
182 Vec_Int_t * Abc_ObjDressClass( Vec_Ptr_t * vRes, Vec_Int_t * vClass2Num, int Class )
183 {
184  int ClassNumber;
185  assert( Class > 0 );
186  ClassNumber = Vec_IntEntry( vClass2Num, Class );
187  assert( ClassNumber != 0 );
188  if ( ClassNumber > 0 )
189  return (Vec_Int_t *)Vec_PtrEntry( vRes, ClassNumber ); // previous class
190  // create new class
191  Vec_IntWriteEntry( vClass2Num, Class, Vec_PtrSize(vRes) );
192  Vec_PtrPush( vRes, Vec_IntAlloc(4) );
193  return (Vec_Int_t *)Vec_PtrEntryLast( vRes );
194 }
195 
196 /**Function*************************************************************
197 
198  Synopsis [Returns the ID of a node in an equivalence class.]
199 
200  Description [The ID is composed of three parts: object ID, followed
201  by one bit telling the phase of this node, followed by one bit
202  telling the network to which this node belongs.]
203 
204  SideEffects []
205 
206  SeeAlso []
207 
208 ***********************************************************************/
209 int Abc_ObjDressMakeId( Abc_Ntk_t * pNtk, int ObjId, int iNtk )
210 {
211  return (ObjId << 2) | (Abc_NtkObj(pNtk,ObjId)->fPhase << 1) | iNtk;
212 }
213 
214 /**Function*************************************************************
215 
216  Synopsis [Computes equivalence classes of objects in pNtk1 and pNtk2.]
217 
218  Description [Internal procedure.]
219 
220  SideEffects []
221 
222  SeeAlso []
223 
224 ***********************************************************************/
226 {
227  Vec_Ptr_t * vRes;
228  Vec_Int_t * vId2Lit1, * vId2Lit2, * vCounts0, * vCounts1, * vClassC, * vClass2Num;
229  int i, Class;
230  // start the classes
231  vRes = Vec_PtrAlloc( 1000 );
232  // set polarity of the nodes
235  // create mapping of node IDs of pNtk1/pNtk2 into the IDs of equiv classes of pMiter
236  vId2Lit1 = Abc_NtkDressMapClasses( pMiter, pNtk1 );
237  vId2Lit2 = Abc_NtkDressMapClasses( pMiter, pNtk2 );
238  // count the number of nodes in each equivalence class
239  vCounts0 = Vec_IntStart( Aig_ManObjNumMax(pMiter) );
240  Vec_IntForEachEntry( vId2Lit1, Class, i )
241  if ( Class >= 0 )
242  Vec_IntAddToEntry( vCounts0, Class, 1 );
243  vCounts1 = Vec_IntStart( Aig_ManObjNumMax(pMiter) );
244  Vec_IntForEachEntry( vId2Lit2, Class, i )
245  if ( Class >= 0 )
246  Vec_IntAddToEntry( vCounts1, Class, 1 );
247  // get the costant class
248  vClassC = Vec_IntAlloc( 100 );
249  Vec_IntForEachEntry( vId2Lit1, Class, i )
250  if ( Class == 0 )
251  Vec_IntPush( vClassC, Abc_ObjDressMakeId(pNtk1, i, 0) );
252  Vec_IntForEachEntry( vId2Lit2, Class, i )
253  if ( Class == 0 )
254  Vec_IntPush( vClassC, Abc_ObjDressMakeId(pNtk2, i, 1) );
255  Vec_PtrPush( vRes, vClassC );
256  // map repr node IDs into class numbers
257  vClass2Num = Vec_IntAlloc( 0 );
258  Vec_IntFill( vClass2Num, Aig_ManObjNumMax(pMiter), -1 );
259  // keep classes having at least one element from pNtk1 and one from pNtk2
260  Vec_IntForEachEntry( vId2Lit1, Class, i )
261  if ( Class > 0 && Vec_IntEntry(vCounts0, Class) && Vec_IntEntry(vCounts1, Class) )
262  Vec_IntPush( Abc_ObjDressClass(vRes, vClass2Num, Class), Abc_ObjDressMakeId(pNtk1, i, 0) );
263  Vec_IntForEachEntry( vId2Lit2, Class, i )
264  if ( Class > 0 && Vec_IntEntry(vCounts0, Class) && Vec_IntEntry(vCounts1, Class) )
265  Vec_IntPush( Abc_ObjDressClass(vRes, vClass2Num, Class), Abc_ObjDressMakeId(pNtk2, i, 1) );
266  // package them accordingly
267  Vec_IntFree( vClass2Num );
268  Vec_IntFree( vCounts0 );
269  Vec_IntFree( vCounts1 );
270  Vec_IntFree( vId2Lit1 );
271  Vec_IntFree( vId2Lit2 );
272  return vRes;
273 }
274 
275 /**Function*************************************************************
276 
277  Synopsis [Computes equivalence classes of objects in pNtk1 and pNtk2.]
278 
279  Description [Returns the array (Vec_Ptr_t) of integer arrays (Vec_Int_t).
280  Each of the integer arrays contains entries of one equivalence class.
281  Each entry contains the following information: the network number (0/1),
282  the polarity (0/1) and the object ID in the the network (0 <= num < MaxId)
283  where MaxId is the largest number of an ID of an object in that network.]
284 
285  SideEffects []
286 
287  SeeAlso []
288 
289 ***********************************************************************/
290 Vec_Ptr_t * Abc_NtkDressComputeEquivs( Abc_Ntk_t * pNtk1, Abc_Ntk_t * pNtk2, int nConflictLimit, int fVerbose )
291 {
292  Dch_Pars_t Pars, * pPars = &Pars;
293  Abc_Ntk_t * pAig1, * pAig2;
294  Aig_Man_t * pMan1, * pMan2, * pMiter;
295  Vec_Ptr_t * vRes;
296  assert( !Abc_NtkIsStrash(pNtk1) );
297  assert( !Abc_NtkIsStrash(pNtk2) );
298  // convert network into AIG
299  pAig1 = Abc_NtkStrash( pNtk1, 1, 1, 0 );
300  pAig2 = Abc_NtkStrash( pNtk2, 1, 1, 0 );
301  pMan1 = Abc_NtkToDar( pAig1, 0, 0 );
302  pMan2 = Abc_NtkToDar( pAig2, 0, 0 );
303  // derive the miter
304  pMiter = Aig_ManCreateDualOutputMiter( pMan1, pMan2 );
305  // set up parameters for SAT sweeping
306  Dch_ManSetDefaultParams( pPars );
307  pPars->nBTLimit = nConflictLimit;
308  pPars->fVerbose = fVerbose;
309  // perform SAT sweeping
310  Dch_ComputeEquivalences( pMiter, pPars );
311  // now, pMiter is annotated with the equivl class info
312  // convert this info into the resulting array
313  vRes = Abc_NtkDressMapIds( pMiter, pNtk1, pNtk2 );
314  Aig_ManStop( pMiter );
315  Aig_ManStop( pMan1 );
316  Aig_ManStop( pMan2 );
317  Abc_NtkDelete( pAig1 );
318  Abc_NtkDelete( pAig2 );
319  return vRes;
320 }
321 
322 /**Function*************************************************************
323 
324  Synopsis [Prints information about node equivalences.]
325 
326  Description []
327 
328  SideEffects []
329 
330  SeeAlso []
331 
332 ***********************************************************************/
334 {
335  Vec_Int_t * vClass;
336  int i, k, Entry;
337  Vec_PtrForEachEntry( Vec_Int_t *, vRes, vClass, i )
338  {
339  printf( "Class %5d : ", i );
340  printf( "Num =%5d ", Vec_IntSize(vClass) );
341  Vec_IntForEachEntry( vClass, Entry, k )
342  printf( "%5d%c%d ",
343  Abc_ObjEquivId2ObjId(Entry),
344  Abc_ObjEquivId2Polar(Entry)? '-':'+',
345  Abc_ObjEquivId2NtkId(Entry) );
346  printf( "\n" );
347  }
348 }
349 
350 /**Function*************************************************************
351 
352  Synopsis [Prints information about node equivalences.]
353 
354  Description []
355 
356  SideEffects []
357 
358  SeeAlso []
359 
360 ***********************************************************************/
361 void Abc_NtkDressPrintStats( Vec_Ptr_t * vRes, int nNodes0, int nNodes1, abctime Time )
362 {
363  Vec_Int_t * vClass;
364  int i, k, Entry;
365  int NegAll[2] = {0}, PosAll[2] = {0}, PairsAll = 0, PairsOne = 0;
366  int Pos[2], Neg[2];
367  // count the number of equivalences in each class
368  Vec_PtrForEachEntry( Vec_Int_t *, vRes, vClass, i )
369  {
370  Pos[0] = Pos[1] = 0;
371  Neg[0] = Neg[1] = 0;
372  Vec_IntForEachEntry( vClass, Entry, k )
373  {
374  if ( Abc_ObjEquivId2NtkId(Entry) )
375  {
376  if ( Abc_ObjEquivId2Polar(Entry) )
377  Neg[1]++; // negative polarity in network 1
378  else
379  Pos[1]++; // positive polarity in network 1
380  }
381  else
382  {
383  if ( Abc_ObjEquivId2Polar(Entry) )
384  Neg[0]++; // negative polarity in network 0
385  else
386  Pos[0]++; // positive polarity in network 0
387  }
388  }
389  PosAll[0] += Pos[0]; // total positive polarity in network 0
390  PosAll[1] += Pos[1]; // total positive polarity in network 1
391  NegAll[0] += Neg[0]; // total negative polarity in network 0
392  NegAll[1] += Neg[1]; // total negative polarity in network 1
393 
394  // assuming that the name can be transferred to only one node
395  PairsAll += Abc_MinInt(Neg[0] + Pos[0], Neg[1] + Pos[1]);
396  PairsOne += Abc_MinInt(Neg[0], Neg[1]) + Abc_MinInt(Pos[0], Pos[1]);
397  }
398  printf( "Total number of equiv classes = %7d.\n", Vec_PtrSize(vRes) );
399  printf( "Participating nodes from both networks = %7d.\n", NegAll[0]+PosAll[0]+NegAll[1]+PosAll[1] );
400  printf( "Participating nodes from the first network = %7d. (%7.2f %% of nodes)\n", NegAll[0]+PosAll[0], 100.0*(NegAll[0]+PosAll[0])/(nNodes0+1) );
401  printf( "Participating nodes from the second network = %7d. (%7.2f %% of nodes)\n", NegAll[1]+PosAll[1], 100.0*(NegAll[1]+PosAll[1])/(nNodes1+1) );
402  printf( "Node pairs (any polarity) = %7d. (%7.2f %% of names can be moved)\n", PairsAll, 100.0*PairsAll/(nNodes0+1) );
403  printf( "Node pairs (same polarity) = %7d. (%7.2f %% of names can be moved)\n", PairsOne, 100.0*PairsOne/(nNodes0+1) );
404  ABC_PRT( "Total runtime", Time );
405 }
406 
407 /**Function*************************************************************
408 
409  Synopsis [Transfers names from pNtk1 to pNtk2.]
410 
411  Description [Internally calls new procedure for mapping node IDs of
412  both networks into the shared equivalence classes.]
413 
414  SideEffects []
415 
416  SeeAlso []
417 
418 ***********************************************************************/
419 void Abc_NtkDress2( Abc_Ntk_t * pNtk1, Abc_Ntk_t * pNtk2, int nConflictLimit, int fVerbose )
420 {
421  Vec_Ptr_t * vRes;
422  abctime clk = Abc_Clock();
423  vRes = Abc_NtkDressComputeEquivs( pNtk1, pNtk2, nConflictLimit, fVerbose );
424 // Abc_NtkDressPrintEquivs( vRes );
425  Abc_NtkDressPrintStats( vRes, Abc_NtkNodeNum(pNtk1), Abc_NtkNodeNum(pNtk1), Abc_Clock() - clk );
426  Vec_VecFree( (Vec_Vec_t *)vRes );
427 }
428 
429 ////////////////////////////////////////////////////////////////////////
430 /// END OF FILE ///
431 ////////////////////////////////////////////////////////////////////////
432 
433 
435 
Aig_Obj_t * Aig_ObjCreateCo(Aig_Man_t *p, Aig_Obj_t *pDriver)
Definition: aigObj.c:66
void Abc_NtkDressPrintStats(Vec_Ptr_t *vRes, int nNodes0, int nNodes1, abctime Time)
Definition: abcDress2.c:361
static int Abc_NtkIsStrash(Abc_Ntk_t *pNtk)
Definition: abc.h:251
typedefABC_NAMESPACE_HEADER_START struct Vec_Ptr_t_ Vec_Ptr_t
INCLUDES ///.
Definition: vecPtr.h:42
int Abc_ObjEquivId2NtkId(int EquivId)
Definition: abcDress2.c:58
static Aig_Obj_t * Aig_ObjRepr(Aig_Man_t *p, Aig_Obj_t *pObj)
Definition: aig.h:330
static Aig_Type_t Aig_ObjType(Aig_Obj_t *pObj)
Definition: aig.h:272
void Dch_ManSetDefaultParams(Dch_Pars_t *p)
DECLARATIONS ///.
Definition: dchCore.c:45
static int Abc_NtkObjNumMax(Abc_Ntk_t *pNtk)
Definition: abc.h:284
typedefABC_NAMESPACE_HEADER_START struct Vec_Vec_t_ Vec_Vec_t
INCLUDES ///.
Definition: vecVec.h:42
typedefABC_NAMESPACE_HEADER_START struct Aig_Man_t_ Aig_Man_t
INCLUDES ///.
Definition: aig.h:50
typedefABC_NAMESPACE_IMPL_START struct Vec_Int_t_ Vec_Int_t
DECLARATIONS ///.
Definition: bblif.c:37
void Aig_ManStop(Aig_Man_t *p)
Definition: aigMan.c:187
ush Pos
Definition: deflate.h:88
void * pData
Definition: aig.h:87
ABC_DLL Abc_Ntk_t * Abc_NtkStrash(Abc_Ntk_t *pNtk, int fAllNodes, int fCleanup, int fRecord)
Definition: abcStrash.c:265
Aig_Man_t * Aig_ManStart(int nNodesMax)
DECLARATIONS ///.
Definition: aigMan.c:47
#define Aig_ManForEachCi(p, pObj, i)
ITERATORS ///.
Definition: aig.h:393
static Aig_Obj_t * Aig_Regular(Aig_Obj_t *p)
Definition: aig.h:246
Aig_Obj_t * Aig_ObjCreateCi(Aig_Man_t *p)
DECLARATIONS ///.
Definition: aigObj.c:45
static void Vec_PtrPush(Vec_Ptr_t *p, void *Entry)
Definition: vecPtr.h:606
Vec_Int_t * Abc_ObjDressClass(Vec_Ptr_t *vRes, Vec_Int_t *vClass2Num, int Class)
Definition: abcDress2.c:182
typedefABC_NAMESPACE_HEADER_START struct Dch_Pars_t_ Dch_Pars_t
INCLUDES ///.
Definition: dch.h:43
static abctime Abc_Clock()
Definition: abc_global.h:279
static Abc_Obj_t * Abc_NtkObj(Abc_Ntk_t *pNtk, int i)
Definition: abc.h:314
static int Vec_PtrSize(Vec_Ptr_t *p)
Definition: vecPtr.h:295
static void Vec_VecFree(Vec_Vec_t *p)
Definition: vecVec.h:347
Vec_Int_t * Abc_NtkDressMapClasses(Aig_Man_t *pMiter, Abc_Ntk_t *pNtk)
Definition: abcDress2.c:146
ABC_DLL void Abc_NtkDelete(Abc_Ntk_t *pNtk)
Definition: abcNtk.c:1233
Aig_Obj_t * Aig_And(Aig_Man_t *p, Aig_Obj_t *p0, Aig_Obj_t *p1)
Definition: aigOper.c:104
static void Vec_IntWriteEntry(Vec_Int_t *p, int i, int Entry)
Definition: bblif.c:285
static int Abc_NtkNodeNum(Abc_Ntk_t *pNtk)
Definition: abc.h:293
static int Aig_ManCoNum(Aig_Man_t *p)
Definition: aig.h:252
static int Abc_MinInt(int a, int b)
Definition: abc_global.h:239
static Vec_Int_t * Vec_IntStart(int nSize)
Definition: bblif.c:172
Abc_Obj_t * pCopy
Definition: abc.h:148
#define Aig_ManForEachNode(p, pObj, i)
Definition: aig.h:413
static Vec_Int_t * Vec_IntAlloc(int nCap)
FUNCTION DEFINITIONS ///.
Definition: bblif.c:149
static void * Vec_PtrEntryLast(Vec_Ptr_t *p)
Definition: vecPtr.h:413
static void Vec_IntAddToEntry(Vec_Int_t *p, int i, int Addition)
Definition: bblif.c:302
static Aig_Obj_t * Aig_ManCi(Aig_Man_t *p, int i)
Definition: aig.h:266
static unsigned Abc_ObjType(Abc_Obj_t *pObj)
Definition: abc.h:328
static int Vec_IntEntry(Vec_Int_t *p, int i)
Definition: bblif.c:268
void Abc_NtkDressMapSetPolarity(Abc_Ntk_t *pNtk)
Definition: abcDress2.c:123
static int Aig_ManCiNum(Aig_Man_t *p)
Definition: aig.h:251
#define ABC_NAMESPACE_IMPL_END
Definition: abc_global.h:108
static void Vec_IntFill(Vec_Int_t *p, int nSize, int Fill)
Definition: bblif.c:356
static Aig_Obj_t * Aig_ObjChild1Copy(Aig_Obj_t *pObj)
Definition: aig.h:313
Definition: aig.h:69
static void Vec_IntPush(Vec_Int_t *p, int Entry)
Definition: bblif.c:468
static Aig_Obj_t * Aig_ObjChild0Copy(Aig_Obj_t *pObj)
Definition: aig.h:312
Vec_Ptr_t * Abc_NtkDressMapIds(Aig_Man_t *pMiter, Abc_Ntk_t *pNtk1, Abc_Ntk_t *pNtk2)
Definition: abcDress2.c:225
void Abc_NtkDressPrintEquivs(Vec_Ptr_t *vRes)
Definition: abcDress2.c:333
static int Aig_ManObjNumMax(Aig_Man_t *p)
Definition: aig.h:259
#define Abc_NtkForEachNode(pNtk, pNode, i)
Definition: abc.h:461
static Aig_Obj_t * Aig_ManConst1(Aig_Man_t *p)
Definition: aig.h:264
#define ABC_NAMESPACE_IMPL_START
Definition: abc_global.h:107
static void * Vec_PtrEntry(Vec_Ptr_t *p, int i)
Definition: vecPtr.h:362
static Aig_Obj_t * Aig_ManCo(Aig_Man_t *p, int i)
Definition: aig.h:267
static Abc_Obj_t * Abc_ObjRegular(Abc_Obj_t *p)
Definition: abc.h:323
void Abc_NtkDress2(Abc_Ntk_t *pNtk1, Abc_Ntk_t *pNtk2, int nConflictLimit, int fVerbose)
Definition: abcDress2.c:419
static int Vec_IntSize(Vec_Int_t *p)
Definition: bblif.c:252
static Vec_Ptr_t * Vec_PtrAlloc(int nCap)
FUNCTION DEFINITIONS ///.
Definition: vecPtr.h:83
#define ABC_PRT(a, t)
Definition: abc_global.h:220
Aig_Man_t * Abc_NtkToDar(Abc_Ntk_t *pNtk, int fExors, int fRegisters)
DECLARATIONS ///.
Definition: abcDar.c:233
Aig_Man_t * Aig_ManCreateDualOutputMiter(Aig_Man_t *p1, Aig_Man_t *p2)
FUNCTION DEFINITIONS ///.
Definition: abcDress2.c:82
static int Aig_ObjId(Aig_Obj_t *pObj)
Definition: aig.h:286
#define assert(ex)
Definition: util_old.h:213
int Abc_ObjDressMakeId(Abc_Ntk_t *pNtk, int ObjId, int iNtk)
Definition: abcDress2.c:209
void Dch_ComputeEquivalences(Aig_Man_t *pAig, Dch_Pars_t *pPars)
Definition: dchCore.c:134
static void Vec_IntFree(Vec_Int_t *p)
Definition: bblif.c:235
#define Vec_PtrForEachEntry(Type, vVec, pEntry, i)
MACRO DEFINITIONS ///.
Definition: vecPtr.h:55
static int Abc_ObjIsComplement(Abc_Obj_t *p)
Definition: abc.h:322
ABC_INT64_T abctime
Definition: abc_global.h:278
#define Abc_NtkForEachObj(pNtk, pObj, i)
ITERATORS ///.
Definition: abc.h:446
#define Vec_IntForEachEntry(vVec, Entry, i)
MACRO DEFINITIONS ///.
Definition: vecInt.h:54
int Abc_ObjEquivId2Polar(int EquivId)
Definition: abcDress2.c:57
unsigned fPhase
Definition: abc.h:137
int Aig_ManCleanup(Aig_Man_t *p)
Definition: aigMan.c:265
ABC_NAMESPACE_IMPL_START int Abc_ObjEquivId2ObjId(int EquivId)
Definition: abcDress2.c:56
Vec_Ptr_t * Abc_NtkDressComputeEquivs(Abc_Ntk_t *pNtk1, Abc_Ntk_t *pNtk2, int nConflictLimit, int fVerbose)
Definition: abcDress2.c:290