From 70697f868a263930e971c062e5b46e64fbb1ee18 Mon Sep 17 00:00:00 2001 From: Alan Mishchenko Date: Mon, 22 Jun 2015 23:04:43 -0700 Subject: Version abc90528 committer: Baruch Sterin --- src/aig/ntl/ntlMan.c | 82 ++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 82 insertions(+) (limited to 'src/aig/ntl/ntlMan.c') diff --git a/src/aig/ntl/ntlMan.c b/src/aig/ntl/ntlMan.c index 4c9bb311..da7e2317 100644 --- a/src/aig/ntl/ntlMan.c +++ b/src/aig/ntl/ntlMan.c @@ -283,6 +283,88 @@ void Nwk_ManPrintStatsShort( Ntl_Man_t * p, Aig_Man_t * pAig, Nwk_Man_t * pNtk ) } } +/**Function************************************************************* + + Synopsis [] + + Description [] + + SideEffects [] + + SeeAlso [] + +***********************************************************************/ +int Nwk_ManStatsRegs( Ntl_Man_t * p ) +{ + Ntl_Mod_t * pRoot; + Ntl_Obj_t * pObj; + int i, Counter = 0; + pRoot = Ntl_ManRootModel( p ); + Ntl_ModelForEachBox( pRoot, pObj, i ) + if ( strcmp(pObj->pImplem->pName, "dff") == 0 ) + Counter++; + return Counter; +} + +/**Function************************************************************* + + Synopsis [] + + Description [] + + SideEffects [] + + SeeAlso [] + +***********************************************************************/ +int Nwk_ManStatsLuts( Nwk_Man_t * pNtk ) +{ + return pNtk ? Nwk_ManNodeNum(pNtk) : -1; +} + +/**Function************************************************************* + + Synopsis [] + + Description [] + + SideEffects [] + + SeeAlso [] + +***********************************************************************/ +int Nwk_ManStatsLevs( Nwk_Man_t * pNtk ) +{ + return pNtk ? Nwk_ManLevel(pNtk) : -1; +} + + +/**Function************************************************************* + + Synopsis [] + + Description [] + + SideEffects [] + + SeeAlso [] + +***********************************************************************/ +void Nwk_ManPrintStatsUpdate( Ntl_Man_t * p, Aig_Man_t * pAig, Nwk_Man_t * pNtk, + int nRegInit, int nLutInit, int nLevInit, int Time ) +{ + printf( "FF =%7d (%4.1f%%) ", Nwk_ManStatsRegs(p), 100.0*(nRegInit-Nwk_ManStatsRegs(p))/nRegInit ); + if ( pNtk == NULL ) + printf( "Mapping is not available. " ); + else + { + printf( "Lut =%7d (%4.1f%%) ", Nwk_ManStatsLuts(pNtk), 100.0*(nLutInit-Nwk_ManStatsLuts(pNtk))/nLutInit ); + printf( "Lev =%4d (%4.1f%%) ", Nwk_ManStatsLevs(pNtk), 100.0*(nLevInit-Nwk_ManStatsLevs(pNtk))/nLevInit ); + } + ABC_PRT( "Time", clock() - Time ); +} + + /**Function************************************************************* Synopsis [Deallocates the netlist manager.] -- cgit v1.2.3