diff options
Diffstat (limited to 'src/base/abci')
-rw-r--r-- | src/base/abci/abc.c | 26 | ||||
-rw-r--r-- | src/base/abci/abcPrint.c | 11 |
2 files changed, 30 insertions, 7 deletions
diff --git a/src/base/abci/abc.c b/src/base/abci/abc.c index c525cda1..123bed95 100644 --- a/src/base/abci/abc.c +++ b/src/base/abci/abc.c @@ -1231,15 +1231,20 @@ int Abc_CommandPrintFanio( Abc_Frame_t * pAbc, int argc, char ** argv ) { Abc_Ntk_t * pNtk = Abc_FrameReadNtk(pAbc); int c; + int fMffc; int fVerbose; // set defaults + fMffc = 0; fVerbose = 0; Extra_UtilGetoptReset(); - while ( ( c = Extra_UtilGetopt( argc, argv, "vh" ) ) != EOF ) + while ( ( c = Extra_UtilGetopt( argc, argv, "mvh" ) ) != EOF ) { switch ( c ) { + case 'm': + fMffc ^= 1; + break; case 'v': fVerbose ^= 1; break; @@ -1260,12 +1265,13 @@ int Abc_CommandPrintFanio( Abc_Frame_t * pAbc, int argc, char ** argv ) if ( fVerbose ) Abc_NtkPrintFanio( stdout, pNtk ); else - Abc_NtkPrintFanioNew( stdout, pNtk ); + Abc_NtkPrintFanioNew( stdout, pNtk, fMffc ); return 0; usage: - Abc_Print( -2, "usage: print_fanio [-vh]\n" ); + Abc_Print( -2, "usage: print_fanio [-mvh]\n" ); Abc_Print( -2, "\t prints the statistics about fanins/fanouts of all nodes\n" ); + Abc_Print( -2, "\t-m : toggles printing MFFC sizes instead of fanouts [default = %s]\n", fMffc? "yes": "no" ); Abc_Print( -2, "\t-v : toggles verbose way of printing the stats [default = %s]\n", fVerbose? "yes": "no" ); Abc_Print( -2, "\t-h : print the command usage\n"); return 1; @@ -8682,8 +8688,10 @@ int Abc_CommandTest( Abc_Frame_t * pAbc, int argc, char ** argv ) /* { - extern Abc_Ntk_t * Au_ManTransformTest( Abc_Ntk_t * pAig ); - pNtkRes = Au_ManTransformTest( pNtk ); +// extern Abc_Ntk_t * Au_ManTransformTest( Abc_Ntk_t * pAig ); + extern Abc_Ntk_t * Au_ManResubTest( Abc_Ntk_t * pAig ); +// pNtkRes = Au_ManTransformTest( pNtk ); + pNtkRes = Au_ManResubTest( pNtk ); if ( pNtkRes == NULL ) { Abc_Print( -1, "Command has failed.\n" ); @@ -8693,12 +8701,20 @@ int Abc_CommandTest( Abc_Frame_t * pAbc, int argc, char ** argv ) Abc_FrameReplaceCurrentNetwork( pAbc, pNtkRes ); } */ + /* { extern void Au_DsdVecTest( int nVars ); Au_DsdVecTest( 6 ); } */ +{ +// extern void Au_NtkReadFour( Abc_Ntk_t * pNtk ); +// extern void Au_Data4VerifyFour(); +// Au_NtkReadFour( pNtk ); +// Au_Data4VerifyFour(); +} + // Abc_NtkCheckAbsorb( pNtk, 4 ); /* diff --git a/src/base/abci/abcPrint.c b/src/base/abci/abcPrint.c index bd5f986f..3b0ab94a 100644 --- a/src/base/abci/abcPrint.c +++ b/src/base/abci/abcPrint.c @@ -535,7 +535,7 @@ void Abc_NtkPrintFanio( FILE * pFile, Abc_Ntk_t * pNtk ) SeeAlso [] ***********************************************************************/ -void Abc_NtkPrintFanioNew( FILE * pFile, Abc_Ntk_t * pNtk ) +void Abc_NtkPrintFanioNew( FILE * pFile, Abc_Ntk_t * pNtk, int fMffc ) { char Buffer[100]; Abc_Obj_t * pNode; @@ -548,9 +548,13 @@ void Abc_NtkPrintFanioNew( FILE * pFile, Abc_Ntk_t * pNtk ) nFaninsAll = nFanoutsAll = 0; Abc_NtkForEachNode( pNtk, pNode, i ) { + if ( fMffc && Abc_ObjFanoutNum(pNode) == 1 ) + continue; nFanins = Abc_ObjFaninNum(pNode); if ( Abc_NtkIsNetlist(pNtk) ) nFanouts = Abc_ObjFanoutNum( Abc_ObjFanout0(pNode) ); + else if ( fMffc ) + nFanouts = Abc_NodeMffcSize(pNode); else nFanouts = Abc_ObjFanoutNum(pNode); nFaninsAll += nFanins; @@ -567,12 +571,15 @@ void Abc_NtkPrintFanioNew( FILE * pFile, Abc_Ntk_t * pNtk ) // count the number of fanins and fanouts Abc_NtkForEachNode( pNtk, pNode, i ) { + if ( fMffc && Abc_ObjFanoutNum(pNode) == 1 ) + continue; nFanins = Abc_ObjFaninNum(pNode); if ( Abc_NtkIsNetlist(pNtk) ) nFanouts = Abc_ObjFanoutNum( Abc_ObjFanout0(pNode) ); + else if ( fMffc ) + nFanouts = Abc_NodeMffcSize(pNode); else nFanouts = Abc_ObjFanoutNum(pNode); -// nFanouts = Abc_NodeMffcSize(pNode); if ( nFanins < 10 ) Vec_IntAddToEntry( vFanins, nFanins, 1 ); |