summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/aig/gia/giaIf.c7
-rw-r--r--src/base/abci/abc.c21
2 files changed, 23 insertions, 5 deletions
diff --git a/src/aig/gia/giaIf.c b/src/aig/gia/giaIf.c
index 4b6095e5..a1541da7 100644
--- a/src/aig/gia/giaIf.c
+++ b/src/aig/gia/giaIf.c
@@ -1618,7 +1618,12 @@ Gia_Man_t * Gia_ManPerformMapping( Gia_Man_t * p, void * pp, int fNormalized )
}
// compute switching for the IF objects
if ( pPars->fPower )
- If_ManComputeSwitching( pIfMan );
+ {
+ if ( p->pManTime == NULL )
+ If_ManComputeSwitching( pIfMan );
+ else
+ Abc_Print( 0, "Switching activity computation for designs with boxes is disabled.\n" );
+ }
if ( p->pManTime )
pIfMan->pManTim = Tim_ManDup( (Tim_Man_t *)p->pManTime, 0 );
if ( !If_ManPerformMapping( pIfMan ) )
diff --git a/src/base/abci/abc.c b/src/base/abci/abc.c
index 05a03aca..812e1820 100644
--- a/src/base/abci/abc.c
+++ b/src/base/abci/abc.c
@@ -25614,16 +25614,19 @@ usage:
int Abc_CommandAbc9Hash( Abc_Frame_t * pAbc, int argc, char ** argv )
{
Gia_Man_t * pTemp;
- int c;
+ int c, fCollapse = 0;
int fAddStrash = 0;
Extra_UtilGetoptReset();
- while ( ( c = Extra_UtilGetopt( argc, argv, "ah" ) ) != EOF )
+ while ( ( c = Extra_UtilGetopt( argc, argv, "ach" ) ) != EOF )
{
switch ( c )
{
case 'a':
fAddStrash ^= 1;
break;
+ case 'c':
+ fCollapse ^= 1;
+ break;
case 'h':
goto usage;
default:
@@ -25635,14 +25638,24 @@ int Abc_CommandAbc9Hash( Abc_Frame_t * pAbc, int argc, char ** argv )
Abc_Print( -1, "Abc_CommandAbc9Hash(): There is no AIG.\n" );
return 1;
}
- pTemp = Gia_ManRehash( pAbc->pGia, fAddStrash );
+ if ( fCollapse && pAbc->pGia->pAigExtra )
+ {
+ Gia_Man_t * pNew = Gia_ManDupUnnormalize( pAbc->pGia );
+ pNew->pManTime = pAbc->pGia->pManTime;
+ pTemp = Gia_ManDupCollapse( pNew, pAbc->pGia->pAigExtra, NULL );
+ pNew->pManTime = NULL;
+ Gia_ManStop( pNew );
+ }
+ else
+ pTemp = Gia_ManRehash( pAbc->pGia, fAddStrash );
Abc_FrameUpdateGia( pAbc, pTemp );
return 0;
usage:
- Abc_Print( -2, "usage: &st [-ah]\n" );
+ Abc_Print( -2, "usage: &st [-ach]\n" );
Abc_Print( -2, "\t performs structural hashing\n" );
Abc_Print( -2, "\t-a : toggle additional hashing [default = %s]\n", fAddStrash? "yes": "no" );
+ Abc_Print( -2, "\t-c : toggle collapsing hierarchical AIG [default = %s]\n", fCollapse? "yes": "no" );
Abc_Print( -2, "\t-h : print the command usage\n");
return 1;
}