ABC: A System for Sequential Synthesis and Verification
 
Loading...
Searching...
No Matches
abcMfs.c
Go to the documentation of this file.
1
20
21#include "base/abc/abc.h"
22#include "bool/kit/kit.h"
23#include "opt/sfm/sfm.h"
24#include "base/io/ioAbc.h"
25#include "misc/util/utilTruth.h"
26
28
29
33
37
50{
51 Vec_Ptr_t * vNodes;
52 Abc_Obj_t * pObj;
53 int i;
54 vNodes = Abc_NtkDfs( pNtk, 0 );
55 Abc_NtkCleanCopy( pNtk );
56 Abc_NtkForEachCi( pNtk, pObj, i )
57 pObj->iTemp = i;
58 Vec_PtrForEachEntry( Abc_Obj_t *, vNodes, pObj, i )
59 pObj->iTemp = Abc_NtkCiNum(pNtk) + i;
60 Abc_NtkForEachCo( pNtk, pObj, i )
61 pObj->iTemp = Abc_NtkCiNum(pNtk) + Vec_PtrSize(vNodes) + i;
62 return vNodes;
63}
65{
66 Vec_Ptr_t * vNodes;
67 Abc_Obj_t * pObj;
68 int i;
69 Abc_NtkCleanCopy( pNtk );
70 Abc_NtkForEachCi( pNtk, pObj, i )
71 pObj->iTemp = i;
72 vNodes = Vec_PtrAlloc( Abc_NtkNodeNum(pNtk) );
73 Abc_NtkForEachNode( pNtk, pObj, i )
74 {
75 pObj->iTemp = Abc_NtkCiNum(pNtk) + Vec_PtrSize(vNodes);
76 Vec_PtrPush( vNodes, pObj );
77 }
78 assert( Vec_PtrSize(vNodes) == Abc_NtkNodeNum(pNtk) );
79 Abc_NtkForEachCo( pNtk, pObj, i )
80 pObj->iTemp = Abc_NtkCiNum(pNtk) + Vec_PtrSize(vNodes) + i;
81 return vNodes;
82}
83
95Vec_Int_t * Abc_NtkAssignStarts( Abc_Ntk_t * pNtk, Vec_Ptr_t * vNodes, int * pnTotal )
96{
97 Abc_Obj_t * pObj; int i, Counter = 0;
98 Vec_Int_t * vStarts = Vec_IntStart( Abc_NtkObjNum(pNtk) );
99 Vec_PtrForEachEntry( Abc_Obj_t *, vNodes, pObj, i )
100 {
101 Vec_IntWriteEntry( vStarts, pObj->iTemp, Counter );
102 Counter += Abc_Truth6WordNum( Abc_ObjFaninNum(pObj) );
103 }
104 Abc_NtkForEachCo( pNtk, pObj, i )
105 Vec_IntWriteEntry( vStarts, pObj->iTemp, Counter++ );
106 *pnTotal = Counter;
107 return vStarts;
108}
109
110void Abc_NtkFillTruthStore( word TruthStore[16][1<<10] )
111{
112 if ( TruthStore[0][0] == 0 )
113 {
114 static word Truth6[6] = {
115 0xAAAAAAAAAAAAAAAA,
116 0xCCCCCCCCCCCCCCCC,
117 0xF0F0F0F0F0F0F0F0,
118 0xFF00FF00FF00FF00,
119 0xFFFF0000FFFF0000,
120 0xFFFFFFFF00000000
121 };
122 int nVarsMax = 16;
123 int nWordsMax = (1 << 10);
124 int i, k;
125 assert( nVarsMax <= 16 );
126 for ( i = 0; i < 6; i++ )
127 for ( k = 0; k < nWordsMax; k++ )
128 TruthStore[i][k] = Truth6[i];
129 for ( i = 6; i < nVarsMax; i++ )
130 for ( k = 0; k < nWordsMax; k++ )
131 TruthStore[i][k] = ((k >> (i-6)) & 1) ? ~(word)0 : 0;
132 }
133}
134
146Sfm_Ntk_t * Abc_NtkExtractMfs( Abc_Ntk_t * pNtk, int nFirstFixed )
147{
148 word TruthStore[16][1<<10] = {{0}}, * pTruths[16] = {NULL}, pCube[1<<10] = {0};
149 Vec_Ptr_t * vNodes;
150 Vec_Wec_t * vFanins;
151 Vec_Str_t * vFixed;
152 Vec_Wrd_t * vTruths;
153 Vec_Int_t * vArray;
154 Vec_Int_t * vStarts;
155 Vec_Wrd_t * vTruths2;
156 Abc_Obj_t * pObj, * pFanin;
157 int i, k, nObjs, nTotal = 0;
158 vNodes = nFirstFixed ? Abc_NtkAssignIDs2(pNtk) : Abc_NtkAssignIDs(pNtk);
159 nObjs = Abc_NtkCiNum(pNtk) + Vec_PtrSize(vNodes) + Abc_NtkCoNum(pNtk);
160 vFanins = Vec_WecStart( nObjs );
161 vFixed = Vec_StrStart( nObjs );
162 vTruths = Vec_WrdStart( nObjs );
163 vStarts = Abc_NtkAssignStarts( pNtk, vNodes, &nTotal );
164 vTruths2= Vec_WrdStart( nTotal );
165 Abc_NtkFillTruthStore( TruthStore );
166 for ( i = 0; i < 16; i++ )
167 pTruths[i] = TruthStore[i];
168 Vec_PtrForEachEntry( Abc_Obj_t *, vNodes, pObj, i )
169 {
170 if ( Abc_ObjFaninNum(pObj) <= 6 )
171 {
172 word uTruth = Abc_SopToTruth((char *)pObj->pData, Abc_ObjFaninNum(pObj));
173 int Offset = Vec_IntEntry( vStarts, pObj->iTemp );
174 Vec_WrdWriteEntry( vTruths2, Offset, uTruth );
175 Vec_WrdWriteEntry( vTruths, pObj->iTemp, uTruth );
176 if ( uTruth == 0 || ~uTruth == 0 )
177 continue;
178 }
179 else
180 {
181 int nWords = Abc_Truth6WordNum( Abc_ObjFaninNum(pObj) );
182 int Offset = Vec_IntEntry( vStarts, pObj->iTemp );
183 word * pRes = Vec_WrdEntryP( vTruths2, Offset );
184 Abc_SopToTruthBig( (char *)pObj->pData, Abc_ObjFaninNum(pObj), pTruths, pCube, pRes );
185 Vec_WrdWriteEntry( vTruths, pObj->iTemp, pRes[0] );
186 // check const0
187 for ( k = 0; k < nWords; k++ )
188 if ( pRes[k] )
189 break;
190 if ( k == nWords )
191 continue;
192 // check const1
193 for ( k = 0; k < nWords; k++ )
194 if ( ~pRes[k] )
195 break;
196 if ( k == nWords )
197 continue;
198 }
199 vArray = Vec_WecEntry( vFanins, pObj->iTemp );
200 Vec_IntGrow( vArray, Abc_ObjFaninNum(pObj) );
201 Abc_ObjForEachFanin( pObj, pFanin, k )
202 Vec_IntPush( vArray, pFanin->iTemp );
203 //Vec_IntPrint( vArray );
204 }
205 Abc_NtkForEachCo( pNtk, pObj, i )
206 {
207 vArray = Vec_WecEntry( vFanins, pObj->iTemp );
208 Vec_IntGrow( vArray, Abc_ObjFaninNum(pObj) );
209 Abc_ObjForEachFanin( pObj, pFanin, k )
210 Vec_IntPush( vArray, pFanin->iTemp );
211 }
212 Vec_PtrFree( vNodes );
213 for ( i = Abc_NtkCiNum(pNtk); i < Abc_NtkCiNum(pNtk) + nFirstFixed; i++ )
214 Vec_StrWriteEntry( vFixed, i, (char)1 );
215 // update fixed
216 assert( nFirstFixed >= 0 && nFirstFixed < Abc_NtkNodeNum(pNtk) );
217// for ( i = Abc_NtkCiNum(pNtk); i + Abc_NtkCoNum(pNtk) < Abc_NtkObjNum(pNtk); i++ )
218// if ( rand() % 10 == 0 )
219// Vec_StrWriteEntry( vFixed, i, (char)1 );
220 return Sfm_NtkConstruct( vFanins, Abc_NtkCiNum(pNtk), Abc_NtkCoNum(pNtk), vFixed, NULL, vTruths, vStarts, vTruths2 );
221}
223{
224 word TruthStore[16][1<<10] = {{0}}, * pTruths[16] = {NULL}, pCube[1<<10] = {0};
225 Vec_Ptr_t * vNodes;
226 Vec_Wec_t * vFanins;
227 Vec_Str_t * vFixed;
228 Vec_Wrd_t * vTruths;
229 Vec_Int_t * vArray;
230 Vec_Int_t * vStarts;
231 Vec_Wrd_t * vTruths2;
232 Abc_Obj_t * pObj, * pFanin;
233 int i, k, nObjs, nTotal = 0;
234 vNodes = Abc_NtkAssignIDs2(pNtk);
235 nObjs = Abc_NtkCiNum(pNtk) + Vec_PtrSize(vNodes) + Abc_NtkCoNum(pNtk);
236 vFanins = Vec_WecStart( nObjs );
237 vFixed = Vec_StrStart( nObjs );
238 vTruths = Vec_WrdStart( nObjs );
239 vStarts = Abc_NtkAssignStarts( pNtk, vNodes, &nTotal );
240 vTruths2= Vec_WrdAlloc( nTotal );
241 Abc_NtkFillTruthStore( TruthStore );
242 for ( i = 0; i < 16; i++ )
243 pTruths[i] = TruthStore[i];
244 Vec_PtrForEachEntry( Abc_Obj_t *, vNodes, pObj, i )
245 {
246 if ( Abc_ObjFaninNum(pObj) <= 6 )
247 {
248 word uTruth = Abc_SopToTruth((char *)pObj->pData, Abc_ObjFaninNum(pObj));
249 Vec_WrdWriteEntry( vTruths, pObj->iTemp, uTruth );
250 if ( uTruth == 0 || ~uTruth == 0 )
251 continue;
252 }
253 else
254 {
255 int nWords = Abc_Truth6WordNum( Abc_ObjFaninNum(pObj) );
256 int Offset = Vec_IntEntry( vStarts, pObj->iTemp );
257 word * pRes = Vec_WrdEntryP( vTruths2, Offset );
258 Abc_SopToTruthBig( (char *)pObj->pData, Abc_ObjFaninNum(pObj), pTruths, pCube, pRes );
259 // check const0
260 for ( k = 0; k < nWords; k++ )
261 if ( pRes[k] )
262 break;
263 if ( k == nWords )
264 continue;
265 // check const1
266 for ( k = 0; k < nWords; k++ )
267 if ( ~pRes[k] )
268 break;
269 if ( k == nWords )
270 continue;
271 }
272 vArray = Vec_WecEntry( vFanins, pObj->iTemp );
273 Vec_IntGrow( vArray, Abc_ObjFaninNum(pObj) );
274 Abc_ObjForEachFanin( pObj, pFanin, k )
275 Vec_IntPush( vArray, pFanin->iTemp );
276 }
277 Abc_NtkForEachCo( pNtk, pObj, i )
278 {
279 vArray = Vec_WecEntry( vFanins, pObj->iTemp );
280 Vec_IntGrow( vArray, Abc_ObjFaninNum(pObj) );
281 Abc_ObjForEachFanin( pObj, pFanin, k )
282 Vec_IntPush( vArray, pFanin->iTemp );
283 }
284 Vec_PtrFree( vNodes );
285 // set fixed attributes
286 Abc_NtkForEachNode( pNtk, pObj, i )
287 if ( i >= iPivot )
288 Vec_StrWriteEntry( vFixed, pObj->iTemp, (char)1 );
289 return Sfm_NtkConstruct( vFanins, Abc_NtkCiNum(pNtk), Abc_NtkCoNum(pNtk), vFixed, NULL, vTruths, vStarts, vTruths2 );
290}
291
304{
305 Vec_Int_t * vCover, * vMap, * vArray;
306 Abc_Obj_t * pNode;
307 word * pTruth;
308 int i, k, Fanin;
309 // map new IDs into old nodes
310 vMap = Vec_IntStart( Abc_NtkObjNumMax(pNtk) );
311 Abc_NtkForEachCi( pNtk, pNode, i )
312 Vec_IntWriteEntry( vMap, pNode->iTemp, Abc_ObjId(pNode) );
313 Abc_NtkForEachNode( pNtk, pNode, i )
314 if ( pNode->iTemp > 0 )
315 Vec_IntWriteEntry( vMap, pNode->iTemp, Abc_ObjId(pNode) );
316 // remove old fanins
317 Abc_NtkForEachNode( pNtk, pNode, i )
318 if ( !Sfm_NodeReadFixed(p, pNode->iTemp) )
319 Abc_ObjRemoveFanins( pNode );
320 // create new fanins
321 vCover = Vec_IntAlloc( 1 << 16 );
322 Abc_NtkForEachNode( pNtk, pNode, i )
323 {
324 if ( pNode->iTemp == 0 || Sfm_NodeReadFixed(p, pNode->iTemp) )
325 continue;
326 if ( !Sfm_NodeReadUsed(p, pNode->iTemp) )
327 {
328 Abc_NtkDeleteObj( pNode );
329 continue;
330 }
331 // update fanins
332 vArray = Sfm_NodeReadFanins( p, pNode->iTemp );
333 pTruth = Sfm_NodeReadTruth( p, pNode->iTemp );
334 Abc_TtFlipVar5( pTruth, Vec_IntSize(vArray) );
335 pNode->pData = Abc_SopCreateFromTruthIsop( (Mem_Flex_t *)pNtk->pManFunc, Vec_IntSize(vArray), pTruth, vCover );
336 if ( Abc_SopGetVarNum((char *)pNode->pData) == 0 )
337 continue;
338 assert( Abc_SopGetVarNum((char *)pNode->pData) == Vec_IntSize(vArray) );
339 Vec_IntForEachEntry( vArray, Fanin, k )
340 Abc_ObjAddFanin( pNode, Abc_NtkObj(pNtk, Vec_IntEntry(vMap, Fanin)) );
341 }
342 Vec_IntFree( vCover );
343 Vec_IntFree( vMap );
344}
345
358{
359 Sfm_Ntk_t * p;
360 int nFaninMax, nNodes;
361 assert( Abc_NtkIsLogic(pNtk) );
362 Abc_NtkSweep( pNtk, 0 );
363 // count fanouts
364 nFaninMax = Abc_NtkGetFaninMax( pNtk );
365 if ( nFaninMax > 15 )
366 {
367 Abc_Print( 1, "Currently \"mfs\" cannot process the network containing nodes with more than 15 fanins.\n" );
368 return 1;
369 }
370 if ( !Abc_NtkHasSop(pNtk) )
371 if ( !Abc_NtkToSop( pNtk, -1, ABC_INFINITY ) )
372 {
373 printf( "Conversion to SOP has failed due to low resource limit.\n" );
374 return 0;
375 }
376 // collect information
377 p = Abc_NtkExtractMfs( pNtk, pPars->nFirstFixed );
378 // perform optimization
379 nNodes = Sfm_NtkPerform( p, pPars );
380 if ( nNodes == 0 )
381 {
382// Abc_Print( 1, "The network is not changed by \"mfs\".\n" );
383 }
384 else
385 {
386 Abc_NtkInsertMfs( pNtk, p );
387 if( pPars->fVerbose )
388 Abc_Print( 1, "The network has %d nodes changed by \"mfs\".\n", nNodes );
389 }
390 Sfm_NtkFree( p );
391 return 1;
392}
393
394
395
407Abc_Ntk_t * Abc_NtkUnrollAndDrop( Abc_Ntk_t * p, int nFrames, int nFramesAdd, Vec_Int_t * vFlops, int * piPivot )
408{
409 Abc_Ntk_t * pNtk;
410 Abc_Obj_t * pFanin, * pNode;
411 Vec_Ptr_t * vNodes;
412 int i, k, f, Value;
413 assert( nFramesAdd >= 0 );
414 assert( Abc_NtkIsLogic(p) );
415 assert( Vec_IntSize(vFlops) == Abc_NtkLatchNum(p) );
416 *piPivot = -1;
417 // start the network
418 pNtk = Abc_NtkAlloc( p->ntkType, p->ntkFunc, 1 );
419 pNtk->pName = Extra_UtilStrsav(Abc_NtkName(p));
420 // add CIs for the new network
421 Abc_NtkForEachCi( p, pNode, i )
422 pNode->pCopy = Abc_NtkCreatePi( pNtk );
423 // iterate unrolling
424 vNodes = Abc_NtkDfs( p, 0 );
425 for ( f = 0; f <= nFrames + nFramesAdd; f++ )
426 {
427 if ( f > 0 )
428 {
429 Abc_NtkForEachPi( p, pNode, i )
430 pNode->pCopy = Abc_NtkCreatePi( pNtk );
431 }
432 Vec_PtrForEachEntry( Abc_Obj_t *, vNodes, pNode, i )
433 {
434 Abc_NtkDupObj( pNtk, pNode, 0 );
435 Abc_ObjForEachFanin( pNode, pFanin, k )
436 Abc_ObjAddFanin( pNode->pCopy, pFanin->pCopy );
437 }
438 Abc_NtkForEachCo( p, pNode, i )
439 pNode->pCopy = Abc_ObjFanin0(pNode)->pCopy;
440 Abc_NtkForEachPo( p, pNode, i )
441 Abc_ObjAddFanin( Abc_NtkCreatePo(pNtk), pNode->pCopy );
442 // add buffers
443 if ( f == 0 )
444 {
445 *piPivot = Abc_NtkObjNum(pNtk);
446// Abc_NtkForEachLatchInput( p, pNode, i )
447// pNode->pCopy = Abc_NtkCreateNodeBuf( pNtk, pNode->pCopy );
448 }
449 // transfer to flop outputs
450 Abc_NtkForEachLatch( p, pNode, i )
451 Abc_ObjFanout0(pNode)->pCopy = Abc_ObjFanin0(pNode)->pCopy;
452 // add final POs
453 if ( f > nFramesAdd )
454 {
455 Vec_IntForEachEntry( vFlops, Value, i )
456 {
457 if ( Value == 0 )
458 continue;
459 pNode = Abc_NtkCo( p, Abc_NtkPoNum(p) + i );
460 Abc_ObjAddFanin( Abc_NtkCreatePo(pNtk), pNode->pCopy );
461 }
462 }
463 }
464 Vec_PtrFree( vNodes );
467 // perform combinational cleanup
468 Abc_NtkCleanup( pNtk, 0 );
469 if ( !Abc_NtkCheck( pNtk ) )
470 fprintf( stdout, "Abc_NtkCreateFromNode(): Network check has failed.\n" );
471 return pNtk;
472}
473
485void Abc_NtkReinsertNodes( Abc_Ntk_t * p, Abc_Ntk_t * pNtk, int iPivot )
486{
487 Abc_Obj_t * pNode, * pNodeNew, * pFaninNew;
488 Vec_Ptr_t * vNodes;
489 int i, k;
490 assert( Abc_NtkIsLogic(p) );
491 assert( Abc_NtkCiNum(p) <= Abc_NtkCiNum(pNtk) );
492 vNodes = Abc_NtkDfs( p, 0 );
493 // clean old network
495 Abc_NtkForEachNode( p, pNode, i )
496 {
497 Abc_ObjRemoveFanins( pNode );
498 pNode->pData = Abc_SopRegister( (Mem_Flex_t *)p->pManFunc, (char *)" 0\n" );
499 }
500 // map CIs
501 Abc_NtkForEachCi( p, pNode, i )
502 Abc_NtkCi(pNtk, i)->pCopy = pNode;
503 // map internal nodes
504 assert( Vec_PtrSize(vNodes) + Abc_NtkCiNum(p) + Abc_NtkPoNum(p) == iPivot );
505 Vec_PtrForEachEntry( Abc_Obj_t *, vNodes, pNode, i )
506 {
507 pNodeNew = Abc_NtkObj( pNtk, Abc_NtkCiNum(p) + i + 1 );
508 if ( pNodeNew == NULL )
509 continue;
510 pNodeNew->pCopy = pNode;
511 }
512 // connect internal nodes
513 Vec_PtrForEachEntry( Abc_Obj_t *, vNodes, pNode, i )
514 {
515 pNodeNew = Abc_NtkObj( pNtk, Abc_NtkCiNum(p) + i + 1 );
516 if ( pNodeNew == NULL )
517 continue;
518 assert( pNodeNew->pCopy == pNode );
519 Abc_ObjForEachFanin( pNodeNew, pFaninNew, k )
520 Abc_ObjAddFanin( pNodeNew->pCopy, pFaninNew->pCopy );
521 pNode->pData = Abc_SopRegister( (Mem_Flex_t *)p->pManFunc, (char *)pNodeNew->pData );
522 }
523 Vec_PtrFree( vNodes );
524}
525
537int Abc_NtkMfsAfterICheck( Abc_Ntk_t * p, int nFrames, int nFramesAdd, Vec_Int_t * vFlops, Sfm_Par_t * pPars )
538{
539 Sfm_Ntk_t * pp;
540 int nFaninMax, nNodes;
541 Abc_Ntk_t * pNtk;
542 int iPivot;
543 assert( Abc_NtkIsLogic(p) );
544 // count fanouts
545 nFaninMax = Abc_NtkGetFaninMax( p );
546 if ( nFaninMax > 15 )
547 {
548 Abc_Print( 1, "Currently \"mfs\" cannot process the network containing nodes with more than 15 fanins.\n" );
549 return 0;
550 }
551 if ( !Abc_NtkHasSop(p) )
553 // derive unfolded network
554 pNtk = Abc_NtkUnrollAndDrop( p, nFrames, nFramesAdd, vFlops, &iPivot );
555 Io_WriteBlifLogic( pNtk, "unroll_dump.blif", 0 );
556 // collect information
557 pp = Abc_NtkExtractMfs2( pNtk, iPivot );
558 // perform optimization
559 nNodes = Sfm_NtkPerform( pp, pPars );
560 if ( nNodes == 0 )
561 {
562// Abc_Print( 1, "The network is not changed by \"mfs\".\n" );
563 }
564 else
565 {
566 Abc_NtkInsertMfs( pNtk, pp );
567 if( pPars->fVerbose )
568 Abc_Print( 1, "The network has %d nodes changed by \"mfs\".\n", nNodes );
569 Abc_NtkReinsertNodes( p, pNtk, iPivot );
570 }
571 Abc_NtkDelete( pNtk );
572 Sfm_NtkFree( pp );
573 // perform final sweep
574 Abc_NtkSweep( p, 0 );
575 if ( !Abc_NtkHasSop(p) )
577 return 1;
578
579}
580
581
585
586
588
int Abc_NtkPerformMfs(Abc_Ntk_t *pNtk, Sfm_Par_t *pPars)
Definition abcMfs.c:357
void Abc_NtkInsertMfs(Abc_Ntk_t *pNtk, Sfm_Ntk_t *p)
Definition abcMfs.c:303
Vec_Ptr_t * Abc_NtkAssignIDs2(Abc_Ntk_t *pNtk)
Definition abcMfs.c:64
Vec_Int_t * Abc_NtkAssignStarts(Abc_Ntk_t *pNtk, Vec_Ptr_t *vNodes, int *pnTotal)
Definition abcMfs.c:95
void Abc_NtkFillTruthStore(word TruthStore[16][1<< 10])
Definition abcMfs.c:110
Abc_Ntk_t * Abc_NtkUnrollAndDrop(Abc_Ntk_t *p, int nFrames, int nFramesAdd, Vec_Int_t *vFlops, int *piPivot)
Definition abcMfs.c:407
void Abc_NtkReinsertNodes(Abc_Ntk_t *p, Abc_Ntk_t *pNtk, int iPivot)
Definition abcMfs.c:485
int Abc_NtkMfsAfterICheck(Abc_Ntk_t *p, int nFrames, int nFramesAdd, Vec_Int_t *vFlops, Sfm_Par_t *pPars)
Definition abcMfs.c:537
ABC_NAMESPACE_IMPL_START Vec_Ptr_t * Abc_NtkAssignIDs(Abc_Ntk_t *pNtk)
DECLARATIONS ///.
Definition abcMfs.c:49
Sfm_Ntk_t * Abc_NtkExtractMfs2(Abc_Ntk_t *pNtk, int iPivot)
Definition abcMfs.c:222
Sfm_Ntk_t * Abc_NtkExtractMfs(Abc_Ntk_t *pNtk, int nFirstFixed)
Definition abcMfs.c:146
int nWords
Definition abcNpn.c:127
ABC_DLL int Abc_NtkSweep(Abc_Ntk_t *pNtk, int fVerbose)
Definition abcSweep.c:692
struct Abc_Obj_t_ Abc_Obj_t
Definition abc.h:116
#define Abc_NtkForEachCo(pNtk, pCo, i)
Definition abc.h:522
ABC_DLL int Abc_NtkGetFaninMax(Abc_Ntk_t *pNtk)
Definition abcUtil.c:486
ABC_DLL Abc_Ntk_t * Abc_NtkAlloc(Abc_NtkType_t Type, Abc_NtkFunc_t Func, int fUseMemMan)
DECLARATIONS ///.
Definition abcNtk.c:53
ABC_DLL void Abc_ObjAddFanin(Abc_Obj_t *pObj, Abc_Obj_t *pFanin)
Definition abcFanio.c:84
ABC_DLL void Abc_NtkDeleteObj(Abc_Obj_t *pObj)
Definition abcObj.c:170
#define Abc_NtkForEachPo(pNtk, pPo, i)
Definition abc.h:520
ABC_DLL Abc_Obj_t * Abc_NtkDupObj(Abc_Ntk_t *pNtkNew, Abc_Obj_t *pObj, int fCopyName)
Definition abcObj.c:342
ABC_DLL int Abc_NtkCleanup(Abc_Ntk_t *pNtk, int fVerbose)
Definition abcSweep.c:478
#define Abc_NtkForEachLatch(pNtk, pObj, i)
Definition abc.h:500
ABC_DLL Vec_Ptr_t * Abc_NtkDfs(Abc_Ntk_t *pNtk, int fCollectAll)
Definition abcDfs.c:82
ABC_DLL int Abc_NtkCheck(Abc_Ntk_t *pNtk)
FUNCTION DEFINITIONS ///.
Definition abcCheck.c:64
ABC_DLL char * Abc_SopCreateFromTruthIsop(Mem_Flex_t *pMan, int nVars, word *pTruth, Vec_Int_t *vCover)
Definition abcSop.c:462
#define Abc_ObjForEachFanin(pObj, pFanin, i)
Definition abc.h:527
struct Abc_Ntk_t_ Abc_Ntk_t
Definition abc.h:115
ABC_DLL void Abc_NtkAddDummyPoNames(Abc_Ntk_t *pNtk)
Definition abcNames.c:521
ABC_DLL void Abc_SopToTruthBig(char *pSop, int nInputs, word **pVars, word *pCube, word *pRes)
Definition abcSop.c:1425
ABC_DLL int Abc_NtkToSop(Abc_Ntk_t *pNtk, int fMode, int nCubeLimit)
Definition abcFunc.c:1261
#define Abc_NtkForEachPi(pNtk, pPi, i)
Definition abc.h:516
ABC_DLL int Abc_SopGetVarNum(char *pSop)
Definition abcSop.c:584
ABC_DLL void Abc_ObjRemoveFanins(Abc_Obj_t *pObj)
Definition abcFanio.c:141
#define Abc_NtkForEachCi(pNtk, pCi, i)
Definition abc.h:518
ABC_DLL void Abc_NtkDelete(Abc_Ntk_t *pNtk)
Definition abcNtk.c:1421
ABC_DLL word Abc_SopToTruth(char *pSop, int nInputs)
Definition abcSop.c:1314
ABC_DLL void Abc_NtkCleanCopy(Abc_Ntk_t *pNtk)
Definition abcUtil.c:540
ABC_DLL char * Abc_SopRegister(Mem_Flex_t *pMan, const char *pName)
DECLARATIONS ///.
Definition abcSop.c:62
ABC_DLL void Abc_NtkAddDummyPiNames(Abc_Ntk_t *pNtk)
Definition abcNames.c:495
#define Abc_NtkForEachNode(pNtk, pNode, i)
Definition abc.h:464
#define ABC_INFINITY
MACRO DEFINITIONS ///.
Definition abc_global.h:250
#define ABC_NAMESPACE_IMPL_START
#define ABC_NAMESPACE_IMPL_END
int nTotal
DECLARATIONS ///.
Definition cutTruth.c:37
typedefABC_NAMESPACE_IMPL_START struct Vec_Int_t_ Vec_Int_t
DECLARATIONS ///.
Definition bblif.c:37
struct Vec_Str_t_ Vec_Str_t
Definition bblif.c:46
Cube * p
Definition exorList.c:222
char * Extra_UtilStrsav(const char *s)
void Io_WriteBlifLogic(Abc_Ntk_t *pNtk, char *pFileName, int fWriteLatches)
FUNCTION DEFINITIONS ///.
Definition ioWriteBlif.c:59
unsigned __int64 word
DECLARATIONS ///.
Definition kitPerm.c:36
struct Mem_Flex_t_ Mem_Flex_t
Definition mem.h:34
int Sfm_NtkPerform(Sfm_Ntk_t *p, Sfm_Par_t *pPars)
Definition sfmCore.c:367
void Sfm_NtkFree(Sfm_Ntk_t *p)
Definition sfmNtk.c:219
int Sfm_NodeReadFixed(Sfm_Ntk_t *p, int i)
Definition sfmNtk.c:378
struct Sfm_Par_t_ Sfm_Par_t
Definition sfm.h:42
typedefABC_NAMESPACE_HEADER_START struct Sfm_Ntk_t_ Sfm_Ntk_t
INCLUDES ///.
Definition sfm.h:41
Sfm_Ntk_t * Sfm_NtkConstruct(Vec_Wec_t *vFanins, int nPis, int nPos, Vec_Str_t *vFixed, Vec_Str_t *vEmpty, Vec_Wrd_t *vTruths, Vec_Int_t *vStarts, Vec_Wrd_t *vTruths2)
Definition sfmNtk.c:167
int Sfm_NodeReadUsed(Sfm_Ntk_t *p, int i)
Definition sfmNtk.c:382
word * Sfm_NodeReadTruth(Sfm_Ntk_t *p, int i)
Definition sfmNtk.c:374
Vec_Int_t * Sfm_NodeReadFanins(Sfm_Ntk_t *p, int i)
Definition sfmNtk.c:370
char * pName
Definition abc.h:158
void * pManFunc
Definition abc.h:191
void * pData
Definition abc.h:145
int iTemp
Definition abc.h:149
Abc_Obj_t * pCopy
Definition abc.h:148
int nFirstFixed
Definition sfm.h:58
int fVerbose
Definition sfm.h:74
#define assert(ex)
Definition util_old.h:213
#define Vec_IntForEachEntry(vVec, Entry, i)
MACRO DEFINITIONS ///.
Definition vecInt.h:54
typedefABC_NAMESPACE_HEADER_START struct Vec_Ptr_t_ Vec_Ptr_t
INCLUDES ///.
Definition vecPtr.h:42
#define Vec_PtrForEachEntry(Type, vVec, pEntry, i)
MACRO DEFINITIONS ///.
Definition vecPtr.h:55
typedefABC_NAMESPACE_HEADER_START struct Vec_Wec_t_ Vec_Wec_t
INCLUDES ///.
Definition vecWec.h:42
typedefABC_NAMESPACE_HEADER_START struct Vec_Wrd_t_ Vec_Wrd_t
INCLUDES ///.
Definition vecWrd.h:42