abc-master
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros
covBuild.c
Go to the documentation of this file.
1 /**CFile****************************************************************
2 
3  FileName [covBuild.c]
4 
5  SystemName [ABC: Logic synthesis and verification system.]
6 
7  PackageName [Mapping into network of SOPs/ESOPs.]
8 
9  Synopsis [Network construction procedures.]
10 
11  Author [Alan Mishchenko]
12 
13  Affiliation [UC Berkeley]
14 
15  Date [Ver. 1.0. Started - June 20, 2005.]
16 
17  Revision [$Id: covBuild.c,v 1.00 2005/06/20 00:00:00 alanmi Exp $]
18 
19 ***********************************************************************/
20 
21 #include "cov.h"
22 
24 
25 
26 ////////////////////////////////////////////////////////////////////////
27 /// DECLARATIONS ///
28 ////////////////////////////////////////////////////////////////////////
29 
30 ////////////////////////////////////////////////////////////////////////
31 /// FUNCTION DEFINITIONS ///
32 ////////////////////////////////////////////////////////////////////////
33 
34 /**Function*************************************************************
35 
36  Synopsis [Derives the decomposed network.]
37 
38  Description []
39 
40  SideEffects []
41 
42  SeeAlso []
43 
44 ***********************************************************************/
45 Abc_Obj_t * Abc_NtkCovDeriveCube( Abc_Ntk_t * pNtkNew, Abc_Obj_t * pObj, Min_Cube_t * pCube, Vec_Int_t * vSupp, int fCompl )
46 {
47  Vec_Int_t * vLits;
48  Abc_Obj_t * pNodeNew, * pFanin;
49  int i, iFanin, Lit;
50  // create empty cube
51  if ( pCube->nLits == 0 )
52  {
53  if ( fCompl )
54  return Abc_NtkCreateNodeConst0(pNtkNew);
55  return Abc_NtkCreateNodeConst1(pNtkNew);
56  }
57  // get the literals of this cube
58  vLits = Vec_IntAlloc( 10 );
59  Min_CubeGetLits( pCube, vLits );
60  assert( pCube->nLits == (unsigned)vLits->nSize );
61  // create special case when there is only one literal
62  if ( pCube->nLits == 1 )
63  {
64  iFanin = Vec_IntEntry(vLits,0);
65  pFanin = Abc_NtkObj( pObj->pNtk, Vec_IntEntry(vSupp, iFanin) );
66  Lit = Min_CubeGetVar(pCube, iFanin);
67  assert( Lit == 1 || Lit == 2 );
68  Vec_IntFree( vLits );
69  if ( (Lit == 1) ^ fCompl )// negative
70  return Abc_NtkCreateNodeInv( pNtkNew, pFanin->pCopy );
71  return pFanin->pCopy;
72  }
73  assert( pCube->nLits > 1 );
74  // create the AND cube
75  pNodeNew = Abc_NtkCreateNode( pNtkNew );
76  for ( i = 0; i < vLits->nSize; i++ )
77  {
78  iFanin = Vec_IntEntry(vLits,i);
79  pFanin = Abc_NtkObj( pObj->pNtk, Vec_IntEntry(vSupp, iFanin) );
80  Lit = Min_CubeGetVar(pCube, iFanin);
81  assert( Lit == 1 || Lit == 2 );
82  Vec_IntWriteEntry( vLits, i, Lit==1 );
83  Abc_ObjAddFanin( pNodeNew, pFanin->pCopy );
84  }
85  pNodeNew->pData = Abc_SopCreateAnd( (Mem_Flex_t *)pNtkNew->pManFunc, vLits->nSize, vLits->pArray );
86  if ( fCompl )
87  Abc_SopComplement( (char *)pNodeNew->pData );
88  Vec_IntFree( vLits );
89  return pNodeNew;
90 }
91 
92 /**Function*************************************************************
93 
94  Synopsis [Derives the decomposed network.]
95 
96  Description []
97 
98  SideEffects []
99 
100  SeeAlso []
101 
102 ***********************************************************************/
103 Abc_Obj_t * Abc_NtkCovDeriveNode_rec( Cov_Man_t * p, Abc_Ntk_t * pNtkNew, Abc_Obj_t * pObj, int Level )
104 {
105  Min_Cube_t * pCover, * pCube;
106  Abc_Obj_t * pFaninNew, * pNodeNew, * pFanin;
107  Vec_Int_t * vSupp;
108  int Entry, nCubes, i;
109 
110  if ( Abc_ObjIsCi(pObj) )
111  return pObj->pCopy;
112  assert( Abc_ObjIsNode(pObj) );
113  // skip if already computed
114  if ( pObj->pCopy )
115  return pObj->pCopy;
116 
117  // get the support and the cover
118  vSupp = Abc_ObjGetSupp( pObj );
119  pCover = Abc_ObjGetCover2( pObj );
120  assert( vSupp );
121 /*
122  if ( pCover && pCover->nVars - Min_CoverSuppVarNum(p->pManMin, pCover) > 0 )
123  {
124  printf( "%d\n ", pCover->nVars - Min_CoverSuppVarNum(p->pManMin, pCover) );
125  Min_CoverWrite( stdout, pCover );
126  }
127 */
128 /*
129  // print the support of this node
130  printf( "{ " );
131  Vec_IntForEachEntry( vSupp, Entry, i )
132  printf( "%d ", Entry );
133  printf( "} cubes = %d\n", Min_CoverCountCubes( pCover ) );
134 */
135  // process the fanins
136  Vec_IntForEachEntry( vSupp, Entry, i )
137  {
138  pFanin = Abc_NtkObj(pObj->pNtk, Entry);
139  Abc_NtkCovDeriveNode_rec( p, pNtkNew, pFanin, Level+1 );
140  }
141 
142  // for each cube, construct the node
143  nCubes = Min_CoverCountCubes( pCover );
144  if ( nCubes == 0 )
145  pNodeNew = Abc_NtkCreateNodeConst0(pNtkNew);
146  else if ( nCubes == 1 )
147  pNodeNew = Abc_NtkCovDeriveCube( pNtkNew, pObj, pCover, vSupp, 0 );
148  else
149  {
150  pNodeNew = Abc_NtkCreateNode( pNtkNew );
151  Min_CoverForEachCube( pCover, pCube )
152  {
153  pFaninNew = Abc_NtkCovDeriveCube( pNtkNew, pObj, pCube, vSupp, 0 );
154  Abc_ObjAddFanin( pNodeNew, pFaninNew );
155  }
156  pNodeNew->pData = Abc_SopCreateXorSpecial( (Mem_Flex_t *)pNtkNew->pManFunc, nCubes );
157  }
158 /*
159  printf( "Created node %d(%d) at level %d: ", pNodeNew->Id, pObj->Id, Level );
160  Vec_IntForEachEntry( vSupp, Entry, i )
161  {
162  pFanin = Abc_NtkObj(pObj->pNtk, Entry);
163  printf( "%d(%d) ", pFanin->pCopy->Id, pFanin->Id );
164  }
165  printf( "\n" );
166  Min_CoverWrite( stdout, pCover );
167 */
168  pObj->pCopy = pNodeNew;
169  return pNodeNew;
170 }
171 
172 /**Function*************************************************************
173 
174  Synopsis [Derives the decomposed network.]
175 
176  Description []
177 
178  SideEffects []
179 
180  SeeAlso []
181 
182 ***********************************************************************/
184 {
185  Abc_Ntk_t * pNtkNew;
186  Abc_Obj_t * pObj;
187  int i;
188  assert( Abc_NtkIsStrash(pNtk) );
189  // perform strashing
190  pNtkNew = Abc_NtkStartFrom( pNtk, ABC_NTK_LOGIC, ABC_FUNC_SOP );
191  // reconstruct the network
192  Abc_NtkForEachCo( pNtk, pObj, i )
193  {
194  Abc_NtkCovDeriveNode_rec( p, pNtkNew, Abc_ObjFanin0(pObj), 0 );
195 // printf( "*** CO %s : %d -> %d \n", Abc_ObjName(pObj), pObj->pCopy->Id, Abc_ObjFanin0(pObj)->pCopy->Id );
196  }
197  // add the COs
198  Abc_NtkFinalize( pNtk, pNtkNew );
199  Abc_NtkLogicMakeSimpleCos( pNtkNew, 1 );
200  // make sure everything is okay
201  if ( !Abc_NtkCheck( pNtkNew ) )
202  {
203  printf( "Abc_NtkCovDerive: The network check has failed.\n" );
204  Abc_NtkDelete( pNtkNew );
205  return NULL;
206  }
207  return pNtkNew;
208 }
209 
210 
211 
212 
213 /**Function*************************************************************
214 
215  Synopsis [Derives the decomposed network.]
216 
217  Description []
218 
219  SideEffects []
220 
221  SeeAlso []
222 
223 ***********************************************************************/
224 Abc_Obj_t * Abc_NtkCovDeriveInv( Abc_Ntk_t * pNtkNew, Abc_Obj_t * pObj, int fCompl )
225 {
226  assert( pObj->pCopy );
227  if ( !fCompl )
228  return pObj->pCopy;
229  if ( pObj->pCopy->pCopy == NULL )
230  pObj->pCopy->pCopy = Abc_NtkCreateNodeInv( pNtkNew, pObj->pCopy );
231  return pObj->pCopy->pCopy;
232  }
233 
234 /**Function*************************************************************
235 
236  Synopsis [Derives the decomposed network.]
237 
238  Description []
239 
240  SideEffects []
241 
242  SeeAlso []
243 
244 ***********************************************************************/
246 {
247  Vec_Int_t * vLits;
248  Abc_Obj_t * pNodeNew, * pFanin;
249  int i, iFanin, Lit;
250  // create empty cube
251  if ( pCube->nLits == 0 )
252  return Abc_NtkCreateNodeConst1(pNtkNew);
253  // get the literals of this cube
254  vLits = Vec_IntAlloc( 10 );
255  Min_CubeGetLits( pCube, vLits );
256  assert( pCube->nLits == (unsigned)vLits->nSize );
257  // create special case when there is only one literal
258  if ( pCube->nLits == 1 )
259  {
260  iFanin = Vec_IntEntry(vLits,0);
261  pFanin = Abc_NtkObj( pObj->pNtk, Vec_IntEntry(vSupp, iFanin) );
262  Lit = Min_CubeGetVar(pCube, iFanin);
263  assert( Lit == 1 || Lit == 2 );
264  Vec_IntFree( vLits );
265 // if ( Lit == 1 )// negative
266 // return Abc_NtkCreateNodeInv( pNtkNew, pFanin->pCopy );
267 // return pFanin->pCopy;
268  return Abc_NtkCovDeriveInv( pNtkNew, pFanin, Lit==1 );
269  }
270  assert( pCube->nLits > 1 );
271  // create the AND cube
272  pNodeNew = Abc_NtkCreateNode( pNtkNew );
273  for ( i = 0; i < vLits->nSize; i++ )
274  {
275  iFanin = Vec_IntEntry(vLits,i);
276  pFanin = Abc_NtkObj( pObj->pNtk, Vec_IntEntry(vSupp, iFanin) );
277  Lit = Min_CubeGetVar(pCube, iFanin);
278  assert( Lit == 1 || Lit == 2 );
279  Vec_IntWriteEntry( vLits, i, Lit==1 );
280 // Abc_ObjAddFanin( pNodeNew, pFanin->pCopy );
281  Abc_ObjAddFanin( pNodeNew, Abc_NtkCovDeriveInv( pNtkNew, pFanin, Lit==1 ) );
282  }
283 // pNodeNew->pData = Abc_SopCreateAnd( (Mem_Flex_t *)pNtkNew->pManFunc, vLits->nSize, vLits->pArray );
284  pNodeNew->pData = Abc_SopCreateAnd( (Mem_Flex_t *)pNtkNew->pManFunc, vLits->nSize, NULL );
285  Vec_IntFree( vLits );
286  return pNodeNew;
287 }
288 
289 /**Function*************************************************************
290 
291  Synopsis [Derives the decomposed network.]
292 
293  Description []
294 
295  SideEffects []
296 
297  SeeAlso []
298 
299 ***********************************************************************/
301 {
302  Min_Cube_t * pCover, * pCube;
303  Abc_Obj_t * pFaninNew, * pNodeNew, * pFanin;
304  Vec_Int_t * vSupp;
305  int Entry, nCubes, i;
306 
307  // skip if already computed
308  if ( pObj->pCopy )
309  return Abc_NtkCovDeriveInv( pNtkNew, pObj, fCompl );
310  assert( Abc_ObjIsNode(pObj) );
311 
312  // get the support and the cover
313  vSupp = Abc_ObjGetSupp( pObj );
314  pCover = Abc_ObjGetCover2( pObj );
315  assert( vSupp );
316 
317  // process the fanins
318  Vec_IntForEachEntry( vSupp, Entry, i )
319  {
320  pFanin = Abc_NtkObj(pObj->pNtk, Entry);
321  Abc_NtkCovDeriveNodeInv_rec( p, pNtkNew, pFanin, 0 );
322  }
323 
324  // for each cube, construct the node
325  nCubes = Min_CoverCountCubes( pCover );
326  if ( nCubes == 0 )
327  pNodeNew = Abc_NtkCreateNodeConst0(pNtkNew);
328  else if ( nCubes == 1 )
329  pNodeNew = Abc_NtkCovDeriveCubeInv( pNtkNew, pObj, pCover, vSupp );
330  else
331  {
332  pNodeNew = Abc_NtkCreateNode( pNtkNew );
333  Min_CoverForEachCube( pCover, pCube )
334  {
335  pFaninNew = Abc_NtkCovDeriveCubeInv( pNtkNew, pObj, pCube, vSupp );
336  Abc_ObjAddFanin( pNodeNew, pFaninNew );
337  }
338  pNodeNew->pData = Abc_SopCreateXorSpecial( (Mem_Flex_t *)pNtkNew->pManFunc, nCubes );
339  }
340 
341  pObj->pCopy = pNodeNew;
342  return Abc_NtkCovDeriveInv( pNtkNew, pObj, fCompl );
343 }
344 
345 /**Function*************************************************************
346 
347  Synopsis [Derives the decomposed network.]
348 
349  Description [The resulting network contains only pure AND/OR/EXOR gates
350  and inverters. This procedure is usedful to generate Verilog.]
351 
352  SideEffects []
353 
354  SeeAlso []
355 
356 ***********************************************************************/
358 {
359  Abc_Ntk_t * pNtkNew;
360  Abc_Obj_t * pObj, * pNodeNew;
361  int i;
362  assert( Abc_NtkIsStrash(pNtk) );
363  // perform strashing
364  pNtkNew = Abc_NtkStartFrom( pNtk, ABC_NTK_LOGIC, ABC_FUNC_SOP );
365  // reconstruct the network
366  Abc_NtkForEachCo( pNtk, pObj, i )
367  {
368  pNodeNew = Abc_NtkCovDeriveNodeInv_rec( p, pNtkNew, Abc_ObjFanin0(pObj), Abc_ObjFaninC0(pObj) );
369  Abc_ObjAddFanin( pObj->pCopy, pNodeNew );
370  }
371  // add the COs
372  Abc_NtkLogicMakeSimpleCos( pNtkNew, 0 );
373  // make sure everything is okay
374  if ( !Abc_NtkCheck( pNtkNew ) )
375  {
376  printf( "Abc_NtkCovDeriveInv: The network check has failed.\n" );
377  Abc_NtkDelete( pNtkNew );
378  return NULL;
379  }
380  return pNtkNew;
381 }
382 
383 
384 
385 /**Function*************************************************************
386 
387  Synopsis [Derives the decomposed network.]
388 
389  Description []
390 
391  SideEffects []
392 
393  SeeAlso []
394 
395 ***********************************************************************/
397 {
398  int fVerbose = 0;
399  Min_Cube_t * pCover, * pCovers[3];
400  Abc_Obj_t * pNodeNew, * pFanin;
401  Vec_Int_t * vSupp;
402  Vec_Str_t * vCover;
403  int i, Entry, nCubes, Type;
404  // skip if already computed
405  if ( pObj->pCopy )
406  return pObj->pCopy;
407  assert( Abc_ObjIsNode(pObj) );
408  // get the support and the cover
409  vSupp = Abc_ObjGetSupp( pObj );
410  assert( vSupp );
411  // choose the cover to implement
412  pCovers[0] = Abc_ObjGetCover( pObj, 0 );
413  pCovers[1] = Abc_ObjGetCover( pObj, 1 );
414  pCovers[2] = Abc_ObjGetCover2( pObj );
415  // use positive polarity
416  if ( pCovers[0]
417  && (!pCovers[1] || Min_CoverCountCubes(pCovers[0]) <= Min_CoverCountCubes(pCovers[1]))
418  && (!pCovers[2] || Min_CoverCountCubes(pCovers[0]) <= Min_CoverCountCubes(pCovers[2])) )
419  {
420  pCover = pCovers[0];
421  Type = '1';
422  }
423  else
424  // use negative polarity
425  if ( pCovers[1]
426  && (!pCovers[0] || Min_CoverCountCubes(pCovers[1]) <= Min_CoverCountCubes(pCovers[0]))
427  && (!pCovers[2] || Min_CoverCountCubes(pCovers[1]) <= Min_CoverCountCubes(pCovers[2])) )
428  {
429  pCover = pCovers[1];
430  Type = '0';
431  }
432  else
433  // use XOR polarity
434  if ( pCovers[2]
435  && (!pCovers[0] || Min_CoverCountCubes(pCovers[2]) < Min_CoverCountCubes(pCovers[0]))
436  && (!pCovers[1] || Min_CoverCountCubes(pCovers[2]) < Min_CoverCountCubes(pCovers[1])) )
437  {
438  pCover = pCovers[2];
439  Type = 'x';
440  }
441  else
442  assert( 0 );
443  // print the support of this node
444  if ( fVerbose )
445  {
446  printf( "{ " );
447  Vec_IntForEachEntry( vSupp, Entry, i )
448  printf( "%d ", Entry );
449  printf( "} cubes = %d\n", Min_CoverCountCubes( pCover ) );
450  }
451  // process the fanins
452  Vec_IntForEachEntry( vSupp, Entry, i )
453  {
454  pFanin = Abc_NtkObj(pObj->pNtk, Entry);
455  Abc_NtkCovDerive_rec( p, pNtkNew, pFanin );
456  }
457  // for each cube, construct the node
458  nCubes = Min_CoverCountCubes( pCover );
459  if ( nCubes == 0 )
460  pNodeNew = Abc_NtkCreateNodeConst0(pNtkNew);
461  else if ( nCubes == 1 )
462  pNodeNew = Abc_NtkCovDeriveCube( pNtkNew, pObj, pCover, vSupp, Type == '0' );
463  else
464  {
465  // create the node
466  pNodeNew = Abc_NtkCreateNode( pNtkNew );
467  Vec_IntForEachEntry( vSupp, Entry, i )
468  {
469  pFanin = Abc_NtkObj(pObj->pNtk, Entry);
470  Abc_ObjAddFanin( pNodeNew, pFanin->pCopy );
471  }
472  // derive the function
473  vCover = Vec_StrAlloc( 100 );
474  Min_CoverCreate( vCover, pCover, (char)Type );
475  pNodeNew->pData = Abc_SopRegister((Mem_Flex_t *)pNtkNew->pManFunc, Vec_StrArray(vCover) );
476  Vec_StrFree( vCover );
477  }
478 
479 /*
480  printf( "Created node %d(%d) at level %d: ", pNodeNew->Id, pObj->Id, Level );
481  Vec_IntForEachEntry( vSupp, Entry, i )
482  {
483  pFanin = Abc_NtkObj(pObj->pNtk, Entry);
484  printf( "%d(%d) ", pFanin->pCopy->Id, pFanin->Id );
485  }
486  printf( "\n" );
487  Min_CoverWrite( stdout, pCover );
488 */
489  return pObj->pCopy = pNodeNew;
490 }
491 
492 /**Function*************************************************************
493 
494  Synopsis [Derives the decomposed network.]
495 
496  Description []
497 
498  SideEffects []
499 
500  SeeAlso []
501 
502 ***********************************************************************/
504 {
505  Abc_Ntk_t * pNtkNew;
506  Abc_Obj_t * pObj, * pNodeNew;
507  int i;
508  assert( Abc_NtkIsStrash(pNtk) );
509  // perform strashing
510  pNtkNew = Abc_NtkStartFrom( pNtk, ABC_NTK_LOGIC, ABC_FUNC_SOP );
511  // reconstruct the network
512  if ( Abc_ObjFanoutNum(Abc_AigConst1(pNtk)) > 0 )
513  Abc_AigConst1(pNtk)->pCopy = Abc_NtkCreateNodeConst1(pNtkNew);
514  Abc_NtkForEachCo( pNtk, pObj, i )
515  {
516  pNodeNew = Abc_NtkCovDerive_rec( p, pNtkNew, Abc_ObjFanin0(pObj) );
517  if ( Abc_ObjFaninC0(pObj) )
518  {
519  if ( pNodeNew->pData && Abc_ObjFanoutNum(Abc_ObjFanin0(pObj)) == 1 )
520  Abc_SopComplement( (char *)pNodeNew->pData );
521  else
522  pNodeNew = Abc_NtkCreateNodeInv( pNtkNew, pNodeNew );
523  }
524  Abc_ObjAddFanin( pObj->pCopy, pNodeNew );
525  }
526  // add the COs
527  Abc_NtkLogicMakeSimpleCos( pNtkNew, 0 );
528  // make sure everything is okay
529  if ( !Abc_NtkCheck( pNtkNew ) )
530  {
531  printf( "Abc_NtkCovDerive: The network check has failed.\n" );
532  Abc_NtkDelete( pNtkNew );
533  return NULL;
534  }
535  return pNtkNew;
536 }
537 
538 ////////////////////////////////////////////////////////////////////////
539 /// END OF FILE ///
540 ////////////////////////////////////////////////////////////////////////
541 
542 
544 
static int Abc_NtkIsStrash(Abc_Ntk_t *pNtk)
Definition: abc.h:251
Abc_Obj_t * Abc_NtkCovDeriveNodeInv_rec(Cov_Man_t *p, Abc_Ntk_t *pNtkNew, Abc_Obj_t *pObj, int fCompl)
Definition: covBuild.c:300
static Vec_Int_t * Abc_ObjGetSupp(Abc_Obj_t *pObj)
Definition: cov.h:74
static int Abc_ObjIsCi(Abc_Obj_t *pObj)
Definition: abc.h:351
ABC_DLL Abc_Obj_t * Abc_AigConst1(Abc_Ntk_t *pNtk)
Definition: abcAig.c:683
static Llb_Mgr_t * p
Definition: llb3Image.c:950
typedefABC_NAMESPACE_IMPL_START struct Vec_Int_t_ Vec_Int_t
DECLARATIONS ///.
Definition: bblif.c:37
static char * Vec_StrArray(Vec_Str_t *p)
Definition: vecStr.h:272
static int Abc_ObjFanoutNum(Abc_Obj_t *pObj)
Definition: abc.h:365
ABC_DLL char * Abc_SopCreateAnd(Mem_Flex_t *pMan, int nVars, int *pfCompl)
Definition: abcSop.c:162
ABC_DLL Abc_Obj_t * Abc_NtkCreateNodeConst1(Abc_Ntk_t *pNtk)
Definition: abcObj.c:633
static int Abc_ObjFaninC0(Abc_Obj_t *pObj)
Definition: abc.h:377
void Min_CoverCreate(Vec_Str_t *vCover, Min_Cube_t *pCover, char Type)
Definition: covMinUtil.c:85
#define Abc_NtkForEachCo(pNtk, pCo, i)
Definition: abc.h:519
ABC_DLL int Abc_NtkCheck(Abc_Ntk_t *pNtk)
FUNCTION DEFINITIONS ///.
Definition: abcCheck.c:61
static Vec_Str_t * Vec_StrAlloc(int nCap)
Definition: bblif.c:495
static Abc_Obj_t * Abc_NtkObj(Abc_Ntk_t *pNtk, int i)
Definition: abc.h:314
static Abc_Obj_t * Abc_ObjFanin0(Abc_Obj_t *pObj)
Definition: abc.h:373
ABC_DLL void Abc_NtkDelete(Abc_Ntk_t *pNtk)
Definition: abcNtk.c:1233
static Min_Cube_t * Abc_ObjGetCover2(Abc_Obj_t *pObj)
Definition: cov.h:77
ABC_DLL void Abc_ObjAddFanin(Abc_Obj_t *pObj, Abc_Obj_t *pFanin)
Definition: abcFanio.c:84
Abc_Obj_t * Abc_NtkCovDeriveInv(Abc_Ntk_t *pNtkNew, Abc_Obj_t *pObj, int fCompl)
Definition: covBuild.c:224
static void Vec_IntWriteEntry(Vec_Int_t *p, int i, int Entry)
Definition: bblif.c:285
void * pManFunc
Definition: abc.h:191
static int Abc_ObjIsNode(Abc_Obj_t *pObj)
Definition: abc.h:355
Abc_Ntk_t * Abc_NtkCovDeriveClean(Cov_Man_t *p, Abc_Ntk_t *pNtk)
Definition: covBuild.c:357
ABC_DLL char * Abc_SopRegister(Mem_Flex_t *pMan, char *pName)
DECLARATIONS ///.
Definition: abcSop.c:56
ABC_DLL Abc_Ntk_t * Abc_NtkStartFrom(Abc_Ntk_t *pNtk, Abc_NtkType_t Type, Abc_NtkFunc_t Func)
Definition: abcNtk.c:106
Abc_Obj_t * pCopy
Definition: abc.h:148
static Vec_Int_t * Vec_IntAlloc(int nCap)
FUNCTION DEFINITIONS ///.
Definition: bblif.c:149
ABC_DLL Abc_Obj_t * Abc_NtkCreateNodeInv(Abc_Ntk_t *pNtk, Abc_Obj_t *pFanin)
Definition: abcObj.c:662
static void Vec_StrFree(Vec_Str_t *p)
Definition: bblif.c:616
static int Min_CubeGetVar(Min_Cube_t *p, int Var)
Definition: covInt.h:86
static int Vec_IntEntry(Vec_Int_t *p, int i)
Definition: bblif.c:268
#define ABC_NAMESPACE_IMPL_END
Definition: abc_global.h:108
ABC_DLL void Abc_NtkFinalize(Abc_Ntk_t *pNtk, Abc_Ntk_t *pNtkNew)
Definition: abcNtk.c:302
static int Min_CoverCountCubes(Min_Cube_t *pCover)
Definition: covInt.h:274
ABC_NAMESPACE_IMPL_START Abc_Obj_t * Abc_NtkCovDeriveCube(Abc_Ntk_t *pNtkNew, Abc_Obj_t *pObj, Min_Cube_t *pCube, Vec_Int_t *vSupp, int fCompl)
DECLARATIONS ///.
Definition: covBuild.c:45
unsigned nLits
Definition: covInt.h:59
Abc_Obj_t * Abc_NtkCovDeriveNode_rec(Cov_Man_t *p, Abc_Ntk_t *pNtkNew, Abc_Obj_t *pObj, int Level)
Definition: covBuild.c:103
Abc_Obj_t * Abc_NtkCovDeriveCubeInv(Abc_Ntk_t *pNtkNew, Abc_Obj_t *pObj, Min_Cube_t *pCube, Vec_Int_t *vSupp)
Definition: covBuild.c:245
#define ABC_NAMESPACE_IMPL_START
Definition: abc_global.h:107
Abc_Ntk_t * Abc_NtkCovDeriveRegular(Cov_Man_t *p, Abc_Ntk_t *pNtk)
Definition: covBuild.c:503
ABC_DLL int Abc_NtkLogicMakeSimpleCos(Abc_Ntk_t *pNtk, int fDuplicate)
Definition: abcUtil.c:1047
static void Min_CubeGetLits(Min_Cube_t *pCube, Vec_Int_t *vLits)
Definition: covInt.h:249
Abc_Ntk_t * pNtk
Definition: abc.h:130
ABC_DLL void Abc_SopComplement(char *pSop)
Definition: abcSop.c:600
ABC_DLL Abc_Obj_t * Abc_NtkCreateNodeConst0(Abc_Ntk_t *pNtk)
Definition: abcObj.c:604
#define Min_CoverForEachCube(pCover, pCube)
Definition: covInt.h:65
ABC_DLL char * Abc_SopCreateXorSpecial(Mem_Flex_t *pMan, int nVars)
Definition: abcSop.c:291
static Abc_Obj_t * Abc_NtkCreateNode(Abc_Ntk_t *pNtk)
Definition: abc.h:308
typedefABC_NAMESPACE_HEADER_START struct Cov_Man_t_ Cov_Man_t
DECLARATIONS ///.
Definition: cov.h:34
#define assert(ex)
Definition: util_old.h:213
void * pData
Definition: abc.h:145
static void Vec_IntFree(Vec_Int_t *p)
Definition: bblif.c:235
#define Vec_IntForEachEntry(vVec, Entry, i)
MACRO DEFINITIONS ///.
Definition: vecInt.h:54
static Min_Cube_t * Abc_ObjGetCover(Abc_Obj_t *pObj, int Pol)
Definition: cov.h:80
Abc_Obj_t * Abc_NtkCovDerive_rec(Cov_Man_t *p, Abc_Ntk_t *pNtkNew, Abc_Obj_t *pObj)
Definition: covBuild.c:396
Abc_Ntk_t * Abc_NtkCovDerive(Cov_Man_t *p, Abc_Ntk_t *pNtk)
FUNCTION DEFINITIONS ///.
Definition: covBuild.c:183