61 Abc_Print( 1,
"Something did not work out with the command \"%s\".\n", pScript );
70 Abc_Print( 1,
"Something did not work out with the command \"%s\".\n", pScript );
76 if ( Gia_ManAndNum(pNew) > Gia_ManAndNum(pTemp) )
85 Vec_Int_t * vGains = Vec_IntStartFull( Vec_PtrSize(vGias) );
87 Vec_Int_t * vRands = Vec_IntAlloc( Vec_PtrSize(vGias) );
89 for ( i = 0; i < Vec_PtrSize(vGias); i++ )
90 Vec_IntPush( vRands,
Abc_Random(0) % 0x1000000 );
94 Vec_IntWriteEntry( vGains, i, Gia_ManAndNum(pGia) - Gia_ManAndNum(pNew) );
96 Vec_PtrWriteEntry( vGias, i, pNew );
98 Vec_IntFree( vRands );
116 char FileName[100], Command[1000];
117 sprintf( FileName,
"%06x.aig", Rand );
119 sprintf( Command,
"./abc -q \"&read %s; %s; &write %s\"", FileName, pScript, FileName );
123 if (
system( (
char *)Command ) )
126 fprintf( stderr,
"The following command has returned non-zero exit status:\n" );
127 fprintf( stderr,
"\"%s\"\n", (
char *)Command );
128 fprintf( stderr,
"Sorry for the inconvenience.\n" );
135 if ( pNew && Gia_ManAndNum(pNew) < Gia_ManAndNum(
p) )
175 printf(
"Running non-concurrent synthesis.\n" ), fflush(stdout);
178 Vec_Int_t * vGains = Vec_IntStartFull( Vec_PtrSize(vGias) );
180 Vec_Ptr_t * vData = Vec_PtrAlloc( Vec_PtrSize(vGias) );
185 pData[i].
pOut = NULL;
189 Vec_PtrPush( vData, pData+i );
192 printf(
"Running concurrent synthesis with %d processes.\n", nProcs ), fflush(stdout);
196 Vec_IntWriteEntry( vGains, i, Gia_ManAndNum(pGia) - Gia_ManAndNum(pData[i].pOut) );
198 Vec_PtrWriteEntry( vGias, i, pData[i].pOut );
200 Vec_PtrFree( vData );
219 Vec_Int_t * vMapping =
p->vMapping ? Vec_IntAlloc( Vec_IntSize(
p->vMapping) ) : NULL;
220 if (
p->vMapping == NULL )
222 Vec_IntFill( vMapping, Gia_ManObjNum(
p), 0 );
225 pObj = Gia_ManObj(
p, i );
226 Vec_IntWriteEntry( vMapping, Abc_Lit2Var(pObj->
Value), Vec_IntSize(vMapping) );
227 Vec_IntPush( vMapping, Gia_ObjLutSize(
p, i) );
229 Vec_IntPush( vMapping, Abc_Lit2Var(pFanin->
Value) );
230 Vec_IntPush( vMapping, Abc_Lit2Var(pObj->
Value) );
251 Abc_Print( 1,
"Something did not work out with the command \"%s\".\n", pScript );
260 Abc_Print( 1,
"Something did not work out with the command \"%s\".\n", pScript );
267 if ( Gia_ManHasMapping(pNew) && Gia_ManHasMapping(pCopy) )
277 if ( Gia_ManAndNum(pNew) < Gia_ManAndNum(pCopy) )
283 Vec_PtrWriteEntry( vAigs, i, pCopy );
301 int RetValue = Vec_PtrSize(vvIns);
302 Vec_Ptr_t * vvInsNew = Vec_PtrAlloc( 10 );
303 Vec_Ptr_t * vvOutsNew = Vec_PtrAlloc( 10 );
304 Vec_Ptr_t * vvWinsNew = Vec_PtrAlloc( 10 );
307 int i, Gain, iEntry = Vec_IntArgMax(vGains);
308 if ( iEntry == -1 || Vec_IntEntry(vGains, iEntry) < 0 )
311 Vec_IntWriteEntry( vGains, iEntry, -1 );
312 Vec_PtrPush( vvInsNew, Vec_IntDup((
Vec_Int_t *)Vec_PtrEntry(vvIns, iEntry)) );
313 Vec_PtrPush( vvOutsNew, Vec_IntDup((
Vec_Int_t *)Vec_PtrEntry(vvOuts, iEntry)) );
323 if ( Gia_ObjIsTravIdCurrent(
p, pNode) )
325 if ( j < Vec_IntSize(vNodes) )
326 Vec_IntWriteEntry( vGains, i, -1 );
332 Vec_PtrFreeFunc( vvInsNew, (
void (*)(
void *)) Vec_IntFree );
333 Vec_PtrFreeFunc( vvOutsNew, (
void (*)(
void *)) Vec_IntFree );
334 Vec_PtrFreeFunc( vvWinsNew, (
void (*)(
void *))
Gia_ManStop );
352 if ( Gia_ObjIsTravIdCurrent( pGia, pObj ) )
354 Gia_ObjSetTravIdCurrent( pGia, pObj );
355 if ( Gia_ObjIsCi(pObj) )
357 assert( Gia_ObjIsAnd(pObj) );
365 if ( Gia_ObjIsTravIdCurrent( pGia, pObj ) )
367 Gia_ObjSetTravIdCurrent( pGia, pObj );
373 Vec_Int_t * vLevel, * vNodes = Vec_IntAlloc( 100 );
374 Gia_Obj_t * pObj, * pNext;
int i, k, iLevel;
376 Vec_IntClear( vLevel );
384 if ( Gia_ObjIsAnd(pNext) && !Gia_ObjIsTravIdCurrent(pMan, pNext) && !pNext->
fMark0 ) {
386 Vec_WecPush( vStore, Gia_ObjLevel(pMan, pNext), Gia_ObjId(pMan, pNext) );
391 Gia_ObjSetTravIdCurrent(pMan, pObj);
395 assert( !Gia_ObjIsTravIdCurrent(pMan, pObj) );
398 if ( !Gia_ObjIsTravIdCurrent(pMan, Gia_ObjFanin0(pObj)) ||
399 !Gia_ObjIsTravIdCurrent(pMan, Gia_ObjFanin1(pObj)) )
401 Gia_ObjSetTravIdCurrent(pMan, pObj);
402 Vec_IntPush( vNodes, Gia_ObjId(pMan, pObj) );
403 assert( Gia_ObjIsAnd(pObj) );
406 if ( Gia_ObjIsAnd(pNext) && !Gia_ObjIsTravIdCurrent(pMan, pNext) && !pNext->
fMark0 ) {
408 assert( Gia_ObjLevel(pMan, pNext) > iLevel );
409 Vec_WecPush( vStore, Gia_ObjLevel(pMan, pNext), Gia_ObjId(pMan, pNext) );
412 Vec_IntSort( vNodes, 0 );
418 Vec_Ptr_t * vvNodes = Vec_PtrAlloc( Vec_PtrSize(vvIns) );
430 Gia_ObjSetTravIdCurrent(pMan, pObj);
434 if ( !Gia_ObjIsTravIdCurrent(pMan, pNext) )
436 if ( k < Gia_ObjFanoutNum(pMan, pObj) )
437 Vec_IntPush( vOuts, Gia_ObjId(pMan, pObj) );
439 if ( Vec_IntSize(vOuts) == 0 )
440 printf(
"Window with %d internal nodes has no outputs (are these dangling nodes?).\n", Vec_IntSize(vNodes) );
446 Vec_Ptr_t * vvOuts = Vec_PtrAlloc( Vec_PtrSize(vvNodes) );
455 int LevelMin = Gia_ObjLevel(pMan, pObj), LevelMax = Level + 1;
457 if ( Gia_ObjIsAnd(pNext) )
458 LevelMax = Abc_MinInt( LevelMax, Gia_ObjLevel(pMan, pNext) );
459 if ( LevelMin == LevelMax )
continue;
460 assert( LevelMin < LevelMax );
462 Gia_ObjSetLevel( pMan, pObj, LevelMin + (
Abc_Random(0) % (LevelMax - LevelMin)) );
463 assert( Gia_ObjLevel(pMan, pObj) < LevelMax );
472 if ( Gia_ObjLevel(pMan, pObj) <= Level )
474 for ( n = 0; n < 2; n++ ) {
475 Gia_Obj_t * pFanin = n ? Gia_ObjFanin1(pObj) : Gia_ObjFanin0(pObj);
476 if ( Gia_ObjLevel(pMan, pFanin) <= Level && !Gia_ObjIsTravIdCurrent(pMan, pFanin) ) {
477 Gia_ObjSetTravIdCurrent(pMan, pFanin);
478 Vec_IntPush( vRes, Gia_ObjId(pMan, pFanin) );
483 pFanin = Gia_ObjFanin0(pObj);
484 if ( Gia_ObjLevel(pMan, pFanin) <= Level && !Gia_ObjIsTravIdCurrent(pMan, pFanin) && Gia_ObjIsAnd(pFanin) ) {
485 Gia_ObjSetTravIdCurrent(pMan, pFanin);
486 Vec_IntPush( vRes, Gia_ObjId(pMan, pFanin) );
489 Vec_IntSort( vRes, 0 );
496 Vec_Wec_t * vSupps = Vec_WecStart( Vec_IntSize(vBelow) );
497 Vec_Int_t * vSuppIds = Vec_IntStartFull( Gia_ManObjNum(pMan) );
501 Vec_IntWriteEntry( vSuppIds, Gia_ObjId(pMan, pObj), i );
502 Vec_IntPush( Vec_WecEntry(vSupps, i), Gia_ObjId(pMan, pObj) );
505 if ( Gia_ObjLevel(pMan, pObj) <= Level )
507 int iSuppId0 = Vec_IntEntry( vSuppIds, Gia_ObjFaninId0(pObj, i) );
508 int iSuppId1 = Vec_IntEntry( vSuppIds, Gia_ObjFaninId1(pObj, i) );
509 if ( iSuppId0 == -1 || iSuppId1 == -1 ) {
513 Vec_IntClear( vTemp );
514 Vec_IntTwoMerge2( Vec_WecEntry(vSupps, iSuppId0), Vec_WecEntry(vSupps, iSuppId1), vTemp );
515 if ( Vec_IntSize(vTemp) >
nSuppMax ) {
519 Vec_IntWriteEntry( vSuppIds, i, Vec_WecSize(vSupps) );
520 Vec_IntAppend( Vec_WecPushLevel(vSupps), vTemp );
525 if ( Gia_ObjLevel(pMan, pObj) > Level && Vec_IntEntry(vSuppIds, i) >= 0 && !Gia_ObjIsTravIdCurrent(pMan, pObj) ) {
527 Gia_ObjSetTravIdPrevious(pMan, pObj);
530 vResSupps = Vec_WecAlloc( 100 );
532 if ( Gia_ObjLevel(pMan, pObj) > Level && Vec_IntEntry(vSuppIds, i) >= 0 && !Gia_ObjIsTravIdCurrent(pMan, pObj) ) {
533 Vec_Int_t * vSupp = Vec_WecEntry( vSupps, Vec_IntEntry(vSuppIds, i) );
534 if ( Vec_IntSize(vSupp) < 4 )
536 Vec_Int_t * vThis = Vec_WecPushLevel( vResSupps );
537 Vec_IntGrow( vThis, Vec_IntSize(vSupp) + 1 );
538 Vec_IntAppend( vThis, vSupp );
543 Vec_WecFree( vSupps );
544 Vec_IntFree( vSuppIds );
545 Vec_IntFree( vBelow );
546 Vec_IntFree( vTemp );
554 if ( Vec_IntTwoCountCommon(vLevel, vOne) > 0 )
555 Vec_IntClear( vLevel );
556 Vec_WecRemoveEmpty( vSupps );
565 Gia_ObjSetTravIdPrevious(pMan, pObj);
574 Gia_ObjSetTravIdPrevious(pMan, pObj);
576 Gia_ObjSetTravIdPrevious(pMan, pObj);
581 if ( Gia_ObjIsTravIdCurrent(pMan, pObj) )
583 if ( k < Vec_IntSize(vLevel) )
584 Vec_IntClear( vLevel );
586 Vec_WecRemoveEmpty( vSupps );
593 if ( Vec_IntTwoCountCommon(vLevel, vOne) == Vec_IntSize(vLevel) )
594 Vec_IntClear( vLevel );
595 Vec_WecRemoveEmpty( vSupps );
601 while ( Vec_WecSize(vSupps) > 0 ) {
602 int i, Item, iRand =
Abc_Random(0) % Vec_WecSize(vSupps);
603 Vec_Int_t * vLevel, * vLevel2 = Vec_WecEntry( vSupps, iRand );
604 Vec_Int_t * vCopy = Vec_IntDup( vLevel2 );
605 if ( Vec_IntSize(vLevel2) ==
nSuppMax ) {
606 Vec_PtrPush( vRes, vCopy );
614 int iBest = iRand, nUnion = Vec_IntSize(vCopy);
616 if ( i == iRand )
continue;
617 int nCommon = Vec_IntTwoCountCommon(vLevel, vCopy);
618 int nUnionCur = Vec_IntSize(vLevel) + Vec_IntSize(vCopy) - nCommon;
619 if ( nUnionCur <=
nSuppMax && nUnion < nUnionCur ) {
624 vLevel = Vec_WecEntry( vSupps, iBest );
626 Vec_IntPushUniqueOrder( vCopy, Item );
627 Vec_PtrPush( vRes, vCopy );
641 pNew->
pName = Abc_UtilStrsav(
p->pName );
642 pNew->
pSpec = Abc_UtilStrsav(
p->pSpec );
643 Gia_ManConst0(
p)->Value = 0;
645 pObj->
Value = Gia_ManAppendCi( pNew );
647 pObj->
Value = Gia_ManAppendAnd( pNew, Gia_ObjFanin0Copy(pObj), Gia_ObjFanin1Copy(pObj) );
649 pObj->
Value = Gia_ManAppendCo( pNew, pObj->
Value );
655 Vec_Ptr_t * vWins = Vec_PtrAlloc( Vec_PtrSize(vvIns) );
656 assert( Vec_PtrSize(vvIns) == Vec_PtrSize(vvNodes) );
657 assert( Vec_PtrSize(vvOuts) == Vec_PtrSize(vvNodes) );
664 Vec_PtrPush( vWins, pNew );
673 Gia_ObjSetLevel( pMan, pNode, (
int)(LevelMax - Gia_ObjLevel(pMan, pNode) + 1) );
675 Gia_ObjSetLevel( pMan, pNode, 0 );
690 int LevelCut = LevelMax > 8 ? (
Abc_Random(0) % (LevelMax - 4)) : 0;
693 Vec_Wec_t * vStore = Vec_WecStart( LevelMax+1 );
699 Vec_WecFree( vSupps );
700 Vec_WecFree( vStore );
723 if ( Gia_ObjUpdateTravIdCurrentId(
p, iObj ) )
725 pObj = Gia_ManObj(
p, iObj );
726 if ( Gia_ObjIsCi(pObj) || iObj == 0 )
728 assert( Gia_ObjIsAnd(pObj) );
731 Vec_IntPush( vAnds, iObj );
736 if ( !Gia_ManHasMapping(
p) )
738 Vec_IntClear( vAnds );
741 Gia_ObjSetTravIdCurrentId(
p, iObj );
749 pNew =
Gia_ManStart( 1+Vec_IntSize(vCis)+Vec_IntSize(vAnds)+Vec_IntSize(vCos) );
750 pNew->
pName = Abc_UtilStrsav(
p->pName );
752 Gia_ManConst0(
p)->Value = 0;
754 pObj->
Value = Gia_ManAppendCi( pNew );
756 pObj->
Value = Gia_ManAppendAnd( pNew, Gia_ObjFanin0Copy(pObj), Gia_ObjFanin1Copy(pObj) );
758 Gia_ManAppendCo( pNew, pObj->
Value );
759 assert( Gia_ManCiNum(pNew) > 0 && Gia_ManCoNum(pNew) > 0 );
760 if ( !Gia_ManHasMapping(
p) )
762 vMapping = Vec_IntAlloc( 4*Gia_ManObjNum(pNew) );
763 Vec_IntFill( vMapping, Gia_ManObjNum(pNew), 0 );
767 int iObj = Gia_ObjId(
p, pObj);
768 if ( !Gia_ObjIsLut(
p, iObj) )
770 Vec_IntWriteEntry( vMapping, Abc_Lit2Var(pObj->
Value), Vec_IntSize(vMapping) );
771 Vec_IntPush( vMapping, Gia_ObjLutSize(
p, iObj) );
773 Vec_IntPush( vMapping, Abc_Lit2Var(pFanin->
Value) );
774 Vec_IntPush( vMapping, Abc_Lit2Var(pObj->
Value) );
781 Vec_Ptr_t * vAigs = Vec_PtrAlloc( Vec_WecSize(vCis) );
int i;
782 for ( i = 0; i < Vec_WecSize(vCis); i++ )
785 Vec_PtrPush( vAigs,
Gia_ManDupDivideOne(
p, Vec_WecEntry(vCis, i), Vec_WecEntry(vAnds, i), Vec_WecEntry(vCos, i)) );
789 Vec_IntFree( vGains );
797 pNew->
pName = Abc_UtilStrsav(
p->pName );
798 pNew->
pSpec = Abc_UtilStrsav(
p->pSpec );
800 Gia_ManConst0(
p)->Value = 0;
802 pObj->
Value = Gia_ManAppendCi( pNew );
807 Vec_Int_t * vCi = Vec_WecEntry( vCis, i );
808 Vec_Int_t * vCo = Vec_WecEntry( vCos, i );
810 Gia_ManConst0(pGia)->Value = 0;
812 Gia_ManCi(pGia, k)->Value = pObj->
Value;
818 pObj->
Value = Gia_ManAppendAnd( pNew, Gia_ObjFanin0Copy(pObj), Gia_ObjFanin1Copy(pObj) );
820 pObj->
Value = Gia_ObjFanin0Copy(Gia_ManCo(pGia, k));
823 Gia_ManAppendCo( pNew, Gia_ObjFanin0Copy(pObj) );
836 if ( !Gia_ManHasMapping(
p) )
838 vMapping = Vec_IntAlloc( Vec_IntSize(
p->vMapping) );
839 Vec_IntFill( vMapping, Gia_ManObjNum(pNew), 0 );
847 Gia_Obj_t * pObj = Gia_ManObj( pGia, iObj );
848 Vec_IntWriteEntry( vMapping, Abc_Lit2Var(pObj->
Value), Vec_IntSize(vMapping) );
849 Vec_IntPush( vMapping, Gia_ObjLutSize(pGia, iObj) );
851 Vec_IntPush( vMapping, Abc_Lit2Var(pFanin->
Value) );
852 Vec_IntPush( vMapping, Abc_Lit2Var(pObj->
Value) );
873 Vec_Int_t * vPart = Vec_WecPushLevel( vRes );
874 int i, iStart = Seed % Gia_ManCoNum(
p);
877 for ( i = 0; i < Gia_ManCoNum(
p); i++ )
879 Gia_Obj_t * pObj = Gia_ManCo(
p, (iStart+i) % Gia_ManCoNum(
p) );
880 if ( Vec_IntSize(vPart) > nMaxSize )
881 vPart = Vec_WecPushLevel( vRes );
884 if ( Vec_IntSize(vPart) == 0 )
885 Vec_WecShrink( vRes, Vec_WecSize(vRes)-1 );
895 Vec_Int_t * vVec = Vec_WecPushLevel( vRes );
896 assert( Vec_IntSize(vVec) == 0 );
899 Gia_ObjSetTravIdCurrentId(
p, iObj );
900 if ( Gia_ManHasMapping(
p) )
903 if ( Gia_ObjIsLut(
p, iObj) )
905 if ( !Gia_ObjUpdateTravIdCurrentId(
p, iFan) )
906 Vec_IntPush( vVec, iFan );
912 iObj = Gia_ObjFaninId0p(
p, pObj);
913 if ( !Gia_ObjUpdateTravIdCurrentId(
p, iObj) )
914 Vec_IntPush( vVec, iObj );
915 iObj = Gia_ObjFaninId1p(
p, pObj);
916 if ( !Gia_ObjUpdateTravIdCurrentId(
p, iObj) )
917 Vec_IntPush( vVec, iObj );
920 assert( Vec_IntSize(vVec) > 0 );
928 if ( Gia_ManHasMapping(
p) )
933 Vec_Int_t * vVec = Vec_WecPushLevel( vRes );
934 assert( Vec_IntSize(vVec) == 0 );
936 if ( Gia_ObjIsLut(
p, iObj) )
938 Gia_ObjLutRefDecId(
p, iFan );
940 if ( Gia_ObjIsLut(
p, iObj) )
941 if ( Gia_ObjLutRefNumId(
p, iObj) )
942 Vec_IntPush( vVec, iObj );
944 if ( Gia_ObjIsLut(
p, iObj) )
946 Gia_ObjLutRefIncId(
p, iFan );
947 assert( Vec_IntSize(vVec) > 0 );
955 Vec_Int_t * vVec = Vec_WecPushLevel( vRes );
958 Gia_ObjRefDecId(
p, Gia_ObjFaninId0p(
p, pObj) );
959 Gia_ObjRefDecId(
p, Gia_ObjFaninId1p(
p, pObj) );
962 if ( Gia_ObjRefNum(
p, pObj) )
963 Vec_IntPush( vVec, Gia_ObjId(
p, pObj) );
966 Gia_ObjRefIncId(
p, Gia_ObjFaninId0p(
p, pObj) );
967 Gia_ObjRefIncId(
p, Gia_ObjFaninId1p(
p, pObj) );
985void Gia_ManStochSyn(
int nSuppMax,
int nMaxSize,
int nIters,
int TimeOut,
int Seed,
int fVerbose,
char * pScript,
int nProcs )
987 abctime nTimeToStop = TimeOut ? Abc_Clock() + TimeOut * CLOCKS_PER_SEC : 0;
988 abctime clkStart = Abc_Clock();
993 for ( i = 0; i < 10+Seed; i++ )
996 printf(
"Running %d iterations of the script \"%s\"", nIters, pScript );
998 printf(
" using %d concurrent threads.\n", nProcs-1 );
1000 printf(
" without concurrency.\n" );
1004 for ( i = 0; i < nIters; i++ )
1013 int fMapped = Gia_ManHasMapping(pGia) && Gia_ManHasMapping(pNew);
1016 printf(
"Iteration %3d : Using %3d partitions. Reducing %6d to %6d %s. ",
1017 i, Vec_PtrSize(vAigs), fMapped ?
Gia_ManLutNum(pGia) : Gia_ManAndNum(pGia),
1019 fMapped ?
"LUTs" :
"ANDs" );
1021 Abc_PrintTime( 0,
"Time", Abc_Clock() - clk );
1023 Vec_PtrFreeFunc( vAigs, (
void (*)(
void *))
Gia_ManStop );
1024 Vec_WecFree( vAnds );
1025 Vec_WecFree( vIns );
1026 Vec_WecFree( vOuts );
1027 if ( nTimeToStop && Abc_Clock() > nTimeToStop )
1029 printf(
"Runtime limit (%d sec) is reached after %d iterations.\n", TimeOut, i );
1036 Vec_Ptr_t * vIns = NULL, * vOuts = NULL, * vNodes = NULL;
1037 for ( i = 0; i < nIters; i++ )
1044 int nPartsInit = fOverlap ?
Gia_ManFilterPartitions( pGia, vIns, vNodes, vOuts, vAigs, vGains ) : Vec_PtrSize(vIns);
1048 printf(
"Iteration %3d : Using %3d -> %3d partitions. Reducing node count from %6d to %6d. ",
1049 i, nPartsInit, Vec_PtrSize(vAigs), Gia_ManAndNum(pGia), Gia_ManAndNum(pNew) );
1051 Abc_PrintTime( 0,
"Time", Abc_Clock() - clk );
1054 Vec_PtrFreeFunc( vAigs, (
void (*)(
void *))
Gia_ManStop );
1055 Vec_IntFreeP( &vGains );
1056 if ( vIns ) Vec_PtrFreeFunc( vIns, (
void (*)(
void *)) Vec_IntFree );
1057 if ( vOuts ) Vec_PtrFreeFunc( vOuts, (
void (*)(
void *)) Vec_IntFree );
1058 if ( vNodes ) Vec_PtrFreeFunc( vNodes, (
void (*)(
void *)) Vec_IntFree );
1059 if ( nTimeToStop && Abc_Clock() > nTimeToStop )
1061 printf(
"Runtime limit (%d sec) is reached after %d iterations.\n", TimeOut, i );
1070 printf(
"Cumulatively reduced %d %s (%.2f %%) after %d iterations. ",
1071 fMapped ? nLutBeg - nLutEnd : nBeg - nEnd, fMapped ?
"LUTs" :
"nodes", 100.0*(nBeg - nEnd)/Abc_MaxInt(nBeg, 1), nIters );
1073 Abc_PrintTime( 0,
"Total time", Abc_Clock() - clkStart );
void Abc_FrameUpdateGia(Abc_Frame_t *pAbc, Gia_Man_t *pNew)
#define ABC_SWAP(Type, a, b)
unsigned Abc_Random(int fReset)
void Util_ProcessThreads(int(*pUserFunc)(void *), void *vData, int nProcs, int TimeOut, int fVerbose)
DECLARATIONS ///.
#define ABC_CALLOC(type, num)
#define ABC_NAMESPACE_IMPL_START
#define ABC_NAMESPACE_IMPL_END
ABC_DLL Abc_Frame_t * Abc_FrameGetGlobalFrame()
ABC_DLL void Abc_FrameSetBatchMode(int Mode)
ABC_DLL Gia_Man_t * Abc_FrameReadGia(Abc_Frame_t *p)
ABC_DLL int Abc_FrameIsBatchMode()
typedefABC_NAMESPACE_IMPL_START struct Vec_Int_t_ Vec_Int_t
DECLARATIONS ///.
ABC_DLL int Cmd_CommandExecute(Abc_Frame_t *pAbc, const char *sCommand)
Vec_Ptr_t * Gia_ManDupWindows(Gia_Man_t *pMan, Vec_Ptr_t *vvIns, Vec_Ptr_t *vvNodes, Vec_Ptr_t *vvOuts)
void Gia_ManSelectRemove(Vec_Wec_t *vSupps, Vec_Int_t *vOne)
Gia_Man_t * Gia_ManDupWithMapping(Gia_Man_t *pGia)
Vec_Ptr_t * Gia_ManDeriveWinInsAll(Vec_Wec_t *vSupps, int nSuppMax, Gia_Man_t *pMan, int fOverlap)
void Gia_ManCollectNodes(Gia_Man_t *p, Vec_Int_t *vCis, Vec_Int_t *vAnds, Vec_Int_t *vCos)
Vec_Int_t * Gia_ManDeriveWinOuts(Gia_Man_t *pMan, Vec_Int_t *vNodes)
Vec_Ptr_t * Gia_ManDeriveWinOutsAll(Gia_Man_t *pMan, Vec_Ptr_t *vvNodes)
Vec_Ptr_t * Gia_ManDeriveWinNodesAll(Gia_Man_t *pMan, Vec_Ptr_t *vvIns, Vec_Wec_t *vStore)
Vec_Wec_t * Gia_ManCollectObjectsWithSuppLimit(Gia_Man_t *pMan, int Level, int nSuppMax)
Vec_Int_t * Gia_StochProcessArray(Vec_Ptr_t *vGias, char *pScript, int TimeSecs, int fVerbose)
Vec_Int_t * Gia_ManCollectObjectsPointedTo(Gia_Man_t *pMan, int Level)
ABC_NAMESPACE_IMPL_START Gia_Man_t * Gia_StochProcessSingle(Gia_Man_t *p, char *pScript, int Rand, int TimeSecs)
DECLARATIONS ///.
void Gia_ManPermuteLevel(Gia_Man_t *pMan, int Level)
Vec_Int_t * Gia_StochProcess(Vec_Ptr_t *vGias, char *pScript, int nProcs, int TimeSecs, int fVerbose)
int Gia_ManFilterPartitions(Gia_Man_t *p, Vec_Ptr_t *vvIns, Vec_Ptr_t *vvNodes, Vec_Ptr_t *vvOuts, Vec_Ptr_t *vWins, Vec_Int_t *vGains)
int Gia_StochProcess1(void *p)
int Gia_ManLevelR(Gia_Man_t *pMan)
void Gia_ObjDfsMark_rec(Gia_Man_t *pGia, Gia_Obj_t *pObj)
void Gia_ObjDfsMark2_rec(Gia_Man_t *pGia, Gia_Obj_t *pObj)
void Gia_ManDupMapping(Gia_Man_t *pNew, Gia_Man_t *p)
void Gia_ManSelectRemove3(Vec_Wec_t *vSupps, Vec_Int_t *vOne)
void Gia_ManMarkTfiTfo(Vec_Int_t *vOne, Gia_Man_t *pMan)
void Gia_ManStochSynthesis(Vec_Ptr_t *vAigs, char *pScript)
Vec_Wec_t * Gia_ManStochInputs(Gia_Man_t *p, Vec_Wec_t *vAnds)
Gia_Man_t * Gia_ManDupStitch(Gia_Man_t *p, Vec_Wec_t *vCis, Vec_Wec_t *vAnds, Vec_Wec_t *vCos, Vec_Ptr_t *vAigs, int fHash)
Vec_Int_t * Gia_ManDeriveWinNodes(Gia_Man_t *pMan, Vec_Int_t *vIns, Vec_Wec_t *vStore)
Gia_Man_t * Gia_StochProcessOne(Gia_Man_t *p, char *pScript, int Rand, int TimeSecs)
struct StochSynData_t_ StochSynData_t
void Gia_ManCollectNodes_rec(Gia_Man_t *p, int iObj, Vec_Int_t *vAnds)
Gia_Man_t * Gia_ManDupStitchMap(Gia_Man_t *p, Vec_Wec_t *vCis, Vec_Wec_t *vAnds, Vec_Wec_t *vCos, Vec_Ptr_t *vAigs)
Vec_Wec_t * Gia_ManStochNodes(Gia_Man_t *p, int nMaxSize, int Seed)
Vec_Ptr_t * Gia_ManDupDivide(Gia_Man_t *p, Vec_Wec_t *vCis, Vec_Wec_t *vAnds, Vec_Wec_t *vCos, char *pScript, int nProcs, int TimeOut)
void Gia_ManSelectRemove2(Vec_Wec_t *vSupps, Vec_Int_t *vOne, Gia_Man_t *pMan)
Gia_Man_t * Gia_ManDupFromArrays(Gia_Man_t *p, Vec_Int_t *vCis, Vec_Int_t *vAnds, Vec_Int_t *vCos)
Vec_Ptr_t * Gia_ManExtractPartitions(Gia_Man_t *pMan, int Iter, int nSuppMax, Vec_Ptr_t **pvIns, Vec_Ptr_t **pvOuts, Vec_Ptr_t **pvNodes, int fOverlap)
Vec_Wec_t * Gia_ManStochOutputs(Gia_Man_t *p, Vec_Wec_t *vAnds)
void Gia_ManStochSyn(int nSuppMax, int nMaxSize, int nIters, int TimeOut, int Seed, int fVerbose, char *pScript, int nProcs)
Gia_Man_t * Gia_ManDupDivideOne(Gia_Man_t *p, Vec_Int_t *vCis, Vec_Int_t *vAnds, Vec_Int_t *vCos)
Gia_Man_t * Gia_ManDupInsertWindows(Gia_Man_t *p, Vec_Ptr_t *vvIns, Vec_Ptr_t *vvOuts, Vec_Ptr_t *vWins)
#define Gia_ObjForEachFanoutStatic(p, pObj, pFanout, i)
void Gia_ManStop(Gia_Man_t *p)
Gia_Man_t * Gia_ManDup(Gia_Man_t *p)
void Gia_ManStaticFanoutStart(Gia_Man_t *p)
void Gia_ManStaticFanoutStop(Gia_Man_t *p)
#define Gia_ManForEachAnd(p, pObj, i)
void Gia_ManStopP(Gia_Man_t **p)
Gia_Man_t * Gia_AigerRead(char *pFileName, int fGiaSimple, int fSkipStrash, int fCheck)
void Gia_ManSetRegNum(Gia_Man_t *p, int nRegs)
void Gia_ManHashAlloc(Gia_Man_t *p)
#define Gia_ManForEachLut(p, i)
int Gia_ManLevelRNum(Gia_Man_t *p)
Gia_Man_t * Gia_ManStart(int nObjsMax)
FUNCTION DEFINITIONS ///.
struct Gia_Obj_t_ Gia_Obj_t
#define Gia_LutForEachFanin(p, i, iFan, k)
void Gia_ManFillValue(Gia_Man_t *p)
struct Gia_Man_t_ Gia_Man_t
#define Gia_ManForEachObjVec(vVec, p, pObj, i)
void Gia_ManCleanValue(Gia_Man_t *p)
Gia_Man_t * Gia_ManCleanup(Gia_Man_t *p)
Gia_Man_t * Gia_ManDupDfs(Gia_Man_t *p)
int Gia_ManLutNum(Gia_Man_t *p)
void Gia_ManCreateRefs(Gia_Man_t *p)
int Gia_ManHashAnd(Gia_Man_t *p, int iLit0, int iLit1)
void Gia_ManIncrementTravId(Gia_Man_t *p)
#define Gia_ManForEachObj(p, pObj, i)
MACRO DEFINITIONS ///.
#define Gia_ManForEachCo(p, pObj, i)
#define Gia_ManForEachCi(p, pObj, i)
void Gia_ManSetLutRefs(Gia_Man_t *p)
void Gia_ManCleanMark01(Gia_Man_t *p)
#define Gia_LutForEachFaninObj(p, i, pFanin, k)
int Gia_ManLevelNum(Gia_Man_t *p)
void Gia_AigerWrite(Gia_Man_t *p, char *pFileName, int fWriteSymbols, int fCompact, int fWriteNewLine)
#define Vec_IntForEachEntry(vVec, Entry, i)
MACRO DEFINITIONS ///.
typedefABC_NAMESPACE_HEADER_START struct Vec_Ptr_t_ Vec_Ptr_t
INCLUDES ///.
#define Vec_PtrForEachEntry(Type, vVec, pEntry, i)
MACRO DEFINITIONS ///.
#define Vec_WecForEachLevel(vGlob, vVec, i)
MACRO DEFINITIONS ///.
typedefABC_NAMESPACE_HEADER_START struct Vec_Wec_t_ Vec_Wec_t
INCLUDES ///.