summaryrefslogtreecommitdiffstats
path: root/src/aig/gia/giaMan.c
diff options
context:
space:
mode:
authorAlan Mishchenko <alanmi@berkeley.edu>2009-03-21 08:01:00 -0700
committerAlan Mishchenko <alanmi@berkeley.edu>2009-03-21 08:01:00 -0700
commitd74d35aa4244a1e2e8e73c0776703528a5bd94db (patch)
tree8cf43cb2d96ca35eed60c7858c8f5e58d8ccca74 /src/aig/gia/giaMan.c
parent770bc99e79baa07a9d2cc7a25dc30ee86ed34d91 (diff)
downloadabc-d74d35aa4244a1e2e8e73c0776703528a5bd94db.tar.gz
abc-d74d35aa4244a1e2e8e73c0776703528a5bd94db.tar.bz2
abc-d74d35aa4244a1e2e8e73c0776703528a5bd94db.zip
Version abc90321
Diffstat (limited to 'src/aig/gia/giaMan.c')
-rw-r--r--src/aig/gia/giaMan.c58
1 files changed, 58 insertions, 0 deletions
diff --git a/src/aig/gia/giaMan.c b/src/aig/gia/giaMan.c
index 95bffee8..4439453d 100644
--- a/src/aig/gia/giaMan.c
+++ b/src/aig/gia/giaMan.c
@@ -66,6 +66,8 @@ Gia_Man_t * Gia_ManStart( int nObjsMax )
***********************************************************************/
void Gia_ManStop( Gia_Man_t * p )
{
+ if ( p->vFlopClasses )
+ Vec_IntFree( p->vFlopClasses );
Vec_IntFree( p->vCis );
Vec_IntFree( p->vCos );
ABC_FREE( p->pCexComb );
@@ -94,6 +96,38 @@ void Gia_ManStop( Gia_Man_t * p )
SeeAlso []
***********************************************************************/
+void Gia_ManPrintClasses( Gia_Man_t * p )
+{
+ Gia_Obj_t * pObj;
+ int i;
+ if ( p->vFlopClasses == NULL )
+ return;
+ Gia_ManForEachRo( p, pObj, i )
+ printf( "%d", Vec_IntEntry(p->vFlopClasses, i) );
+ printf( "\n" );
+
+ {
+ Gia_Man_t * pTemp;
+ pTemp = Gia_ManDupFlopClass( p, 1 );
+ Gia_WriteAiger( pTemp, "dom1.aig", 0, 0 );
+ Gia_ManStop( pTemp );
+ pTemp = Gia_ManDupFlopClass( p, 2 );
+ Gia_WriteAiger( pTemp, "dom2.aig", 0, 0 );
+ Gia_ManStop( pTemp );
+ }
+}
+
+/**Function*************************************************************
+
+ Synopsis [Prints stats for the AIG.]
+
+ Description []
+
+ SideEffects []
+
+ SeeAlso []
+
+***********************************************************************/
void Gia_ManPrintStats( Gia_Man_t * p )
{
if ( p->pName )
@@ -113,6 +147,8 @@ void Gia_ManPrintStats( Gia_Man_t * p )
Gia_ManEquivPrintClasses( p, 0, 0.0 );
if ( p->pMapping )
Gia_ManPrintMappingStats( p );
+ // print register classes
+// Gia_ManPrintClasses( p );
}
/**Function*************************************************************
@@ -205,6 +241,28 @@ void Gia_ManSetRegNum( Gia_Man_t * p, int nRegs )
}
+/**Function*************************************************************
+
+ Synopsis [Reports the reduction of the AIG.]
+
+ Description []
+
+ SideEffects []
+
+ SeeAlso []
+
+***********************************************************************/
+void Gia_ManReportImprovement( Gia_Man_t * p, Gia_Man_t * pNew )
+{
+ printf( "REG: Beg = %5d. End = %5d. (R =%5.1f %%) ",
+ Gia_ManRegNum(p), Gia_ManRegNum(pNew),
+ Gia_ManRegNum(p)? 100.0*(Gia_ManRegNum(p)-Gia_ManRegNum(pNew))/Gia_ManRegNum(p) : 0.0 );
+ printf( "AND: Beg = %6d. End = %6d. (R =%5.1f %%)",
+ Gia_ManAndNum(p), Gia_ManAndNum(pNew),
+ Gia_ManAndNum(p)? 100.0*(Gia_ManAndNum(p)-Gia_ManAndNum(pNew))/Gia_ManAndNum(p) : 0.0 );
+ printf( "\n" );
+}
+
////////////////////////////////////////////////////////////////////////
/// END OF FILE ///
////////////////////////////////////////////////////////////////////////