72 static struct ParStruct {
80 } ParsNew, ParsBest = { 0 };
89 if ( !Abc_NtkIsLogic(pNtk) )
93 ParsNew.Flops = Abc_NtkLatchNum( pNtk );
94 ParsNew.Nodes = Abc_NtkNodeNum( pNtk );
96 ParsNew.nPis = Abc_NtkPiNum( pNtk );
97 ParsNew.nPos = Abc_NtkPoNum( pNtk );
99 if ( ParsBest.pName == NULL ||
101 ParsBest.Depth > ParsNew.Depth ||
102 (ParsBest.Depth == ParsNew.Depth && ParsBest.Flops > ParsNew.Flops) ||
103 (ParsBest.Depth == ParsNew.Depth && ParsBest.Flops == ParsNew.Flops && ParsBest.Edges > ParsNew.Edges) )
107 ParsBest.Depth = ParsNew.Depth;
108 ParsBest.Flops = ParsNew.Flops;
109 ParsBest.Nodes = ParsNew.Nodes;
110 ParsBest.Edges = ParsNew.Edges;
111 ParsBest.nPis = ParsNew.nPis;
112 ParsBest.nPos = ParsNew.nPos;
117 pFileNameOut = pNtk->
pSpec;
139 Memory +=
sizeof(
Abc_Obj_t) * Abc_NtkObjNum(
p);
140 Memory += Vec_PtrMemory(
p->vPis);
141 Memory += Vec_PtrMemory(
p->vPos);
142 Memory += Vec_PtrMemory(
p->vCis);
143 Memory += Vec_PtrMemory(
p->vCos);
144 Memory += Vec_PtrMemory(
p->vObjs);
145 Memory += Vec_IntMemory(&
p->vTravIds);
146 Memory += Vec_IntMemory(
p->vLevelsR);
148 Memory +=
sizeof(int) * (Vec_IntCap(&pObj->
vFanins) + Vec_IntCap(&pObj->
vFanouts));
173 float Result = (float)0;
179 pObjAbc->
pTemp = NULL;
181 pAig =
Abc_NtkToDar( pNtkStr, 0, (
int)(Abc_NtkLatchNum(pNtk) > 0) );
183 pSwitching = (
float *)vSwitching->pArray;
188 Result += Abc_ObjFanoutNum(pObjAbc) * pSwitching[pObjAig->
Id];
193 Vec_IntFree( vSwitching );
216 assert( Abc_NtkIsLogic(pNtk) );
222 Counter += pLutLib->
pLutAreas[Abc_ObjFaninNum(pObj)];
244 return 1.0*Count/Abc_NtkNodeNum(pNtk);
249 float Count = 0, CountAll = 0;
255 return 1.0*Count/CountAll;
269void Abc_NtkPrintStats(
Abc_Ntk_t * pNtk,
int fFactored,
int fSaveBest,
int fDumpResult,
int fUseLutLib,
int fPrintMuxes,
int fPower,
int fGlitch,
int fSkipBuf,
int fSkipSmall,
int fPrintMem )
272 if ( fPrintMuxes && Abc_NtkIsStrash(pNtk) )
277 int nAnds = Abc_NtkNodeNum(pNtk) - (nMuxs + nXors) * 3 - nSingles;
278 Abc_Print( 1,
"XMA stats: " );
279 Abc_Print( 1,
"Xor =%7d (%6.2f %%) ", nXors, 300.0 * nXors / Abc_NtkNodeNum(pNtk) );
280 Abc_Print( 1,
"Mux =%7d (%6.2f %%) ", nMuxs, 300.0 * nMuxs / Abc_NtkNodeNum(pNtk) );
281 Abc_Print( 1,
"And =%7d (%6.2f %%) ", nAnds, 100.0 * nAnds / Abc_NtkNodeNum(pNtk) );
282 Abc_Print( 1,
"Total =%7d", nAnds + nXors + nMuxs );
303 SetConsoleTextAttribute( GetStdHandle(STD_OUTPUT_HANDLE), 15 );
304 Abc_Print( 1,
"%-30s:", pNtk->
pName );
305 SetConsoleTextAttribute( GetStdHandle(STD_OUTPUT_HANDLE), 7 );
307 Abc_Print( 1,
"%s%-30s:%s",
"\033[1;37m", pNtk->
pName,
"\033[0m" );
309 Abc_Print( 1,
" i/o =%5d/%5d", Abc_NtkPiNum(pNtk), Abc_NtkPoNum(pNtk) );
310 if ( Abc_NtkConstrNum(pNtk) )
311 Abc_Print( 1,
"(c=%d)", Abc_NtkConstrNum(pNtk) );
312 Abc_Print( 1,
" lat =%5d", Abc_NtkLatchNum(pNtk) );
314 Abc_Print( 1,
"(b=%d)", pNtk->
nBarBufs );
315 if ( Abc_NtkIsNetlist(pNtk) )
317 Abc_Print( 1,
" net =%5d", Abc_NtkNetNum(pNtk) );
319 Abc_Print( 1,
" wbox =%3d", Abc_NtkWhiteboxNum(pNtk) );
320 Abc_Print( 1,
" bbox =%3d", Abc_NtkBlackboxNum(pNtk) );
322 else if ( Abc_NtkIsStrash(pNtk) )
324 Abc_Print( 1,
" and =%7d", Abc_NtkNodeNum(pNtk) );
334 if ( Abc_NtkIsStrash(pNtk) || Abc_NtkIsNetlist(pNtk) )
337 else if ( Abc_NtkHasSop(pNtk) )
346 else if ( Abc_NtkHasAig(pNtk) )
348 else if ( Abc_NtkHasBdd(pNtk) )
350 else if ( Abc_NtkHasMapping(pNtk) )
352 int fHasTimeMan = (int)(pNtk->
pManTime != NULL);
356 if ( !fHasTimeMan && pNtk->
pManTime )
362 else if ( !Abc_NtkHasBlackbox(pNtk) )
367 if ( Abc_NtkIsStrash(pNtk) )
377 Abc_Print( 1,
" buf = %d", pNtk->
nBarBufs2 );
389 printf(
"\nCurrently computes glitching only for K-LUT networks with K <= 6." );
392 Abc_Print( 1,
" mem =%5.2f MB",
Abc_NtkMemory(pNtk)/(1<<20) );
476 FILE * pTable = fopen(
"stats.txt",
"a+" );
477 if ( Abc_NtkIsStrash(pNtk) )
478 fprintf( pTable,
"%s ", pNtk->
pName );
479 fprintf( pTable,
"%d ", Abc_NtkNodeNum(pNtk) );
485 Abc_NtkPrintStats( pNtk->
pExdc, fFactored, fSaveBest, fDumpResult, fUseLutLib, fPrintMuxes, fPower, fGlitch, fSkipBuf, fSkipSmall, fPrintMem );
504 fprintf( pFile,
"Primary inputs (%d): ", Abc_NtkPiNum(pNtk) );
508 fprintf( pFile,
"\n" );
510 fprintf( pFile,
"Primary outputs (%d):", Abc_NtkPoNum(pNtk) );
513 fprintf( pFile,
"\n" );
518 fprintf( pFile,
"Latches (%d): ", Abc_NtkLatchNum(pNtk) );
522 fprintf( pFile,
"\n" );
539 int i, Counter0, Counter1, Counter2;
540 int InitNums[4], Init;
542 assert( !Abc_NtkIsNetlist(pNtk) );
543 if ( Abc_NtkLatchNum(pNtk) == 0 )
545 fprintf( pFile,
"The network is combinational.\n" );
549 for ( i = 0; i < 4; i++ )
551 Counter0 = Counter1 = Counter2 = 0;
554 Init = Abc_LatchInit( pLatch );
558 pFanin = Abc_ObjFanin0(Abc_ObjFanin0(pLatch));
559 if ( Abc_NtkIsLogic(pNtk) )
564 else if ( Abc_NtkIsStrash(pNtk) )
566 if ( !Abc_AigNodeIsConst(pFanin) )
574 if ( Abc_LatchIsInitDc(pLatch) )
580 if ( Abc_NtkIsStrash(pNtk) )
582 if ( Abc_LatchIsInit1(pLatch) == !Abc_ObjFaninC0(pLatch) )
587 if ( Abc_LatchIsInit1(pLatch) ==
Abc_NodeIsConst1(Abc_ObjFanin0(Abc_ObjFanin0(pLatch))) )
592 fprintf( pFile,
"Total latches = %5d. Init0 = %d. Init1 = %d. InitDC = %d. Const data = %d.\n",
593 Abc_NtkLatchNum(pNtk), InitNums[1], InitNums[2], InitNums[3], Counter0 );
612 int i, nFanins, nFanouts;
613 int nFaninsMax = 0, nFanoutsMax = 0;
616 nFaninsMax = Abc_MaxInt( nFaninsMax, Abc_ObjFaninNum(pNode) );
617 nFanoutsMax = Abc_MaxInt( nFanoutsMax, Abc_ObjFanoutNum(pNode) );
619 Vec_IntFill( vFan, nFaninsMax + 1, 0 );
620 Vec_IntFill( vFon, nFanoutsMax + 1, 0 );
621 Vec_IntFill( vFanR, nFaninsMax + 1, 0 );
622 Vec_IntFill( vFonR, nFanoutsMax + 1, 0 );
625 nFanins = Abc_ObjFaninNum( pNode );
626 nFanouts = Abc_ObjFanoutNum( pNode );
627 Vec_IntAddToEntry( vFan, nFanins, 1 );
628 Vec_IntAddToEntry( vFon, nFanouts, 1 );
629 Vec_IntWriteEntry( vFanR, nFanins, i );
630 Vec_IntWriteEntry( vFonR, nFanouts, i );
636 int i, nFanins, nFanouts;
637 int nFaninsMax = 0, nFanoutsMax = 0;
639 nFanoutsMax = Abc_MaxInt( nFanoutsMax, Abc_ObjFanoutNum(pNode) );
641 nFaninsMax = Abc_MaxInt( nFaninsMax, Abc_ObjFaninNum(Abc_ObjFanin0(pNode)) );
642 Vec_IntFill( vFan, nFaninsMax + 1, 0 );
643 Vec_IntFill( vFon, nFanoutsMax + 1, 0 );
644 Vec_IntFill( vFanR, nFaninsMax + 1, 0 );
645 Vec_IntFill( vFonR, nFanoutsMax + 1, 0 );
648 nFanouts = Abc_ObjFanoutNum( pNode );
649 Vec_IntAddToEntry( vFon, nFanouts, 1 );
650 Vec_IntWriteEntry( vFonR, nFanouts, Abc_ObjId(pNode) );
654 nFanins = Abc_ObjFaninNum( Abc_ObjFanin0(pNode) );
655 Vec_IntAddToEntry( vFan, nFanins, 1 );
656 Vec_IntWriteEntry( vFanR, nFanins, Abc_ObjId(pNode) );
664 Vec_Int_t * vFanin, * vFanout, * vTemp = Vec_IntAlloc( 0 );
665 Vec_Int_t * vSuppsCo = Vec_IntAlloc( Abc_NtkCoNum(pNtk) );
666 Vec_Wec_t * vSupps = Vec_WecStart( Abc_NtkObjNumMax(pNtk) );
668 Vec_IntPush( Vec_WecEntry(vSupps, Abc_ObjId(pNode)), i );
671 vFanout = Vec_WecEntry(vSupps, Abc_ObjId(pNode));
672 for ( k = 0; k < Abc_ObjFaninNum(pNode); k++ )
674 vFanin = Vec_WecEntry(vSupps, Abc_ObjFaninId(pNode, k));
675 Vec_IntTwoMerge2( vFanout, vFanin, vTemp );
680 Vec_IntPush( vSuppsCo, Vec_IntSize(Vec_WecEntry(vSupps, Abc_ObjFaninId0(pNode))) );
681 Vec_WecFree( vSupps );
682 Vec_PtrFree( vNodes );
683 Vec_IntFree( vTemp );
685 Abc_PrintTime( 1,
"Input support computation", Abc_Clock() - clk );
694 Vec_Int_t * vFanin, * vFanout, * vTemp = Vec_IntAlloc( 0 );
695 Vec_Int_t * vSuppsCi = Vec_IntAlloc( Abc_NtkCiNum(pNtk) );
696 Vec_Wec_t * vSupps = Vec_WecStart( Abc_NtkObjNumMax(pNtk) );
699 vFanout = Vec_WecEntry(vSupps, Abc_ObjId(pNode));
700 vFanin = Vec_WecEntry(vSupps, Abc_ObjFaninId0(pNode));
701 Vec_IntPush( vFanout, i );
702 Vec_IntTwoMerge2( vFanin, vFanout, vTemp );
707 vFanout = Vec_WecEntry(vSupps, Abc_ObjId(pNode));
708 for ( k = 0; k < Abc_ObjFaninNum(pNode); k++ )
710 vFanin = Vec_WecEntry(vSupps, Abc_ObjFaninId(pNode, k));
711 Vec_IntTwoMerge2( vFanin, vFanout, vTemp );
716 Vec_IntPush( vSuppsCi, Vec_IntSize(Vec_WecEntry(vSupps, Abc_ObjId(pNode))) );
717 Vec_WecFree( vSupps );
718 Vec_PtrFree( vNodes );
719 Vec_IntFree( vTemp );
721 Abc_PrintTime( 1,
"Output support computation", Abc_Clock() - clk );
730 int i, nFanins, nFanouts;
731 int nFaninsMax = Vec_IntFindMax( vSuppsCo );
732 int nFanoutsMax = Vec_IntFindMax( vSuppsCi );
733 Vec_IntFill( vFan, nFaninsMax + 1, 0 );
734 Vec_IntFill( vFon, nFanoutsMax + 1, 0 );
735 Vec_IntFill( vFanR, nFaninsMax + 1, 0 );
736 Vec_IntFill( vFonR, nFanoutsMax + 1, 0 );
739 nFanins = Vec_IntEntry( vSuppsCo, i );
740 Vec_IntAddToEntry( vFan, nFanins, 1 );
741 Vec_IntWriteEntry( vFanR, nFanins, Abc_ObjId(pNode) );
745 nFanouts = Vec_IntEntry( vSuppsCi, i );
746 Vec_IntAddToEntry( vFon, nFanouts, 1 );
747 Vec_IntWriteEntry( vFonR, nFanouts, Abc_ObjId(pNode) );
749 Vec_IntFree( vSuppsCo );
750 Vec_IntFree( vSuppsCi );
758 Vec_Int_t * vFanin, * vFanout, * vTemp = Vec_IntAlloc( 0 );
759 Vec_Int_t * vSuppsCo = Vec_IntAlloc( Abc_NtkCoNum(pNtk) );
760 Vec_Wec_t * vSupps = Vec_WecStart( Abc_NtkObjNumMax(pNtk) );
763 vFanout = Vec_WecEntry(vSupps, Abc_ObjId(pNode));
764 for ( k = 0; k < Abc_ObjFaninNum(pNode); k++ )
766 vFanin = Vec_WecEntry(vSupps, Abc_ObjFaninId(pNode, k));
767 Vec_IntTwoMerge2( vFanout, vFanin, vTemp );
770 Vec_IntPush( vFanout, i );
773 Vec_IntPush( vSuppsCo, Vec_IntSize(Vec_WecEntry(vSupps, Abc_ObjFaninId0(pNode))) );
774 Vec_WecFree( vSupps );
775 Vec_PtrFree( vNodes );
776 Vec_IntFree( vTemp );
778 Abc_PrintTime( 1,
"Input cone computation", Abc_Clock() - clk );
787 Vec_Int_t * vFanin, * vFanout, * vTemp = Vec_IntAlloc( 0 );
788 Vec_Int_t * vSuppsCi = Vec_IntAlloc( Abc_NtkCiNum(pNtk) );
789 Vec_Wec_t * vSupps = Vec_WecStart( Abc_NtkObjNumMax(pNtk) );
792 vFanout = Vec_WecEntry(vSupps, Abc_ObjId(pNode));
793 Vec_IntPush( vFanout, i );
794 for ( k = 0; k < Abc_ObjFaninNum(pNode); k++ )
796 vFanin = Vec_WecEntry(vSupps, Abc_ObjFaninId(pNode, k));
797 Vec_IntTwoMerge2( vFanin, vFanout, vTemp );
802 Vec_IntPush( vSuppsCi, Vec_IntSize(Vec_WecEntry(vSupps, Abc_ObjId(pNode))) );
803 Vec_WecFree( vSupps );
804 Vec_PtrFree( vNodes );
805 Vec_IntFree( vTemp );
807 Abc_PrintTime( 1,
"Output cone computation", Abc_Clock() - clk );
816 int i, nFanins, nFanouts;
817 int nFaninsMax = Vec_IntFindMax( vSuppsCo );
818 int nFanoutsMax = Vec_IntFindMax( vSuppsCi );
819 Vec_IntFill( vFan, nFaninsMax + 1, 0 );
820 Vec_IntFill( vFon, nFanoutsMax + 1, 0 );
821 Vec_IntFill( vFanR, nFaninsMax + 1, 0 );
822 Vec_IntFill( vFonR, nFanoutsMax + 1, 0 );
825 nFanins = Vec_IntEntry( vSuppsCo, i );
826 Vec_IntAddToEntry( vFan, nFanins, 1 );
827 Vec_IntWriteEntry( vFanR, nFanins, Abc_ObjId(pNode) );
831 nFanouts = Vec_IntEntry( vSuppsCi, i );
832 Vec_IntAddToEntry( vFon, nFanouts, 1 );
833 Vec_IntWriteEntry( vFonR, nFanouts, Abc_ObjId(pNode) );
835 Vec_IntFree( vSuppsCo );
836 Vec_IntFree( vSuppsCi );
842 int k, nSizeMax = Abc_MaxInt( Vec_IntSize(vFan), Vec_IntSize(vFon) );
843 fprintf( pFile,
"The distribution of %s and %s in the network:\n", pFanins, pFanouts );
844 fprintf( pFile,
" Number %s with %s %s with %s Repr1 Repr2\n", pNode, pFanin, pNode, pFanout );
845 for ( k = 0; k < nSizeMax; k++ )
847 int EntryFan = k < Vec_IntSize(vFan) ? Vec_IntEntry(vFan, k) : 0;
848 int EntryFon = k < Vec_IntSize(vFon) ? Vec_IntEntry(vFon, k) : 0;
849 if ( EntryFan == 0 && EntryFon == 0 )
852 fprintf( pFile,
"%5d : ", k );
854 fprintf( pFile,
" " );
856 fprintf( pFile,
"%12d ", EntryFan );
857 fprintf( pFile,
" " );
859 fprintf( pFile,
" " );
861 fprintf( pFile,
"%12d ", EntryFon );
863 fprintf( pFile,
" " );
865 fprintf( pFile,
" " );
867 fprintf( pFile,
"%12s ",
Abc_ObjName(Abc_NtkObj(pNtk, Vec_IntEntry(vFanR, k))) );
868 fprintf( pFile,
" " );
870 fprintf( pFile,
" " );
872 fprintf( pFile,
"%12s ",
Abc_ObjName(Abc_NtkObj(pNtk, Vec_IntEntry(vFonR, k))) );
873 fprintf( pFile,
"\n" );
882 assert( fUseFanio + fUsePio + fUseSupp + fUseCone == 1 );
886 Abc_NtkPrintDistribInternal( pFile, pNtk,
"fanins",
"fanouts",
"Nodes",
"fanin",
"fanout", vFan, vFon, vFanR, vFonR );
891 Abc_NtkPrintDistribInternal( pFile, pNtk,
"fanins",
"fanouts",
"I/O",
"fanin",
"fanout", vFan, vFon, vFanR, vFonR );
896 Abc_NtkPrintDistribInternal( pFile, pNtk,
"input supports",
"output supports",
"I/O",
"in-supp",
"out-supp", vFan, vFon, vFanR, vFonR );
901 Abc_NtkPrintDistribInternal( pFile, pNtk,
"input cones",
"output cones",
"I/O",
"in-cone",
"out-cone", vFan, vFon, vFanR, vFonR );
905 Vec_IntFree( vFanR );
906 Vec_IntFree( vFonR );
926 int nFanins, nFanouts, nFaninsMax, nFanoutsMax, nFaninsAll, nFanoutsAll;
930 nFaninsMax = nFanoutsMax = 0;
931 nFaninsAll = nFanoutsAll = 0;
934 if ( fMffc && Abc_ObjFanoutNum(pNode) == 1 )
936 nFanins = Abc_ObjFaninNum(pNode);
937 if ( Abc_NtkIsNetlist(pNtk) )
938 nFanouts = Abc_ObjFanoutNum( Abc_ObjFanout0(pNode) );
942 nFanouts = Abc_ObjFanoutNum(pNode);
943 nFaninsAll += nFanins;
944 nFanoutsAll += nFanouts;
945 nFaninsMax = Abc_MaxInt( nFaninsMax, nFanins );
946 nFanoutsMax = Abc_MaxInt( nFanoutsMax, nFanouts );
950 nSizeMax = Abc_MaxInt( 10 * (Abc_Base10Log(nFaninsMax) + 1), 10 * (Abc_Base10Log(nFanoutsMax) + 1) );
951 vFanins = Vec_IntStart( nSizeMax );
952 vFanouts = Vec_IntStart( nSizeMax );
957 if ( fMffc && Abc_ObjFanoutNum(pNode) == 1 )
959 nFanins = Abc_ObjFaninNum(pNode);
960 if ( Abc_NtkIsNetlist(pNtk) )
961 nFanouts = Abc_ObjFanoutNum( Abc_ObjFanout0(pNode) );
965 nFanouts = Abc_ObjFanoutNum(pNode);
968 Vec_IntAddToEntry( vFanins, nFanins, 1 );
969 else if ( nFanins < 100 )
970 Vec_IntAddToEntry( vFanins, 10 + nFanins/10, 1 );
971 else if ( nFanins < 1000 )
972 Vec_IntAddToEntry( vFanins, 20 + nFanins/100, 1 );
973 else if ( nFanins < 10000 )
974 Vec_IntAddToEntry( vFanins, 30 + nFanins/1000, 1 );
975 else if ( nFanins < 100000 )
976 Vec_IntAddToEntry( vFanins, 40 + nFanins/10000, 1 );
977 else if ( nFanins < 1000000 )
978 Vec_IntAddToEntry( vFanins, 50 + nFanins/100000, 1 );
979 else if ( nFanins < 10000000 )
980 Vec_IntAddToEntry( vFanins, 60 + nFanins/1000000, 1 );
983 Vec_IntAddToEntry( vFanouts, nFanouts, 1 );
984 else if ( nFanouts < 100 )
985 Vec_IntAddToEntry( vFanouts, 10 + nFanouts/10, 1 );
986 else if ( nFanouts < 1000 )
987 Vec_IntAddToEntry( vFanouts, 20 + nFanouts/100, 1 );
988 else if ( nFanouts < 10000 )
989 Vec_IntAddToEntry( vFanouts, 30 + nFanouts/1000, 1 );
990 else if ( nFanouts < 100000 )
991 Vec_IntAddToEntry( vFanouts, 40 + nFanouts/10000, 1 );
992 else if ( nFanouts < 1000000 )
993 Vec_IntAddToEntry( vFanouts, 50 + nFanouts/100000, 1 );
994 else if ( nFanouts < 10000000 )
995 Vec_IntAddToEntry( vFanouts, 60 + nFanouts/1000000, 1 );
998 fprintf( pFile,
"The distribution of fanins and fanouts in the network:\n" );
999 fprintf( pFile,
" Number Nodes with fanin Nodes with fanout\n" );
1000 for ( k = 0; k < nSizeMax; k++ )
1002 if ( vFanins->pArray[k] == 0 && vFanouts->pArray[k] == 0 )
1005 fprintf( pFile,
"%15d : ", k );
1008 sprintf( Buffer,
"%d - %d", (
int)pow((
double)10, k/10) * (k%10), (
int)pow((
double)10, k/10) * (k%10+1) - 1 );
1009 fprintf( pFile,
"%15s : ", Buffer );
1011 if ( vFanins->pArray[k] == 0 )
1012 fprintf( pFile,
" " );
1014 fprintf( pFile,
"%12d ", vFanins->pArray[k] );
1015 fprintf( pFile,
" " );
1016 if ( vFanouts->pArray[k] == 0 )
1017 fprintf( pFile,
" " );
1019 fprintf( pFile,
"%12d ", vFanouts->pArray[k] );
1020 fprintf( pFile,
"\n" );
1022 Vec_IntFree( vFanins );
1023 Vec_IntFree( vFanouts );
1025 fprintf( pFile,
"Fanins: Max = %d. Ave = %.2f. Fanouts: Max = %d. Ave = %.2f.\n",
1026 nFaninsMax, 1.0*nFaninsAll/Abc_NtkNodeNum(pNtk),
1027 nFanoutsMax, 1.0*nFanoutsAll/Abc_NtkNodeNum(pNtk) );
1052 if ( Abc_ObjIsPo(pNode) )
1053 pNode = Abc_ObjFanin0(pNode);
1056 fprintf( pFile,
"\n" );
1058 fprintf( pFile,
"Fanins (%d): ", Abc_ObjFaninNum(pNode) );
1061 fprintf( pFile,
"\n" );
1063 fprintf( pFile,
"Fanouts (%d): ", Abc_ObjFaninNum(pNode) );
1066 fprintf( pFile,
"\n" );
1086 if ( Abc_ObjFanoutNum(pNode) > 1 || (Abc_ObjFanoutNum(pNode) == 1 && Abc_ObjIsCo(Abc_ObjFanout0(pNode))))
1105 if ( Abc_ObjIsCo(pNode) )
1106 pNode = Abc_ObjFanin0(pNode);
1107 if ( Abc_ObjIsPi(pNode) )
1109 fprintf( pFile,
"Skipping the PI node.\n" );
1112 if ( Abc_ObjIsLatch(pNode) )
1114 fprintf( pFile,
"Skipping the latch.\n" );
1117 assert( Abc_ObjIsNode(pNode) );
1119 if ( fUseRealNames )
1127 Dec_GraphFree( pGraph );
1133 assert( Abc_NtkIsSopLogic(pNtk) );
1152 char * pCube, * pCur, * pSop;
int nVars;
1153 if ( Abc_ObjIsCo(pNode) )
1154 pNode = Abc_ObjFanin0(pNode);
1155 if ( Abc_ObjIsPi(pNode) )
1157 fprintf( pFile,
"Skipping the PI node.\n" );
1160 if ( Abc_ObjIsLatch(pNode) )
1162 fprintf( pFile,
"Skipping the latch.\n" );
1165 assert( Abc_ObjIsNode(pNode) );
1166 pSop = (
char *)pNode->
pData;
1175 fprintf( pFile,
"!" );
1177 if ( fUseRealNames )
1181 if ( pCube != pSop )
1182 fprintf( pFile,
" +" );
1185 for ( pCur = pCube; *pCur !=
' '; pCur++ )
1187 fprintf( pFile,
" %s%s", *pCur ==
'0' ?
"!" :
"", (
char *)Vec_PtrEntry(vNamesIn, pCur-pCube) );
1191 for ( pCur = pCube; *pCur !=
' '; pCur++ )
1193 fprintf( pFile,
" %s%c", *pCur ==
'0' ?
"!" :
"", (
char)(
'a' + pCur-pCube) );
1196 fprintf( pFile,
"\n" );
1204 assert( Abc_NtkIsSopLogic(pNtk) );
1222 Abc_Obj_t * pFan, * pFanout = NULL;
int k, nPos = 0;
1223 if ( !Abc_ObjIsNode(pObj) )
1226 if ( Abc_ObjIsPo(pFan) )
1227 pFanout = pFan, nPos++;
1238 printf(
"Outputs by level: " );
1240 printf(
"%d=%d ", k, Abc_ObjFanin0(pNode)->Level );
1248 printf(
"Nodes by level:\n" );
1249 for ( i = 0; i <= nLevels; i++ )
1251 printf(
"%2d : ", i );
1253 if ( (
int)pNode->
Level == i )
1261 if ( fProfile && Abc_NtkHasMapping(pNtk) )
1263 int nIntervals = 12;
1264 float DelayMax, DelayCur, DelayDelta;
1266 int DelayInt, nOutsSum, nOutsTotal;
1270 DelayDelta = DelayMax/nIntervals;
1272 pLevelCounts =
ABC_ALLOC(
int, nIntervals );
1273 memset( pLevelCounts, 0,
sizeof(
int) * nIntervals );
1276 if ( Abc_ObjIsNode(Abc_ObjFanin0(pNode)) && Abc_ObjFaninNum(Abc_ObjFanin0(pNode)) == 0 )
1281 DelayInt = (int)(DelayCur / DelayDelta);
1282 if ( DelayInt >= nIntervals )
1283 DelayInt = nIntervals - 1;
1285 pLevelCounts[DelayInt]++;
1289 nOutsTotal = Abc_NtkCoNum(pNtk);
1290 for ( i = 0; i < nIntervals; i++ )
1292 nOutsSum += pLevelCounts[i];
1293 printf(
"[%8.2f - %8.2f] : COs = %4d. %5.1f %%\n",
1294 DelayDelta * i, DelayDelta * (i+1), pLevelCounts[i], 100.0 * nOutsSum/nOutsTotal );
1299 else if ( fProfile )
1301 int LevelMax, * pLevelCounts;
1302 int nOutsSum, nOutsTotal;
1304 if ( !Abc_NtkIsStrash(pNtk) )
1309 if ( LevelMax < (
int)Abc_ObjFanin0(pNode)->Level )
1310 LevelMax = Abc_ObjFanin0(pNode)->Level;
1311 pLevelCounts =
ABC_ALLOC(
int, LevelMax + 1 );
1312 memset( pLevelCounts, 0,
sizeof(
int) * (LevelMax + 1) );
1314 pLevelCounts[Abc_ObjFanin0(pNode)->Level]++;
1317 nOutsTotal = Abc_NtkCoNum(pNtk);
1318 for ( i = 0; i <= LevelMax; i++ )
1319 if ( pLevelCounts[i] )
1321 nOutsSum += pLevelCounts[i];
1322 printf(
"Level = %4d. COs = %4d. %5.1f %%\n", i, pLevelCounts[i], 100.0 * nOutsSum/nOutsTotal );
1327 assert( Abc_NtkIsStrash(pNtk) );
1341 fprintf( pFile,
"CO %4d : %*s ", i, Length,
Abc_ObjName(pNode) );
1363 pDriver = Abc_ObjIsCo(pNode)? Abc_ObjFanin0(pNode) : pNode;
1364 if ( Abc_ObjIsPi(pDriver) )
1366 fprintf( pFile,
"Primary input.\n" );
1369 if ( Abc_ObjIsLatch(pDriver) )
1371 fprintf( pFile,
"Latch.\n" );
1376 fprintf( pFile,
"Constant %d.\n", !Abc_ObjFaninC0(pNode) );
1380 fprintf( pFile,
"Level = %3d. ", pDriver->
Level );
1385 fprintf( pFile,
"Cone = %5d. ", Vec_PtrSize(vNodes) );
1386 Vec_PtrFree( vNodes );
1387 fprintf( pFile,
"\n" );
1405 if ( fUseRealNames )
1409 Abc_ObjFaninNum(pNode), NULL, 0, (
char **)vNamesIn->pArray );
1414 Abc_ObjFaninNum(pNode), NULL, 0, NULL );
1433 int CountConst, CountBuf, CountInv, CountAnd, CountOr, CountOther, CounterTotal, TotalDiff = 0;
1436 if ( fUseLibrary && Abc_NtkHasMapping(pNtk) )
1439 double Area, AreaTotal;
1440 int Counter, nGates, i, nGateNameLen;
1445 for ( i = 0; i < nGates; i++ )
1448 if ( fUpdateProfile )
1456 if ( i == 0 )
continue;
1458 if ( fUpdateProfile )
1468 for ( i = 0; i < nGates; i++ )
1478 for ( i = 0; i < nGates; i++ )
1486 printf(
"%-*s Fanin = %2d Instance = %8d Area = %10.2f %6.2f %% %8d %8d %s\n",
1489 Counter, Area, 100.0 * Area / AreaTotal,
1494 printf(
"%-*s Instance = %8d Area = %10.2f %6.2f %% AbsDiff = %d\n",
1495 nGateNameLen,
"TOTAL",
1496 CounterTotal, AreaTotal, 100.0, TotalDiff );
1500 if ( Abc_NtkIsAigLogic(pNtk) )
1504 if ( (fHasBdds = Abc_NtkIsBddLogic(pNtk)) )
1508 printf(
"Abc_NtkPrintGates(): Converting to SOPs has failed.\n" );
1514 CountConst = CountBuf = CountInv = CountAnd = CountOr = CountOther = CounterTotal = 0;
1517 if ( i == 0 )
continue;
1518 if ( Abc_NtkHasMapping(pNtk) )
1521 pSop = (
char *)pObj->
pData;
1539 printf(
"Const = %8d %6.2f %%\n", CountConst , 100.0 * CountConst / CounterTotal );
1540 printf(
"Buffer = %8d %6.2f %%\n", CountBuf , 100.0 * CountBuf / CounterTotal );
1541 printf(
"Inverter = %8d %6.2f %%\n", CountInv , 100.0 * CountInv / CounterTotal );
1542 printf(
"And = %8d %6.2f %%\n", CountAnd , 100.0 * CountAnd / CounterTotal );
1543 printf(
"Or = %8d %6.2f %%\n", CountOr , 100.0 * CountOr / CounterTotal );
1544 printf(
"Other = %8d %6.2f %%\n", CountOther , 100.0 * CountOther / CounterTotal );
1545 printf(
"TOTAL = %8d %6.2f %%\n", CounterTotal, 100.0 * CounterTotal / CounterTotal );
1566 Abc_Obj_t * pObj1, * pObj2, * pNode1, * pNode2;
1567 int i, k, m, n, Counter;
1570 printf(
"Statistics about sharing of logic nodes among the CO pairs.\n" );
1571 printf(
"(CO1,CO2)=NumShared : " );
1588 Counter += pNode2->
fMarkA;
1590 printf(
"(%d,%d)=%d ", i, k, Counter );
1591 Vec_PtrFree( vNodes2 );
1596 Vec_PtrFree( vNodes1 );
1617 Counter += Abc_ObjIsPi(pObj);
1625 printf(
"Structural support info:\n" );
1631 printf(
"%5d %20s : Cone = %5d. Supp = %5d. (PIs = %5d. FFs = %5d.)\n",
1632 i,
Abc_ObjName(pObj), vNodes->nSize, vSupp->nSize, nPis, vSupp->nSize - nPis );
1633 Vec_PtrFree( vNodes );
1634 Vec_PtrFree( vSupp );
1645 printf(
"Actual support info:\n" );
1651 Vec_PtrFree( vSupp );
1654 printf(
"%d", pObj->
fMarkA );
1678 fprintf( pFile,
"Object %5d : ", pObj->
Id );
1679 switch ( pObj->
Type )
1682 fprintf( pFile,
"NONE " );
1685 fprintf( pFile,
"Const1 " );
1688 fprintf( pFile,
"PI " );
1691 fprintf( pFile,
"PO " );
1694 fprintf( pFile,
"BI " );
1697 fprintf( pFile,
"BO " );
1700 fprintf( pFile,
"Net " );
1703 fprintf( pFile,
"Node " );
1706 fprintf( pFile,
"Latch " );
1709 fprintf( pFile,
"Whitebox" );
1712 fprintf( pFile,
"Blackbox" );
1719 fprintf( pFile,
" Fanins ( " );
1721 fprintf( pFile,
"%d ", pFanin->
Id );
1722 fprintf( pFile,
") " );
1730 if ( Abc_ObjIsNode(pObj) && Abc_NtkIsSopLogic(pObj->
pNtk) )
1731 fprintf( pFile,
" %s", (
char*)pObj->
pData );
1732 else if ( Abc_ObjIsNode(pObj) && Abc_NtkIsMappedLogic(pObj->
pNtk) )
1735 fprintf( pFile,
"\n" );
1760 nPis += (int)( Abc_ObjFanoutNum(pObj) > 0 );
1763 pChild = Abc_ObjChild0(pObj);
1765 if ( pChild == Abc_ObjNot(pConst1) )
1768 else if ( pChild == pConst1 )
1775 else if ( Abc_ObjIsPi(Abc_ObjRegular(pChild)) )
1782 else if ( Abc_ObjRegular(pChild)->fPhase != (
unsigned)Abc_ObjIsComplement(pChild) )
1791 printf(
"Miter: I =%6d", nPis );
1792 printf(
" N =%7d", Abc_NtkNodeNum(pNtk) );
1793 printf(
" ? =%7d", nUndec );
1794 printf(
" U =%6d", nUnsat );
1795 printf(
" S =%6d", nSat );
1796 Time = Abc_Clock() - Time;
1797 printf(
" %7.2f sec\n", (
float)(Time)/(
float)(CLOCKS_PER_SEC));
1799 printf(
"The first satisfiable output is number %d (%s).\n", iOut,
Abc_ObjName( Abc_NtkPo(pNtk, iOut) ) );
1815 Abc_Obj_t * pObj, * pDriver, * pRepr;
int i, iRepr;
1816 Vec_Int_t * vMap = Vec_IntStartFull( Abc_NtkObjNumMax(pNtk) );
1819 pDriver = Abc_ObjFanin0(pObj);
1820 if ( Abc_NtkIsStrash(pNtk) && pDriver ==
Abc_AigConst1(pNtk) )
1822 printf(
"%s = Const%d\n",
Abc_ObjName(pObj), !Abc_ObjFaninC0(pObj) );
1830 iRepr = Vec_IntEntry( vMap, Abc_ObjId(pDriver) );
1833 Vec_IntWriteEntry( vMap, Abc_ObjId(pDriver), i );
1836 pRepr = Abc_NtkCo(pNtk, iRepr);
1837 printf(
"%s = %s%s\n",
Abc_ObjName(pObj), Abc_ObjFaninC0(pRepr) == Abc_ObjFaninC0(pObj) ?
"" :
"!",
Abc_ObjName(pRepr) );
1839 Vec_IntFree( vMap );
1870 int nSwitches, nGlitches;
1878 assert( Abc_NtkIsLogic(pNtk) );
1882 printf(
"Abc_NtkMfsTotalGlitching() This procedure works only for mapped networks with LUTs size up to 6 inputs.\n" );
1887 vFanins = Vec_IntAlloc( 6 );
1888 vTruth = Vec_IntAlloc( 1 << 12 );
1889 vTruths = Vec_WrdStart( Abc_NtkObjNumMax(pNtk) );
1892 p =
Gli_ManAlloc( Vec_PtrSize(vNodes) + Abc_NtkCiNum(pNtk) + Abc_NtkCoNum(pNtk),
1900 Vec_IntClear( vFanins );
1902 Vec_IntPush( vFanins, pFanin->
iTemp );
1904 pTruth = Vec_WrdEntryP( vTruths, Abc_ObjId(pObj) );
1905 *pTruth = ((
word)puTruth[Abc_ObjFaninNum(pObj) == 6] << 32) | (
word)puTruth[0];
1915 nSwitches = nGlitches = 0;
1917 if ( pObj->
iTemp >= 0 )
1924 Vec_PtrFree( vNodes );
1925 Vec_IntFree( vTruth );
1926 Vec_IntFree( vFanins );
1927 Vec_WrdFree( vTruths );
1928 return nSwitches ? 100.0*(nGlitches-nSwitches)/nSwitches : 0.0;
1944 int nSwitches, nGlitches;
1950 if ( !Abc_NtkIsMappedLogic(pNtk) )
1952 assert( Abc_NtkIsMappedLogic(pNtk) );
1953 if ( nFaninMax > 16 )
1955 printf(
"Abc_NtkMfsTotalGlitching() This procedure works only for mapped networks with LUTs size up to 6 inputs.\n" );
1959 vFanins = Vec_IntAlloc( 6 );
1962 p =
Gli_ManAlloc( Vec_PtrSize(vNodes) + Abc_NtkCiNum(pNtk) + Abc_NtkCoNum(pNtk),
1970 Vec_IntClear( vFanins );
1972 Vec_IntPush( vFanins, pFanin->
iTemp );
1982 nSwitches = nGlitches = 0;
1984 if ( pObj->
iTemp >= 0 )
1991 Vec_PtrFree( vNodes );
1992 Vec_IntFree( vFanins );
1993 return nSwitches ? 100.0*(nGlitches-nSwitches)/nSwitches : 0.0;
2011 int Cells[8] = { 0, 4, 6, 2, 3, 7, 5, 1 };
2016 assert( (F0 & F1) == 0 );
2019 for ( s = 0; s < 4; s++ )
2022 for ( h = 0; h < 8; h++ )
2024 for ( s = 0; s < 3; s++ )
2025 printf(
"%d", ((Cells[h] >> (2-s)) & 1) );
2031 for ( s = 0; s < 4; s++ )
2034 for ( h = 0; h < 8; h++ )
2036 for ( s = 0; s < 3; s++ )
2043 for ( v = 0; v < 8; v++ )
2045 for ( s = 0; s < 3; s++ )
2046 printf(
"%d", ((Cells[v] >> (2-s)) & 1) );
2049 for ( h = 0; h < 8; h++ )
2052 if ( ((F0 >> ((Cells[v]*8)+Cells[h])) & 1) )
2054 else if ( ((F1 >> ((Cells[v]*8)+Cells[h])) & 1) )
2063 for ( s = 0; s < 4; s++ )
2067 for ( h = 0; h < 8; h++ )
2069 for ( s = 0; s < 3; s++ )
2072 printf(
"%c", (v == 7 || h == 7) ?
'+' :
'|' );
2094 printf(
"Wrong length (%d) of 6-var truth table.\n", (
int)
strlen(pF0) );
2099 printf(
"Wrong length (%d) of 6-var truth table.\n", (
int)
strlen(pF1) );
void Abc_NtkPrintFanioNew(FILE *pFile, Abc_Ntk_t *pNtk, int fMffc)
int Gli_ObjNumGlitches(Gli_Man_t *p, int iNode)
int Gli_ManCreateNode(Gli_Man_t *p, Vec_Int_t *vFanins, int nFanouts, word *pGateTruth)
void Abc_NtkPrintLevel(FILE *pFile, Abc_Ntk_t *pNtk, int fProfile, int fListNodes, int fOutputs, int fVerbose)
void Abc_NtkInputOutputCounters(Abc_Ntk_t *pNtk, Vec_Int_t *vFan, Vec_Int_t *vFon, Vec_Int_t *vFanR, Vec_Int_t *vFonR)
double Abc_NtkMemory(Abc_Ntk_t *p)
void Abc_NtkPrintGates(Abc_Ntk_t *pNtk, int fUseLibrary, int fUpdateProfile)
int Abc_NtkCountPis(Vec_Ptr_t *vSupp)
Vec_Int_t * Abc_NtkCollectCoSupps(Abc_Ntk_t *pNtk, int fVerbose)
Vec_Int_t * Abc_NtkCollectCiCones(Abc_Ntk_t *pNtk, int fVerbose)
void Abc_NtkPrintDistribInternal(FILE *pFile, Abc_Ntk_t *pNtk, char *pFanins, char *pFanouts, char *pNode, char *pFanin, char *pFanout, Vec_Int_t *vFan, Vec_Int_t *vFon, Vec_Int_t *vFanR, Vec_Int_t *vFonR)
Vec_Int_t * Abc_NtkCollectCoCones(Abc_Ntk_t *pNtk, int fVerbose)
void Abc_ObjPrint(FILE *pFile, Abc_Obj_t *pObj)
Gli_Man_t * Gli_ManAlloc(int nObjs, int nRegs, int nFanioPairs)
FUNCTION DEFINITIONS ///.
float Abc_NtkGetArea(Abc_Ntk_t *pNtk)
int Abc_NtkCompareAndSaveBest(Abc_Ntk_t *pNtk)
FUNCTION DEFINITIONS ///.
Vec_Int_t * Abc_NtkCollectCiSupps(Abc_Ntk_t *pNtk, int fVerbose)
void Abc_NtkPrintMffc(FILE *pFile, Abc_Ntk_t *pNtk)
void Abc_NtkShow6VarFunc(char *pF0, char *pF1)
void Abc_NtkPrintStats(Abc_Ntk_t *pNtk, int fFactored, int fSaveBest, int fDumpResult, int fUseLutLib, int fPrintMuxes, int fPower, int fGlitch, int fSkipBuf, int fSkipSmall, int fPrintMem)
int Gli_ManCreateCo(Gli_Man_t *p, int iFanin)
void Abc_NtkPrintFactor(FILE *pFile, Abc_Ntk_t *pNtk, int fUseRealNames)
void Abc_NodePrintKMap(Abc_Obj_t *pNode, int fUseRealNames)
void Abc_NodePrintFanio(FILE *pFile, Abc_Obj_t *pNode)
float Abc_NtkMfsTotalGlitchingLut(Abc_Ntk_t *pNtk, int nPats, int Prob, int fVerbose)
void Abc_NtkFaninFanoutCounters(Abc_Ntk_t *pNtk, Vec_Int_t *vFan, Vec_Int_t *vFon, Vec_Int_t *vFanR, Vec_Int_t *vFonR)
float Abc_NtkGetAreaSpecial2(Abc_Ntk_t *pNtk)
float Abc_NtkMfsTotalGlitching(Abc_Ntk_t *pNtk, int nPats, int Prob, int fVerbose)
void Abc_NtkInOutConeCounters(Abc_Ntk_t *pNtk, Vec_Int_t *vFan, Vec_Int_t *vFon, Vec_Int_t *vFanR, Vec_Int_t *vFonR)
void Abc_NtkPrintLatch(FILE *pFile, Abc_Ntk_t *pNtk)
int Gli_ManCreateCi(Gli_Man_t *p, int nFanouts)
void Abc_NtkInOutSupportCounters(Abc_Ntk_t *pNtk, Vec_Int_t *vFan, Vec_Int_t *vFon, Vec_Int_t *vFanR, Vec_Int_t *vFonR)
void Abc_NodePrintLevel(FILE *pFile, Abc_Obj_t *pNode)
void Abc_Show6VarFunc(word F0, word F1)
void Abc_NtkPrintStrSupports(Abc_Ntk_t *pNtk, int fMatrix)
void Abc_NtkPrintSharing(Abc_Ntk_t *pNtk)
char * Abc_NodeGetPrintName(Abc_Obj_t *pObj)
void Gli_ManStop(Gli_Man_t *p)
void Abc_NtkPrintFanio(FILE *pFile, Abc_Ntk_t *pNtk, int fUseFanio, int fUsePio, int fUseSupp, int fUseCone)
void Abc_NtkPrintIo(FILE *pFile, Abc_Ntk_t *pNtk, int fPrintFlops)
void Abc_NodePrintFactor(FILE *pFile, Abc_Obj_t *pNode, int fUseRealNames)
float Abc_NtkMfsTotalSwitching(Abc_Ntk_t *pNtk)
void Abc_NodePrintSop(FILE *pFile, Abc_Obj_t *pNode, int fUseRealNames)
void Abc_NtkPrintMiter(Abc_Ntk_t *pNtk)
void Gli_ManSwitchesAndGlitches(Gli_Man_t *p, int nPatterns, float PiTransProb, int fVerbose)
float Abc_NtkGetAreaSpecial(Abc_Ntk_t *pNtk)
void Abc_NtkPrintPoEquivs(Abc_Ntk_t *pNtk)
int Gli_ObjNumSwitches(Gli_Man_t *p, int iNode)
void Abc_NtkPrintSop(FILE *pFile, Abc_Ntk_t *pNtk, int fUseRealNames)
void Abc_NodeMffcConeSuppPrint(Abc_Obj_t *pNode)
int Abc_NtkCountMuxes(Abc_Ntk_t *pNtk)
int Abc_NtkGetMultiRefNum(Abc_Ntk_t *pNtk)
struct Abc_Obj_t_ Abc_Obj_t
ABC_DLL void Abc_NtkCleanMarkA(Abc_Ntk_t *pNtk)
#define Abc_NtkForEachCo(pNtk, pCo, i)
ABC_DLL int Abc_NtkGetBufNum(Abc_Ntk_t *pNtk)
ABC_DLL int Abc_NtkGetLitNum(Abc_Ntk_t *pNtk)
ABC_DLL int Abc_NtkGetLitFactNum(Abc_Ntk_t *pNtk)
ABC_DLL int Abc_NtkGetFaninMax(Abc_Ntk_t *pNtk)
ABC_DLL float Abc_NtkDelayTrace(Abc_Ntk_t *pNtk, Abc_Obj_t *pOut, Abc_Obj_t *pIn, int fPrint)
ABC_DLL Vec_Ptr_t * Abc_NodeGetFaninNames(Abc_Obj_t *pNode)
ABC_DLL int Abc_SopIsConst0(char *pSop)
ABC_DLL int Abc_NodeMffcSize(Abc_Obj_t *pNode)
FUNCTION DEFINITIONS ///.
#define Abc_NtkForEachNodeNotBarBuf(pNtk, pNode, i)
#define Abc_NtkForEachPo(pNtk, pPo, i)
ABC_DLL Abc_Obj_t * Abc_NtkFetchTwinNode(Abc_Obj_t *pNode)
#define Abc_NtkForEachLatch(pNtk, pObj, i)
ABC_DLL int Abc_NtkSopToBdd(Abc_Ntk_t *pNtk)
ABC_DLL int Abc_NtkGetChoiceNum(Abc_Ntk_t *pNtk)
ABC_DLL Vec_Ptr_t * Abc_NtkDfs(Abc_Ntk_t *pNtk, int fCollectAll)
#define Abc_NtkForEachObj(pNtk, pObj, i)
ITERATORS ///.
ABC_DLL void Abc_NodeFreeNames(Vec_Ptr_t *vNames)
ABC_DLL double Abc_NtkGetMappedArea(Abc_Ntk_t *pNtk)
#define Abc_ObjForEachFanin(pObj, pFanin, i)
#define Abc_ObjForEachFanout(pObj, pFanout, i)
ABC_DLL int Abc_SopGetPhase(char *pSop)
ABC_DLL char * Abc_ObjName(Abc_Obj_t *pNode)
DECLARATIONS ///.
ABC_DLL int Abc_NtkGetExorNum(Abc_Ntk_t *pNtk)
struct Abc_Ntk_t_ Abc_Ntk_t
ABC_DLL Vec_Ptr_t * Abc_NtkNodeSupport(Abc_Ntk_t *pNtk, Abc_Obj_t **ppNodes, int nNodes)
ABC_DLL float Abc_NtkDelayTraceLut(Abc_Ntk_t *pNtk, int fUseLutLib)
ABC_DLL int Abc_NodeIsConst(Abc_Obj_t *pNode)
ABC_DLL int Abc_NtkLevel(Abc_Ntk_t *pNtk)
ABC_DLL int Abc_NtkGetBddNodeNum(Abc_Ntk_t *pNtk)
#define Abc_NtkForEachObjReverse(pNtk, pNode, i)
ABC_DLL int Abc_NtkToAig(Abc_Ntk_t *pNtk)
#define Abc_SopForEachCube(pSop, nFanins, pCube)
#define Abc_NtkForEachPi(pNtk, pPi, i)
ABC_DLL int Abc_SopIsInv(char *pSop)
ABC_DLL Abc_Ntk_t * Abc_NtkStrash(Abc_Ntk_t *pNtk, int fAllNodes, int fCleanup, int fRecord)
ABC_DLL int Abc_AigLevel(Abc_Ntk_t *pNtk)
ABC_DLL int Abc_SopGetVarNum(char *pSop)
ABC_DLL int Abc_NtkGetAigNodeNum(Abc_Ntk_t *pNtk)
#define Abc_NtkForEachCi(pNtk, pCi, i)
ABC_DLL void Abc_NtkDelete(Abc_Ntk_t *pNtk)
ABC_DLL Vec_Ptr_t * Abc_NtkDfsNodes(Abc_Ntk_t *pNtk, Abc_Obj_t **ppNodes, int nNodes)
ABC_DLL int Abc_SopIsComplement(char *pSop)
ABC_DLL int Abc_SopIsAndType(char *pSop)
ABC_DLL int Abc_NtkGetLargeNodeNum(Abc_Ntk_t *pNtk)
ABC_DLL int Abc_SopIsBuf(char *pSop)
ABC_DLL int Abc_SopIsConst1(char *pSop)
ABC_DLL int Abc_NtkGetCubeNum(Abc_Ntk_t *pNtk)
ABC_DLL int Abc_NtkBddToSop(Abc_Ntk_t *pNtk, int fMode, int nCubeLimit, int fCubeSort)
ABC_DLL void Abc_ManTimeStop(Abc_ManTime_t *p)
ABC_DLL float Abc_NodeReadArrivalWorst(Abc_Obj_t *pNode)
ABC_DLL Abc_Obj_t * Abc_AigConst1(Abc_Ntk_t *pNtk)
ABC_DLL int Abc_NodeIsConst1(Abc_Obj_t *pNode)
ABC_DLL int Abc_SopIsOrType(char *pSop)
ABC_DLL int Abc_NtkGetTotalFanins(Abc_Ntk_t *pNtk)
#define Abc_NtkForEachNode(pNtk, pNode, i)
#define ABC_SWAP(Type, a, b)
#define ABC_ALLOC(type, num)
#define ABC_INFINITY
MACRO DEFINITIONS ///.
#define ABC_NAMESPACE_IMPL_START
#define ABC_NAMESPACE_IMPL_END
void Aig_ManStop(Aig_Man_t *p)
struct Aig_Obj_t_ Aig_Obj_t
typedefABC_NAMESPACE_HEADER_START struct Aig_Man_t_ Aig_Man_t
INCLUDES ///.
ABC_DLL void * Abc_FrameReadLibLut()
ABC_DLL void * Abc_FrameReadLibGen()
typedefABC_NAMESPACE_IMPL_START struct Vec_Int_t_ Vec_Int_t
DECLARATIONS ///.
void Dec_GraphPrint(FILE *pFile, Dec_Graph_t *pGraph, char *pNamesIn[], char *pNameOut)
FUNCTION DEFINITIONS ///.
Dec_Graph_t * Dec_Factor(char *pSop)
FUNCTION DECLARATIONS ///.
struct Dec_Graph_t_ Dec_Graph_t
struct Gli_Man_t_ Gli_Man_t
Vec_Int_t * Saig_ManComputeSwitchProbs(Aig_Man_t *pAig, int nFrames, int nPref, int fProbOne)
Aig_Man_t * Abc_NtkToDar(Abc_Ntk_t *pNtk, int fExors, int fRegisters)
typedefABC_NAMESPACE_HEADER_START struct Hop_Man_t_ Hop_Man_t
INCLUDES ///.
unsigned * Hop_ManConvertAigToTruth(Hop_Man_t *p, Hop_Obj_t *pRoot, int nVars, Vec_Int_t *vTruth, int fMsbFirst)
struct Hop_Obj_t_ Hop_Obj_t
struct If_LibLut_t_ If_LibLut_t
Io_FileType_t
INCLUDES ///.
void Io_Write(Abc_Ntk_t *pNtk, char *pFileName, Io_FileType_t FileType)
abctime s_MappingTime
DECLARATIONS ///.
unsigned __int64 word
DECLARATIONS ///.
int Mio_GateReadPinNum(Mio_Gate_t *pGate)
double Mio_GateReadArea(Mio_Gate_t *pGate)
struct Mio_LibraryStruct_t_ Mio_Library_t
char * Mio_GateReadSop(Mio_Gate_t *pGate)
int Mio_GateReadProfile(Mio_Gate_t *pGate)
int Mio_GateReadProfile2(Mio_Gate_t *pGate)
Mio_Gate_t ** Mio_LibraryReadGateArray(Mio_Library_t *pLib)
int Mio_GateReadValue(Mio_Gate_t *pGate)
void Mio_GateSetValue(Mio_Gate_t *pGate, int Value)
char * Mio_GateReadName(Mio_Gate_t *pGate)
int Mio_LibraryReadGateNum(Mio_Library_t *pLib)
void Mio_GateIncProfile2(Mio_Gate_t *pGate)
struct Mio_GateStruct_t_ Mio_Gate_t
void Mio_GateSetProfile2(Mio_Gate_t *pGate, int Prof)
char * Mio_GateReadForm(Mio_Gate_t *pGate)
word * Mio_GateReadTruthP(Mio_Gate_t *pGate)
float pLutAreas[IF_MAX_LUTSIZE+1]
#define Vec_PtrForEachEntryReverse(Type, vVec, pEntry, i)
typedefABC_NAMESPACE_HEADER_START struct Vec_Ptr_t_ Vec_Ptr_t
INCLUDES ///.
#define Vec_PtrForEachEntry(Type, vVec, pEntry, i)
MACRO DEFINITIONS ///.
typedefABC_NAMESPACE_HEADER_START struct Vec_Wec_t_ Vec_Wec_t
INCLUDES ///.
typedefABC_NAMESPACE_HEADER_START struct Vec_Wrd_t_ Vec_Wrd_t
INCLUDES ///.